@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@300;400&family=Outfit:wght@300;400;500;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #1c1614;
  --surface:     #231b18;
  --border:      #3a2a27;
  --border-mid:  #4a3530;
  --text:        #f0e8e4;
  --muted:       #9e8880;
  --gold:        #b66681;
  --gold-hover:  #c48197;
  --success:     #6a9e6a;
  --error:       #b8604a;
  --radius:      5px;
}

html, body {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(182, 102, 129, 0.07) 0%, transparent 65%);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* ── Layout ─────────────────────────────────────────────────── */

.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ── Header ─────────────────────────────────────────────────── */

.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 32px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.header__wordmark {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.header__title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 21px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.03em;
  line-height: 1;
}

.header__tagline {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header__month {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 2px;
}

/* ── Empty state ─────────────────────────────────────────────── */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55dvh;
  text-align: center;
  gap: 14px;
  animation: fadeIn 0.5s ease both;
}

.empty__mark {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 88px;
  font-weight: 300;
  color: var(--border-mid);
  line-height: 1;
}

.empty__title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.empty__sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  opacity: 0.65;
  letter-spacing: 0.02em;
}

/* ── Inbox ──────────────────────────────────────────────────── */

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.inbox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 40px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  overflow: hidden;
  animation: fadeSlide 0.45s ease both;
  animation-delay: var(--delay, 0ms);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(182, 102, 129, 0.28);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(182, 102, 129, 0.06) inset;
}

/* Left rail — slides in on hover */
.card__rail {
  width: 3px;
  flex-shrink: 0;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover .card__rail {
  opacity: 1;
}

.card__body {
  padding: 20px 20px 20px 18px;
  flex: 1;
  min-width: 0;
}

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card__sender {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__date {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 300;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.card__amount {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 22px;
  line-height: 1;
}

.card__currency {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.card__value {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 48px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
  width: 100%;
  white-space: nowrap;
}

.btn--primary {
  background: var(--gold);
  color: #0f0d0a;
  border-color: var(--gold);
}

.btn--primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-mid);
}

.btn--ghost:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* ── Older payslips ──────────────────────────────────────────── */

.older {
  padding-bottom: 40px;
  animation: fadeSlide 0.45s 0.25s ease both;
}

.older__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}

.older__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.older__rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.older__list {
  list-style: none;
  margin-top: 16px;
}

.older__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
}

.older__item:hover .older__month {
  color: var(--gold);
}

.older__month {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

.older__peek {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

.older__item:hover .older__peek {
  color: var(--text);
}

/* ── Payslip modal ───────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 340px;
  position: relative;
  transform: translateY(14px);
  transition: transform 0.25s ease;
}

.modal-backdrop.is-open .modal {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}

.modal__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal__label {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.modal__amount {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 24px;
  line-height: 1;
}

.modal__currency {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.modal__value {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 48px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.modal__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.modal__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.modal__key {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 36px;
  flex-shrink: 0;
}

.modal__val {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.02em;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal__actions .btn {
  width: 100%;
  flex: none;
}

/* ── Send status ─────────────────────────────────────────────── */

.send-status {
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
  text-align: center;
  min-height: 18px;
  margin-top: 10px;
  letter-spacing: 0.02em;
}

.send-status--ok  { color: var(--success); }
.send-status--err { color: var(--error); }

/* ── Header right cluster ────────────────────────────────────── */

.header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.btn-logout:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Login page ──────────────────────────────────────────────── */

.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeSlide 0.4s ease both;
}

.login-card__wordmark {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 28px;
}

.login-card__title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.03em;
  line-height: 1;
}

.login-card__tagline {
  font-size: 10px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-card__divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

.login-card__hint {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin-bottom: 20px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  padding: 0 18px;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: border-color 0.15s, background 0.15s;
}

.btn-google:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

/* ── Responsive: ≥480px ──────────────────────────────────────── */

@media (min-width: 480px) {
  .page {
    padding-left: 32px;
    padding-right: 32px;
  }

  .header {
    padding-top: 44px;
  }

  .card__body {
    padding: 24px 24px 24px 20px;
  }

  .card__value {
    font-size: 56px;
  }

  .card__actions {
    flex-direction: row;
  }

  .btn {
    width: auto;
    flex: 1;
  }
}
