/* ============================================================================
   Binmatic operator dashboard — "mission-control luxe".
   Near-black + electric-lime brand DNA, elevated to a high-end ops console:
   layered atmosphere, hairline gradient borders, glassy depth, oversized
   numerals, staggered entrance motion. Server-rendered; no client framework.
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@500;600;700;800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #08090A; --bg-2: #0C0D10; --surface: #15171B; --surface-2: #1C1F24; --surface-3: #24282F;
  --brand: #6BE61A; --brand-deep: #2F8807; --magenta: #FF1493; --amber: #F5C16C; --matrix: #3DF14B;
  --cream: #F2E9D6; --cream-dim: #D2C9B6; --muted: #857F72;
  --line: rgba(240,230,210,.07); --line-2: rgba(240,230,210,.13);
  --ok: #5BBF7E; --warn: #F5A623; --red: #E5484D;
  --display: "Saira Condensed", Impact, sans-serif; --body: "Inter", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 15px; --radius-sm: 10px;
  --border-grad: linear-gradient(160deg, rgba(240,230,210,.20), rgba(240,230,210,.04) 45%, rgba(240,230,210,.02));
  --panel: linear-gradient(168deg, rgba(30,33,39,.92), rgba(17,19,23,.92));
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -22px rgba(0,0,0,.85), 0 4px 12px -8px rgba(0,0,0,.7);
  --shadow-hover: 0 1px 0 rgba(255,255,255,.06) inset, 0 26px 60px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(107,230,26,.10), 0 12px 40px -16px rgba(107,230,26,.14);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--cream); font-family: var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  letter-spacing: .1px; min-height: 100vh;
}
/* atmosphere: ambient glows + faint grid + grain */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1000px 560px at 8% -8%, rgba(107,230,26,.09), transparent 58%),
    radial-gradient(780px 540px at 112% 8%, rgba(255,20,147,.055), transparent 55%),
    radial-gradient(900px 700px at 60% 120%, rgba(107,230,26,.05), transparent 60%),
    linear-gradient(rgba(240,230,210,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,230,210,.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 44px 44px, 44px 44px;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' 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; }
::selection { background: rgba(107,230,26,.25); color: #fff; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2f343c; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================================
   App-shell chrome — full-width, pinned ticker + topbar, scrolling body, and a
   floating full-width nav bar (replaces the old left sidebar). Mirrors the
   Mission Control prototype. Tokens/fonts already match.
   ============================================================================ */
.pfull { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.pfull .ticker, .pfull .appbar { flex: none; }

.ticker { display: flex; align-items: center; gap: 14px; padding: 9px 24px; border-bottom: 1px solid var(--line);
  background: rgba(10,14,12,.6); overflow: hidden; white-space: nowrap; }
.ticker .live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .12em; color: var(--brand); flex: none; }
.ticker .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand); animation: pulse 1.6s infinite; }
.ticker-track { display: inline-flex; gap: 30px; font-size: 12px; color: var(--cream-dim); overflow: hidden; min-width: 0; }
.ticker-track b { color: var(--brand); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin-right: 6px; }

.appbar { display: flex; align-items: center; gap: 16px; padding: 15px 24px 12px; }
.appbar .spacer { flex: 1; }
.appbar .modepill { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; color: var(--cream-dim); white-space: nowrap; }
.appbar .modepill.halt { color: var(--red); border-color: rgba(229,72,77,.5); background: rgba(229,72,77,.1); }
/* Grand Wizard identity chip — matrix-green, glows like the wordmark */
.gw-chip { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--matrix);
  border: 1px solid rgba(61,241,75,.45); border-radius: 999px; padding: 6px 12px; text-shadow: 0 0 12px rgba(61,241,75,.4); white-space: nowrap; }
/* autonomy switch is compact + inline in the appbar */
.appbar .autoswitch { margin: 0; padding: 5px 6px 5px 12px; display: flex; align-items: center; gap: 10px; border-radius: 999px; background: var(--surface-2, #15171b); }
.appbar .autoswitch-l { margin-bottom: 0; white-space: nowrap; }
.appbar .autoswitch-seg .autoseg { flex: none; padding: 6px 12px; }

.scroller { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 92px; }
.botfade { position: absolute; left: 0; right: 0; bottom: 0; height: 92px; pointer-events: none; z-index: 3;
  background: linear-gradient(to bottom, rgba(8,9,10,0), rgba(8,9,10,.82) 52%, var(--bg) 82%); }

.brand { font-family: var(--mono); font-weight: 700; font-size: 23px; letter-spacing: -1px; text-transform: lowercase;
  color: var(--matrix); text-shadow: 0 0 18px rgba(61,241,75,.55), 0 0 44px rgba(61,241,75,.22); }
.brand .tm { font-size: 11px; vertical-align: super; margin-left: 1px; text-shadow: none; opacity: .85; }
.brand .dot { color: var(--brand); text-shadow: 0 0 16px rgba(107,230,26,.6); }

/* floating full-width nav (horizontally scrollable) */
.deskbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; align-items: center; gap: 4px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: rgba(10,14,12,.94);
  border-top: 1px solid var(--line-2); backdrop-filter: blur(12px); overflow-x: auto;
  box-shadow: 0 -14px 44px -22px rgba(0,0,0,.8); scrollbar-width: thin; }
.deskbar::-webkit-scrollbar { height: 5px; }
.deskbar::-webkit-scrollbar-thumb { background: rgba(240,230,210,.16); border-radius: 3px; }
.db-sec { flex: none; font-family: var(--mono); font-size: 8px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: 0 6px 0 12px; align-self: center; opacity: .7; }
.db-sec:first-child { display: none; }
.db-item { position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
  border-radius: 999px; color: var(--cream-dim); font-weight: 500; font-size: 13px; border: 1px solid transparent;
  white-space: nowrap; transition: background .16s, color .16s, border-color .16s; }
.db-item:hover { background: rgba(240,230,210,.05); color: var(--cream); }
.db-item.active { color: var(--bg); background: var(--brand); border-color: var(--brand); font-weight: 700;
  box-shadow: 0 6px 20px -8px rgba(107,230,26,.6); }
.db-item .db-ic { flex: 0 0 auto; width: 18px; height: 18px; display: grid; place-items: center; color: var(--muted); }
.db-item .db-ic .oi { width: 16px; height: 16px; }
.db-item:hover .db-ic { color: var(--cream-dim); }
.db-item.active .db-ic { color: var(--bg); }
.db-item .nav-badge { position: static; margin-left: 2px; }
/* unified bar: Mission Control anchor + ⌘K + appbar needs-you pill */
.db-mc { flex: none; display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px; background: var(--brand); color: var(--bg);
  font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
  text-decoration: none; box-shadow: 0 6px 20px -8px rgba(107,230,26,.6); }
.db-mc:hover { filter: brightness(1.07); }
.db-sep { flex: none; width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.db-k { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; cursor: pointer; background: rgba(0,0,0,.2); white-space: nowrap; }
.db-k:hover { color: var(--cream-dim); border-color: var(--brand); }
.db-k kbd { font-family: var(--mono); font-size: 10px; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; color: var(--cream-dim); }
.needpill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; text-decoration: none;
  border: 1px solid rgba(245,166,35,.4); background: rgba(245,166,35,.1); color: var(--amber);
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.needpill b { font-size: 13px; }
.needpill:hover { border-color: var(--amber); }
/* persistent sticky tools rail (the current lane's sub-nav) — under the appbar */
.pfull .toolsrow { flex: none; }
.toolsrow { display: flex; align-items: center; gap: 8px; padding: 10px 24px; border-bottom: 1px solid var(--line);
  background: rgba(10,14,12,.5); overflow-x: auto; }
.toolsrow .tr-label { flex: none; font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-right: 4px; }
.toolsrow .tchip { flex: none; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-dim); font-size: 13px;
  white-space: nowrap; text-decoration: none; transition: all .15s; }
.toolsrow .tchip:hover { border-color: var(--brand); color: var(--cream); background: rgba(107,230,26,.06); }
.toolsrow .tchip.on { background: var(--brand); color: var(--bg); border-color: var(--brand); font-weight: 700; }
.toolsrow .tchip.on:hover { color: var(--bg); background: var(--brand); filter: brightness(1.07); }
/* lane-home pill = "back to the lane overview"; inactive on a tool page (only the
   screen you're on lights green). Green only when it carries .on (the lane home). */
.toolsrow .tchip.home { color: var(--cream-dim); }

/* ---- content ---- */
.main { padding: 26px 40px 40px; max-width: 1260px; margin: 0 auto; }

/* ============================================================================
   Living panels + KPI boxes — the Mission Control design language (ported from
   the prototype). Big numbers, agent-attributed scrolling feeds, mini-viz,
   "running on its own" footers.
   ============================================================================ */
.pk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pk { position: relative; border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px;
  background: linear-gradient(168deg, rgba(255,255,255,.04), rgba(0,0,0,.2)); }
.pk .v { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--brand); line-height: 1; }
.pk.dim .v { color: var(--cream); }
.pk.amber .v { color: var(--amber); }
.pk .l { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 8px; padding-right: 22px; }
.pk-ic { position: absolute; top: 15px; right: 15px; width: 18px; height: 18px; color: var(--brand); opacity: .85; }
.pk-ic .oi { width: 100%; height: 100%; }

.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 22px; }
.wcard { position: relative; border: 1px solid var(--line-2); border-radius: 16px;
  background: linear-gradient(180deg, rgba(16,20,18,.7), rgba(8,9,10,.85));
  overflow: hidden; display: flex; flex-direction: column; min-height: 208px;
  transition: border-color .2s, box-shadow .2s, transform .2s; }
.wcard:hover { border-color: rgba(107,230,26,.4); box-shadow: 0 18px 50px -24px rgba(0,0,0,.8); transform: translateY(-2px); }
.wc-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.wc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand); animation: pulse 1.9s infinite; flex: none; }
.wc-dot.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.wc-name { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--cream-dim); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-tag { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); flex: none; }
.wc-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 15px 12px; }
.wc-val { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--cream); }
.wc-val.good { color: var(--brand); text-shadow: 0 0 24px rgba(107,230,26,.25); }
.wc-val.amber { color: var(--amber); }
.wc-sub { margin-top: 5px; font-size: 12px; color: var(--cream-dim); }
.wc-viz { flex: none; width: 120px; height: 44px; display: grid; place-items: center; }
.wc-feed { margin-top: auto; height: 74px; overflow: hidden; padding: 0 15px; position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 26%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 26%, #000 78%, transparent); }
.wc-track { display: flex; flex-direction: column; gap: 7px; animation: scrollfeed 16s linear infinite; }
.wc-line { font-size: 11.5px; color: var(--cream-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-ag { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-right: 5px; }
@keyframes scrollfeed { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.wc-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; border-top: 1px solid var(--line); }
.autochip { font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.autochip.amber { color: var(--amber); }
.wc-open { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-decoration: none; }
.wcard:hover .wc-open { color: var(--brand); }
/* mini-viz */
.mv-bars { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.mv-bars b { width: 8px; border-radius: 2px; background: linear-gradient(180deg, var(--brand), #2c7d18); height: var(--h); transform-origin: bottom; animation: bar 2.6s ease-in-out infinite; animation-delay: var(--d); }
@keyframes bar { 0%,100% { transform: scaleY(.6); } 50% { transform: scaleY(1); } }
.mv-line { width: 120px; height: 40px; } .mv-line path { stroke: var(--brand); stroke-width: 2; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(107,230,26,.5)); }
.mv-gauge { width: 42px; height: 42px; border-radius: 50%; background: conic-gradient(var(--brand) var(--deg, 248deg), rgba(255,255,255,.08) 0); position: relative; }
.mv-gauge::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg-2, #0C0D10); }
.mv-pulse { width: 16px; height: 16px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 14px var(--brand); position: relative; }
.mv-pulse::before, .mv-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--brand); animation: ring 2.6s ease-out infinite; }
.mv-pulse::after { animation-delay: 1.3s; }
@keyframes ring { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }
@media (max-width: 900px) { .wgrid { grid-template-columns: 1fr; } }

/* ---- Tenant Entitlement Matrix ---- */
.ent-legend { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.ent-row { border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; background: linear-gradient(168deg, rgba(255,255,255,.03), rgba(0,0,0,.18)); }
.ent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.ent-tname { font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: .02em; color: var(--cream); }
.ent-tier { background: var(--bg); border: 1px solid var(--line-2); color: var(--cream); border-radius: 9px; padding: 7px 10px; font-size: 13px; font-family: var(--body); }
.ent-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ent-chip { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); background: transparent; cursor: pointer; transition: all .15s; }
.ent-chip.on { background: var(--brand); color: var(--bg); border-color: var(--brand); font-weight: 700; }
.ent-chip.ov { box-shadow: 0 0 0 2px rgba(245,166,35,.55); }
.ent-chip:hover { border-color: var(--brand); }
.head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 20px; }
.head h1 {
  font-family: var(--display); font-weight: 800; font-size: 38px; line-height: .98;
  text-transform: uppercase; letter-spacing: .4px;
  background: linear-gradient(180deg, #fff, var(--cream-dim));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.head .sub { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; margin-top: 8px; }
.live {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 11px; color: var(--brand); text-transform: uppercase; letter-spacing: .16em;
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(107,230,26,.25);
  background: rgba(107,230,26,.05); white-space: nowrap;
}
.live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(107,230,26,.5), 0 0 10px var(--brand); } 50% { box-shadow: 0 0 0 7px rgba(107,230,26,0), 0 0 10px var(--brand); } }

/* ---- shared panel surface ---- */
.kpi, .card {
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--panel) padding-box, var(--border-grad) border-box;
  box-shadow: var(--shadow);
  animation: rise .55s cubic-bezier(.2,.75,.25,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---- KPI cards ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px,1fr)); gap: 16px; margin-bottom: 28px; }
.kpi { position: relative; overflow: hidden; padding: 20px 20px 18px; transition: transform .22s ease, box-shadow .22s ease; }
.kpi::before { content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 2px; background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: .3; transition: opacity .25s; }
.kpi::after { content: ''; position: absolute; top: -50%; right: -25%; width: 190px; height: 190px; background: radial-gradient(circle, rgba(107,230,26,.12), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.kpi:hover::before { opacity: .85; }
.kpi:hover::after { opacity: 1; }
.kpi .label { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.kpi .val { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; margin-top: 12px; color: var(--cream); }
.kpi .val.brand { color: var(--brand); text-shadow: 0 0 28px rgba(107,230,26,.3); }
.kpi .val.warn { color: var(--warn); text-shadow: 0 0 24px rgba(245,166,35,.25); }
.kpi .val.amber { color: var(--amber); }
.kpi .val .dim { font-family: var(--display); }
.kpi .meta { font-size: 12px; color: var(--cream-dim); margin-top: 8px; line-height: 1.5; }

/* ---- layout grid ---- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2 .card:nth-child(2) { animation-delay: .08s; }
.kpis .kpi:nth-child(2) { animation-delay: .04s; } .kpis .kpi:nth-child(3) { animation-delay: .08s; }
.kpis .kpi:nth-child(4) { animation-delay: .12s; } .kpis .kpi:nth-child(5) { animation-delay: .16s; }
.kpis .kpi:nth-child(6) { animation-delay: .20s; } .kpis .kpi:nth-child(7) { animation-delay: .24s; } .kpis .kpi:nth-child(8) { animation-delay: .28s; }
@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
  .appbar { flex-wrap: wrap; padding: 12px 16px 10px; }
  .appbar .autoswitch-l { display: none; }
  .ticker { padding: 8px 16px; }
  .main { padding: 20px 16px 40px; }
  .head { flex-direction: column; align-items: flex-start; }
  .head h1 { font-size: 30px; }
}


/* ---- cards ---- */
.card { padding: 24px; }
.card h2 {
  font-family: var(--display); font-weight: 800; font-size: 17px; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; color: var(--cream);
}
.card h2 .count { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.card h2 .count:hover { color: var(--brand); }

/* ---- brief ---- */
.brief { white-space: pre-line; font-size: 14px; line-height: 1.75; color: var(--cream-dim); }
.brief .decision {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(245,193,108,.12), rgba(245,193,108,.02));
  border: 1px solid rgba(245,193,108,.22); color: var(--cream); font-size: 13px;
  box-shadow: 0 0 24px -12px rgba(245,193,108,.4);
}

/* ---- timeline / feed ---- */
.feed { display: flex; flex-direction: column; }
.ev { position: relative; display: grid; grid-template-columns: 86px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); transition: background .15s; }
.ev:last-child { border-bottom: 0; }
.ev:hover { background: linear-gradient(90deg, rgba(240,230,210,.025), transparent); }
.ev .when { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 1px; }
.ev .body { font-size: 13.5px; color: var(--cream-dim); line-height: 1.55; }
.ev .body b { color: var(--cream); font-weight: 600; }
.ev .tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.ev .arrow { color: var(--magenta); }

/* ---- pills ---- */
.pill {
  display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .09em; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(240,230,210,.02);
}
.pill.done { color: var(--ok); border-color: rgba(91,191,126,.4); background: rgba(91,191,126,.07); }
.pill.failed, .pill.timed_out { color: var(--red); border-color: rgba(229,72,77,.4); background: rgba(229,72,77,.07); }
.pill.skipped { color: var(--muted); }
.pill.pending { color: var(--amber); border-color: rgba(245,193,108,.4); background: rgba(245,193,108,.07); }
.pill.running { color: var(--brand); border-color: rgba(107,230,26,.4); background: rgba(107,230,26,.07); }
.pill.on { color: var(--brand); border-color: rgba(107,230,26,.4); background: rgba(107,230,26,.08); box-shadow: 0 0 12px -4px rgba(107,230,26,.5); }
.pill.off { color: var(--muted); }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--cream-dim); }
tbody tr { transition: background .14s; }
tbody tr:hover td { background: rgba(240,230,210,.022); }
td.k { color: var(--cream); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.empty { color: var(--muted); font-size: 13px; padding: 22px 4px; text-align: center; }
.mono { font-family: var(--mono); font-size: 12px; }
.dim { color: var(--muted); }

/* ---- agent switcher chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.chip {
  font-family: var(--mono); font-size: 12px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--cream-dim);
  background: linear-gradient(168deg, rgba(255,255,255,.04), rgba(0,0,0,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: background .16s, color .16s, border-color .16s, transform .16s;
}
.chip:hover { border-color: rgba(107,230,26,.4); color: var(--cream); transform: translateY(-1px); }
.chip.active { color: var(--brand); border-color: rgba(107,230,26,.45); font-weight: 700;
  background: linear-gradient(168deg, rgba(107,230,26,.14), rgba(107,230,26,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 18px -8px rgba(107,230,26,.55); }
.agentlink { color: var(--cream); border-bottom: 1px dotted var(--line-2); transition: color .15s, border-color .15s; }
.agentlink:hover { color: var(--brand); border-color: var(--brand); }
.watch { font-family: var(--mono); font-size: 11px; color: var(--muted); transition: color .15s; }
.watch:hover { color: var(--brand); }

/* ---- The Oracle console ---- */
.oracle-wrap { max-width: 780px; }
.oracle-intro { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; margin-bottom: 16px; }
.oracle-a-ic { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--matrix);
  background: radial-gradient(120% 120% at 30% 20%, rgba(107,230,26,.2), rgba(107,230,26,.04)); border: 1px solid rgba(107,230,26,.22); box-shadow: 0 0 18px -6px rgba(107,230,26,.6); }
.oracle-a-ic .oi { width: 22px; height: 22px; }
.oracle-a-ic.big { width: 52px; height: 52px; } .oracle-a-ic.big .oi { width: 28px; height: 28px; }
.oracle-intro-h { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--cream); }
.oracle-intro-s { font-size: 13.5px; color: var(--cream-dim); line-height: 1.55; margin-top: 4px; }
.oracle-intro-s b { color: var(--amber); }
.oracle-ask { display: flex; gap: 10px; align-items: stretch; margin-bottom: 20px; }
.oracle-ask textarea { flex: 1; resize: vertical; min-height: 52px; padding: 14px 16px; border-radius: 14px; color: var(--cream); font-family: var(--body); font-size: 15px;
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.oracle-ask textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107,230,26,.12); }
.oracle-ask .btn { align-self: stretch; padding-left: 28px; padding-right: 28px; }
.oracle-thread { display: flex; flex-direction: column; gap: 14px; }
.oracle-q { align-self: flex-end; max-width: 86%; padding: 12px 16px; border-radius: 14px 14px 4px 14px; color: var(--cream); font-size: 14.5px;
  background: linear-gradient(168deg, rgba(255,255,255,.06), rgba(0,0,0,.14)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.oracle-q-l { display: block; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; }
.oracle-a { display: flex; gap: 13px; align-items: flex-start; }
.oracle-a-body { flex: 1; padding: 14px 16px; border-radius: 14px 14px 14px 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  background: linear-gradient(168deg, rgba(107,230,26,.07), rgba(0,0,0,.14)); border: 1px solid rgba(107,230,26,.2); }
.oracle-a-name { font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .05em; color: var(--brand); text-transform: uppercase; margin-bottom: 5px; }
.oracle-a-txt { font-size: 14.5px; color: var(--cream); line-height: 1.6; }
.oracle-a-txt p { margin: 0 0 6px; } .oracle-a-txt p:last-child { margin-bottom: 0; }
.oracle-a-txt h4 { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .02em; color: var(--cream); margin: 12px 0 5px; }
.oracle-a-txt ul { margin: 4px 0 9px; padding-left: 18px; } .oracle-a-txt li { margin: 3px 0; }
.oracle-a-txt hr { border: 0; border-top: 1px solid var(--line-2); margin: 11px 0; }
.oracle-a-txt strong { color: #fff; font-weight: 700; }
.oracle-a-txt .md-tbl { width: 100%; margin: 8px 0 10px; border-collapse: collapse; font-size: 13.5px; }
.oracle-a-txt .md-tbl th { text-align: left; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line-2); }
.oracle-a-txt .md-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--cream); }
.oracle-a-txt .md-tbl tr:last-child td { border-bottom: 0; }
.oracle-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.oracle-suggest-l { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 11px; }
.oracle-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.oracle-chips .chip { font-family: var(--body); text-transform: none; font-size: 13px; }
.driverbody .oracle-ask { flex-direction: column; }
.driverbody .oracle-wrap { max-width: none; }

