/* ============================================================
   PartsDesk — Garage Industrial design system
   Aesthetic: dark workshop, sodium-amber accents, condensed
   signage type, monospace part numbers. Built for a shop tablet.
   ============================================================ */

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

:root {
  /* Steel & shadow */
  --bg:        #0d0f12;
  --bg-2:      #121519;
  --panel:     #181c21;
  --panel-2:   #1f242b;
  --line:      #2a3038;
  --line-2:    #363d47;

  /* Ink */
  --ink:       #ecebe6;
  --ink-mut:   #9aa3ad;
  --ink-dim:   #6b7480;

  /* Sodium amber — the garage light */
  --amber:     #ff8a1e;
  --amber-2:   #ffb04a;
  --amber-dim: rgba(255,138,30,.14);

  /* Status */
  --good:      #4ec07a;
  --good-dim:  rgba(78,192,122,.14);
  --warn:      #f5c14b;
  --warn-dim:  rgba(245,193,75,.14);
  --bad:       #f0593f;
  --bad-dim:   rgba(240,89,63,.14);
  --info:      #5fb3d4;

  --rad:   10px;
  --rad-s: 7px;
  --shadow: 0 18px 40px -18px rgba(0,0,0,.8);
  --sidebar-w: 232px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Archivo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* atmosphere: faint vignette + grain */
  background-image:
    radial-gradient(1200px 600px at 78% -10%, rgba(255,138,30,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(95,179,212,.05), transparent 55%);
}

/* film-grain overlay */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: 'JetBrains Mono', monospace; }
.cond { font-family: 'Oswald', sans-serif; }

/* hazard stripe motif */
.hazard {
  background-image: repeating-linear-gradient(45deg,
    var(--amber) 0 10px, #141414 10px 20px);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, var(--bg-2), #0c0e11);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}

.brand {
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.brand .mark {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--amber); color: #1a1206;
  box-shadow: 0 0 0 1px rgba(255,138,30,.4), 0 8px 20px -6px rgba(255,138,30,.5);
  position: relative; overflow: hidden;
}
.brand .mark svg { width: 22px; height: 22px; }
.brand .name { font-family: 'Oswald'; font-weight: 700; font-size: 20px; letter-spacing: .04em; line-height: 1; }
.brand .name b { color: var(--amber); }
.brand .sub { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-dim); margin-top: 3px; }

.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav .group { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-dim); padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--rad-s);
  color: var(--ink-mut); font-weight: 500; font-size: 13.5px;
  position: relative; transition: .15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a.active { background: var(--amber-dim); color: var(--amber-2); }
.nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: var(--amber); border-radius: 0 3px 3px 0;
}
.nav a.disabled { opacity: .4; cursor: not-allowed; }
.nav a .tag { margin-left: auto; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); border: 1px solid var(--line); padding: 2px 5px; border-radius: 4px; }
.nav a .count { margin-left: auto; font-family: 'JetBrains Mono'; font-size: 11px; background: var(--panel-2); color: var(--ink-mut); padding: 1px 7px; border-radius: 20px; }

.sidebar .foot { padding: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.sidebar .foot .av { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-family:'Oswald'; font-weight:600; color: var(--amber-2); border: 1px solid var(--line-2); }
.sidebar .foot .who { font-size: 12.5px; font-weight: 600; }
.sidebar .foot .role { font-size: 10.5px; color: var(--ink-dim); }

/* main */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 26px;
  background: rgba(13,15,18,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-family: 'Oswald'; font-weight: 600; font-size: 22px; letter-spacing: .02em; }
.topbar h1 small { display:block; font-family:'Archivo'; font-weight:400; font-size: 12px; color: var(--ink-dim); letter-spacing: 0; }

.search {
  margin-left: auto; flex: 1; max-width: 460px; position: relative;
}
.search input {
  width: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--rad-s); padding: 11px 14px 11px 40px;
  color: var(--ink); font-size: 13.5px; font-family: 'JetBrains Mono';
  transition: .15s;
}
.search input::placeholder { color: var(--ink-dim); font-family:'Archivo'; }
.search input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); background: var(--bg-2); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-dim); }

.content { padding: 26px; max-width: 1320px; width: 100%; }

