/* T-CarButler · design tokens follow the case presentation:
   graphite #111827, signal yellow #FFD43B, warm paper #F4F3EE, Manrope + Golos Text. */
:root{
  --ink:#161B26; --ink-2:#2B3140; --text-2:#4A5263; --muted:#5F6673; --muted-2:#8C96A8;
  --bg:#F4F3EE; --surface:#FCFBF8; --surface-2:#EFEDE6; --surface-3:#E7E5DE; --line:#DEDBD2; --line-2:#CFCBC0;
  --graphite:#111827; --graphite-2:#1D2740; --graphite-3:#24324D; --line-dark:#2E3B58; --on-dark:#F4F3EE; --on-dark-2:#B6BFCE;
  --yellow:#FFD43B; --yellow-hover:#F5C800; --yellow-soft:#FFE68A; --yellow-pale:#FFF3C4; --yellow-ink:#3D3000; --yellow-deep:#C29A00;
  --blue:#1F4FC0; --blue-pale:#DCE6FB; --green:#1E7A4C; --green-pale:#DDF1E6; --green-dark:#7FD1A8;
  --orange:#8A3B0F; --orange-pale:#F8E1D2; --red:#B42318; --red-pale:#FCE4E2;
  --r-xl:28px; --r-lg:22px; --r-md:16px; --r-sm:12px; --r-xs:8px;
  --shadow:0 1px 2px rgba(22,27,38,.04),0 8px 24px rgba(22,27,38,.06);
  --shadow-lg:0 24px 64px rgba(17,24,39,.22);
  --font-head:'Manrope',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  --font-body:'Golos Text',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  --side-w:264px; --top-h:72px; --bottom-h:68px; --gutter:32px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 var(--font-body);-webkit-font-smoothing:antialiased;overflow-x:hidden}
