/* Lighthouse — shared design system. No external fonts or scripts: must load from China. */
:root {
  --font: "Segoe UI", -apple-system, "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --text: #1b2430; --muted: #5f6e83; --line: #e3e8ef;
  --line-strong: #cbd5e1; --control-line: #7b8798; --accent: #2b68ab; --accent-ink: #ffffff; --accent-soft: #e8f0fa;
  --crit: #c1352b; --crit-soft: #fcebe9; --crit2: #c24f47; --crit2-soft: #fdf0ee;
  --warn: #9a6400; --warn-soft: #fdf3dc; --ok: #22774a; --ok-soft: #e5f3ea; --info: #2b68ab; --info-soft: #e8f0fa;
  --grey: #606c79; --grey-soft: #eef1f5; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18); --radius: 10px; --radius-sm: 6px;
  --sidebar: 248px; --topbar: 60px;
  --toast-ink: #ffffff; --amber: #b86e00; --shadow-pop: 0 6px 20px rgba(0, 0, 0, .12); --backdrop: rgba(15, 20, 26, .45);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 26px 0 10px; }
h2:first-child { margin-top: 0; }
h2 .sub { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }
h3 { font-size: 13px; margin: 14px 0 6px; }
small, .muted, .meta { color: var(--muted); }
.meta { font-size: 12.5px; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.neg { color: var(--crit); font-weight: 600; }
/* One focus ring for every control (WCAG 2.4.7): keyboard focus only, never on a mouse click. On the dark menu the
   ring takes the menu's link colour; inside a clipped or tight box (theme switch, table cells, tabs) it is drawn inside. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sidebar :focus-visible { outline-color: var(--nav-link); }
.theme button:focus-visible, table.table th:focus-visible, table.table tr:focus-visible, .tabs button:focus-visible { outline-offset: -2px; }
code { font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 12.5px; background: var(--grey-soft); padding: 1px 5px; border-radius: 4px; }

/* ---- shell ------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
/* The menu is dark in both themes (the Control Tower mockup, 2 Nov 2026), with its own tokens. */
:root { --nav-bg: #111827; --nav-text: #e5e7eb; --nav-muted: #9ca3af; --nav-hover: #1f2937; --nav-line: #273244;
  --nav-active: #2f6fb6; --nav-active-ink: #ffffff; --nav-mini: 64px; --nav-link: #93c5fd; --nav-badge-bg: #2b3545; --nav-badge-line: #3a4658;
  --nav-hot-bg: #4a1d1d; --nav-hot-ink: #fca5a5; --nav-hot-line: #7f1d1d; --nav-ok: #22c55e; --nav-bad: #f59e0b; --nav-hot-dot: #ef4444; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--nav-bg); color: var(--nav-text); border-right: 1px solid var(--nav-line);
  display: flex; flex-direction: column; padding: 14px 10px; gap: 6px; overflow-y: auto; }
.brand-row { display: flex; align-items: flex-start; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; color: var(--nav-text); flex: 1; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; flex: none; display: block; }  /* app/static/logo.svg */
.brand b { display: block; font-size: 13.5px; line-height: 1.15; text-transform: uppercase; letter-spacing: .04em; }
.brand small { display: block; font-size: 11.5px; color: var(--nav-muted); }
.sidebar .collapse { border: 0; background: none; color: var(--nav-muted); font-size: 17px; line-height: 1; padding: 8px 6px; border-radius: 6px; cursor: pointer; }
.sidebar .collapse:hover { background: var(--nav-hover); color: var(--nav-text); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--nav-text); font-size: 13.5px; font-weight: 500; position: relative; }
.nav a:hover { background: var(--nav-hover); text-decoration: none; }
.nav a.active { background: var(--nav-active); color: var(--nav-active-ink); font-weight: 650; }
.nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.nav .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .badge { margin-left: auto; min-width: 20px; padding: 0 6px; height: 20px; border-radius: 6px; font-size: 11.5px; font-weight: 700;
  display: inline-grid; place-items: center; background: var(--nav-badge-bg); color: var(--nav-text); border: 1px solid var(--nav-badge-line); }
.nav .badge.hot { background: var(--nav-hot-bg); color: var(--nav-hot-ink); border-color: var(--nav-hot-line); }
.nav .badge:empty { display: none; }
/* the to-do badges: "mine / everyone's" (spec one-worklist 2.5); grey when none of them is mine */
.nav .badge[data-wl] { cursor: pointer; white-space: nowrap; }
.nav .badge.grey { background: transparent; color: var(--nav-muted); }
.nav .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: transparent; flex: none; }
.nav .dot.ok { background: var(--nav-ok); } .nav .dot.bad { background: var(--nav-bad); }
.nav-section { margin: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--nav-muted); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--nav-line); }
.user { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 8px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--nav-text); font: inherit; }
.user:hover { background: var(--nav-hover); }
.user .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--nav-hover); color: var(--nav-text); display: grid; place-items: center; font-weight: 700; flex: none; }
.user b { display: block; font-size: 13px; line-height: 1.2; }
.user small { font-size: 11.5px; color: var(--nav-muted); }
.sidebar .lang { padding: 4px 8px; font-size: 12.5px; color: var(--nav-link); }
.user.signed-in { cursor: default; }  /* with sign-in: the name only, no picker */
.sidebar .signout { margin: 0; }
.sidebar .signout button.lang { border: 0; background: none; font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; width: 100%; }
.sidebar .signout button.lang:hover { text-decoration: underline; }
/* The theme switch (Light / Dark / Follow my computer) in the menu's foot; the pressed one is the person's choice. */
.theme { display: flex; align-items: center; gap: 8px; padding: 2px 8px; font-size: 12.5px; color: var(--nav-muted); }
.theme-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme .seg { display: inline-flex; border: 1px solid var(--nav-line); border-radius: 8px; overflow: hidden; }
.theme button { border: 0; background: none; color: var(--nav-muted); padding: 4px 8px; cursor: pointer; display: grid; place-items: center; }
.theme button:hover { background: var(--nav-hover); color: var(--nav-text); }
.theme button[aria-pressed="true"] { background: var(--nav-active); color: var(--nav-active-ink); }
.theme svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Collapsed (desktop only): an icon rail; names show as tooltips, a badge becomes a dot on its icon. */
@media (min-width: 961px) {
  .shell.navmini { grid-template-columns: var(--nav-mini) 1fr; }
  .navmini .sidebar { padding: 14px 8px; }
  .navmini .sidebar .lbl, .navmini .sidebar-foot .lang, .navmini .theme-lbl, .navmini .user > :not(.avatar) { display: none; }
  .navmini .brand-row { flex-direction: column; align-items: center; }
  .navmini .brand { padding: 6px 0 4px; justify-content: center; }
  .navmini .nav a { justify-content: center; padding: 10px 0; }
  .navmini .nav .badge, .navmini .nav .dot { position: absolute; top: 5px; right: 9px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; border-radius: 50%; border: 0; }
  .navmini .nav .badge { background: var(--nav-muted); } .navmini .nav .badge.hot { background: var(--nav-hot-dot); }
  .navmini .nav-section { margin: 10px 6px 2px; height: 1px; background: var(--nav-line); }
  .navmini .user { justify-content: center; padding: 6px 0; }
  .navmini .theme { justify-content: center; padding: 2px 0; } .navmini .theme .seg { flex-direction: column; }
}
@media (max-width: 960px) { .sidebar .collapse { display: none; } }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.topbar .titles { min-width: 0; }
.topbar h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .subtitle { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
/* LIVE / TEST (loss-02): the server's config says which copy this is. LIVE is a quiet chip; TEST a stripe nobody misses. */
.env-chip { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ok); background: var(--surface); white-space: nowrap; cursor: default; }
.env-chip.test { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
@media (max-width: 700px) { .env-chip.test { display: none; } }  /* the stripe says it; the phone's top bar keeps its room */
.env-test { background: var(--warn-soft) repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--warn) 10%, transparent) 14px 28px); color: var(--warn);
  border-bottom: 3px solid var(--warn); padding: 6px 16px; font-weight: 700; text-align: center; font-size: 13px; letter-spacing: .02em; }