/* ============================================================
   BUTTONS / CHIPS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 16px; border-radius: var(--rad-s); border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13px;
  transition: .15s; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--ink-dim); background: var(--panel-2); }
.btn.primary {
  background: var(--amber); border-color: var(--amber); color: #1a1206;
  box-shadow: 0 8px 22px -8px rgba(255,138,30,.6);
}
.btn.primary:hover { background: var(--amber-2); border-color: var(--amber-2); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 11px; font-size: 12px; }
.btn.block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--line-2); color: var(--ink-mut);
  font-family: 'JetBrains Mono'; letter-spacing: .02em;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.good { color: var(--good); border-color: rgba(78,192,122,.4); background: var(--good-dim); }
.chip.warn { color: var(--warn); border-color: rgba(245,193,75,.4); background: var(--warn-dim); }
.chip.bad  { color: var(--bad);  border-color: rgba(240,89,63,.4);  background: var(--bad-dim); }
.chip.info { color: var(--info); border-color: rgba(95,179,212,.4); }
.chip.amber{ color: var(--amber-2); border-color: rgba(255,138,30,.4); background: var(--amber-dim); }

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--rad);
  box-shadow: var(--shadow);
}
.panel .head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.panel .head h2 { font-family: 'Oswald'; font-weight: 600; font-size: 16px; letter-spacing: .03em; }
.panel .head .act { margin-left: auto; display: flex; gap: 8px; }
.panel .body { padding: 18px; }

.section-label { font-family:'Oswald'; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 12px; }

/* ============================================================
   DASHBOARD STATS (gauge feel)
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--rad);
  padding: 16px 18px; position: relative; overflow: hidden;
}
.stat::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background: var(--amber); opacity:.5; }
.stat .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.stat .v { font-family: 'Oswald'; font-weight: 700; font-size: 34px; line-height: 1.1; margin-top: 8px; }
.stat .d { font-size: 11.5px; color: var(--ink-mut); margin-top: 4px; display:flex; align-items:center; gap:5px; }
.stat.alert::before { background: var(--bad); }
.stat.alert .v { color: var(--bad); }
.stat.ok::before { background: var(--good); }

.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
@media (max-width: 1100px){ .grid-2{ grid-template-columns:1fr; } .stats{ grid-template-columns: repeat(2,1fr);} }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-family: 'Oswald'; font-weight: 500; font-size: 11.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim);
  padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
tbody tr { transition: .12s; }
tbody tr:hover { background: var(--bg-2); }
tbody tr:last-child td { border-bottom: none; }
.t-sku { font-family: 'JetBrains Mono'; color: var(--amber-2); font-weight: 500; }
.t-oem { font-family: 'JetBrains Mono'; color: var(--ink-mut); font-size: 12px; }
.t-sub { font-size: 11.5px; color: var(--ink-dim); }
.t-name { font-weight: 600; }
.t-qty { font-family:'Oswald'; font-weight:600; font-size: 17px; }
.t-loc { font-family:'JetBrains Mono'; font-size: 12px; color: var(--info); }
.row-link { cursor: pointer; }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.fchip {
  padding: 7px 13px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-mut); font-size: 12.5px; font-weight: 600; transition: .15s;
}
.fchip:hover { border-color: var(--ink-dim); color: var(--ink); }
.fchip.on { background: var(--amber); border-color: var(--amber); color: #1a1206; }

/* ============================================================
   PART DETAIL
   ============================================================ */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
@media (max-width: 1000px){ .detail-grid{ grid-template-columns:1fr; } }

.photo {
  aspect-ratio: 4/3; border-radius: var(--rad); border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg,#16191e 0 14px,#13161a 14px 28px);
  display: grid; place-items: center; color: var(--ink-dim); position: relative; overflow:hidden;
}
.photo .lbl { font-family:'Oswald'; letter-spacing:.2em; font-size: 12px; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 0; }
.kv .k { padding: 11px 0; color: var(--ink-dim); font-size: 12.5px; border-bottom: 1px solid var(--line); }
.kv .val { padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.kv > div:nth-last-child(-n+2) { border-bottom: none; }

.xref { display: flex; flex-wrap: wrap; gap: 8px; }
.xref .x { font-family:'JetBrains Mono'; font-size: 12px; padding: 6px 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-mut); }
.xref .x b { color: var(--amber-2); font-weight:500; }

.fitment li { list-style: none; display:flex; align-items:center; gap:10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fitment li:last-child{ border-bottom:none; }
.fitment .yr { font-family:'JetBrains Mono'; color: var(--info); font-size: 12px; min-width: 86px; }

/* ============================================================
   SOURCING COCKPIT
   ============================================================ */
.source-hero {
  background:
    radial-gradient(600px 300px at 80% -40%, rgba(255,138,30,.16), transparent 60%),
    linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--rad);
  padding: 22px 24px; margin-bottom: 20px; position: relative; overflow: hidden;
}
.source-hero .bar { position:absolute; top:0; left:0; right:0; height: 4px; }
.source-hero h2 { font-family:'Oswald'; font-size: 24px; letter-spacing:.02em; }
.source-hero .tgt { font-family:'JetBrains Mono'; color: var(--ink-mut); margin-top: 6px; font-size: 13px; }
.source-hero .tgt b { color: var(--amber-2); }