h1,h2,h3,h4{font-family:var(--font-head);margin:0;letter-spacing:-.02em;color:inherit}
p{margin:0}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
button:disabled{cursor:not-allowed;opacity:.5}
:focus-visible{outline:3px solid var(--yellow);outline-offset:2px;border-radius:6px}
svg.i{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
svg.i.sm{width:16px;height:16px}
svg.i.lg{width:24px;height:24px}
svg.i.xl{width:28px;height:28px}
[hidden]{display:none!important}

/* ---------- shell ---------- */
.app{display:flex;min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--side-w);background:var(--graphite);color:var(--on-dark);display:flex;flex-direction:column;padding:22px 16px 18px;z-index:40;overflow-y:auto}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;padding:4px 8px 22px}
.brand-mark,.top-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--yellow);color:var(--ink);font:800 22px/1 var(--font-head)}
.brand-text b{display:block;font:800 19px/1.1 var(--font-head);letter-spacing:-.02em}
.brand-text small{display:block;color:var(--muted-2);font-size:12px;letter-spacing:.06em;text-transform:uppercase;margin-top:3px}
.side-nav{display:flex;flex-direction:column;gap:4px}
.side-label{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted-2);padding:16px 12px 6px}
.nav-item{display:flex;align-items:center;gap:12px;width:100%;padding:11px 12px;border-radius:14px;color:var(--on-dark-2);font-weight:500;text-align:left;transition:background .15s,color .15s}
.nav-item:hover{background:var(--graphite-2);color:var(--on-dark)}
.nav-item.active{background:var(--yellow);color:var(--ink);font-weight:600}
.nav-item .nav-count{margin-left:auto;min-width:22px;height:22px;padding:0 7px;border-radius:99px;background:var(--graphite-3);color:var(--on-dark);font-size:12px;font-weight:700;display:grid;place-items:center}
.nav-item.active .nav-count{background:var(--ink);color:var(--yellow)}
.nav-count.alert{background:#E5484D;color:#fff}
.side-foot{margin-top:auto;padding-top:18px}
.demo-pill{display:flex;gap:12px;padding:14px;border-radius:16px;background:var(--graphite-2);border:1px solid var(--line-dark)}
.demo-pill b{display:block;font-size:13px}
.demo-pill small{display:block;color:var(--muted-2);font-size:12px;line-height:1.4;margin-top:2px}
.pulse{width:9px;height:9px;border-radius:50%;background:var(--yellow);margin-top:5px;flex:none;box-shadow:0 0 0 0 rgba(255,212,59,.6);animation:pulse 2.2s infinite}
@keyframes pulse{70%{box-shadow:0 0 0 8px rgba(255,212,59,0)}100%{box-shadow:0 0 0 0 rgba(255,212,59,0)}}

.main{flex:1;min-width:0;margin-left:var(--side-w);display:flex;flex-direction:column;min-height:100vh}
.topbar{position:sticky;top:0;z-index:30;height:var(--top-h);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 var(--gutter);background:rgba(244,243,238,.86);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid rgba(222,219,210,.7)}
.top-left{display:flex;align-items:center;gap:12px;min-width:0}
.top-mark{display:none;width:36px;height:36px;font-size:19px;border-radius:11px}
.top-title{min-width:0}
.top-title small{display:block;font-size:12px;color:var(--muted);line-height:1.2}
.top-title strong{display:block;font:800 18px/1.25 var(--font-head);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-actions{display:flex;align-items:center;gap:10px;min-width:0}
.icon-btn{position:relative;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);flex:none}
.icon-btn:hover{border-color:var(--line-2)}
.count-badge{position:absolute;top:-5px;right:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:#E5484D;color:#fff;font:700 11px/20px var(--font-body);font-style:normal;text-align:center;border:2px solid var(--bg)}
.profile{display:flex;align-items:center;gap:10px;padding:4px 12px 4px 4px;border-radius:16px;border:1px solid var(--line);background:var(--surface)}
.avatar{width:36px;height:36px;border-radius:12px;background:var(--graphite);color:var(--yellow);display:grid;place-items:center;font:800 16px var(--font-head)}
.profile-text b{display:block;font-size:13px;line-height:1.2;white-space:nowrap}
.profile-text small{display:block;font-size:11px;color:var(--muted)}

/* car switcher in topbar */
.car-switch{position:relative;min-width:0}
.car-pill{display:flex;align-items:center;gap:10px;height:44px;padding:0 12px 0 6px;border-radius:14px;background:var(--graphite);color:var(--on-dark);max-width:300px;min-width:0}
.car-pill .mini-car{width:46px;height:32px;border-radius:10px;background:var(--graphite-2);display:grid;place-items:center;flex:none}
.car-pill .mini-car svg{width:40px;height:20px}
.car-pill .txt{min-width:0;text-align:left}
.car-pill b{display:block;font-size:13px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.car-pill small{display:block;font-size:11px;color:var(--muted-2);white-space:nowrap}
.car-menu{position:absolute;right:0;top:calc(100% + 8px);width:320px;max-width:calc(100vw - 24px);background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-lg);padding:8px;z-index:60}
.car-menu-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border-radius:14px;text-align:left}
.car-menu-item:hover{background:var(--surface-2)}
.car-menu-item.active{background:var(--yellow-pale)}
.car-menu-item .thumb{width:56px;height:38px;border-radius:10px;background:var(--surface-3);display:grid;place-items:center;flex:none}
.car-menu-item .thumb svg{width:50px;height:24px}
.car-menu-item b{display:block;font-size:14px}
.car-menu-item small{display:block;color:var(--muted);font-size:12px}
.car-menu-item .end{margin-left:auto}
.car-menu hr{border:0;border-top:1px solid var(--line);margin:6px 4px}

#content{flex:1;width:100%;max-width:1360px;margin:0 auto;padding:28px var(--gutter) 40px}
.footer{padding:18px var(--gutter) 28px;color:var(--muted);font-size:12px;text-align:center}
.loading{min-height:50vh;display:grid;place-items:center;align-content:center;gap:14px;color:var(--muted)}
.spinner{width:36px;height:36px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--yellow);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- page head ---------- */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px;flex-wrap:wrap}
.page-head .kicker{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin-bottom:8px}
.page-head h1{font-size:clamp(26px,3.2vw,38px);font-weight:800;line-height:1.1}
.page-head p{color:var(--text-2);margin-top:8px;max-width:640px}
.head-actions{display:flex;gap:10px;flex-wrap:wrap}

