/* Seafold client portal. Layout and wording follow the six portal screens and the phone view; colours are the
   Seafold palette. Desktop first, then narrower screens at the end of the file. */

@font-face { font-family: 'Portal Sans'; font-weight: 400; font-display: swap; src: url('fonts/PortalSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Portal Sans'; font-weight: 500; font-display: swap; src: url('fonts/PortalSans-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Portal Sans'; font-weight: 600; font-display: swap; src: url('fonts/PortalSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Portal Sans Condensed'; font-weight: 400; font-display: swap; src: url('fonts/PortalSansCondensed-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Portal Sans Condensed'; font-weight: 500; font-display: swap; src: url('fonts/PortalSansCondensed-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Portal Sans Condensed'; font-weight: 600; font-display: swap; src: url('fonts/PortalSansCondensed-SemiBold.woff2') format('woff2'); }

:root {
  /* Seafold palette */
  --navy: #0B3D71; --ocean: #1976C6; --slate: #2E6E9E; --sky: #4FC3F7; --aqua: #6EC1E6;
  --light-aqua: #A7E3FF; --soft-blue: #E8F6FF; --ice: #F5FAFF;
  /* roles */
  --ink: #16232f; --ink-2: #43566a; --muted: #5f7386;
  --line: #d0e8f2; --line-soft: #e4f0f6; --field: #7896ad;
  --page: #F5FAFF; --panel: #ffffff;
  --primary: #1976C6; --primary-ink: #0B3D71; --primary-mid: #1976C6; --primary-light: #A7E3FF;
  --tint: #E8F6FF; --sum: #f0f7fc; --neutral-bar: #c8d3de; --zero: #8a9aaa;
  --warn-bg: #fff3d6; --warn-line: #ff9800; --warn-ink: #6b4a05;
  --ok: #2e7d32; --err: #c62828;
  --font-text: 'Portal Sans', Inter, Arial, sans-serif;
  --font-display: 'Portal Sans Condensed', Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body.sf-portal {
  font-family: var(--font-text); font-size: 14px; line-height: 1.4; color: var(--ink); background: var(--page);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.d { font-family: var(--font-display); }
.muted { color: var(--muted); }
.b { font-weight: 600; }
.zero { color: var(--zero); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
sup.dg { font-family: var(--font-text); font-size: 0.72em; font-weight: 600; line-height: 0; margin-left: 1px; vertical-align: super; position: relative; top: 0.05em; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: var(--navy); padding: 10px 14px; border: 2px solid var(--navy); border-radius: 3px; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; }

/* ---- the frame ---------------------------------------------------------------------------------------- */
.app { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); flex: none; text-decoration: none; color: var(--ink); }
.brand .logo { width: 44px; height: 44px; flex: none; display: block; background: #fff; }
.brand .name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15.5px; line-height: 1.15; color: var(--navy); }
.brand .prod { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.acct { padding: 12px 18px 12px; border-bottom: 1px solid var(--line); }
.acct .k { font-size: 12.5px; color: var(--muted); }
.acct .v { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.25; color: var(--navy); }
.nav { padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 0 11px; font-size: 15px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; border-radius: 0 3px 3px 0; }
.nav a:hover { background: var(--ice); }
.nav a.on { background: var(--tint); border-left-color: var(--primary); font-weight: 600; color: var(--navy); }
.nav .cnt { font-family: var(--font-display); font-size: 12px; font-weight: 500; border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; background: #fff; color: var(--ink-2); line-height: 17px; }
.week { margin: auto 10px 0; padding: 12px 0 12px; border-top: 1px solid var(--line); }
.week .k { font-size: 12.5px; color: var(--muted); padding: 0 8px 5px; }
.week .r { display: grid; grid-template-columns: 9px 39px 1fr; align-items: center; gap: 6px; min-height: 22px; padding: 0 8px; font-family: var(--font-display); font-size: 12px; color: var(--ink-2); border-radius: 3px; white-space: nowrap; }
.week .r.on { background: var(--tint); color: var(--ink); }
.week .r .sq { width: 9px; height: 9px; border-radius: 1px; background: var(--primary-light); }
.week .r.past .sq, .week .r.on .sq { background: var(--navy); }
.week .r .dt { font-weight: 600; color: var(--ink); }
.week .now { padding: 8px 8px 0; font-size: 12.5px; color: var(--ink-2); }
.side-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 18px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.side-foot a { color: var(--primary-ink); text-underline-offset: 2px; }

.main { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 100vh; }
.top { background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; min-height: 64px; padding: 8px 24px; gap: 16px; }
.top h1 { font-family: var(--font-display); font-weight: 600; font-size: 23px; letter-spacing: -0.1px; white-space: nowrap; color: var(--navy); }
.top .sub { font-size: 14px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .sp { flex: 1; }
.badge { border: 1px solid var(--field); border-radius: 3px; padding: 5px 10px; font-family: var(--font-display); font-size: 13px; font-weight: 500; color: var(--ink-2); background: #fff; white-space: nowrap; }
.user { display: flex; align-items: center; gap: 10px; }
.user .av { width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--primary-ink); font-family: var(--font-display); font-weight: 600; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.user .n { font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.user .o { font-size: 12.5px; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.menu-btn { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--field); border-radius: 3px; background: #fff; font-family: var(--font-display); font-weight: 600; font-size: 14px; cursor: pointer; }
.menu-btn .bars { width: 16px; height: 2px; background: var(--navy); box-shadow: 0 -5px 0 var(--navy), 0 5px 0 var(--navy); }
.content { padding: 16px 24px 20px; min-width: 0; }
.content:focus { outline: none; }
.foot { background: var(--panel); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; min-height: 34px; padding: 7px 24px; font-size: 12.5px; color: var(--ink-2); }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---- panels, tables, small parts ------------------------------------------------------------------------ */
.panel { background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--navy); min-width: 0; }
.ph { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; padding: 12px 16px 8px; }
.ph h2 { font-family: var(--font-display); font-weight: 600; font-size: 17px; white-space: nowrap; color: var(--navy); }
.ph .sub { font-size: 13px; color: var(--ink-2); }
.pb { padding: 0 16px 14px; }
.note { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.note b { color: var(--ink); font-weight: 600; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll:focus-visible { outline-offset: -3px; }

table.t { width: 100%; border-collapse: collapse; }
table.t thead th { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; line-height: 1.2; text-align: right; vertical-align: bottom; padding: 5px 9px 6px; border-bottom: 1.5px solid var(--navy); white-space: nowrap; color: var(--ink); }
table.t th.l, table.t td.l { text-align: left; }
table.t th.c, table.t td.c { text-align: center; }
table.t thead th.g { border-bottom: 1px solid var(--line); text-align: center; padding-bottom: 4px; padding-top: 6px; font-size: 13px; }
table.t th .lt { font-weight: 400; color: var(--ink-2); }
table.t th abbr { text-decoration: none; }
table.t td, table.t tbody th, table.t tfoot th { height: 34px; padding: 0 9px; text-align: right; border-bottom: 1px solid var(--line-soft); font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 14.5px; font-weight: 400; white-space: nowrap; }
table.t td.txt, table.t tbody th.txt { font-family: var(--font-text); font-size: 14px; text-align: left; }
table.t tbody th.b, table.t td.b { font-weight: 600; }
table.t tbody th.d, table.t td.d { font-family: var(--font-display); }
table.t td.s { color: var(--ink-2); }
table.t tfoot td, table.t tfoot th { font-weight: 600; border-top: 1.5px solid var(--navy); border-bottom: none; height: 36px; }
table.t tfoot th.txt, table.t tfoot td.txt { font-family: var(--font-display); font-size: 14.5px; text-align: left; }
table.t .sum { background: var(--sum); font-weight: 600; }
table.t .bl { border-left: 1px solid var(--line); }
table.t td.code, .code { font-variant-numeric: normal; letter-spacing: 0; }
table.t.tight td, table.t.tight tbody th { height: 29px; font-size: 14px; }
table.t.tight td.txt, table.t.tight tbody th.txt { font-size: 13.5px; }
table.t tr.sel td { background: var(--sum); }
table.t tbody tr:hover td, table.t tbody tr:hover th { background-color: var(--ice); }
table.t tbody tr:hover .sum { background-color: var(--sum); }

.pill { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: 12.5px; line-height: 18px; padding: 0 8px; border-radius: 3px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); white-space: nowrap; }
.pill.open { background: var(--tint); border-color: var(--primary-light); color: var(--primary-ink); }
.tick { display: inline-block; width: 9px; height: 5px; border-left: 1.8px solid var(--ok); border-bottom: 1.8px solid var(--ok); transform: rotate(-45deg) translateY(-2px); margin-right: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px; border-radius: 3px; font-family: var(--font-display); font-weight: 600; font-size: 14.5px; border: 1px solid var(--field); background: #fff; color: var(--ink); white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--navy); }
.btn.pri { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.pri:hover { background: #1568b0; border-color: #1568b0; }
.btn[disabled] { opacity: 0.6; cursor: default; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--primary-ink); font-weight: inherit; text-decoration: underline; text-decoration-color: var(--aqua); text-underline-offset: 3px; }
button.link.muted { color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 1px; flex: none; }
.c-depot { background: var(--navy); } .c-trunk { background: var(--ocean); } .c-wash { background: var(--sky); } .c-ht { background: var(--neutral-bar); }
.info { border: 1px solid var(--primary-light); border-left: 3px solid var(--primary); background: var(--tint); padding: 9px 13px; font-size: 13.5px; line-height: 1.45; border-radius: 0 3px 3px 0; }
.info b { font-weight: 600; }
.info.warn { border-color: #f0c36a; border-left-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.info.err { border-color: #efb1b1; border-left-color: var(--err); background: #fdecec; color: #7d1a1a; }
.info.ok { border-color: #b5dab7; border-left-color: var(--ok); background: #ecf7ed; color: #1d5221; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; line-height: 24px; }
.kv .k { color: var(--ink-2); }
.kv .v { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 4px; font-size: 14.5px; font-weight: 500; box-shadow: 0 6px 22px rgba(11, 61, 113, 0.28); z-index: 60; max-width: calc(100vw - 32px); }
.toast[hidden] { display: none; }

/* ---- sign in ------------------------------------------------------------------------------------------------- */
.signin { min-height: 100vh; display: flex; flex-direction: column; }
.signin .top { justify-content: space-between; }
.signin .top .brand { border: none; padding: 0; min-height: 0; }
.signin .back { font-size: 14px; color: var(--primary-ink); text-underline-offset: 3px; }
.signin .mid { display: flex; flex-direction: column; align-items: center; padding: 56px 16px 48px; }
.card { width: 100%; max-width: 468px; background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--navy); padding: 26px 34px 34px; }
.card-logo { display: block; width: 132px; height: 132px; margin: 0 auto 10px; }
.card h1 { font-family: var(--font-display); font-weight: 600; font-size: 27px; color: var(--navy); }
.card .lead { margin-top: 6px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.card label { display: block; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.card .field { margin-top: 5px; height: 46px; width: 100%; border: 1px solid var(--field); border-radius: 3px; padding: 0 13px; font-size: 16.5px; background: #fff; }
.card input.field:focus, .card .field.pw:focus-within { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); outline: none; }
.card .field.pw { display: flex; align-items: center; justify-content: space-between; padding-right: 6px; }
.card .field.pw input { border: 0; outline: 0; flex: 1; min-width: 0; height: 100%; font-size: 16.5px; background: transparent; }
.card .show { border: 0; background: none; font-size: 14px; color: var(--primary-ink); font-weight: 500; cursor: pointer; padding: 8px 8px; border-radius: 3px; }
.card .remember { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; }
.card .remember input { width: 17px; height: 17px; accent-color: var(--primary); }
.card .go { margin-top: 20px; min-height: 48px; width: 100%; font-size: 17px; }
.card .forgot { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--primary-ink); font-weight: 500; text-underline-offset: 3px; }
.card .info { margin-top: 14px; }
.facts { width: 100%; max-width: 460px; margin: 22px 0 0; display: grid; grid-template-columns: 128px 1fr; column-gap: 18px; row-gap: 12px; font-size: 13.5px; line-height: 1.5; }
.facts dt { font-family: var(--font-display); font-weight: 600; font-size: 14px; line-height: 1.45; }
.facts dd { margin: 0; color: var(--ink-2); }

/* ---- stock ------------------------------------------------------------------------------------------------- */
.stock-sum { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; }
.stock-sum > div { padding: 14px 18px 14px; min-width: 0; }
.stock-sum > div + div { border-left: 1px solid var(--line); }
.stock-sum .k { font-size: 13.5px; color: var(--ink-2); }
.big { font-family: var(--font-display); font-weight: 600; font-size: 33px; line-height: 1.12; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; color: var(--navy); }
.bar { display: flex; height: 20px; gap: 2px; margin: 4px 0 10px; }
.bar > i { display: block; height: 100%; }
.legend { display: grid; grid-template-columns: 1.15fr 1fr 0.9fr 1.15fr; column-gap: 20px; row-gap: 10px; }
.legend .li { display: grid; grid-template-columns: 10px 1fr; column-gap: 7px; align-items: baseline; align-content: start; }
.legend .li .sw { position: relative; top: -1px; }
.legend .li .lab { grid-column: 2; font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.legend .li .val { font-family: var(--font-display); font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.legend .li .val small { font-weight: 400; font-size: 12.5px; color: var(--ink-2); margin-left: 5px; }
.minibar { display: flex; width: 150px; height: 9px; gap: 1px; }
.minibar > i { display: block; height: 100%; }
.stock-notes { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: 3px; margin-top: 9px; }
.stock-notes p + p { margin-top: 3px; }

/* ---- order ------------------------------------------------------------------------------------------------- */
.strip { display: flex; align-items: center; flex-wrap: wrap; padding: 12px 18px; gap: 10px 0; }
.strip .ttl { padding-right: 22px; }
.strip .ttl h2 { font-family: var(--font-display); font-weight: 600; font-size: 19px; white-space: nowrap; color: var(--navy); }
.strip .ttl .s { font-size: 13px; color: var(--ink-2); }
.strip > .pill { margin-right: 22px; }
.strip .cell { padding: 0 22px; border-left: 1px solid var(--line); }
.strip .cell .k { font-size: 13px; color: var(--ink-2); }
.strip .cell .v { font-family: var(--font-display); font-weight: 600; font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.strip .sp { flex: 1; }
.strip .unsaved { font-size: 13px; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid #f0c36a; border-radius: 3px; padding: 2px 8px; margin-right: 12px; }
.strip .unsaved[hidden] { display: none; }
.order-msg { margin-top: 12px; }
.order-msg[hidden], .form-err[hidden] { display: none; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 14px; margin-top: 14px; align-items: start; }
.order-grid table.t td, .order-grid table.t tbody th { height: 39px; }
.order-grid table.t tfoot td, .order-grid table.t tfoot th { height: 40px; }
.order-grid table.t tbody th small { display: none; }
.order-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hubcard { padding: 12px 16px 12px; }
.hubcard h3 { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--navy); }
.hubcard .k { font-size: 12.5px; color: var(--muted); }
.step { display: inline-flex; align-items: stretch; vertical-align: middle; }
.step .dec, .step .inc { display: none; }
.inp { width: 52px; height: 27px; padding: 0 9px; border: 1px solid var(--field); border-radius: 3px; background: #fff; font-family: var(--font-display); font-weight: 600; font-size: 14.5px; text-align: right; font-variant-numeric: tabular-nums; }
.inp:focus { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); outline: none; }
.inp.bad { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); background: #fff6f6; }
.seg, .pclose, .order > .act { display: none; }

/* ---- schedule -------------------------------------------------------------------------------------------- */
.sched-grid { display: grid; grid-template-columns: 430px minmax(0, 1fr); gap: 14px; align-items: start; }
table.wk { table-layout: fixed; }
table.wk th, table.wk td { padding-left: 4px !important; padding-right: 4px !important; }
table.wk thead th:first-child, table.wk tbody th.hubname { padding-left: 16px !important; }
table.wk td { height: 30px; }
table.wk tbody th.hubname { vertical-align: top; padding-top: 7px; font-family: var(--font-display); font-size: 15px; line-height: 1.25; white-space: normal; color: var(--navy); }
table.wk tbody th.hubname .muted { font-family: var(--font-text); font-weight: 400; font-size: 12px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--navy); }
.dot.hollow { background: #fff; border: 2px solid var(--navy); }
.dash { display: inline-block; width: 9px; height: 1.5px; background: #b3c2cf; vertical-align: middle; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; text-align: left; padding: 5px 9px 6px; border-bottom: 1.5px solid var(--navy); }
.cal td { height: 140px; vertical-align: top; padding: 7px 8px 6px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.cal td:last-child { border-right: none; }
.cal tr:last-child td { border-bottom: none; }
.cal td.out, .cal td.we { background: #f8fbfd; }
.cal td.out .dn, .cal td.out .chip { opacity: 0.6; }
.cal td.today { background: var(--tint); box-shadow: inset 0 0 0 2px var(--primary); }
.cal .dn { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.1; display: flex; justify-content: space-between; align-items: baseline; }
.cal .dn .wd { display: none; }
.cal .dn small { font-family: var(--font-text); font-weight: 600; font-size: 11.5px; color: var(--primary-ink); }
.cal .dn small.om { color: var(--muted); font-weight: 500; }
.cal .chips { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.chip { display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 500; font-size: 12.5px; line-height: 18px; padding: 0 7px; border-radius: 3px; background: var(--tint); color: var(--primary-ink); border: 1px solid var(--light-aqua); white-space: nowrap; }
.chip.mb { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.ph { display: block; background: var(--warn-bg); border-color: #e3c06a; color: var(--warn-ink); white-space: normal; line-height: 1.25; padding: 3px 7px; }
.cal .cl { margin-top: 6px; font-size: 11.5px; line-height: 1.35; color: var(--ink-2); }
.cal .cl b { font-family: var(--font-display); font-weight: 500; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.cal .none { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ---- dockets and invoices ---------------------------------------------------------------------------------- */
.di-grid { display: grid; grid-template-columns: minmax(0, 656px) minmax(0, 1fr); gap: 14px; align-items: start; }
.di-grid table.t th, .di-grid table.t td { padding-left: 7px; padding-right: 7px; }
.di-grid table.t th:first-child, .di-grid table.t td:first-child { padding-left: 16px; }
.di-grid table.t th:last-child, .di-grid table.t td:last-child { padding-right: 16px; }
.di-grid .inv table.t.tight td { height: 31px; }
.inv-head { display: grid; grid-template-columns: 1fr 1fr 214px; border-bottom: 1px solid var(--line); }
.inv-head > div { padding: 11px 14px 10px; min-width: 0; }
.inv-head > div:first-child { padding-left: 16px; }
.inv-head > div + div { border-left: 1px solid var(--line); }
.inv-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.15; color: var(--navy); }
.inv-head .who { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.inv-head .s { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.inv-head .kv { line-height: 19px; font-size: 13px; }
table.t tr.gst td { border-top: none; font-weight: 400; height: 28px; }
table.t tr.tot td { background: var(--tint); border-top: none; font-size: 16px; height: 38px; color: var(--navy); }
.dlg { border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: 0 0 4px 4px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); color: var(--ink); box-shadow: 0 18px 60px rgba(11, 61, 113, 0.3); }
.dlg::backdrop { background: rgba(11, 61, 113, 0.35); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.dlg-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--navy); }
.dlg-body { overflow: auto; }
.dlg-body table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dlg-body table.t th:first-child, .dlg-body table.t td:first-child { padding-left: 16px; }
.dlg-body table.t th:last-child, .dlg-body table.t td:last-child { padding-right: 16px; }
.dlg-foot { padding: 10px 16px 14px; }

/* ---- report a problem ------------------------------------------------------------------------------------ */
.rp-grid { display: grid; grid-template-columns: minmax(0, 590px) minmax(0, 1fr); gap: 14px; align-items: start; }
.rp-grid table.t td, .rp-grid table.t tbody th { white-space: normal; }
.rp-grid table.rep td { height: 50px; line-height: 1.3; }
.rp-grid table.rep td small { display: block; font-family: var(--font-text); font-size: 12.5px; color: var(--ink-2); font-weight: 400; }
.rp-grid table.rep tr.new td { background: #f3fbf4; }
.rp-grid table.defs tbody th { width: 214px; vertical-align: top; padding-top: 6px; }
.rp-grid table.defs tr:last-child th, .rp-grid table.defs tr:last-child td { border-bottom: none; }
.form { padding: 4px 18px 16px; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.form .lab { display: block; font-size: 13.5px; color: var(--ink-2); margin: 16px 0 6px; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; min-height: 34px; padding: 0 14px; border: 1px solid var(--field); border-radius: 17px; display: inline-flex; align-items: center; font-size: 14px; background: #fff; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 500; }
.opt:has(input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sel { width: 100%; height: 42px; border: 1px solid var(--field); border-radius: 3px; padding: 0 12px; font-size: 14.5px; background: #fff; }
select.sel { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2343566a' stroke-width='1.7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.sel.with-unit { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sel.with-unit input { border: 0; outline: 0; width: 100%; min-width: 0; height: 100%; background: transparent; font-size: 14.5px; }
.sel.with-unit:focus-within, select.sel:focus, .ta:focus { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); outline: none; }
.sel .u { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ta { display: block; width: 100%; min-height: 84px; border: 1px solid var(--field); border-radius: 3px; padding: 9px 12px; font-size: 14.5px; line-height: 1.45; background: #fff; resize: vertical; }
.photo { height: 176px; border: 1px solid var(--field); border-radius: 3px; background: #c7d3de; position: relative; overflow: hidden; }
.photo svg { position: absolute; inset: 0; width: 100%; height: 100%; background: #c7d3de; }
.photo .tag { position: absolute; right: 10px; top: 10px; background: #fff; border-radius: 12px; padding: 2px 11px; font-family: var(--font-display); font-weight: 600; font-size: 12.5px; }
.form-err { margin-top: 12px; }
.send { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.send .btn { min-height: 40px; padding: 0 22px; font-size: 15.5px; }
[data-item-row][hidden] { display: none; }

/* ======== narrower screens ================================================================================ */
@media (max-width: 1500px) {
  .di-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1320px) {
  .top .sub { display: none; }
  .stock-sum { grid-template-columns: 220px minmax(0, 1fr); }
  .stock-sum > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: baseline; }
  .stock-sum > div:nth-child(3) .note { margin-top: 0 !important; }
  .rp-grid, .sched-grid { grid-template-columns: minmax(0, 1fr); }
  .order-grid { grid-template-columns: minmax(0, 1fr); }
  .order-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 264px; max-width: 86vw; transform: translateX(-102%); transition: transform 0.2s ease; box-shadow: none; }
  .app.menu-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(11, 61, 113, 0.35); }
  .menu-btn { display: inline-flex; }
  .top { padding: 8px 16px; gap: 12px; }
  .content { padding: 14px 16px 18px; }
  .foot { padding: 8px 16px; }
  .user > div:last-child { display: none; }
  .legend { grid-template-columns: 1fr 1fr; }
  .cal td { height: 120px; padding: 6px 5px; }
  .chip { font-size: 11.5px; padding: 0 5px; }
}
@media (max-width: 720px) {
  .top h1 { font-size: 20px; white-space: normal; line-height: 1.15; }
  .badge { font-size: 11.5px; padding: 3px 8px; }
  .user { display: none; }
  .stock-sum { grid-template-columns: minmax(0, 1fr); }
  .stock-sum > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .stock-notes { grid-template-columns: minmax(0, 1fr); }
  .inv-head { grid-template-columns: 1fr; }
  .inv-head > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 16px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .send { flex-direction: column; align-items: stretch; }
  .rp-grid table.defs tbody th { width: 40%; }
  .facts { grid-template-columns: 1fr; row-gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .card { padding: 22px 20px 26px; }
  .signin .mid { padding-top: 28px; }

  /* The month becomes a list of days. */
  .cal, .cal tbody, .cal tr, .cal td { display: block; width: 100%; }
  .cal thead { display: none; }
  .cal td { height: auto; border-right: 0; border-bottom: 1px solid var(--line-soft) !important; padding: 9px 14px 10px; display: grid; grid-template-columns: 92px 1fr; column-gap: 10px; align-items: start; }
  .cal td.we:not(.today), .cal td.out { display: none; }
  .cal .dn { grid-row: 1 / span 3; flex-direction: column; gap: 2px; }
  .cal .dn .wd { display: inline; } .cal .dn .dd { display: none; }
  .cal .chips { margin-top: 0; flex-direction: row; flex-wrap: wrap; grid-column: 2; }
  .cal .cl { grid-column: 2; font-size: 12.5px; } .cal .cl br { display: none; }
  .cal .cl b { margin-left: 4px; }

  /* The order becomes the phone view: one delivery point at a time, with steppers. */
  .strip .cell, .strip > .pill, .strip .sp, .strip > .btn { display: none; }
  .strip .ttl { padding-right: 0; }
  .strip .ttl h2 { white-space: normal; font-size: 18px; }
  .seg { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; border: 1px solid var(--field); border-radius: 3px; overflow: hidden; background: #fff; }
  .seg button { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: #fff; font-family: var(--font-display); font-weight: 500; font-size: 14px; color: var(--ink-2); cursor: pointer; }
  .seg button.on { background: var(--navy); color: #fff; font-weight: 600; }
  .seg button small { font-weight: 400; font-size: 11.5px; opacity: 0.85; }
  .pclose { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
  .pclose b { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
  .order-grid { margin-top: 8px; }
  .order .c-bundle, .order .c-parts, .order .c-all, .order .c-left, .order th.c-avail-parts, .order thead tr:first-child th.c-hub { display: none; }
  .order .c-hub { display: none; }
  .order[data-active="Moffat Beach"] [data-hubcol="Moffat Beach"]:not(thead tr:first-child th),
  .order[data-active="Maleny"] [data-hubcol="Maleny"]:not(thead tr:first-child th) { display: table-cell; }
  .order table.t thead th { white-space: normal; font-size: 11.5px; padding: 5px 6px; }
  .order table.t thead tr:first-child th { border-bottom: 0; padding-bottom: 0; }
  .order table.t thead tr:first-child th.l { vertical-align: bottom; }
  .order table.t .bl { border-left: 0; }
  .order table.t .sum { background: none; font-weight: 400; color: var(--ink-2); }
  .order table.t td, .order table.t tbody th { height: 46px; padding: 0 6px; }
  .order table.t tbody th, .order table.t tfoot th, .order table.t thead th.l { padding-left: 11px; }
  .order-grid table.t tbody th small { display: block; font-size: 11px; color: var(--muted); line-height: 1; margin-top: 2px; }
  .step { border: 1px solid var(--field); border-radius: 3px; overflow: hidden; }
  .step .dec, .step .inc { display: flex; align-items: center; justify-content: center; width: 34px; height: 36px; border: 0; background: var(--sum); color: var(--primary-ink); font-size: 18px; font-weight: 500; line-height: 1; cursor: pointer; }
  .step .inp { width: 40px; height: 36px; border: 0; border-left: 1px solid var(--field); border-right: 1px solid var(--field); border-radius: 0; text-align: center; padding: 0; font-size: 15px; }
  .order > .act { display: flex; gap: 8px; margin-top: 12px; position: sticky; bottom: 0; background: linear-gradient(to top, var(--page) 78%, rgba(245, 250, 255, 0)); padding: 10px 0 8px; }
  .order > .act .btn { min-height: 46px; font-size: 16px; }
  .order > .act .btn.pri { flex: 1; }
  .order table.t tbody th, .order table.t tfoot th { white-space: normal; line-height: 1.2; }
  .order table.t tbody th { width: 99%; }

  /* Other tables on a phone. */
  table[data-table="stock"] tbody th, table[data-table="stock"] tfoot th { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 1px 0 0 var(--line); }
  table[data-table="next"] td, table[data-table="next"] tbody th { white-space: normal; height: auto; padding-top: 6px; padding-bottom: 6px; }
  table.wk td.txt { white-space: normal; line-height: 1.2; font-size: 12px !important; }
  table.wk col:nth-child(1) { width: 26% !important; } table.wk col:nth-child(2) { width: 27% !important; }
  table.wk tbody th.hubname { padding-left: 12px !important; font-size: 14px; }
  table[data-table="invoice"] .c-hubq { display: none; }
  table.rep { min-width: 540px; }
  .top h1 { font-size: 19px; }
  .order-side { grid-template-columns: minmax(0, 1fr); }
  .strip .unsaved { margin: 6px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
@media print {
  .side, .menu-btn, .badge, .user, .toast, .skip { display: none !important; }
  .app { display: block; } body.sf-portal { background: #fff; }
}