.menu { display: none; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--text); padding: 4px 8px; }
.page { padding: 20px 24px 60px; max-width: 1480px; width: 100%; }
.page.wide { max-width: none; }

/* ---- controls ------------------------------------------------------------ */
.btn, button.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--control-line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 6px; }
.btn.ghost { border-color: transparent; background: none; }
.btn.danger { color: var(--crit); }
.btn[disabled] { opacity: .5; cursor: default; }
/* a save on its way (app/static/writeguard.js, perf-13): the button that sent it waits for the answer */
.btn[aria-busy="true"], button[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn.link { border: 0; background: none; color: var(--accent); padding: 0 4px; }
.btn.perm-denied, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }  /* an action this role may not do (data-perm); the hover says why */
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--control-line); border-radius: 8px; padding: 7px 10px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type="search"] { min-width: 220px; }
input[data-date] { width: 11ch; }
input.invalid { border-color: var(--crit); outline-color: var(--crit); background: var(--crit-soft); }
input[type="checkbox"] { width: 15px; height: 15px; padding: 0; vertical-align: -2px; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.field > input, .field > select { font-size: 13.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); min-width: 140px; }
.field.check { flex-direction: row; align-items: center; gap: 6px; text-transform: none; font-weight: 500; font-size: 13px; color: var(--text); letter-spacing: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; }
.toolbar .grow { flex: 1; }
/* Filter dropdowns keep one width whatever their choices (Billie, 6 Nov 2026): they no longer widen when the data
   fills them, so the toolbar does not grow a row and push the table down. A long choice shows cut short; its full
   text is in the opened list and on hover (title, app.js selectTitles). */
