/* Brownrig Supplies Direct trade desk preview. Light, theme locked (an internal tool). Tokens mirrored in DESIGN.md. */
@font-face { font-family: 'Plex'; src: url('/fonts/plex-sans.woff2') format('woff2'); font-weight: 100 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex'; src: url('/fonts/plex-sans-ext.woff2') format('woff2'); font-weight: 100 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F2F3F7;
  --surface: #FFFFFF;
  --surface-2: #F6F7FA;
  --line: #E1E3EA;
  --line-2: #C9CDD8;
  --ink: #11131D;
  --ink-2: #3B4050;
  --ink-3: #5A6072;
  --brand: #03009A;
  --brand-hi: #1A16B4;
  --brand-deep: #020070;
  --brand-wash: rgba(3, 0, 154, 0.06);
  --brand-wash-2: rgba(3, 0, 154, 0.12);
  --orange: #FF6600;
  --ok: #146C3C; --ok-bg: #E2F2E8;
  --warn: #8A4B00; --warn-bg: #FBEFD9;
  --bad: #B3261E; --bad-bg: #FCE7E5;
  --r-tag: 4px;
  --r-ctl: 6px;
  --r-card: 10px;
  --shadow: 0 1px 2px rgba(17, 19, 45, 0.05), 0 10px 28px -20px rgba(3, 0, 80, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-top: 20; --z-tabs: 25; --z-badge: 45; --z-scrim: 50; --z-drawer: 51; --z-modal: 60; --z-toast: 70;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 'Plex', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
svg { fill: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: 'Plex Mono', ui-monospace, monospace; font-weight: 500; font-size: 0.92em; letter-spacing: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.strong { font-weight: 650; }
.bad { color: var(--bad); }
.ok { color: var(--ok); }
.short { color: var(--bad); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-ctl); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color .2s, box-shadow .2s, transform .15s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hi); }
.btn--light { background: #fff; color: var(--brand); }
.btn--light:hover { background: #E9E9FB; }
.btn--ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--brand); }
.btn--wa { background: #1D7A44; color: #fff; }
.btn--wa:hover { background: #176538; }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn--lg { min-height: 50px; padding: 0 22px; font-size: 16px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.link { color: var(--brand); font-weight: 600; font-size: 14px; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.link:hover { text-decoration: underline; }

/* chips: square tags, not pills */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-tag); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip--demo { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.chip--ok { background: var(--ok-bg); color: var(--ok); box-shadow: none; }
.chip--warn { background: var(--warn-bg); color: var(--warn); box-shadow: none; }
.chip--bad { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.chip--brand { background: var(--brand-wash-2); color: var(--brand); box-shadow: none; }

/* ---------- intro ---------- */
.intro { min-height: 100dvh; display: grid; grid-template-columns: minmax(300px, 0.8fr) 1.2fr; background: var(--surface); }
.intro__brand { position: relative; display: flex; flex-direction: column; padding: clamp(28px, 5vw, 64px); background: var(--brand); color: #fff; overflow: hidden; }
.intro__logo { width: min(100%, 280px); height: auto; }
.intro__since { margin: 28px 0 0; font-size: clamp(20px, 2vw, 26px); line-height: 1.25; font-weight: 600; max-width: 18ch; letter-spacing: -0.01em; }
.intro__trades { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; max-width: 380px; }
.intro__trades li { padding: 3px 9px; border-radius: var(--r-tag); font-size: 13px; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.intro__facts { margin: auto 0 0; padding: 40px 0 56px; display: grid; gap: 16px; }
.intro__facts dt { font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.intro__facts dd { margin: 2px 0 0; font-size: 16px; }
.intro__facts b { font-weight: 650; }
.intro__band { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--orange); }
.intro__main { padding: clamp(28px, 5vw, 72px) clamp(20px, 5vw, 80px); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.intro__title { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 650; margin: 0; max-width: 15ch; }
.intro__sub { font-size: clamp(16px, 1.3vw, 18px); color: var(--ink-2); max-width: 48ch; margin: 18px 0 0; }
.intro__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin-top: 28px; }
.intro__note { font-size: 14px; color: var(--ink-3); }
.catalogue { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; max-width: 900px; }
.catalogue__item { background: #fff; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); padding: 10px; display: grid; gap: 8px; align-content: start; }
.catalogue__item img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.catalogue__item span { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.catalogue__item b { display: block; font-family: 'Plex Mono', ui-monospace, monospace; font-weight: 500; color: var(--brand); font-size: 12px; }
@media (max-width: 1100px) { .catalogue { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; } }
@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; }
  .intro__brand { padding: 24px 20px 30px; }
  .intro__logo { width: 200px; }
  .intro__since { margin-top: 18px; font-size: 18px; max-width: none; }
  .intro__trades { margin-top: 16px; }
  .intro__trades li { font-size: 12px; }
  .intro__facts { padding: 20px 0 0; grid-template-columns: 1fr 1fr; gap: 12px; }
  .intro__facts dd { font-size: 14px; }
  .intro__main { padding: 28px 20px 96px; justify-content: flex-start; }
}
@media (max-width: 420px) { .intro__facts { grid-template-columns: 1fr; } .catalogue { gap: 8px; } }

/* ---------- app shell ---------- */
.top { position: sticky; top: 0; z-index: var(--z-top); background: var(--brand); color: #fff; box-shadow: 0 1px 0 var(--brand-deep); }
.top__bar { display: flex; align-items: center; gap: 18px; max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); min-height: 64px; }
.top__brand { flex: none; }
.top__brand img { width: 148px; height: auto; }
.top__nav { display: flex; align-items: stretch; gap: 2px; align-self: stretch; margin-left: 8px; }
.top__nav a { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; text-decoration: none; font-weight: 500; font-size: 14px; color: rgba(255, 255, 255, 0.82); white-space: nowrap; }
.top__nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.top__nav a[aria-current="page"] { color: #fff; font-weight: 600; }
.top__nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--orange); }
.count { min-width: 20px; padding: 0 6px; border-radius: var(--r-tag); background: rgba(255, 255, 255, 0.18); color: #fff; font-size: 12px; font-weight: 600; text-align: center; line-height: 20px; }
.count--warn { background: #FFE2CC; color: #6A2C00; }
.count:empty { display: none; }
.top .chip--demo { margin-left: auto; }
.top__new { flex: none; }
.main { max-width: 1440px; margin: 0 auto; }
.pagehead { padding: 26px clamp(16px, 3vw, 32px) 4px; }
.pagehead__title { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.pagehead__sub { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; max-width: 70ch; }
.view { padding: 18px clamp(16px, 3vw, 32px) 24px; outline: none; }
.foot { padding: 8px clamp(16px, 3vw, 32px) 32px; font-size: 13px; color: var(--ink-3); }
.foot p { margin: 2px 0; }
.foot b { color: var(--ink-2); font-weight: 600; }
.tabs { display: none; }
@media (max-width: 1180px) { .top__nav a { padding: 0 9px; } .top__brand img { width: 128px; } }
@media (max-width: 1060px) {
  .top__nav { display: none; }
  .top__bar { min-height: 56px; gap: 10px; }
  .top__brand img { width: 118px; }
  .top__new span { display: none; }
  .top__new { padding: 0 11px; }
  .chip--demo { font-size: 11px; padding: 2px 7px; }
  .pagehead { padding-top: 18px; }
  .pagehead__title { font-size: 21px; }
  .foot { padding-bottom: 150px; }
  .tabs { position: fixed; inset: auto 0 0; z-index: var(--z-tabs); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -1px 0 var(--line); }
  .tabs a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 600; border-radius: var(--r-ctl); }
  .tabs a svg { width: 22px; height: 22px; }
  .tabs a[aria-current="page"] { color: var(--brand); background: var(--brand-wash); }
  .dot-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-tag); background: var(--brand); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; line-height: 17px; text-align: center; }
  .dot-count--warn { background: #B04A00; }
  .dot-count:empty { display: none; }
}

/* ---------- panels ---------- */
.panel { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); padding: 18px; min-width: 0; }
.panel--flush { padding: 6px; }
.panel__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px; }
.panel__head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.panel__head .link, .panel__head > .muted { margin-left: auto; }
.panel__head--pad { padding: 12px 12px 0; }
.sub-h { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.sub-h svg { width: 17px; height: 17px; color: var(--brand); }

/* stage rail */
.rail { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.rail__step { display: grid; gap: 2px; height: 100%; padding: 14px 26px 14px 30px; text-decoration: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); transition: background-color .2s; }
.rail li:first-child .rail__step { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); padding-left: 18px; border-radius: var(--r-card) 0 0 var(--r-card); }
.rail li:last-child .rail__step { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); border-radius: 0 var(--r-card) var(--r-card) 0; }
.rail__step:hover { background: #EBEBFA; }
.rail__label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rail__n { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
.rail__sub { font-size: 12px; color: var(--ink-3); }
.rail__step--enquiry { background: var(--brand); box-shadow: none; }
.rail__step--enquiry:hover { background: var(--brand-hi); }
.rail__step--enquiry .rail__label, .rail__step--enquiry .rail__sub { color: rgba(255, 255, 255, 0.8); }
.rail__step--enquiry .rail__n { color: #fff; }
.rail__step--invoiced .rail__n { font-size: 22px; padding: 3px 0 2px; }
@media (max-width: 1060px) {
  .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .rail__step, .rail li:first-child .rail__step, .rail li:last-child .rail__step { clip-path: none; border-radius: var(--r-card); padding: 12px 14px; }
}
@media (max-width: 560px) { .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rail__n { font-size: 24px; } }

/* dashboard layout */
.dash { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-areas: "today today lists" "credit low act"; gap: 16px; }
.dash__today { grid-area: today; } .dash__lists { grid-area: lists; } .dash__credit { grid-area: credit; } .dash__low { grid-area: low; } .dash__act { grid-area: act; }
.today { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.today > div { min-width: 0; }
@media (max-width: 1180px) { .dash { grid-template-columns: 1fr 1fr; grid-template-areas: "today today" "lists credit" "low act"; } }
@media (max-width: 760px) { .dash { grid-template-columns: 1fr; grid-template-areas: "today" "lists" "credit" "low" "act"; } .today { grid-template-columns: 1fr; } }
.slot { flex: none; width: 36px; height: 36px; border-radius: var(--r-ctl); display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--brand-wash-2); color: var(--brand); }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); }
.list > li:first-child > .row, .list > li.row:first-child { border-top: 0; }
.list > li + li > .row--btn { border-top: 1px solid var(--line); }
.row--btn { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; border-radius: var(--r-ctl); padding: 10px 8px; }
.row--btn:hover { background: var(--surface-2); }
.row__main { min-width: 0; flex: 1; }
.row__title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { font-size: 13px; color: var(--ink-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ico { flex: none; width: 36px; height: 36px; border-radius: var(--r-ctl); display: grid; place-items: center; background: var(--brand-wash); color: var(--brand); }
.ico svg { width: 18px; height: 18px; }
.thumb { flex: none; width: 44px; height: 44px; border-radius: var(--r-ctl); object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px var(--line); padding: 3px; }
.thumb--code { display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); padding: 0; }
.thumb--code svg { width: 20px; height: 20px; }
.empty { padding: 26px 12px; text-align: center; color: var(--ink-3); display: grid; justify-items: center; gap: 10px; }
.empty svg { width: 30px; height: 30px; color: #9AA0B2; }
.empty p { margin: 0; font-size: 14px; }
.meter { display: block; height: 5px; margin-top: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--c, var(--brand)) var(--p), var(--line) 0); }
.meter--warn { --c: #C26A00; }
.meter--bad { --c: var(--bad); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 14px; }
.timeline li { display: flex; gap: 10px; }
.timeline li::before { content: ""; width: 3px; border-radius: 2px; background: var(--brand-wash-2); flex: none; }
.timeline small { color: var(--ink-3); display: block; }

/* job rows */
.jrow { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 12px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-ctl); }
.list > li + li > .jrow { border-top: 1px solid var(--line); border-radius: 0; }
.jrow:hover { background: var(--surface-2); }
.jrow__id { color: var(--brand); }
.jrow__title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrow__meta { display: block; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrow__end { display: flex; align-items: center; gap: 12px; }
.jrow__amt { font-weight: 600; min-width: 92px; text-align: right; }
@media (max-width: 640px) {
  .jrow { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .jrow__id { grid-column: 1; grid-row: 1; font-size: 12px; }
  .jrow__main { grid-column: 1 / -1; grid-row: 2; }
  .jrow__end { grid-column: 2; grid-row: 1; }
  .jrow__amt { min-width: 0; }
}

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; min-width: 0; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 7px 11px; border-radius: 4px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button:hover { background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.seg__n { font-size: 11px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.search { position: relative; flex: 1; min-width: 0; max-width: 360px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-3); }
.search input { width: 100%; min-height: 40px; padding: 0 12px 0 38px; border: 0; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.search input::placeholder { color: #6B7184; }
.search input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
@media (max-width: 640px) { .search { max-width: none; flex-basis: 100%; } }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr[data-acc] { cursor: pointer; }
.t tbody tr:hover td { background: var(--surface-2); }
.t .r { text-align: right; }
.t small { display: block; color: var(--ink-3); font-size: 12px; }
.acc, .prod { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acc__ico { flex: none; width: 34px; height: 34px; border-radius: var(--r-ctl); display: grid; place-items: center; background: var(--brand-wash); color: var(--brand); }
.acc__ico svg { width: 18px; height: 18px; }
.usage { display: grid; gap: 2px; min-width: 150px; font-size: 12px; }
.usage .meter { margin-top: 0; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 28px; height: 28px; border: 0; border-radius: var(--r-ctl); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { box-shadow: inset 0 0 0 1px var(--brand); }
.stepper button svg { width: 14px; height: 14px; }
.stepper b { min-width: 40px; text-align: center; }
.reorder-at { display: block; font-size: 12px; margin-top: 2px; }
@media (max-width: 1060px) { .hide-md { display: none; } }
@media (max-width: 700px) {
  .hide-sm { display: none; }
  .t td, .t th { padding: 9px 6px; }
  .t--stock .thumb { width: 36px; height: 36px; }
  .prod { gap: 8px; }
  .acc__ico { display: none; }
}
@media (max-width: 520px) { .t--stock .thumb { display: none; } }
.sumline { display: flex; flex-wrap: wrap; gap: 10px 36px; margin-bottom: 16px; padding: 14px 18px; background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); border-left: 4px solid var(--brand); }
.sumline div { display: grid; }
.sumline span { font-size: 13px; }
.sumline b { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }

/* week board */
.weekname { font-weight: 600; }
.depot { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.depot svg { width: 16px; height: 16px; color: var(--brand); }
.week { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); padding: 10px; min-height: 240px; min-width: 0; }
.day--today { box-shadow: inset 0 0 0 2px var(--brand); }
.day h3 { margin: 2px 2px 10px; font-size: 13px; font-weight: 650; display: flex; justify-content: space-between; gap: 6px; color: var(--ink-2); }
.day h3 em { font-style: normal; color: var(--brand); }
.day__none { margin: 4px 2px; }
.drop { display: grid; gap: 2px; width: 100%; margin-bottom: 8px; padding: 10px; border: 0; border-radius: var(--r-ctl); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand), inset 0 0 0 1px var(--line); font-size: 13px; text-align: left; cursor: pointer; color: var(--ink-2); }
.drop:hover { background: #EBEBFA; }
.drop b { color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.3; }
.drop__top { display: flex; justify-content: space-between; color: var(--brand); font-size: 12px; font-weight: 600; }
.drop__foot { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--warn); }
.drop--picked .drop__foot { color: var(--brand); }
.drop--done, .drop--invoiced { opacity: 0.62; box-shadow: inset 3px 0 0 var(--ok), inset 0 0 0 1px var(--line); }
.drop--done .drop__foot, .drop--invoiced .drop__foot { color: var(--ok); }
@media (max-width: 1180px) { .week { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .week { grid-template-columns: 1fr; } .day { min-height: 0; } .depot { margin-left: 0; flex-basis: 100%; } }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: rgba(10, 10, 40, 0.38); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer); width: min(580px, 100%); background: var(--bg); box-shadow: -20px 0 60px -20px rgba(3, 0, 60, 0.45); display: flex; flex-direction: column; }
.drawer__head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; background: var(--surface); box-shadow: 0 1px 0 var(--line); border-top: 4px solid var(--brand); }
.drawer__titles { flex: 1; min-width: 0; }
.drawer__head h2 { margin: 0; font-size: 18px; font-weight: 650; outline: none; }
.drawer__head h2 .mono { color: var(--brand); margin-right: 6px; }
.drawer__head p { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 18px; display: grid; gap: 14px; align-content: start; }
.drawer__foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -1px 0 var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; counter-reset: st; }
.steps li { padding-top: 8px; font-size: 11px; font-weight: 600; color: var(--ink-3); border-top: 4px solid var(--line-2); line-height: 1.25; }
.steps li.is-done { border-color: var(--brand); color: var(--ink-2); }
.steps li.is-now { border-color: var(--orange); color: var(--ink); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; }
.mlist { margin: 0; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font: 500 13px/1.7 'Plex Mono', ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.lines td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines .r { text-align: right; white-space: nowrap; padding-left: 12px; }
.lines td b { font-weight: 600; }
.lines small { color: var(--ink-3); display: block; font-size: 12px; }
.stmt td, .stmt th { padding-right: 6px; }
.totals { display: grid; gap: 4px; font-size: 14px; margin-top: 10px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals .grand { font-size: 18px; font-weight: 650; padding-top: 6px; border-top: 2px solid var(--ink); margin-top: 4px; }
.totals + .muted { margin: 8px 0 0; }
.credit { display: flex; justify-content: space-between; align-items: end; }
.credit div { display: grid; }
.credit .r { text-align: right; }
.credit__bal { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.aging { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.aging div { display: grid; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--surface-2); font-size: 12px; color: var(--ink-3); }
.aging b { font-size: 14px; color: var(--ink); font-weight: 600; }
.aging .is-warn { background: var(--warn-bg); color: var(--warn); }
.aging .is-bad { background: var(--bad-bg); color: var(--bad); }
.note { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--brand-wash); color: var(--brand); font-size: 13px; font-weight: 500; display: flex; gap: 8px; align-items: flex-start; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.note--warn { background: var(--warn-bg); color: var(--warn); }
.note--bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 20px; background: rgba(10, 10, 40, 0.42); }
.modal__box { width: min(680px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--surface); border-radius: var(--r-card); box-shadow: 0 30px 80px -20px rgba(3, 0, 60, 0.55); border-top: 4px solid var(--brand); }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.modal__head h2 { margin: 0; font-size: 18px; font-weight: 650; flex: 1; }
.modal__body { padding: 14px 20px; display: grid; gap: 14px; }
.modal__foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -1px 0 var(--line); }
@media (max-width: 640px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal__box { width: 100%; border-radius: var(--r-card) var(--r-card) 0 0; max-height: 94dvh; }
}
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field label .muted { font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 0; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.field select:disabled { background: var(--surface-2); color: var(--ink-2); }
.field textarea { resize: vertical; line-height: 1.5; }
.field textarea.mono-ta { font: 500 13px/1.7 'Plex Mono', ui-monospace, monospace; }
.field input::placeholder, .field textarea::placeholder { color: #6B7184; }
.field input:focus, .field select:focus, .field textarea:focus, .qty:focus, .qrow select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.field__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.err { margin: 0; color: var(--bad); font-size: 13px; font-weight: 500; }
.err:empty { display: none; }
.qrows { display: grid; border-radius: var(--r-ctl); box-shadow: inset 0 0 0 1px var(--line); }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; }
.qrow + .qrow { border-top: 1px solid var(--line); }
.qrow--miss { background: var(--warn-bg); }
.qrow__src { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.qrow__name { display: grid; font-size: 14px; line-height: 1.3; }
.qrow__name b { font-weight: 600; }
.qrow__name small { color: var(--ink-3); font-size: 12px; }
.qrow select { width: 100%; min-height: 38px; padding: 6px 8px; border: 0; border-radius: var(--r-ctl); background: #fff; box-shadow: inset 0 0 0 1px var(--warn); font-size: 13px; }
.qrow__nums { display: flex; align-items: center; gap: 8px; }
.qrow__nums .num { min-width: 82px; text-align: right; font-weight: 600; font-size: 14px; }
.qty { width: 64px; min-height: 36px; padding: 4px 8px; border: 0; border-radius: var(--r-ctl); background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .qrow { grid-template-columns: minmax(0, 1fr) auto; }
  .qrow__src { grid-column: 1 / -1; }
  .qrow__pick { grid-column: 1 / -1; }
  .qrow__nums { grid-column: 1 / -1; justify-content: flex-end; }
}
.attach { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.attach svg { width: 22px; height: 22px; color: var(--bad); flex: none; }
.attach span { display: grid; min-width: 0; overflow-wrap: anywhere; }
.attach small { color: var(--ink-3); font-size: 12px; }
.bubble { align-self: flex-start; max-width: 92%; padding: 10px 12px; border-radius: 4px 12px 12px 12px; background: #DCF5DF; font-size: 14px; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.phone-prev { padding: 14px; border-radius: var(--r-ctl); background: #ECE5DA; display: flex; flex-direction: column; }
.po { display: grid; gap: 8px; }
.po h3 { margin: 0; font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.po h3 svg { width: 16px; height: 16px; color: var(--brand); }
.po__row { display: flex; align-items: center; gap: 10px; }
.po__name { flex: 1; min-width: 0; display: grid; font-size: 14px; line-height: 1.3; }
.po__name b { font-weight: 600; }
.po__name small { color: var(--ink-3); font-size: 12px; }
.po__row .thumb { width: 38px; height: 38px; }
.po__unit { width: 52px; flex: none; }

/* toasts */
.toasts { position: fixed; z-index: var(--z-toast); left: 24px; bottom: 24px; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 16px 40px -12px rgba(10, 10, 40, 0.6); border-left: 4px solid var(--orange); }
.toast svg { width: 18px; height: 18px; color: #9FA0FF; flex: none; }
@media (max-width: 1060px) { .toasts { left: 16px; top: 12px; bottom: auto; } }

/* badge */
.badge { position: fixed; left: 16px; bottom: 16px; z-index: var(--z-badge); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px -14px rgba(10, 10, 40, 0.4); font-size: 13px; color: var(--ink-2); }
.badge a { text-decoration: none; }
.badge strong { color: var(--ink); }
.badge__close { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 999px; background: var(--surface-2); cursor: pointer; }
.badge__close svg { width: 14px; height: 14px; }
.badge.is-hidden { display: none; }
body.in-app .badge { left: auto; right: 16px; }
@media (max-width: 1060px) { body.in-app .badge { bottom: 84px; } }
@media (prefers-reduced-transparency: reduce) { .badge, .tabs { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
