:root {
  --bg: #f4f6fb; --panel: #ffffff; --panel-2: #f8fafd; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --line-2: #eef2f7;
  --brand: #1d4ed8; --brand-ink: #ffffff; --brand-soft: #e8efff; --focus: #93b4f7;
  --green: #15803d; --green-soft: #e9f8ef; --amber: #b45309; --amber-soft: #fff6e5; --red: #b91c1c; --red-soft: #fdecec;
  --blue: #1d4ed8; --blue-soft: #eaf0ff; --violet: #6d28d9; --violet-soft: #f2edff; --grey: #475569; --grey-soft: #eef1f5;
  --nav: #0b1324; --nav-ink: #cbd5e1; --nav-active: #1e3a8a;
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 24px -14px rgba(15, 23, 42, .28);
  --tap: 46px; --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --panel: #111a2e; --panel-2: #0f1729; --ink: #e5ebf5; --ink-2: #c5cfdf; --muted: #8b99b3; --line: #22304a; --line-2: #1a2640;
    --brand: #4f7df5; --brand-soft: #16254a; --focus: #3558b5;
    --green: #4ade80; --green-soft: #0f2a1c; --amber: #fbbf24; --amber-soft: #2b2110; --red: #f87171; --red-soft: #321417;
    --blue: #7ea2ff; --blue-soft: #15224a; --violet: #b39cff; --violet-soft: #231a45; --grey: #9fb0c8; --grey-soft: #1a2437;
    --nav: #070c18; --nav-active: #1b2f63;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 26px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --panel: #111a2e; --panel-2: #0f1729; --ink: #e5ebf5; --ink-2: #c5cfdf; --muted: #8b99b3; --line: #22304a; --line-2: #1a2640;
  --brand: #4f7df5; --brand-soft: #16254a; --focus: #3558b5;
  --green: #4ade80; --green-soft: #0f2a1c; --amber: #fbbf24; --amber-soft: #2b2110; --red: #f87171; --red-soft: #321417;
  --blue: #7ea2ff; --blue-soft: #15224a; --violet: #b39cff; --violet-soft: #231a45; --grey: #9fb0c8; --grey-soft: #1a2437;
  --nav: #070c18; --nav-active: #1b2f63;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 26px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 20px; } h2 { font-size: 17px; } h3 { font-size: 15.5px; } h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .strong { font-weight: 650; } .num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; } .grow { flex: 1; min-width: 0; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; } .stack-lg > * + * { margin-top: 16px; }
.grid { display: grid; gap: 10px; } .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)); }
@media (max-width: 700px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bd.stack > .grid.g2, .sbody .grid.g2, details > .grid.g2 { grid-template-columns: 1fr; } }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--nav); color: var(--nav-ink); position: sticky; top: 0; height: 100vh; overflow: auto; padding: 14px 10px 24px; }
.brandbar { display: flex; gap: 10px; align-items: center; padding: 4px 8px 14px; border-bottom: 1px solid #1c2740; margin-bottom: 10px; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.brandbar b { color: #f8fafc; display: block; font-size: 14.5px; } .brandbar span { font-size: 11px; color: #7c8ba5; }
.side h5 { margin: 14px 10px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #64748b; }
.navlink { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--nav-ink); background: transparent; border: 0; cursor: pointer; font-size: 14px; text-align: left; }
.navlink:hover { background: #131e36; color: #fff; } .navlink.on { background: var(--nav-active); color: #fff; }
.navlink .pill { margin-left: auto; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 10px 18px; display: flex; gap: 10px; align-items: center; min-height: 58px; }
.topbar .title { flex: 1; min-width: 0; } .topbar .title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .topbar .title .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { padding: 16px 18px 110px; max-width: 1180px; width: 100%; margin: 0 auto; }
.bottomnav { display: none; }
.iconbtn { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.iconbtn .badge { position: absolute; top: -5px; right: -5px; }
.backbtn { margin-left: -6px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .content { padding: 12px 12px calc(96px + var(--safe-bottom)); }
  .topbar { padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-bottom)); }
  .bottomnav button { flex: 1; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; position: relative; cursor: pointer; min-height: 50px; }
  .bottomnav button.on { color: var(--brand); font-weight: 650; }
  .bottomnav .badge { position: absolute; top: 0; left: calc(50% + 6px); }
}

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.card > .hd h2, .card > .hd h3 { flex: 1; }
.card > .bd { padding: 14px; } .card > .bd.flush { padding: 0; }
.card + .card, .card + .section, .section + .card { margin-top: 14px; }
.section { margin-top: 18px; } .section > h4 { margin: 0 2px 8px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 13px; box-shadow: var(--shadow); cursor: default; text-align: left; }
button.tile { cursor: pointer; width: 100%; }
.tile .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tile .v { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; }
.tile .h { font-size: 12px; color: var(--muted); }
.tile.red { border-left: 4px solid var(--red); } .tile.amber { border-left: 4px solid var(--amber); } .tile.green { border-left: 4px solid var(--green); } .tile.blue { border-left: 4px solid var(--blue); }
.list > .item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line-2); }
.list > .item:first-child { border-top: 0; }
.list > button.item, .list > a.item { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; color: inherit; }
.list > button.item:hover, .list > a.item:hover { background: var(--panel-2); }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.banner { border-radius: 12px; padding: 11px 13px; font-size: 14px; border: 1px solid var(--line); background: var(--panel-2); }
.banner.blue { background: var(--blue-soft); border-color: transparent; } .banner.amber { background: var(--amber-soft); border-color: transparent; } .banner.red { background: var(--red-soft); border-color: transparent; } .banner.green { background: var(--green-soft); border-color: transparent; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--grey-soft); color: var(--grey); }
.chip.green { background: var(--green-soft); color: var(--green); } .chip.amber { background: var(--amber-soft); color: var(--amber); } .chip.red { background: var(--red-soft); color: var(--red); }
.chip.blue { background: var(--blue-soft); color: var(--blue); } .chip.violet { background: var(--violet-soft); color: var(--violet); } .chip.grey { background: var(--grey-soft); color: var(--grey); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.badge.blue { background: var(--brand); } .badge.grey { background: #64748b; }
.pill { font-size: 11px; background: #1e293b; color: #cbd5e1; border-radius: 999px; padding: 1px 8px; font-weight: 650; }
.navlink.on .pill { background: #3558b5; color: #fff; }
.pill.red { background: #b91c1c; color: #fff; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--tap); padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 650; cursor: pointer; white-space: nowrap; font-size: 14.5px; }
.btn:hover { border-color: #cbd5e1; } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.green { background: #15803d; border-color: #15803d; color: #fff; } .btn.red { background: #b91c1c; border-color: #b91c1c; color: #fff; } .btn.amber { background: #b45309; border-color: #b45309; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; } .btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; } .btn.lg { min-height: 54px; font-size: 16px; } .btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow.stretch > .btn { flex: 1; }
.fab { position: fixed; right: 18px; bottom: calc(86px + var(--safe-bottom)); z-index: 25; border-radius: 999px; min-height: 54px; padding: 0 20px; box-shadow: 0 10px 28px -8px rgba(29, 78, 216, .6); }
@media (min-width: 901px) { .fab { bottom: 26px; } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, input.input, select.input, textarea.input { width: 100%; min-height: var(--tap); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 10px 12px; font-size: 16px; outline: none; }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus); }
.input.bad { border-color: var(--red); }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.stepper button { width: 54px; border: 0; background: var(--panel-2); font-size: 22px; font-weight: 700; cursor: pointer; color: var(--ink); }
.stepper input { flex: 1; min-width: 0; text-align: center; font-size: 22px; font-weight: 750; border: 0; background: transparent; min-height: 54px; outline: none; }
.seg { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.seg label { position: relative; display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--panel); min-height: var(--tap); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.seg label b { display: block; font-size: 14px; } .seg label span { display: block; font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: center; min-height: var(--tap); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.sizes .sz { display: flex; flex-direction: column; gap: 3px; }
.sizes .sz label { font-size: 12px; text-align: center; font-weight: 700; color: var(--muted); }
.sizes .sz input { text-align: center; padding: 8px 4px; }
.formerr { margin-top: 10px; }
.photo-slot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: var(--panel-2); }
.thumb.lg { width: 110px; height: 110px; }

/* ---------- jobs ---------- */
.job { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.job + .job { margin-top: 12px; }
.job .top { padding: 13px 14px 10px; }
.job .product { font-size: 17px; font-weight: 750; }
.job .next { margin: 10px 14px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-size: 14.5px; font-weight: 600; }
.job .next.n-ready { background: var(--green-soft); color: var(--green); } .job .next.n-incoming { background: var(--blue-soft); color: var(--blue); } .job .next.n-blocked { background: var(--red-soft); color: var(--red); } .job .next.n-tosend { background: var(--violet-soft); color: var(--violet); }
.job .counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; padding: 0 14px 10px; }
.job .count { background: var(--panel-2); border-radius: 10px; padding: 7px 9px; }
.job .count .k { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.job .count .v { font-size: 18px; font-weight: 750; }
.job .incoming { margin: 0 14px 10px; border: 1.5px dashed var(--blue); border-radius: 12px; padding: 10px 12px; background: var(--blue-soft); }
.job .actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 14px 14px; border-top: 1px solid var(--line-2); }
.job .actions .btn { flex: 1 1 140px; }
.job details { margin: 0 14px 10px; }
.job summary { cursor: pointer; font-size: 13.5px; color: var(--muted); font-weight: 650; padding: 4px 0; }
.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.progress.green > i { background: var(--green); }
.route { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.route .st { font-size: 11.5px; border-radius: 999px; padding: 3px 8px; background: var(--grey-soft); color: var(--grey); font-weight: 650; }
.route .st.done { background: var(--green-soft); color: var(--green); } .route .st.now { background: var(--blue-soft); color: var(--blue); } .route .st.bad { background: var(--red-soft); color: var(--red); }
.route .arr { color: var(--muted); font-size: 11px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 14px; font-weight: 650; font-size: 13.5px; cursor: pointer; color: var(--ink-2); min-height: 40px; }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs button .n { margin-left: 6px; font-size: 12px; opacity: .7; }
.search { position: relative; }
.search input { padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.bar { height: 8px; border-radius: 999px; background: var(--line-2); min-width: 60px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }
.bar.red > i { background: var(--red); } .bar.amber > i { background: var(--amber); } .bar.green > i { background: var(--green); }

/* ---------- sheet / toast ---------- */
.scrim { position: fixed; inset: 0; background: rgba(2, 6, 23, .5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet { background: var(--panel); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up .2s ease-out; }
.sheet.wide { max-width: 860px; }
@media (min-width: 700px) { .scrim { align-items: center; padding: 20px; } .sheet { border-radius: 18px; } }
.sheet > header { display: flex; gap: 10px; align-items: center; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); }
.sheet > header h2 { flex: 1; }
.sheet .sbody { padding: 16px 18px; overflow-y: auto; }
.sheet > footer { display: flex; gap: 8px; padding: 12px 18px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--line-2); }
.sheet > footer .btn { flex: 1; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--safe-bottom)); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
@media (min-width: 901px) { .toasts { bottom: 24px; left: auto; right: 24px; transform: none; } }
.toast { background: #0f172a; color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 14px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6); pointer-events: auto; animation: up .2s ease-out; }
.toast.ok { background: #14532d; } .toast.err { background: #7f1d1d; } .toast.warn { background: #78350f; }
.updates { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 40; }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: #7f1d1d; color: #fff; text-align: center; font-size: 13px; padding: 6px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
.demo-ribbon { background: #fde68a; color: #78350f; font-size: 12px; text-align: center; padding: 4px; font-weight: 650; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 10% -10%, #1e3a8a66, transparent), #0b1120; }
.login .box { width: min(420px, 100%); background: var(--panel); border-radius: 20px; padding: 24px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.login .demo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 260px; overflow: auto; margin-top: 8px; }
.login .demo button { text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 7px 9px; cursor: pointer; }
.login .demo b { display: block; font-size: 12.5px; } .login .demo span { font-size: 11px; color: var(--muted); }

.helpbox { border-left: 4px solid var(--brand); }
.helpbox ul { margin: 6px 0 0; padding-left: 18px; } .helpbox li { margin: 4px 0; }
.sev { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-top: 6px; background: var(--grey); }
.sev.red { background: var(--red); } .sev.amber { background: var(--amber); } .sev.info { background: var(--blue); }
.unread { font-weight: 700; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media print { .side, .topbar, .bottomnav, .fab { display: none !important; } .content { padding: 0; } }

/* ---------- buying list ---------- */
.buy-group > .hd h2 { font-size: 18px; }
.buy-total { font-size: 24px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; }
.buy-total span { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.buy-line { display: grid; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line-2); }
.buy-line:first-child { border-top: 0; }
.buy-line .colour { font-size: 15.5px; }
.buy-qty { font-size: 22px; font-weight: 750; min-width: 44px; text-align: right; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.size { display: inline-flex; gap: 6px; align-items: baseline; border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 4px 9px; font-size: 14.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.size b { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.size.extra { border-style: dashed; color: var(--amber); background: var(--amber-soft); font-size: 13px; }
.buy-line details summary { cursor: pointer; font-size: 13px; color: var(--brand); font-weight: 650; min-height: 28px; display: flex; align-items: center; }
.buy-order { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.buy-order .grow { min-width: 0; }
.buy-share { margin-top: 12px; }
.tile .v.small-v { font-size: 18px; margin-top: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
@media print { .buy-share, .tabs, .buy-line .btnrow, .buy-line details { display: none !important; } .buy-group { break-inside: avoid; box-shadow: none; } }
.buy-banner { display: block; width: 100%; margin-top: 12px; text-align: left; cursor: pointer; color: inherit; font: inherit; line-height: 1.5; }
.buy-banner svg { vertical-align: -3px; margin-right: 4px; }

/* ---------- on the road ---------- */
.run { transition: border-color .2s, box-shadow .2s; }
.run .kv { grid-template-columns: minmax(80px, 28%) 1fr; }
.kv .k { color: var(--muted); }
.right { text-align: right; }
.eta { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel-2); display: grid; gap: 8px; }
.eta-big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.eta-bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.eta-bar i { display: block; height: 100%; width: 2%; background: var(--green); border-radius: 99px; transition: width 1s linear; }
.run-soon { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.run-soon .eta { background: var(--amber-soft); border-color: transparent; }
.run-soon .eta-big { color: var(--amber); } .run-soon .eta-bar i { background: var(--amber); }
.run-late { border: 2px solid var(--red); animation: pf-alarm 1.2s ease-in-out infinite; }
.run-late .eta { background: var(--red-soft); border-color: transparent; }
.run-late .eta-big { color: var(--red); } .run-late .eta-bar i { background: var(--red); width: 100% !important; }
@keyframes pf-alarm { 0%, 100% { box-shadow: 0 0 0 0 var(--red-soft); } 50% { box-shadow: 0 0 0 7px var(--red-soft); } }
@media (prefers-reduced-motion: reduce) { .run-late { animation: none; } .eta-bar i { transition: none; } }
.late-banner { margin: 10px 0; display: grid; gap: 6px; border: 1px solid var(--red) !important; }
.tabs button.late:not(.on) { border-color: var(--red); color: var(--red); }
.card.avoid { opacity: .75; }
.eta-seg { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.eta-seg label { min-height: 42px; padding: 9px 10px; }

/* ---------- floor: files received, materials lists, manager watch mode ---------- */
.filein { margin: 0 14px 10px; padding: 9px 12px; border-radius: 10px; background: var(--green-soft); font-size: 13.5px; display: grid; gap: 4px; }
.filein.waiting { background: var(--grey-soft); color: var(--grey); display: flex; gap: 6px; align-items: center; }
.matlist { margin: 0 14px 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13.5px; }
.matlist ul, .matlist-plain { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.matlist li { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-2); padding-top: 4px; }
.matrow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, .8fr); gap: 6px; }
.watchbar { border-left: 4px solid var(--blue); } .watchbar.covering { border-left-color: var(--amber); background: var(--amber-soft); }
.danger-card { border: 2px solid var(--red); margin-top: 12px; }
.danger-card > .hd { background: var(--red-soft); }
.danger-banner { border: 2px solid var(--red) !important; background: var(--red-soft) !important; }
.danger-line { background: var(--red-soft); border-radius: 10px; padding: 6px 8px; }
/* server check */
code.cmd { display: block; margin: 6px 0; padding: 8px 10px; background: var(--surface-2, rgba(127,127,127,.12)); border-radius: 8px; font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; user-select: all; }
/* your brand (brand folder on the server) */
.brandlogo { display: inline-block; width: auto; max-width: 100%; height: 46px; object-fit: contain; object-position: left center; }
.brandlogo.on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brandlogo.on-light { display: none; } :root:not([data-theme="light"]) .brandlogo.on-dark { display: inline-block; } }
:root[data-theme="dark"] .brandlogo.on-light { display: none; } :root[data-theme="dark"] .brandlogo.on-dark { display: inline-block; }
.brandbar .navlogo { display: block; height: 30px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; margin-bottom: 3px; }
/* install as an app */
.installbar { display: flex; align-items: center; gap: 12px; margin: 10px 14px 0; padding: 10px 10px 10px 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; box-shadow: var(--shadow); }
.installbar img { border-radius: 10px; flex: 0 0 auto; background: #fff; }
.installbar b { display: block; font-size: 14.5px; } .installbar span { display: block; font-size: 12.5px; color: var(--muted); }
.installbar .iconbtn { flex: 0 0 auto; font-size: 20px; line-height: 1; }
.installsteps { margin: 0 0 12px; padding-left: 20px; } .installsteps li { margin: 8px 0; }
.share-glyph { display: inline-block; padding: 0 5px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
@media (max-width: 420px) { .installbar span { display: none; } }
/* messages */
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 750; font-size: 14px; letter-spacing: .02em; }
.thread.unread b { font-weight: 800; } .thread .badge { position: static; margin-left: 6px; }
.convhead { margin-bottom: 10px; } .convhead .bd { padding: 10px 12px; }
.msgs { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 12px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .bub { background: var(--panel); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px; line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.mine .bub { background: var(--brand); color: var(--brand-ink); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg .meta { font-size: 11px; color: var(--muted); margin: 2px 6px 0; }
.msg.call .bub { background: var(--red-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
.msg.answer .bub { background: var(--green-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); }
.msg .bub b { display: block; margin-bottom: 2px; }
.ordref { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: rgba(127, 127, 127, .16); color: inherit; cursor: pointer; }
.callstate { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; font-weight: 650; } .callstate.ok { color: var(--green); } .callstate.wait { color: var(--amber); }
.daysep { text-align: center; margin: 10px 0 4px; } .daysep span { font-size: 11.5px; color: var(--muted); background: var(--bg); padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 10px; margin-top: 4px; border-top: 1px solid var(--line); }
.composer .row { align-items: flex-end; } .composer textarea { resize: none; min-height: 44px; max-height: 140px; line-height: 1.35; }
.composer .btn { min-height: 44px; }
.aboutorder { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--brand-soft); }
.linkbtn { background: none; border: 0; cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; color: inherit; }
@media (max-width: 900px) { .composer { bottom: calc(64px + var(--safe-bottom)); } }
/* someone is calling your attention */
.callov { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; background: rgba(8, 10, 16, .82); animation: callbg 1.6s ease-in-out infinite alternate; }
@keyframes callbg { from { background: rgba(8, 10, 16, .82); } to { background: color-mix(in srgb, var(--red) 55%, rgba(8, 10, 16, .82)); } }
.callcard { width: min(420px, 100%); background: var(--panel); color: var(--ink); border-radius: 22px; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 10px; text-align: center; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.callcard h2 { font-size: 22px; }
.callring { font-size: 44px; line-height: 1; margin: 0 auto 2px; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); animation: ringpulse 1.1s ease-out infinite; }
@keyframes ringpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 55%, transparent); } 100% { box-shadow: 0 0 0 26px transparent; } }
.callwho { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.callnote { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 16px; text-align: left; }
body.calling { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .callov, .callring { animation: none; } }
