/* ═══════════════════════════════════════════════════════
   SAFERKEYS — SHARED DESIGN TOKENS
   Single source of truth for colours, radii, shadows,
   buttons, badges, and the wordmark.

   This file lives in two places — keep them in sync:
     saferkeys-app/frontend/tokens.css     ← here
     saferkeys-website/tokens.css          ← copy

   Both files load Inter via a <link> tag in their HTML.
   Do not add layout, page-specific, or app-specific rules
   here — only things that must match across both surfaces.
═══════════════════════════════════════════════════════ */

/* ── Colour palette ── */
:root {
  --amber:      #f5b800;
  --amber-dark: #d4a000;   /* canonical — app uses this */
  --amber-dk:   #d4a000;   /* alias — website uses this */
  --amber-lt:   #fff8e1;
  --navy:       #162040;
  --navy-mid:   #1e2d52;
  --canvas:     #fffef5;
  --surface:    #ffffff;
  --green:      #34c759;
  --green-bg:   #e5f9e7;
  --red:        #ff3b30;
  --red-bg:     #ffeceb;
  --muted:      #86868b;
  --border:     #d2d2d7;
  --text:       #1d1d1f;
  --mono:       'SF Mono','Cascadia Code','Fira Code','Consolas',monospace;
}

/* ── Radii ── */
:root {
  --r-sm:     8px;
  --r-md:     12px;
  --r-lg:     16px;
  --r-pill:   999px;
  /* Aliases so app CSS (--radius-*) keeps working */
  --radius-sm: var(--r-sm);
  --radius-md: var(--r-md);
  --radius-lg: var(--r-lg);
}

/* ── Shadows ── */
:root {
  --shadow-sm: 0 2px 8px rgba(0,0,0,.04);
  --shadow:    0 4px 14px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.10), 0 4px 16px rgba(0,0,0,.06);
}

/* ── Wordmark ─────────────────────────────────────────
   Usage:  <span class="wordmark">Safer<em>keys</em></span>
   The font-size is intentionally not set here — each
   context sets it. Only weight, colour, and spacing are
   shared. ── */
.wordmark    { font-weight: 800; color: var(--navy); letter-spacing: -.5px; font-style: normal; }
.wordmark em { color: var(--amber); font-style: normal; }

/* ── Buttons ──────────────────────────────────────────
   Pill-shaped, Inter font, consistent hover lift.
   .btn-lg is additive — combine with any variant.   ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  white-space: nowrap;
  line-height: 1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-decoration: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--navy);
  box-shadow: 0 2px 4px rgba(245,184,0,.3);
}
.btn-primary:hover {
  background: var(--amber-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245,184,0,.4);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(245,184,0,.3);
}

.btn-ghost       { background: rgba(0,0,0,.04); color: var(--navy); }
.btn-ghost:hover { background: rgba(0,0,0,.08); }

.btn-danger       { background: var(--red); color: #fff; }
.btn-danger:hover { background: #d32f2f; box-shadow: 0 2px 8px rgba(255,59,48,.3); }

.btn-approve       { background: var(--navy); color: #fff; }
.btn-approve:hover { background: #000; box-shadow: 0 2px 8px rgba(0,0,0,.2); }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

/* ── Badges ───────────────────────────────────────────
   Usage: <span class="badge ok">● set</span>         ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.badge.ok  { background: var(--green-bg); color: #15803d; }
.badge.no  { background: rgba(0,0,0,.04); color: var(--muted); }
.badge.err { background: var(--red-bg);   color: #b91c1c; }

/* ── Provider abbreviation chips ─────────────────────
   Shared shape for .pabbr (grid view) and .prow-abbr
   (list view). Colour is always set inline per provider.─*/
.pabbr, .prow-abbr, .quick-pabbr {
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: -.5px;
  box-shadow: 0 2px 5px rgba(0,0,0,.10);
  flex-shrink: 0;
}