/* ---------- primitives ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow);min-width:0}
.card.pad{padding:22px}
.card.dark{background:var(--graphite);border-color:var(--graphite);color:var(--on-dark)}
.card.yellow{background:var(--yellow);border-color:var(--yellow);color:var(--ink)}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.card-head h2{font-size:19px;font-weight:800;line-height:1.25;display:flex;align-items:center;gap:10px}
.card-head small{color:var(--muted);font-size:13px}
.card.dark .card-head small{color:var(--muted-2)}
.eyebrow{font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.card.dark .eyebrow{color:var(--muted-2)}
.grid{display:grid;gap:18px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.split{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)}
.split-r{grid-template-columns:minmax(0,1fr) minmax(0,1.45fr)}
.stack{display:flex;flex-direction:column;gap:18px;min-width:0}
.mb{margin-bottom:18px}
.mt{margin-top:18px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.between{display:flex;align-items:center;justify-content:space-between;gap:12px}
.muted{color:var(--muted)}
.small{font-size:13px}
.num{font-family:var(--font-head);font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:14px;font-weight:600;font-size:14px;background:var(--surface);border:1px solid var(--line-2);color:var(--ink);transition:background .15s,border-color .15s,transform .05s;white-space:nowrap;text-decoration:none}
.btn:hover{border-color:var(--ink-2)}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--yellow);border-color:var(--yellow);color:var(--ink)}
.btn-primary:hover{background:var(--yellow-hover);border-color:var(--yellow-hover)}
.btn-dark{background:var(--ink);border-color:var(--ink);color:var(--on-dark)}
.btn-dark:hover{background:#000;border-color:#000}
.btn-ghost-dark{background:transparent;border-color:var(--line-dark);color:var(--on-dark)}
.btn-ghost-dark:hover{border-color:var(--muted-2)}
.btn-soft{background:var(--surface-2);border-color:transparent}
.btn-soft:hover{background:var(--surface-3);border-color:transparent}
.btn-danger{background:var(--surface);border-color:#E9B8B3;color:var(--red)}
.btn-danger:hover{background:var(--red-pale);border-color:var(--red)}
.btn-sm{min-height:36px;padding:0 13px;border-radius:11px;font-size:13px}
.btn-block{width:100%}
.link{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:14px;color:var(--ink);border-bottom:2px solid var(--yellow);padding-bottom:1px}
.card.dark .link{color:var(--on-dark)}

.tag{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:99px;font-size:12px;font-weight:600;background:var(--surface-2);color:var(--ink-2);white-space:nowrap}
.tag svg.i{width:14px;height:14px}
.tag.yellow{background:var(--yellow-soft);color:var(--yellow-ink)}
.tag.blue{background:var(--blue-pale);color:var(--blue)}
.tag.green{background:var(--green-pale);color:var(--green)}
.tag.orange{background:var(--orange-pale);color:var(--orange)}
.tag.red{background:var(--red-pale);color:var(--red)}
.tag.dark{background:var(--graphite);color:var(--yellow)}
.tag.outline{background:transparent;border:1px solid var(--line-2)}
.card.dark .tag{background:var(--graphite-2);color:var(--on-dark-2)}
.card.dark .tag.yellow{background:var(--yellow);color:var(--ink)}
.dot{width:8px;height:8px;border-radius:50%;flex:none;display:inline-block}

.plate{display:inline-flex;align-items:stretch;height:26px;border:1.5px solid var(--ink);border-radius:6px;background:#fff;color:var(--ink);font:700 13px/1 var(--font-head);letter-spacing:.04em;overflow:hidden;white-space:nowrap}
.plate span{display:flex;align-items:center;padding:0 7px}
.plate i{display:flex;align-items:center;font-style:normal;font-size:10px;padding:0 5px;border-left:1.5px solid var(--ink)}

.ico-box{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;flex:none;background:var(--surface-2);color:var(--ink)}
.ico-box.yellow{background:var(--yellow);color:var(--ink)}
.ico-box.pale{background:var(--yellow-pale);color:var(--yellow-ink)}
.ico-box.dark{background:var(--graphite);color:var(--yellow)}
.ico-box.red{background:var(--red-pale);color:var(--red)}
.ico-box.orange{background:var(--orange-pale);color:var(--orange)}
.ico-box.blue{background:var(--blue-pale);color:var(--blue)}
.ico-box.green{background:var(--green-pale);color:var(--green)}
.ico-box.sm{width:36px;height:36px;border-radius:11px}

.bar{height:8px;border-radius:99px;background:var(--surface-3);overflow:hidden}
.bar span{display:block;height:100%;border-radius:inherit;background:var(--yellow)}
.card.dark .bar{background:var(--graphite-3)}
.bar.warn span{background:#F59E0B}.bar.crit span{background:#E5484D}

.notice{display:flex;gap:12px;padding:14px 16px;border-radius:var(--r-md);background:var(--surface-2);color:var(--text-2);font-size:13px;line-height:1.5}
.notice svg.i{color:var(--muted);margin-top:1px}
.notice.yellow{background:var(--yellow-pale);color:var(--yellow-ink)}
.notice.yellow svg.i{color:var(--yellow-ink)}
.notice.dashed{background:transparent;border:1px dashed var(--line-2)}
.notice b{color:var(--ink)}

.empty{text-align:center;padding:30px 16px;color:var(--muted)}
.empty .ico-box{margin:0 auto 12px}
.empty h3{font-size:17px;color:var(--ink);margin-bottom:4px}
.empty p{font-size:14px;max-width:360px;margin:0 auto 14px}

.list-row{display:flex;align-items:center;gap:14px;padding:13px 0;border-top:1px solid var(--line);min-width:0}
.list-row:first-child{border-top:0;padding-top:0}
.list-row:last-child{padding-bottom:0}
.list-row .grow{flex:1;min-width:0}
.list-row b{display:block;font-size:14px;line-height:1.35}
.list-row small{display:block;color:var(--muted);font-size:12.5px;line-height:1.4}
.list-row .end{text-align:right;flex:none}

/* segmented tabs */
.seg{display:inline-flex;padding:4px;border-radius:14px;background:var(--surface-2);gap:2px;max-width:100%;overflow-x:auto;scrollbar-width:none}
.seg::-webkit-scrollbar{display:none}
.seg button{height:34px;padding:0 13px;border-radius:10px;font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap}
.seg button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(22,27,38,.12)}

