/* BulkCall dashboard — design tokens
   Subject: an outbound-call operations console. The palette borrows from
   analog telephony signaling — the amber/orange "line in use" lamp on a
   PBX board — against a near-black switchboard ground. Numbers and status
   read in a monospace face (a call log is fundamentally tabular data);
   everything else in a plain-spoken sans.
*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Light theme (default) */
  --ink: #16191c;
  --ink-dim: #52606a;
  --paper: #f5f3ee;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e2ddd2;
  --border-strong: #cfc8b8;

  --accent: #d1550f;
  --accent-strong: #b8460a;
  --accent-weak: #fbe9dc;
  --accent-ink: #ffffff;

  --ok: #1a7f4e;
  --ok-weak: #e3f5ec;
  --warn: #a86a06;
  --warn-weak: #fbf0da;
  --bad: #b8332a;
  --bad-weak: #fbe6e3;
  --neutral-pill: #eeebe2;
  --neutral-pill-ink: #52606a;

  --shadow-color: 30 25% 10%;
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2ede2;
    --ink-dim: #a3a99f;
    --paper: #14120f;
    --surface: #1c1a16;
    --surface-raised: #242019;
    --border: #322d24;
    --border-strong: #443d30;

    --accent: #ff8a3d;
    --accent-strong: #ffa564;
    --accent-weak: #3a2412;
    --accent-ink: #1c1108;

    --ok: #4fd28c;
    --ok-weak: #123023;
    --warn: #e8b03f;
    --warn-weak: #382b0d;
    --bad: #f28b7e;
    --bad-weak: #3a1712;
    --neutral-pill: #2a251d;
    --neutral-pill-ink: #a3a99f;

    --shadow-color: 20 40% 2%;
  }
}

:root[data-theme="dark"] {
  --ink: #f2ede2;
  --ink-dim: #a3a99f;
  --paper: #14120f;
  --surface: #1c1a16;
  --surface-raised: #242019;
  --border: #322d24;
  --border-strong: #443d30;

  --accent: #ff8a3d;
  --accent-strong: #ffa564;
  --accent-weak: #3a2412;
  --accent-ink: #1c1108;

  --ok: #4fd28c;
  --ok-weak: #123023;
  --warn: #e8b03f;
  --warn-weak: #382b0d;
  --bad: #f28b7e;
  --bad-weak: #3a1712;
  --neutral-pill: #2a251d;
  --neutral-pill-ink: #a3a99f;

  --shadow-color: 20 40% 2%;
}

* { box-sizing: border-box; }

/* Every icon in ICONS (app.js) is fill="none" with no stroke attribute of
   its own, relying on CSS to supply one — this base rule is the one place
   that needs to, rather than every individual usage remembering to add
   `stroke: currentColor` itself (several didn't, which is why a handful
   of icon buttons across the dashboard were rendering invisibly — the
   button's own color set correctly, but nothing ever told the SVG's
   stroke to pick it up). Only a usage that deliberately wants a fixed
   color instead of "the surrounding text/button color" should override
   this locally. */