/* ---- Growth Engine controls ---- */
.growth-exports { display: flex; gap: 8px; margin: 14px 0 4px; }
.growth-exports .btn { flex: 1; text-align: center; }
.growth-stage { padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--cream-dim); font-family: var(--mono); font-size: 11px; color-scheme: dark;
  background: linear-gradient(168deg, rgba(255,255,255,.04), rgba(0,0,0,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.growth-stage:focus { outline: none; border-color: var(--brand); }
.growth-draft { padding: 13px 14px; border-radius: 13px; margin-bottom: 9px; border: 1px solid var(--line-2);
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.growth-draft-h { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.growth-draft-subj { font-family: var(--mono); font-size: 12px; color: var(--brand); margin-top: 6px; }
.growth-draft-body { font-size: 13.5px; color: var(--cream-dim); line-height: 1.5; margin-top: 5px; white-space: pre-wrap; }
.growth-draft-acts { display: flex; gap: 8px; margin-top: 11px; }
.acq-uw .acq-in { flex: 1; min-width: 0; padding: 11px; border-radius: 10px; margin-bottom: 8px; color: var(--cream); font-size: 14px; color-scheme: dark;
  background: linear-gradient(168deg, rgba(255,255,255,.04), rgba(0,0,0,.14)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.acq-uw .acq-in:focus { outline: none; border-color: var(--brand); }

/* ---- Grand Wizard global nav (dropdown) ---- */
.wnav { position: relative; }
.wnav-btn { display: grid; gap: 4px; padding: 10px; border-radius: 11px; cursor: pointer; border: 1px solid var(--line-2);
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.wnav-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--cream); transition: background .16s; }
.wnav-btn:hover span { background: var(--brand); }
.wnav-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 230px; padding: 8px; border-radius: 14px;
  background: linear-gradient(168deg, rgba(28,31,36,.98), rgba(12,13,16,.99)); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.06);
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .16s, transform .16s; }
.wnav.open .wnav-panel { opacity: 1; transform: none; pointer-events: auto; }
.wnav-sec { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.wnav-item { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px; color: var(--cream); font-family: "Saira Condensed", var(--display); font-weight: 700; font-size: 15px; }
.wnav-item:hover { background: rgba(255,255,255,.05); }
.wnav-item.on { color: var(--brand); background: rgba(107,230,26,.08); }
.wnav-ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--matrix);
  background: radial-gradient(120% 120% at 30% 20%, rgba(107,230,26,.16), rgba(107,230,26,.03)); border: 1px solid rgba(107,230,26,.16); }
.wnav-ic .oi { width: 15px; height: 15px; }
.wnav-signout { width: 100%; margin-top: 8px; padding: 10px; border-radius: 10px; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--cream-dim);
  background: rgba(240,230,210,.04); border: 1px solid var(--line-2); }
.wnav-signout:hover { color: var(--red); border-color: rgba(229,72,77,.4); }
/* return-to-wizard chip on operator surfaces (only when arrived from /wizard) */
.wizback { position: fixed; left: 16px; bottom: 16px; z-index: 9998; padding: 10px 15px; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; color: #C99BFF; text-decoration: none;
  background: linear-gradient(168deg, rgba(201,155,255,.14), rgba(0,0,0,.3)); border: 1px solid rgba(201,155,255,.45);
  box-shadow: 0 12px 30px -14px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.08); }
.wizback:hover { background: linear-gradient(168deg, rgba(201,155,255,.22), rgba(0,0,0,.25)); }
/* driver-app hamburger placement */
.dvr-head .brand .wnav.dnav { float: right; }
.dvr-d-top .wnav.dnav { margin-left: auto; }
.wnav.dnav .wnav-btn { padding: 8px; }

/* ---- Demo-site magnet (external-facing) ---- */
.demo-page { max-width: 920px; margin: 0 auto; padding: 28px 20px 60px; position: relative; z-index: 1; }
.demo-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.demo-hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 6vw, 60px); line-height: 1; text-transform: uppercase; letter-spacing: .5px; margin: 16px 0 14px;
  background: linear-gradient(180deg, #fff, var(--cream-dim)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.demo-sub { font-size: 16px; color: var(--cream-dim); line-height: 1.55; max-width: 620px; margin-bottom: 22px; }
.demo-board { margin-top: 34px; }
.demo-board .otiles { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .demo-board .otiles, .demo-board .kpis-4 { grid-template-columns: 1fr 1fr; } }

/* ---- Growth Command Center funnel ---- */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-row { display: flex; align-items: center; gap: 12px; }
.funnel-l { flex: 0 0 78px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--cream-dim); }
.funnel-bar { flex: 1; height: 30px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); overflow: hidden; }
.funnel-fill { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--brand-deep), var(--brand)); box-shadow: 0 0 16px -4px var(--brand); }
.funnel-n { flex: 0 0 44px; text-align: right; font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--cream); }

/* ---- Overview "Today on the ground" widget ---- */
.todaycard { margin-bottom: 18px; }
.ops-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.ops-pill { font-family: var(--mono); font-size: 11px; color: var(--cream-dim); padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.ops-pill b { color: var(--cream); margin-left: 4px; font-size: 12px; }
.ops-pill.enroute { border-color: rgba(107,230,26,.4); color: var(--brand); } .ops-pill.enroute b { color: var(--brand); }
.ops-pill.onsite { border-color: rgba(245,193,108,.4); color: var(--amber); } .ops-pill.onsite b { color: var(--amber); }
.ops-pill.done { color: var(--ok); border-color: rgba(91,191,126,.4); } .ops-pill.done b { color: var(--ok); }
.ops-pill.warn { color: var(--red); border-color: rgba(229,72,77,.45); } .ops-pill.warn b { color: var(--red); }
.ops-stops { display: flex; flex-direction: column; }
.ops-stop { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ops-stop:last-child { border-bottom: 0; }
.ops-time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ops-name { font-weight: 600; color: var(--cream); }
.ops-who { font-family: var(--mono); font-size: 11px; color: var(--cream-dim); text-transform: capitalize; }

/* ---- Driver earnings coach ---- */
.coach-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px;
  background: radial-gradient(150% 200% at 0% 0%, rgba(107,230,26,.16), rgba(107,230,26,.03) 55%, rgba(0,0,0,.2));
  border: 1px solid rgba(107,230,26,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.coach-hero.on-track { background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); border-color: var(--line-2); }
.coach-now, .coach-could { display: flex; flex-direction: column; }
.coach-k { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.coach-v { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--cream); }
.coach-v.brand { color: var(--brand); text-shadow: 0 0 26px rgba(107,230,26,.3); }
.coach-arrow { color: var(--brand); font-size: 22px; }
.coach-gap { flex: 1 1 100%; font-family: var(--mono); font-size: 12px; color: var(--brand); }
.coach-gap.ok { color: var(--ok); }
.coach-levers { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.coach-lever { padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line-2);
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); border-left: 3px solid var(--muted); }
.coach-lever.missing, .coach-lever.forfeited { border-left-color: var(--amber); }
.coach-lever.opportunity { border-left-color: var(--brand); }
.coach-lever-h { display: flex; justify-content: space-between; align-items: center; font-family: "Saira Condensed", var(--display); font-weight: 700; font-size: 15px; color: var(--cream); }
.coach-amt { font-family: var(--display); font-weight: 800; color: var(--brand); }
.coach-why { font-size: 12.5px; color: var(--cream-dim); line-height: 1.45; margin-top: 4px; }

/* ---- topbar / chrome ---- */
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.chrome { display: flex; align-items: center; gap: 12px; }
.search { display: flex; align-items: center; gap: 9px; padding: 10px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(240,230,210,.03); min-width: 300px; }
.search .si { color: var(--muted); font-size: 15px; }
.search input { background: none; border: 0; outline: 0; color: var(--cream); font-family: var(--body); font-size: 13px; width: 100%; }
.search input::placeholder { color: var(--muted); }
/* base button = neutral glass (secondary). Green is reserved for true CTAs
   via .btn.brand / .save / .sm.brand / .approve. */
.btn { font-family: var(--mono); font-size: 12px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream);
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.14)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: background .16s, border-color .16s, box-shadow .16s, color .16s; white-space: nowrap; cursor: pointer; }
.btn:hover { color: var(--cream); border-color: rgba(107,230,26,.32); background: linear-gradient(168deg, rgba(255,255,255,.075), rgba(0,0,0,.12)); }
.btn.brand { color: var(--bg); background: var(--brand); border-color: var(--brand); font-weight: 700; }
.btn.brand:hover { background: var(--matrix); border-color: var(--matrix); box-shadow: 0 6px 20px -8px rgba(107,230,26,.7); }
/* form fields: subtle top-light + unified green focus ring across the app */
input[type=text], input[type=number], input[type=date], input[type=email], input[type=tel], input[type=search], input[type=password], textarea, select {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
input[type=text]:focus, input[type=number]:focus, input[type=date]:focus, input[type=email]:focus, input[type=tel]:focus, input[type=search]:focus, input[type=password]:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107,230,26,.12); }

/* ---- KPI sparkline cards ---- */
.kpis-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-spark { display: flex; flex-direction: column; }
.kpi-spark .val { font-size: 34px; margin-top: 10px; }
.spark-wrap { margin-top: 14px; height: 38px; }
.spark { width: 100%; height: 38px; display: block; }
.delta { font-family: var(--mono); font-size: 11px; font-weight: 600; margin-left: 4px; white-space: nowrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--red); }
.kpi-spark .meta { margin-top: 10px; }
@media (max-width: 1120px) { .kpis-4 { grid-template-columns: repeat(2, 1fr); } }

/* ---- ministats strip ---- */
.ministats { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 28px; }
.mstat { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(240,230,210,.02); }
.mlabel { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.mval { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--cream); }
.mval.brand { color: var(--brand); } .mval.amber { color: var(--amber); }

