:root {
  --bg: #f4f6fa;
  --bg-2: #eef1f6;
  --panel: #ffffff;
  --panel-2: #f7f8fb;
  --panel-glass: rgba(255,255,255,.78);
  --border: #e4e7ee;
  --border-2: #eef0f5;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #6b7280;
  --muted-2: #94a3b8;
  --brand: #0f2c5c;
  --brand-2: #1a4b9a;
  --brand-soft: #eaf0fb;
  --accent: #b6873a;
  --ok: #0f7a4a;
  --ok-soft: #e4f4ec;
  --warn: #8a5a00;
  --warn-soft: #fbf1dc;
  --err: #a01818;
  --err-soft: #fbe6e6;
  --info: #0e5aa7;
  --info-soft: #e4eefb;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 1px rgba(15,23,42,.03);
  --shadow-md: 0 1px 3px rgba(15,23,42,.05), 0 10px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.10), 0 4px 10px rgba(15,23,42,.05);
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02","cv03","cv04","cv11","tnum";
}
body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(26,75,154,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(182,135,58,.05), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
h1,h2,h3,h4 { letter-spacing: -0.012em; margin: 0; }

/* Shell */
.shell { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }

.topbar {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--panel-glass);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(160deg, #1e3a76 0%, #0f2c5c 55%, #0b1f43 100%);
  color: #fff; display: grid; place-items: center; font-weight: 700; letter-spacing: .5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 10px rgba(15,44,92,.22);
  font-size: 13px;
}
.brand-name { font-weight: 600; font-size: 14.5px; color: var(--text); letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: -1px; }

.tabs { display: flex; gap: 2px; overflow-x: auto; }
.tab {
  padding: 8px 14px;
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.active {
  background: linear-gradient(180deg, #ffffff, #f4f7fc);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  font-weight: 600;
}

.top-right { display: flex; align-items: center; gap: 8px; }
.search {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px 7px 34px;
  color: var(--text);
  width: 260px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'><circle cx='11' cy='11' r='6.5' stroke='%2394a3b8' stroke-width='1.6'/><path d='M16 16l4 4' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: 10px center;
}
.search::placeholder { color: var(--muted-2); }
.search:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(26,75,154,.12); }

.icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f6f8fc);
  color: var(--text-2);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: background .12s;
}
.icon-btn:hover { background: linear-gradient(180deg, #fbfcfe, #eef1f7); color: var(--text); }
.icon-btn .dot-red {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #d9354a; box-shadow: 0 0 0 2px var(--panel);
}

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #1e3a76, #0f2c5c);
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  cursor: pointer;
}

/* Body */
.body { display: grid; grid-template-columns: 240px 1fr; min-height: 0; }
.subnav {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border-right: 1px solid var(--border);
  padding: 14px 10px 24px;
  overflow-y: auto;
  height: calc(100vh - 55px);
  position: sticky; top: 55px;
}
.subnav-group { padding: 12px 10px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); font-weight: 600; }
.subnav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  color: var(--text-2); font-size: 13px; font-weight: 500;
  border-radius: 8px;
  transition: background .12s, color .12s;
}
.subnav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.subnav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.subnav a svg { color: var(--muted-2); }
.subnav a.active svg { color: var(--brand); }

.workspace { padding: 22px 28px 60px; overflow-x: hidden; min-width: 0; }
.workspace-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 20px; flex-wrap: wrap;
}
.workspace-header h1 { font-size: 22px; font-weight: 650; letter-spacing: -.015em; }
.workspace-header .crumbs { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.workspace-actions { display: flex; gap: 8px; }

/* Grid / cards */
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1200px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid.cols-3,.grid.cols-2 { grid-template-columns: 1fr; }
  .body { grid-template-columns: 1fr; }
  .subnav { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .search { display: none; }
  .tabs { grid-column: 1 / -1; }
  .workspace { padding: 16px; }
}

.card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.card .big { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.card .delta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--err); }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-header {
  display: flex; align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-2);
  gap: 10px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}
