/* Inter — self-hosted (2026-11-13 app-light build) so the app no
   longer waits on Google Fonts to open. Files live in assets/fonts/,
   cached by the service worker after first load. */
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('fonts/inter-latin-400.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:500;src:url('fonts/inter-latin-500.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('fonts/inter-latin-600.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('fonts/inter-latin-700.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:800;src:url('fonts/inter-latin-800.woff2') format('woff2');}
:root{
  --bg:#0A0F1A; --panel:#111827; --panel2:#1F2937; --line:#243044;
  --text:#F8FAFC; --muted:#A6B2C7;
  --amber:#F59E0B; --amber-d:#D97706; --red:#EF4444; --green:#22C55E; --blue:#3B82F6;
  --shadow:0 1px 2px rgba(0,0,0,.45);
  --side-w:264px;
  color-scheme:dark;
}
/* Light dashboard theme (toggle in the topbar; dark is the default). */
[data-theme="light"]{
  --bg:#F1F5F9; --panel:#FFFFFF; --panel2:#F1F5F9; --line:#E2E8F0;
  --text:#0F172A; --muted:#64748B;
  --amber:#D97706; --amber-d:#B45309; --red:#DC2626; --green:#16A34A; --blue:#2563EB;
  --shadow:0 1px 2px rgba(16,24,40,.07),0 2px 8px rgba(16,24,40,.06);
  color-scheme:light;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
body{margin:0; background:var(--bg); color:var(--text);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:16px; line-height:1.5;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;}
a{color:var(--amber);}

/* ============ CargoMax shell: sidebar + topbar + content ============ */
.cm-scrim{display:none;}
.cm-sidebar{position:fixed; left:0; top:0; bottom:0; width:var(--side-w); z-index:40;
  background:#0B1120; border-right:1px solid var(--line);
  display:flex; flex-direction:column; overflow:hidden;}
[data-theme="light"] .cm-sidebar{background:#FFFFFF; border-right-color:#E2E8F0;}
.cm-brand{display:flex; align-items:center; gap:10px; padding:18px 18px 14px; flex:none;}
.cm-brand img{height:30px; width:auto; display:block;}
.cm-brand .t{font-weight:800; font-size:18px; letter-spacing:.4px; color:#F8FAFC; white-space:nowrap;}
[data-theme="light"] .cm-brand .t{color:#0F172A;}
.cm-brand .t span{color:var(--amber);}
.cm-side-search{padding:0 14px 12px; flex:none;}
.cm-side-search .box{position:relative;}
.cm-side-search input{width:100%; padding:9px 12px 9px 34px; font-size:14px; border-radius:8px;
  border:1px solid var(--line); background:#111827; color:var(--text);}
[data-theme="light"] .cm-side-search input{background:#F1F5F9;}
.cm-side-search .box .cm-ico{position:absolute; left:10px; top:50%; margin-top:-8px; color:var(--muted); pointer-events:none;}
.cm-nav{flex:1; overflow-y:auto; padding:2px 10px 16px;}
.cm-nav::-webkit-scrollbar{width:8px;}
.cm-nav::-webkit-scrollbar-thumb{background:#263349; border-radius:4px;}
.cm-group{margin-bottom:14px;}
.cm-glabel{font-size:11px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase;
  color:var(--muted); padding:8px 10px 6px;}
.cm-link{display:flex; align-items:center; gap:11px; padding:9px 12px; margin:1px 0;
  border-radius:8px; color:#C7D2E4; text-decoration:none; font-size:14.5px; font-weight:500;}
[data-theme="light"] .cm-link{color:#334155;}
.cm-link .cm-ico{flex:none; color:#8B98B0;}
[data-theme="light"] .cm-link .cm-ico{color:#64748B;}
.cm-link:hover{background:#16203a; color:#F8FAFC;}
[data-theme="light"] .cm-link:hover{background:#F1F5F9; color:#0F172A;}
.cm-link.on{background:#1B2742; color:#FFFFFF; font-weight:600;}
[data-theme="light"] .cm-link.on{background:#E2E8F0; color:#0F172A;}
.cm-link.on .cm-ico{color:var(--amber);}
.cm-link .soon{font-style:normal; font-size:9px; font-weight:800; letter-spacing:.8px;
  color:var(--amber); border:1px solid var(--amber-d); border-radius:4px;
  padding:1px 5px; margin-left:auto;}
.cm-side-foot{flex:none; padding:12px 16px; border-top:1px solid var(--line);
  font-size:12.5px; color:var(--muted);}
.cm-main{min-height:100vh; display:flex; flex-direction:column;}
.cm-topbar{position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:12px;
  min-height:64px; padding:0 20px; background:var(--bg); border-bottom:1px solid var(--line);}
.cm-burger{display:none; flex:none; width:40px; height:40px; border-radius:8px; cursor:pointer;
  background:transparent; border:1px solid var(--line); color:var(--text);}
.cm-burger:hover{background:var(--panel2);}
.cm-back{color:var(--amber); text-decoration:none; font-size:18px; flex:none;}
.cm-search{flex:1; max-width:520px; position:relative;}
.cm-search input{width:100%; padding:10px 14px 10px 38px; font-size:14.5px; border-radius:9px;
  border:1px solid var(--line); background:var(--panel); color:var(--text);}
.cm-search input::placeholder{color:var(--muted);}
.cm-search .cm-ico{position:absolute; left:12px; top:50%; margin-top:-8px; color:var(--muted); pointer-events:none;}
.cm-top-actions{margin-left:auto; display:flex; align-items:center; gap:8px; flex:none;}
.cm-iconbtn{position:relative; width:40px; height:40px; border-radius:999px; cursor:pointer;
  background:transparent; border:1px solid var(--line); color:var(--text); font-size:17px; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; text-decoration:none;}
.cm-iconbtn:hover{background:var(--panel2);}
.cm-badge{position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 5px;
  border-radius:999px; background:var(--red); color:#fff; font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center;}
.cm-avatar{width:38px; height:38px; border-radius:999px; flex:none;
  background:linear-gradient(135deg,#F59E0B,#B45309); color:#0F172A;
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:800; font-size:16px;}
.cm-content{flex:1; padding:26px 28px 40px;}
.cm-content .wrap{max-width:1360px; margin:0 auto; padding:0;}
@media (min-width:1024px){
  .cm-main{margin-left:var(--side-w);}
}
@media (max-width:1023.98px){
  .cm-sidebar{transform:translateX(-105%); transition:transform .22s ease;}
  body.cm-nav-open .cm-sidebar{transform:none;}
  body.cm-nav-open .cm-scrim{display:block; position:fixed; inset:0; z-index:35; background:rgba(0,0,0,.55);}
  .cm-burger{display:inline-flex; align-items:center; justify-content:center;}
  .cm-content{padding:18px 16px 40px;}
  .cm-search input{font-size:14px;}
}

/* ============ Page header + KPI cards (CargoMax style) ============ */
.page-head{margin:2px 0 18px;}
.page-head h1{margin:0 0 4px;}
.page-head .sub{color:var(--muted); font-size:15px; margin:0;}
.kpi-grid{display:grid; gap:16px; margin:16px 0; grid-template-columns:repeat(4,minmax(0,1fr));}
@media (max-width:1200px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:560px){.kpi-grid{grid-template-columns:1fr;}}
.kpi-card{background:var(--panel); border:1px solid var(--line); border-radius:12px;
  padding:18px; box-shadow:var(--shadow);}
.kpi-top{display:flex; align-items:flex-start; justify-content:space-between; gap:8px;}
.kpi-label{font-size:14px; font-weight:500; color:var(--muted);}
.kpi-ico{width:38px; height:38px; border-radius:999px; flex:none; display:grid; place-items:center;
  background:rgba(34,197,94,.12); color:var(--green);}
.kpi-ico.amber{background:rgba(245,158,11,.12); color:var(--amber);}
.kpi-ico.red{background:rgba(239,68,68,.12); color:var(--red);}
.kpi-ico.blue{background:rgba(59,130,246,.12); color:var(--blue);}
.kpi-num{font-size:30px; font-weight:800; letter-spacing:-.02em; line-height:1.15;
  margin:12px 0 2px; color:var(--text);}
.kpi-num a{color:inherit; text-decoration:none;}
.kpi-num a:hover{text-decoration:underline;}
.kpi-cap{font-size:13px; color:var(--muted);}
.kpi-foot{display:flex; justify-content:flex-end; margin-top:10px;}

/* ============ Legacy driver shell (unchanged) ============ */
.wrap{max-width:520px; margin:0 auto; padding:0 16px 40px;}
.topbar{background:#0A0F1A; border-bottom:1px solid var(--line); min-height:64px;
  display:flex; align-items:center; padding:0 16px; position:sticky; top:0; z-index:10;}
.topbar .inner{max-width:520px; margin:0 auto; width:100%; display:flex; align-items:center; gap:10px;}
.brand{font-weight:800; letter-spacing:1.5px; font-size:18px; color:#F8FAFC;}
.brand span{color:var(--amber);}
.brand.office{display:flex;align-items:center;gap:10px;}
.brand.office span{color:#F8FAFC;font-size:17px; letter-spacing:1px;}
.brand img{height:28px; width:auto; display:block;}
.topbar .sub{font-size:11px; color:var(--muted); letter-spacing:1px; text-transform:uppercase;}
.backlink{color:var(--amber); text-decoration:none; font-size:15px; margin-right:4px;}
h1{font-size:28px; font-weight:800; letter-spacing:-0.025em; line-height:1.2; margin:24px 0 8px; color:var(--text);}
h2{font-size:19px; font-weight:600; letter-spacing:-0.01em; margin:24px 0 10px; color:var(--text);}
.cm-content h1:first-child{margin-top:0;}
p.muted, .muted{color:var(--muted); font-size:15px;}
.card{background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:16px; margin:12px 0;
  box-shadow:var(--shadow);}
@media (min-width:768px){.card{padding:24px;}}
.btn{display:block; width:100%; text-align:center; min-height:36px; padding:9px 16px; margin:10px 0;
  border-radius:6px; font-size:14px; font-weight:600; text-decoration:none; border:1px solid transparent; cursor:pointer;
  background:#FFFFFF; color:#000000;}
.btn:hover{filter:brightness(.93);}
.btn-amber{background:var(--amber); color:#0F172A;}
.btn-amber:hover{background:var(--amber-d); filter:none;}
.btn-ghost{background:#FFFFFF !important; color:#000000 !important; border:1px solid #FFFFFF;}
.btn-ghost:hover{background:#E5E7EB; filter:none;}
.btn-red{background:var(--red); color:#fff;}
.btn-red:hover{filter:brightness(.92);}
.btn-sm{width:auto; display:inline-block; min-height:32px; padding:6px 12px; font-size:13px; margin:4px 0;}
label{display:block; font-size:13px; font-weight:500; color:var(--muted); margin:12px 0 6px;}
input[type=text],input[type=tel],input[type=password],input[type=date],input[type=time],input[type=number],textarea,select{
  width:100%; padding:10px 12px; font-size:15px; border-radius:8px; border:1px solid var(--line);
  background:#0F172A; color:var(--text);}
[data-theme="light"] input[type=text],[data-theme="light"] input[type=tel],
[data-theme="light"] input[type=password],[data-theme="light"] input[type=date],
[data-theme="light"] input[type=time],[data-theme="light"] input[type=number],
[data-theme="light"] textarea,[data-theme="light"] select{background:#fff; color:var(--text);}
input[type=text]:focus,input[type=tel]:focus,input[type=password]:focus,input[type=date]:focus,
input[type=time]:focus,input[type=number]:focus,textarea:focus,select:focus{
  outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(59,130,246,.25);}
textarea{min-height:110px; resize:vertical;}
input[type=file]{width:100%; padding:10px 0; font-size:15px; color:var(--text);}
.notice{border-radius:8px; padding:12px 14px; margin:12px 0; font-size:14px;}
.notice.ok{background:#052E16; border:1px solid #166534; color:#BBF7D0;}
.notice.err{background:#450A0A; border:1px solid #991B1B; color:#FECACA;}
.notice.warn{background:#451A03; border:1px solid #92400E; color:#FDE68A;}
[data-theme="light"] .notice.ok{background:#F0FDF4; border-color:#86EFAC; color:#166534;}
[data-theme="light"] .notice.err{background:#FEF2F2; border-color:#FCA5A5; color:#991B1B;}
[data-theme="light"] .notice.warn{background:#FFFBEB; border-color:#FCD34D; color:#92400E;}
/* Office sign-in screen: greeting, form, and authorized-use warning. */
.signin-wrap{max-width:460px; margin:6vh auto 0;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;}
.signin-logo{width:64px; height:64px; border-radius:16px; background:#0A0F1A;
  border:1px solid var(--line); display:grid; place-items:center; margin:0 0 16px;}
.signin-logo img{width:40px; height:40px; display:block;}
.signin-eyebrow{font-size:12px; letter-spacing:1.5px; text-transform:uppercase; color:var(--muted); margin:0 0 6px;}
.signin-wrap h1{margin:0 0 8px;}
.signin-wrap .btn-amber{width:100%; margin-top:14px;}
.signin-warning{margin-top:20px; padding-top:14px; border-top:1px solid var(--line); font-size:13px; color:var(--muted);}
@media (max-width:560px){.signin-wrap{margin-top:4vh;}}
.docrow{display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line);}
.docrow:last-child{border-bottom:0;}
.docrow .grow{flex:1;}
.docrow .t{font-weight:600; font-size:15px;}
.docrow .s{font-size:13px; color:var(--muted);}
.badge{display:inline-flex; align-items:center; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; white-space:nowrap; border:1px solid transparent;}
.badge.verified{background:#052E16; color:#4ADE80; border-color:#166534;}
.badge.pending{background:#451A03; color:#FBBF24; border-color:#92400E;}
.badge.missing{background:#1E293B; color:#94A3B8; border-color:#334155;}
.badge.flagged,.badge.expired{background:#7F1D1D; color:#FCA5A5; border-color:#991B1B;}
.badge.expiring{background:#451A03; color:#FBBF24; border-color:#92400E;}
.badge.draft{background:#1E293B; color:#CBD5E1; border:1px dashed #475569;}
[data-theme="light"] .badge.verified{background:#F0FDF4; color:#15803D; border-color:#86EFAC;}
[data-theme="light"] .badge.pending,[data-theme="light"] .badge.expiring{background:#FFFBEB; color:#B45309; border-color:#FCD34D;}
[data-theme="light"] .badge.missing,[data-theme="light"] .badge.draft{background:#F1F5F9; color:#64748B; border-color:#CBD5E1;}
[data-theme="light"] .badge.flagged,[data-theme="light"] .badge.expired{background:#FEF2F2; color:#B91C1C; border-color:#FCA5A5;}
/* Dispatch — truck status badges (tinted pills). */
.badge.st-loaded{background:#172554; color:#93C5FD; border-color:#1E40AF;}
.badge.st-enroute{background:#451A03; color:#FBBF24; border-color:#92400E;}
.badge.st-available{background:#052E16; color:#4ADE80; border-color:#166534;}
.badge.st-down{background:#7F1D1D; color:#FCA5A5; border-color:#991B1B;}
.badge.st-home{background:#083344; color:#67E8F9; border-color:#155E75;}
.badge.st-off{background:#1E293B; color:#94A3B8; border-color:#334155;}
[data-theme="light"] .badge.st-available{background:#F0FDF4; color:#15803D; border-color:#86EFAC;}
[data-theme="light"] .badge.st-enroute{background:#FFFBEB; color:#B45309; border-color:#FCD34D;}
[data-theme="light"] .badge.st-down{background:#FEF2F2; color:#B91C1C; border-color:#FCA5A5;}
[data-theme="light"] .badge.st-loaded{background:#EFF6FF; color:#1D4ED8; border-color:#BFDBFE;}
[data-theme="light"] .badge.st-home{background:#ECFEFF; color:#0E7490; border-color:#A5F3FC;}
[data-theme="light"] .badge.st-off{background:#F1F5F9; color:#64748B; border-color:#CBD5E1;}
table.list tr.attn td{background:#451A03;}
[data-theme="light"] table.list tr.attn td{background:#FEF3C7;}
table.list tr.stale td{color:var(--muted);}
.thumb{width:64px; height:64px; object-fit:cover; border-radius:8px; border:1px solid var(--line); background:#000;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
table.list{width:100%; border-collapse:collapse; font-size:16px;}
table.list th{text-align:left; color:var(--muted); font-weight:600; font-size:14px;
  padding:12px; border-bottom:1px solid var(--line);}
table.list td{padding:16px 12px; border-bottom:1px solid var(--line); vertical-align:middle; color:var(--text); font-size:16px;}
table.list tbody tr:hover td{background:rgba(30,41,59,.45);}
[data-theme="light"] table.list tbody tr:hover td{background:#F8FAFC;}
table.list td strong{color:var(--text); font-weight:600;}
table.list tr:last-child td{border-bottom:0;}
/* Wide-table containment (2026-10-24 click audit): legacy table families
   (.list/.hq-table/.tbl) — long unbroken cell content (emails, VINs, names)
   wraps instead of forcing the table, and the page, sideways. A cell marked
   .cmd-act (with its header cell) pins to the right edge of the table's
   scroll wrapper — the layout-shell mirror of the cmd-shell.css rule from
   the 2026-10-24 windows fix, so row actions stay on screen. */
table.list td, table.hq-table td, table.tbl td{overflow-wrap:anywhere;}
table.list th.cmd-act, table.list td.cmd-act,
table.hq-table th.cmd-act, table.hq-table td.cmd-act{position:sticky; right:0; background:var(--panel); z-index:2; box-shadow:-1px 0 0 var(--line);}
table.list tbody tr:hover td.cmd-act{background:#1E293B;}
[data-theme="light"] table.list tbody tr:hover td.cmd-act{background:#F8FAFC;}
.footer{margin-top:34px; text-align:center; color:var(--muted); font-size:12px;}
/* ============ Driver app bottom navigation (2026-10-30 reskin) ============ */
.appnav{position:fixed; bottom:0; left:0; right:0; z-index:100; display:flex;
  background:#10141B; border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom);}
.appnav-a{flex:1; text-align:center; padding:10px 4px; color:#8B98B0;
  text-decoration:none; font-size:11px; position:relative; line-height:1.35;}
.appnav-a.on{color:var(--amber); font-weight:700;}
.appnav-scan{color:#0F172A !important; background:linear-gradient(135deg,#F59E0B,#D97706); border-radius:12px;
  margin:4px; padding:8px 4px; font-weight:700;}
.appnav-badge{position:absolute; top:2px; right:calc(50% - 22px); min-width:17px; height:17px;
  line-height:17px; padding:0 4px; border-radius:999px; background:#D42B2B; color:#fff;
  font-size:10px; font-weight:700; text-align:center;}
.appnav-spacer{height:70px;}
.appnote{font-size:12px; color:var(--muted); margin:10px 2px 0; line-height:1.45;}
details.card>summary{list-style:none; cursor:pointer;}
details.card>summary::-webkit-details-marker{display:none;}
.footer .mc{color:var(--amber); font-weight:700;}
/* File-folder tabs: staggered folder look, active tab raised like an open folder. */
.tabs{display:flex; align-items:flex-end; gap:0; margin:16px 0 0; padding:0 6px; overflow-x:auto; border-bottom:1px solid var(--line);}
.tabs a{position:relative; flex:0 0 auto; text-align:center; padding:11px 20px 9px; margin-right:-9px;
  background:#0F172A; color:var(--text); text-decoration:none; font-size:14px; font-weight:600; white-space:nowrap;
  border:1px solid var(--line); border-bottom:none; border-radius:8px 10px 0 0;
  box-shadow:3px -2px 5px rgba(0,0,0,.28);}
.tabs a:nth-child(even){transform:translateY(3px);}
.tabs a:hover{background:#1E293B;}
.tabs a.on{background:var(--amber); color:#0F172A; border-color:var(--amber); z-index:3; transform:none;
  padding:14px 26px 11px; box-shadow:4px -3px 8px rgba(0,0,0,.35);}
/* JASKO HQ module shell: slim switcher under the topbar on office pages.
   Superseded by the CargoMax sidebar (body.cm-shell hides it), but kept for
   any page rendering outside the shell. */
.hqmod{display:flex; gap:14px; margin:14px 0 2px; flex-wrap:wrap; align-items:center;}
body.cm-shell .hqmod{display:none !important;}
.hqmod-group{display:flex; gap:6px; flex-wrap:wrap; align-items:center;}
.hqmod-glabel{font-size:12px; font-weight:700; text-transform:uppercase;
  letter-spacing:1.2px; color:var(--muted); margin-right:2px;}
.hqmod a{padding:8px 14px; border-radius:6px; background:#0F172A; color:var(--text);
  text-decoration:none; font-size:14px; font-weight:500;
  text-transform:uppercase; border:1px solid var(--line);}
.hqmod a:hover{background:#1E293B; color:var(--text);}
.hqmod a.on{background:#1E293B; color:#F8FAFC; border-color:#1E293B;}
.hqmod a.on:hover{color:#F8FAFC;}
.hqmod a em.soon{font-style:normal; font-size:9px; font-weight:800; letter-spacing:.8px;
  color:var(--amber); border:1px solid var(--amber-d); border-radius:4px;
  padding:1px 5px; margin-left:5px; vertical-align:1px;}
.hqmod a.on em.soon{color:#F8FAFC; border-color:#94A3B8;}
/* JASKO HQ "coming soon" placeholder page. */
.hqsoon{text-align:center; padding:44px 24px; margin-top:20px;}
.hqsoon-badge{display:inline-block; font-size:11px; font-weight:700; letter-spacing:1.5px;
  text-transform:uppercase; color:var(--amber); border:1px solid var(--amber-d);
  border-radius:999px; padding:5px 14px; margin-bottom:12px;}
.hqsoon h2{margin:0 0 8px;}
.hqsoon p{max-width:440px; margin:0 auto 18px;}
/* JASKO HQ pulse strip: stat cards, inline SVG only. */
.hqpulse{display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:12px; margin:14px 0 4px;}
.hqpulse-card{background:var(--panel); border:1px solid var(--line); border-radius:8px;
  padding:16px; box-shadow:var(--shadow);}
.hqpulse-label{font-size:14px; font-weight:500; color:var(--muted); margin-bottom:8px;}
.hqpulse-num{font-size:24px; font-weight:800; letter-spacing:-0.02em; line-height:1.2;}
.hqpulse-unit{font-size:14px; font-weight:500; color:var(--muted);}
.hqpulse-sub{font-size:12px; color:var(--muted); margin-top:6px;}
.hqpulse-sub a{color:var(--amber);}
.hqpulse-num a{color:inherit; text-decoration:none;}
.hqpulse-num a:hover{text-decoration:underline;}
a.badge{text-decoration:none;}
.trend-up,.trend-down{display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600;
  border-radius:999px; padding:2px 8px;}
.trend-up{background:#052E16; color:#4ADE80;}
.trend-down{background:#7F1D1D; color:#FCA5A5;}
[data-theme="light"] .trend-up{background:#F0FDF4; color:#15803D;}
[data-theme="light"] .trend-down{background:#FEF2F2; color:#B91C1C;}
.hqpulse-row{display:flex; align-items:center; gap:10px;}
.hqpulse .donut{width:46px; height:46px; flex:none;}
.hqpulse .donut-num{font-size:11px; font-weight:800; fill:var(--text);}
.hqpulse-bar{height:8px; background:#1E293B; border-radius:4px; overflow:hidden; margin-top:8px;}
[data-theme="light"] .hqpulse-bar{background:#E2E8F0;}
.hqpulse-bar i{display:block; height:100%; background:var(--green); border-radius:4px;}
.hqpulse-bars{display:flex; align-items:flex-end; gap:2px; height:34px; margin-top:8px;}
.hqpulse-bars i{flex:1; background:var(--blue); border-radius:2px 2px 0 0; min-height:2px; opacity:.85;}
.red{color:var(--red);} .amber{color:var(--amber);} .green{color:var(--green);}
/* Office console: full-width watermark, tabs wrap instead of scrolling. */
[data-theme="light"] body.office-wide::before{opacity:.1;}
body.office-wide .tabs{flex-wrap:wrap; overflow-x:visible;}
.btn-big{padding:18px 12px; font-size:18px;}
.vh{position:absolute; left:0; top:0; width:1px; height:1px; opacity:0; overflow:hidden;}
.checkgrid{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:6px 0 12px;}
.check{background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:12px 10px;
  font-size:14px; color:var(--text); display:flex; gap:10px; align-items:center; margin:0 !important;}
.check input{width:22px; height:22px; accent-color:var(--amber); flex:none;}
/* In-browser crop overlay */
#cropOverlay{position:fixed; inset:0; background:#0A0F1A; z-index:100; display:none; flex-direction:column;}
#cropOverlay.open{display:flex;}
.crop-top{display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border-bottom:1px solid var(--line);}
.crop-top button{background:var(--panel2); color:var(--text); border:1px solid var(--line);
  border-radius:8px; padding:10px 14px; font-size:15px; font-weight:600;}
.crop-top .t{font-weight:700; font-size:15px;}
#cropCanvas{flex:1; width:100%; touch-action:none; display:block;}
.crop-bottom{display:flex; gap:10px; padding:12px; border-top:1px solid var(--line);}
.crop-bottom button{flex:1; padding:14px; border-radius:8px; font-size:15px; font-weight:600;
  border:1px solid var(--line); background:var(--panel2); color:var(--text);}
.crop-bottom button.primary{background:var(--amber); color:#0F172A; border-color:var(--amber); flex:2;}
.crop-bottom button.on{background:#052E16; color:#4ADE80; border-color:#166534;}
#cropProgress{position:absolute; inset:0; background:rgba(10,15,26,.85);
  display:flex; align-items:center; justify-content:center; font-size:17px; font-weight:700;}
#cropProgress[hidden]{display:none;}
.trk-sub{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0;}
.trk-sub a{padding:8px 18px;border-radius:999px;background:#1E293B;color:#CBD5E1;text-decoration:none;font-weight:600;font-size:13px;letter-spacing:.02em;border:1px solid transparent;}
.trk-sub a.on{background:var(--amber);color:#0F172A;}
[data-theme="light"] .trk-sub a{background:#F1F5F9; color:var(--text);}
/* accordion */
.acc{background:var(--panel); border:1px solid var(--line); border-radius:8px; margin:12px 0; overflow:hidden;
  box-shadow:var(--shadow);}
.acc>summary{cursor:pointer; padding:16px; font-weight:600; font-size:17px; display:flex; align-items:center; gap:10px; list-style:none; user-select:none;}
.acc>summary::-webkit-details-marker{display:none;}
.acc>summary:hover{background:var(--panel2);}
.acc .chev{margin-left:auto; color:var(--amber); font-size:20px; line-height:1; transition:transform .15s;}
.acc[open] .chev{transform:rotate(90deg);}
.acc-body{padding:2px 12px 12px;}
.dot{display:inline-block; width:10px; height:10px; border-radius:50%;}
.dot-green{background:#22C55E;}
.dot-grey{background:#64748B;}
.dot-amber{background:#F59E0B;}
/* ---------- Light dashboard theme: component tuning ---------- */
.themetoggle{margin-left:auto; flex:none; width:38px; height:38px; border-radius:999px; cursor:pointer;
  background:transparent; border:1px solid var(--line); color:var(--text); font-size:17px; line-height:1;}
.themetoggle:hover{background:var(--panel2);}
[data-theme="light"] .topbar{background:#FFFFFF; border-bottom-color:#E2E8F0;}
[data-theme="light"] .brand,[data-theme="light"] .brand.office span{color:#0F172A;}
[data-theme="light"] .btn{background:#0F172A; color:#F8FAFC; border-color:#0F172A;}
[data-theme="light"] .btn:hover{background:#1E293B; filter:none;}
[data-theme="light"] .btn-amber{background:#F59E0B; color:#0F172A;}
[data-theme="light"] .btn-ghost{background:#000000 !important; color:#FFFFFF !important; border-color:#000000;}
[data-theme="light"] .btn-ghost:hover{background:#1F2937;}
[data-theme="light"] .card,[data-theme="light"] .acc,[data-theme="light"] .check,
[data-theme="light"] .hqpulse-card,[data-theme="light"] .kpi-card{background:var(--panel); box-shadow:var(--shadow);}
[data-theme="light"] .tabs{border-bottom-color:#E2E8F0;}
[data-theme="light"] .tabs a{background:#F1F5F9; color:#0F172A;}
[data-theme="light"] .tabs a:hover{background:#E2E8F0;}
[data-theme="light"] .hqmod a{background:#fff; color:#0F172A;}
[data-theme="light"] .hqmod a.on{background:#E2E8F0; color:#0F172A; border-color:#E2E8F0;}
/* ---------- HQ modern mode: full-width, working right rail ---------- */
body.hq-modern .card{border-radius:8px; padding:16px; box-shadow:var(--shadow);}
@media (min-width:768px){body.hq-modern .card{padding:24px;}}
[data-theme="light"] body.hq-modern .card{box-shadow:var(--shadow);}
body.hq-modern h1{font-size:30px; letter-spacing:-0.025em;}
@media (max-width:1279px){
  body.hq-modern .hq-rail{margin-top:16px;}
}
@media (min-width:1280px){
  body.hq-modern .hq-cols{display:flex; gap:20px; align-items:flex-start;}
  body.hq-modern .hq-main{flex:1; min-width:0;}
  body.hq-modern .hq-rail{flex:0 0 300px; position:sticky; top:80px;}
}
body.hq-modern .hq-rail .card{margin:0 0 12px; padding:16px;}
body.hq-modern .hq-rail h3{font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:1px;
  color:var(--muted); margin:0 0 10px;}

/* Tap feedback (2026-11-13): one tap visibly registers — a thin
   progress bar starts immediately and the tapped control pulses,
   so nobody double-taps a slow page. Driven by assets/app.js. */
#tapbar{position:fixed;top:0;left:0;height:3px;width:0;background:#c9a227;z-index:9999;opacity:0;transition:width .25s ease,opacity .3s ease;pointer-events:none;}
#tapbar.on{opacity:1;}
.tap-busy{opacity:.55!important;pointer-events:none!important;}
button.tap-busy,a.tap-busy{position:relative;}