/* ---- content rows ---- */
.row-b { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; margin-bottom: 20px; }
.row-c { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.row-b .card, .row-c .card { animation: rise .55s cubic-bezier(.2,.75,.25,1) both; }
.row-b .card:nth-child(2) { animation-delay: .06s; }
.row-c .card:nth-child(2) { animation-delay: .06s; } .row-c .card:nth-child(3) { animation-delay: .12s; }
@media (max-width: 900px) { .row-b, .row-c { grid-template-columns: 1fr; } }

/* ---- chart card ---- */
.chartcard { display: flex; flex-direction: column; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.ch-title { font-family: var(--display); font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .08em; color: var(--cream); }
.chart-val { font-family: var(--display); font-weight: 800; font-size: 27px; color: var(--brand); margin-top: 8px; text-shadow: 0 0 26px rgba(107,230,26,.25); }
.chart-val .delta { font-family: var(--mono); font-size: 12px; }
.chip-period { font-family: var(--mono); font-size: 11px; color: var(--cream-dim); padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; background: linear-gradient(168deg, rgba(255,255,255,.04), rgba(0,0,0,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); transition: color .16s, border-color .16s; cursor: pointer; }
.chip-period:hover { color: var(--cream); border-color: rgba(107,230,26,.35); }
.chip-period.on { color: var(--brand); border-color: rgba(107,230,26,.45); background: linear-gradient(168deg, rgba(107,230,26,.12), rgba(107,230,26,.02)); }
.areachart { width: 100%; height: auto; margin-top: 8px; display: block; }
.areachart .ax { fill: var(--muted); font-family: var(--mono); font-size: 10px; }
.chart-empty { color: var(--muted); padding: 48px 12px; text-align: center; }

/* ---- donut + legend ---- */
.viz { display: flex; align-items: center; gap: 20px; }
.donut { width: 146px; height: 146px; flex: 0 0 auto; }
.donut-top { fill: var(--cream); font-family: var(--display); font-weight: 800; font-size: 23px; }
.donut-sub { fill: var(--muted); font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.legend { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--cream-dim); }
.legend .dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; box-shadow: 0 0 8px -1px currentColor; }
.legend .lg-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .lg-val { font-family: var(--mono); color: var(--cream); font-size: 12px; }

/* ---- horizontal bars (top lists) ---- */
.hbars { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.hb-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.hb-row .hb-label { color: var(--cream-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-row .hb-val { font-family: var(--mono); color: var(--cream); white-space: nowrap; }
.hb-track { height: 7px; border-radius: 6px; background: rgba(240,230,210,.05); overflow: hidden; }
.hb-fill { height: 100%; border-radius: 6px; box-shadow: 0 0 12px -3px var(--brand); }
.hb-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
@media (max-width: 600px) { .viz { flex-direction: column; align-items: flex-start; } }

/* ---- sales pipeline funnel ---- */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fn-row { display: grid; grid-template-columns: 92px 1fr 32px; align-items: center; gap: 12px; }
.fn-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fn-track { height: 12px; border-radius: 6px; background: rgba(240,230,210,.05); overflow: hidden; }
.fn-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--brand-deep)); box-shadow: 0 0 14px -4px var(--brand); transition: width .4s ease; }
.fn-val { font-family: var(--mono); font-size: 12px; color: var(--cream); text-align: right; }

/* ---- ad audiences ---- */
.audiences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.aud { display: block; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: rgba(240,230,210,.02); transition: border-color .16s, transform .16s, background .16s; }
.aud:hover { border-color: var(--brand); transform: translateY(-2px); background: rgba(107,230,26,.05); }
.aud-n { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--brand); line-height: 1; }
.aud-l { font-size: 13px; color: var(--cream); margin-top: 8px; font-weight: 600; }
.aud-s { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.aud::after { content: '↓ download'; display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 10px; color: var(--brand); letter-spacing: .08em; }
@media (max-width: 760px) { .audiences { grid-template-columns: 1fr; } }

/* ---- storm watch banner ---- */
.storm-banner { margin-bottom: 20px; padding: 13px 18px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--cream);
  background: linear-gradient(135deg, rgba(245,166,35,.16), rgba(245,166,35,.03)); border: 1px solid rgba(245,166,35,.35); box-shadow: 0 0 28px -14px rgba(245,166,35,.6); }
.storm-banner b { color: var(--amber); }

/* ---- lead-flow controls (toggles + numeric caps) ---- */
.controls-card { margin-bottom: 20px; }
.controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 26px; }
.sw { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; padding-bottom: 4px; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw .track { width: 44px; height: 25px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; flex: 0 0 auto; transition: background .2s, border-color .2s; }
.sw .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--muted); transition: transform .22s, background .22s; }
.sw input:checked + .track { background: rgba(107,230,26,.22); border-color: var(--brand); }
.sw input:checked + .track::after { transform: translateX(19px); background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.sw .lbl { font-size: 13.5px; color: var(--cream-dim); }
.controls .num { display: flex; flex-direction: column; gap: 7px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.controls .num input { width: 96px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(240,230,210,.03); color: var(--cream); font-family: var(--display); font-size: 22px; font-weight: 800; }
.controls .num input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107,230,26,.12); }

/* ---- Dispatch board (drag-and-drop) -------------------------------------- */
.dateinput {
  background: var(--surface-2); color: var(--cream); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 8px 12px; font-family: var(--mono); font-size: 13px;
  color-scheme: dark; cursor: pointer;
}
.dateinput:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107,230,26,.12); }
.board {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
}
.col {
  flex: 0 0 300px; min-width: 280px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; scroll-snap-align: start;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.col.over { border-color: var(--brand); box-shadow: var(--shadow-hover); background: linear-gradient(168deg, rgba(47,52,60,.96), rgba(20,24,28,.96)); }
.col-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 13px 15px; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em;
  font-size: 15px; color: var(--cream); border-bottom: 1px solid var(--line);
}
.col-count {
  font-family: var(--mono); font-size: 12px; color: var(--bg); background: var(--brand);
  border-radius: 999px; min-width: 22px; text-align: center; padding: 2px 7px; font-weight: 600;
}
.col-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; flex: 1; }
.jobcard {
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 12px; cursor: grab; transition: transform .12s ease, box-shadow .12s ease, border-color .2s ease, background .4s ease;
}
.jobcard:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -14px rgba(0,0,0,.8); }
.jobcard:active { cursor: grabbing; }
.jobcard.dragging { opacity: .45; }
.jobcard.saved { border-color: var(--brand); background: rgba(107,230,26,.10); }
.jc-cust { font-weight: 600; color: var(--cream); font-size: 14px; }
.jc-meta { font-family: var(--mono); font-size: 11px; color: var(--brand); margin-top: 3px; text-transform: capitalize; }
.jc-addr { font-size: 12px; color: var(--cream-dim); margin-top: 4px; }
.jc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.jc-price { font-family: var(--mono); font-size: 13px; color: var(--cream); font-weight: 600; }

@media (max-width: 760px) {
  .board { gap: 10px; }
  .col { flex: 0 0 84vw; min-width: 84vw; }
}

/* ---- New Booking page ---- */
.booking-wrap { display: grid; grid-template-columns: 460px 1fr; gap: 20px; align-items: start; }
.booking-card { display: flex; justify-content: center; padding: 22px; }
.booking-card #binmatic-booking .bmw { max-width: 100%; box-shadow: none; }
.booking-note .brief { font-size: 13.5px; }
@media (max-width: 900px) { .booking-wrap { grid-template-columns: 1fr; } }

/* ---- Autonomy: mode switch ---- */
.modeswitch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.modeopt {
  position: relative; display: flex; flex-direction: column; gap: 6px; cursor: pointer;
  padding: 16px 16px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,.01) 58%, rgba(0,0,0,.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: border-color .18s, background .18s, box-shadow .18s, transform .16s;
}
.modeopt input { position: absolute; opacity: 0; pointer-events: none; }
.modeopt .mo-label { font-family: var(--display); font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .04em; color: var(--cream-dim); }
.modeopt .mo-blurb { font-size: 12px; color: var(--muted); line-height: 1.45; }
.modeopt:hover { border-color: rgba(107,230,26,.3); transform: translateY(-1px); }
.modeopt.on { border-color: var(--brand); background: linear-gradient(160deg, rgba(107,230,26,.12), rgba(107,230,26,.02)); box-shadow: 0 0 0 1px rgba(107,230,26,.25), 0 0 26px -12px rgba(107,230,26,.5); }
.modeopt.on .mo-label { color: var(--brand); }
.modeopt.auto.on { box-shadow: 0 0 0 1px rgba(107,230,26,.35), 0 0 32px -10px rgba(107,230,26,.6); }

/* mode badge (who drives a setting) */
.mbadge { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line-2); }
.mbadge.auto { color: var(--brand); border-color: rgba(107,230,26,.4); background: rgba(107,230,26,.08); }
.mbadge.semi { color: var(--amber); border-color: rgba(245,193,108,.4); background: rgba(245,193,108,.08); }
.mbadge.manual { color: var(--cream-dim); }
.mbadge.you { color: var(--muted); }

/* ---- Schedule: Board/Week view toggle + week calendar ---- */
.viewtog { display: inline-flex; gap: 0; margin-bottom: 16px; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.viewtog a { padding: 8px 18px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--cream-dim); }
.viewtog a.on { background: var(--brand); color: var(--bg); font-weight: 700; }
.viewtog a:not(.on):hover { background: rgba(240,230,210,.05); color: var(--cream); }
.schweek { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.schcol { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; flex-direction: column; min-height: 200px; }
.schcol.today { border-color: rgba(107,230,26,.4); box-shadow: 0 0 0 1px rgba(107,230,26,.2); }
.sch-head { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sch-dow { font-family: var(--display); font-weight: 800; font-size: 14px; text-transform: uppercase; color: var(--cream); }
.sch-date { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.sch-n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--bg); background: var(--brand); border-radius: 999px; min-width: 20px; text-align: center; padding: 1px 6px; }
.schcol .sch-head .sch-n:empty, .sch-n { font-weight: 600; }
.sch-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sch-empty { color: var(--muted); text-align: center; padding: 12px 0; font-family: var(--mono); font-size: 12px; }
.schjob { background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--muted); border-radius: 8px; padding: 8px 9px; }
.schjob.t-deliver { border-left-color: var(--brand); }
.schjob.t-pickup { border-left-color: var(--amber); }
.schjob.t-swap { border-left-color: var(--magenta); }
.schjob.t-dump { border-left-color: #3DD6C4; }
.sj-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sj-type { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--cream-dim); }
.sj-price { font-family: var(--mono); font-size: 12px; color: var(--cream); font-weight: 600; }
.sj-cust { font-weight: 600; font-size: 13px; color: var(--cream); margin-top: 4px; }
.sj-addr { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.sj-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; }
.sj-drv { font-family: var(--mono); font-size: 10px; color: var(--brand); }
@media (max-width: 1000px) { .schweek { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78vw; overflow-x: auto; } }

/* ---- Schedule filter bar ---- */
.schfilter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.schfilter select { background: linear-gradient(168deg, rgba(255,255,255,.04), rgba(0,0,0,.12)); color: var(--cream); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 11px; font-family: var(--mono); font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); cursor: pointer; transition: border-color .16s; }
.schfilter select:hover { border-color: rgba(107,230,26,.3); }
.schfilter select:focus { outline: none; border-color: var(--brand); }
.schfilter .clearf { font-family: var(--mono); font-size: 11px; color: var(--amber); text-transform: uppercase; letter-spacing: .06em; }
.schfilter .clearf:hover { color: var(--cream); }