.panel-title { font-weight: 600; font-size: 13.5px; }
.panel-body { padding: 14px 18px; }

/* Buttons */
.btn {
  background: linear-gradient(180deg, #ffffff, #f4f7fc);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 12.5px;
  box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .06s, background .12s;
  white-space: nowrap;
}
.btn:hover { background: linear-gradient(180deg, #fbfcfe, #eaf0fb); color: var(--brand); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary {
  background: linear-gradient(180deg, #1a4b9a, #0f2c5c);
  border-color: #0f2c5c;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 10px rgba(15,44,92,.22);
}
.btn.primary:hover { background: linear-gradient(180deg, #205bb8, #133875); color: #fff; }
.btn.accent {
  background: linear-gradient(180deg, #c99a4d, #a4762f);
  border-color: #8f651f;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 10px rgba(164,118,47,.22);
}
.btn.accent:hover { background: linear-gradient(180deg, #d3a659, #b48338); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.danger { color: var(--err); border-color: rgba(160,24,24,.25); }
.btn.danger:hover { background: var(--err-soft); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th {
  text-align: left; padding: 10px 16px;
  color: var(--muted); font-weight: 600;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfcfe, #f6f8fc);
  position: sticky; top: 0;
}
table td { padding: 11px 16px; border-bottom: 1px solid var(--border-2); color: var(--text-2); font-variant-numeric: tabular-nums; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: var(--panel-2); cursor: default; }
table b { color: var(--text); font-weight: 600; }
table .num { text-align: right; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
  border: 1px solid transparent; line-height: 1.5;
}
.badge::before {
  content: ""; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
.badge.ok    { background: var(--ok-soft);    color: var(--ok);    border-color: rgba(15,122,74,.18); }
.badge.warn  { background: var(--warn-soft);  color: var(--warn);  border-color: rgba(138,90,0,.18); }
.badge.err   { background: var(--err-soft);   color: var(--err);   border-color: rgba(160,24,24,.18); }
.badge.info  { background: var(--info-soft);  color: var(--info);  border-color: rgba(14,90,167,.18); }
.badge.brand { background: var(--brand-soft); color: var(--brand); border-color: rgba(15,44,92,.14); }
.badge.plain { background: var(--panel-2); color: var(--muted); border-color: var(--border); }
.badge.plain::before { display: none; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11.5px; color: var(--muted-2);
  font-weight: 500;
}

/* Chart bar */
.chart-bar { height: 6px; background: var(--panel-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--border-2); }
.chart-bar .fill { height: 100%; background: linear-gradient(90deg, #1a4b9a, #4a7bc7); border-radius: 4px; }
.chart-bar.accent .fill { background: linear-gradient(90deg, #b6873a, #d4a862); }

/* Row utils */
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.hr { height: 1px; background: var(--border-2); margin: 12px 0; }
.k { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

/* Status dot */
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.status-dot.driving   { background: var(--info); box-shadow: 0 0 0 3px rgba(14,90,167,.15); }
.status-dot.break     { background: var(--warn); box-shadow: 0 0 0 3px rgba(138,90,0,.15); }
.status-dot.delivered { background: var(--ok);   box-shadow: 0 0 0 3px rgba(15,122,74,.15); }
.status-dot.offline   { background: var(--muted-2); }
.status-dot.rest      { background: #7856a8; box-shadow: 0 0 0 3px rgba(120,86,168,.15); }

/* Map mock */
.map-mock {
  height: 320px;
  background:
    linear-gradient(rgba(15,44,92,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,44,92,.045) 1px, transparent 1px),
    linear-gradient(180deg, #f7f9fc, #eef2f8);
  background-size: 28px 28px, 28px 28px, cover;
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative; overflow: hidden;
}
.map-mock::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 60% 45%, rgba(26,75,154,.08), transparent 70%),
    radial-gradient(300px 160px at 22% 62%, rgba(182,135,58,.08), transparent 70%);
}
.map-mock .pin {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: #0f2c5c; box-shadow: 0 0 0 6px rgba(15,44,92,.16), 0 0 0 1px #fff;
  transform: translate(-50%, -50%);
}
.map-mock .pin.info { background: #1a4b9a; box-shadow: 0 0 0 6px rgba(26,75,154,.20), 0 0 0 1px #fff; }
.map-mock .pin.warn { background: #b6873a; box-shadow: 0 0 0 6px rgba(182,135,58,.22), 0 0 0 1px #fff; }
.map-mock .pin.ok { background: #0f7a4a; box-shadow: 0 0 0 6px rgba(15,122,74,.20), 0 0 0 1px #fff; }
.map-mock .label {
  position: absolute; transform: translate(-50%, -30px);
  font-size: 11px; color: var(--text-2); background: rgba(255,255,255,.9);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-weight: 500;
}

/* Doc thumb */
.doc-thumb {
  width: 44px; height: 56px;
  background: linear-gradient(180deg, #ffffff, #f2f4f9);
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
  box-shadow: var(--shadow-sm);
  flex: none;
  display: grid; place-items: center;
  color: var(--muted-2);
}
.doc-thumb::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: 12px; height: 12px;
  background: linear-gradient(225deg, transparent 50%, #dde2ea 50%);
  border-radius: 0 6px 0 6px;
}

/* Drawer */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(15,23,42,.35);
  opacity: 0; pointer-events: none; transition: opacity .2s;
  z-index: 40;
  backdrop-filter: blur(2px);
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 50;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}
.drawer-title { font-weight: 600; font-size: 14.5px; }
.drawer-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drawer-footer {
  padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end;
  background: linear-gradient(180deg, #fbfcfe, #f4f7fc);
}

/* Toast */
.toast-region {
  position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px;
  z-index: 60;
}
.toast {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--brand-2);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 12px 16px; min-width: 280px; max-width: 380px;
  animation: slideIn .25s ease;
}
.toast.ok    { border-left-color: var(--ok); }
.toast.warn  { border-left-color: var(--warn); }
.toast.err   { border-left-color: var(--err); }
.toast-title { font-weight: 600; font-size: 13px; }
.toast-body  { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.login-card h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 4px; }
.login-card p.k { margin: 4px 0 20px; }
.role-picker { display: grid; gap: 8px; margin-top: 12px; }
.role-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: left; width: 100%;
  transition: background .12s, box-shadow .12s, transform .06s;
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.role-btn:hover { background: linear-gradient(180deg, #fbfcfe, #eaf0fb); box-shadow: var(--shadow-md); }
.role-btn:active { transform: translateY(1px); }
.role-btn .r-name { font-weight: 600; font-size: 13.5px; }
.role-btn .r-sub  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.role-btn .r-ico {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; flex: none;
}

/* Driver PWA framed on desktop */
.driver-frame {
  max-width: 440px; margin: 20px auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.driver-frame .head {
  padding: 20px 20px 22px;
  background:
    radial-gradient(500px 200px at 100% 0%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(160deg, #1e3a76 0%, #0f2c5c 60%, #0b1f43 100%);
  color: #fff;
}
.driver-frame .section { padding: 16px 20px; border-bottom: 1px solid var(--border-2); }
.big-btn {
  width: 100%; padding: 14px;
  border-radius: 12px; border: none;
  background: linear-gradient(180deg, #1a4b9a, #0f2c5c);
  color: #fff; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 8px 20px rgba(15,44,92,.28);
  transition: background .12s, transform .06s;
}
.big-btn:hover { background: linear-gradient(180deg, #205bb8, #133875); }
.big-btn:active { transform: translateY(1px); }
.big-btn.accent { background: linear-gradient(180deg, #c99a4d, #a4762f); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 8px 20px rgba(164,118,47,.28); }

/* ========= Wizard / guided flow ========= */
.flow-strip {
  background: linear-gradient(180deg, #ffffff, #f4f7fc);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 12px; overflow-x: auto;
}
.flow-strip .fs-step {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 4px 6px;
  color: var(--muted); font-size: 12.5px; font-weight: 500;
}
.flow-strip .fs-step .n {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--panel-2); color: var(--muted-2);
  display: grid; place-items: center;
  border: 1.5px solid var(--border);
  font-weight: 700; font-size: 12px;
}
.flow-strip .fs-step.done .n { background: var(--ok); color: #fff; border-color: var(--ok); }
.flow-strip .fs-step.done { color: var(--ok); }
.flow-strip .fs-step.active .n { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,44,92,.12); }
.flow-strip .fs-step.active { color: var(--brand); font-weight: 600; }
.flow-strip .fs-sep {
  height: 2px; flex: 1; min-width: 24px;
  background: linear-gradient(90deg, var(--border), var(--border));
  border-radius: 2px;
}
.flow-strip .fs-sep.done { background: linear-gradient(90deg, var(--ok), var(--ok)); }

.wiz {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-width: 880px; margin: 0 auto;
}
.wiz-head {
  padding: 24px 28px 20px;
  background: linear-gradient(180deg, #ffffff, #f6f8fc);
  border-bottom: 1px solid var(--border-2);
}
.wiz-head h2 { font-size: 22px; font-weight: 650; letter-spacing: -.015em; }
.wiz-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.stepper {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px;
}
.stepper .step {
  display: flex; align-items: center; gap: 8px;
  flex: none;
}
.stepper .step .dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--panel-2);
  color: var(--muted);
  display: grid; place-items: center;
  border: 2px solid var(--border);
  font-weight: 700; font-size: 12.5px;
}
.stepper .step.done .dot { background: var(--ok); color: #fff; border-color: var(--ok); }
.stepper .step.active .dot { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,44,92,.12); }
.stepper .step .lbl { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stepper .step.done .lbl { color: var(--ok); }
.stepper .step.active .lbl { color: var(--brand); font-weight: 600; }
.stepper .bar { height: 2px; flex: 1; background: var(--border); min-width: 20px; border-radius: 2px; }
.stepper .bar.done { background: var(--ok); }

.wiz-body { padding: 28px; min-height: 320px; }
.wiz-body h3.big-q { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.wiz-body p.big-help { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.wiz-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfcfe, #f4f7fc);
  display: flex; gap: 10px; align-items: center;
}
.wiz-foot .spacer { flex: 1; }

/* Big cards (choice tiles for wizards) */
.big-choice-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.big-choice {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: left; width: 100%;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s, transform .06s;
  display: flex; gap: 14px; align-items: flex-start;
  color: var(--text);
  min-height: 88px;
}
.big-choice:hover { border-color: var(--brand-2); box-shadow: var(--shadow-md); }
.big-choice.selected { border-color: var(--brand); background: linear-gradient(180deg, #f4f7fc, #eaf0fb); box-shadow: 0 0 0 4px rgba(15,44,92,.10); }
.big-choice .bc-ico {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; flex: none;
}
.big-choice.available .bc-ico { background: var(--ok-soft); color: var(--ok); }
.big-choice.warn .bc-ico { background: var(--warn-soft); color: var(--warn); }
.big-choice.busy .bc-ico { background: var(--err-soft); color: var(--err); }
.big-choice .bc-title { font-size: 15.5px; font-weight: 600; }
.big-choice .bc-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.big-choice .bc-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Big form fields */
.field { display: block; margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--panel); color: var(--text);
  font-size: 14.5px; font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(26,75,154,.12);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Big CTA */
.btn.big {
  padding: 12px 22px; font-size: 14.5px; font-weight: 600;
  border-radius: 10px; min-height: 46px;
}
.btn.xl {
  padding: 16px 28px; font-size: 16px; font-weight: 650;
  border-radius: 12px; min-height: 58px;
}

/* Summary rows */
.summary { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; }
.summary .srow { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-2); font-size: 14px; }
.summary .srow:last-child { border-bottom: none; }
.summary .srow .lbl { color: var(--muted); }
.summary .srow .val { font-weight: 600; color: var(--text); }

/* Email preview */
.email-preview {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #0f172a;
}
.email-preview .from { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.email-preview h2 { font-size: 18px; font-weight: 600; margin-bottom: 8px; letter-spacing: -.01em; }
.email-preview .greet { color: var(--text-2); font-size: 14px; margin-bottom: 12px; }
.email-preview .box {
  background: linear-gradient(180deg, #f4f7fc, #eaf0fb);
  border: 1px solid #d3ddec;
  border-radius: 10px; padding: 14px 16px; margin: 14px 0;
}
.email-preview .box .row { padding: 4px 0; font-size: 13.5px; }
.email-preview .accept-btn {
  display: inline-block; padding: 12px 22px;
  background: linear-gradient(180deg, #1a4b9a, #0f2c5c);
  color: #fff; border-radius: 10px; font-weight: 600; font-size: 14.5px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(15,44,92,.22);
}
.email-preview .foot { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* Big offer card (customer view) */
.offer-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.offer-card .oh {
  padding: 20px 24px;
  background: linear-gradient(180deg, #ffffff, #f4f7fc);
  border-bottom: 1px solid var(--border-2);
  display: flex; gap: 14px; align-items: center;
}
.offer-card .oh .oref { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .05em; }
.offer-card .oh .oroute { font-size: 22px; font-weight: 650; letter-spacing: -.015em; margin-top: 2px; }
.offer-card .ob { padding: 22px 24px; }
.offer-fact-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.offer-fact {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.offer-fact .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.offer-fact .val { font-size: 18px; font-weight: 600; margin-top: 4px; letter-spacing: -.01em; }
.offer-fact .val .ico { display: inline-flex; margin-right: 6px; color: var(--brand-2); vertical-align: -3px; }
.offer-cta { padding: 18px 24px; border-top: 1px solid var(--border-2); background: linear-gradient(180deg, #fbfcfe, #f4f7fc); display: flex; gap: 12px; }

/* Driver picker card (for booking) */
.driver-tile {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
  display: flex; gap: 14px; align-items: center;
}
.driver-tile:hover { border-color: var(--brand-2); box-shadow: var(--shadow-md); }
.driver-tile.selected { border-color: var(--brand); background: linear-gradient(180deg, #f4f7fc, #eaf0fb); }
.driver-tile.unavail { opacity: .5; cursor: not-allowed; }
.driver-tile .dp-avatar {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #1e3a76, #0f2c5c);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
  flex: none;
}
.driver-tile .dp-name { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.driver-tile .dp-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.driver-tile .dp-bar { margin-top: 6px; height: 5px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.driver-tile .dp-bar .fill { height: 100%; background: linear-gradient(90deg, #1a4b9a, #4a7bc7); }
.driver-tile .dp-bar .fill.warn { background: linear-gradient(90deg, #c99a4d, #a4762f); }
.driver-tile .dp-bar .fill.err { background: linear-gradient(90deg, #d9354a, #a01818); }

/* Success screen */
.success-screen { text-align: center; padding: 40px 20px; }
.success-screen .tick {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: inline-grid; place-items: center;
  margin-bottom: 20px;
  box-shadow: 0 0 0 8px rgba(15,122,74,.08);
}
.success-screen h2 { font-size: 22px; font-weight: 650; margin-bottom: 6px; }
.success-screen p { color: var(--muted); font-size: 14px; }
.success-actions { margin-top: 28px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Help chip */
.help-chip {
  display: inline-flex; gap: 6px; align-items: center;
  padding: 4px 10px; background: var(--brand-soft); color: var(--brand);
  border-radius: 999px; font-size: 12px; font-weight: 500;
  border: 1px solid rgba(15,44,92,.12);
}

/* Timeline */
.tl { position: relative; padding-left: 20px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); border-radius: 2px; }
.tl-item { position: relative; padding: 4px 0 12px; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%; background: #fff;
  border: 2px solid var(--muted-2);
}
.tl-item.done::before { background: var(--ok); border-color: var(--ok); }
.tl-item.active::before { background: var(--info); border-color: var(--info); box-shadow: 0 0 0 4px rgba(14,90,167,.15); }
.tl-item .when { font-size: 11.5px; color: var(--muted); }