svg { stroke: currentColor; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

h1, h2, h3, h4 { text-wrap: balance; margin: 0; font-family: var(--font-sans); }

a { color: inherit; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: var(--accent-weak); color: var(--accent-strong); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- App shell ---------- */

#app { display: flex; min-height: 100vh; }

.rail {
  width: 232px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 4px;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
}

.rail-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rail-brand-mark svg { width: 16px; height: 16px; stroke: var(--accent-ink); }

.rail-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.rail-brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.rail-brand-text span { font-size: 11px; color: var(--ink-dim); }

.rail-nav { display: flex; flex-direction: column; gap: 2px; }

.rail-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-dim);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.rail-link svg { width: 16px; height: 16px; opacity: 0.85; flex-shrink: 0; }
.rail-link:hover { background: var(--paper); color: var(--ink); }
.rail-link.active { background: var(--accent-weak); color: var(--accent-strong); font-weight: 600; }

.rail-spacer { flex: 1; }

.rail-footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-admin { font-size: 12px; color: var(--ink-dim); padding: 0 10px; }
.rail-admin strong { color: var(--ink); font-weight: 600; }

main.content { flex: 1; min-width: 0; padding: 28px 36px 60px; }

/* ---------- Mobile nav (hamburger + slide-out drawer) ---------- */
/* Hidden entirely on desktop widths — .rail is always visible there via
   the flex layout above, so the topbar/backdrop/close-button below only
   do anything under the 760px breakpoint further down this file. */

.mobile-topbar { display: none; }
.rail-close-btn { display: none; }
.rail-backdrop { display: none; }

@media (max-width: 760px) {
  #app { display: block; min-height: 100vh; }

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .mobile-topbar strong { font-size: 15px; font-weight: 700; }
  .mobile-topbar .rail-brand-mark { width: 26px; height: 26px; }
  .mobile-topbar .rail-brand-mark svg { width: 14px; height: 14px; }

  .mobile-menu-btn {
    background: none;
    border: none;
    color: var(--ink);
    padding: 4px;
    cursor: pointer;
    display: flex;
    line-height: 0;
  }

  .mobile-menu-btn svg { width: 22px; height: 22px; stroke: currentColor; }

  .rail-close-btn { display: flex; margin-left: auto; }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 0 transparent;
    overflow-y: auto;
    max-width: 82vw;
  }

  .rail.open {
    transform: translateX(0);
    box-shadow: 20px 0 40px -20px hsl(var(--shadow-color) / 0.4);
  }

  .rail-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--ink) 45%, transparent);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .rail-backdrop.open { opacity: 1; pointer-events: auto; }

  main.content { padding: 20px 16px 48px; }

  /* .page-header's second child is always the trailing action-button
     row (Refresh/Quick dial/New campaign, etc, styled inline per-page
     rather than with a shared class) — let it wrap and its buttons
     shrink instead of overflowing the viewport. .page-header itself
     already wraps via flex-wrap, but its button-row child was a plain
     flex row with no wrap of its own, so on a narrow screen the buttons
     just ran off the right edge. */
  .page-header > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .page-header > div:last-child .btn { flex: 1 1 auto; }

  .list-toolbar { flex-wrap: wrap; }
  .list-toolbar input[type="search"] { max-width: none; flex: 1 1 160px; }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-header p { margin: 4px 0 0; color: var(--ink-dim); font-size: 13px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); }

.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--paper); }

.btn-ghost { background: none; color: var(--ink-dim); }
.btn-ghost:hover:not(:disabled) { background: var(--paper); color: var(--ink); }

.btn-danger { background: none; color: var(--bad); border-color: var(--bad); }
.btn-danger:hover:not(:disabled) { background: var(--bad-weak); }

.btn svg { width: 15px; height: 15px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

/* ---------- Cards / surfaces ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.card-pad { padding: 20px; }

/* ---------- List toolbar (search + filters) ---------- */

.list-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.list-toolbar input[type="search"] {
  flex: 1;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink);
}

.list-toolbar select {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink);
}

.list-toolbar input[type="search"]:focus,
.list-toolbar select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.row-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  white-space: nowrap;
}

.row-actions .btn {
  padding: 6px;
  min-width: 0;
}

.row-actions .btn svg { width: 15px; height: 15px; }

/* ---------- Stat strip ---------- */

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-tile .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
}

.stat-tile .value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stat-tile .sub { font-size: 12px; color: var(--ink-dim); }

/* ---------- Table ---------- */

.table-wrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }

table.data th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data tbody tr { cursor: pointer; transition: background 0.1s ease; }
table.data tbody tr:hover { background: var(--paper); }
table.data tbody tr:last-child td { border-bottom: none; }

.cell-number { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.cell-muted { color: var(--ink-dim); }

/* ---------- Status pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.pill .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.pill-neutral { background: var(--neutral-pill); color: var(--neutral-pill-ink); }
.pill-neutral .dot { background: var(--ink-dim); }

.pill-progress { background: var(--accent-weak); color: var(--accent-strong); }
.pill-progress .dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }

.pill-ok { background: var(--ok-weak); color: var(--ok); }
.pill-ok .dot { background: var(--ok); }

.pill-warn { background: var(--warn-weak); color: var(--warn); }
.pill-warn .dot { background: var(--warn); }

.pill-bad { background: var(--bad-weak); color: var(--bad); }
.pill-bad .dot { background: var(--bad); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .pill-progress .dot { animation: none; }
}

/* ---------- Progress bar ---------- */

.progress-track { height: 6px; border-radius: 4px; background: var(--neutral-pill); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s ease; }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-dim); }

.field input, .field textarea, .field select {
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink);
}

.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  background: var(--surface);
}