.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px){ .sources{ grid-template-columns: repeat(2,1fr);} }
.src {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--rad); padding: 18px; transition: .16s; position: relative; overflow: hidden;
}
.src:hover { border-color: var(--amber); transform: translateY(-2px); box-shadow: 0 16px 32px -16px rgba(0,0,0,.7); }
.src .top { display:flex; align-items:center; gap: 12px; margin-bottom: 12px; }
.src .logo { width: 42px; height: 42px; border-radius: 9px; display:grid; place-items:center; font-family:'Oswald'; font-weight:700; font-size: 17px; flex:none; }
.src h3 { font-size: 15px; font-weight: 700; }
.src .meta { font-size: 11.5px; color: var(--ink-dim); }
.src p { font-size: 12.5px; color: var(--ink-mut); line-height: 1.45; min-height: 36px; }
.src .go { display:flex; align-items:center; gap:6px; margin-top: 14px; color: var(--amber-2); font-weight:600; font-size: 12.5px; }
.src .badge { position:absolute; top:14px; right:14px; }

/* ============================================================
   JOBS / REPAIR ORDERS — kanban
   ============================================================ */
.board { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px){ .board{ grid-template-columns: repeat(2,1fr);} }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--rad); padding: 12px; }
.col .ch { display:flex; align-items:center; gap:8px; padding: 4px 6px 12px; font-family:'Oswald'; font-size:13px; letter-spacing:.1em; text-transform:uppercase; color: var(--ink-mut); }
.col .ch .n { margin-left:auto; font-family:'JetBrains Mono'; font-size:11px; color: var(--ink-dim); }
.col .ch .pip { width:8px;height:8px;border-radius:2px; }
.jcard { background: var(--panel); border:1px solid var(--line); border-radius: var(--rad-s); padding: 13px; margin-bottom:10px; transition:.14s; cursor:pointer; }
.jcard:hover { border-color: var(--line-2); transform: translateY(-1px); }
.jcard .ro { font-family:'JetBrains Mono'; font-size: 11px; color: var(--amber-2); }
.jcard .veh { font-weight:700; margin: 5px 0 2px; font-size: 14px; }
.jcard .cust { font-size: 12px; color: var(--ink-mut); }
.jcard .ftr { display:flex; align-items:center; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.jcard .pbar { flex:1; height: 5px; border-radius: 4px; background: var(--bg); overflow:hidden; }
.jcard .pbar i { display:block; height:100%; background: var(--amber); border-radius: 4px; }

/* progress / alerts list */
.alist { display:flex; flex-direction:column; }
.aitem { display:flex; align-items:center; gap: 13px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.aitem:last-child{ border-bottom:none; }
.aitem .ic { width:34px;height:34px;border-radius:8px; display:grid;place-items:center; flex:none; }
.aitem .ic svg{ width:17px;height:17px; }
.aitem .tx { flex:1; }
.aitem .tx b { font-weight:600; }
.aitem .tx span { display:block; font-size: 12px; color: var(--ink-dim); }
.aitem .when { font-size: 11px; color: var(--ink-dim); font-family:'JetBrains Mono'; }

/* ============================================================
   FORMS (add part)
   ============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display:block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mut); margin-bottom: 7px; font-weight: 600; }
.field input, .field select, .field textarea {
  width:100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--rad-s);
  padding: 11px 13px; color: var(--ink); font-size: 13.5px; font-family:'Archivo'; transition:.15s;
}
.field input.mono { font-family:'JetBrains Mono'; }
.field input:focus, .field select:focus, .field textarea:focus { outline:none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); }
.field .hint { font-size: 11px; color: var(--ink-dim); margin-top: 6px; }
.vin-row { display:flex; gap:10px; }
.vin-row input { flex:1; }

/* barcode */
.barcode { background:#fff; border-radius: 8px; padding: 14px 16px 10px; text-align:center; }
.barcode .bars { height: 56px; display:flex; align-items:flex-end; gap: 2px; justify-content:center; }
.barcode .bars i { background:#111; width: 2px; }
.barcode .num { font-family:'JetBrains Mono'; color:#111; font-size: 13px; letter-spacing: .25em; margin-top: 8px; font-weight:700; }

/* ============================================================
   SCAN VIEW (tablet)
   ============================================================ */
.scan-shell { max-width: 460px; margin: 30px auto; }
.scanner {
  aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, #1a1f26, #0c0e11);
  position: relative; overflow: hidden; display:grid; place-items:center;
}
.scanner .frame { width: 64%; aspect-ratio:1; border-radius: 16px; position: relative; }
.scanner .frame::before, .scanner .frame::after,
.scanner .frame i::before, .scanner .frame i::after {
  content:""; position:absolute; width: 34px; height: 34px; border: 3px solid var(--amber);
}
.scanner .frame::before { top:0; left:0; border-right:none; border-bottom:none; border-radius: 8px 0 0 0; }
.scanner .frame::after  { top:0; right:0; border-left:none; border-bottom:none; border-radius: 0 8px 0 0; }
.scanner .frame i::before{ bottom:0; left:0; border-right:none; border-top:none; border-radius: 0 0 0 8px; }
.scanner .frame i::after { bottom:0; right:0; border-left:none; border-top:none; border-radius: 0 0 8px 0; }
.scanner .laser { position:absolute; left:18%; right:18%; height:2px; background: var(--amber); box-shadow:0 0 14px 2px var(--amber); animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { 0%,100%{ top: 22%; opacity:.4;} 50%{ top: 76%; opacity:1; } }
.scanner .hint { position:absolute; bottom: 22px; font-size: 12px; color: var(--ink-mut); font-family:'JetBrains Mono'; }

/* ============================================================
   ANIMATIONS — staggered page load
   ============================================================ */
@keyframes rise { from { opacity:0; transform: translateY(10px);} to { opacity:1; transform:none; } }
.rise { animation: rise .5s cubic-bezier(.2,.7,.3,1) both; }
.rise:nth-child(1){animation-delay:.02s}.rise:nth-child(2){animation-delay:.06s}
.rise:nth-child(3){animation-delay:.10s}.rise:nth-child(4){animation-delay:.14s}
.rise:nth-child(5){animation-delay:.18s}.rise:nth-child(6){animation-delay:.22s}

.crumb { display:flex; align-items:center; gap:8px; font-size: 12.5px; color: var(--ink-dim); margin-bottom: 16px; }
.crumb a:hover{ color: var(--amber-2); }
.crumb .sep { color: var(--line-2); }

.note { background: var(--amber-dim); border: 1px solid rgba(255,138,30,.3); border-radius: var(--rad-s); padding: 12px 14px; font-size: 12.5px; color: var(--amber-2); display:flex; gap:10px; }
.note svg{ width:18px;height:18px;flex:none;margin-top:1px; }
.note b{ color: var(--amber); }

/* ============================================================
   LIVE CAMERA SCANNER
   ============================================================ */
#reader { width: 100%; border-radius: 16px; overflow: hidden; background: #000; }
#reader video { width: 100% !important; height: auto !important; display: block; }
#reader__dashboard_section_csr span, #reader img[alt="Info icon"] { display: none !important; }
#reader__scan_region { background: #000; }
.scan-status { text-align:center; font-family:'JetBrains Mono'; font-size:12.5px; color:var(--ink-mut); margin-top:12px; min-height:18px; }
.scan-status.hit { color: var(--good); }
.scan-status.miss { color: var(--bad); }

/* mobile chrome — hidden on desktop */
.mobilebar { display: none; }
.mobiletop { display: none; }

/* ============================================================
   RESPONSIVE — phone / shop tablet in portrait
   ============================================================ */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }

  .mobiletop {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 60;
    background: rgba(13,15,18,.92); backdrop-filter: blur(10px);
  }
  .mobiletop .mark { width: 30px; height: 30px; border-radius: 7px; background: var(--amber); display:grid; place-items:center; }
  .mobiletop .mark svg { width: 17px; height: 17px; color:#1a1206; }
  .mobiletop .name { font-family:'Oswald'; font-weight:700; font-size:17px; letter-spacing:.03em; }
  .mobiletop .name b { color: var(--amber); }
  .mobiletop .sub { margin-left:auto; font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-dim); }

  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .topbar h1 { font-size: 19px; }
  .topbar h1 small { font-size: 11px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .content { padding: 16px 14px 92px; }

  .stats { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .grid-2, .detail-grid { grid-template-columns: 1fr; }
  .sources { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stat .v { font-size: 28px; }
  .scan-shell { margin: 6px auto; }

  .mobilebar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
    background: rgba(18,21,25,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .mobilebar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 2px; color: var(--ink-dim); font-size: 10px; font-weight: 600;
  }
  .mobilebar a svg { width: 22px; height: 22px; }
  .mobilebar a.active { color: var(--amber-2); }
  .mobilebar a.scanbtn { flex: 0 0 auto; margin-top: -22px; }
  .mobilebar a.scanbtn .ic {
    width: 54px; height: 54px; border-radius: 50%; background: var(--amber); color:#1a1206;
    display:grid; place-items:center; box-shadow: 0 8px 20px -6px rgba(255,138,30,.6);
    border: 4px solid var(--bg);
  }
  .mobilebar a.scanbtn .ic svg { width: 26px; height: 26px; }
  .mobilebar a.scanbtn.active { color: var(--amber-2); }
}