.toolbar .field > select { width: 170px; min-width: 0; text-overflow: ellipsis; }
.toolbar .count { color: var(--muted); font-size: 12.5px; align-self: center; margin-left: auto; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs > * { flex: none; }  /* a tab (or a tab with its ⓘ) keeps its width; a row too long for the window scrolls inside, it never squeezes tabs on top of each other */
.tabs button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 10px 12px; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.segs { display: flex; flex-wrap: wrap; gap: 6px; }
.segs button { border: 1px solid var(--control-line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.segs button:hover { background: var(--surface-2); }
.segs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
/* A count inside the selected tab or pill takes the pill's own ink (the muted grey on the accent was 1.1:1). */
.tabs button.on small, .tabs button.active small, .segs button.on small { color: inherit; opacity: 1; }

/* ---- surfaces -------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
a.card { display: block; color: var(--text); }
a.card:hover { border-color: var(--accent); text-decoration: none; }
.card .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.card .big { font-size: 28px; font-weight: 700; line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.card .sub { font-size: 12.5px; color: var(--muted); }
.card.hero { background: linear-gradient(135deg, var(--ok-soft), var(--surface)); }
.card.hero .big { color: var(--ok); font-size: 34px; }
.card.hot { border-color: var(--crit2); }
.card.hot .big { color: var(--crit); }
.grid { display: grid; gap: 12px; }
.grid.kpis { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid.lists { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: block; color: var(--text); }
a.kpi:hover { border-color: var(--accent); text-decoration: none; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .big { font-size: 26px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.hot .big, .kpi.etd_passed .big { color: var(--crit); } .kpi.critical .big { color: var(--crit2); }
.kpi.ok .big { color: var(--ok); } .kpi.info .big, .kpi.monitor .big, .kpi.new .big { color: var(--accent); } .kpi.received .big { color: var(--grey); }
/* State colours (docs/design/colours.md): a count of 0 is never red or amber. The script marks such a card .zero; this
   rule comes after the state colours above so it wins over them. */
:is(.kpi, .counter, .card).zero :is(.big, .n) { color: var(--muted); }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 12px; font-size: 13px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--crit-soft); color: var(--crit); }
.banner.info { background: var(--info-soft); color: var(--info); }
.note { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 16px; margin-top: 20px; color: var(--muted); font-size: 12.5px; }
.note b { color: var(--text); }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.empty { padding: 28px 16px; color: var(--muted); text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.skeleton { background: linear-gradient(90deg, var(--grey-soft) 25%, var(--surface-2) 50%, var(--grey-soft) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; min-height: 14px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- chips ------------------------------------------------------------------ */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.6; vertical-align: middle; }
.chip.critical, .chip.bad, .chip.etd_passed, .chip.fl-bad, .chip.vs-cps_too_small, .chip.a-etd_passed { background: var(--crit-soft); color: var(--crit); }
.chip.critical2, .chip.a-critical { background: var(--crit2-soft); color: var(--crit); }
.chip.warning, .chip.fl-warn, .chip.a-check, .chip.st-instructed, .chip.vs-costs_more, .chip.vs-not_in_cps, .chip.vs-cps_unpriced { background: var(--warn-soft); color: var(--warn); }
.chip.ok, .chip.st-confirmed, .chip.vs-saves { background: var(--ok-soft); color: var(--ok); }
.chip.info, .chip.fl-info, .chip.st-proposed, .chip.a-monitor, .chip.a-new, .chip.vs-small_difference, .chip.vs-same_as_cps { background: var(--info-soft); color: var(--info); }
.chip.st-approved { background: var(--accent-soft); color: var(--accent); }
.chip.grey, .chip.a-received, .chip.a-not_applicable, .chip.st-cancelled, .chip.st-shipped { background: var(--grey-soft); color: var(--grey); }
.chip.accepted { opacity: .55; text-decoration: line-through; }
.chip.lg { font-size: 12.5px; padding: 3px 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.light-green, .dot-high { background: var(--ok); } .light-orange, .dot-medium { background: var(--amber); } .light-red { background: var(--crit); } .dot-minimal { background: var(--surface); border: 1px solid var(--line-strong); }

/* ---- tables ----------------------------------------------------------------- */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); position: relative;
  max-height: calc(100vh - var(--topbar) - 160px); }  /* shorter than the window, under the top bar and the bulk bar: its sticky header row stays in sight (Billie, 11 Nov 2026) */
.drawer .table-wrap, .po-page .table-wrap, .mtip .table-wrap, .modal .table-wrap { max-height: none; }
/* header filters (table tools, 2 Nov 2026): a ▾ in every list header, filled when its filter is on; the menu under it */
table.table th .hf-btn { border: 1px solid transparent; background: none; color: var(--muted); border-radius: 4px; width: 18px; height: 18px;
  margin-left: 4px; padding: 0; font-size: 10px; line-height: 1; cursor: pointer; vertical-align: middle; opacity: .55; }
table.table th .hf-btn::before { content: "▾"; }
table.table th:hover .hf-btn, table.table th .hf-btn:focus-visible { opacity: 1; border-color: var(--line-strong); }
table.table th.hf-on .hf-btn { opacity: 1; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
table.table th.hf-on { color: var(--accent); }
.hfmenu { position: fixed; z-index: 60; width: 290px; max-height: min(480px, calc(100vh - 24px)); overflow: auto; background: var(--surface);
  color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 10px;
  font-size: 13px; text-transform: none; letter-spacing: normal; font-weight: 400; display: flex; flex-direction: column; gap: 8px; }
.hfmenu .hf-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hfmenu .hf-row > * { flex: 1 1 auto; min-width: 0; }
.hfmenu input, .hfmenu select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 7px; }
.hfmenu .hf-title { font-weight: 650; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
.hfmenu .hf-picks { display: flex; flex-wrap: wrap; gap: 4px; }
.hfmenu .hf-picks .btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.hfmenu .hf-list { max-height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.hfmenu .hf-list label { display: flex; gap: 6px; align-items: center; padding: 2px 0; cursor: pointer; }
.hfmenu .hf-foot { display: flex; justify-content: space-between; gap: 6px; border-top: 1px solid var(--line); padding: 8px 10px 10px;
  margin: 0 -10px -10px; position: sticky; bottom: 0; background: var(--surface); }  /* Clear/Apply stay in reach in a long menu */
/* A top bar too narrow for its buttons (always on a phone; app.js fitTopbar also when they would not fit, in any
   window) folds them into one ⋯ menu under the bar: the page title keeps its room and every button, Export to xlsx
   first among them, stays one tap away (Billie, 23 Nov 2026: everything adjusts to its size, key info stays visible). */
.topmore { display: none; margin-left: auto; flex: none; min-width: 36px; justify-content: center; font-size: 18px; line-height: 1; padding: 4px 8px; }
.topbar.compact .topmore { display: inline-flex; }
.topbar.compact .topbar-actions { display: none; position: absolute; top: 100%; right: 8px; margin: 4px 0 0; z-index: 45; min-width: 220px;
  max-width: calc(100vw - 16px); max-height: calc(100vh - var(--topbar) - 16px); overflow: auto; flex-direction: column; align-items: stretch;
  gap: 4px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-pop); }
.topbar.compact.more-open .topbar-actions { display: flex; }
.topbar.compact .topbar-actions > * { justify-content: flex-start; }
.topbar.compact .topbar-actions .btn { white-space: normal; text-align: left; }
.topbar.compact .topbar-actions .help-link { display: flex; align-items: center; width: auto; height: auto; border-radius: 8px; padding: 6px 10px; }
.topbar.compact .topbar-actions .help-link::after { content: attr(aria-label); margin-left: 8px; font-size: 13px; font-weight: 500; }
.topbar.compact .topbar-actions #topclear-help, .topbar.compact .env-chip { display: none; }
.topbar.compact .topbar-actions .exportmenu { position: static; margin: 0; box-shadow: none; border-style: dashed; }
@media (max-width: 600px) { .hfmenu { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; border-radius: 12px 12px 0 0; max-height: 75vh; } }
/* export on top: the top-bar button, and its menu when a screen shows several tables */
.topbar-actions { position: relative; }
.exportmenu { position: absolute; top: 100%; right: 0; margin-top: 4px; z-index: 30; min-width: 200px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 4px; display: flex; flex-direction: column; }
.exportmenu button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--text); font: inherit; }
.exportmenu button:hover { background: var(--surface-2); }
.table-wrap.tall { max-height: calc(100vh - 300px); }
/* Floating horizontal scrollbar: shown at the bottom of the window while a wide
   table's own scrollbar is below the fold, so wide tables can always be scrolled sideways. */
.hscroll { position: fixed; bottom: 0; height: 14px; overflow-x: auto; overflow-y: hidden; z-index: 25; background: var(--surface); border-top: 1px solid var(--line); display: none; }
.hscroll > div { height: 1px; }
table.table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 100%; }
table.table th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em;
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.table th.sortable, table.table th[data-k], table.table th[data-sort] { cursor: pointer; user-select: none; }
table.table th.sorted-asc::after { content: " ▲"; font-size: 9px; } table.table th.sorted-desc::after { content: " ▼"; font-size: 9px; }
table.table th[draggable="true"] { cursor: grab; }
/* Column edges: a divider on every header and a faint one on cells, so it is clear where
   a column starts and stops; the grip on the header's right edge resizes it. */