.field textarea { font-family: var(--font-mono); resize: vertical; min-height: 140px; line-height: 1.6; }

.field-hint { font-size: 11.5px; color: var(--ink-dim); }

.form-error {
  background: var(--bad-weak);
  color: var(--bad);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 500;
}

/* ---------- Login ---------- */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 45%),
    var(--paper);
  padding: 20px;
}

.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 22px; }

.login-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.login-mark svg { width: 26px; height: 26px; stroke: var(--accent-ink); }

.login-title { text-align: center; }
.login-title h1 { font-size: 19px; font-weight: 700; }
.login-title p { margin: 6px 0 0; color: var(--ink-dim); font-size: 13px; }

.login-form { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Empty state ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-dim);
  gap: 10px;
}

.empty-state svg { width: 36px; height: 36px; opacity: 0.5; }
.empty-state p { max-width: 320px; font-size: 13px; margin: 0; }

/* ---------- Detail drawer / two-pane ---------- */

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-meta-item { display: flex; flex-direction: column; gap: 3px; }
.detail-meta-item .k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-dim); }
.detail-meta-item .v { font-size: 13.5px; font-weight: 500; }

/* ---------- Device cards ---------- */

.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

.device-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.device-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.device-card-name { font-size: 14px; font-weight: 600; }
.device-card-meta { font-size: 12px; color: var(--ink-dim); }
.device-card-actions { display: flex; gap: 8px; }
.device-card-stat { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-dim); }

.device-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  margin-bottom: 12px;
}

.device-grid-revoked { opacity: 0.7; }

.token-reveal {
  background: var(--paper);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 50px -12px hsl(var(--shadow-color) / 0.4);
}

.modal h2 { font-size: 16px; font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- Quick dial ---------- */

.quickdial-numbers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.quickdial-number-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
}

.quickdial-number-row span {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
}

.quickdial-number-row button {
  background: none;
  border: none;
  color: var(--ink-dim);
  cursor: pointer;
  line-height: 0;
  padding: 2px;
  flex-shrink: 0;
}

.quickdial-number-row button svg { width: 15px; height: 15px; stroke: currentColor; }
.quickdial-number-row button:hover { color: var(--bad); }

.quickdial-empty {
  font-size: 12.5px;
  color: var(--ink-dim);
  padding: 10px 2px;
}

/* ---------- Reports ---------- */

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .report-grid { grid-template-columns: minmax(0, 1fr); }
}

.report-card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.report-card-sub {
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: 16px;
}

.outcome-bars { display: flex; flex-direction: column; gap: 10px; }

.outcome-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 56px;
  align-items: center;
  gap: 10px;
}

.outcome-bar-label {
  font-size: 12.5px;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.outcome-bar-track {
  height: 20px;
  border-radius: 5px;
  background: var(--neutral-pill);
  overflow: hidden;
  position: relative;
}

.outcome-bar-fill {
  height: 100%;
  border-radius: 5px;
  min-width: 3px;
  transition: width 0.5s ease;
}

.outcome-bar-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
}

.trend-chart-wrap { overflow-x: auto; }

.trend-svg text {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink-dim);
}

.trend-legend {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-dim);
}

.trend-legend-item { display: flex; align-items: center; gap: 6px; }

.trend-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 1fr auto auto 90px;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.leaderboard-row:last-child { border-bottom: none; }

.leaderboard-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.leaderboard-stat { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-dim); text-align: right; }

.leaderboard-rate-track {
  height: 6px;
  width: 90px;
  border-radius: 4px;
  background: var(--neutral-pill);
  overflow: hidden;
}

.leaderboard-rate-fill { height: 100%; background: var(--ok); border-radius: 4px; }

/* ---------- Bulk dial ---------- */

.bulk-row-status {
  margin-top: 10px;
  min-height: 20px;
  display: flex;
  align-items: center;
}

.bulk-row-status .spinner {
  width: 14px;
  height: 14px;
}

/* ---------- Toast ---------- */

#toast-root {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.toast {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 30px -10px hsl(var(--shadow-color) / 0.35);
  animation: toast-in 0.18s ease;
  max-width: 320px;
}

.toast.error { border-color: var(--bad); color: var(--bad); }
.toast.success { border-color: var(--ok); color: var(--ok); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Misc ---------- */

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: spin 1.4s linear infinite; }
}

.full-loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
}

@media (max-width: 760px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