/* ---------- car illustration ---------- */
.car-art{display:block;width:100%;height:auto}

/* ---------- dashboard ---------- */
.hello{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px;flex-wrap:wrap}
.hello h1{font-size:clamp(26px,3.4vw,40px);font-weight:800;line-height:1.08}
.hello p{color:var(--text-2);margin-top:6px}
.quick{display:flex;gap:10px;flex-wrap:wrap}

.garage-strip{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;padding:14px 2px 10px;margin:-12px -2px 8px;scrollbar-width:thin}
.garage-strip::-webkit-scrollbar{height:6px}.garage-strip::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:9px}
.gcar{position:relative;flex:0 0 300px;scroll-snap-align:start;text-align:left;border-radius:var(--r-lg);padding:16px 16px 14px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:10px;transition:transform .15s,border-color .15s}
.gcar:hover{transform:translateY(-2px);border-color:var(--line-2)}
.gcar.active{background:var(--graphite);border-color:var(--graphite);color:var(--on-dark);box-shadow:0 0 0 3px var(--yellow),var(--shadow)}
.gcar .top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.gcar h3{font-size:18px;font-weight:800;line-height:1.2}
.gcar .sub{font-size:12px;color:var(--muted)}
.gcar.active .sub{color:var(--muted-2)}
.gcar .art{height:74px;display:flex;align-items:center;justify-content:center}
.gcar .art svg{height:74px;width:auto;max-width:100%}
.gcar .meta{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.gcar .chips{display:flex;gap:6px;flex-wrap:wrap}
.gcar.active .tag{background:var(--graphite-2);color:var(--on-dark-2)}
.gcar.active .tag.yellow{background:var(--yellow);color:var(--ink)}
.gcar.active .tag.red{background:#4A1D22;color:#FFB4AE}
.gcar .active-flag{position:absolute;top:-10px;left:16px;background:var(--yellow);color:var(--ink);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:3px 9px;border-radius:99px}
.gcar.add{align-items:center;justify-content:center;border-style:dashed;border-width:1.5px;border-color:var(--line-2);background:transparent;box-shadow:none;color:var(--muted);gap:8px;min-height:200px}
.gcar.add:hover{color:var(--ink);border-color:var(--ink-2)}

.ring{position:relative;flex:none;display:grid;place-items:center}
.ring svg{transform:rotate(-90deg)}
.ring .ring-val{position:absolute;inset:0;display:grid;place-items:center;font:800 15px var(--font-head)}
.ring.lg .ring-val{font-size:24px}

.hero{position:relative;overflow:hidden;padding:26px;display:flex;flex-direction:column;gap:20px;background:radial-gradient(circle at 88% 18%,#24324D 0%,#111827 62%)}
.hero .hero-top{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.hero h2{font-size:clamp(28px,3vw,40px);font-weight:800;line-height:1.05;letter-spacing:-.03em}
.hero .sub{color:var(--on-dark-2);margin-top:6px;font-size:14px}
.hero .hero-art{position:relative;margin:-6px 0 -10px;display:flex;justify-content:center}
.hero .hero-art svg{width:min(100%,460px);height:auto}
.hero .stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.hero .stat{padding:14px;border-radius:16px;background:var(--graphite-2);border:1px solid var(--line-dark);min-width:0}
.hero .stat small{display:block;color:var(--muted-2);font-size:12px}
.hero .stat b{display:block;font:800 20px/1.25 var(--font-head);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hero .next{display:flex;flex-direction:column;gap:8px}
.hero .actions{display:flex;gap:10px;flex-wrap:wrap}

.signal{padding:24px;display:flex;flex-direction:column;gap:12px;background:var(--yellow);border:0;color:var(--ink)}
.signal .eyebrow{color:var(--yellow-ink)}
.signal h3{font-size:clamp(22px,2.2vw,28px);font-weight:800;line-height:1.15}
.signal p{color:var(--yellow-ink)}
.signal .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:auto;padding-top:6px}
.signal .btn{background:rgba(255,255,255,.55);border-color:transparent}
.signal .btn-dark{background:var(--ink);color:var(--on-dark)}
.signal.ok{background:var(--surface);border:1px solid var(--line)}
.signal.ok .eyebrow,.signal.ok p{color:var(--muted)}

.approval{padding:20px;display:flex;flex-direction:column;gap:12px;border-color:#EBC3A8;background:#FDF3EC}
.approval h3{font-size:17px;font-weight:800;color:var(--orange)}

/* timeline */
.tl-item{display:flex;gap:14px;align-items:center;padding:12px 0;border-top:1px solid var(--line);min-width:0}
.tl-item:first-child{border-top:0;padding-top:2px}
.tl-date{width:52px;flex:none;text-align:center;border-radius:14px;padding:6px 0;background:var(--surface-2)}
.tl-date b{display:block;font:800 20px/1.1 var(--font-head)}
.tl-date small{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.tl-date.crit{background:var(--red-pale)}.tl-date.crit b{color:var(--red)}
.tl-date.warn{background:var(--yellow-pale)}
.tl-date.book{background:var(--graphite);color:var(--on-dark)}.tl-date.book small{color:var(--muted-2)}
.tl-body{flex:1;min-width:0}
.tl-body b{display:block;font-size:14px;line-height:1.35}
.tl-body .row{gap:6px;margin-top:4px}
.tl-body small{color:var(--muted);font-size:12.5px}
.tl-body .tl-when{display:none;font-weight:600;color:var(--ink-2)}
.car-chip{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 8px;border-radius:99px;background:var(--surface-2);font-size:11.5px;font-weight:600;color:var(--ink-2);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.car-chip .dot{width:9px;height:9px;border:1px solid rgba(22,27,38,.25)}
.when{flex:none;font-size:12px;font-weight:700;padding:4px 9px;border-radius:99px;background:var(--surface-2);color:var(--ink-2);white-space:nowrap}
.when.crit{background:var(--red-pale);color:var(--red)}
.when.warn{background:var(--yellow-soft);color:var(--yellow-ink)}

/* notifications list */
.note{display:flex;gap:12px;padding:12px;border-radius:16px;width:100%;text-align:left;align-items:flex-start;transition:background .15s}
.note:hover{background:var(--surface-2)}
.note .grow{flex:1;min-width:0}
.note b{display:block;font-size:14px;line-height:1.35}
.note p{font-size:13px;color:var(--text-2);margin-top:2px;line-height:1.45}
.note small{font-size:12px;color:var(--muted)}
.note.unread{background:var(--yellow-pale)}
.note.unread:hover{background:#FFEDB0}
.unread-dot{width:9px;height:9px;border-radius:50%;background:#E5484D;flex:none;margin-top:6px}

/* order mini */
.order-mini{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:16px;border:1px solid var(--line);background:var(--surface)}
.order-mini + .order-mini{margin-top:10px}
.steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.steps .st{display:flex;flex-direction:column;gap:6px;font-size:11.5px;color:var(--muted);min-width:0}
.steps .st i{display:block;height:5px;border-radius:9px;background:var(--surface-3)}
.steps .st.done i{background:var(--ink)}
.steps .st.cur i{background:var(--yellow)}
.steps .st.cur{color:var(--ink);font-weight:600}
.steps .st span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* forecast */
.big-money{font:800 clamp(28px,3vw,36px)/1.1 var(--font-head);letter-spacing:-.03em}
.fc-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px dashed var(--line)}
.fc-row:first-of-type{border-top:0}
.fc-row .grow{flex:1;min-width:0}
.fc-row b{display:block;font-size:14px}
.fc-row small{color:var(--muted);font-size:12px}

/* services tiles */
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:12px}
.tile{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:16px;border-radius:18px;background:var(--surface);border:1px solid var(--line);text-align:left;transition:border-color .15s,transform .15s;min-width:0}
.tile:hover{border-color:var(--ink-2);transform:translateY(-2px)}
.tile b{font-size:14px;line-height:1.3}
.tile small{color:var(--muted);font-size:12px}
.tile.selected{background:var(--graphite);border-color:var(--graphite);color:var(--on-dark)}
.tile.selected small{color:var(--muted-2)}
.tile.selected .ico-box{background:var(--yellow);color:var(--ink)}

/* ---------- garage ---------- */
.car-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:center}
.spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.spec{padding:12px 14px;border-radius:14px;background:var(--graphite-2);border:1px solid var(--line-dark);min-width:0}
.spec small{display:block;font-size:12px;color:var(--muted-2)}
.spec b{display:block;font-size:15px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.due-card{display:flex;flex-direction:column;gap:12px;padding:18px}
.due-card .between b{font-size:15px}
.due-card .date{font:800 22px/1.15 var(--font-head)}
.history-item{display:flex;gap:14px;padding:14px 0;border-top:1px solid var(--line)}
.history-item:first-child{border-top:0;padding-top:0}
.history-item .grow{flex:1;min-width:0}
.history-item b{display:block;font-size:14.5px}
.history-item small{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}
.history-item p{font-size:13px;color:var(--text-2);margin-top:6px}
.history-item .cost{font:800 16px var(--font-head);white-space:nowrap}

/* ---------- concierge ---------- */
.step-card{padding:22px}
.step-num{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--yellow);font:800 16px var(--font-head);color:var(--ink);flex:none}
.step-title{display:flex;align-items:center;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.step-title h2{font-size:19px;font-weight:800}
.step-title small{color:var(--muted);font-size:13px;width:100%;padding-left:46px;margin-top:-8px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{height:34px;padding:0 13px;border-radius:99px;border:1px solid var(--line-2);background:var(--surface);font-size:13px;font-weight:500;white-space:nowrap}
.chip:hover{border-color:var(--ink);background:var(--yellow-pale)}
.triage{padding:18px;border-radius:18px;background:var(--surface-2);display:flex;flex-direction:column;gap:10px}
.triage.critical{background:var(--red-pale)}
.triage h3{font-size:17px;font-weight:800}
.triage p{font-size:13.5px;color:var(--text-2)}
.guarantee{display:flex;gap:14px;align-items:center;padding:16px 18px;border-radius:18px;background:var(--graphite);color:var(--on-dark)}
.guarantee b{display:block;font-size:15px}
.guarantee small{display:block;color:var(--on-dark-2);font-size:13px}

.provider{display:flex;flex-direction:column;gap:14px;padding:18px}
.provider .head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between}
.provider h3{font-size:17px;font-weight:800;line-height:1.25}
.provider .addr{font-size:12.5px;color:var(--muted);margin-top:3px}
.provider .why{font-size:13.5px;color:var(--text-2)}
.provider .price-line{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;padding-top:12px;border-top:1px solid var(--line)}
.provider .price-line small{display:block;font-size:12px;color:var(--muted)}
.provider .price-line b{font:800 24px/1.1 var(--font-head)}
.provider .actions{display:grid;grid-template-columns:auto 1fr;gap:10px}
.provider.best{border:2px solid var(--yellow);box-shadow:0 0 0 4px var(--yellow-pale),var(--shadow)}
.best-flag{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;background:var(--yellow);color:var(--ink);font-size:12px;font-weight:700;padding:4px 10px;border-radius:99px}

/* ---------- orders ---------- */
.order{padding:20px;display:flex;flex-direction:column;gap:16px}
.order .o-head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.order .o-title{display:flex;gap:14px;align-items:center;min-width:0}
.order h3{font-size:18px;font-weight:800;line-height:1.25}
.order .o-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.order .o-cell{padding:12px 14px;border-radius:14px;background:var(--surface-2);min-width:0}
.order .o-cell small{display:block;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.order .o-cell b{display:block;font-size:14px;margin-top:3px;overflow-wrap:anywhere}
.order .o-cell span{display:block;font-size:12.5px;color:var(--muted);overflow-wrap:anywhere}
.estimate{border-radius:18px;border:1px solid var(--line);overflow:hidden}
.estimate .e-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;background:var(--surface-2);flex-wrap:wrap}
.estimate .e-head b{display:flex;align-items:center;gap:8px;font-size:14px}
.estimate .e-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--line);flex-wrap:wrap}
.estimate .e-row .grow{flex:1;min-width:180px}
.estimate .e-row b{display:block;font-size:14px}
.estimate .e-row small{display:block;font-size:12.5px;color:var(--muted)}
.estimate .e-row .amt{font:800 15px var(--font-head);white-space:nowrap}
.estimate .e-row.pending{background:#FDF3EC}
.estimate .e-row.declined .amt{text-decoration:line-through;color:var(--muted)}
.estimate .e-total{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-top:1px solid var(--line);background:var(--surface)}
.estimate .e-total b{font:800 20px var(--font-head)}
.sim{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:12px 14px;border-radius:16px;border:1px dashed var(--line-2)}
.sim > small{width:100%;font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}

/* ---------- analytics ---------- */
.kpi{padding:18px;display:flex;flex-direction:column;gap:10px}
.kpi .between small{color:var(--muted);font-size:13px}
.kpi b.num{font-size:26px;line-height:1.1}
.kpi p{font-size:12.5px;color:var(--muted)}
.hbar{margin-bottom:14px}
.hbar:last-child{margin-bottom:0}
.hbar .between{font-size:13.5px;margin-bottom:6px}
.months{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:6px;align-items:end;height:170px;padding-top:10px}
.months .m{display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end;min-width:0}
.months .m i{display:block;width:100%;max-width:30px;border-radius:7px 7px 3px 3px;background:var(--yellow);min-height:3px}
.months .m i.zero{background:var(--surface-3)}
.months .m small{font-size:10.5px;color:var(--muted);white-space:nowrap}
.pipeline{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.pipeline div{padding:14px 6px;border-radius:12px;background:var(--surface-3);font-size:12.5px;font-weight:600;text-align:center;line-height:1.25}
.pipeline div.hi{background:var(--yellow-soft)}
.pipeline div.dk{background:var(--ink);color:var(--on-dark)}
.insight{padding:14px 0;border-top:1px solid var(--line)}
.insight:first-child{border-top:0;padding-top:0}
.insight b{display:flex;align-items:center;gap:8px;font-size:14px}
.insight p{font-size:13.5px;color:var(--text-2);margin-top:4px}
.stars{color:#E0A800;letter-spacing:1px}

/* ---------- settings ---------- */
.field{display:flex;flex-direction:column;gap:7px;min-width:0}
.field label{font-size:13px;font-weight:600;color:var(--ink-2);display:flex;justify-content:space-between;align-items:center;gap:8px}
.field.full{grid-column:1/-1}
.input,.select,.textarea{width:100%;min-height:46px;padding:11px 14px;border-radius:14px;border:1px solid var(--line-2);background:#fff;font-size:15px;transition:border-color .15s,box-shadow .15s}
.textarea{min-height:110px;resize:vertical;line-height:1.5}
.input:focus,.select:focus,.textarea:focus{outline:0;border-color:var(--ink);box-shadow:0 0 0 3px rgba(255,212,59,.55)}
.select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6673' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:18px;padding-right:40px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;align-items:center}
.check{display:flex;gap:10px;align-items:flex-start;font-size:14px;font-weight:500;color:var(--ink-2)}
.check input{width:20px;height:20px;accent-color:var(--ink);margin-top:1px;flex:none}
.range-val{min-width:44px;text-align:center;font:800 14px var(--font-head);padding:3px 8px;border-radius:9px;background:var(--yellow-pale)}
input[type=range]{width:100%;accent-color:var(--ink);height:28px}
.weights{display:flex;height:12px;border-radius:99px;overflow:hidden;background:var(--surface-3)}
.weights span{display:block;height:100%}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12.5px;color:var(--text-2);margin-top:8px}
.legend span{display:inline-flex;align-items:center;gap:6px}
.swatches{display:flex;gap:8px;flex-wrap:wrap}
.swatches label{position:relative}
.swatches input{position:absolute;opacity:0;inset:0}
.swatches span{display:block;width:34px;height:34px;border-radius:11px;border:2px solid var(--line-2);cursor:pointer}
.swatches input:checked + span{box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--ink)}
.swatches input:focus-visible + span{outline:3px solid var(--yellow);outline-offset:3px}
.bodies{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.bodies label{position:relative}
.bodies input{position:absolute;opacity:0;inset:0}
.bodies span{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;border-radius:12px;border:1.5px solid var(--line-2);font-size:12px;font-weight:600;cursor:pointer}
.bodies span svg{width:58px;height:26px}
.bodies input:checked + span{border-color:var(--ink);background:var(--yellow-pale)}

.table-wrap{overflow-x:auto;border-radius:14px;border:1px solid var(--line)}
table.data{width:100%;border-collapse:collapse;font-size:13px;min-width:520px}
table.data th,table.data td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
table.data th{background:var(--surface-2);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
table.data tr:last-child td{border-bottom:0}

/* ---------- overlays ---------- */
.backdrop{position:fixed;inset:0;background:rgba(17,24,39,.5);z-index:80;display:flex;align-items:center;justify-content:center;padding:24px;animation:fade .15s ease}
@keyframes fade{from{opacity:0}}
.modal{width:min(640px,100%);max-height:calc(100vh - 48px);display:flex;flex-direction:column;background:var(--surface);border-radius:26px;box-shadow:var(--shadow-lg);animation:rise .2s ease}
@keyframes rise{from{transform:translateY(16px);opacity:0}}
.modal-head{display:flex;justify-content:space-between;gap:14px;padding:22px 22px 14px;border-bottom:1px solid var(--line)}
.modal-head h2{font-size:21px;font-weight:800;line-height:1.2}
.modal-head p{font-size:13.5px;color:var(--muted);margin-top:4px}
.modal-close{width:40px;height:40px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;flex:none}
.modal-body{padding:20px 22px 24px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.drawer{position:fixed;top:0;right:0;bottom:0;width:min(420px,100%);background:var(--surface);z-index:85;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;animation:slide .2s ease}
@keyframes slide{from{transform:translateX(30px);opacity:0}}
.drawer .modal-body{padding:10px 12px 24px;flex:1}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:85;background:var(--surface);border-radius:26px 26px 0 0;padding:10px 16px calc(18px + env(safe-area-inset-bottom));box-shadow:var(--shadow-lg);animation:up .2s ease}
@keyframes up{from{transform:translateY(40px);opacity:0}}
.sheet .grab{width:44px;height:5px;border-radius:9px;background:var(--line-2);margin:4px auto 12px}
.sheet .nav-item{color:var(--ink);padding:14px 12px}
.sheet .nav-item:hover{background:var(--surface-2)}
.sheet .nav-item.active{background:var(--yellow)}

#toasts{position:fixed;right:24px;bottom:24px;z-index:120;display:flex;flex-direction:column;gap:10px;align-items:flex-end;pointer-events:none}
.toast{display:flex;gap:10px;align-items:center;max-width:380px;padding:13px 16px;border-radius:16px;background:var(--graphite);color:var(--on-dark);font-size:14px;box-shadow:var(--shadow-lg);animation:rise .2s ease;pointer-events:auto}
.toast svg.i{color:var(--yellow)}
.toast.err{background:var(--red)}
.toast.err svg.i{color:#fff}

/* ---------- bottom navigation (phones/tablets) ---------- */
.bottom-nav{display:none}

/* ---------- responsive ---------- */
@media (max-width:1280px){
  .order .o-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .g4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:1100px){
  .split,.split-r{grid-template-columns:minmax(0,1fr)}
  .g3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .car-detail{grid-template-columns:minmax(0,1fr)}
  .pipeline{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:1023px){
  :root{--gutter:20px}
  .sidebar{display:none}
  .main{margin-left:0}
  .top-mark{display:grid}
  .profile{display:none}
  .bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:50;height:calc(var(--bottom-h) + env(safe-area-inset-bottom));padding:6px 6px env(safe-area-inset-bottom);background:rgba(17,24,39,.97);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--line-dark)}
  .bn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted-2);font-size:11px;font-weight:600;position:relative;border-radius:14px;min-width:0}
  .bn span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .bn.active{color:var(--yellow)}
  .bn.center .bubble{width:46px;height:46px;margin-top:-20px;border-radius:16px;background:var(--yellow);color:var(--ink);display:grid;place-items:center;box-shadow:0 6px 18px rgba(255,212,59,.35);border:3px solid var(--graphite)}
  .bn.center.active{color:var(--yellow)}
  .bn .bn-badge{position:absolute;top:2px;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#E5484D;color:#fff;font-size:10.5px;line-height:18px;text-align:center}
  .footer{padding-bottom:calc(var(--bottom-h) + 28px + env(safe-area-inset-bottom))}
  #toasts{left:16px;right:16px;bottom:calc(var(--bottom-h) + 14px + env(safe-area-inset-bottom));align-items:stretch}
  .toast{max-width:none}
}
@media (max-width:760px){
  :root{--gutter:16px;--top-h:64px}
  body{font-size:15px}
  #content{padding-top:18px;padding-bottom:24px}
  .g2,.g3,.g4,.form-grid{grid-template-columns:minmax(0,1fr)}
  .g4.keep2,.g3.keep2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid{gap:14px}
  .stack{gap:14px}
  .mb{margin-bottom:14px}.mt{margin-top:14px}
  .card.pad,.step-card{padding:18px}
  .top-title small{display:none}
  .top-title strong{font-size:17px}
  .car-pill{padding-right:10px;max-width:190px}
  .car-pill .mini-car{display:none}
  .car-pill{padding-left:12px}
  .icon-btn{width:42px;height:42px}
  .hello .quick{width:100%}
  .hello .quick .btn{flex:1 1 calc(50% - 5px)}
  .gcar{flex-basis:78%}
  .hero{padding:20px}
  .hero .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .hero .stat{padding:10px}
  .hero .stat b{font-size:16px}
  .hero .actions .btn{flex:1 1 auto}
  .signal{padding:20px}
  .order .o-grid{grid-template-columns:minmax(0,1fr)}
  .provider .actions{grid-template-columns:1fr 1fr}
  .pipeline{grid-template-columns:repeat(2,minmax(0,1fr))}
  .months{gap:3px;height:140px}
  .months .m small{font-size:9.5px}
  .spec-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bodies{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-head{margin-bottom:18px}
  .head-actions{width:100%}
  .head-actions .btn{flex:1 1 auto}
  .backdrop{align-items:flex-end;padding:0}
  .modal{width:100%;max-height:92vh;border-radius:24px 24px 0 0;padding-bottom:env(safe-area-inset-bottom)}
  .modal-head{padding:18px 16px 12px}
  .modal-body{padding:16px 16px 22px}
  .input,.select,.textarea{font-size:16px}
  .step-title small{padding-left:0;margin-top:0}
  table.data{font-size:12.5px}
}
@media (max-width:760px){
  .top-title{display:none}
  .top-actions{flex:1;justify-content:flex-end}
  .car-switch{flex:1;min-width:0;display:flex;justify-content:flex-end}
  .car-pill{max-width:100%}
  .hello .quick{display:grid;grid-template-columns:1fr 1fr}
  .hello .quick .btn:first-child{grid-column:1/-1}
  .hello .quick .btn{padding:0 10px;min-width:0;white-space:normal;text-align:center;line-height:1.2}
  .hero .stat b,.spec b{white-space:normal;overflow:visible}
  .tl-item .when{display:none}
  .tl-body .tl-when{display:inline}
  .tl-body .tl-detail{display:none}
  .tl-date{width:48px}
  .chips.scroll-x{flex-wrap:nowrap;overflow-x:auto;margin-left:-18px;margin-right:-18px;padding:0 18px 4px;scrollbar-width:none}
  .chips.scroll-x::-webkit-scrollbar{display:none}
  .card-head h2{font-size:18px}
}
@media (max-width:380px){
  .hello .quick .btn{font-size:13px;gap:6px;padding:0 8px}
  .car-pill{max-width:150px}
  .hero .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero .stats .stat:last-child{grid-column:1/-1}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
#results{scroll-margin-top:calc(var(--top-h) + 12px)}