/* ---- Live Map ---- */
.maptabs { display: inline-flex; gap: 4px; margin-bottom: 14px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.maptabs a { padding: 7px 16px; border-radius: 999px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--cream-dim); cursor: pointer; }
.maptabs a.on { background: var(--brand); color: var(--bg); font-weight: 700; }
.maptabs a.off { color: var(--muted); cursor: not-allowed; }
.maplayout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; }
.maplist { max-height: 600px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.mapitem { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; gap: 11px; align-items: flex-start; }
.mi-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--bg); font-family: var(--mono); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.mi-main { flex: 1; min-width: 0; }
.mi-title { font-weight: 600; color: var(--cream); font-size: 13.5px; text-transform: capitalize; }
/* leaflet div-icon route pins (glowing, theme-consistent) */
.mappin { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 10px; color: #08090A; border: 1.5px solid rgba(0,0,0,.55); }
.mappin.base { width: 22px; height: 22px; background: var(--cream); color: #08090A; font-size: 9px; font-weight: 800; box-shadow: 0 0 10px rgba(242,233,214,.55); }
.mappin.pos { width: 18px; height: 18px; background: #22FF88; border: 3px solid #06210a; box-shadow: 0 0 16px #22FF88, 0 0 30px #22FF88; animation: pospulse 1.2s ease-in-out infinite; }
@keyframes pospulse { 0%,100% { box-shadow: 0 0 14px #22FF88, 0 0 26px #22FF88; } 50% { box-shadow: 0 0 22px #22FF88, 0 0 44px #22FF88; } }
.maplegend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 14px; font-size: 12px; color: var(--cream-dim); font-family: var(--mono); }
.legdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--tc, #888); box-shadow: 0 0 8px var(--tc); margin-right: 6px; vertical-align: middle; }
.mi-title .legdot { margin-right: 7px; }
.mi-addr { font-size: 12px; color: var(--muted); margin: 4px 0 7px; }
.mi-foot { display: flex; align-items: center; gap: 8px; }
.opsmap { height: 600px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.opsmap .leaflet-popup-content-wrapper, .opsmap .leaflet-popup-tip { background: var(--surface-2); color: var(--cream); }
.opsmap .leaflet-popup-content { font-family: var(--body); font-size: 12.5px; }
@media (max-width: 900px) { .maplayout { grid-template-columns: 1fr; } .opsmap { height: 420px; } .maplist { max-height: 260px; } }

/* ---- Job tags (chips + inline editor) ---- */
.jtags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
/* matrix-terminal tags: glowing mono text on a near-black chip, sharp corners,
   inset color glow + a blinking caret. Per-tag color via --tc (data-k), set by
   a per-tenant <style> block so colors stay customizable. */
.jtag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em;
  padding: 4px 9px; border-radius: 3px; white-space: nowrap; --tc: #9AA7B4;
  color: color-mix(in srgb, var(--tc) 100%, #fff 18%);
  text-shadow: 0 0 7px color-mix(in srgb, var(--tc) 70%, transparent);
  background: linear-gradient(color-mix(in srgb, var(--tc) 9%, #04060a), #04060a);
  border: 1px solid color-mix(in srgb, var(--tc) 100%, transparent 52%);
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--tc) 16%, transparent), 0 0 7px color-mix(in srgb, var(--tc) 18%, transparent);
}
.jcur { font-style: normal; color: var(--tc); text-shadow: 0 0 7px var(--tc); }
/* "worth noting" items (obstacles + note) just glow harder — no blinking */
.jtag.obstacle { box-shadow: inset 0 0 14px color-mix(in srgb, var(--tc) 24%, transparent), 0 0 11px color-mix(in srgb, var(--tc) 26%, transparent); border-color: color-mix(in srgb, var(--tc) 100%, transparent 35%); }
.jtag.note { --tc: #F5C16C; }
/* tag-color editor (Settings) */
.tagcolform .tcgrp { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 10px 0; }
.tagcolform .tcgrp .tg-h { width: 100%; }
.tcrow { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.tcrow input[type=color] { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line-2); border-radius: 7px; background: none; cursor: pointer; }
.tagcolform .btn { margin-top: 14px; }
.tagedit { margin-top: 8px; }
.tagedit summary { font-family: var(--mono); font-size: 11px; color: var(--muted); cursor: pointer; text-transform: uppercase; letter-spacing: .06em; }
.tagedit summary:hover { color: var(--cream); }
.tagedit[open] { background: rgba(240,230,210,.02); border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.tg-grp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.tg-h { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); width: 100%; }
.tgopt { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--cream-dim); cursor: pointer; }
.tgopt.obstacle { color: var(--red); }
.tg-note { width: 100%; margin: 6px 0 8px; padding: 7px 10px; background: var(--surface-2); color: var(--cream); border: 1px solid var(--line-2); border-radius: 7px; font-size: 12px; }

/* ---- Driver app — matched to the desktop "mission-control" design language ---- */
.driverbody { background: var(--bg); --brand2: var(--matrix); }
.driverbody::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1000px 560px at 50% -8%, rgba(107,230,26,.06), transparent 60%),
    linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: 100% 100%, 46px 46px, 46px 46px; }
.driverapp { max-width: 540px; margin: 0 auto; padding: 18px 14px 48px; position: relative; z-index: 1; }
/* Wide mode: the Grand Wizard surfaces become a true desktop layout on big
   screens (the field-driver app stays phone-shaped). */
@media (min-width: 880px) {
  .driverapp.wide { max-width: 1140px; padding: 30px 32px 72px; }
  .driverapp.wide .dvr-kpis { grid-template-columns: repeat(4, 1fr); }
  .driverapp.wide .otiles { grid-template-columns: repeat(3, 1fr); }
  .driverapp.wide .dvr-rows { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; align-content: start; }
  .driverapp.wide .dvr-d-hero .dvr-cust { font-size: 34px; }
  .driverapp.wide .oracle-ask { max-width: 760px; }
  .driverapp.wide .funnel { max-width: 760px; }
  .driverapp.wide .growth-exports { max-width: 760px; }
  .driverapp.wide .dvr-wz-new { max-width: 760px; }
}
@media (min-width: 1180px) { .driverapp.wide .dvr-kpis { grid-template-columns: repeat(4, 1fr); } .driverapp.wide .otiles { grid-template-columns: repeat(4, 1fr); } }
.dvr-head { padding: 6px 2px 14px; }
.dvr-head .brand { font-family: var(--mono); font-weight: 700; font-size: 24px; color: var(--matrix); text-transform: lowercase; letter-spacing: -.5px; text-shadow: 0 0 18px rgba(61,241,75,.55), 0 0 44px rgba(61,241,75,.22); }
.dvr-sub { font-family: "Saira Condensed", var(--display); font-weight: 800; font-size: 14px; color: var(--cream-dim); letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; }
.dvr-datenav { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.dvr-datenav a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); border: 1px solid var(--line-2); color: var(--cream); font-size: 20px; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: border-color .16s, transform .12s; }
.dvr-datenav a:hover { border-color: rgba(107,230,26,.35); }
.dvr-datenav a:active { transform: translateY(1px) scale(.97); }
.dvr-datenav input { flex: 1; padding: 11px 12px; border-radius: 12px; background: linear-gradient(168deg, rgba(255,255,255,.04), rgba(0,0,0,.14)); border: 1px solid var(--line-2); color: var(--cream); font-family: var(--mono); font-size: 14px; color-scheme: dark; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.dvr-btn.call.disabled { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); cursor: default; }
.dvr-list { display: flex; flex-direction: column; gap: 10px; }
.dvr-pick { display: block; padding: 18px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line-2); color: var(--cream); font-size: 17px; font-weight: 600; }
.dvr-jobs { display: flex; flex-direction: column; gap: 16px; }
.dvr-job { background: linear-gradient(180deg, #15171B, #101216); border: 1px solid var(--line-2); border-left: 4px solid var(--brand); border-radius: 4px; padding: 18px; box-shadow: 0 0 0 1px rgba(93,219,20,.05), 0 16px 40px -20px rgba(0,0,0,.85), 0 0 26px -16px rgba(93,219,20,.4); }
.dvr-job.onsite { border-left-color: var(--amber); }
.dvr-job.done { border-left-color: var(--ok); opacity: .66; }
.dvr-job-top { display: flex; align-items: center; gap: 10px; }
.dvr-time { font-family: "Saira Condensed", var(--display); font-weight: 800; font-size: 16px; color: var(--brand); letter-spacing: .03em; text-shadow: 0 0 12px rgba(93,219,20,.4); }
.dvr-type { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--cream-dim); }
.dvr-badge { margin-left: auto; font-family: var(--mono); font-size: 10px; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.dvr-badge.done { color: var(--ok); border: 1px solid rgba(91,191,126,.4); } .dvr-badge.on { color: var(--amber); border: 1px solid rgba(245,193,108,.4); }
.dvr-cust { font-family: "Saira Condensed", Impact, sans-serif; font-weight: 400; font-size: 26px; line-height: 1; color: var(--cream); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .01em; }
.dvr-addr { display: block; font-size: 15px; color: #7FB3FF; padding: 6px 0; }
/* SiteVision placement panel — premium green-tinted, sharp */
.dvr-place { margin: 12px 0; padding: 14px; border-radius: 6px; background: linear-gradient(135deg, rgba(93,219,20,.10), rgba(93,219,20,.02)); border: 1px solid rgba(93,219,20,.35); box-shadow: inset 0 0 0 1px rgba(93,219,20,.05); }
.dvr-place-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dvr-place-eye { font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--brand2); }
.dvr-place-sat { font-family: var(--mono); font-size: 12px; color: var(--brand); font-weight: 600; }
.dvr-place-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.dvr-place-grid .dpl { display: block; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.dvr-place-grid .dpv { display: block; font-size: 13px; color: var(--cream); margin-top: 2px; line-height: 1.3; font-weight: 600; }
.dvr-place-photo { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--brand); }
.dvr-warn { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.dvr-ob { background: rgba(255,45,85,.16); border: 1px solid rgba(255,45,85,.5); color: #FF6B7E; font-weight: 700; font-size: 12px; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; }
.dvr-note { font-size: 13px; color: var(--amber); margin: 4px 0; }
.dvr-actions { display: flex; gap: 10px; margin-top: 12px; }
.dvr-btn { flex: 1; text-align: center; padding: 15px; border-radius: 13px; font-size: 16px; font-weight: 700; border: 0; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, border-color .16s; }
.dvr-btn:active { transform: translateY(1px) scale(.99); }
.dvr-btn.call { background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); color: var(--cream); border: 1px solid var(--line-2); font-family: var(--mono); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.dvr-btn.call:hover { border-color: rgba(107,230,26,.32); }
.dvr-btn.arrive { background: linear-gradient(180deg, #FFD884, var(--amber)); color: #2a1d00; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 24px -14px rgba(245,193,108,.6); }
.dvr-btn.complete { background: linear-gradient(180deg, var(--matrix), var(--brand)); color: #06210a; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 12px 28px -14px rgba(107,230,26,.55); }
.dvr-photo { display: block; margin-top: 12px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 10px; text-align: center; font-size: 13px; color: var(--cream-dim); cursor: pointer; }
.dvr-photo.has { border-color: var(--brand); color: var(--brand); }

/* ---- Driver: compact day list (tap a row to open the job) ---- */
.dvr-rows { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.dvr-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16));
  border: 1px solid var(--line-2); border-left: 3px solid var(--brand);
  color: var(--cream); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 22px -18px rgba(0,0,0,.9);
  transition: border-color .16s, box-shadow .16s, transform .12s ease; }
.dvr-row:active { transform: translateY(1px) scale(.99); }
.dvr-row:hover { border-color: rgba(107,230,26,.3); border-left-color: var(--brand); }
.dvr-row.onsite { border-left-color: var(--amber); }
.dvr-row.done { border-left-color: var(--ok); opacity: .55; }
.dvr-row-seq { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(93,219,20,.12); border: 1px solid rgba(93,219,20,.4); color: var(--brand2);
  font-family: var(--mono); font-size: 12px; font-weight: 700; }
.dvr-row.done .dvr-row-seq { background: rgba(91,191,126,.12); border-color: rgba(91,191,126,.4); color: var(--ok); }
.dvr-row-mid { flex: 1; min-width: 0; }
.dvr-row-name { display: block; font-family: "Saira Condensed", Impact, sans-serif; font-size: 16px;
  line-height: 1.05; color: var(--cream); text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dvr-row-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-family: var(--mono); font-size: 11px; color: var(--cream-dim); }
.dvr-row-warn { color: #FF6B7E; font-weight: 700; }
.dvr-row-end { flex: none; display: flex; align-items: center; gap: 8px; }
.dvr-row-chev { font-size: 22px; color: var(--muted); line-height: 1; }
.dvr-dot { font-size: 13px; color: var(--muted); } .dvr-dot.on { color: var(--amber); } .dvr-dot.done { color: var(--ok); }
.dvr-chip { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; padding: 3px 8px; border-radius: 4px; background: rgba(93,219,20,.14); border: 1px solid rgba(93,219,20,.45); color: var(--brand2); }
.dvr-chip.t-deliver { background: rgba(168,85,247,.16); border-color: rgba(168,85,247,.5); color: #C99BFF; }
.dvr-chip.t-pickup { background: rgba(93,219,20,.14); border-color: rgba(93,219,20,.45); color: var(--brand2); }
.dvr-chip.t-swap, .dvr-chip.t-dump { background: rgba(255,45,85,.16); border-color: rgba(255,45,85,.5); color: #FF6B7E; }

/* ---- Driver: job detail (revealed on open) ---- */
.dvr-d-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dvr-back { font-family: var(--mono); font-size: 14px; color: var(--brand); font-weight: 700; }
.dvr-badge.enroute { color: var(--brand2); border: 1px solid rgba(93,219,20,.4); }
.dvr-badge.onsite { color: var(--amber); border: 1px solid rgba(245,193,108,.4); }
.dvr-badge.done { color: var(--ok); border: 1px solid rgba(91,191,126,.4); }
.dvr-d-hero { margin-bottom: 16px; }
.dvr-d-hero .dvr-cust { margin: 10px 0 4px; font-size: 30px; }
.dvr-d-when { font-family: "Saira Condensed", var(--display); font-weight: 800; font-size: 16px; color: var(--brand);
  letter-spacing: .03em; text-shadow: 0 0 12px rgba(93,219,20,.4); }
.dvr-d-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.dvr-act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-family: var(--mono);
  font-size: 11px; font-weight: 600; cursor: pointer; text-align: center; }
.dvr-act b { font-size: 19px; line-height: 1; font-weight: 400; }
.dvr-act.disabled { opacity: .4; cursor: default; }
.dvr-d-card { background: linear-gradient(180deg, #15171B, #101216); border: 1px solid var(--line-2); border-radius: 6px;
  padding: 4px 16px; margin: 14px 0; }
.dvr-d-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dvr-d-row:last-child { border-bottom: 0; }
.dvr-d-l { flex: none; width: 84px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding-top: 2px; }
.dvr-d-v { flex: 1; font-size: 14px; color: var(--cream); line-height: 1.4; }
.dvr-d-v a { color: #7FB3FF; }
.dvr-tag { display: inline-block; margin: 0 6px 6px 0; font-family: var(--mono); font-size: 11px; padding: 3px 9px;
  border-radius: 5px; background: rgba(93,219,20,.1); border: 1px solid rgba(93,219,20,.3); color: var(--brand2); }
.dvr-actions.big { margin-top: 16px; }
.dvr-actions.big .dvr-btn { padding: 18px; font-size: 17px; }
.dvr-btn.complete.done { background: rgba(91,191,126,.16); color: var(--ok); border: 1px solid rgba(91,191,126,.4); cursor: default; }
.dvr-badge.cancelled { color: #FF6B7E; border: 1px solid rgba(255,45,85,.45); }
.dvr-note.cancel { color: #FF6B7E; }

/* ---- Driver: admin tier (tabs, finance, timeline, cancel sheet, edit) ---- */
.dvr-tabs { display: flex; gap: 4px; margin-bottom: 14px; padding: 5px; border-radius: 12px;
  background: linear-gradient(168deg, rgba(255,255,255,.035), rgba(0,0,0,.16)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.dvr-tab { flex: 1; padding: 10px 4px; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--cream-dim);
  font-family: var(--mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; transition: color .16s, background .16s, border-color .16s; }
.dvr-tab.on { color: var(--brand); border-color: var(--line-2); background: linear-gradient(168deg, rgba(255,255,255,.06), rgba(0,0,0,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.dvr-fin-head { background: linear-gradient(180deg, #15171B, #101216); border: 1px solid var(--line-2); border-radius: 6px; padding: 16px; margin-bottom: 14px; }
.dvr-fin-name { font-family: "Saira Condensed", Impact, sans-serif; font-size: 18px; color: var(--cream); text-transform: uppercase; margin-bottom: 12px; }
.dvr-fin-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; color: var(--cream-dim); border-bottom: 1px solid var(--line); }
.dvr-fin-row b { color: var(--cream); font-family: var(--mono); }
.dvr-fin-row.balance { border-bottom: 0; font-size: 17px; } .dvr-fin-row.balance b { color: var(--brand); }
.dvr-fin-head .dvr-btn { width: 100%; margin-top: 12px; }
.dvr-d-card.tl { padding: 8px 16px; }
.dvr-tl { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dvr-tl:last-child { border-bottom: 0; }
.dvr-tl-ic { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(93,219,20,.1); border: 1px solid rgba(93,219,20,.3); color: var(--brand2); font-family: var(--mono); font-size: 13px; }
.dvr-tl.call .dvr-tl-ic { background: rgba(245,193,108,.12); border-color: rgba(245,193,108,.35); color: var(--amber); }
.dvr-tl-body { flex: 1; min-width: 0; }
.dvr-tl-top { display: flex; justify-content: space-between; gap: 8px; }
.dvr-tl-top b { font-size: 14px; color: var(--cream); }
.dvr-tl-when { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.dvr-tl-txt { font-size: 14px; color: var(--cream-dim); margin-top: 3px; line-height: 1.4; }
.dvr-note-compose { display: flex; gap: 8px; margin-top: 12px; }
.dvr-note-compose input { flex: 1; padding: 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 15px; }
.dvr-note-compose button { flex: none; width: 50px; border-radius: 10px; background: var(--brand); color: var(--bg); border: 0; font-size: 18px; cursor: pointer; }
.dvr-edit { display: flex; flex-direction: column; gap: 12px; }
.dvr-fld { display: flex; flex-direction: column; gap: 5px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.dvr-fld input, .dvr-fld select, .dvr-fld textarea { padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 15px; font-family: inherit; color-scheme: dark; }
.dvr-edit .dvr-btn { margin-top: 4px; }
.dvr-cancel-btn { width: 100%; margin-top: 16px; padding: 14px; border-radius: 11px; background: rgba(255,45,85,.1); border: 1px solid rgba(255,45,85,.4); color: #FF6B7E; font-size: 15px; font-weight: 700; cursor: pointer; }
.dvr-sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.7); display: flex; align-items: flex-end; }
.dvr-sheet[hidden] { display: none; }
.dvr-sheet-card { width: 100%; max-width: 540px; margin: 0 auto; max-height: 82vh; display: flex; flex-direction: column;
  background: #101216; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 16px 16px 0 0; padding: 16px; }
.dvr-sheet-head { display: flex; justify-content: space-between; align-items: center; font-family: "Saira Condensed", var(--display);
  font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .1em; color: var(--cream); margin-bottom: 12px; }
.dvr-sheet-head button { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.dvr-sheet-card > input { padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 15px; margin-bottom: 8px; }
.dvr-reasons { overflow-y: auto; display: flex; flex-direction: column; }
.dvr-reason { display: flex; justify-content: space-between; align-items: center; padding: 15px 6px; background: none; border: 0;
  border-bottom: 1px solid var(--line); color: var(--cream); font-size: 16px; text-align: left; cursor: pointer; }
.dvr-reason span { color: var(--muted); }

/* ---- Driver: admin customer console + invoice builder ---- */
.dvr-role { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--bg);
  background: var(--brand); padding: 2px 7px; border-radius: 4px; }
.dvr-customers-link { display: block; margin: 12px 0 4px; padding: 13px 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(93,219,20,.14), rgba(93,219,20,.03)); border: 1px solid rgba(93,219,20,.4);
  color: var(--brand2); font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.dvr-search { display: flex; gap: 8px; margin-top: 12px; }
.dvr-search input { flex: 1; padding: 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 15px; }
.dvr-search button { flex: none; width: 50px; border-radius: 10px; background: var(--brand); color: var(--bg); border: 0; font-size: 18px; cursor: pointer; }
.dvr-mini { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--cream); }
.dvr-mini:last-child { border-bottom: 0; }
.dvr-mini .dim { font-family: var(--mono); font-size: 12px; }
.dvr-lines { background: linear-gradient(180deg, #15171B, #101216); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 14px; }
.dvr-line { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dvr-line:last-child { border-bottom: 0; }
.dvr-line-d { flex: 1; min-width: 0; font-size: 14px; color: var(--cream); }
.dvr-line-amt { font-family: var(--mono); font-size: 14px; color: var(--cream); white-space: nowrap; }
.dvr-qty { display: flex; align-items: center; gap: 8px; }
.dvr-qty button { width: 26px; height: 26px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 16px; line-height: 1; cursor: pointer; }
.dvr-qty b { font-family: var(--mono); font-size: 14px; min-width: 16px; text-align: center; }
.dvr-line-x { background: none; border: 0; color: var(--muted); font-size: 14px; cursor: pointer; }
.dvr-totals { background: linear-gradient(180deg, #15171B, #101216); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 16px; margin: 12px 0; }
.dvr-totals .dvr-fin-row span { display: flex; align-items: center; gap: 8px; }
.dvr-totals input { width: 64px; padding: 6px 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 13px; }
.dvr-custom input { width: 100%; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 15px; margin-bottom: 8px; }
.dvr-custom .frow { display: flex; gap: 8px; }
.dvr-custom .frow input { margin: 0; }
.dvr-custom .frow button { flex: none; padding: 0 18px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--brand); color: var(--brand2); font-weight: 700; cursor: pointer; }
.dvr-cat-grp { margin-bottom: 14px; }
.dvr-cat-h { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }
.dvr-cat-item { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 13px 14px; margin-bottom: 6px;
  border-radius: 8px; background: linear-gradient(180deg, #15171B, #101216); border: 1px solid var(--line-2); color: var(--cream); font-size: 15px; cursor: pointer; text-align: left; }
.dvr-cat-item span { font-family: var(--mono); font-size: 13px; color: var(--brand2); white-space: nowrap; }
.dvr-cat-item:active { border-color: var(--brand); }
.dvr-send { background: var(--brand); color: var(--bg); border: 0; border-radius: 6px; padding: 3px 10px; font-weight: 700; font-size: 11px; cursor: pointer; margin-left: 4px; }
.dvr-sendnow { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 13px; color: var(--cream-dim); }
.dvr-sendnow input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ---- Auth: login ---- */
.dvr-login { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.dvr-login .dvr-btn { margin-top: 6px; }
.dvr-login-err { background: rgba(255,45,85,.12); border: 1px solid rgba(255,45,85,.4); color: #FF6B7E; padding: 11px 14px; border-radius: 10px; font-size: 14px; }
.dvr-login-hint { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.dvr-logout { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 7px; padding: 5px 10px; cursor: pointer; }

/* ---- Authority cascade: owner tier + Grand Wizard ---- */
.dvr-role.owner { background: #C99BFF; color: #1a0a2e; }
.dvr-role.wizard { background: linear-gradient(90deg,#7BFF2B,#C99BFF); color: #0A0A0B; letter-spacing: .1em; }
.dvr-owner-switch { display: flex; align-items: center; gap: 6px; margin: 12px 0 8px; padding: 5px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); }
.dvr-os-label { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0 4px; }
.dvr-os { flex: 1; padding: 9px 4px; border-radius: 8px; background: none; border: 0; color: var(--cream-dim); font-family: var(--mono); font-size: 11px; font-weight: 700; cursor: pointer; }
.dvr-os.on { background: var(--brand); color: var(--bg); box-shadow: 0 0 14px -4px rgba(93,219,20,.6); }
/* Owner home: the one glowing object — everything else recedes around it. */
.dvr-needsyou { display: flex; align-items: center; gap: 14px; margin: 16px 0 6px; padding: 16px 18px; text-decoration: none;
  position: relative; overflow: hidden; border-radius: 18px; color: var(--cream);
  background: radial-gradient(150% 200% at 0% 0%, rgba(107,230,26,.20), rgba(107,230,26,.035) 55%, rgba(0,0,0,.22));
  border: 1px solid rgba(107,230,26,.45);
  box-shadow: 0 18px 46px -26px rgba(107,230,26,.55), inset 0 1px 0 rgba(255,255,255,.08); transition: transform .16s ease, box-shadow .2s ease; }
.dvr-needsyou:active { transform: translateY(1px) scale(.99); }
.dvr-needsyou .ny-n { flex: 0 0 auto; min-width: 48px; height: 48px; padding: 0 9px; display: grid; place-items: center; border-radius: 13px;
  background: linear-gradient(180deg, var(--matrix), var(--brand)); color: #06210a; font-family: var(--display); font-weight: 800; font-size: 25px; line-height: 1;
  box-shadow: 0 0 24px -4px rgba(107,230,26,.8), inset 0 1px 0 rgba(255,255,255,.4); }
.dvr-needsyou .ny-t { font-family: "Saira Condensed", var(--display); font-weight: 700; font-size: 18px; letter-spacing: .03em; color: var(--cream); }
.dvr-needsyou .ny-arw { margin-left: auto; color: var(--brand); font-size: 22px; }
.dvr-needsyou:not(.has) { background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.18)); border-color: var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.dvr-needsyou:not(.has) .ny-arw { color: var(--cream-dim); }

/* Owner home: refined nav — icon tiles with depth, accent held in reserve. */
.ogroup { margin-top: 20px; }
.ogroup-h { display: flex; align-items: center; gap: 11px; margin: 0 2px 11px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ogroup-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.otiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.otile { position: relative; display: flex; align-items: center; gap: 11px; padding: 13px; border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--cream);
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16));
  border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 22px -18px rgba(0,0,0,.9);
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease; }
.otile:active { transform: translateY(1px) scale(.985); }
.otile:hover { border-color: rgba(107,230,26,.32); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 12px 26px -16px rgba(0,0,0,.95); }
.otile-ic { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--matrix);
  background: radial-gradient(120% 120% at 30% 20%, rgba(107,230,26,.16), rgba(107,230,26,.03)); border: 1px solid rgba(107,230,26,.16); }
.otile-ic .oi { width: 18px; height: 18px; }
.otile-l { font-family: "Saira Condensed", var(--display); font-weight: 700; font-size: 15px; letter-spacing: .02em; line-height: 1.05; color: var(--cream); }
.otile-n { margin-left: auto; min-width: 21px; height: 21px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px;
  background: var(--brand); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 700; box-shadow: 0 0 12px -3px rgba(107,230,26,.7); }
.dvr-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dvr-kpi { position: relative; overflow: hidden; padding: 15px 16px; border-radius: 14px;
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16));
  border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 22px -18px rgba(0,0,0,.9); }
.dvr-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dvr-kpi-l { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); line-height: 1.3; }
.dvr-kpi-ic { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--muted);
  background: rgba(240,230,210,.03); border: 1px solid transparent; }
.dvr-kpi-ic .oi { width: 15px; height: 15px; }
.dvr-kpi-ic.on { color: var(--matrix); border-color: rgba(107,230,26,.2);
  background: radial-gradient(120% 120% at 30% 20%, rgba(107,230,26,.18), rgba(107,230,26,.03)); box-shadow: 0 0 14px -6px rgba(107,230,26,.6); }
.dvr-kpi-v { font-family: "Saira Condensed", var(--display); font-weight: 800; font-size: 30px; color: var(--cream); margin-top: 10px; line-height: 1; }
.dvr-kpi-v.brand { color: var(--brand); text-shadow: 0 0 26px rgba(107,230,26,.28); } .dvr-kpi-v.amber { color: var(--amber); }
.dvr-kpi-s { font-family: var(--mono); font-size: 10px; color: var(--cream-dim); margin-top: 6px; }
/* featured revenue card — full-width hero stat with ambient glow */
.dvr-kpi.feat { margin-bottom: 10px; padding: 18px 18px 16px; }
.dvr-kpi.feat::after { content: ''; position: absolute; top: -40%; right: -20%; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(107,230,26,.14), transparent 70%); pointer-events: none; }
.dvr-kpi.feat .feat-v { font-size: 46px; margin-top: 8px; }
/* premium primary action — glass tile-link (green held to icon + arrow) */
.dvr-cta { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 16px 18px; border-radius: 16px; text-decoration: none;
  color: var(--cream); background: linear-gradient(168deg, rgba(255,255,255,.06), rgba(255,255,255,.012) 58%, rgba(0,0,0,.18));
  border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 30px -18px rgba(0,0,0,.95);
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease; }
.dvr-cta:active { transform: translateY(1px) scale(.99); }
.dvr-cta:hover { border-color: rgba(107,230,26,.32); }
.dvr-cta-ic { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--matrix);
  background: radial-gradient(120% 120% at 30% 20%, rgba(107,230,26,.18), rgba(107,230,26,.03)); border: 1px solid rgba(107,230,26,.2); box-shadow: 0 0 16px -6px rgba(107,230,26,.6); }
.dvr-cta-ic .oi { width: 19px; height: 19px; }
.dvr-cta-l { font-family: "Saira Condensed", var(--display); font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.dvr-cta-arw { margin-left: auto; color: var(--brand); font-size: 22px; }
.dvr-killswitch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 10px;
  background: rgba(255,45,85,.06); border: 1px solid rgba(255,45,85,.3); }
.dvr-killswitch.on { background: rgba(255,45,85,.16); border-color: rgba(255,45,85,.6); }
.dvr-ks-t { font-family: "Saira Condensed", var(--display); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--cream); }
.dvr-ks-s { font-family: var(--mono); font-size: 11px; color: var(--cream-dim); margin-top: 3px; }
.dvr-ks-btn { flex: none; padding: 12px 18px; border-radius: 9px; border: 0; font-weight: 800; font-size: 13px; cursor: pointer; background: #FF2D55; color: #fff; }
.dvr-killswitch.on .dvr-ks-btn { background: var(--brand); color: var(--bg); }
.dvr-wz-tenant { background: linear-gradient(180deg, #15171B, #101216); border: 1px solid var(--line-2); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.dvr-wz-name { font-family: "Saira Condensed", Impact, sans-serif; font-size: 16px; color: var(--cream); text-transform: uppercase; }
.dvr-wz-kpi { font-family: var(--mono); font-size: 11px; color: var(--cream-dim); margin-top: 4px; }
.dvr-wz-kpi b { color: var(--amber); }
.dvr-wz-tenant .dvr-owner-switch { margin: 10px 0 0; }
.dvr-wz-tenant.suspended { opacity: .6; border-color: rgba(255,45,85,.4); }
.dvr-wz-susp { font-family: var(--mono); font-size: 9px; color: #FF6B7E; border: 1px solid rgba(255,45,85,.5); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.dvr-wz-acts { display: flex; gap: 8px; margin-top: 10px; }
.dvr-wz-acts button { flex: 1; padding: 9px; border-radius: 8px; background: none; border: 1px solid var(--line-2); color: var(--cream-dim); font-family: var(--mono); font-size: 11px; font-weight: 700; cursor: pointer; }
.dvr-wz-operate { border-color: rgba(93,219,20,.4) !important; color: var(--brand2) !important; }
.dvr-imp { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; margin: -18px -14px 12px; background: linear-gradient(90deg, rgba(123,255,43,.16), rgba(201,155,255,.16)); border-bottom: 1px solid rgba(93,219,20,.4); font-size: 13px; color: var(--cream); }
.dvr-imp b { color: var(--brand2); }
.dvr-wz-new { margin-top: 16px; background: linear-gradient(180deg, #15171B, #101216); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; }
.dvr-wz-new summary { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--brand2); cursor: pointer; }
.dvr-wz-new form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dvr-wz-created { margin-top: 12px; padding: 12px; border-radius: 8px; background: rgba(93,219,20,.1); border: 1px solid rgba(93,219,20,.35); font-size: 13px; line-height: 1.5; color: var(--cream); }
.dvr-wz-created b { color: var(--brand2); }
.dvr-staff { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dvr-staff:last-child { border-bottom: 0; }
.dvr-staff-main { flex: 1; min-width: 0; }
.dvr-staff-name { font-size: 15px; color: var(--cream); }
.dvr-staff-login { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
.dvr-staff-role { flex: none; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-family: var(--mono); font-size: 12px; color-scheme: dark; }

/* ---- Financials P&L ---- */
.qb-strip { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; margin: 14px 0; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--muted); font-size: 14px; color: var(--cream-dim); }
.qb-strip.on { border-left-color: var(--ok); }
.qb-strip b { color: var(--cream); }
.pnl-card { margin-top: 16px; }
table.pnl { width: 100%; border-collapse: collapse; }
table.pnl td { padding: 7px 8px; }
table.pnl td:last-child { text-align: right; width: 180px; white-space: nowrap; }
.pnl-head td { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 16px; border-bottom: 1px solid var(--line); }
.pnl-line td { color: var(--cream-dim); font-size: 14px; }
.pnl-grp { cursor: pointer; }
.pnl-grp td { font-weight: 700; color: var(--cream); border-top: 1px solid var(--line); }
.pnl-grp:hover td { background: rgba(240,230,210,.03); }
.pnl-caret { display: inline-block; width: 14px; color: var(--brand); }
.pnl-count { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.pnl-detail td { font-size: 13px; color: var(--cream-dim); }
.pnl-detail-name { padding-left: 26px !important; }
.pnl-expand { float: right; }
.pnl-sub td { font-weight: 700; color: var(--cream); border-top: 1px solid var(--line); }
.pnl-sub.gp td, .pnl-sub.oi td { color: var(--brand); border-top: 1px solid var(--line-2); }
.pnl-sub.ni td { color: var(--brand); border-top: 2px solid var(--line-2); font-size: 16px; }
.pnl-sub.tot td { color: var(--cream); }

/* ---- mobile owner P&L ---- */
.dvr-pnl-tabs { display: flex; gap: 6px; margin: 8px 0 12px; flex-wrap: wrap; }
.dvr-pnl-tabs .dvr-os { flex: 1; min-width: 54px; text-align: center; text-decoration: none; padding: 8px 4px; border-radius: 8px; border: 1px solid var(--line-2); background: linear-gradient(168deg, rgba(255,255,255,.04), rgba(0,0,0,.12)); color: var(--cream-dim); font-family: var(--mono); font-size: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.dvr-pnl-tabs .dvr-os.on { color: var(--brand); border-color: rgba(107,230,26,.4); background: linear-gradient(168deg, rgba(107,230,26,.14), rgba(107,230,26,.02)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.dvr-pnl { padding: 6px 14px; }
.dvr-pnl-h { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; color: var(--cream); font-weight: 700; }
.dvr-pnl-h .pnl-caret { color: var(--brand); display: inline-block; width: 14px; }
.dvr-pnl-line { display: flex; justify-content: space-between; padding: 7px 0 7px 22px; font-size: 13px; color: var(--cream-dim); border-top: 1px solid var(--line); }
.dvr-pnl-sub { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line-2); color: var(--cream); font-weight: 700; }
.dvr-pnl-sub.gp b, .dvr-pnl-sub.oi b, .dvr-pnl-sub.ni b { color: var(--brand); }
.dvr-pnl-sub.ni { border-top: 2px solid var(--line-2); font-size: 16px; }

/* ---- Command palette (⌘K) ---- */
.cmdk { position: fixed; inset: 0; z-index: 9998; background: rgba(4,5,6,.6); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.cmdk[hidden] { display: none; }
.cmdk-box { width: 92%; max-width: 560px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 30px 80px -24px rgba(0,0,0,.9); overflow: hidden; }
.cmdk-input { width: 100%; padding: 18px 20px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--cream); font-size: 17px; font-family: var(--body); outline: none; }
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.cmdk-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 8px; color: var(--cream); font-size: 15px; }
.cmdk-item.on { background: rgba(107,230,26,.14); }
.cmdk-sec { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cmdk-head { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 10px 14px 4px; }
.cmdk-head:first-child { padding-top: 2px; }
.cmdk-empty { padding: 16px; color: var(--muted); text-align: center; }
.search-ph { color: var(--muted); flex: 1; text-align: left; }
.search-kbd { font-family: var(--mono); font-size: 10px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 6px; }
.topbar .search { cursor: pointer; }

/* ---- accessibility: visible focus + motion preference ---- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
button { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---- micro-interactions: button press + card slide-out on apply/dismiss ---- */
.btn:active, button:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.sug-card, .deck-item { transition: transform .28s ease, opacity .28s ease, max-height .28s ease, padding .28s ease, margin .28s ease, border-color .28s ease; overflow: hidden; }
.sug-card.removing, .deck-item.removing { opacity: 0; transform: translateX(14px); max-height: 0 !important; padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; border-color: transparent; }

/* ---- Toasts + loading spinner (global feedback) ---- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { min-width: 200px; max-width: 360px; padding: 12px 16px; border-radius: 10px; font-size: 14px; color: var(--cream);
  background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 16px 40px -18px rgba(0,0,0,.9);
  opacity: 0; transform: translateY(10px); transition: opacity .26s, transform .26s; }
.toast.in { opacity: 1; transform: translateY(0); }
.toast { pointer-events: auto; }
.toast-undo { margin-left: 12px; color: var(--brand); font-weight: 700; text-decoration: underline; }
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--red); }
@media (max-width: 560px) { .toasts { left: 14px; right: 14px; bottom: 14px; } .toast { max-width: none; } }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: bmspin .6s linear infinite; vertical-align: -2px; }
@keyframes bmspin { to { transform: rotate(360deg); } }
button.busy { opacity: .85; }

/* ---- Empty states (teach + offer the first action) ---- */
.empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5;
  border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: rgba(240,230,210,.012); }
.empty a, .empty .btn { color: var(--brand); }
.empty-cta { display: inline-block; margin-top: 12px; }
.driverbody .empty { background: rgba(255,255,255,.015); }

/* ---- Overview action deck (decision-first) ---- */
.actiondeck .deck-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.actiondeck .deck-item:last-child { border-bottom: 0; }
.deck-main { min-width: 0; flex: 1; }
.deck-title { font-size: 14px; color: var(--cream); margin-top: 5px; line-height: 1.35; }
.deck-clear { padding: 18px 4px; color: var(--ok); font-size: 14px; }

/* ---- nav unread badge ---- */
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand);
  color: var(--bg); font-family: var(--mono); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px -2px rgba(93,219,20,.7); }

/* ---- Global autonomy switch (sidebar) ---- */
.autoswitch { margin: 4px 12px 14px; padding: 10px; border-radius: 10px; background: var(--surface-2, #15171b); border: 1px solid var(--line-2, #232733); }
.autoswitch-l { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.autoswitch-seg { display: flex; gap: 4px; }
.autoseg { flex: 1; padding: 7px 2px; border-radius: 7px; background: none; border: 1px solid var(--line-2, #232733); color: var(--cream-dim, #cfd4dc);
  font-family: var(--mono); font-size: 10px; font-weight: 700; cursor: pointer; line-height: 1.1; }
.autoseg.on { background: var(--brand, #5DDB14); border-color: var(--brand, #5DDB14); color: #0A0A0B; box-shadow: 0 0 12px -4px rgba(93,219,20,.6); }
.autoseg:disabled { opacity: .6; }

/* ---- AI Suggestions (unified action queue) ---- */
.sug-mode { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; color: var(--cream);
  background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--brand); }
.sug-mode.semi { border-left-color: var(--amber); }
.sug-mode.auto { border-left-color: var(--ok); }
.sug-list { display: flex; flex-direction: column; gap: 10px; }
.sug-card { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 14px 16px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line-2); }
.sug-card.apv { border-color: rgba(245,193,108,.4); background: rgba(245,193,108,.05); }
.sug-main { min-width: 0; flex: 1; }
.sug-agent { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand2);
  border: 1px solid rgba(93,219,20,.35); border-radius: 4px; padding: 1px 6px; }
.sug-agent.amber { color: var(--amber); border-color: rgba(245,193,108,.4); }
.sug-title { font-size: 15px; color: var(--cream); margin-top: 6px; }
.sug-title a { color: var(--cream); }
.sug-detail { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.sug-acts { flex: none; display: flex; gap: 8px; align-items: center; }
.btn.sm.brand { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.driverbody .sug-card { background: linear-gradient(180deg, #15171B, #101216); }
.driverbody .sug-acts { flex-direction: column; }

/* ---- Conversations inbox ---- */
.inbox-list { display: flex; flex-direction: column; gap: 8px; }
.inbox-row { display: block; padding: 14px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); color: var(--cream); }
.inbox-row:hover { border-color: var(--line); }
.inbox-row-top { display: flex; justify-content: space-between; gap: 10px; }
.inbox-name { font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.inbox-row.unread { border-color: rgba(107,230,26,.4); background: rgba(107,230,26,.045); }
.inbox-row.unread .inbox-name { font-weight: 800; }
.inbox-udot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px rgba(107,230,26,.6); flex: none; }
.inbox-tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.inbox-tab { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 99px; text-decoration: none; }
.inbox-tab.on { color: var(--cream); border-color: var(--line); background: var(--panel); }
.inbox-tab.wait { color: var(--brand); border-color: rgba(107,230,26,.5); }
.inbox-when { font-family: var(--mono); font-size: 11px; color: var(--muted); }
/* Bulk-select on tables (invoices "Text payment reminder") */
th.ivchk, td.ivchk { width: 34px; text-align: center; padding-left: 4px; padding-right: 4px; }
.iv-cb, #ivAll { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
.bulkbar { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid rgba(107,230,26,.4); border-radius: 12px; background: var(--panel); box-shadow: 0 6px 22px rgba(0,0,0,.35); }
.bulkbar #ivCount { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--cream-dim); }
.bulkbar .btn.primary.sm { margin-left: auto; padding: 8px 15px; font-size: 12px; border: none; border-radius: 9px; background: var(--brand); color: var(--bg); font-weight: 700; cursor: pointer; }
.bulkbar .btn.primary.sm:hover { filter: brightness(1.07); }
.inv-search { display: flex; gap: 8px; margin: 0 0 10px; }
.inv-search input[name="q"] { flex: 1; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(0,0,0,.2); color: var(--cream); font-size: 13px; }
.inv-ftabs { display: flex; gap: 7px; margin: 0 0 12px; flex-wrap: wrap; }
.inv-ftab { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; }
.inv-ftab.on { color: var(--bg); background: var(--brand); border-color: var(--brand); font-weight: 700; }
.inv-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.inv-pg { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); text-decoration: none; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; }
.inv-pg.dis { color: var(--muted); opacity: .4; pointer-events: none; }
.inv-pgn { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.jd-photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px; }
.jd-ph { text-decoration: none; display: block; }
.jd-ph img { width: 78px; height: 78px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); display: block; }
.jd-ph-l { display: block; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: center; margin-top: 4px; }
.jd-ph-l.rc { color: var(--amber); }
.jd-drop { border: 1px dashed var(--line-2); border-radius: 12px; padding: 20px; text-align: center; color: var(--cream-dim); font-size: 13px; transition: border-color .15s, background .15s; }
.jd-drop.over { border-color: var(--brand); background: rgba(107,230,26,.06); }
/* Automations page */
.auto-master.off { border-color: rgba(245,193,108,.4); }
.auto-mrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 14px; }
.auto-card.off { opacity: .72; }
.auto-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.auto-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.auto-list li { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.16); }
.auto-when { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.auto-what { font-size: 13px; color: var(--cream); }
.auto-hours { margin-top: 12px; }
.auto-hours summary { cursor: pointer; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--cream-dim); }
.auto-hform { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.auto-days { display: flex; gap: 4px; }
.auto-day { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.auto-day input { accent-color: var(--brand); }
.auto-hbtns { display: flex; gap: 8px; }
/* Notification bell (tool13 top bar) */
.notif-wrap { position: relative; }
.notif-bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.2); color: var(--cream-dim); cursor: pointer; }
.notif-bell:hover { color: var(--brand); border-color: rgba(107,230,26,.4); }
.notif-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: var(--bg); font-family: var(--mono); font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.notif-panel { position: absolute; top: 46px; right: 0; width: 300px; z-index: 60; border: 1px solid var(--line-2); border-radius: 13px; background: var(--panel); box-shadow: 0 18px 44px rgba(0,0,0,.55); overflow: hidden; }
.notif-hd { padding: 12px 14px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-bottom: 1px solid var(--line); }
.notif-body { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--cream); border-bottom: 1px solid var(--line); }
.notif-item:hover { background: rgba(107,230,26,.06); }
.notif-item:last-child { border-bottom: 0; }
.notif-ct { flex: none; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: rgba(107,230,26,.14); color: var(--brand); font-family: var(--mono); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.notif-lb { font-size: 13px; }
.notif-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13px; }
.inbox-prev { font-size: 13px; color: var(--cream-dim); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-ch { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--brand); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-right: 6px; }
.inbox-thread { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.inbox-msg { max-width: 78%; }
.inbox-msg.out { align-self: flex-end; text-align: right; }
.inbox-msg.in { align-self: flex-start; }
.inbox-b { display: inline-block; padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.4; text-align: left; }
.inbox-msg.out .inbox-b { background: rgba(93,219,20,.14); border: 1px solid rgba(93,219,20,.3); color: var(--cream); }
.inbox-msg.in .inbox-b { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); }
.inbox-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 3px; }
.inbox-compose { display: flex; gap: 8px; margin-top: 12px; }
.inbox-compose select { flex: none; padding: 0 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-family: var(--mono); font-size: 12px; color-scheme: dark; }
.inbox-compose input { flex: 1; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 15px; }
.inbox-compose button { flex: none; padding: 0 22px; border-radius: 10px; background: var(--brand); color: var(--bg); border: 0; font-weight: 700; cursor: pointer; }
.inbox-compose .inbox-draft { background: var(--surface-2); color: var(--brand); border: 1px solid var(--line-2); padding: 0 14px; font-family: var(--mono); font-size: 12px; }
.inbox-note { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 8px; }
.inbox-note .ok { color: var(--ok); }
.inbox-flash { padding: 9px 14px; border-radius: 9px; margin-bottom: 12px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream-dim); }
.inbox-flash.ok { background: rgba(91,191,126,.12); border-color: rgba(91,191,126,.4); color: var(--ok); }
/* mobile inbox thread reuse */
.driverbody .inbox-thread { max-height: none; }

/* ---- Driver app: adopt the desktop card + type language ---- */
.driverbody .dvr-job, .driverbody .dvr-row, .driverbody .dvr-d-card, .driverbody .dvr-fin-head,
.driverbody .dvr-lines, .driverbody .dvr-totals, .driverbody .dvr-kpi, .driverbody .dvr-wz-tenant,
.driverbody .dvr-wz-new, .driverbody .sug-card, .driverbody .dvr-cat-item {
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16));
  border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 22px -18px rgba(0,0,0,.9);
}
.driverbody .dvr-job, .driverbody .dvr-row { border-left: 1px solid var(--line-2); }
.driverbody .dvr-job.onsite, .driverbody .dvr-row.onsite { border-left: 2px solid var(--amber); }
.driverbody .dvr-job.done, .driverbody .dvr-row.done { border-left: 2px solid var(--ok); }
.driverbody .dvr-job.enroute, .driverbody .dvr-row.enroute { border-left: 2px solid var(--brand); }
/* big labels → Saira Condensed (the desktop display face), not Bowlby One */
.driverbody .dvr-cust, .driverbody .dvr-row-name, .driverbody .dvr-fin-name, .driverbody .dvr-wz-name {
  font-family: var(--display); font-weight: 800; letter-spacing: .01em;
}

/* ---- Binmatic Pay ---- */
.pay-alert { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 14px 18px; margin-bottom: 16px;
  background: rgba(245,193,108,.10); border: 1px solid rgba(245,193,108,.4); border-radius: 10px; color: var(--cream); }
.pay-alert b { color: var(--amber); }
.pay-alert .btn { flex: none; }
.pay-setup { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
.pay-step { padding: 11px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--line-2); }
.pay-step.done { border-left-color: var(--ok); }
.pay-step b { display: block; font-size: 14px; }
.pay-step span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.payfee { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.payfee .fld { width: 100%; }
.proc-active td { background: rgba(93,219,20,.06); }
.proc-rates { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.proc-rates .frow { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.proc-rates .fld { flex: 1; min-width: 90px; }
.adv-form { display: flex; gap: 6px; align-items: center; }
.adv-form input[type=number] { width: 80px; padding: 6px 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); }
.adv-form input[type=text] { width: 130px; padding: 6px 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); }
.dvr-adv { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.dvr-adv input { padding: 11px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream); font-size: 15px; }

/* ---- Growth plays ---- */
.growthgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 20px; }
.growthcard { padding: 18px; }
.gc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gc-n { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; }
.gc-n.brand { color: var(--brand); } .gc-n.amber { color: var(--amber); }
.gc-label { font-weight: 600; color: var(--cream); margin: 10px 0 4px; }
.gc-desc { font-size: 12.5px; color: var(--cream-dim); line-height: 1.5; }

/* ---- Jobs list tabs ---- */
.jtabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 5px; border-radius: 12px; max-width: 100%;
  background: linear-gradient(168deg, rgba(255,255,255,.035), rgba(0,0,0,.16)); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.jtabs .jtab { padding: 8px 14px; border-radius: 8px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--cream-dim); border: 1px solid transparent; transition: color .16s, background .16s, border-color .16s, box-shadow .16s; }
.jtabs .jtab:hover { color: var(--cream); background: rgba(255,255,255,.03); }
.jtabs .jtab.on { color: var(--brand); border-color: var(--line-2);
  background: linear-gradient(168deg, rgba(255,255,255,.06), rgba(0,0,0,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 16px -12px rgba(0,0,0,.9); }
.jtab-n { font-size: 11px; color: var(--muted); }
.jtab.on .jtab-n { color: var(--brand); }

/* ---- Job detail / edit ---- */
.joblink { color: var(--cream); text-decoration: none; cursor: pointer; }
.joblink:hover { color: var(--brand); text-decoration: underline; }
.jobedit .fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.jobedit .fld input, .jobedit .fld select, .jobedit .fld textarea { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--cream); font-family: var(--body); font-size: 14px; text-transform: none; letter-spacing: normal; }
.jobedit .fld input:focus, .jobedit .fld select:focus, .jobedit .fld textarea:focus { outline: none; border-color: var(--brand); }
.jobedit .frow { display: flex; gap: 10px; } .jobedit .frow .fld { flex: 1; }
.jobedit-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.btn.save { padding: 12px 26px; background: var(--brand); color: var(--bg); border: 0; font-weight: 700; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; border-radius: 10px; cursor: pointer; }
.je-timeline { font-family: var(--mono); font-size: 12px; color: var(--cream-dim); }
.je-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---- Clients search ---- */
.clientsearch { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.clientsearch input { flex: 1; max-width: 460px; padding: 11px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(240,230,210,.03); color: var(--cream); font-family: var(--body); font-size: 14px; }
.clientsearch input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107,230,26,.12); }
.clientsearch .clearf { font-family: var(--mono); font-size: 11px; color: var(--amber); text-transform: uppercase; }

/* ---- In-dashboard softphone ---- */
.softphone { position: fixed; right: 22px; bottom: 84px; z-index: 50; }
.sp-fab { width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; color: var(--bg); background: var(--brand); display: grid; place-items: center; box-shadow: 0 8px 28px -8px rgba(107,230,26,.7), 0 0 0 1px rgba(107,230,26,.3); transition: transform .15s; }
.sp-fab:hover { transform: translateY(-2px); }
.sp-panel { position: absolute; right: 0; bottom: 66px; width: 280px; padding: 16px; border-radius: var(--radius); background: var(--panel) padding-box, var(--border-grad) border-box; border: 1px solid transparent; box-shadow: var(--shadow-hover); }
.sp-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cream); margin-bottom: 12px; }
.sp-x { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }
.sp-display { width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--cream); font-family: var(--mono); font-size: 18px; text-align: center; letter-spacing: 1px; box-sizing: border-box; }
.sp-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.sp-key { padding: 11px 0; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(240,230,210,.03); color: var(--cream); font-family: var(--mono); font-size: 16px; cursor: pointer; transition: background .12s; }
.sp-key:hover { background: rgba(107,230,26,.1); border-color: var(--brand); }
.sp-actions { display: flex; gap: 8px; }
.sp-call { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 9px; border: 0; background: var(--brand); color: var(--bg); font-weight: 700; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.sp-del { width: 48px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(240,230,210,.03); color: var(--cream-dim); cursor: pointer; }
.sp-status { font-size: 12px; color: var(--cream-dim); min-height: 16px; margin-top: 10px; text-align: center; }
.sp-recent { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; max-height: 140px; overflow-y: auto; }
.sp-call-row { font-size: 11.5px; color: var(--cream-dim); padding: 4px 0; font-family: var(--mono); }
.sp-call-row .in { color: var(--brand); } .sp-call-row .out { color: var(--amber); }
@media (max-width: 720px) { .softphone { right: 14px; bottom: 78px; } }

/* ---- Schedule: resizable Day calendar ---- */
.cal { display: grid; grid-template-columns: 54px 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.cal-axis { border-right: 1px solid var(--line); }
.cal-hr { display: flex; align-items: flex-start; justify-content: flex-end; padding: 2px 8px 0 0; box-sizing: border-box; border-top: 1px solid var(--line); }
.cal-hr:first-child { border-top: 0; }
.cal-hr span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.cal-lane { position: relative; background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 56px; }
.cal-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(240,230,210,.02) 0 8px, transparent 8px 16px); pointer-events: none; }
.calblock {
  position: absolute; left: 6px; right: 6px; border-radius: 7px; overflow: hidden;
  background: linear-gradient(150deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--line-2);
  border-left: 3px solid var(--brand); box-shadow: 0 4px 14px -8px rgba(0,0,0,.8); cursor: default; z-index: 1;
}
.calblock.dragging { z-index: 5; box-shadow: var(--shadow-hover); opacity: .96; }
.calblock.t-delivery { border-left-color: #B14EFF; }
.calblock.t-pickup { border-left-color: #22FF88; }
.calblock.t-swap, .calblock.t-dump { border-left-color: #FF1F4B; }
.cb-h { position: absolute; left: 0; right: 0; height: 8px; cursor: ns-resize; }
.cb-h.top { top: 0; } .cb-h.bot { bottom: 0; }
.cb-h:hover { background: rgba(107,230,26,.18); }
.cb-body { padding: 6px 10px; cursor: grab; height: 100%; box-sizing: border-box; }
.calblock.dragging .cb-body { cursor: grabbing; }
.cb-time { font-family: var(--mono); font-size: 10.5px; color: var(--brand); font-weight: 600; }
.cb-cust { font-size: 13px; color: var(--cream); font-weight: 600; margin-top: 1px; line-height: 1.2; }
.cb-meta { font-size: 11px; color: var(--cream-dim); text-transform: capitalize; margin-top: 1px; }

/* ---- Schedule: hour-grid Day view (tray cards) ---- */
.dgtray { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; }
.dgtray-h { font-family: var(--display); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--cream); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dgtray-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.daygrid { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.dgrow { display: grid; grid-template-columns: 56px 1fr; border-top: 1px solid var(--line); min-height: 52px; }
.dgrow:first-child { border-top: 0; }
/* hours outside the operating window — visible but clearly off-hours */
.dgrow.padding { background: repeating-linear-gradient(135deg, rgba(240,230,210,.018) 0 8px, transparent 8px 16px); }
.dgrow.padding .dghour { color: rgba(133,127,114,.55); }
.dgrow.winstart { border-top: 1px solid rgba(107,230,26,.35); box-shadow: inset 0 1px 0 rgba(107,230,26,.15); }
.dghour { font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 8px 10px; border-right: 1px solid var(--line); text-align: right; }
.dglane { padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.dgjob { background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--muted); border-radius: 8px; padding: 7px 9px; min-width: 220px; flex: 0 1 240px; }
.dgjob .sj-cust { font-size: 13px; margin-top: 2px; }
.dgjob .sj-addr { font-size: 11px; margin-top: 1px; }
.dgjob .dg-foot { margin-top: 6px; gap: 6px; }
.dgjob .jtags { margin-top: 6px; }
.dgjob .tagedit { margin-top: 6px; }
.dgjob.t-deliver { border-left-color: var(--brand); }
.dgjob.t-pickup { border-left-color: var(--amber); }
.dgjob.t-swap { border-left-color: var(--magenta); }
.dgjob.t-dump { border-left-color: #3DD6C4; }
.dg-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dg-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.prefchip { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-dim); }
.prefchip.am { color: var(--amber); border-color: rgba(245,193,108,.4); }
.prefchip.anytime { color: var(--cream-dim); }
.tsel { background: var(--surface-3); color: var(--cream); border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 7px; font-family: var(--mono); font-size: 11px; margin-left: auto; }

/* ---- AI Answering section (Overview) ---- */
.answering { border-left: 3px solid var(--brand-deep); }
.ansrow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; }
.ansstat { padding: 6px 18px; border-left: 1px solid var(--line); }
.ansstat:first-child { border-left: 0; padding-left: 4px; }
.ans-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.ans-val { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; margin: 8px 0 6px; color: var(--cream); }
.ans-val.brand { color: var(--brand); text-shadow: 0 0 24px rgba(107,230,26,.28); }
.ans-val.amber { color: var(--amber); }
.ans-sub { font-size: 11px; color: var(--cream-dim); }
@media (max-width: 1000px) { .ansrow { grid-template-columns: repeat(3, 1fr); gap: 18px 0; } }
@media (max-width: 560px) { .ansrow { grid-template-columns: repeat(2, 1fr); } .ansstat, .ansstat:first-child { border-left: 0; padding-left: 4px; } }

/* ---- AI Configurator wizard ---- */
.wizard { border-left: 3px solid var(--brand); }
.wiz-log { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 360px; overflow-y: auto; }
.wiz-log:empty { display: none; }
.wiz-msg { padding: 11px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; max-width: 88%; }
.wiz-msg.me { align-self: flex-end; background: rgba(107,230,26,.12); border: 1px solid rgba(107,230,26,.28); color: var(--cream); }
.wiz-msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--cream-dim); }
.wiz-clarify { margin-top: 8px; color: var(--amber); font-size: 12.5px; }
.wiz-actions { margin: 12px 0 12px; padding-left: 18px; }
.wiz-actions li { font-family: var(--mono); font-size: 12px; color: var(--cream); margin-bottom: 5px; }
.wiz-apply { width: auto; padding: 9px 16px; font-size: 12px; }
.wiz-form { display: flex; gap: 10px; }
.wiz-form input { flex: 1; padding: 12px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(240,230,210,.03); color: var(--cream); font-family: var(--body); font-size: 14px; }
.wiz-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107,230,26,.12); }
.wiz-form .btn { white-space: nowrap; }

/* ---- Agent Control Center ---- */
.masterform { display: flex; flex-wrap: wrap; gap: 22px; padding: 4px 0 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.ctltable td { vertical-align: middle; }
.ctlform { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ctlform select { background: var(--surface-2); color: var(--cream); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; font-family: var(--mono); font-size: 12px; }
.ctlform .mini { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; color: var(--cream-dim); text-transform: uppercase; letter-spacing: .04em; }
.ctlform .mini input[type=number] { width: 78px; background: var(--surface-2); color: var(--cream); border: 1px solid var(--line-2); border-radius: 7px; padding: 5px 8px; font-family: var(--mono); font-size: 12px; }
.btn.sm { padding: 6px 12px; font-size: 11px; }

/* ---- Business Hours editor ---- */
.hoursform { max-width: 560px; }
.hrow { display: grid; grid-template-columns: 1.2fr .6fr 1fr 1fr; align-items: center; gap: 12px; padding: 7px 0; }
.hrow.hhead { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 9px; margin-bottom: 4px; }
.hrow .hday { font-size: 14px; color: var(--cream); }
.hrow select { background: var(--surface-2); color: var(--cream); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 9px; font-family: var(--mono); font-size: 12px; }
.hrow select:disabled { opacity: .4; }
.hrow.htoggles { grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.hoursform .btn { margin-top: 16px; }
@media (max-width: 560px) { .hrow { grid-template-columns: 1fr .5fr; } .hrow select { grid-column: span 1; } .hrow.htoggles { grid-template-columns: 1fr; gap: 12px; } }

/* ---- Settings catalog (Workiz-style card grid) ---- */
.setgroup { font-family: var(--display); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--cream); margin: 30px 0 14px; }
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.setcard {
  display: block; padding: 16px 18px; border-radius: var(--radius-sm); text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-left: 3px solid var(--brand-deep); transition: transform .16s, box-shadow .16s, border-color .2s;
}
.setcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-left-color: var(--brand); }
.setcard.soon { opacity: .72; border-left-color: var(--line-2); }
.setcard .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setcard .sc-name { font-weight: 600; color: var(--cream); font-size: 15px; }
.setcard .sc-sub { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---- Approvals inbox ---- */
.apv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.apv { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid transparent;
  background: var(--panel) padding-box, var(--border-grad) border-box; box-shadow: var(--shadow); }
.apv-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.apv-agent { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.apv-amt { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--cream); margin-left: auto; }
.apv-ago { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.apv-title { font-size: 15px; color: var(--cream); margin: 12px 0 4px; font-weight: 600; }
.apv-detail { font-size: 12.5px; color: var(--cream-dim); line-height: 1.55; }
.apv-act { display: flex; gap: 10px; margin-top: 16px; }
.apv-act form { flex: 1; }
.btn.approve, .btn.deny { width: 100%; padding: 10px; border-radius: 9px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; border: 1px solid; }
.btn.approve { color: var(--bg); background: var(--brand); border-color: var(--brand); font-weight: 700; }
.btn.approve:hover { box-shadow: 0 6px 20px -8px rgba(107,230,26,.7); }
.btn.deny { color: var(--red); background: rgba(229,72,77,.06); border-color: rgba(229,72,77,.4); }
.btn.deny:hover { background: rgba(229,72,77,.14); }

@media (max-width: 720px) {
  .modeswitch { grid-template-columns: 1fr; }
  .apv-grid, .setgrid { grid-template-columns: 1fr; }
}

/* ---- phones: sidebar becomes a sticky horizontal top bar ----
   placed last so it overrides the base component rules defined above */
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .side {
    position: sticky; top: 0; z-index: 30; height: auto; min-height: 0;
    flex-direction: row; align-items: center; gap: 10px; flex-wrap: nowrap;
    padding: 10px 12px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-right: none; border-bottom: 1px solid var(--line);
  }
  .side::before { display: none; }
  .brand { flex: 0 0 auto; padding: 0 4px; font-size: 20px; }
  .nav {
    display: flex; flex-direction: row; gap: 6px; flex: 1 1 auto;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: 0 0 auto; margin-bottom: 0; padding: 8px 13px; white-space: nowrap;
    border-radius: 999px; font-size: 13px;
  }
  .nav a:hover { transform: none; }
  .nav a.active { background: rgba(107,230,26,.14); }
  .nav a.active::before { display: none; }
  .nav a .ico { display: none; }
  .side-foot { display: none; }
  .main { padding: 18px 14px 56px; max-width: 100%; }
  .head { flex-direction: column; align-items: flex-start; }
  .head h1, .topbar h1 { font-size: 26px; }
  /* minmax(0,1fr) so long $ values can't force tracks wider than the screen */
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .kpis-4 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .kpi { padding: 16px 16px 14px; min-width: 0; }
  .kpi .val { font-size: 28px; }
  .grid2, .row-b, .row-c { grid-template-columns: 1fr; }
  /* cards scroll horizontally so wide tables don't push the whole page out */
  .card { padding: 18px; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card table { font-size: 12px; }
  .card table td[style*="max-width"] { max-width: 220px !important; }
  /* topbar stacks; search takes the full row instead of forcing 300px overflow */
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .topbar > div:first-child { width: 100%; }
  .chrome { flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
  .search { min-width: 0; flex: 1 1 100%; width: 100%; }
  .ministats { margin-top: 4px; }
}
@media (max-width: 440px) {
  .kpis, .kpis-4 { grid-template-columns: minmax(0,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Pay-Model Studio ---------------------------------------------------- */
.paygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 12px; }
.paycard { padding: 16px; border: 1px solid var(--line-2); border-radius: 14px;
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16)); }
.paycard .pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.paycard .pc-name { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--cream); }
.paycard .pc-nameedit { flex: 1; background: rgba(0,0,0,.25); border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--cream); font-family: var(--display); font-weight: 700; font-size: 15px; padding: 6px 9px; }
.paycard .pc-model { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; letter-spacing: .04em; }
.paycard .pc-desc { font-size: 12.5px; line-height: 1.5; margin-top: 8px; }
.paycard .pc-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.paycard .pc-row label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.paycard .pc-row select, .paycard .pc-row input { background: rgba(0,0,0,.25); border: 1px solid var(--line-2);
  border-radius: 8px; color: var(--cream); padding: 7px 9px; font-size: 13px; }
.leverwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.lever { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.lever .lv-in { display: inline-flex; align-items: center; gap: 2px; color: var(--cream); }
.lever input { width: 64px; background: rgba(0,0,0,.25); border: 1px solid var(--line-2); border-radius: 7px;
  color: var(--cream); padding: 5px 7px; font-size: 12.5px; text-align: right; }
.pc-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--cream); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.assignrow { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 12px; }
.assignrow select { flex: 1; background: rgba(0,0,0,.25); border: 1px solid var(--line-2); border-radius: 8px; color: var(--cream); padding: 7px 9px; }
.kpi-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi-strip .kpi { padding: 14px 16px; }
.kpi-strip .kpi-v { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--cream); }
.kpi-strip .kpi-l { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }
tr.total td { border-top: 1px solid var(--line-2); padding-top: 10px; }
@media (max-width: 640px) { .kpi-strip { grid-template-columns: 1fr; } .leverwrap { grid-template-columns: 1fr; } }

/* pay templates editor + driver delay/plan controls */
.pc-descedit { width: 100%; margin-top: 8px; background: rgba(0,0,0,.25); border: 1px solid var(--line-2);
  border-radius: 8px; color: var(--cream); padding: 8px 10px; font: inherit; font-size: 12.5px; resize: vertical; }
.dvr-delay { margin-top: 14px; padding: 14px; border: 1px solid var(--line-2); border-radius: 14px;
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16)); }
.dvr-delay-h { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--cream); margin-bottom: 8px; }
.dvr-plan-opt { padding: 12px; border: 1px solid var(--line-2); border-radius: 12px; margin-top: 8px; background: rgba(0,0,0,.18); }
.dvr-plan-opt-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; color: var(--cream); }
.dvr-btn.sm { padding: 7px 13px; font-size: 12px; border-radius: 10px; width: auto; }

/* ============================================================================
   Design-language alignment — bring the older driver/mobile surfaces onto the
   same top-lit glass + radius system as the desktop .card and the newer .dvr-row.
   (Appended late so it overrides the legacy flat fills / sharp radii.)
   ============================================================================ */
.driverbody .dvr-job,
.driverbody .dvr-d-card,
.driverbody .dvr-pick {
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 12px 30px -22px rgba(0,0,0,.9);
}
.driverbody .dvr-job { border-left: 3px solid var(--brand); }      /* keep the status spine */
.driverbody .dvr-act {
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16));
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.driverbody .dvr-place { border-radius: var(--radius-sm); }
.driverbody .pay-step {
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16));
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
.driverbody .pay-alert { border-radius: var(--radius-sm); }
/* Mobile section headings → match the desktop .dvr-d-l small-caps mono cue but
   give standalone labels the same display weight as desktop .card h2. */
.driverbody .dvr-d-hero .dvr-cust { letter-spacing: .01em; }

/* ---- Agent Cockpit ("Jarvis") ------------------------------------------- */
.standup { display: flex; flex-direction: column; gap: 8px; }
.standup-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.02); color: var(--cream); transition: border-color .16s; }
.standup-row:hover { border-color: rgba(107,230,26,.35); }
.standup-row .su-agent { font-family: var(--mono); font-size: 11px; color: var(--brand); }
.standup-row .su-title { color: var(--cream-dim); font-size: 13px; }
.orb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.orb-tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); color: var(--cream);
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: border-color .16s, transform .12s; }
.orb-tile:hover { border-color: rgba(107,230,26,.32); transform: translateY(-2px); }
.orb-tile.chief { border-color: rgba(107,230,26,.4); }
.agent-av { flex: none; display: grid; place-items: center; border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--av) 45%, transparent);
  background: linear-gradient(168deg, color-mix(in srgb, var(--av) 16%, transparent), rgba(0,0,0,.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06); color: var(--av); transition: border-color .16s, box-shadow .2s; }
.agent-av svg { width: 52%; height: 52%; }
.agent-av.chief { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 16px -4px var(--av); }
.agent-av.speaking { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 18px -2px var(--av); }
.orb-meta .orb-name { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--cream); }
.orb-meta .orb-role { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 3px; }
.orb-badge { position: absolute; top: 10px; right: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.orb-clear { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.chat-thread { display: flex; flex-direction: column; gap: 10px; max-height: 440px; overflow-y: auto; padding: 4px 2px 8px; }
.chat-b { max-width: 78%; padding: 10px 13px; border-radius: 13px; font-size: 14px; line-height: 1.45; }
.chat-b.me { align-self: flex-end; background: var(--brand); color: var(--bg); font-weight: 500; border-bottom-right-radius: 5px; }
.chat-b.agent { align-self: flex-start; border: 1px solid var(--line-2);
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); color: var(--cream); border-bottom-left-radius: 5px; }
.chat-b .chat-who { display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-bottom: 4px; }
.chat-form { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.chat-form input[type=text] { flex: 1; background: rgba(0,0,0,.25); border: 1px solid var(--line-2); border-radius: 999px; color: var(--cream); padding: 11px 16px; font: inherit; font-size: 14px; }
.chat-mic { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); cursor: pointer; font-size: 17px; transition: border-color .16s, background .16s; }
.chat-mic.on { border-color: var(--brand); background: rgba(107,230,26,.14); box-shadow: 0 0 14px -3px rgba(107,230,26,.6); }
.chat-speak { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---- Agent Cockpit — mobile ---------------------------------------------- */
.dvr-orb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dvr-orb-tile { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); color: var(--cream);
  background: linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%, rgba(0,0,0,.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.dvr-orb-tile.chief { border-color: rgba(107,230,26,.4); grid-column: span 2; }
.dvr-orb-meta { min-width: 0; }
.dvr-orb-name { display: block; font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--cream); }
.dvr-orb-role { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* soft-removed staff row */
.dvr-staff.inactive { opacity: .55; }
.dvr-staff.inactive .dvr-staff-name { text-decoration: line-through; text-decoration-color: var(--muted); }

/* ============================================================================
   MOBILE APP v2 — prototype skin, light/dark theming, bottom tab nav.
   Scoped to .driverbody so the desktop ops console is unaffected. Theme is set
   on <html data-theme> by a no-flash bootstrap; persisted via cookie+localStorage.
   ============================================================================ */
/* ---- light theme (field/daylight-readable), mobile app only ---- */
html[data-theme="light"] body.driverbody {
  --bg:#F3F1EA; --bg-2:#EAE7DE; --surface:#FFFFFF; --surface-2:#F7F5EF; --surface-3:#ECE9E0;
  --cream:#191B18; --cream-dim:#41463C; --muted:#6E7264;
  --line:rgba(20,22,18,.12); --line-2:rgba(20,22,18,.20);
  --brand:#3E9E0A; --brand-deep:#2F8807; --matrix:#1F9E2C;
  --panel:linear-gradient(168deg,#ffffff,#f6f4ee);
  --shadow:0 1px 0 rgba(255,255,255,.6) inset,0 16px 34px -22px rgba(40,44,30,.35),0 3px 10px -8px rgba(40,44,30,.3);
  --shadow-hover:0 1px 0 rgba(255,255,255,.7) inset,0 22px 50px -24px rgba(40,44,30,.4),0 0 0 1px rgba(62,158,10,.18);
  background:var(--bg); color:var(--cream);
}
html[data-theme="light"] body.driverbody::before {
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(62,158,10,.10), transparent 58%),
    radial-gradient(820px 560px at 112% 6%, rgba(62,158,10,.05), transparent 55%),
    linear-gradient(rgba(20,22,18,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,22,18,.03) 1px, transparent 1px);
  background-size:100% 100%,100% 100%,44px 44px,44px 44px;
}
html[data-theme="light"] body.driverbody::after { opacity:.02; }

/* keep content clear of the fixed bottom bar */
.driverbody .driverapp { padding-bottom: 94px; }

/* ---- top chrome: glowing wordmark · mode pill · theme toggle · menu ---- */
.dvr-topbar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:4px 0 12px; }
.dvr-topbar .brand { font-family:var(--mono); font-weight:600; font-size:19px; color:var(--matrix);
  text-transform:lowercase; letter-spacing:-.5px; text-shadow:0 0 16px rgba(61,241,75,.45); display:flex; align-items:baseline; gap:1px; }
html[data-theme="light"] .dvr-topbar .brand { text-shadow:0 0 14px rgba(31,158,44,.28); }
.dvr-topbar .brand .tm { font-size:9px; vertical-align:super; opacity:.7; }
.topctl { display:flex; align-items:center; gap:8px; }
.modepill { font-family:var(--mono); font-size:9px; text-transform:uppercase; letter-spacing:.1em;
  border:1px solid var(--line-2); border-radius:999px; padding:5px 11px; color:var(--cream-dim); white-space:nowrap; }
.modepill.m-auto { color:var(--brand); border-color:rgba(107,230,26,.4); }
.modepill.m-semi { color:var(--amber); border-color:rgba(245,166,35,.4); }
.themebtn { width:34px; height:34px; border-radius:999px; border:1px solid var(--line-2);
  display:flex; align-items:center; justify-content:center; color:var(--cream-dim); background:var(--surface); flex:none; }
.themebtn:active { transform:scale(.94); }
.themebtn svg { width:17px; height:17px; }

/* ---- bottom tab bar (thumb reach) ---- */
.dbar { position:fixed; left:0; right:0; bottom:0; z-index:50; display:flex; justify-content:space-around; align-items:stretch;
  gap:2px; padding:8px 8px calc(8px + env(safe-area-inset-bottom)); background:rgba(8,9,10,.82);
  -webkit-backdrop-filter:blur(16px) saturate(1.1); backdrop-filter:blur(16px) saturate(1.1);
  border-top:1px solid var(--line-2); box-shadow:0 -12px 32px -22px rgba(0,0,0,.7); }
html[data-theme="light"] .dbar { background:rgba(243,241,234,.86); }
.dbar-item { position:relative; flex:1; max-width:104px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; padding:6px 2px; border-radius:12px; color:var(--muted); transition:color .15s,background .15s; }
.dbar-item .oi { width:22px; height:22px; }
.dbar-item .dbar-l { font-family:var(--mono); font-size:8.5px; letter-spacing:.09em; text-transform:uppercase; }
.dbar-item.on { color:var(--brand); }
.dbar-item.on .oi { filter:drop-shadow(0 0 8px rgba(107,230,26,.45)); }
.dbar-badge { position:absolute; top:0; left:50%; transform:translateX(4px); min-width:15px; height:15px; padding:0 4px;
  border-radius:999px; background:var(--red); color:#fff; font-family:var(--mono); font-size:9px; font-weight:600;
  display:flex; align-items:center; justify-content:center; }

/* ---- owner quick actions (the four one-tap controls) ---- */
.dvr-quick { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:14px 0 6px; }
.qa { display:flex; flex-direction:column; align-items:center; gap:8px; padding:15px 6px; border-radius:14px;
  background:var(--panel); border:1px solid var(--line); box-shadow:var(--shadow); color:var(--cream);
  transition:transform .12s, box-shadow .2s, border-color .2s; }
.qa:active { transform:scale(.96); }
.qa .oi { width:24px; height:24px; color:var(--brand); }
.qa-l { font-family:var(--mono); font-size:9px; text-transform:uppercase; letter-spacing:.07em; color:var(--cream-dim); }
.dvr-qh { font-family:var(--mono); font-size:9px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); margin:16px 2px 2px; }

/* ── Receptionist Knowledge ─────────────────────────────────────────────── */
.page-head { margin-bottom: 18px; }
.page-head h1 { font-family: var(--display); font-size: 40px; line-height: 1.02; letter-spacing: -.01em; }
.page-head .dim { margin-top: 6px; max-width: 70ch; }
.banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: linear-gradient(168deg, rgba(255,255,255,.03), rgba(0,0,0,.18)); padding: 12px 14px; color: var(--cream-dim); font-size: 13px; }
.rk-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rk-item:last-of-type { border-bottom: 0; }
.rk-item-h { margin-bottom: 2px; }
.rk-item > .dim { margin: 2px 0 5px; }
.rk-l { display: block; margin-bottom: 12px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.rk-l input, .rk-l textarea { display: block; width: 100%; margin-top: 6px; text-transform: none; letter-spacing: normal; font-family: var(--body); font-size: 14px; }
.rk-l .dim { text-transform: none; letter-spacing: normal; font-size: 11px; }
.rk-edit { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 14px;
  background: linear-gradient(168deg, rgba(255,255,255,.02), rgba(0,0,0,.12)); }
.rk-edit-grid { display: flex; gap: 14px; align-items: flex-start; }
.rk-edit-grid .rk-l:first-child { flex: 1; }
.rk-edit-foot { display: flex; align-items: center; gap: 16px; margin-top: 2px; }
.rk-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cream-dim); margin: 0; }
.rk-chk input { width: auto; margin: 0; }
.rk-gap { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rk-gap:last-child { border-bottom: 0; }
.rk-gap-act { display: flex; gap: 8px; flex: none; }
.rk-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.rk-tbl th { text-align: left; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line-2); }
.rk-tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--cream-dim); vertical-align: top; }
.rk-tbl tr.rk-gaprow td:first-child { box-shadow: inset 2px 0 0 var(--amber); }

/* Receptionist Q&A accordion (collapsible entries) */
.rk-acc { border: 1px solid var(--line-2); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden;
  background: linear-gradient(168deg, rgba(255,255,255,.02), rgba(0,0,0,.12)); }
.rk-acc > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 9px; padding: 11px 14px; font-size: 14px; color: var(--cream); }
.rk-acc > summary::-webkit-details-marker { display: none; }
.rk-acc > summary::before { content: '▸'; color: var(--muted); font-size: 11px; transition: transform .15s; flex: none; }
.rk-acc[open] > summary::before { transform: rotate(90deg); }
.rk-acc > summary:hover { background: rgba(255,255,255,.03); }
.rk-acc-add > summary { color: var(--brand); font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.rk-acc .rk-acc-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.rk-acc .rk-edit { border: 0; background: none; padding: 0; margin: 12px 0 0; }
.rk-tag { font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }

/* Driver app — Mission Control card treatment: graphite gradient surfaces to
   match the desktop cards. Radii, borders, and status left-accents unchanged. */
.dvr-row, .otile, .dvr-kpi, .dvr-pick, .dvr-job, .dvr-d-card { background: linear-gradient(180deg, #1b1e24, #15171b); }
.dvr-job, .dvr-d-card { border-radius: 12px; }

/* Driver bottom nav → shell13 floating dock (centered capsule, brand-pill active) */
.dbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 14px; width: max-content;
  max-width: calc(100vw - 18px); justify-content: center; gap: 3px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border: 1px solid var(--line-2);
  border-radius: 999px; background: rgba(26,29,35,.92); box-shadow: 0 18px 50px -18px rgba(0,0,0,.6); }
.dbar-item { flex: 0 0 auto; max-width: none; flex-direction: row; gap: 7px; padding: 8px 13px; border-radius: 999px; }
.dbar-item .oi { width: 17px; height: 17px; }
.dbar-item .dbar-l { font-size: 10px; }
.dbar-item.on { background: var(--brand); color: var(--bg); }
.dbar-item.on .oi { filter: none; }

/* Grand-Wizard Command Center body bits that live only in proto.css — ported so
   the console renders correctly inside wizardShell (dashboard.css) too. */
.sub-intro { padding: 2px 24px 16px; color: var(--muted); font-size: 13px; max-width: 80ch; }
.sub-intro b { color: var(--cream-dim); }
/* Autonomy dial (Manual / Semi-Auto / Full-Auto) on the tenant control cards —
   ported from proto.css so the segmented buttons aren't browser-default white. */
.dial { display: flex; gap: 4px; background: rgba(0,0,0,.3); border: 1px solid var(--line-2); border-radius: 10px; padding: 4px; margin-bottom: 8px; }
.dial button { flex: 1; font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 2px; border-radius: 7px; color: var(--cream-dim); background: transparent; border: 0; cursor: pointer; transition: all .15s; }
.dial button:hover { color: var(--cream); }
.dial button.on { background: var(--brand); color: var(--bg); font-weight: 700; }
.killbtn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--brand); background: rgba(8,14,8,.7); border: 1px solid rgba(107,230,26,.4); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: all .15s; }
.killbtn:hover { background: rgba(107,230,26,.12); border-color: var(--brand); }
.killbtn .kdot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand); animation: pulse 1.4s infinite; }

/* Grand-Wizard impersonation bar — shown on every desktop dashboard page while a
   platform admin is viewing a tenant, so there's always a one-click way back. */
.gw-impbar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--cream); background: linear-gradient(90deg, rgba(107,230,26,.16), rgba(107,230,26,.08)); border-bottom: 1px solid rgba(107,230,26,.4); }
.gw-impbar b { color: var(--brand); }
.gw-impbar button { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--cream); background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; cursor: pointer; transition: all .15s; }
.gw-impbar button:hover { border-color: var(--brand); color: var(--brand); }

