/* ============================================================================
   FingerPay — shared design system
   Single source of truth for the navy+green theme across all pages.
   Vanilla CSS, no build step. Self-hosted (fonts + CSS), so CSP 'self' covers
   everything — no third-party origins, no visitor data sent to Google.
   ============================================================================ */

/* Self-hosted webfonts (latin subset, woff2). Plus Jakarta Sans + IBM Plex Sans
   are variable fonts — one file per family covers its weight range. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('/static/fonts/PlusJakartaSans.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/fonts/IBMPlexSans.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/IBMPlexMono-500.woff2') format('woff2');
}

:root {
  --paper:        #F6F7F4;
  --ink:          #0B1220;
  --ridge:        #101B33;
  --signal:       #15A26B;
  --signal-soft:  #E4F4EC;
  --mist:         #8C97AC;
  --line:         rgba(140,151,172,0.18);
  --card:         #FFFFFF;
  --danger:       #C0392B;
  --danger-soft:  #FBEAE7;

  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius:    14px;
  --radius-lg: 18px;
}

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.5px; line-height: 1.18; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 6px; }

/* ── Brand (mark + wordmark) ───────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { width: 26px; height: 26px; color: var(--signal); flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.6px;
  color: var(--ink);
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--signal);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-outline { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--mist); opacity: 1; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; opacity: 1; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.field input::placeholder { color: var(--mist); }

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.error, .alert-error {
  background: var(--danger-soft);
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 16px;
}
.alert-success {
  background: var(--signal-soft);
  border: 1px solid rgba(21,162,107,0.25);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--signal);
  margin-bottom: 16px;
}

/* ── Text helpers ──────────────────────────────────────────────────────────── */
.muted { color: var(--mist); }
.link { color: var(--signal); font-weight: 500; }
.link:hover { text-decoration: underline; }
.mono { font-family: var(--font-mono); }

/* ── Auth / centered single-card layout ────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .sub { font-size: 14px; color: var(--mist); margin-bottom: 26px; }

/* ── Divider ("or continue with") ──────────────────────────────────────────── */
.divider { display: flex; align-items: center; text-align: center; color: var(--mist); font-size: 12px; margin: 20px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--line); }
.divider span { padding: 0 12px; }

/* ── Tables (dashboard / lists) ────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mist);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.data-table td { padding: 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Reduced motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
