/* Corridor One — design system */
:root {
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #f8f9fb; --surface-3: #eef1f5;
  --border: #e1e6ed; --border-strong: #cbd3de;
  --text: #0e1726; --text-2: #354357; --muted: #66727f;
  --brand: #0b5cd5; --brand-hover: #094cb0; --brand-ink: #ffffff; --brand-soft: #e8f0fd;
  --nav: #0d1b2e; --nav-2: #142741; --nav-text: #c3cede; --nav-muted: #7f8ea3;
  --good: #0a7a35; --good-bg: #e6f5eb; --good-line: #9fd8b2;
  --warn: #9a5200; --warn-bg: #fff3dc; --warn-line: #f3c87a;
  --bad: #b42318; --bad-bg: #fdecea; --bad-line: #f2aaa3;
  --info: #0b5cd5; --info-bg: #e8f0fd; --info-line: #a9c6f5;
  --action: #6941c6; --action-bg: #f1ecfd; --action-line: #c9b8f5;
  --lane-green: #0ca30c; --lane-yellow: #e2a000; --lane-red: #d03b3b;
  --radius: 10px; --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14), 0 4px 8px rgba(16, 24, 40, .06);
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14.5px; font-weight: 650; }
p { margin: 0 0 8px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- boot / login ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 460px) 1fr; }
.login-side { background: var(--nav); color: #fff; padding: 40px 36px; display: flex; flex-direction: column; gap: 22px; }
.login-side .brand { font-size: 15px; }
.login-side h1 { font-size: 28px; line-height: 1.2; }
.login-side p { color: var(--nav-text); font-size: 14.5px; }
.how { display: grid; gap: 12px; margin-top: 6px; }
.how div { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; color: var(--nav-text); font-size: 13.5px; }
.how b { color: #fff; display: block; font-size: 14px; }
.how .n { width: 28px; height: 28px; border-radius: 50%; background: var(--nav-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.login-note { margin-top: auto; font-size: 12px; color: var(--nav-muted); border-top: 1px solid var(--nav-2); padding-top: 14px; }
.login-main { padding: 40px; overflow: auto; }
.login-main h2 { margin-bottom: 4px; }
.role-group { margin-top: 22px; }
.role-group h4 { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.account { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.account:hover { border-color: var(--brand); transform: translateY(-1px); }
.account .who { font-weight: 600; }
.account .what { font-size: 12.5px; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 14px; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--nav); color: var(--nav-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-weight: 700; letter-spacing: .06em; font-size: 14px; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; }
.brand small { display: block; font-weight: 500; letter-spacing: 0; color: var(--nav-muted); font-size: 11.5px; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--nav-text); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--nav-2); color: #fff; }
.nav a.active { background: var(--brand); color: #fff; }
.nav a .count { margin-left: auto; background: #fff; color: var(--nav); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; }
.nav-sep { height: 1px; background: var(--nav-2); margin: 8px 10px; }
.side-foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--nav-2); font-size: 12px; color: var(--nav-muted); }
.side-foot b { color: var(--nav-text); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: rgba(243, 245, 248, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 10px 24px; }
.top .menu-btn { display: none; }
.top .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 500; cursor: default; white-space: nowrap; }
button.pill { cursor: pointer; }
.pill.mode-PILOT { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.pill.mode-CURRENT { background: var(--good-bg); border-color: var(--good-line); color: var(--good); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.icon-btn { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn .badge { position: absolute; top: -5px; right: -5px; background: var(--bad); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }
.user-chip { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; }
.user-chip .u { line-height: 1.2; text-align: left; }
.user-chip .u b { font-size: 13px; display: block; }
.user-chip .u span { font-size: 11.5px; color: var(--muted); }
.page { padding: 22px 24px 60px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: inline-flex; gap: 6px; align-items: center; }
.popover { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden; }
.popover-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.popover-body { max-height: 420px; overflow: auto; }
.notif { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif .tone { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--info); }
.notif .tone.good { background: var(--good); } .notif .tone.warn { background: var(--lane-yellow); } .notif .tone.bad { background: var(--bad); }
.notif.unread { background: #f7faff; }
.rel { position: relative; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-body { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.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 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* ---------- stats ---------- */
.stat { padding: 14px 16px; }
.stat .label { font-size: 12.5px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat .foot { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.good .value { color: var(--good); } .stat.bad .value { color: var(--bad); } .stat.warn .value { color: var(--warn); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 8px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1.2; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.good:hover { filter: brightness(.95); }
.btn.danger { background: var(--surface); border-color: var(--bad-line); color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); padding-left: 8px; padding-right: 8px; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: 10px; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: #fff; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; line-height: 1.6; }
.chip svg { width: 12px; height: 12px; }
.chip.good { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.chip.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.chip.action { background: var(--action-bg); color: var(--action); border-color: var(--action-line); }
.chip.muted { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }
.lane { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; letter-spacing: .03em; padding: 2px 9px 2px 7px; border-radius: 6px; border: 1px solid; }
.lane i { width: 10px; height: 10px; display: inline-block; }
.lane.GREEN { color: #08670a; background: #e8f6e8; border-color: #a6dba6; } .lane.GREEN i { background: var(--lane-green); border-radius: 50%; }
.lane.YELLOW { color: #7a5500; background: #fff6dc; border-color: #f0cf72; } .lane.YELLOW i { background: var(--lane-yellow); transform: rotate(45deg) scale(.85); }
.lane.RED { color: #9e1f1f; background: #fdecec; border-color: #f0a8a8; } .lane.RED i { background: var(--lane-red); }
.lane.lg { font-size: 15px; padding: 5px 14px 5px 11px; } .lane.lg i { width: 13px; height: 13px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
table.t tr:last-child td { border-bottom: none; }
.cno { font-family: var(--mono); font-weight: 600; letter-spacing: .02em; white-space: nowrap; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button, .tabs a { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 12px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.tabs .active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .n { background: var(--surface-3); color: var(--text-2); border-radius: 999px; font-size: 11px; padding: 0 7px; }
.tabs .active .n { background: var(--brand-soft); color: var(--brand); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-weight: 600; font-size: 13px; }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); }
.input, select.input, textarea.input { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; padding: 9px 11px; width: 100%; font-size: 14px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.invalid { border-color: var(--bad); }
.input.mono { font-family: var(--mono); letter-spacing: .04em; }
.input-row { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 30; max-height: 260px; overflow: auto; }
.suggest-list button { display: flex; gap: 10px; width: 100%; text-align: left; padding: 8px 12px; border: none; background: none; cursor: pointer; }
.suggest-list button:hover, .suggest-list button.on { background: var(--brand-soft); }
.radio-card { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: start; border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; cursor: pointer; background: var(--surface); }
.radio-card:hover { border-color: var(--border-strong); }
.radio-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.radio-card.off { opacity: .55; cursor: not-allowed; }
.radio-card input { margin-top: 3px; }

/* ---------- banners ---------- */
.banner { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: start; border-radius: 9px; padding: 11px 14px; border: 1px solid; font-size: 13.5px; }
.banner svg { width: 18px; height: 18px; margin-top: 1px; }
.banner.info { background: var(--info-bg); border-color: var(--info-line); color: #0a3f8f; }
.banner.good { background: var(--good-bg); border-color: var(--good-line); color: #075b27; }
.banner.warn { background: var(--warn-bg); border-color: var(--warn-line); color: #6e3b00; }
.banner.bad { background: var(--bad-bg); border-color: var(--bad-line); color: #8a1b12; }
.banner b { color: inherit; }

/* ---------- action cards (importer home) ---------- */
.todo { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.todo-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-left: 4px solid var(--action); }
.todo-card .cno { font-size: 15px; }
.todo-card .meta { font-size: 12.5px; color: var(--muted); }
.todo-card .btn { align-self: flex-start; margin-top: 4px; }

/* ---------- progress (milestones) ---------- */
.milestones { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 4px 0 2px; }
.ms { position: relative; padding-top: 22px; text-align: center; font-size: 12px; color: var(--muted); }
.ms::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 3px; background: var(--border); }
.ms:first-child::before { left: 50%; } .ms:last-child::before { right: 50%; }
.ms .dot { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border-strong); z-index: 1; }
.ms.done::before { background: var(--good); } .ms.done .dot { background: var(--good); border-color: var(--good); }
.ms.now .dot { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 4px var(--brand-soft); }
.ms b { display: block; color: var(--text); font-size: 12.5px; }
.ms.done b { color: var(--good); }

/* ---------- legs ---------- */
.leg { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.leg + .leg { margin-top: 12px; }
.leg-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.leg-head .n { width: 22px; height: 22px; border-radius: 50%; background: var(--nav); color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }
.leg-body { padding: 13px 14px; display: grid; gap: 10px; }
.route { display: flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.route .arrow { color: var(--muted); }
.booking-box { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 9px; padding: 12px 14px; }

/* ---------- checklist ---------- */
.check-group + .check-group { margin-top: 14px; }
.check-group h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 9px; padding: 6px 0; font-size: 13px; }
.check .ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.check .ic svg { width: 11px; height: 11px; }
.check.ok .ic { background: var(--good); color: #fff; }
.check.pending .ic { background: var(--surface-3); color: var(--muted); border: 1px solid var(--border-strong); }
.check.warn .ic { background: var(--lane-yellow); color: #fff; }
.check.fail .ic { background: var(--bad); color: #fff; }
.check .lbl { font-weight: 600; }
.check .det { color: var(--muted); font-size: 12.5px; }
.src { font-size: 11px; color: var(--brand); white-space: nowrap; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: -6px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.timeline li.sys::after { border-color: var(--brand); }
.timeline .when { font-size: 11.5px; color: var(--muted); }
.timeline .act { font-weight: 600; }

/* ---------- slot picker ---------- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot { position: relative; border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px 8px; background: var(--surface); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.slot:hover { border-color: var(--border-strong); }
.slot.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.slot.full { background: var(--surface-3); cursor: not-allowed; opacity: .6; }
.slot .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.slot .bar { height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.slot .bar i { display: block; height: 100%; background: #6da7ec; }
.slot .bar i.hi { background: #e2a000; } .slot .bar i.max { background: var(--bad); }
.slot .meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.slot .rec { position: absolute; top: -8px; right: 8px; background: var(--good); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 0 7px; }
.slot .adv { color: var(--warn); font-size: 11px; font-weight: 600; }
.daytabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 6px; border-radius: 3px; display: inline-block; }

/* ---------- gate ---------- */
.gate-input { display: flex; gap: 8px; }
.gate-input .input { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: .08em; padding: 12px 14px; text-transform: uppercase; }
.plate { display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 24px; letter-spacing: .06em; border: 2px solid var(--text); border-radius: 6px; padding: 2px 12px; background: #fff; }
.big-cno { font-family: var(--mono); font-weight: 700; font-size: 26px; letter-spacing: .03em; }
.checks-big .check { font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.checks-big .check:last-child { border-bottom: none; }
.checks-big .check .ic { width: 22px; height: 22px; } .checks-big .check .ic svg { width: 13px; height: 13px; }
.verdict { border-radius: 10px; padding: 14px 16px; font-weight: 700; font-size: 16px; display: flex; gap: 10px; align-items: center; }
.verdict.good { background: var(--good-bg); color: var(--good); border: 1px solid var(--good-line); }
.verdict.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.hourbar { display: grid; grid-template-columns: 64px 1fr 120px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.hourbar.now { background: var(--brand-soft); border-radius: 6px; padding: 7px 8px; }
.hourbar .bar { height: 10px; background: var(--surface-3); border-radius: 5px; overflow: hidden; display: flex; }
.hourbar .bar i { display: block; height: 100%; }
.hourbar .bar .ext { background: #b7cdea; } .hourbar .bar .ours { background: var(--brand); }

/* ---------- jobs ---------- */
.job { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 16px; align-items: center; }
.job + .job { border-top: 1px solid var(--border); }
.job .reqs { display: flex; gap: 6px; flex-wrap: wrap; }
.meter { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); }

/* ---------- driver ---------- */
.driver-wrap { max-width: 520px; margin: 0 auto; }
.pass { text-align: center; padding: 20px; }
.pass .qr svg { width: 220px; height: 220px; }
.pass .code { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: .08em; margin-top: 8px; }
.steps-v { list-style: none; padding: 0; margin: 0; }
.steps-v li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 8px 0; align-items: start; }
.steps-v .b { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.steps-v li.done .b { background: var(--good); border-color: var(--good); color: #fff; }
.steps-v li.now .b { border-color: var(--brand); color: var(--brand); }

/* ---------- map ---------- */
.map { height: 460px; border-radius: 0 0 var(--radius) var(--radius); }
.map.tall { height: 560px; }
.map-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); }
.truck-pin { background: var(--brand); color: #fff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.truck-pin.alert { background: var(--bad); animation: pulse 1.4s infinite; }
.truck-pin.sealed { background: var(--good); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .5); } 50% { box-shadow: 0 0 0 10px rgba(180, 35, 24, 0); } }
.leaflet-container { font: 12px var(--sans); }
.leaflet-tile-pane { filter: saturate(.55) brightness(1.04); }

/* ---------- heat strip (control tower) ---------- */
.strip { display: grid; grid-template-columns: 90px repeat(24, 1fr); gap: 2px; align-items: center; font-size: 11px; }
.strip .cell { height: 22px; border-radius: 3px; position: relative; }
.strip .cell.now { outline: 2px solid var(--text); outline-offset: 1px; }
.strip .h { text-align: center; color: var(--muted); }
.lanebar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--surface); }
.lanebar i { display: block; height: 100%; }

/* ---------- modal / drawer / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(13, 27, 46, .45); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--nav); color: #fff; border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow-lg); max-width: 380px; font-size: 13.5px; display: grid; grid-template-columns: 18px 1fr; gap: 10px; animation: slidein .2s; }
.toast svg { width: 18px; height: 18px; }
.toast.good svg { color: #6ee7a0; } .toast.bad svg { color: #ff9b91; } .toast.warn svg { color: #ffd27a; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--border-strong); margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.reasons { list-style: none; padding: 0; margin: 0; }
.reasons li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.reasons li:last-child { border-bottom: none; }
.reasons .pts { font-family: var(--mono); font-weight: 600; text-align: right; }
.reasons .pts.plus { color: var(--bad); } .reasons .pts.minus { color: var(--good); }
.drop { border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 14px; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; background: var(--surface); }
.drop.has { border-style: solid; border-color: var(--good-line); background: var(--good-bg); }
.drop.drag { border-color: var(--brand); background: var(--brand-soft); }
.drop .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.drop.has .ico { background: var(--good); color: #fff; }
.wizard-steps { display: flex; gap: 0; margin-bottom: 18px; }
.wizard-steps div { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); font-size: 13px; padding-bottom: 10px; border-bottom: 3px solid var(--border); }
.wizard-steps div.on { color: var(--brand); border-color: var(--brand); }
.wizard-steps div.done { color: var(--good); border-color: var(--good); }
.wizard-steps .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; }
.wizard-steps .on .n { background: var(--brand); color: #fff; } .wizard-steps .done .n { background: var(--good); color: #fff; }
.result-hero { text-align: center; padding: 28px 20px; }
.result-hero .lane { margin: 10px 0; }
.uaepass { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px 0; text-align: center; }
.uaepass .ring { width: 64px; height: 64px; border-radius: 50%; border: 4px solid #e5e7eb; border-top-color: #00843d; animation: spin 1s linear infinite; }
.agree { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 13.5px; cursor: pointer; }
.agree input { margin-top: 3px; width: 16px; height: 16px; }
.kbd { font-family: var(--mono); font-size: 11.5px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }
.sticky-side { position: sticky; top: 76px; }
.copy { cursor: pointer; border: none; background: none; color: var(--muted); padding: 2px; }
.copy:hover { color: var(--brand); }

@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky-side { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  .app.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .top { padding: 10px 16px; }
  .top .menu-btn { display: grid; }
  .top .hide-sm { display: none; }
  .page { padding: 16px 16px 60px; }
  .g2, .g3, .g4, .form-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 28px 22px; }
  .login-main { padding: 22px 16px; }
  .milestones { grid-template-columns: repeat(5, 1fr); font-size: 10.5px; }
  .ms b { font-size: 11px; }
  .popover { width: calc(100vw - 32px); right: -60px; }
  .booking-box { grid-template-columns: 1fr; }
  .hourbar { grid-template-columns: 52px 1fr 90px; }
  .strip { grid-template-columns: 60px repeat(24, 1fr); }
}