/* Dispatch click-to-peek job quick-view (Day grid) — progressive-disclosure L2.
   Dark card per BINMATIC_SPEC: header(status pill + id + title) · body · footer. */
.dgpeek { position: fixed; z-index: 80; width: 320px; max-height: 80vh; overflow-y: auto; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 18px 50px -12px rgba(0,0,0,.7), 0 0 0 1px rgba(107,230,26,.08); color: var(--cream); }
.dgpeek .pk-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 16px 16px 8px; }
.dgpeek .pk-pill { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.dgpeek .pk-pill.done { color: var(--brand); border-color: rgba(107,230,26,.4); }
.dgpeek .pk-pill.pending { color: var(--amber); border-color: rgba(245,193,108,.4); }
.dgpeek .pk-pill.failed { color: #ff7a6e; border-color: rgba(255,122,110,.4); }
.dgpeek .pk-id { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.dgpeek .pk-title { width: 100%; font-family: var(--display); font-weight: 600; font-size: 18px; }
.dgpeek .pk-body { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.dgpeek .pk-row { display: grid; grid-template-columns: 84px 1fr; gap: 8px; font-size: 14px; align-items: baseline; }
.dgpeek .pk-l { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.dgpeek .pk-v { color: var(--cream); word-break: break-word; }
.dgpeek .pk-v a { color: var(--brand); }
.dgpeek .pk-tag { display: inline-block; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-dim); margin: 1px 0; }
.dgpeek .pk-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.dgpeek .pk-open { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--bg); background: var(--brand); border-radius: 8px; padding: 8px 13px; text-decoration: none; }
.dgpeek .pk-close { font-family: var(--mono); font-size: 11px; color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 13px; cursor: pointer; }
.dgpeek .pk-close:hover { color: var(--cream); }
/* Shared m2 bottom tab bar (#108) — lets driver screens (job detail) carry the
   same Today/Schedule/Messages/Calls/Clients nav as the mobileShell2 screens. */
body.driverbody .m2-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5,1fr); gap: 2px; background: rgba(14,16,20,.97); border-top: 1px solid var(--line-2, rgba(255,255,255,.13)); padding: 9px 6px calc(12px + env(safe-area-inset-bottom)); }
body.driverbody .driverapp { padding-bottom: 84px; }
.m2-tabs .m2-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted, #82827a); font-family: var(--mono, ui-monospace, monospace); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; position: relative; text-decoration: none; }
.m2-tabs .m2-tab svg { width: 21px; height: 21px; }
.m2-tabs .m2-tab.on { color: var(--brand, #6BE61A); }
.m2-tabs .m2-rd { position: absolute; top: -2px; right: 50%; margin-right: -15px; width: 7px; height: 7px; border-radius: 50%; background: var(--red, #E5484D); }
/* Job-detail mock skin (#108) — mobile-jobdetail.html. Prefixed jd- to avoid
   collisions; restyles the existing dvr job-detail panes to the mock look. */
.jd-acts { display: flex; justify-content: space-between; padding: 14px 16px 4px; }
.jd-act { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .03em; text-transform: uppercase; color: #C9C3B5; text-decoration: none; background: none; border: 0; cursor: pointer; flex: 1; }
.jd-act .c { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.13); display: grid; place-items: center; color: #F2E9D6; }
.jd-act .c svg { width: 20px; height: 20px; }
.jd-act.go .c { background: #6BE61A; border-color: #6BE61A; color: #0a0d07; }
.jd-act.pay .c { border-color: rgba(107,230,26,.5); color: #6BE61A; }
.jd-act[disabled] { opacity: .4; }
.jd-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.jd-row .ic { flex: none; color: #82827a; } .jd-row .ic svg { width: 18px; height: 18px; }
.jd-row .tx { flex: 1; min-width: 0; } .jd-row .k { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: #82827a; } .jd-row .v { font-size: 15px; color: #F2E9D6; margin-top: 3px; }
.jd-row .v .mi { font-family: var(--mono); font-size: 11px; color: #6BE61A; margin-left: 6px; }
.jd-row .cm { display: flex; gap: 8px; } .jd-row .cm a { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.13); display: grid; place-items: center; color: #6BE61A; } .jd-row .cm svg { width: 16px; height: 16px; }
.jd-size { font-family: var(--mono); font-weight: 700; font-size: 12px; color: #c5b4ff; border: 1px solid rgba(155,123,255,.5); background: rgba(155,123,255,.14); border-radius: 7px; padding: 4px 9px; }
.jd-tag { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 6px; padding: 4px 8px; }
.jd-tag.drop { background: rgba(155,123,255,.18); color: #c5b4ff; border: 1px solid rgba(155,123,255,.4); } .jd-tag.pick { background: rgba(107,230,26,.14); color: #6BE61A; border: 1px solid rgba(107,230,26,.4); } .jd-tag.swap { background: rgba(255,200,61,.14); color: #FFC83D; border: 1px solid rgba(255,200,61,.4); } .jd-tag.dump { background: rgba(229,72,77,.14); color: #ff8b8f; border: 1px solid rgba(229,72,77,.4); }
.jd-notebox { margin: 14px 16px 0; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: linear-gradient(180deg,#1b1e24,#15171b); padding: 12px 13px; font-size: 13.5px; color: #C9C3B5; line-height: 1.5; } .jd-notebox b { color: #F2E9D6; }
.jd-fhead { margin: 14px 16px 0; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: linear-gradient(180deg,#1b1e24,#15171b); padding: 15px 16px; display: flex; align-items: flex-end; justify-content: space-between; }
.jd-fhead .l { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: #82827a; } .jd-fhead .v { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: #6BE61A; margin-top: 4px; }
.jd-fhead .st { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: #FFC83D; border: 1px solid rgba(255,200,61,.4); border-radius: 999px; padding: 5px 10px; } .jd-fhead .st.paid { color: #6BE61A; border-color: rgba(107,230,26,.4); }
.jd-li { display: flex; justify-content: space-between; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 14px; } .jd-li .d { color: #F2E9D6; } .jd-li .s { font-family: var(--mono); font-size: 11px; color: #82827a; margin-top: 2px; } .jd-li .amt { font-family: var(--mono); color: #F2E9D6; font-weight: 600; }
.jd-li.tot { font-family: var(--display); text-transform: uppercase; } .jd-li.tot .amt { color: #6BE61A; font-size: 18px; font-weight: 800; }
.jd-collect { margin: 16px 16px 0; display: block; text-align: center; background: #6BE61A; color: #0a0d07; font-family: var(--mono); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; border: none; border-radius: 13px; padding: 15px; text-decoration: none; }
.jd-cardchip { display: flex; align-items: center; gap: 10px; margin: 11px 16px 0; font-family: var(--mono); font-size: 11.5px; color: #C9C3B5; } .jd-cardchip svg { width: 16px; height: 16px; color: #6BE61A; }
.jd-tl { padding: 14px 16px; } .jd-tlrow { display: flex; gap: 12px; position: relative; padding-bottom: 18px; } .jd-tlrow::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: -2px; width: 1px; background: rgba(255,255,255,.13); } .jd-tlrow:last-child::before { display: none; }
.jd-tldot { flex: none; width: 17px; height: 17px; border-radius: 50%; border: 2px solid #6BE61A; background: #121419; margin-top: 1px; z-index: 1; } .jd-tldot.auto { background: #6BE61A; } .jd-tldot.amber { border-color: #FFC83D; }
.jd-tlbd { flex: 1; } .jd-tlt { font-size: 14px; color: #F2E9D6; } .jd-tlt .who { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: #6BE61A; margin-left: 6px; } .jd-tlt .who.h { color: #FFC83D; } .jd-tlm { font-family: var(--mono); font-size: 11px; color: #82827a; margin-top: 3px; }
.jd-primary { display: block; width: calc(100% - 32px); margin: 16px 16px 0; text-align: center; border: 0; border-radius: 13px; padding: 16px; font-family: var(--mono); font-weight: 700; font-size: 15px; cursor: pointer; }
.jd-primary.arrive { background: #FFC83D; color: #0a0d07; } .jd-primary.complete { background: #6BE61A; color: #0a0d07; } .jd-primary.done { background: rgba(255,255,255,.06); color: #82827a; }
