/* ==========================================================================
   Flaming fleet: TRACKER STYLE KIT (drop-in stylesheet)
   The fleet reference look is FlamingTracker as it renders LIVE ("crystal" cards).
   Every value below is Tracker's COMPUTED style (measured 2026-09-28 at 1280 and 390px on a throwaway
   copy of Tracker; see README "How this was measured"). Where Tracker's base.css and flaming.css
   disagree, this file holds the value that actually wins in the browser, so you don't need either of
   those files.

   Class names are Tracker's own, so Tracker markup can be copied verbatim.
   Load order: fonts.css → your site CSS (optional) → tracker-style.css.
     <link rel="stylesheet" href="/static/fonts/fonts.css">       (copy _fleet/fonts/, never Google Fonts)
     <link rel="stylesheet" href="/static/css/tracker-style.css">
     <html lang="en" data-theme="ember-dark">                        (dark only)

   Sections:
     1 tokens · 2 base · 3 page shell · 4 top nav · 5 phone bar + More sheet · 6 page headings + dashboard top
     7 cards (crystal / surface) · 8 stat tiles + usage bars · 9 lists/rows · 10 buttons · 11 forms
     12 badges/pills/chips · 13 tabs · 14 modals · 15 toasts (flash) · 16 empty states
     17 settings layout · 18 billing · 19 admin shell · 20 auth pages · 21 fleet footer · 22 error page
   ========================================================================== */

/* ---------- 1. TOKENS (Tracker's live :root; DESIGN-SYSTEM §1 names) ---------- */
:root, [data-theme="ember-dark"] {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Poppins', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;

  --radius-sm: 8px;   /* buttons, inputs, nav links, small tiles */
  --radius-md: 12px;  /* dropdowns, toasts, inner panels, thumbs */
  --radius-lg: 16px;  /* cards */
  --radius-xl: 20px;  /* modals, bottom sheet */

  --bg-base: #0d0d0d;
  --bg-card: transparent;                     /* CRYSTAL cards (dashboard): border + blur only */
  --bg-surface: rgba(255, 255, 255, 0.03);    /* SURFACE cards (settings, billing, admin, empty states) */
  --bg-elevated: rgba(255, 255, 255, 0.05);
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 255, 255, 0.09);
  --bg-menu: #1a1a1a;                          /* solid dropdown menus */

  --text-strong: #ffffff;    /* headings */
  --text-primary: #f3f4f6;   /* body */
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  --text-muted: #4b5563;

  --border: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-input: rgba(255, 255, 255, 0.10);

  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-solid: #ea580c;                     /* solid flame buttons (settings Save, 2FA Enable) */
  --accent-muted: rgba(249, 115, 22, 0.10);
  --accent-glow: rgba(249, 115, 22, 0.25);
  --accent-gradient: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  --accent-gradient-soft: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);

  --success: #22c55e;  --success-muted: rgba(34, 197, 94, 0.12);
  --warning: #eab308;  --warning-muted: rgba(234, 179, 8, 0.12);
  --danger: #ef4444;   --danger-muted: rgba(239, 68, 68, 0.12);

  --shadow-flame: 0 0 20px rgba(249, 115, 22, 0.30);
  --shadow-menu: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip;   /* clip, not just hidden: hidden makes body a scroll container and breaks the sticky header */ scrollbar-width: thin; scrollbar-gutter: stable; scrollbar-color: rgba(255,255,255,.1) transparent; }