table.table th { border-right: 1px solid var(--line); }
table.table th:last-child { border-right: 0; }
table.table td { border-right: 1px solid color-mix(in srgb, var(--line) 45%, transparent); }
table.table td:last-child { border-right: 0; }
.colgrip { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 3; touch-action: none; }
.colgrip::after { content: ""; position: absolute; top: 25%; bottom: 25%; left: 3px; width: 2px; border-radius: 1px; background: transparent; }
.colgrip:hover::after, .colgrip.on::after { background: var(--accent); }
table.table.resized { table-layout: fixed; width: auto; min-width: 0; }
table.table.resized th, table.table.resized td { box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
table.table th.dragging { opacity: .4; }
table.table th.dropzone { box-shadow: inset 3px 0 0 var(--accent); }
.collist { list-style: none; margin: 0; padding: 0; }
.collist li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: grab; }
.collist li.dragging { opacity: .4; } .collist li.dropzone { box-shadow: inset 0 3px 0 var(--accent); }
.collist li .grip { color: var(--muted); cursor: grab; }
.collist li label { flex: 1; cursor: pointer; }
table.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13.5px; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover td { background: var(--surface-2); }
table.table tr.clickable { cursor: pointer; }
table.table td.num, table.table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--line-strong); border-bottom: 0; position: sticky; bottom: 0; white-space: nowrap; }
table.table td.nowrap, table.table.nowrap td { white-space: nowrap; }
table.table td .sub { display: block; color: var(--muted); font-size: 12px; }
table.table td a.po { font-weight: 650; color: var(--accent); }
table.table.compact td { padding: 6px 10px; font-size: 13px; }
table.table .actions { display: inline-flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 900px) { .sec { display: none !important; } }
/* ---- pagination bar (one component, app.js "pagination"): under every table ---------------------------------- */
table.table tr[hidden] { display: none; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.pager[hidden], .pager.blank { display: none; }
.pager-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pager .btn.sm { min-width: 30px; justify-content: center; }
.pager-go { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px; }
.pager input[type="number"] { width: 64px; padding: 4px 6px; border-radius: 6px; font-size: 12.5px; }
.pager select { padding: 4px 8px; border-radius: 6px; font-size: 12.5px; }
.card .pager { margin-top: 6px; }

/* ---- drawer, modal, toasts ------------------------------------------------- */
.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: 90; display: none; }
.drawer-backdrop.show, .modal-backdrop.show { display: block; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(560px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); z-index: 100;
  transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column; }
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 17px; }
.drawer-head .sub { font-size: 12.5px; color: var(--muted); }
.drawer-head .close { margin-left: auto; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.drawer-head .close:hover { background: var(--surface-2); color: var(--text); }
.drawer-body { padding: 16px 20px 40px; overflow: auto; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.facts div { font-size: 13px; }
.facts .k { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 6px 0 6px 14px; border-left: 2px solid var(--line); font-size: 13px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline .when { color: var(--muted); font-size: 12px; }

/* ---- the shipment timeline in the PO panel: status, a track of milestones, the dated events ---------------------------- */
.tl-h { margin-top: 0; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 6px 0 4px; font-size: 12.5px; color: var(--muted); }
.tl-meta a.po { font-weight: 650; }
.tl-track { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tl-st { position: relative; padding: 20px 3px 0; text-align: center; font-size: 12px; line-height: 1.35; }
.tl-st::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 3px; background: var(--line-strong); }
.tl-st:first-child::before, .tl-st::after { display: none; }
.tl-st.seg::before { background: var(--accent); }
.tl-dot { position: absolute; top: 0; left: 50%; width: 15px; height: 15px; margin-left: -7.5px; z-index: 1; box-sizing: border-box;
  border: 3px solid var(--line-strong); border-radius: 50%; background: var(--surface); }
.tl-st.done .tl-dot { background: var(--accent); border-color: var(--accent); }
.tl-st.late .tl-dot { border-color: var(--crit); }
.tl-st.late .tl-date { color: var(--crit); }
.tl-st.late .tl-dot { background: var(--crit-soft); }
.tl-tag { display: block; margin-top: 2px; color: var(--crit); font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.tl-events li.todo.overdue { color: var(--crit); }
.tl-events li.overdue .tl-ic { border-color: var(--crit); color: var(--crit); font-weight: 700; }
.tl-events li.overdue .tl-when { color: var(--crit); }
.cps-update { margin: 0 0 10px; padding: 8px 12px; border-left: 4px solid var(--crit); background: var(--crit-soft); font-size: 13px; line-height: 1.4; }
.cps-update div { margin-top: 2px; color: var(--muted); }
.tl-lab { display: block; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.tl-place, .tl-date, .tl-prev, .tl-sub { display: block; overflow-wrap: anywhere; }
.tl-place { font-size: 12.5px; }
.tl-prev { color: var(--muted); font-size: 11.5px; }
.tl-d { white-space: nowrap; }
.tl-boxes { margin: 8px 0 0; font-size: 12.5px; }
.tl-box { display: inline-block; margin-right: 10px; white-space: nowrap; }
.tl-events { list-style: none; margin: 6px 0 8px; padding: 0; }
.tl-events li { display: grid; grid-template-columns: 18px 84px minmax(0, 1fr) minmax(0, auto); gap: 0 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tl-events li.todo { color: var(--muted); }
.tl-events:not(.open) li.tl-more { display: none; }
.tl-ic { width: 16px; height: 16px; margin-top: 1px; display: grid; place-items: center; box-sizing: border-box; border: 2px solid var(--line-strong); border-radius: 50%; font-size: 10px; line-height: 1; }
.tl-events li.done .tl-ic { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.tl-when { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
.tl-events .chip { white-space: normal; text-align: right; font-size: 10.5px; line-height: 1.3; padding: 1px 7px; }
@media (max-width: 600px) {  /* the drawer fills a narrow screen: the stations stack into a vertical list */
  .tl-track { grid-template-columns: 1fr; }
  .tl-st { text-align: left; padding: 0 0 16px 28px; }
  .tl-st::before { display: none; }
  .tl-st::after { display: block; content: ""; position: absolute; left: 6px; top: 17px; bottom: -2px; width: 3px; background: var(--line-strong); }
  .tl-st:last-child::after { display: none; }
  .tl-st.nx::after { background: var(--accent); }
  .tl-dot { left: 0; top: 1px; margin-left: 0; }
  .tl-events li { grid-template-columns: 18px minmax(0, 1fr); }
  .tl-events li .tl-when { grid-column: 2; }
  .tl-events li .tl-what { grid-column: 2; }
  .tl-events li .chip { grid-column: 2; justify-self: start; text-align: left; margin-top: 2px; }
}
.modal { position: fixed; z-index: 100; top: 14vh; left: 50%; transform: translateX(-50%); width: min(460px, 94vw); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 0 24px; display: none;
  max-height: calc(86vh - 16px); overflow: auto; }
.modal-backdrop.show .modal { display: block; }
.modal-backdrop.dlg { z-index: 112; }  /* a form dialog (App.dialog) also opens above the drawer */
.dlg-field { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }
.dlg-field select, .dlg-field textarea, .dlg-field input { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }
#user-modal { z-index: 115; }  /* the name picker opens above the drawer: buttons in a drawer ask for a name too */
.modal h2 { margin: 0 0 4px; font-size: 18px; }
/* a long dialog scrolls inside; its title row (with ×) stays on top and its buttons at the bottom (Billie, 11 Nov 2026) */
.modal > h2, .modal > .dlg-h { position: sticky; top: 0; z-index: 1; background: var(--surface); padding-top: 22px; margin-top: 0; }
.dlg-h { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.dlg-h h2 { margin: 0; }
.dlg-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 6px; min-width: 28px; min-height: 28px; }
.dlg-x:hover { background: var(--surface-2); color: var(--text); }
.modal > .foot { position: sticky; bottom: 0; z-index: 1; background: var(--surface); padding: 8px 0 22px; }
.modal .users { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.modal .row { display: flex; gap: 8px; align-items: center; }
.modal .row input { flex: 1; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; max-width: 420px; animation: rise .18s ease; }
.toast.error { background: var(--crit); color: var(--toast-ink); } .toast.ok { background: var(--ok); color: var(--toast-ink); }
.toast.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); }
/* every save / done / error message is one of these, fixed in the window, wherever the page is scrolled (Billie, 11 Nov 2026) */
.toast { display: flex; align-items: flex-start; gap: 10px; }
.toast-x { margin-left: auto; border: 0; background: none; color: inherit; opacity: .85; font-size: 16px; line-height: 1; padding: 0 2px; cursor: pointer; }
.toast-x:hover { opacity: 1; }
@media (max-width: 600px) { .toasts { left: 12px; right: 12px; bottom: 12px; } .toast { max-width: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- forms inside pages ------------------------------------------------------- */
.form { display: none; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 10px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.form.show { display: flex; }
.form label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.form label input, .form label select { font-size: 13.5px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.actions-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }

/* ---- responsive ------------------------------------------------------------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar); z-index: 80; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu { display: inline-block; }
  .topbar { padding: 0 14px; }
  .page { padding: 14px 14px 60px; }
}
@media print { .sidebar, .topbar-actions, .topmore, .toolbar, .drawer, .toasts, .pager { display: none !important; } .shell { display: block; } .page { padding: 0; } table.table tr[hidden] { display: table-row; } }  /* print every row, not one page */

/* ---- help: the "?" of every screen, the hover on headers, and the fixed colour of each data source ------------------ */
.help-link, .help-q { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--muted); font-weight: 700; font-size: 14px; line-height: 1; text-decoration: none; flex: none; }
.help-link:hover, .help-q:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.help-q { width: 18px; height: 18px; font-size: 11px; vertical-align: 2px; margin-left: 4px; }
:root { --src-cps: #2b68ab; --src-cps-bg: #e8f0fa; --src-forwarder: #22774a; --src-forwarder-bg: #e5f3ea; --src-rates: #9a6400; --src-rates-bg: #fdf3dc;
  --src-tool: #6b4fbb; --src-tool-bg: #efeafb; --src-computed: #5b6878; --src-computed-bg: #eef1f5; }
.chip.src { font-weight: 600; }
.chip.src-cps { background: var(--src-cps-bg); color: var(--src-cps); }
.chip.src-forwarder { background: var(--src-forwarder-bg); color: var(--src-forwarder); }
.chip.src-rates { background: var(--src-rates-bg); color: var(--src-rates); }
.chip.src-tool { background: var(--src-tool-bg); color: var(--src-tool); }
.chip.src-computed { background: var(--src-computed-bg); color: var(--src-computed); }

/* ---- dark mode: the one dark set. <html data-theme="dark"> is set by the head script of _layout.html (the switch in the
   menu: Light / Dark / Follow my computer). Every colour is a token; a token without a dark value is a test failure
   (tests/test_theme.py). The menu tokens (--nav-*) stay the same: the menu is dark in both themes. ---------------- */
:root[data-theme="dark"] {
  --bg: #0f141a; --surface: #171d25; --surface-2: #1d242e; --text: #e6ebf1; --muted: #98a4b3; --line: #2a333f;
  --line-strong: #3b4654; --control-line: #6b7787; --accent: #7fb0e6; --accent-ink: #0f141a; --accent-soft: #1e2d3f;
  --crit: #ff8f85; --crit-soft: #3a2220; --crit2: #f0a39c; --crit2-soft: #352527;
  --warn: #f2c261; --warn-soft: #3a3120; --ok: #8bd0a1; --ok-soft: #1e3326; --info: #7fb0e6; --info-soft: #1e2d3f;
  --grey: #98a4b3; --grey-soft: #242c36; --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
  --src-cps: #7fb0e6; --src-cps-bg: #1e2d3f; --src-forwarder: #8bd0a1; --src-forwarder-bg: #1e3326; --src-rates: #f2c261; --src-rates-bg: #3a3120;
  --src-tool: #b9a6f2; --src-tool-bg: #2a2340; --src-computed: #98a4b3; --src-computed-bg: #242c36;
  --toast-ink: #0f141a; --amber: #f2b13c; --shadow-pop: 0 6px 20px rgba(0, 0, 0, .5); --backdrop: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

.box-hint { flex-basis: 100%; font-size: 12px; color: var(--crit); margin-top: 2px; }
.box-hint:empty { display: none; }

/* ---- metric ⓘ (app.js "metric hover"; definitions in app/metrics.py): the ⓘ of a KPI card, counter or figure,
   and the one card it opens on click. A figure that is a link gets the ⓘ beside it in a .mwrap; any other gets it inside. ---- */
.mtip { position: fixed; z-index: 118;  /* above the drawer and dialogs (a figure in them has an ⓘ too), below toasts */
  width: min(340px, calc(100vw - 16px)); max-height: min(70vh, 520px); overflow: auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); padding: 0 12px 12px; font-size: 13px; line-height: 1.45; text-transform: none; letter-spacing: 0; font-weight: 400; }
.mtip[hidden] { display: none; }
/* the title and its × stay at the top while the card scrolls (Billie, 11 Nov 2026) */
.mtip-h { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; margin: 0 -12px 4px; padding: 10px 12px 6px; font-size: 14px;
  position: sticky; top: 0; z-index: 1; background: var(--surface); }
.mtip-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 6px; min-width: 24px; min-height: 24px; }
.mtip-x:hover { background: var(--surface-2); color: var(--text); }
.mtip p { margin: 0 0 8px; }
.mtip dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; margin: 0 0 8px; }
.mtip dt { color: var(--muted); font-weight: 600; font-size: 12px; }
.mtip dd { margin: 0; }
.mtip-fields { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.mtip-f { white-space: nowrap; }
.mtip-f .chip { font-size: 11px; padding: 0 6px; }
.mtip-help { font-size: 12.5px; }
.mwrap { position: relative; display: grid; min-width: 0; }
.mwrap > :first-child { min-width: 0; }
.mwrap.inline { display: inline-flex; align-items: center; gap: 0; vertical-align: middle; }
.has-mi { position: relative; }
.mwrap:not(.inline) > :first-child, .kpi.has-mi, .fact.has-mi, .counter.has-mi { padding-right: 24px; }
/* Billie, 10 Nov 2026: a small, light ⓘ that does not dominate: a thin grey ring, no fill, no bold; darker only on
   hover or keyboard focus. The button is 18px (an easy target), the drawn ring 12px. Opens only on click (app.js). */
button.mi, .tabs button.mi, .segs button.mi, .chip button.mi { position: absolute; top: 8px; right: 6px; z-index: 1;
  width: 18px; height: 18px; min-width: 18px; min-height: 18px; padding: 0; margin: 0; border: 0; border-radius: 50%;
  background: none; box-shadow: none; color: var(--muted); opacity: .6; cursor: pointer; user-select: none;
  font: normal 400 9px/1 system-ui, -apple-system, "Segoe UI", sans-serif; text-transform: none; letter-spacing: 0;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
button.mi::before { content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; border-radius: 50%; }
button.mi:hover, button.mi:focus-visible, button.mi[aria-expanded="true"] { opacity: 1; color: var(--accent); background: none; }
button.mi:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* inline: right after the label, with a small gap (a line of text, a tab, a chip) */
.mwrap.inline > button.mi, .chip.has-mi > button.mi, .has-mi.mi-inline > button.mi { position: relative; top: auto; right: auto;
  margin: 0 0 0 3px; vertical-align: middle; }
.chip.has-mi { padding-right: 4px; }
@media (max-width: 600px) {
  .mtip { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-height: 75vh; border-radius: 14px 14px 0 0;
    padding: 0 16px 18px; }
  .mtip-h { margin: 0 -16px 4px; padding: 14px 16px 6px; }
}

/* ---- the ⋮ menu of Settings -> Users (spec 2026-11-04-sign-in-audit-design, 4.6) and greyed items with their reason ----
   A greyed item stays focusable (aria-disabled, not disabled) and shows why on hover AND on focus; the same .tip text
   is the item's aria-describedby, so a screen reader reads it too. */
.kebab { min-width: 32px; min-height: 32px; padding: 0 8px; font-size: 18px; line-height: 1; }
.umenu { position: absolute; z-index: 60; min-width: 230px; max-width: calc(100vw - 24px); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 4px; display: flex;
  flex-direction: column; }
.umenu [role="menuitem"] { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 6px;
  cursor: pointer; color: var(--text); font: inherit; min-height: 36px; }
.umenu [role="menuitem"]:hover, .umenu [role="menuitem"]:focus-visible { background: var(--surface-2); }
.umenu [role="menuitem"][aria-disabled="true"] { color: var(--muted); cursor: not-allowed; }
.tip-wrap { position: relative; display: block; }
.tip-wrap .tip { display: none; position: absolute; left: 8px; right: 8px; top: 100%; z-index: 61; background: var(--text);
  color: var(--surface); border-radius: 6px; padding: 6px 8px; font-size: 12px; line-height: 1.35; pointer-events: none; }
.tip-wrap:hover .tip,
.tip-wrap:focus-within .tip { display: block; }
td.tick .tip-wrap { display: inline-block; }
td.tick .tip-wrap .tip { left: 50%; right: auto; width: 220px; transform: translateX(-50%); }
.routing { display: block; font-size: 12px; margin-top: 2px; }
.subtabs { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.signin-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 0 0 10px; }
.signin-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.temp-pw { display: flex; gap: 8px; margin-top: 8px; }
.temp-pw input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 15px; min-width: 0; }
@media (max-width: 600px) {
  .umenu { left: 12px !important; right: 12px; min-width: 0; }
  .signin-filters label { flex: 1 1 140px; }
}

/* ---- the History tab (app.js historyTab) and the Activity page ---------------------------------------------------- */
.po-tabs { margin: 0 0 12px; }
.hist-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 10px; }
.hist-tools label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.hist-tools input[data-date] { width: 9.5em; }
.hist-own { display: flex; gap: 6px; margin-left: auto; }
.hist-colmenu { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 10px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.hist-colmenu label { display: flex; gap: 6px; align-items: center; }
.sys-badge { font-weight: 600; }
.was { border-bottom: 1px dotted var(--muted); cursor: help; }
.act-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.act-privacy { margin: 0 0 12px; }
.was:focus::after, .was:hover::after { content: " (" attr(title) ")"; color: var(--muted); font-size: 12px; }

/* tag picker (App.tagPicker): chosen items as tags, a search input under them, a result list that opens below */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tagpick { position: relative; min-width: 220px; }
.tagpick-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.tagpick-tags:not(:empty) { margin-bottom: 6px; }
.tagpick-tag { display: inline-flex; align-items: center; gap: 2px; background: var(--accent-soft); color: var(--text); border: 1px solid var(--control-line); border-radius: 999px; padding: 1px 2px 1px 10px; font-size: 13px; }
.tagpick-tag button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; line-height: 1; padding: 4px 7px; border-radius: 999px; }
.tagpick-tag button:hover { background: var(--surface-2); color: var(--text); }
.tagpick-input { width: 100%; box-sizing: border-box; }
.tagpick-list { list-style: none; margin: 0; padding: 4px; position: fixed; z-index: 30; max-height: 220px; overflow-y: auto; background: var(--surface); border: 1px solid var(--control-line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.tagpick-list[hidden] { display: none; }
.tagpick-list li { padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.tagpick-list li[aria-selected="true"], .tagpick-list li:hover { background: var(--accent-soft); }
.tagpick-list .tagpick-none { color: var(--muted); cursor: default; }
.tagpick-list .tagpick-none:hover { background: transparent; }
/* the hover card: today's make-up of the number and what to do (Billie, 7 Nov 2026) */
.mtip-why { margin: 6px 0 8px; padding: 6px 8px; border-radius: 6px; background: var(--accent-soft); }
.mtip-why ul { margin: 4px 0 0 16px; padding: 0; }
.mtip-action { margin: 8px 0; padding: 6px 8px; border-left: 3px solid var(--warn); background: var(--warn-soft); border-radius: 0 6px 6px 0; }
.mtip-action p { margin: 3px 0 0; }

/* View as <role> (Billie, 10 Nov 2026): the Admin's role picker in the menu's foot, and the fixed read-only banner */
.view-as { display: flex; flex-direction: column; gap: 4px; padding: 0 8px; font-size: 12px; color: var(--nav-link); margin: 0 0 4px; }
.view-as select { width: 100%; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
.navmini .view-as { display: none; }
.view-as-banner { position: sticky; top: var(--topbar); z-index: 40; margin: 0; border-radius: 0; justify-content: center; font-weight: 600; }
/* a quiet link from an owner page into the one worklist (spec one-worklist 2.4) */
.wl-link { font-size: 13px; margin-left: 10px; white-space: nowrap; }
/* phone: a long link line (Open POs' season-deadline line, with its ⓘ) wraps instead of pushing the page sideways */
@media (max-width: 600px) { .wl-link { white-space: normal; } .mwrap.inline { max-width: 100%; } .mwrap.inline > :first-child { white-space: normal; } }
.wl-strip { margin: 4px 0 10px; font-size: 13.5px; }
/* Open POs (spec one-worklist 3): four tiles, the containers sub-line, the filter bar is App.filterBar */
.kpis4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.kpis6 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.kpi .sub2 { display: inline-block; margin-top: 4px; text-decoration: underline dotted; cursor: pointer; }
/* the PO drawer in reading order (spec one-worklist 4): its to-dos, and the folded lead times */
.po-todo { margin: 6px 0; padding: 8px 10px 8px 12px; font-size: 13.5px; line-height: 1.45; background: var(--surface-2); border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong); border-radius: var(--radius-sm); min-width: 0; }
.po-todo.red { border-left-color: var(--crit); } .po-todo.amber { border-left-color: var(--warn); } .po-todo.calm { border-left-color: var(--accent); }
.po-todo .pt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; } .po-todo .pt-head b { font-size: 14.5px; }
.po-todo .pt-line { margin-top: 2px; overflow-wrap: anywhere; } .po-todo .pt-how { margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.pt-pill { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--grey-soft); color: var(--grey); white-space: nowrap; }
.pt-pill.red { background: var(--crit-soft); color: var(--crit); } .pt-pill.amber { background: var(--warn-soft); color: var(--warn); }
.pt-link { display: inline-block; margin: 2px 0 8px; }
.po-lt { margin: 14px 0 4px; } .po-lt summary { cursor: pointer; font-weight: 600; }
/* the drawer's Key dates table (Billie, 10 Nov 2026): fits the drawer, no sideways scroll */
table.table.kd { width: 100%; table-layout: auto; font-size: 12.5px; }
table.table.compact.kd th, table.table.compact.kd td { white-space: nowrap; padding: 4px 6px; }
table.table.compact.kd th { text-transform: none; letter-spacing: 0; }
table.table.kd tbody th { font-weight: 600; text-align: left; }
table.kd tr.kd-one td { color: var(--ink); }
@media (max-width: 480px) { .tl-box, .tl-box .tl-unl { white-space: normal; }  /* the timeline's container line wraps on a phone */
  table.table.kd { font-size: 12px; } table.table.compact.kd th, table.table.compact.kd td { padding: 3px 3px; } }
/* the filter bar (App.filterBar, app/filter_bar.py): the pinned filters, the chips of the others, + Filter, Clear all;
   one row that wraps, never a tall list (Billie, 11 Nov 2026) */
.fbar { position: relative; }
.fbar-chips { display: contents; }
.fbar-store { display: none !important; }
.fbar [hidden], .fbar-pop [hidden] { display: none !important; }  /* a .btn sets its own display */
.fchip { display: inline-flex; align-items: center; max-width: 100%; min-height: 34px; border: 1px solid var(--accent); background: var(--accent-soft);
  color: var(--text); border-radius: 999px; font-size: 13px; }
.fchip .fchip-edit { display: inline-flex; align-items: center; gap: 0; min-width: 0; padding: 0 4px 0 12px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 999px; min-height: 32px; }
.fchip span.fchip-edit { cursor: default; }
.fchip .fchip-l { color: var(--muted); font-weight: 600; white-space: nowrap; }
.fchip b { font-weight: 650; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 4px; }
.fchip .fchip-x { border: 0; background: none; color: var(--muted); font-size: 17px; line-height: 1; padding: 0 10px 0 6px; min-height: 32px; cursor: pointer; border-radius: 999px; }
.fchip .fchip-x:hover { color: var(--text); }
.fbar-add { min-height: 34px; white-space: nowrap; }
.fbar-clear { min-height: 34px; white-space: nowrap; }
.fbar-pop { position: absolute; z-index: 60; width: 300px; max-width: calc(100vw - 24px); max-height: min(440px, 70vh); display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-pop);
  font-size: 13px; text-transform: none; letter-spacing: normal; font-weight: 400; }
.fbar-pop-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); flex: none; }
.fbar-pop-x { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; }
.fbar-pop-x:hover { background: var(--surface-2); color: var(--text); }
.fbar-pop-b { overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.fbar-pop .field { gap: 0; }
.fbar-pop .field .fl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }  /* the panel's title names the filter; screen readers still hear it */
.fbar-pop .field > select, .fbar-pop .field > input, .fbar-pop .field input, .fbar-pop .field select { width: 100%; min-width: 0; }
.fbar-pop .fbar-find { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; }
.fbar-pop .fbar-hint, .fbar-pop .fbar-msg { margin: 0; }
.fbar-pop .fbar-msg:empty { display: none; }
.fbar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.fbar-list li { display: flex; align-items: center; gap: 4px; }
.fbar-pick { flex: 1; min-width: 0; text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.fbar-pick small { color: var(--accent); font-weight: 600; margin-left: 4px; }
.fbar-pick:hover, .fbar-pin:hover { background: var(--surface-2); }
.fbar-pin { flex: none; width: 34px; height: 34px; border: 0; background: none; color: var(--control-line); border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.fbar-pin[aria-pressed="false"] svg path { fill: none; }
.fbar-pin[aria-pressed="true"] { color: var(--accent); }
.fbar-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; }
.fbar-value .fbar-foot .btn.primary { margin-left: auto; }
/* phone: the pinned filters share the width, two by two; the panels are a bottom sheet with their × in sight */
@media (max-width: 600px) {
  .fbar > .field:not(.check) { flex: 1 1 140px; min-width: 0; }
  .fbar > .field > select, .fbar > .field:not(.check) > input, .fbar > .field .picker, .fbar > .field .picker > input { width: 100%; min-width: 0; }
  .fbar > .field.check { flex: 1 1 100%; }  /* a yes/no box: the box, then its label on one line (the box was stretched to the full width) */
  .fbar .fbar-period { flex: 1 1 100%; } .fbar .fbar-period label { flex: 1 1 0; min-width: 0; } .fbar .fbar-period input { width: 100%; }  /* From and To share the row */
  .fbar-pop { position: fixed !important; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; max-height: 75vh; border-radius: 12px 12px 0 0; }
  .fchip b { max-width: 140px; }
}
.fbar-period { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.fbar-period label { display: flex; flex-direction: column; gap: 3px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.fbar-pop .fbar-period { display: flex; }
.fbar-pop .fbar-period label { flex: 1 1 120px; }
/* shipper alias suggestions inline (To Check, PO drawer): "Looks like X: add the alias?" */
.alias-spot:empty { display: none; }
.alias-spot { display: block; flex-basis: 100%; margin-top: 4px; }
.alias-hint { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
/* A tick list of people (Settings, kind "people": Team performance): wraps instead of scrolling sideways. */
.people-pick { display: flex; flex-wrap: wrap; gap: 4px 14px; white-space: normal; width: min(640px, 62vw); }
.people-pick label.check { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ---- sign-in pages (_signin.html: login.html, login_entra.html), option A "Split screen" (Billie, 14 Nov 2026) -----
   A navy brand panel with the lighthouse's beam on the left, the sign-in on the right; a short band on a phone. The
   panel is dark in both themes (like the menu), so its --hero-* tokens have no dark value (tests/test_theme.py). */
:root { --hero-top: #0f1b2d; --hero-mid: #14243a; --hero-low: #0b1422; --hero-text: #e6ebf1; --hero-muted: #b6c3d4;
  --hero-beam: rgba(245, 165, 36, .42); --hero-glow: rgba(245, 165, 36, .16); --hero-wave: #3b82c4; --hero-shadow: rgba(0, 0, 0, .35); }
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.signin-hero { position: relative; overflow: hidden; color: var(--hero-text); padding: 44px 48px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 28px; background: radial-gradient(120% 70% at 0% 0%, var(--hero-glow), transparent 55%),
  linear-gradient(165deg, var(--hero-top) 0%, var(--hero-mid) 55%, var(--hero-low) 100%); }
/* the beam: a warm band along the top edge, brightest on the left (the mock-up Billie chose, 14 Nov 2026) */
.signin-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, var(--hero-beam) 35%, transparent 95%); clip-path: polygon(0 0, 100% 0, 100% 45px, 0 88px); }
.signin-hero > * { position: relative; }
.signin-mark { display: flex; align-items: center; gap: 14px; }
.signin-mark img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 8px 24px var(--hero-shadow); flex: none; }
.signin-mark b { display: block; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.signin-mark small { display: block; color: var(--hero-muted); font-size: 12.5px; }
.signin-tagline { font-size: 34px; line-height: 1.18; font-weight: 650; max-width: 460px; margin: 0; letter-spacing: -.02em; }
.signin-sub { color: var(--hero-muted); font-size: 15px; max-width: 420px; margin: 12px 0 0; }
.signin-waves { display: block; width: 100%; max-width: 460px; height: 18px; color: var(--hero-wave); }
.signin-pane { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.signin-box { width: 100%; max-width: 380px; }
.signin-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.signin-box h1 { font-size: 28px; margin: 8px 0 10px; letter-spacing: -.02em; }
.signin-box h2 { font-size: 14px; margin: 22px 0 6px; }
.signin-lead { color: var(--muted); font-size: 15px; margin: 0; }
.signin-go { display: flex; width: 100%; justify-content: center; gap: 10px; min-height: 48px; margin-top: 22px; font-size: 15.5px; font-weight: 600; border-radius: 10px; }
.signin-go img { width: 20px; height: 20px; flex: none; }
.signin-help { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.signin-done { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-top: 18px;
  background: var(--ok-soft); color: var(--ok); font-size: 22px; font-weight: 700; }
.signin-foot { margin-top: 28px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
/* the password form of auth.mode local (login.html) */
.signin-box label { display: block; font-weight: 600; margin: 14px 0 4px; }
.signin-box input[type="email"], .signin-box input[type="password"] { box-sizing: border-box; width: 100%; font-size: 16px; min-height: 40px; }
.signin-box button.btn { margin-top: 20px; width: 100%; justify-content: center; min-height: 44px; font-size: 15px; font-weight: 600; }
.signin-box ul { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.signin-box .banner { margin-top: 12px; }
@media (max-width: 760px) {
  .signin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .signin-hero { padding: 22px 20px 26px; gap: 14px; }
  .signin-hero::before { clip-path: polygon(0 0, 100% 0, 100% 28px, 0 56px); }
  .signin-mark img { width: 44px; height: 44px; border-radius: 12px; }
  .signin-tagline { font-size: 20px; }
  .signin-sub, .signin-waves { display: none; }
  .signin-pane { align-items: flex-start; padding: 28px 20px 32px; }
  .signin-box h1 { font-size: 24px; }
}

/* ---- every screen fits its window (Billie, 23 Nov 2026: "everything, always, regardless which module, screen ...
   adjusts to its size and all key info remains visible"). Shared patterns, not per-page fixes; tests/test_layout_widths.py
   opens the main pages at 375, 768 and 1280 px and fails when one scrolls sideways. ------------------------------------- */
/* long words, e-mail addresses and IDs break instead of pushing a card or panel wider than the window */
body { overflow-wrap: break-word; }
/* a grid's cells may be narrower than their content: a wide chart or table scrolls in its own box, never the page */
.grid > *, .facts > *, .mwrap, .card, .kpi { min-width: 0; }
.chart-card, .card > svg, .card > canvas { max-width: 100%; }
.chart-card { overflow-x: auto; }
/* wide tables scroll sideways inside their .table-wrap with the first (key) column in sight: the PO, the container, the
   supplier. A tick-box column first keeps both in sight. Lowest specificity (:where) so a row's own colour still wins. */
:where(.table-wrap) > table.table:has(> thead) :where(tr) > :first-child { position: sticky; left: 0; z-index: 1; }
:where(.table-wrap) > table.table:has(> thead) :where(tbody tr, tfoot tr) > :first-child { background-color: var(--surface); }
:where(.table-wrap) > table.table:has(> thead) :where(thead tr) > :first-child { z-index: 3; }
:where(.table-wrap) > table.table:has(> thead) :where(tbody tr:hover) > :first-child { background-color: var(--surface-2); }
:where(.table-wrap) > table.table:has(> thead > tr > th:first-child > input[type="checkbox"]) :where(tr) > :first-child { width: 36px; min-width: 36px; max-width: 36px; box-sizing: border-box; }
:where(.table-wrap) > table.table:has(> thead > tr > th:first-child > input[type="checkbox"]) :where(tr) > :nth-child(2) { position: sticky; left: 36px; z-index: 1; background-color: var(--surface); }
:where(.table-wrap) > table.table:has(> thead > tr > th:first-child > input[type="checkbox"]) :where(thead tr) > :nth-child(2) { z-index: 3; background-color: var(--surface-2); }
/* the key column's right edge shows where the rest scrolls under it */
:where(.table-wrap) > table.table:has(> thead) :where(tr) > :first-child { box-shadow: inset -1px 0 0 var(--line); }
@media (max-width: 600px) {
  /* the summary tiles wrap two by two: every tile, its label and its number in sight, the table right under them
     (was: one tile per row on Open POs and Certificates, a sideways strip on PO follow-up and To Check) */
  main.page .grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  main.page .grid.kpis .kpi { padding: 10px 12px; }
  main.page .grid.kpis .kpi .big { font-size: 22px; }
  main.page .grid.kpis .kpi .label, main.page .grid.kpis .kpi .sub { white-space: normal; overflow: visible; text-overflow: clip; }
  /* a banner's sentence takes the line, its links wrap under it (they were squeezed into narrow columns beside it) */
  .banner { flex-wrap: wrap; }
  /* a link at the end of a tab row (Inbound Planning: the to-dos link) scrolls with the tabs, on one line */
  .tabs > a { flex: none; white-space: nowrap; align-self: center; padding: 0 10px; }
  /* a button's long name wraps instead of pushing its row wider than the window (Settings: "Save and re-plan") */
  :where(.page, .drawer-body, .modal) .btn:not(table .btn) { max-width: 100%; white-space: normal; }
  /* a table drawn without a .table-wrap around it (a card's list) scrolls sideways in its own box too */
  :not(.table-wrap) > table.table { display: block; max-width: 100%; overflow-x: auto; }
  /* a row of cards side by side becomes a column */
  .grid.lists { grid-template-columns: minmax(0, 1fr); }
  /* the drawer and the dialogs take the whole width */
  .drawer { width: 100vw; }
  .drawer-head, .drawer-body { padding-left: 14px; padding-right: 14px; }
  .modal { width: calc(100vw - 16px); padding: 0 16px; top: 8vh; max-height: calc(92vh - 16px); }
  .toolbar .field > select { width: 100%; }
  input[type="search"] { min-width: 0; }
}
