/* Lanka Cargo Delivery Hub — design tokens and components
   Layout: navy command bar · left role navigation · task-first content; mobile roles in a phone frame */
:root {
  --navy: #0B1F3A; --navy-2: #13294B; --navy-3: #1D3A66;
  --bg: #F1F4F8; --surface: #FFFFFF; --surface-2: #F7F9FC; --line: #D9E0EA; --line-2: #E8EDF4;
  --ink: #142238; --muted: #5B6880; --faint: #8A96AB;
  --blue: #1F5FD6; --blue-ink: #FFFFFF; --blue-soft: #E7EFFD; --blue-line: #B9CEF5;
  --ok: #10794F; --ok-soft: #E3F4EC; --warn: #A15C00; --warn-soft: #FDF1DC; --bad: #C0262D; --bad-soft: #FCE8E8; --hold: #B34A00; --hold-soft: #FFEBDD; --neutral: #5B6880; --neutral-soft: #EDF0F5; --info: #1F5FD6; --info-soft: #E7EFFD;
  --sea: #DCE8F7; --amber-mark: #F5B83D;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 4px 16px rgba(11, 31, 58, .06);
  --r: 10px; --r-sm: 6px;
  --f-sans: 'IBM Plex Sans', 'Noto Sans Sinhala', 'Noto Sans Tamil', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1424; --surface: #131E33; --surface-2: #17243D; --line: #29385A; --line-2: #1F2D4A;
    --ink: #E5EBF5; --muted: #A1AEC6; --faint: #74829C;
    --blue: #5B8EF0; --blue-ink: #08142A; --blue-soft: #1A2C52; --blue-line: #2F4C85;
    --ok: #4CC793; --ok-soft: #12352A; --warn: #F0B24A; --warn-soft: #3A2B10; --bad: #FF7A7F; --bad-soft: #43191D; --hold: #FF9A57; --hold-soft: #40230F; --neutral: #A1AEC6; --neutral-soft: #1F2B44; --info: #7FA6F5; --info-soft: #1A2C52;
    --sea: #15284A; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1424; --surface: #131E33; --surface-2: #17243D; --line: #29385A; --line-2: #1F2D4A;
  --ink: #E5EBF5; --muted: #A1AEC6; --faint: #74829C;
  --blue: #5B8EF0; --blue-ink: #08142A; --blue-soft: #1A2C52; --blue-line: #2F4C85;
  --ok: #4CC793; --ok-soft: #12352A; --warn: #F0B24A; --warn-soft: #3A2B10; --bad: #FF7A7F; --bad-soft: #43191D; --hold: #FF9A57; --hold-soft: #40230F; --neutral: #A1AEC6; --neutral-soft: #1F2B44; --info: #7FA6F5; --info-soft: #1A2C52;
  --sea: #15284A; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; text-wrap: balance; }
p { margin: 0; }
a { color: var(--blue); }
code { font-family: var(--f-mono); font-size: .88em; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .mt { margin-top: 14px; } .pad { padding: 16px; } .pad-x { padding-left: 16px; padding-right: 16px; } .right { text-align: right; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.t-bad { color: var(--bad); } .t-warn { color: var(--warn); } .t-ok { color: var(--ok); } .t-info { color: var(--info); }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; } .plain li { display: flex; gap: 8px; align-items: flex-start; } .plain .ic { color: var(--ok); margin-top: 2px; }
.row-sb { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-txt { user-select: all; font-variant-numeric: tabular-nums; }
.h2 { font-size: 18px; margin: 26px 0 12px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: var(--navy); color: #fff; border-bottom: 3px solid var(--blue); }
.tb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-brand strong { display: block; font-size: 16px; letter-spacing: .01em; }
.tb-brand div > span { display: block; font-size: 11.5px; color: #A9B8D3; letter-spacing: .04em; text-transform: uppercase; }
.brand { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 9px; padding: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.brand img { width: 100%; height: 100%; display: block; }
.brand-logo { display: block; width: 100%; height: auto; }
.guide-brand { float: right; width: 150px; margin: 0 0 8px 16px; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--line); }
@media (max-width: 560px) { .guide-brand { float: none; width: 130px; margin: 0 0 12px; } }
.tb-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-role { position: relative; display: flex; align-items: center; gap: 6px; background: var(--navy-3); border: 1px solid #36578C; border-radius: 8px; padding: 0 30px 0 10px; height: 40px; }
.tb-role-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #0B1F3A; background: var(--amber-mark); border-radius: 4px; padding: 1px 5px; font-weight: 600; }
.tb-role select { appearance: none; background: transparent; border: 0; color: #fff; font-weight: 600; height: 38px; cursor: pointer; max-width: 230px; }
.tb-role select option { color: #142238; background: #fff; }
.tb-caret { position: absolute; right: 9px; pointer-events: none; }
.tb-clock { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #D5DEEE; padding: 0 6px; }
.tb-clock b { color: #fff; font-variant-numeric: tabular-nums; } .tb-clock em { font-style: normal; color: #8FA3C6; font-size: 11px; }
.tb-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; justify-content: center; padding: 0 10px; border-radius: 8px; border: 1px solid #36578C; background: transparent; color: #fff; cursor: pointer; }
.tb-btn:hover, .tb-btn.on { background: var(--navy-3); }
.tb-n { position: absolute; top: -5px; right: -5px; background: #E5484D; color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; font-weight: 600; }
.tb-prog { font-size: 12px; background: var(--blue); border-radius: 10px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.tb-lang { display: flex; align-items: center; gap: 4px; height: 40px; border: 1px solid #36578C; border-radius: 8px; padding: 0 6px; }
.tb-lang select { background: transparent; border: 0; color: #fff; cursor: pointer; }
.tb-lang select option { color: #142238; }
.notif-panel { position: fixed; top: 62px; right: 12px; z-index: 60; width: min(420px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.np-item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; cursor: pointer; }
.np-item:hover { background: var(--surface-2); } .np-item.unread { background: var(--blue-soft); } .np-item.k-urgent .ic { color: var(--bad); }
.np-t { display: block; font-size: 14px; } .np-at { display: block; font-size: 12px; color: var(--muted); }
.np-foot { font-size: 12px; color: var(--muted); padding: 10px 14px; display: flex; gap: 6px; }

/* ---------- Desktop shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; }
.side-who { display: flex; gap: 10px; align-items: center; padding: 6px 8px 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.side-who > .ic { width: 34px; height: 34px; padding: 7px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); }
.side-who strong { display: block; font-size: 14px; } .side-who span { font-size: 12.5px; color: var(--muted); }
.side-ctl { padding: 0 6px 10px; } .side-ctl .field { margin: 0; }
.nv-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 14px 10px 4px; font-weight: 600; }
.nv { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; color: var(--ink); min-height: 40px; }
.nv:hover { background: var(--surface-2); } .nv.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; } .nv.on .ic { color: var(--blue); } .nv .ic { color: var(--muted); }
.nv span:nth-child(2) { flex: 1; }
.nv-n { font-size: 11.5px; min-width: 22px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nv-warn { background: var(--warn-soft); color: var(--warn); } .nv-bad { background: var(--bad); color: #fff; } .nv-info { background: var(--info-soft); color: var(--info); } .nv-neutral { background: var(--neutral-soft); color: var(--neutral); }
.side-foot { margin-top: auto; padding: 14px 6px 0; }
.main { padding: 22px 28px 60px; min-width: 0; }
.nav-toggle, .nav-scrim { display: none; }

/* ---------- Page header ---------- */
.ph { margin-bottom: 18px; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; } .crumbs .ic { width: 14px; height: 14px; }
.ph-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.ph h1 { font-size: 24px; font-weight: 600; color: var(--ink); }
.ph-sub { color: var(--muted); margin-top: 4px; max-width: 75ch; }
.ph-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Layout grids ---------- */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-plan { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } .g-exc { grid-template-columns: minmax(260px, .9fr) minmax(0, 1.4fr); }
.stack { display: grid; gap: 16px; align-content: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; min-width: 0; }
.grid .card, .stack .card { margin-bottom: 0; }
.card.flush { padding: 14px 0 0; } .card.flush .tbl-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .card-h h3 .ic { color: var(--blue); }
.card h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.lead { font-size: 16px; margin-bottom: 12px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
button.stat { cursor: pointer; } button.stat:hover { border-color: var(--blue-line); box-shadow: var(--shadow); }
.st-l { font-size: 12.5px; color: var(--muted); font-weight: 500; padding-right: 18px; }
.st-v { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.st-s { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.st-go { position: absolute; right: 10px; top: 12px; color: var(--faint); width: 16px; height: 16px; }
.st-ok { border-left-color: var(--ok); } .st-warn { border-left-color: var(--warn); } .st-bad { border-left-color: var(--bad); } .st-bad .st-v { color: var(--bad); } .st-info { border-left-color: var(--blue); }

/* ---------- Badges, chips, refs ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px 4px 6px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; }
.badge .bi { width: 13px; height: 13px; stroke-width: 2.4; }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.b-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.b-bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.b-hold { background: var(--hold-soft); color: var(--hold); border-color: color-mix(in srgb, var(--hold) 25%, transparent); border-style: dashed; }
.b-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.b-neutral { background: var(--neutral-soft); color: var(--neutral); }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.co { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.role { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.ref { font-family: var(--f-mono); font-size: 13px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.sim { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 6px; padding: 2px 7px; text-transform: uppercase; letter-spacing: .04em; }
.sim .ic { width: 13px; height: 13px; } .sim-x { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--blue-line); background: var(--surface-2); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); } .btn-primary:hover { background: color-mix(in srgb, var(--blue) 88%, #000); border-color: transparent; }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; } .btn-success:hover { background: color-mix(in srgb, var(--ok) 88%, #000); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; } .btn-danger:hover { background: color-mix(in srgb, var(--bad) 88%, #000); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--blue); } .btn-ghost:hover { background: var(--blue-soft); }
.btn-ghost-danger { background: transparent; border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); } .btn-ghost-danger:hover { background: var(--bad-soft); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; } .btn.icon { padding: 0; width: 32px; }
.btn.lg { min-height: 52px; font-size: 16px; padding: 0 18px; border-radius: 10px; } .btn.full { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lnk { font-weight: 500; font-size: 14px; text-decoration: none; } .lnk:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.f-l { font-size: 13px; font-weight: 600; color: var(--ink); } .f-h { font-size: 12.5px; color: var(--muted); }
.f-err { font-size: 12.5px; color: var(--bad); display: flex; gap: 5px; align-items: flex-start; } .f-err .ic { width: 14px; height: 14px; margin-top: 2px; }
.has-err .inp { border-color: var(--bad); background: var(--bad-soft); }
.inp { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.inp:focus { border-color: var(--blue); outline: 2px solid var(--blue-soft); }
textarea.inp { resize: vertical; } .mono { font-family: var(--f-mono); font-size: 13px; }
.inp.cell { min-height: 34px; padding: 5px 8px; min-width: 110px; } .w-num { max-width: 110px; min-width: 80px !important; } .w-wide { min-width: 220px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 4px; margin-bottom: 14px; }
.filters.slim { grid-template-columns: repeat(auto-fill, minmax(220px, 280px)); }
.f-checks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.tgl { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 10px; font-size: 14px; }
.tgl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tgl-ui { width: 40px; height: 22px; border-radius: 11px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.tgl-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.tgl input:checked + .tgl-ui { background: var(--blue); } .tgl input:checked + .tgl-ui::after { transform: translateX(18px); }
.tgl input:focus-visible + .tgl-ui { outline: 3px solid var(--blue); outline-offset: 2px; }
.cb { width: 20px; height: 20px; accent-color: var(--blue); cursor: pointer; }
.radio-list { display: grid; gap: 8px; margin-bottom: 12px; }
.radio { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.radio input { width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.radio small { display: block; color: var(--muted); font-size: 12.5px; }
.radio-list.big .radio { min-height: 56px; }
.r-bad:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); }
.inline-form { display: flex; gap: 8px; margin-bottom: 8px; } .inline-form .inp { flex: 1; }
.check-big { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--line); border-radius: 10px; margin: 12px 0; cursor: pointer; }
.check-big input { width: 24px; height: 24px; accent-color: var(--ok); flex: none; }
.check-big:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl small { font-size: 12.5px; }
.row-dis td { color: var(--faint); } .row-dis .ref { color: var(--muted); }
.row-sel td { background: var(--blue-soft) !important; }
.row-bad td { background: color-mix(in srgb, var(--bad-soft) 60%, transparent); }
.row-warn td { background: color-mix(in srgb, var(--warn-soft) 60%, transparent); }
.row-err td { background: var(--bad-soft); color: var(--bad); font-size: 13px; padding: 6px 12px; } .row-err .ic { width: 14px; height: 14px; vertical-align: -2px; }
tr.has-err td { background: color-mix(in srgb, var(--bad-soft) 50%, transparent); }
tr.tot td { background: var(--surface-2); border-top: 2px solid var(--line); }
.tbl.edit td { padding: 6px 8px; }
.tbl.perm th[scope], .tbl.perm tbody th { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--ink); background: var(--surface); font-weight: 500; white-space: normal; min-width: 220px; }
.tbl.perm td { text-align: center; font-size: 12.5px; } .tbl.perm td.yes { color: var(--ok); } .tbl.perm td.no { color: var(--faint); } .tbl.perm td.part { color: var(--warn); }
.money { width: 100%; border-collapse: collapse; font-size: 14px; }
.money th { text-align: left; font-weight: 500; padding: 6px 0; } .money th small { display: block; color: var(--muted); font-weight: 400; }
.money td { padding: 6px 0 6px 10px; color: var(--muted); font-size: 13px; } .money td.num { color: var(--ink); font-size: 14px; }
.money tr.tot th, .money tr.tot td { border-top: 1px solid var(--line); font-weight: 700; color: var(--ink); }
.pk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--line); margin-left: 2px; vertical-align: middle; }
.s-stored, .s-received, .s-delivered, .s-loaded { background: var(--ok); } .s-missing, .s-damaged { background: var(--bad); } .s-out, .s-assigned, .s-handed { background: var(--blue); } .s-returning { background: var(--hold); }

/* ---------- Key-value ---------- */
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 13px; } .kv dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.kv.kv-row { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); column-gap: 18px; }
.kv.kv-row > div { grid-template-columns: 1fr; gap: 2px; }

/* ---------- Banners, empty, blocked ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid; margin-bottom: 14px; flex-wrap: wrap; }
.banner > .ic { margin-top: 2px; width: 20px; height: 20px; }
.bn-body { flex: 1; min-width: 200px; } .bn-body p { font-size: 14px; margin-top: 2px; }
.bn-act { display: flex; gap: 8px; align-self: center; }
.bn-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); } .bn-ok > .ic { color: var(--ok); }
.bn-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); } .bn-warn > .ic { color: var(--warn); }
.bn-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); border-left-width: 5px; } .bn-bad > .ic { color: var(--bad); }
.bn-hold { background: var(--hold-soft); border-color: color-mix(in srgb, var(--hold) 35%, transparent); border-style: dashed; } .bn-hold > .ic { color: var(--hold); }
.bn-info { background: var(--info-soft); border-color: var(--blue-line); } .bn-info > .ic { color: var(--blue); }
.bn-neutral { background: var(--neutral-soft); border-color: var(--line); }
.empty { text-align: center; padding: 26px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h4 { font-size: 16px; margin: 0; } .empty p { color: var(--muted); max-width: 46ch; font-size: 14px; }
.illus { width: 110px; height: auto; }
.il-a { fill: var(--blue-soft); stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; }
.il-b { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.il-c { fill: var(--surface); stroke: var(--navy-3); stroke-width: 2.5; }
.il-d { fill: var(--amber-mark); stroke: var(--navy); stroke-width: 1.5; }
:root[data-theme="dark"] .il-c { stroke: var(--muted); }
.illus-row { display: flex; gap: 20px; flex-wrap: wrap; } .illus-row figure { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.blocked { display: flex; gap: 14px; align-items: flex-start; } .blocked > .ic { width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: var(--bad-soft); color: var(--bad); flex: none; }
.blocked p + p { margin-top: 6px; }
.skel-wrap { display: grid; gap: 10px; padding: 8px 0; }
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--line-2), var(--surface-2), var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
.skel.w60 { width: 60%; height: 20px; } .skel.w80 { width: 80%; }
@keyframes sk { to { background-position: -200% 0; } }
.prog { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin: 6px 0 4px; min-width: 60px; }
.prog span { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.prog.p-ok span { background: var(--ok); } .prog.p-bad span { background: var(--bad); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); } .tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.tab-n { font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; }

/* ---------- Dispatcher specifics ---------- */
.req { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 10px; background: var(--surface-2); }
.req-msg { display: flex; gap: 8px; } .req-msg .ic { color: var(--warn); margin-top: 3px; }
.req-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.trip-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trip-mini button { display: grid; grid-template-columns: 70px 1fr 150px; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.trip-mini button:hover { border-color: var(--blue-line); } .tm-st small { font-size: 12px; color: var(--muted); }
.checks { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; } .checks .ic { margin-top: 2px; }
.ck-ok .ic { color: var(--ok); } .ck-warn .ic { color: var(--warn); } .ck-bad .ic { color: var(--bad); } .ck-info .ic { color: var(--blue); }
.ck-bad { color: var(--bad); font-weight: 500; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.docs li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; }
.docs li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; } .docs small { display: block; color: var(--muted); font-size: 12px; } .docs .ic { color: var(--blue); }
.sel-bar { position: sticky; top: 62px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; font-size: 14px; }
.sel-bar.on { background: var(--navy); color: #fff; border-color: var(--navy); } .sel-bar.on .btn-ghost { color: #BFD3FA; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stop-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line-2); border-radius: 8px; }
.so { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 600; font-size: 13px; }
.sr-main { min-width: 0; font-size: 14px; } .sr-ctl { display: flex; } .sr-ctl .btn:nth-child(1) .ic, .sr-ctl .btn:nth-child(2) .ic { transform: rotate(90deg); }
.cap { display: grid; gap: 2px; font-size: 13px; margin-bottom: 12px; }
.demo-box { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; display: grid; gap: 6px; justify-items: start; }
.exc-list { display: grid; gap: 8px; align-content: start; max-height: 75vh; overflow: auto; padding-right: 4px; }
.exc { display: grid; gap: 4px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.exc.sev-high { border-left-color: var(--bad); } .exc.sev-med { border-left-color: var(--warn); }
.exc.on { outline: 2px solid var(--blue); background: var(--blue-soft); }
.exc-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .exc-meta { font-size: 13px; }
.urg { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--bad); border-radius: 4px; padding: 2px 6px; letter-spacing: .06em; }
.exc-detail.sev-high { border-top: 4px solid var(--bad); }
.ack-box { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--warn-soft); border-radius: 8px; flex-wrap: wrap; } .ack-box span { flex: 1; min-width: 180px; font-size: 14px; }
.exc-ctl { margin-top: 12px; display: grid; gap: 8px; }
.mini-alert { padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; } .mini-alert p { color: var(--muted); font-size: 13px; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.hist li { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; }
.hist time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; } .hist em { grid-column: 2; font-style: normal; color: var(--muted); font-size: 12.5px; }
.manifest { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-top: 10px; background: var(--surface-2); }
.mf-h { display: flex; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 10px; font-family: var(--f-mono); font-size: 13px; flex-wrap: wrap; gap: 6px; }

/* ---------- Map ---------- */
.map { margin: 0; } .map svg { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); display: block; }
.map figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mp-sea { fill: var(--sea); } .mp-grid { stroke: var(--line-2); stroke-width: 1; }
.mp-route { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-dasharray: 6 5; opacity: .8; }
.mp-wh { fill: var(--navy); stroke: #fff; stroke-width: 2; } .mp-whl { fill: #fff; font: 600 11px var(--f-sans); text-anchor: middle; }
.mp-pin circle { stroke: #fff; stroke-width: 2; } .mp-pin text { fill: #fff; font: 700 11px var(--f-sans); text-anchor: middle; }
.mp-pin.t-info circle { fill: var(--blue); } .mp-pin.t-ok circle { fill: var(--ok); } .mp-pin.t-bad circle { fill: var(--bad); } .mp-pin.t-hold circle { fill: var(--hold); } .mp-pin.t-neutral circle { fill: var(--faint); }
.mp-lbl { fill: var(--ink) !important; font: 600 11px var(--f-sans) !important; text-anchor: start !important; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.map-empty { padding: 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }

/* ---------- Timeline, POD ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; position: relative; padding-bottom: 16px; }
.tl li::before { content: ''; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); background: var(--surface); color: var(--faint); }
.tl-dot .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.tl-done .tl-dot { background: var(--ok); border-color: var(--ok); color: #fff; } .tl-done::before { background: var(--ok) !important; }
.tl-now .tl-dot { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.tl-bad .tl-dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.tl-todo strong { color: var(--muted); font-weight: 500; }
.tl time { display: block; font-size: 12.5px; color: var(--muted); } .tl p { font-size: 13px; color: var(--muted); }
.pod-media { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.pod-media figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.pod-media img, .pod-media svg { display: block; width: 100%; height: 130px; object-fit: cover; }
.pod-media .sig img { object-fit: contain; background: #fff; }
.pod-media figcaption { font-size: 12px; color: var(--muted); padding: 4px 8px; }
.ph-sample .ph-bg { fill: #C9D6E6; } .ph-sample .ph-door { fill: #8FA3BF; } .ph-txt { fill: #0B1F3A; font: 700 10px var(--f-mono); letter-spacing: .08em; }

/* ---------- Wizard ---------- */
.wiz-steps { list-style: none; display: flex; gap: 4px; margin: 0 0 16px; padding: 0; overflow-x: auto; counter-reset: s; }
.wiz-steps li { flex: 1; min-width: 120px; }
.wiz-steps button, .wiz-steps.m li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; border: 0; background: transparent; padding: 8px 6px 10px; border-top: 4px solid var(--line); cursor: pointer; text-align: left; }
.wiz-steps span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--muted); }
.wiz-steps em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.wiz-steps li.done button, .wiz-steps.m li.done { border-top-color: var(--ok); } .wiz-steps li.done span { background: var(--ok); color: #fff; }
.wiz-steps li.on button, .wiz-steps.m li.on { border-top-color: var(--blue); } .wiz-steps li.on span { background: var(--blue); color: #fff; } .wiz-steps li.on em { color: var(--ink); }
.wiz-steps.m li { min-width: 52px; } .wiz-steps.m em { font-size: 10.5px; }
.wiz-foot { display: flex; justify-content: space-between; gap: 10px; }

/* ---------- Accounts ---------- */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.book { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 6px; align-content: start; border-top: 4px solid var(--navy-3); }
.book:nth-child(1) { border-top-color: var(--blue); } .book:nth-child(2) { border-top-color: var(--ok); } .book:nth-child(3) { border-top-color: var(--warn); } .book:nth-child(4) { border-top-color: var(--hold); } .book:nth-child(5) { border-top-color: var(--navy-3); }
.book-h { display: flex; gap: 8px; align-items: flex-start; } .book-h h3 { font-size: 14px; } .book-h .ic { color: var(--muted); margin-top: 1px; }
.book-v { font-size: 22px; font-variant-numeric: tabular-nums; } .book p { font-size: 12.5px; color: var(--muted); }
.tasks h3 { font-size: 15px; display: flex; gap: 8px; margin-bottom: 10px; }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 10px 16px; border: 0; border-top: 1px solid var(--line-2); background: transparent; cursor: pointer; flex-wrap: wrap; }
.pick-list button.on { background: var(--blue-soft); } .pick-list small { display: block; color: var(--muted); font-size: 12px; }
.stmt-h { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 12px; flex-wrap: wrap; }
.stmt-check { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stmt-check.ok { background: var(--ok-soft); } .stmt-check.ok .ic { color: var(--ok); } .stmt-check.bad { background: var(--bad-soft); }

/* ---------- Platform ---------- */
.dist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.dist li { display: grid; grid-template-columns: 100px 1fr; gap: 10px; } .dist span { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Mobile stage (warehouse, driver, customer) ---------- */
.mstage { display: grid; grid-template-columns: minmax(220px, 320px) auto; gap: 32px; justify-content: center; align-items: start; padding: 24px 16px 60px; }
.mside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; font-size: 14px; position: sticky; top: 80px; }
.mside h3 { font-size: 16px; display: flex; gap: 8px; align-items: center; } .mside h3 .ic { color: var(--blue); }
.side-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); }
.phone { width: 390px; height: min(820px, calc(100vh - 110px)); min-height: 600px; border-radius: 36px; border: 10px solid #0E1A2E; background: var(--bg); box-shadow: 0 20px 60px rgba(11, 31, 58, .25); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.phone-status { display: flex; justify-content: space-between; padding: 6px 18px 4px; font-size: 12px; font-weight: 600; background: var(--navy); color: #fff; font-variant-numeric: tabular-nums; }
.ps-r { display: flex; gap: 4px; align-items: center; } .ps-r .ic { width: 14px; height: 14px; }
.m-app { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
.m-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 3; min-height: 54px; }
.m-head h2 { font-size: 17px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-head .btn-ghost { color: #fff; } .m-back { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; } .m-back:hover { background: var(--navy-3); } .m-back .ic { width: 22px; height: 22px; }
.m-body { padding: 14px; display: grid; gap: 12px; align-content: start; flex: 1; }
.m-body > .card, .m-body > .banner { margin: 0; }
.m-hello { font-size: 17px; font-weight: 600; }
.m-sec { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.m-task, .m-card, .m-next { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px; min-height: 64px; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.m-task > span { flex: 1; } .m-task small { display: block; color: var(--muted); font-size: 13px; } .m-task > .ic:first-child { width: 26px; height: 26px; color: var(--blue); }
.m-task.t-warn { border-left-color: var(--warn); } .m-task.t-info { border-left-color: var(--blue); } .m-task.t-bad { border-left-color: var(--bad); } .m-task.t-hold { border-left-color: var(--hold); }
.m-card { flex-direction: column; align-items: stretch; gap: 4px; border-left-color: var(--blue); }
.m-card.dis { border-left-color: var(--line); opacity: .8; } .m-card.big { min-height: 110px; }
.mc-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; } .mc-main { font-size: 15px; } .mc-sub { font-size: 13px; color: var(--muted); }
.m-next { border-left-color: var(--ok); background: var(--ok-soft); } .m-next > span { flex: 1; } .m-next small { display: block; font-size: 12.5px; color: var(--muted); } .m-next > .ic:first-child { color: var(--ok); width: 26px; height: 26px; }
.m-note { font-size: 13px; color: var(--muted); display: grid; gap: 6px; justify-items: start; }
.m-count, .m-trip { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
.m-count > div, .m-trip > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; min-width: 0; }
.m-count span, .m-trip span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.m-count b { font-size: 26px; font-variant-numeric: tabular-nums; } .m-trip b { font-size: 14px; overflow-wrap: anywhere; }
.m-count .c-bad { border-color: var(--bad); background: var(--bad-soft); } .m-count .c-bad b { color: var(--bad); } .m-count .c-ok { border-color: var(--ok); background: var(--ok-soft); } .m-count .c-ok b { color: var(--ok); }
.scan-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.scan-res { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 10px; min-height: 70px; border: 2px solid; }
.scan-res .ic { width: 32px; height: 32px; flex: none; } .scan-res strong { display: block; font-size: 17px; } .scan-res span { font-size: 13.5px; }
.sr-idle { border-color: var(--line); border-style: dashed; color: var(--muted); }
.sr-ok { background: var(--ok-soft); border-color: var(--ok); } .sr-ok .ic, .sr-ok strong { color: var(--ok); }
.sr-bad { background: var(--bad-soft); border-color: var(--bad); } .sr-bad .ic, .sr-bad strong { color: var(--bad); }
.sr-hold { background: var(--hold-soft); border-color: var(--hold); border-style: dashed; } .sr-hold .ic, .sr-hold strong { color: var(--hold); }
.scan-in { display: flex; gap: 6px; } .scan-in .inp { min-height: 48px; font-family: var(--f-mono); }
.scan-in .btn { min-height: 48px; }
.sample-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 8px; border-top: 1px dashed var(--line); }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .m-actions .btn { min-height: 48px; white-space: normal; }
.m-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.m-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); min-height: 52px; flex-wrap: wrap; }
.m-list li:last-child { border-bottom: 0; } .m-list li > span:first-child { flex: 1; min-width: 0; } .m-list small { display: block; color: var(--muted); font-size: 12.5px; }
.m-list li.li-ok { background: color-mix(in srgb, var(--ok-soft) 60%, transparent); } .m-list li .ic { color: var(--muted); vertical-align: -3px; } .m-list li.li-ok .ic { color: var(--ok); }
.m-q { font-weight: 700; font-variant-numeric: tabular-nums; }
.m-sticky { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(transparent, var(--bg) 30%); display: grid; gap: 8px; z-index: 2; }
.m-sticky.two { grid-template-columns: 1fr 1fr; } .m-sticky .btn { width: 100%; white-space: normal; }
.m-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.m-panel h3 { font-size: 15px; display: flex; gap: 6px; align-items: center; } .m-panel.p-bad { border-color: var(--bad); background: var(--bad-soft); }
.m-panel .field { margin-bottom: 4px; }
.m-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.m-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); background: var(--surface); }
.m-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px; border: 0; background: transparent; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 58px; }
.m-tab .ic { width: 22px; height: 22px; } .m-tab.on { color: var(--blue); } .m-tab.on::before { content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; background: var(--blue); border-radius: 0 0 3px 3px; }
.m-dot { position: absolute; top: 4px; right: calc(50% - 22px); font-style: normal; font-size: 10.5px; background: var(--bad); color: #fff; border-radius: 9px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.m-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-msg { display: flex; gap: 8px; padding: 10px 12px; background: var(--blue-soft); border-radius: 10px; font-size: 13.5px; } .m-msg small { display: block; color: var(--muted); font-size: 12px; } .m-msg .ic { color: var(--blue); flex: none; margin-top: 2px; }
.m-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.m-stops button, .m-stops li > div { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 12px; min-height: 72px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.ms-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--blue); flex: none; }
.ms-n.t-ok { background: var(--ok); } .ms-n.t-bad { background: var(--bad); } .ms-n.t-neutral { background: var(--faint); } .ms-n.t-hold { background: var(--hold); }
.ms-m { flex: 1; min-width: 0; } .ms-m small { display: block; font-size: 12.5px; color: var(--muted); } .ms-s { display: grid; justify-items: end; gap: 2px; } .ms-s small { font-size: 11px; }
.mp-co { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.m-rcv { font-size: 20px !important; } .m-addr { font-size: 14.5px; } .m-addr .ic { color: var(--blue); vertical-align: -3px; }
.m-money { display: grid; gap: 6px; }
.m-money > div { display: grid; grid-template-columns: 1fr auto; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); align-items: baseline; }
.m-money span { font-size: 13px; color: var(--muted); } .m-money b { font-size: 16px; font-variant-numeric: tabular-nums; } .m-money small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.m-money .mm-tot { background: var(--navy); color: #fff; } .m-money .mm-tot span, .m-money .mm-tot small { color: #C7D3E8; } .m-money .mm-tot b { font-size: 20px; }
.m-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .m-acts .btn { min-height: 56px; white-space: normal; line-height: 1.2; }
.m-acts .btn:nth-child(4) { grid-column: 1 / -1; }
.m-cash { background: var(--navy); color: #fff; border-radius: 12px; padding: 16px; display: grid; gap: 2px; } .m-cash span, .m-cash small { color: #C7D3E8; font-size: 13px; } .m-cash b { font-size: 28px; font-variant-numeric: tabular-nums; }
.co-block { padding: 8px 0; border-bottom: 1px dashed var(--line-2); display: grid; gap: 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sync-strip { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; } .sync-strip span { flex: 1; }
.sync-strip.off { background: var(--neutral-soft); border: 1px dashed var(--muted); } .sync-strip.pend { background: var(--hold-soft); border: 1px dashed var(--hold); } .sync-strip.pend .ic { color: var(--hold); }
.pk-pick { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); } .pk-pick small { display: block; color: var(--muted); font-size: 12.5px; }
.photo-pick { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; }
.photo-pick > img, .photo-pick > svg, .ph-empty { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photo-pick > div { display: grid; gap: 6px; justify-items: start; }
.ph-empty { display: grid; place-items: center; color: var(--muted); font-size: 12px; background: var(--surface-2); align-content: center; }
.sig-pad { width: 100%; height: 130px; border: 2px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
em.reqd { font-style: normal; font-size: 11px; color: var(--bad); font-weight: 600; margin-left: 4px; }
.done-big { text-align: center; display: grid; gap: 6px; justify-items: center; padding: 16px 0; } .done-big .ic { width: 64px; height: 64px; color: var(--ok); stroke-width: 1.5; } .done-big h3 { font-size: 20px; }
.big-num { font-size: 26px; font-weight: 600; text-align: center; padding: 8px; }
.c-hero { background: var(--navy); color: #fff; padding: 26px 18px 22px; display: grid; gap: 4px; justify-items: start; } .c-logo { display: block; width: 132px; background: #fff; border-radius: 14px; padding: 8px 10px; margin-bottom: 8px; } .c-hero h2 { font-size: 22px; } .c-hero p { color: #C7D3E8; font-size: 13.5px; }
.c-sum h3 { font-size: 20px; } .c-done { display: flex; gap: 12px; background: var(--ok-soft); border-color: var(--ok); } .c-done > .ic { width: 36px; height: 36px; color: var(--ok); flex: none; } .c-done > div { display: grid; gap: 4px; }

/* ---------- Guide ---------- */
.scen { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.scen li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); }
.sc-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--line-2); color: var(--muted); }
.sc-done .sc-n { background: var(--ok); color: #fff; } .sc-now .sc-n { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.sc-b { display: grid; gap: 6px; min-width: 0; } .sc-t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .sc-b p { font-size: 13.5px; color: var(--muted); }
.sc-done .sc-t b { color: var(--muted); font-weight: 500; }
.scen.compact li { padding: 9px 0; } .scen.compact .sc-todo .btn-row { display: none; }
.guide-drawer { position: fixed; right: 0; top: 60px; bottom: 0; width: min(420px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -10px 0 40px rgba(11, 31, 58, .18); z-index: 45; display: flex; flex-direction: column; }
.gd-h { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); } .gd-h h3 { font-size: 16px; } .gd-h p { font-size: 13px; color: var(--muted); }
.gd-b { flex: 1; overflow: auto; padding: 0 16px; } .gd-f { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.role-tile { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); cursor: pointer; }
.role-tile:hover { border-color: var(--blue); } .role-tile .ic { width: 24px; height: 24px; color: var(--blue); } .role-tile b { font-size: 14px; } .role-tile small { font-size: 12px; color: var(--muted); }
.doc-links { list-style: none; margin: 0; padding: 0; } .doc-links button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 11px 4px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; cursor: pointer; text-align: left; } .doc-links button span { flex: 1; } .doc-links .ic:first-child { color: var(--blue); }
.inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; } .inv .card { margin: 0; }
.inv-list { list-style: none; margin: 0; padding: 0; } .inv-list button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px dashed var(--line-2); background: transparent; text-align: left; cursor: pointer; } .inv-list button span { flex: 1; } .inv-list small { display: block; color: var(--muted); font-size: 12.5px; } .inv-list button:hover b { color: var(--blue); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sw { display: grid; gap: 4px; font-size: 13px; } .sw span { height: 48px; border-radius: 8px; border: 1px solid var(--line); } .sw small { color: var(--muted); font-size: 11.5px; }
.ty-d { font-size: 26px; font-weight: 600; } .ty-h { font-size: 18px; font-weight: 600; margin: 6px 0; } .ty-si, .ty-ta { font-size: 16px; margin-top: 6px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.states .card { margin: 0; } .states .card > h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.states .scan-res { margin-bottom: 6px; }
.flow { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.fl-node { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; background: var(--surface-2); text-align: center; }
.fl-node small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); font-weight: 700; }
.n-actor { border-color: var(--blue-line); background: var(--blue-soft); } .n-sys { border-style: dashed; } .n-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); } .n-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); } .n-hold { background: var(--hold-soft); border-color: color-mix(in srgb, var(--hold) 40%, transparent); border-style: dashed; }
.fl-arr { display: block; text-align: center; color: var(--faint); line-height: 1.4; }
.fl-branch { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 6px 0; }
.fl-col { display: flex; flex-direction: column; border-left: 2px solid var(--line); padding-left: 8px; }
.fl-cond { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.fl-branch { margin-bottom: 0; }
.decisions li .ic { color: var(--warn); }
.steps-doc { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; }

/* ---------- Modal, toast ---------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(8, 18, 36, .55); z-index: 80; }
.modal { position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); border-top: 5px solid var(--blue); }
.modal.wide { width: min(860px, calc(100vw - 32px)); }
.modal.m-bad { border-top-color: var(--bad); } .modal.m-warn { border-top-color: var(--warn); }
.mdl-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px 8px; } .mdl-h h3 { font-size: 18px; }
.mdl-b { padding: 4px 18px 14px; overflow: auto; display: grid; gap: 10px; }
.mdl-b > .banner { margin: 0; }
.mdl-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(460px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--navy); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font-size: 14px; transition: opacity .4s, transform .4s; }
.toast .ic { flex: none; } .t-ok .ic { color: #6FE0A8; } .t-warn .ic { color: var(--amber-mark); } .t-bad .ic { color: #FF8A8F; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-plan, .g-2-1, .g-exc { grid-template-columns: minmax(0, 1fr); } .exc-list { max-height: none; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: 100%; width: 280px; z-index: 70; transform: translateX(-100%); transition: transform .2s; box-shadow: 10px 0 40px rgba(0, 0, 0, .2); padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .nav-open .side { transform: none; } .nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(8, 18, 36, .45); z-index: 65; border: 0; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 600; min-height: 42px; }
  .main { padding: 16px 16px 60px; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .mstage { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  .mside { position: static; border-radius: 0; border-width: 0 0 1px; order: 2; }
  .phone { width: 100%; height: auto; min-height: calc(100vh - 60px); border: 0; border-radius: 0; box-shadow: none; }
  .phone-status { display: none; } .m-app { overflow: visible; } .m-tabs { position: sticky; bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 5; }
  .tb-clock em, .tb-guide > span:not(.tb-prog) { display: none; }
  .trip-mini button { grid-template-columns: 60px 1fr; } .tm-st { grid-column: 1 / -1; }
  .notif-panel { top: 110px; }
  .guide-drawer { top: 0; }
  .sel-bar { top: 110px; }
}
@media (max-width: 560px) {
  .topbar { padding: 8px 12px; } .tb-brand div > span { display: none; } .tb-brand strong { font-size: 14px; }
  .tb-ctl { width: 100%; } .tb-role { flex: 1; min-width: 0; } .tb-role select { max-width: none; width: 100%; } .tb-role-tag { display: none; }
  .tb-clock span { font-size: 12px; } .ph h1 { font-size: 21px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-v { font-size: 20px; }
  .kv > div { grid-template-columns: 1fr; gap: 0; }
  .tbl { font-size: 13px; } .hist li { grid-template-columns: 1fr; }
  .fl-branch { grid-auto-flow: row; }
  .pod-media { grid-template-columns: 1fr; }
  .inv { grid-template-columns: minmax(0, 1fr); }
  .wiz-foot .btn { flex: 1; }
  .notif-panel { top: 120px; } .sel-bar { top: 120px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 1000px) { .stats.s9 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ph-empty .ic { width: 24px; height: 24px; }
@media (max-width: 900px) { .m-head { position: static; } }
.tbl td:first-child { white-space: nowrap; }
