/* JCL Glass trade portal. Palette from jclglassltd.co.uk: navy #161D4D, blue #10A0DA. */
:root {
  --navy: #161D4D; --blue: #10A0DA; --link: #0B7FB0;
  --bg: #F4F6F9; --panel: #FFFFFF; --inset: #F7F9FC; --field: #FFFFFF; --line: #E1E5EE; --line-strong: #CDD3E0;
  --ink: #1C2347; --heading: #161D4D; --muted: #59607F; --row-open: #F2F8FC;
  --dot-none: #B7BDCF; --dot-made: #10A0DA; --dot-loaded: #161D4D;
  --made-bg: #E3F4FB; --made-fg: #075F85; --load-bg: #E6E8F1; --load-fg: #161D4D; --none-bg: #F0F2F6; --none-fg: #59607F;
  --chip-on-bg: #161D4D; --chip-on-fg: #FFFFFF;
  --warn-bg: #FFF6E6; --warn-fg: #8A4B00; --warn-line: #F0B35B;
  --err-bg: #FDECEC; --err-fg: #9B1C1C;
  --ok-bg: #E7F6EE; --ok-fg: #1F6B43;
  --date-bg: #E8EBF3;
  --shadow: 0 1px 2px rgba(22, 29, 77, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1030; --panel: #121942; --inset: #0E1438; --field: #0E1438; --line: #252E62; --line-strong: #323C78;
    --ink: #E6E9F7; --heading: #FFFFFF; --muted: #A3AAD2; --row-open: #16204F; --link: #6CC9EE;
    --dot-none: #5A6396; --dot-loaded: #7FD3F2;
    --made-bg: rgba(16,160,218,0.18); --made-fg: #8FD8F5; --load-bg: rgba(127,211,242,0.16); --load-fg: #CDEFFB;
    --none-bg: rgba(255,255,255,0.06); --none-fg: #A3AAD2;
    --chip-on-bg: #10A0DA; --chip-on-fg: #06122E;
    --warn-bg: rgba(240,179,91,0.12); --warn-fg: #F4C987; --warn-line: #8A6420;
    --err-bg: rgba(220,80,80,0.14); --err-fg: #F5A3A3; --ok-bg: rgba(60,170,110,0.15); --ok-fg: #8EDDB3;
    --date-bg: #1C2556; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1030; --panel: #121942; --inset: #0E1438; --field: #0E1438; --line: #252E62; --line-strong: #323C78;
  --ink: #E6E9F7; --heading: #FFFFFF; --muted: #A3AAD2; --row-open: #16204F; --link: #6CC9EE;
  --dot-none: #5A6396; --dot-loaded: #7FD3F2;
  --made-bg: rgba(16,160,218,0.18); --made-fg: #8FD8F5; --load-bg: rgba(127,211,242,0.16); --load-fg: #CDEFFB;
  --none-bg: rgba(255,255,255,0.06); --none-fg: #A3AAD2;
  --chip-on-bg: #10A0DA; --chip-on-fg: #06122E;
  --warn-bg: rgba(240,179,91,0.12); --warn-fg: #F4C987; --warn-line: #8A6420;
  --err-bg: rgba(220,80,80,0.14); --err-fg: #F5A3A3; --ok-bg: rgba(60,170,110,0.15); --ok-fg: #8EDDB3;
  --date-bg: #1C2556; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* Poppins throughout, to match jclglassltd.co.uk (Divi: Poppins for text and headings; Jack 20 Oct 2026). */
body { background: var(--bg); color: var(--ink); font: 14.5px/1.55 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
a:hover { color: var(--heading); }
h1, h2, h3 { font-family: 'Poppins', system-ui, sans-serif; color: var(--heading); margin: 0; text-wrap: balance; font-weight: 600; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 17px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.boot { padding: 48px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- sign in */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--bg); }
.signin-brand { background: var(--navy); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.signin-brand img { width: 220px; height: auto; display: block; }
.signin-brand .eyebrow { font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.signin-brand h1 { color: #fff; font-size: 38px; line-height: 1.15; max-width: 440px; }
.signin-brand p { color: #C7CCE6; font-size: 16px; line-height: 1.6; max-width: 440px; margin: 0; }
.signin-brand .foot { display: flex; gap: 28px; flex-wrap: wrap; font-size: 13px; color: #9AA2C9; }
.signin-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.signin-form form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.signin-form h2 { font-size: 28px; }
.signin-form .help { padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); margin: 0; }

.field { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 500; color: var(--ink); }
.field input, .field select, .field textarea, .input {
  min-height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--field); color: var(--ink); font-size: 15px; font-weight: 400; width: 100%;
}
.field textarea { padding: 12px 14px; resize: vertical; min-height: 90px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--field); color: var(--ink); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--blue); color: var(--ink); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; font-family: 'Poppins', sans-serif; font-weight: 600; }
:root[data-theme="dark"] .btn.primary { background: var(--blue); border-color: var(--blue); color: #06122E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: var(--blue); border-color: var(--blue); color: #06122E; } }
.btn.primary:hover { filter: brightness(1.12); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.danger { color: var(--err-fg); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn svg { flex: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; }

.note { padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.note.err { background: var(--err-bg); color: var(--err-fg); }
.note.ok { background: var(--ok-bg); color: var(--ok-fg); }
.note.warn { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-line); }

/* ---------- shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.side { background: var(--navy); color: #fff; display: flex; flex-direction: column; gap: 26px; padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { width: 168px; height: auto; display: block; margin: 4px 8px 8px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-label { padding: 0 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #8C94C2; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: #D5D9EE; text-decoration: none; font-size: 15px; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item[aria-current="page"] { background: rgba(16,160,218,0.18); color: #fff; font-weight: 500; }
.nav-item[aria-current="page"] svg { stroke: var(--blue); }
.side .contact { margin-top: auto; padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 13px; line-height: 1.55; color: #AEB4D6; }
.side .contact strong { color: #fff; }
.side .contact a { color: #6CC9EE; }

.main-col { display: flex; flex-direction: column; min-width: 0; }
.staff-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.staff-btn[aria-current="page"] { border-color: var(--blue); }
.staff-btn .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #D92D20; color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.staff-btn .badge[hidden] { display: none; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 32px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); cursor: pointer; flex: none; }
.who { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); min-width: 0; }
.who .mark { width: 32px; height: 32px; border-radius: 6px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; flex: none; }
.who .names { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who .names b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.who .names span { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted); }
.who select { border: 0; background: transparent; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted); padding: 0; cursor: pointer; }
.menu-btn { display: none; }

main.page { padding: 32px; display: flex; flex-direction: column; gap: 22px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head .lede { margin: 6px 0 0; color: var(--muted); max-width: 640px; }
.next-del { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-radius: 10px; background: var(--navy); color: #fff; }
.next-del small { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #9AA2C9; }
.next-del b { font-family: 'Poppins', sans-serif; font-size: 17px; font-weight: 600; }

.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.panel.pad { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.filters { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-row > .lbl { font-size: 14px; font-weight: 600; color: var(--heading); min-width: 88px; }
.chip { min-height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--chip-on-bg); border-color: var(--chip-on-bg); color: var(--chip-on-fg); }
.chip .n { opacity: 0.7; font-weight: 400; }
.dates { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.dates input { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); }

/* orders table */
.table { overflow-x: auto; }
.otable { min-width: 940px; }
.orow, .ohead { display: grid; grid-template-columns: 128px minmax(0, 1.4fr) 104px 96px 64px minmax(0, 1.7fr) 36px; gap: 16px; align-items: center; padding: 13px 20px; }
.ohead { border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.oitem { border-bottom: 1px solid var(--line); }
.oitem:last-child { border-bottom: 0; }
.orow { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.orow:hover, .oitem.open .orow { background: var(--row-open); }
.date { display: flex; align-items: center; gap: 10px; }
.date .tile { width: 48px; padding: 4px 0; border-radius: 8px; background: var(--date-bg); color: var(--heading); display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.date .tile.soon { background: var(--blue); color: #fff; }
.date .tile small { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.date .tile b { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 600; }
.date .mon { font-size: 13px; color: var(--muted); }
.ref { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ref b { font-size: 15px; font-weight: 600; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref span { font-size: 13px; color: var(--muted); }
.prog { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prog .bar { flex: 1; max-width: 120px; height: 6px; border-radius: 3px; background: var(--none-bg); overflow: hidden; display: flex; }
.prog .bar i { display: block; height: 100%; }
.prog .bar .l { background: var(--dot-loaded); }
.prog .bar .m { background: var(--dot-made); }
.prog small { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--none-bg); color: var(--none-fg); }
.pill.production { background: var(--made-bg); color: var(--made-fg); }
.pill.made { background: #CFEBF7; color: #054D6C; }
.pill.loading, .pill.loaded { background: var(--navy); color: #fff; }
.pill.delivered { background: var(--none-bg); color: var(--muted); }
.pill.cancelled { background: var(--err-bg); color: var(--err-fg); }
:root[data-theme="dark"] .pill.made { background: rgba(16,160,218,0.28); color: #CDEFFB; }
:root[data-theme="dark"] .pill.loading, :root[data-theme="dark"] .pill.loaded { background: var(--blue); color: #06122E; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill.made { background: rgba(16,160,218,0.28); color: #CDEFFB; }
  :root:not([data-theme="light"]) .pill.loading, :root:not([data-theme="light"]) .pill.loaded { background: var(--blue); color: #06122E; }
}
.chev { display: flex; justify-content: center; color: var(--muted); transition: transform 0.15s; }
.oitem.open .chev { transform: rotate(90deg); }
.odetail[hidden] { display: none; }
.odetail { padding: 6px 20px 22px; background: var(--inset); display: flex; flex-direction: column; gap: 16px; }
.facts { display: flex; gap: 22px; flex-wrap: wrap; padding-top: 12px; font-size: 14px; color: var(--muted); }
.facts strong { color: var(--heading); }
.ltable { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.lrow { display: grid; grid-template-columns: 44px minmax(0, 0.9fr) 112px minmax(0, 1.5fr) 40px minmax(0, 1.9fr); gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.lrow:last-child { border-bottom: 0; }
.lrow.head { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.spec-lines { display: flex; flex-direction: column; gap: 1px; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.lrow, .pick { align-items: start; }
.lrow > span, .pick > span, .pick > input { padding-top: 2px; }
.units { display: flex; flex-wrap: wrap; gap: 6px; }
.u { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--none-bg); color: var(--none-fg); }
.u::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dot-none); }
.u.made { background: var(--made-bg); color: var(--made-fg); }
.u.made::before { background: var(--dot-made); }
.u.loaded { background: var(--load-bg); color: var(--load-fg); }
.u.loaded::before { background: var(--dot-loaded); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.doc { display: flex; align-items: center; gap: 12px; min-width: 220px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); text-decoration: none; }
.doc:hover { border-color: var(--blue); color: var(--ink); }
.doc b { display: block; font-weight: 600; }
.doc small { color: var(--muted); font-size: 13px; }
.doc.off { opacity: 0.55; pointer-events: none; }
.actions .btn.primary { margin-left: auto; }
.legend { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.asof { font-size: 13px; color: var(--muted); }

/* deliveries */
.day { display: flex; flex-direction: column; gap: 10px; }
.day h2 { font-size: 16px; display: flex; align-items: baseline; gap: 10px; }
.day h2 small { font-family: 'Poppins', sans-serif; font-weight: 400; font-size: 14px; color: var(--muted); }
.drow { display: grid; grid-template-columns: minmax(0, 1.4fr) 100px 70px minmax(0, 1.4fr) auto; gap: 16px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }

/* remake + quote forms */
.pick { display: grid; grid-template-columns: 24px 54px minmax(0, 1fr) 120px minmax(0, 1.6fr); gap: 14px; align-items: center; min-height: 48px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; }
.pick:has(input:checked) { border-color: var(--blue); background: var(--row-open); }
.pick input { width: 18px; height: 18px; accent-color: var(--navy); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--inset); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(11,16,48,0.75); color: #fff; cursor: pointer; }
.drop { aspect-ratio: 4 / 3; border: 2px dashed var(--line-strong); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--heading); cursor: pointer; text-align: center; padding: 8px; position: relative; }
.drop:hover { border-color: var(--blue); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop small { font-size: 12px; color: var(--muted); }

.qgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.qsec { display: flex; flex-direction: column; gap: 10px; }
.qsec > .lbl { font-size: 14px; font-weight: 600; color: var(--heading); }
.size-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 12px; }
.size-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.size-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; align-items: end; }
.size-row.two { align-items: end; }
.qsec .chips + .chips { margin-top: 8px; }
.summary .photos { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 6px; }
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pane-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--inset); }
.pane-card h3 { font-size: 14px; }
.pane-card select { min-height: 42px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--field); color: var(--ink); }
.spacers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sp-card { text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.sp-card b { font-size: 14px; }
.sp-card small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.sp-card.flag small { color: var(--warn-fg); }
.sp-card[aria-pressed="true"] { border-color: var(--blue); background: var(--row-open); box-shadow: inset 0 0 0 1px var(--blue); }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-block; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.toggle input { width: 18px; height: 18px; accent-color: var(--navy); }
.missing { display: flex; flex-direction: column; gap: 4px; }
.summary { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 0; }
.summary .hd { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.qline { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.qline .top { display: flex; justify-content: space-between; gap: 10px; }
.qline .top b { font-weight: 600; }
.qline .spec { color: var(--muted); font-size: 13px; }
.qline .tools { display: flex; gap: 14px; font-size: 13px; }
.qline.err { background: var(--err-bg); }
.qline .poa { color: var(--warn-fg); font-size: 13px; }
.totals { padding: 14px 18px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.totals .grand { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 18px; color: var(--heading); padding-top: 6px; border-top: 1px solid var(--line); }
.summary .foot { padding: 16px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.summary .fine { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 0; }

/* simple lists */
.list-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }
.list-row.head { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.thumbs { display: flex; gap: 6px; }
.thumbs img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.secret { font-family: 'IBM Plex Mono', monospace; font-size: 18px; padding: 10px 14px; border-radius: 8px; background: var(--inset); border: 1px dashed var(--line-strong); user-select: all; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- small screens */
@media (max-width: 1100px) {
  .qgrid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .spacers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .signin { grid-template-columns: 1fr; }
  .signin-brand { padding: 28px 20px; gap: 20px; }
  .signin-brand h1 { font-size: 26px; }
  .signin-brand .foot { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 20; transform: translateX(-100%); transition: transform 0.2s; }
  .shell.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(5, 8, 25, 0.5); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  .who .names b { max-width: 120px; }
  main.page { padding: 20px 16px; }
  h1 { font-size: 24px; }
  .otable { min-width: 0; }
  .ohead { display: none; }
  .orow { grid-template-columns: 64px minmax(0, 1fr) 24px; grid-template-areas: 'date ref chev' 'date prog chev'; row-gap: 6px; padding: 12px 14px; }
  .orow > :nth-child(1) { grid-area: date; }
  .orow > :nth-child(2) { grid-area: ref; }
  .orow > :nth-child(3), .orow > :nth-child(4), .orow > :nth-child(5) { display: none; }
  .orow > :nth-child(6) { grid-area: prog; }
  .orow > :nth-child(7) { grid-area: chev; }
  .date .mon { display: none; }
  .odetail { padding: 4px 12px 16px; }
  .lrow { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .lrow.head { display: none; }
  .lrow > :nth-child(4) { grid-column: 2 / -1; color: var(--muted); }
  .lrow > :nth-child(5) { display: none; }
  .lrow > :nth-child(6) { grid-column: 1 / -1; }
  .actions .btn.primary { margin-left: 0; width: 100%; }
  .doc { flex: 1; min-width: 0; }
  .dates { margin-left: 0; }
  .drow { grid-template-columns: minmax(0, 1fr) auto; }
  .drow > :nth-child(2), .drow > :nth-child(3) { display: none; }
  .pick { grid-template-columns: 24px 40px minmax(0, 1fr); }
  .pick > :nth-child(5) { grid-column: 3; color: var(--muted); font-size: 13px; }
  .pick > :nth-child(4) { grid-column: 3; }
  .size-row { grid-template-columns: 1fr 1fr; }
  .size-row.three { grid-template-columns: 1fr; }
  .panes { grid-template-columns: 1fr; }
  .spacers { grid-template-columns: 1fr 1fr; }
  .list-row { grid-template-columns: 1fr auto; }
  .list-row > :nth-child(2), .list-row > :nth-child(3) { grid-column: 1; }
  .list-row.head { display: none; }
  .two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.pill.ready { background: var(--made-bg); color: var(--made-fg); }
.pill.collected { background: var(--none-bg); color: var(--muted); }

/* missed loading scans (staff) */
.ms-order { overflow: hidden; }
.ms-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ms-units { overflow-x: auto; background: var(--inset); }
.ms-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px minmax(0, 1.4fr) 110px 150px; gap: 12px; align-items: center; padding: 8px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; min-width: 760px; }
.ms-row:last-child { border-bottom: 0; }
.ms-row.head { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
#msl { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 860px) { .ms-head { grid-template-columns: 1fr; gap: 4px; } }

/* batched = can't be amended */
.lock { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--ok-bg); color: var(--ok-fg); }
.lock.on { background: var(--err-bg); color: var(--err-fg); }
.amend { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.amend b { display: block; }
.amend span { display: block; opacity: 0.9; }
.amend.locked { background: var(--err-bg); color: var(--err-fg); }
.amend.open { background: var(--ok-bg); color: var(--ok-fg); }
.amend svg { flex: none; margin-top: 1px; }

/* staff page: logins folded away under the requests */
.fold { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 4px; }
.fold > summary { display: flex; align-items: baseline; gap: 12px; cursor: pointer; list-style: none; padding: 8px 0; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: '+'; font-weight: 600; color: var(--blue); width: 14px; }
.fold[open] > summary::before { content: '\2212'; }
.fold > summary h2 { margin: 0; }
.fold > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.fold[open] > summary { margin-bottom: 8px; }

/* small data table (pricing check) */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- quote builder: spec blocks with size rows (4 Oct 2026) ---- */
.qleft { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.qgroup { display: flex; flex-direction: column; }
.ghead { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.gspec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 14px; min-width: 0; }
.gspec b { font-size: 15px; font-weight: 600; color: var(--heading); }
.gspec .gno { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); flex-basis: 100%; }
.gspec .warn-t { color: var(--warn-fg); flex-basis: 100%; font-size: 13px; }
.gtools { display: flex; gap: 8px; flex: none; }
.spec-ed { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; background: var(--inset); border-bottom: 1px solid var(--line); }
.spec-four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.spec-two, .spec-three { display: grid; gap: 12px; align-items: end; }
.spec-two { grid-template-columns: repeat(2, minmax(0, 220px)); }
.spec-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field.sm { font-size: 13px; gap: 5px; }
.field.sm input, .field.sm select { min-height: 40px; padding: 0 10px; font-size: 14px; }
.spec-line { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; }
.spec-line > .lbl { font-size: 13px; font-weight: 600; color: var(--heading); padding-top: 9px; }
.spec-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.spec-ed .chip { min-height: 36px; padding: 0 13px; }
.chip.tight { padding: 0 11px; }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.qrows { display: flex; flex-direction: column; padding: 6px 18px 14px; }
.qrow { display: grid; grid-template-columns: minmax(0, 1.4fr) 96px 96px 60px minmax(84px, 0.7fr) 32px 32px; gap: 0 8px; align-items: center; padding: 4px 0; }
.qrow.qhead { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 0 2px; }
.qrow.qhead span { padding-left: 2px; }
.qrow input { min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--field); color: var(--ink); font-size: 15px; width: 100%; min-width: 0; }
.qrow input.c-n, .qrow input.c-q { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.qrow input.c-q { text-align: center; padding: 0 4px; }
.qrow .price { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--heading); white-space: nowrap; }
.qrow.qhead .price { font-weight: 600; color: var(--muted); }
.row-x { width: 32px; height: 32px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.row-x:hover { background: var(--err-bg); color: var(--err-fg); }
.qmsg { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); text-align: right; padding-right: 40px; min-height: 0; }
.qmsg:empty { display: none; }
.qmsg.poa { color: var(--warn-fg); }
.qmsg.err { color: var(--err-fg); font-weight: 700; }
.summary .empty { padding: 22px 18px; }
@media (max-width: 860px) {
  .ghead { flex-direction: column; }
  .spec-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-three { grid-template-columns: 1fr; }
  .spec-line { grid-template-columns: 1fr; gap: 6px; }
  .spec-line > .lbl { padding-top: 0; }
  .qrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 52px 32px; gap: 6px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .row-dup { display: none; }
  .qrow.qhead { display: none; }
  .qrow input.c-ref { grid-column: 1 / -1; }
  .qrow .price { grid-column: 1 / 4; text-align: left; }
  .qrow .row-x { grid-row: 2; grid-column: 4; }
  .qmsg { text-align: left; padding-right: 0; }
}
.qadd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spec-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); gap: 10px; }
.spec-pair select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--field); color: var(--ink); font-size: 14px; width: 100%; }

/* list rows that open to show their lines */
.rowbtn { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rowbtn:hover, .rowbtn[aria-expanded="true"] { background: var(--row-open); }
.rowbtn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.rowbtn .ref b::after { content: '\203A'; display: inline-block; margin-left: 8px; color: var(--muted); font-weight: 400; transition: transform 0.15s; }
.rowbtn[aria-expanded="true"] .ref b::after { transform: rotate(90deg); }
.rowdetail { padding: 6px 18px 16px; border-bottom: 1px solid var(--line); background: var(--inset); }

.deliv { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.deliv b { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 16px; color: var(--heading); }
.deliv .fine { grid-column: 1 / -1; }

/* bulk entry under the size rows */
.qbulk { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 14px; }
.qbulk-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; }
.qbulk .link-btn { font-size: 13.5px; }
.qbulk .upl { position: relative; overflow: hidden; display: inline-block; }
.qbulk .upl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.qbulk textarea { min-height: 120px; padding: 10px 12px; font-family: 'IBM Plex Mono', monospace; font-size: 14px; }

.spec-pair .fixed { display: flex; align-items: center; min-height: 40px; padding: 0 10px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 14px; }

/* place an order (quote builder) */
#qorder { display: flex; flex-direction: column; }
.orderbox { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--inset); }
.orderbox > b { font-size: 15px; color: var(--heading); }

/* logins with prices hidden */
.noprice .pc { display: none; }
.noprice .qrow .price { visibility: hidden; }
.list-row .chips { flex-wrap: wrap; justify-content: flex-end; }

/* privacy notice */
.prose { max-width: 820px; }
.prose p, .prose li { line-height: 1.6; margin: 0; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* staff guide */
.tbl.guide td { white-space: normal; vertical-align: top; line-height: 1.45; }
.tbl.guide td:first-child { min-width: 200px; }
@media print {
  .side, .topbar, .noprint { display: none !important; }
  .shell { display: block; }
  main.page { padding: 0; max-width: none; }
  .panel { box-shadow: none; break-inside: avoid; }
  body { background: #fff; color: #000; }
}

.list-row .ref .stage { display:block; margin-top:4px; }

/* home tiles, saved-spec bar, duplicate button, staff deep-link highlight (18 Oct 2026) */
.tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:12px; margin-bottom:18px; }
.tile { display:flex; flex-direction:column; gap:2px; text-decoration:none; color:inherit; min-height:96px; }
.tile .big { font-size:26px; font-weight:700; letter-spacing:-0.01em; }
.tile.warn { border-color: var(--warn-line, #e0a400); }
.tile:hover { border-color: var(--accent, #10A0DA); }
.favbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 14px; margin-bottom:12px; }
.favbar .lbl { font-weight:600; margin-right:4px; }
.favbar .favtools { margin-left:auto; display:flex; gap:12px; }
.row-dup { opacity:.6; } .row-dup:hover { opacity:1; }
.flash { outline: 3px solid var(--warn-line, #e0a400); outline-offset: 3px; transition: outline-color 2s; }

/* quick actions under each order row: Order again / Request a remake (18 Oct 2026) */
.oquick { display:flex; gap:16px; padding:0 20px 10px 164px; margin-top:-6px; font-size:13.5px; }
.againbox { padding:0 20px 14px 164px; }
.againbox .orderbox { max-width:720px; }
@media (max-width: 760px) { .oquick { padding-left:14px; } .againbox { padding-left:14px; } }

.contact .link-btn { color: inherit; font: inherit; text-decoration: underline; padding: 0; }

/* phone layout pass, 19 Oct 2026 */
@media (max-width: 860px) {
  .topbar { gap: 8px 10px; padding: 8px 12px; }
  .top-right { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
  .who { flex: 1 1 auto; min-width: 0; max-width: 100%; }
  .who .names { min-width: 0; }
  .who .names b { max-width: none; }
  .staff-btn { white-space: nowrap; }
  .search { margin-top: 2px; }
  /* an order's documents and actions stack one under another instead of squeezing into a row */
  .actions { flex-direction: column; align-items: stretch; }
  .doc { min-width: 0; width: 100%; }
  .actions .btn { width: 100%; margin-left: 0; }
  /* wide tables scroll inside their panel rather than pushing the page sideways */
  .panel.pad { overflow-x: auto; }
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head .btn { white-space: nowrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile .big { font-size: 22px; }
  .tile { min-height: 0; }
  .favbar .favtools { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
  .topbar .top-right { flex-basis: 100%; }
  .tile .big { font-size: 20px; }
}

@media (max-width: 860px) {
  /* top bar on a phone: menu, theme and account on one row; the staff button on its own row below */
  .top-right { display: contents; }
  .menu-btn { order: 1; }
  .topbar .icon-btn[data-act="theme"] { order: 2; }
  .topbar .who { order: 3; flex: 1 1 0; }
  .topbar .staff-btn { order: 4; flex-basis: 100%; justify-content: center; }
  .search { order: 5; }
  /* line tables scroll sideways inside their panel instead of wrapping words letter by letter */
  .tbl { min-width: 620px; }
  .tbl td, .tbl th { white-space: nowrap; }
  .tbl td[style*="white-space:normal"] { white-space: nowrap !important; }
}

.savebox { align-items:center; } .savebox .field input { min-width: 200px; }
@media (max-width: 860px) { .savebox { width:100%; } .savebox .field { flex:1 1 100%; } .savebox .field input { min-width:0; width:100%; } }

@media (max-width: 860px) { .spec-two { grid-template-columns: 1fr; } .spec-two .field.sm input { width: 100%; min-width: 0; } }

@media (max-width: 860px) { .qmsg.err { text-align: left; padding-right: 0; font-size: 13.5px; } }