body {
  font-family: var(--font-primary); font-size: 16px; line-height: 1.5;
  background: var(--bg-base); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; overflow-x: clip;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
::selection { background: rgba(249, 115, 22, 0.3); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }
input, select, textarea, button { font-size: 16px; }   /* stops iOS zoom-on-focus */
select { color-scheme: dark; }
select option, select optgroup { background-color: #1a1a1a; color: #f3f4f6; }
/* Touch targets: 44px on touch screens only; desktop sizes to padding (Tracker's pointer:fine reset). */
button, a.btn, .nav-btn, .nav-link { min-height: 44px; min-width: 44px; }
@media (pointer: fine) { button, a.btn, .nav-btn, .nav-link { min-height: 0; min-width: 0; } }
/* Buttons use the page font (Inter), never the browser's own button font (Phil, 2026-09-28; same rule in
   Tracker's flaming.css §15). */
button { font-family: inherit; }

/* Ambient glow + ember canvas (both behind content, pointer-events none). Markup in README §3. */
.fx-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.fx-glow::before, .fx-glow::after { content: ''; position: absolute; border-radius: 9999px; filter: blur(120px); }
.fx-glow::before { top: -20%; left: -10%; width: 600px; height: 600px; background: rgba(249,115,22,.03); }
.fx-glow::after { bottom: -20%; right: -10%; width: 500px; height: 500px; background: rgba(239,68,68,.02); }
#ember-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ---------- 3. PAGE SHELL ---------- */
.content { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.5rem 5rem; position: relative; z-index: 1; }
@media (max-width: 768px) { .content { padding: 0.75rem 0.65rem 5rem !important; } }
@media (max-width: 380px) { .content { padding: 0.5rem 0.45rem 5rem !important; } }
@media (max-width: 768px) { html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; } }

/* ---------- 4. TOP NAV (logged-in) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.02); -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner { max-width: 1280px; height: 58px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.75rem; }
.brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.75rem; color: #fff; letter-spacing: 0; }
.brand-highlight { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: .125rem; flex: 1; }
.nav-link {
  padding: .375rem .75rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500;
  color: var(--text-tertiary); text-decoration: none; transition: all .15s;
}
.nav-link:hover { color: #d1d5db; background: rgba(255,255,255,.05); }
.nav-link.active { color: var(--accent); background: var(--accent-muted); }
.nav-right { display: flex; align-items: center; gap: .75rem; }
/* Site status pill (Tracker: price pill; Panel: server pill). Hidden <=640px. */
.price-pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .625rem;
  background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: .5rem;
  font-size: .75rem; line-height: 1; font-weight: 500; color: var(--text-secondary); text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.price-pill:hover { background: rgba(255,255,255,.05); border-color: var(--border-hover); }
.price-pill .pp-seg { display: inline-flex; align-items: center; gap: .3rem; }
.price-pill .pp-dot { width: .45rem; height: .45rem; border-radius: 50%; display: inline-block; }
.price-pill .pp-div { color: var(--text-muted); }
.price-pill .pp-under { color: #34d399; } .price-pill .pp-under .pp-dot { background: #10b981; }
.price-pill .pp-mid   { color: #eab308; } .price-pill .pp-mid .pp-dot   { background: #eab308; }
.price-pill .pp-over  { color: #f87171; } .price-pill .pp-over .pp-dot  { background: #ef4444; }
@media (max-width: 640px) { .price-pill { display: none; } }
/* Bell (Tracker: a link to the alerts page, no dropdown). 29x29 = 6px padding + 17px icon. */
.nav-btn {
  position: relative; display: flex; align-items: center; justify-content: center; padding: .375rem;
  border: none; border-radius: .5rem; background: transparent; color: var(--text-tertiary); cursor: pointer; transition: all .15s;
}
.nav-btn:hover { color: #d1d5db; background: rgba(255,255,255,.05); }
.nav-btn svg { width: 17px; height: 17px; }
.nav-btn .dot { position: absolute; top: -1px; right: -1px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--bg-base); }
/* User menu */
.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: .5rem; padding: .375rem .5rem; border-radius: .5rem; background: transparent; border: none; cursor: pointer; font-family: var(--font-primary); transition: background .15s; }
.user-trigger:hover { background: rgba(255,255,255,.05); }
.avatar { width: 28px; height: 28px; border-radius: 999px; background: var(--accent-gradient); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 500; color: #fff; }
.user-name { font-size: .875rem; font-weight: 500; color: #d1d5db; }
.user-caret { width: 1rem; height: 1rem; color: var(--text-tertiary); transition: transform .2s; }
.user-menu.open .user-caret { transform: rotate(180deg); }
.user-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: .5rem; width: 13rem; display: none; overflow: hidden; z-index: 60;
  background: var(--bg-menu); border: 1px solid var(--border); border-radius: .75rem; box-shadow: var(--shadow-menu);
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown-head { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.ud-name { font-size: .875rem; font-weight: 600; color: #fff; }
.ud-role { font-size: .75rem; color: var(--text-tertiary); text-transform: capitalize; }
.ud-item { display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem; font-size: .875rem; color: var(--text-secondary); text-decoration: none; transition: all .15s; }
.ud-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.ud-item svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.ud-item.active { color: var(--accent); background: rgba(255,255,255,.05); }
.ud-sep { height: 1px; background: var(--border); }
.ud-danger, .ud-danger:hover { color: #f87171; }
.ud-form { margin: 0; }
.ud-form button.ud-item { width: 100%; background: none; border: none; text-align: left; font-family: inherit; cursor: pointer; min-width: 0; min-height: 0; line-height: inherit; font-size: .875rem; }
/* Plan chip: phone only (the desktop user menu shows the plan instead). */
.mobile-plan-chip { display: none; font-family: var(--font-mono); font-size: .55rem; font-weight: 600; letter-spacing: .03em; color: var(--accent); background: var(--accent-muted); border-radius: 4px; padding: .12rem .4rem; text-decoration: none; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-right { display: none !important; }      /* bell + user menu move into the phone bar / More sheet */
  .mobile-plan-chip { display: inline-block !important; }
}

/* ---------- 5. PHONE BOTTOM BAR + MORE SHEET (<=768px). Same as _fleet/mobile-nav-kit ---------- */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; padding: .3rem 0; padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-surface); border-top: 1px solid var(--border); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.mobile-nav-inner { display: flex; justify-content: space-around; align-items: center; max-width: 480px; margin: 0 auto; }
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .3rem .5rem;
  border-radius: var(--radius-sm); border: none; background: none; cursor: pointer; text-decoration: none;
  font-family: var(--font-primary); font-size: .6rem; font-weight: 500; color: var(--text-tertiary); transition: color .15s;
}
.mobile-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.mobile-nav-item.active { color: var(--accent); }
.mobile-nav-item .more-dot { position: absolute; top: .3rem; right: calc(50% - 14px); width: 8px; height: 8px; border-radius: 9999px; background: var(--danger); box-shadow: 0 0 0 2px #0d0d0d; }
.more-sheet-backdrop { position: fixed; inset: 0; z-index: 200; display: none; opacity: 0; background: rgba(0,0,0,.5); transition: opacity .2s; }
.more-sheet-backdrop.show { display: block; opacity: 1; }
.more-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 201; max-height: 75vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-surface); border-top: 1px solid var(--border); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transform: translateY(100%); visibility: hidden; transition: transform .25s ease-out, visibility 0s linear .25s;
}
.more-sheet.show { transform: translateY(0); visibility: visible; transition: transform .25s ease-out, visibility 0s; }
.more-sheet-handle { display: flex; justify-content: center; padding: .6rem 0 .3rem; }
.more-sheet-handle::after { content: ''; width: 36px; height: 4px; background: var(--border); border-radius: 2px; }
.more-sheet-items { padding: .25rem .75rem 1rem; }
.more-sheet-item {
  display: flex; align-items: center; gap: .85rem; padding: .75rem .85rem; border-radius: var(--radius-md);
  font-size: .85rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: background .15s;
}
.more-sheet-item:hover, .more-sheet-item:active { background: var(--bg-hover); }
.more-sheet-item.active { color: var(--accent); }
.more-sheet-item.danger { color: var(--danger); }
.more-sheet-item span.more-icon { font-size: 1.15rem; width: 22px; text-align: center; }
.more-sheet-divider { height: 1px; background: var(--border-subtle); margin: .25rem .85rem; }
.more-sheet-form { margin: 0; }
.more-sheet-form button.more-sheet-item { width: 100%; background: none; border: none; text-align: left; font-family: inherit; cursor: pointer; min-width: 0; min-height: 0; line-height: inherit; font-size: .85rem; }
@media (max-width: 768px) { .mobile-nav { display: block; } }

/* ---------- 6. PAGE HEADINGS + DASHBOARD TOP (identical to _fleet/dashboard-top-kit) ---------- */
.page-head { margin-bottom: 1.5rem; }
.page-title { font-family: var(--font-primary); font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: #fff; }
.page-sub { font-size: .85rem; color: var(--text-secondary); margin-top: .25rem; }
.welcome-card { display: block; margin-bottom: 2rem !important; }   /* !important as in Tracker: beats inline margins on page title blocks */
.welcome-card h1 { font-family: var(--font-primary); font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: #fff; letter-spacing: normal; }
.welcome-card p { color: var(--text-secondary); font-size: .88rem; }
.welcome-card .welcome-sub { margin-top: .25rem; color: var(--text-secondary); font-size: 1rem; }
@media (max-width: 768px) { .welcome-card p { font-size: .75rem; } .welcome-card .welcome-sub { font-size: 1rem; } }
.header-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 768px) { .header-actions { width: 100%; gap: .35rem; } .header-actions .btn { flex: 1; justify-content: center; font-size: .68rem; padding: .35rem .5rem; min-height: 32px; } }
.tab-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1rem; }
.tab-intro { margin: 0; color: var(--text-secondary); font-size: .875rem; }
.twofa-nag { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem; margin-top: .75rem; background: rgba(124,45,18,.15); border: 1px solid rgba(194,65,12,.3); border-radius: 8px; }
.twofa-nag-msg { display: flex; align-items: center; gap: .5rem; color: #fed7aa; font-size: .875rem; line-height: 1.3125rem; }
.twofa-nag-msg svg { flex-shrink: 0; width: 16px; height: 16px; }
.twofa-nag-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.twofa-nag-enable { padding: .375rem .75rem; background: var(--accent-solid); color: #fff; border-radius: 8px; font-size: .75rem; line-height: 1.125rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s; }
.twofa-nag-enable:hover { background: #f97316; }
.twofa-nag-dismiss { padding: .375rem .5rem; background: none; border: none; color: rgba(253,186,116,.7); font-size: .75rem; cursor: pointer; }
.twofa-nag-dismiss:hover { color: #fed7aa; }
@media (max-width: 560px) { .twofa-nag { flex-direction: column; align-items: flex-start; } }
/* Section header row ("Your Items" + actions) */
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.section-head h2, .section-label { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.section-head .section-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.section-title { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
@media (max-width: 768px) { .section-title { font-size: .8rem; } }
@media (max-width: 768px) { .section-head { margin: .65rem 0 .4rem; } }
@media (max-width: 480px) { .section-head { flex-direction: column; align-items: flex-start; gap: .75rem; } }

/* ---------- 7. CARDS ----------
   CRYSTAL (Tracker dashboard, the fleet look): transparent fill, 1px white/6 hairline, 16px radius, blur 24.
   SURFACE (forms, settings, billing, admin, empty states): the same plus a white/3 fill.
   Use crystal for dashboards and data; surface for anything holding a form or a primary call to action. */
.bento-card, .widget-card, .card-crystal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); overflow: hidden; word-break: break-word; transition: border-color .2s;
}
.widget-card { -webkit-backdrop-filter: none; backdrop-filter: none; }
.bento-card { padding: 1.5rem; }
.bento-card:hover { border-color: var(--border-hover); }
.card, .card-surface {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); overflow: hidden;
}
.card-surface { padding: 1.5rem; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: .9rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border-subtle); }
.card-hover { transition: border-color .15s, background .15s, transform .15s; }
.card-hover:hover { border-color: var(--border-hover); background: var(--bg-hover); transform: translateY(-1px); }
@media (max-width: 768px) { .card, .items-list { border-radius: var(--radius-md); } .bento-card { border-radius: var(--radius-md); } }
/* Collapsible widget card (dashboard "Biggest Drops"): header row + compact rows */
.widgets-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.widget-header { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; transition: background .15s; }
.widget-header:hover { background: var(--bg-elevated); }
.widget-icon { font-size: 1.1rem; }
.widget-title { font-weight: 700; font-size: .82rem; }
.widget-count { margin-left: auto; font-family: var(--font-mono); font-size: .65rem; font-weight: 700; color: var(--text-muted); }
.widget-toggle { font-size: .7rem; color: var(--text-muted); transition: transform .2s; }
.widget-card.collapsed .widget-toggle { transform: rotate(-90deg); }
.widget-card.collapsed .widget-header { border-bottom: none; }
.widget-card.collapsed .widget-body { display: none; }
.widget-body { padding: .35rem 0; }
.widget-item { display: flex; justify-content: space-between; align-items: center; padding: .55rem 1rem; cursor: pointer; transition: background .1s; }
.widget-item:hover { background: var(--bg-elevated); }
.widget-item-info { flex: 1; min-width: 0; margin-right: .75rem; }
.widget-item-title { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-item-right { text-align: right; flex-shrink: 0; }
.widget-change { font-size: .62rem; font-weight: 700; margin-top: .1rem; }
.widget-change.down { color: var(--success); } .widget-change.atlow { color: var(--accent); }
.widget-change.near { color: #14b8a6; } .widget-change.target { color: var(--text-muted); }
.widget-item-meta { font-size: .65rem; color: var(--text-muted); margin-top: .1rem; font-family: var(--font-mono); }
.widget-price { font-family: var(--font-mono); font-size: .88rem; font-weight: 700; }

/* ---------- 8. STAT TILES + USAGE BARS ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.bento-stat { grid-column: span 3; }
.bento-usage { grid-column: span 4; }
.bento-wide { grid-column: span 6; }
.bento-full { grid-column: span 12; }
.bento-label { font-size: .72rem; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.bento-value { font-family: var(--font-mono); font-size: 1.65rem; line-height: 1.1; font-weight: 700; letter-spacing: -.04em; color: var(--text-primary); }
.bento-value.teal { color: var(--accent); } .bento-value.green { color: var(--success); }
.bento-value.amber { color: var(--warning); } .bento-value.red { color: var(--danger); }
.bento-sub { font-size: .72rem; color: var(--text-muted); margin-top: .3rem; }
.bento-badge { display: inline-flex; font-size: .65rem; font-weight: 700; padding: .12rem .45rem; border-radius: 5px; margin-top: .3rem; }
.bento-badge.up { color: var(--success); background: var(--success-muted); } .bento-badge.down { color: var(--danger); background: var(--danger-muted); }
.usage-label { display: flex; justify-content: space-between; margin-bottom: .4rem; }
.usage-name { font-size: .78rem; font-weight: 500; color: var(--text-secondary); }
.usage-count { font-family: var(--font-mono); font-size: .75rem; font-weight: 700; color: var(--text-primary); }
@media (max-width: 768px) { .usage-label { font-size: .7rem; } }
.track { height: 8px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; margin-bottom: .75rem; }
.fill { height: 100%; border-radius: 999px; background: var(--accent-gradient); }
.fill.amber { background: linear-gradient(90deg, #f59e0b, #f97316); }
.fill.green { background: linear-gradient(90deg, #10b981, #22c55e); }
@media (max-width: 1024px) { .bento { grid-template-columns: repeat(6, 1fr); } .bento-usage { grid-column: span 6; } }
@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr 1fr !important; gap: .5rem; margin-bottom: .65rem; }
  .bento-stat, .bento-usage { grid-column: span 1 !important; }
  .bento-wide, .bento-full { grid-column: span 2 !important; }
  .bento-label { font-size: .6rem; margin-bottom: .2rem; } .bento-value { font-size: 1.2rem; } .bento-sub { font-size: .6rem; }
}

/* ---------- 9. LISTS / ROWS (crystal list card, the main data pattern) ---------- */
.items-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.item-row { position: relative; display: flex; align-items: center; gap: 1rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border-subtle); cursor: pointer; transition: all .15s; }
.item-row:last-child { border-bottom: none; }
.item-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent-gradient); opacity: 0; transition: opacity .2s; }
.item-row:hover { background: var(--bg-hover); }
.item-row:hover::before { opacity: 1; }
.item-thumb { width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--bg-active); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; overflow: hidden; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-info { flex: 1; min-width: 0; }
.item-title { font-size: .88rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .5rem; }
.item-title.item-title-fixed { width: 15rem; max-width: 100%; }
.item-meta { display: flex; align-items: center; gap: .5rem; font-size: .72rem; color: var(--text-muted); min-width: 0; }
.price-col { text-align: right; flex-shrink: 0; min-width: 110px; }
.price-merchant { font-size: .65rem; color: var(--text-muted); margin-top: .1rem; }
.price-main { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.price-delta { font-family: var(--font-mono); font-size: .68rem; font-weight: 700; }
.price-delta.drop { color: var(--success); } .price-delta.rise { color: var(--danger); }
.item-actions-inline { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
/* Square icon button (star / remove) */
.watch-eye { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; font-size: .78rem; transition: all .15s; }
.watch-eye:hover { color: var(--accent); border-color: var(--accent); }
.watch-eye.active { color: var(--accent); border-color: var(--accent); background: var(--accent-muted); }
.watch-eye.remove-btn:hover { color: #ef4444; border-color: var(--border); background: rgba(239,68,68,.1); }
.item-actions { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
@media (max-width: 768px) {
  .item-actions { margin-right: 0 !important; }
  .item-row { padding: .6rem .7rem; gap: .5rem; flex-wrap: wrap; }
  .item-thumb { width: 36px; height: 36px; border-radius: 6px; }
  .item-title { font-size: .78rem; } .item-meta { font-size: .6rem; gap: .3rem; flex-wrap: wrap; }
  .price-col { order: 3; width: 100%; min-width: auto; text-align: left; display: flex; align-items: center; gap: .5rem; padding-left: calc(36px + .5rem); padding-top: 0; }
  .price-main { font-size: .82rem; } .price-delta { font-size: .58rem; }
  .watch-eye { width: 26px; height: 26px; font-size: .8rem; }
}
/* Data table (admin + any tabular page) */
.a-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.a-table th { text-align: left; padding: .7rem 1.25rem; color: var(--text-tertiary); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.a-table td { padding: .75rem 1.25rem; color: #d1d5db; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.a-table tbody tr:last-child td { border-bottom: none; }
.a-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.a-table .a-strong { color: #fff; font-weight: 500; }
/* Denser people/records table (admin Users): name link + email under it, dates, icon actions */
.a-table.ur-table th, .a-table.ur-table td { padding: .6rem .75rem; }
.a-table.ur-table th:first-child, .a-table.ur-table td:first-child { padding-left: 1.25rem; }
.a-table.ur-table th:last-child, .a-table.ur-table td:last-child { padding-right: 1.25rem; }
.a-table.ur-table td { vertical-align: top; }
.ur-name { font-weight: 600; }
.ur-email { font-size: .72rem; color: #6b7280; margin-top: .15rem; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-note { font-size: .7rem; margin-top: .2rem; }
.ur-when { font-size: .74rem; color: #9ca3af; white-space: nowrap; line-height: 1.5; }
.ur-off { opacity: .55; }
.ur-cell-actions { width: 1%; }
.ur-actions { display: flex; gap: .3rem; flex-wrap: nowrap; justify-content: flex-end; }
.ur-ico { padding: .3rem .5rem; min-width: 1.9rem; line-height: 1; font-size: .85rem; text-align: center; }
.ur-ico[disabled] { opacity: .35; cursor: not-allowed; }
@media (max-width: 60rem) { .ur-scroll { overflow-x: auto; } .a-table.ur-table { min-width: 44rem; } }
a.a-stat { transition: border-color .15s, background .15s; text-decoration: none; display: block; }
a.a-stat:hover { background: rgba(255,255,255,.05); border-color: rgba(249,115,22,.35); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .table-scroll > table { min-width: 34rem; } }

/* ---------- 10. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .5rem 1rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary);
  font-family: var(--font-primary); font-size: .85rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: all .2s;
}
.btn:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.btn-accent, .btn-primary { background: var(--accent-gradient); color: #fff; border: none; padding: .65rem 1.4rem; box-shadow: 0 4px 16px var(--accent-glow); }
.btn-accent:hover, .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); background: var(--accent-gradient); }
.btn-solid { background: var(--accent-solid); color: #fff; border: none; transition: background .15s; }   /* = settings .fset-btn */
.btn-solid:hover { background: #f97316; }
.btn-small { padding: .35rem .8rem; font-size: .78rem; }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { background: #e11d48; }
.btn-ghost { background: transparent; border: none; color: var(--text-tertiary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }
.btn-block { width: 100%; }
@media (max-width: 768px) { .btn { padding: .4rem .65rem; font-size: .72rem; min-height: 36px; } .btn-accent { padding: .4rem .8rem; } }  /* .btn-primary keeps the .btn padding on phones, as in Tracker */

/* ---------- 11. FORMS (Panel .input/.label = Tracker .form-group / .fset-input / auth .inp) ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-group label, .label { display: block; font-size: .875rem; font-weight: 500; color: #d1d5db; margin-bottom: .375rem; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"],
.form-group input[type="number"], .form-group input[type="url"], .form-group input[type="search"],
.form-group select, .form-group textarea, .input {
  width: 100%; padding: .625rem 1rem; font-family: inherit; font-size: 1rem; line-height: 1.5rem; color: var(--text-primary);
  background: rgba(255,255,255,.05); border: 1px solid var(--border-input); border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input::placeholder, .form-group textarea::placeholder, .input::placeholder { color: var(--text-tertiary); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.form-group textarea, textarea.input { min-height: 120px; resize: none; }
.form-hint { font-size: .75rem; color: var(--text-tertiary); margin-top: .25rem; }
.form-container { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 600px; }
/* Toggle switch (item modal "Stock Alert") */
.dm-toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.dm-toggle input { opacity: 0; width: 0; height: 0; }
.dm-toggle-track { position: absolute; inset: 0; cursor: pointer; background: var(--bg-active); border-radius: 22px; transition: .3s; }
.dm-toggle-track::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.dm-toggle input:checked + .dm-toggle-track { background: var(--accent); }
.dm-toggle input:checked + .dm-toggle-track::before { transform: translateX(18px); }
input[type=checkbox] { accent-color: var(--accent); }

/* ---------- 12. BADGES / PILLS / CHIPS ---------- */
.badge { display: inline-flex; padding: .125rem .625rem; border-radius: 9999px; font-size: .75rem; font-weight: 500; text-transform: none; }
.badge-success { background: var(--success-muted); color: var(--success); }
.badge-warning { background: var(--warning-muted); color: var(--warning); }
.badge-danger { background: var(--danger-muted); color: var(--danger); }
.badge-info { background: var(--accent-muted); color: var(--accent); }
/* Tinted status pill with a hairline (price verdict) */
.verdict { display: inline-block; margin-top: .2rem; padding: .05rem .45rem; border-radius: 9999px; font-size: .62rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.verdict-great { color: #22c55e; background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); }
.verdict-good { color: #4ade80; background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.2); }
.verdict-typical { color: var(--text-tertiary); background: rgba(255,255,255,.04); border-color: var(--border); }
.verdict-high { color: #f59e0b; background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.25); }
/* Verdict explanation line (item panel) */
.verdict-line { display: flex; flex-direction: column; gap: .15rem; margin: .6rem 0 .2rem; padding: .55rem .7rem; border-radius: var(--radius-sm); font-size: .8rem; background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.verdict-line strong { font-weight: 700; }
.verdict-line span { color: var(--text-secondary); }
.verdict-line.verdict-great strong { color: #22c55e; } .verdict-line.verdict-good strong { color: #4ade80; }
.verdict-line.verdict-high strong { color: #f59e0b; }
.verdict-line.verdict-unknown strong, .verdict-line.verdict-typical strong { color: var(--text-primary); }
/* Admin-style solid-tint pills */
.a-badge { display: inline-block; font-size: .7rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.a-badge-ok { background: rgba(34,197,94,.15); color: #86efac; }
.a-badge-warn { background: rgba(234,179,8,.15); color: #fde047; }
.a-badge-bad { background: rgba(239,68,68,.15); color: #fca5a5; }
.a-badge-info { background: rgba(59,130,246,.15); color: #93c5fd; }
.a-badge-flame { background: rgba(249,115,22,.15); color: #fdba74; }
.a-badge-muted { background: rgba(107,114,128,.2); color: #9ca3af; }
/* Small square tags */
.chip { display: inline-block; vertical-align: middle; max-width: 120px; padding: .1rem .4rem; border-radius: 4px; background: var(--bg-active); font-family: var(--font-mono); font-size: .62rem; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-lowest { display: inline-flex; margin-top: .15rem; padding: .12rem .45rem; border-radius: 4px; background: var(--warning-muted); color: var(--warning); font-size: .58rem; font-weight: 800; text-transform: uppercase; }
@media (max-width: 768px) { .chip { max-width: 100px; font-size: .52rem; padding: .05rem .3rem; } .badge-lowest { font-size: .52rem; padding: .08rem .25rem; } }

/* ---------- 13. TABS ---------- */
/* Underline tabs (dashboard views; scrolls sideways on a phone) */
.dash-tabs { display: flex; gap: .25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: .25rem 0 1rem; padding-bottom: 2px; border-bottom: 1px solid var(--border); }
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tab { flex: 0 0 auto; padding: .5rem .85rem; font-size: .85rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dash-tab:hover { color: var(--text-primary); }
.dash-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
/* Segmented filter pills (alerts page; DESIGN-SYSTEM §10 "pill toggles") */
.seg-tabs { display: flex; padding: 3px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: var(--radius-md); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.seg-tab { padding: .5rem 1rem; font-size: .875rem; font-weight: 600; color: #9ca3af; border-radius: var(--radius-sm); border: none; background: none; cursor: pointer; font-family: inherit; text-decoration: none; transition: all .15s; }
.seg-tab.active { background: rgba(249,115,22,.15); color: #fb923c; }
.seg-tab:hover:not(.active) { color: #fff; }
@media (max-width: 768px) { .seg-tabs { gap: .2rem; } }
/* Boxed segmented tabs inside a modal/card (item panel Overview/History/Merchants/Related) */
.dm-tabs { display: flex; gap: .25rem; background: var(--bg-elevated); padding: 4px; border-radius: var(--radius-md); margin-bottom: 1rem; }
.dm-tab { flex: 1; padding: .5rem; font-size: .75rem; font-weight: 600; color: var(--text-tertiary); background: transparent; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: all .15s; font-family: inherit; white-space: nowrap; }
.dm-tab:hover { color: var(--text-secondary); }
.dm-tab.active { background: var(--accent-muted); color: var(--accent); }

/* ---------- 14. MODALS ----------
   Two Tracker recipes, both inside .modal-backdrop (dim + 4px blur; add .active to open):
   A) .modal: plain dialog with header/body/footer (search "add", confirmations). 480px.
   B) .detail-modal + dm-*: the rich item panel (hero, highlighted price card, boxed tabs, action row,
      settings rows). 520px, 20px radius, deep shadow. Full-screen on phones <=480px. */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-backdrop.active { display: flex; }
.modal { width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-xl); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 1.1rem; transition: all .15s; }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .75rem; }
@media (max-width: 768px) { .modal-backdrop { padding: .5rem; } .modal { max-width: 100%; border-radius: var(--radius-lg); } .modal-body { padding: 1rem; } .modal-header { padding: .75rem 1rem; } }
/* B) item detail panel */
.detail-modal { width: 100%; max-width: 520px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); }
.dm-header { display: flex; justify-content: flex-end; padding: .75rem .75rem 0; }
.dm-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-tertiary); cursor: pointer; transition: all .15s; }
.dm-close:hover { background: var(--danger-muted); border-color: var(--danger); color: var(--danger); }
.dm-body { padding: 0 1.25rem 1.25rem; overflow-y: auto; flex: 1; scrollbar-width: none; }
.dm-body::-webkit-scrollbar { display: none; }
.dm-hero { display: flex; gap: 1rem; margin-bottom: 1rem; align-items: flex-start; }
.dm-image { width: 80px; height: 80px; flex-shrink: 0; background: var(--bg-elevated); border-radius: var(--radius-md); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.dm-image img { width: 100%; height: 100%; object-fit: contain; }
.dm-hero-info { flex: 1; min-width: 0; }
.dm-title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; color: var(--text-primary); margin-bottom: .35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dm-domain { display: inline-block; font-size: .72rem; font-weight: 500; color: var(--text-muted); background: var(--bg-active); padding: .2rem .5rem; border-radius: 4px; }
.dm-price-card { background: linear-gradient(135deg, var(--accent-muted) 0%, var(--bg-elevated) 100%); border: 1px solid var(--accent); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 1rem; }
.dm-price-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.dm-price-left { display: flex; align-items: center; gap: .6rem; }
.dm-price-amount { font-family: var(--font-mono); font-size: 1.75rem; font-weight: 700; color: var(--text-primary); }
.dm-scrape-info { font-size: .68rem; color: var(--text-muted); }
.dm-no-price { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 1rem; text-align: center; color: var(--text-secondary); font-size: .85rem; }
.dm-tab-content { min-height: 150px; }
.dm-tab-pane { display: none; } .dm-tab-pane.active { display: block; }
.dm-actions-mini { display: flex; gap: .5rem; margin-bottom: 1rem; }
.dm-action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .6rem .75rem; font-size: .78rem; font-weight: 600; font-family: inherit; border-radius: var(--radius-sm); cursor: pointer; transition: all .15s; text-decoration: none; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary); }
.dm-action-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.dm-action-btn.primary { background: var(--accent-gradient); border: none; color: #fff; }
.dm-action-btn.primary:hover { filter: brightness(1.1); }
.dm-action-btn.visit { background: var(--bg-surface); }
.dm-settings { background: var(--bg-elevated); border-radius: var(--radius-md); overflow: hidden; }
.dm-setting-row { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border-subtle); }
.dm-setting-row:last-child { border-bottom: none; }
.dm-setting-label { display: flex; align-items: center; gap: .6rem; }
.dm-setting-icon { font-size: 1.1rem; }
.dm-setting-label strong { display: block; font-size: .82rem; font-weight: 600; }
.dm-setting-label small { font-size: .68rem; color: var(--text-muted); }
.dm-setting-control { display: flex; align-items: center; gap: .5rem; }
.dm-setting-control input[type="number"] { width: 90px; padding: .4rem .6rem; font-size: .82rem; font-family: var(--font-mono); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); text-align: right; }
.dm-setting-control button { padding: .4rem .75rem; font-size: .75rem; font-weight: 600; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; }
.dm-toggle-status { font-size: .75rem; font-weight: 600; color: var(--text-muted); min-width: 24px; }
.dm-loading { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 2rem; color: var(--text-muted); font-size: .85rem; }
.spinner-sm { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: ts-spin .8s linear infinite; }
@keyframes ts-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .detail-modal { max-width: 100%; max-height: 100vh; border-radius: 0; }
  .dm-hero { flex-direction: column; align-items: center; text-align: center; }
  .dm-image { width: 100px; height: 100px; }
  .dm-tabs { flex-wrap: wrap; } .dm-tab { font-size: .7rem; padding: .45rem .35rem; }
}

/* ---------- 15. TOASTS (Tracker: flash messages at the top of .content; click to dismiss) ---------- */
.flash-messages { margin-bottom: 1rem; }
.flash { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.25rem; margin-bottom: .75rem; border-radius: var(--radius-md); font-size: .85rem; font-weight: 500; }
.flash-success { background: var(--success-muted); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.flash-error { background: var(--danger-muted); color: var(--danger); border: 1px solid rgba(244,63,94,.2); }
.flash-info, .flash-warning { background: var(--warning-muted); color: var(--warning); border: 1px solid rgba(245,158,11,.2); }
.flash-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: .7; }
.flash-close:hover { opacity: 1; }

/* ---------- 16. EMPTY STATES ---------- */
.empty-state { text-align: center; padding: 4rem 2rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; line-height: 4.5rem; margin-bottom: 1rem; opacity: .5; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .5rem; }
.empty-state p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
@media (max-width: 768px) { .empty-state { padding: 2rem 1rem; } }

/* ---------- 17. SETTINGS LAYOUT (sidebar groups + one card per section) ---------- */
.fset { max-width: 56rem; margin: 0 auto; }
.fset-h1 { font-size: 1.5rem; line-height: 2.25rem; font-weight: 700; color: #fff; margin-bottom: 1.5rem; }
.fset-cols { display: flex; gap: 1.5rem; align-items: flex-start; }
.fset-nav { width: 13rem; flex-shrink: 0; display: flex; flex-direction: column; gap: .15rem; }
.fset-grp-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .5rem .75rem; border-radius: .5rem; font-size: 1rem; font-weight: 500; background: none; border: none; color: #9ca3af; cursor: pointer; text-align: left; font-family: inherit; transition: all .15s; }
.fset-grp-btn:hover { color: #fff; background: rgba(255,255,255,.04); }
.fset-grp-btn.active-grp { color: #fff; }
.fset-grp-label { display: flex; align-items: center; gap: .5rem; }
.fset-grp-label svg { width: 16px; height: 16px; flex-shrink: 0; }
.fset-grp-caret { width: 14px; height: 14px; flex-shrink: 0; transition: transform .15s; }
.fset-group.collapsed .fset-grp-caret { transform: rotate(-90deg); }
.fset-group.collapsed .fset-grp-items { display: none; }
.fset-grp-items { display: flex; flex-direction: column; gap: .1rem; margin: .1rem 0 .35rem; }
.fset-sub { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .4rem .75rem .4rem 2.25rem; border-radius: .5rem; font-size: .875rem; background: none; border: none; color: #6b7280; cursor: pointer; text-align: left; font-family: inherit; text-decoration: none; transition: all .15s; }
.fset-sub:hover { color: #fff; background: rgba(255,255,255,.04); }
.fset-sub.active { background: rgba(255,255,255,.05); color: #f97316; }
.fset-sub svg { width: 15px; height: 15px; flex-shrink: 0; }
.fset-main { flex: 1; min-width: 0; }
.fset-sec { display: none; } .fset-sec.active { display: block; }
.fset-card { background: rgba(255,255,255,.03); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,.06); border-radius: 1rem; padding: 1.5rem; }
.fset-card + .fset-card { margin-top: 1rem; }
.fset-card h2 { font-size: 1.125rem; font-weight: 600; color: #fff; margin-bottom: 1.25rem; }
.fset-field { margin-bottom: 1rem; }
.fset-field label { display: block; font-size: .875rem; color: #9ca3af; margin-bottom: .25rem; }
.fset-input { width: 100%; padding: .625rem 1rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: .5rem; color: #f3f4f6; font-size: 1rem; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.fset-input:focus { border-color: #f97316; box-shadow: 0 0 0 1px #f97316; }
.fset-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; background: #ea580c; color: #fff; border: none; border-radius: .5rem; font-size: .875rem; font-weight: 500; font-family: inherit; cursor: pointer; transition: background .15s; }
.fset-btn:hover { background: #f97316; }
.fset-btn.sec { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.fset-btn.sec:hover { background: rgba(255,255,255,.1); }
.fset-btn.danger { background: #dc2626; } .fset-btn.danger:hover { background: #ef4444; }
.fset-btn:disabled { opacity: .45; cursor: not-allowed; }
.fset-msg { font-size: .85rem; margin-top: .75rem; display: none; }
.fset-msg.ok { color: #4ade80; display: block; } .fset-msg.err { color: #f87171; display: block; }
.fset-pill { display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 600; margin-left: .5rem; }
.fset-pill.on { background: rgba(34,197,94,.15); color: #4ade80; } .fset-pill.off { background: rgba(107,114,128,.2); color: #9ca3af; }
.fset-card.danger { border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.04); }
.fset-card.danger h2 { color: #f87171; }
.fset-warn { font-size: .9rem; color: #9ca3af; line-height: 1.6; margin-bottom: 1rem; }
.fset-warn strong { color: #fca5a5; }
.fset-backup { font-family: var(--font-mono); font-size: .85rem; line-height: 1.7; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 8px; padding: .75rem; margin-top: .75rem; }
@media (max-width: 768px) {
  /* Stacked on phones. `align-items: stretch` is what keeps the main column at screen width: with the
     desktop `flex-start` it grows to its widest content (tables) and spills past the screen. */
  .fset-cols { flex-direction: column; align-items: stretch; }
  .fset-nav { width: auto; }
  .fset-main, .fset-nav { min-width: 0; max-width: 100%; }
}

/* ---------- 18. BILLING (current plan card + neutral plan cards; DESIGN-SYSTEM §8) ---------- */
.billing-wrap { max-width: 64rem; margin: 0 auto; }
.billing-header { margin-bottom: 2rem; }
.billing-header h1 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: .5rem; }
.billing-header p { color: var(--text-secondary); font-size: 1rem; line-height: 1.5; }
.current-card { position: relative; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.cc-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.cc-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-muted); border: 1px solid var(--accent-glow); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fb923c; }
.cc-name { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.cc-sub { color: var(--text-secondary); font-size: .95rem; margin-top: .15rem; }
.cc-sub .muted { color: var(--text-tertiary); }
.cc-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .cc-tiles { grid-template-columns: repeat(4, 1fr); } }
.cc-tile { background: rgba(0,0,0,.2); border-radius: 8px; padding: .75rem; }
.cc-tile .lbl { display: flex; align-items: center; gap: .35rem; font-size: .72rem; color: var(--text-tertiary); margin-bottom: .25rem; }
.cc-tile .val { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
.cc-usage h3 { font-size: .72rem; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; }
.usage-row { margin-bottom: .75rem; } .usage-row:last-child { margin-bottom: 0; }
.usage-row .top { display: flex; justify-content: space-between; font-size: .72rem; margin-bottom: .25rem; }
.usage-row .top .k { color: var(--text-secondary); } .usage-row .top .v { color: var(--text-tertiary); }
.usage-track { height: 8px; background: rgba(255,255,255,.05); border-radius: 9999px; overflow: hidden; }
.usage-fill { height: 100%; border-radius: 9999px; background: var(--success); transition: width .3s ease; }
.mgmt-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.mgmt-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .625rem 1.25rem; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 8px; font-size: .875rem; font-weight: 500; color: var(--text-primary); cursor: pointer; text-decoration: none; transition: all .15s ease; }
.mgmt-btn:hover { background: rgba(255,255,255,.10); border-color: var(--border-hover); }
.mgmt-btn.subtle { color: var(--text-secondary); }
.mgmt-btn.pause:hover { background: rgba(120,53,15,.30); border-color: rgba(133,77,14,.50); color: #facc15; }
.mgmt-btn.cancel:hover { background: rgba(127,29,29,.30); border-color: rgba(153,27,27,.50); color: #f87171; }
.billing-wrap .section-title { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); margin-bottom: 1rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; align-items: start; }
.plan-card { position: relative; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; transition: border-color .15s ease; }
.plan-card:hover { border-color: var(--border-hover); }
.plan-badge { position: absolute; top: -.625rem; left: 50%; transform: translateX(-50%); padding: .1rem .75rem; background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-hover); border-radius: 9999px; font-size: .625rem; font-weight: 600; white-space: nowrap; }
.plan-name-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.plan-name-row svg { color: var(--text-secondary); flex-shrink: 0; }
.plan-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.plan-price { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: .75rem; }
.plan-price .per { font-size: .875rem; font-weight: 400; color: var(--text-tertiary); }
.plan-spec { font-size: .75rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.5; }
.plan-cta { display: block; width: 100%; padding: .5rem; background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; font-weight: 500; font-size: .875rem; cursor: pointer; text-align: center; text-decoration: none; transition: background .15s ease; }
.plan-cta:hover { background: rgba(255,255,255,.12); }
.plan-cta.current { background: transparent; color: var(--text-tertiary); cursor: default; }
.plan-cta.disabled { opacity: .5; cursor: not-allowed; }
.checkout-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.checkout-modal.active { display: flex; }
.checkout-container { width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.checkout-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.checkout-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.checkout-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 1.2rem; }
.checkout-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.checkout-body { padding: 1.5rem; min-height: 400px; }
.checkout-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; color: var(--text-secondary); }
.checkout-loading .spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: ts-spin 1s linear infinite; margin-bottom: 1rem; }
.billing-note { text-align: center; font-size: .8rem; color: var(--text-tertiary); margin-top: 2rem; }

/* ---------- 19. ADMIN SHELL (sidebar groups + dense a-* components; scoped like Tracker) ---------- */
.ash-cols { display: flex; gap: 1.5rem; align-items: flex-start; }
.ash-nav { width: 14rem; flex-shrink: 0; display: flex; flex-direction: column; gap: .15rem; }
.ash-grp-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .5rem .75rem; border-radius: .5rem; font-size: 1rem; font-weight: 500; background: none; border: none; color: #9ca3af; cursor: pointer; text-align: left; font-family: inherit; transition: all .15s; }
.ash-grp-btn:hover { color: #fff; background: rgba(255,255,255,.04); }
.ash-grp-btn.active-grp { color: #fff; }
.ash-grp-label { display: flex; align-items: center; gap: .5rem; }
.ash-grp-label svg { width: 16px; height: 16px; flex-shrink: 0; }
.ash-caret { width: 14px; height: 14px; flex-shrink: 0; transition: transform .15s; }
.ash-group.collapsed .ash-caret { transform: rotate(-90deg); }
.ash-group.collapsed .ash-items { display: none; }
.ash-items { display: flex; flex-direction: column; gap: .1rem; margin: .1rem 0 .35rem; }
.ash-sub { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .4rem .75rem .4rem 2.25rem; border-radius: .5rem; font-size: .875rem; color: #6b7280; text-decoration: none; transition: all .15s; }
.ash-sub:hover { color: #fff; background: rgba(255,255,255,.04); }
.ash-sub.active { background: rgba(255,255,255,.05); color: #f97316; }
.ash-main { flex: 1; min-width: 0; }
@media (max-width: 768px) {
  /* Stacked on phones; see the .fset-cols note. Wide tables scroll sideways inside their card instead
     of widening the page (overflow-x:auto still clips the card's rounded corners). */
  .ash-cols { flex-direction: column; align-items: stretch; }
  .ash-nav { width: auto; }
  .ash-main, .ash-nav { min-width: 0; max-width: 100%; }
  .ash-main > *, .ash-main .a-card, .ash-main .card, .ash-main .items-list, .ash-main .table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.a-modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.a-modal-backdrop.open { display: flex; }
.a-modal { width: 100%; max-width: 68rem; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); }
.a-modal-bar { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; padding: .75rem .75rem 0; flex-shrink: 0; }
.a-modal-full { font-size: .78rem; color: var(--text-tertiary); text-decoration: none; transition: color .15s; }
.a-modal-full:hover { color: var(--text-primary); }
.a-modal-close { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-tertiary); cursor: pointer; transition: all .15s; }
.a-modal-close:hover { background: var(--danger-muted); border-color: var(--danger); color: var(--danger); }
.a-modal-body { padding: 0 1.25rem 1.25rem; overflow-y: auto; flex: 1; scrollbar-width: none; }
.a-modal-body > .content { padding: 0; max-width: none; }
.a-modal-loading { padding: 3rem; text-align: center; color: var(--text-tertiary); font-size: .9rem; }
@media (max-width: 768px) { .a-modal-backdrop { padding: .5rem; } .a-modal { max-width: 100%; max-height: 95vh; border-radius: var(--radius-lg); } .a-modal-body { padding: 0 1rem 1rem; } }
.ash-main .a-h1 { font-family: var(--font-primary); font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: #fff; margin: 0; }
.ash-main .a-sub { font-size: .85rem; color: #9ca3af; margin: .25rem 0 0; }
.ash-main .a-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.ash-main .a-card { background: rgba(255,255,255,.03); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,.06); border-radius: 1rem; overflow: hidden; }
.ash-main .a-card + .a-card { margin-top: 1rem; }
.ash-main .a-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.ash-main .a-card-head h2 { font-size: 1.05rem; font-weight: 600; color: #fff; margin: 0; }
.ash-main .a-card-head p { font-size: .8rem; color: #9ca3af; margin: .2rem 0 0; }
.ash-main .a-card-body { padding: 1.25rem; }
.ash-main .a-grid-stat { display: grid; gap: 1rem; margin-bottom: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.ash-main .a-stat { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 1rem; padding: 1.25rem; }
.ash-main .a-stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; font-weight: 600; }
.ash-main .a-stat-value { font-size: 1.6rem; font-weight: 700; color: #fff; margin-top: .3rem; line-height: 1.1; }
.ash-main .a-stat-sub { font-size: .75rem; color: #9ca3af; margin-top: .25rem; }
.ash-main .a-v-flame { color: #f97316; } .ash-main .a-v-green { color: #4ade80; } .ash-main .a-v-amber { color: #fbbf24; } .ash-main .a-v-red { color: #f87171; }
.ash-main .a-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: .5rem; font-size: .85rem; font-weight: 500; font-family: inherit; color: #d1d5db; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); cursor: pointer; text-decoration: none; transition: all .15s; }
.ash-main .a-btn:hover { color: #fff; background: rgba(255,255,255,.09); }
.ash-main .a-btn-accent { background: linear-gradient(135deg,#f97316,#ef4444); border-color: transparent; color: #fff; }
.ash-main .a-btn-accent:hover { filter: brightness(1.08); color: #fff; }
.ash-main .a-btn-danger { color: #fca5a5; border-color: rgba(239,68,68,.3); }
.ash-main .a-btn-danger:hover { background: rgba(239,68,68,.15); color: #fecaca; }
.ash-main .a-btn-ghost { background: none; border-color: rgba(255,255,255,.08); }
.ash-main .a-btn-sm { padding: .3rem .6rem; font-size: .78rem; }
.ash-main .a-row { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.ash-main .a-field { display: flex; flex-direction: column; gap: .3rem; }
.ash-main .a-field.grow { flex: 1; min-width: 14rem; }
.ash-main .a-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; font-weight: 600; }
.ash-main .a-input, .ash-main .a-select, .ash-main .a-textarea { padding: .5rem .7rem; border-radius: .5rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #f3f4f6; font-size: .875rem; font-family: inherit; outline: none; transition: border-color .15s; }
.ash-main .a-input:focus, .ash-main .a-select:focus, .ash-main .a-textarea:focus { border-color: rgba(249,115,22,.5); }
.ash-main .a-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ash-main .a-tab { padding: .4rem .85rem; border-radius: .5rem; font-size: .85rem; color: #9ca3af; text-decoration: none; cursor: pointer; border: 1px solid rgba(255,255,255,.06); background: none; font-family: inherit; }
.ash-main .a-tab:hover { color: #fff; background: rgba(255,255,255,.04); }
.ash-main .a-tab.active { background: rgba(249,115,22,.12); color: #f97316; border-color: rgba(249,115,22,.3); }
.ash-main .a-empty { padding: 2.5rem 1.25rem; text-align: center; color: #6b7280; font-size: .9rem; }
.ash-main .a-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; font-size: .85rem; color: #6b7280; }
.ash-main .a-pager a, .ash-main .a-link { color: #f97316; text-decoration: none; }
.ash-main .a-muted { color: #9ca3af; } .ash-main .a-dim { color: #6b7280; }

/* ---------- 20. AUTH PAGES (login / 2FA / forgot; standalone page, no top nav) ---------- */
body.auth-page { display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-glow { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 600px; height: 600px; background: rgba(249,115,22,.05); border-radius: 9999px; filter: blur(64px); pointer-events: none; }
.auth-wrap { width: 100%; max-width: 28rem; position: relative; z-index: 10; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-bottom: 2rem; text-decoration: none; }
.auth-logo svg { width: 2.5rem; height: 2.5rem; }
.auth-logo span { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 2rem; color: #fff; }
.auth-logo b { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 700; }
.auth-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px); border-radius: 1rem; padding: 2rem; }
.auth-card h1 { font-size: 1.5rem; font-weight: 700; color: #fff; text-align: center; margin-bottom: .5rem; }
.auth-card .auth-sub { color: #9ca3af; text-align: center; margin-bottom: 2rem; font-size: .95rem; }
.auth-alert { display: flex; align-items: center; gap: .5rem; padding: 1rem; margin-bottom: 1rem; border-radius: .5rem; font-size: .875rem; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2); color: #f87171; }
.auth-alert.ok { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.2); color: #4ade80; }
.auth-alert.info { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.2); color: #60a5fa; }
.auth-alert.warn { background: rgba(234,179,8,.1); border-color: rgba(234,179,8,.2); color: #facc15; }
.auth-form > * + * { margin-top: 1.25rem; }
.auth-lbl { display: block; font-size: .875rem; font-weight: 500; color: #d1d5db; margin-bottom: .375rem; }
.auth-iw { position: relative; }
.auth-iw > svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 1.25rem; height: 1.25rem; color: #6b7280; pointer-events: none; }
.auth-inp { width: 100%; padding: .625rem 1rem .625rem 2.75rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: .5rem; color: #f3f4f6; font-size: 1rem; line-height: 1.5rem; font-family: var(--font-primary); outline: none; transition: border-color .15s, box-shadow .15s; }
.auth-inp::placeholder { color: #6b7280; }
.auth-inp:focus { border-color: #f97316; box-shadow: 0 0 0 1px #f97316; }
.auth-inp:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important; -webkit-text-fill-color: #f3f4f6 !important; }
.auth-opts { display: flex; align-items: center; justify-content: space-between; }
.auth-opts label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .875rem; color: #9ca3af; }
.auth-opts input[type=checkbox] { width: 1rem; height: 1rem; accent-color: #f97316; }
.auth-opts a { font-size: .875rem; color: #6b7280; text-decoration: none; transition: color .15s; }
.auth-opts a:hover { color: #9ca3af; }
.auth-btn { width: 100%; padding: .75rem 1rem; background: var(--accent-gradient); color: #fff; border: none; border-radius: .5rem; font-size: 1rem; font-weight: 500; font-family: var(--font-primary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: all .2s; line-height: normal; }
.auth-btn:hover { box-shadow: 0 0 20px rgba(249,115,22,.3); transform: scale(1.02); }
.auth-code { font-family: var(--font-mono); letter-spacing: .5em; text-align: center; padding-left: 1rem; }
.lk-auth-switch { text-align: center; font-size: .875rem; color: #9ca3af; margin-top: 1.25rem; }
.lk-auth-switch a { color: var(--accent); font-weight: 500; text-decoration: none; }
.lk-auth-switch a:hover { text-decoration: underline; }

/* ---------- 21. FLEET FOOTER (logged-in pages: "More from Flaming Services" + Flaming+ band) ---------- */
.ffleet { max-width: 1280px; margin: 4rem auto 1.5rem; padding: 0 1.5rem; position: relative; z-index: 1; }
.ffleet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ffleet-head h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }
.ffleet-head span { font-size: .8rem; color: var(--text-tertiary); }
.ffleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.ffleet-card { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-radius: var(--radius-md); background: var(--bg-surface); border: 1px solid var(--border); text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.ffleet-card:hover { border-color: var(--border-hover); background: rgba(255,255,255,.06); transform: translateY(-1px); }
.ffleet-ico { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.ffleet-txt { display: flex; flex-direction: column; min-width: 0; }
.ffleet-txt b { font-family: var(--font-display); font-size: .9rem; font-weight: 600; color: var(--text-primary); }
.ffleet-txt small { font-size: .75rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ffleet-plus { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .75rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg); background: var(--accent-gradient-soft); border: 1px solid var(--border); }
.ffleet-plus .m { display: flex; flex-direction: column; }
.ffleet-plus .m b { font-family: var(--font-display); font-weight: 700; color: #fff; }
.ffleet-plus .m small { font-size: .8rem; color: var(--text-secondary); }
.ffleet-cta { display: inline-block; padding: .55rem 1.1rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .85rem; text-decoration: none; color: #fff; background: var(--accent-gradient); white-space: nowrap; }
.ffleet-cta:hover { filter: brightness(1.08); }

/* Utilities (Tracker's base.css set; note Tracker's spacing steps are .5/1/1.5rem, not Tailwind's) */
.text-center { text-align: center; } .text-right { text-align: right; }
.text-muted { color: var(--text-muted); } .text-success { color: var(--success); } .text-warning { color: var(--warning); } .text-danger { color: var(--danger); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.hidden { display: none !important; }

/* PWA install banner: hidden until the browser fires beforeinstallprompt (script adds .show). */
.pwa-install-banner { display: none; }
.pwa-install-banner.show { display: flex; }

/* ---------- 22. ERROR PAGES (404 / 403 / 500) ----------
   Centred 448px block: gradient mono code, one grey line, one primary action. Live on Tracker since
   2026-09-28 (flaming.css §15; markup in README §B.8). */
.error-page { max-width: 28rem; margin: 4rem auto; text-align: center; }
.error-code { font-family: var(--font-mono); font-size: 3rem; line-height: 1; font-weight: 700; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: .75rem; }
.error-message { color: var(--text-secondary); margin-bottom: 1.5rem; }
