/* VPSSOFT 2 — calm, dense office screens. Warm accent from the VP&S flame mark. */
/* Brand glow (owner, 27 Nov 2026: "all as you pick", theme-mockup/VPSSOFT-2-theme-mockup.pdf): the sign-in page's look on every screen.
   Paper with a faint glow in the three logo colours, white cards, black main buttons, grey boxes to type in, plain dotted text for what the
   program fills. --accent is the company open (VP&S orange today; Evergreen green and Nova blue when they join): links, lit rows, the lit icon. */
:root {
  /* ink-3 (small grey text) 5.6 : 1 on white; the company orange #b4570f 4.87 : 1 (owner, 22 Nov: keep it for text) */
  --bg: #f6f5f2; --panel: #ffffff; --panel-2: #f7f7f5; --ink: #111111; --ink-2: #3f3f3f; --ink-3: #686868;
  --line: #ececea; --line-2: #d6d6d1; --accent: #b4570f; --accent-ink: #ffffff; --accent-soft: #fdf0e6; --co: #e8792b;
  --ok: #1f7a4d; --ok-soft: #e6f4ec; --warn: #8a5a00; --warn-soft: #fdf1d8; --bad: #c62828; --bad-soft: #fdecea;
  --info: #1e4f8f; --info-soft: #eaf1fb; --side: #111111; --side-ink: #3f3f3f; --side-on: #f2f2f0;
  --ro: transparent; --accent-row: #fff3e8; --changed: #fbe3b0; --badrow: #fdecea;   /* locked box, current line, changed terms, line at fault */
  --fill: #f2f2f0; --btn: #111111; --btn-ink: #ffffff; --ring: #111111; --card-bg: rgba(255, 255, 255, .92);
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 10px 30px rgba(20, 20, 20, .06);
  --float: 0 30px 80px rgba(20, 20, 20, .14), 0 0 0 1px rgba(0, 0, 0, .04);
  --g1: rgba(0, 166, 81, .18); --g2: rgba(232, 121, 43, .20); --g3: rgba(59, 75, 176, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214; --panel: #1b1c1f; --panel-2: #212225; --ink: #f1f1f2; --ink-2: #cfcfd3; --ink-3: #a1a1a8;
    --line: #2c2d31; --line-2: #45464c; --accent: #f5a463; --accent-ink: #1b1209; --accent-soft: #3a2716; --co: #f08a3e;
    --ok: #5cc28d; --ok-soft: #15301f; --warn: #e5b14d; --warn-soft: #382c12; --bad: #f07a6e; --bad-soft: #3b1c1a;
    --info: #79aee8; --info-soft: #172a3f; --side: #f1f1f2; --side-ink: #cfcfd3; --side-on: #27282c;
    --ro: transparent; --accent-row: #2a2119; --changed: #4a3a14; --badrow: #4a211d;
    --fill: #27282c; --btn: #f1f1f2; --btn-ink: #111111; --ring: #f1f1f2; --card-bg: rgba(27, 28, 31, .92);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 10px 30px rgba(0, 0, 0, .35); --float: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
    --g1: rgba(0, 166, 81, .14); --g2: rgba(232, 121, 43, .14); --g3: rgba(70, 90, 200, .18);
    color-scheme: dark;
  }
}
/* the accent follows the company open (shell.js sets body[data-co]); only VP&S is in the program today */
body[data-co="eg"] { --accent: #0b7a3e; --accent-soft: #e3f4ea; --co: #00a651; --accent-row: #f1faf4; }
body[data-co="nova"] { --accent: #3b4bb0; --accent-soft: #e8eaf8; --co: #3b4bb0; --accent-row: #f3f4fc; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* a hidden box stays hidden even when its own style sets display */
html { background: radial-gradient(620px 420px at 6% -4%, var(--g1), transparent 70%), radial-gradient(700px 440px at 96% -6%, var(--g2), transparent 70%),
  radial-gradient(760px 480px at 62% 112%, var(--g3), transparent 70%), var(--bg); background-attachment: fixed; }   /* Brand glow: the faint glow stays put while a screen scrolls */
html, body { margin: 0; color: var(--ink); font: 14px/1.45 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body { background: transparent; min-height: 100vh; }
a { color: var(--accent); }
button, .btn, input, select, textarea { font: inherit; color: inherit; }
.loading { padding: 40px; color: var(--ink-3); }

/* ---- frame ---- */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; letter-spacing: .3px; color: #fff; }
.brand small { font-weight: 600; color: var(--accent); margin-left: 3px; }
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: #fff; font: 700 11px/1 var(--font); letter-spacing: .5px; }
.mark.big { width: 52px; height: 52px; font-size: 15px; border-radius: 12px; }
.side-logo { height: 44px; width: auto; display: block; }        /* the logo is tall: set the height, keep its shape */
.navgroup { margin-bottom: 14px; }
.navhead { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8e8576; padding: 6px 10px; }
.side a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--side-ink); text-decoration: none; }
.side a:hover { background: var(--side-on); color: #fff; }
.side a.on { background: var(--side-on); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.mainwrap { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 16px; padding: 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .ctx { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; }
.top .ctx span { color: var(--ink-2); }
.top .who { display: flex; gap: 14px; align-items: center; color: var(--ink-2); }
.top .who small { color: var(--ink-3); }
.menu-btn { display: none; }
/* Design C menu (specs/ui-menu-review.md, 23 Nov 2026): groups fold, a tab row for sibling screens, Go to, Help and your-name menus */
.navgroup { margin-bottom: 10px; }
.navgroup.plain { margin-bottom: 12px; }
button.navhead { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; min-height: 0;
  font: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8e8576; padding: 6px 10px; cursor: pointer; border-radius: 6px; }
button.navhead:hover { color: #fff; background: rgba(255, 255, 255, .06); }
button.navhead:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.navhead .chev { transition: transform .15s; font-size: 10px; }
.navhead[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.tabrow { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px 0 16px; }
.tabrow a { padding: 8px 14px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0; }
.tabrow a:hover { color: var(--ink); background: var(--panel-2); }
.tabrow a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.goto { position: relative; width: 300px; max-width: 34vw; }
.goto-input { width: 100%; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); color: var(--ink); font: inherit; }
.goto-input:focus { background: var(--panel); outline: 2px solid var(--accent); outline-offset: 0; }
.goto-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 4px; background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); max-height: 60vh; overflow-y: auto; min-width: 260px; }
.goto-list li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.goto-list li small { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.goto-list li.on, .goto-list li:hover { background: var(--accent-soft); }
.goto-list li.goto-empty { color: var(--ink-3); cursor: default; background: none; }
details.dd { position: relative; }
details.dd > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
details.dd > summary::-webkit-details-marker { display: none; }
details.dd > summary.who-btn { padding: 4px 8px; border-radius: 6px; color: var(--ink-2); }
details.dd > summary.who-btn:hover, details.dd[open] > summary.who-btn { background: var(--panel-2); color: var(--ink); }
details.dd > summary.help-btn { border: 1px solid var(--accent); border-radius: 6px; }
.who-ini { display: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; align-items: center; justify-content: center; }
.dd-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 4px; }
.dd-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; color: var(--ink); text-decoration: none; border-radius: 6px; font: inherit; cursor: pointer; min-height: 0; }
.dd-item:hover, .dd-item:focus-visible { background: var(--accent-soft); }
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hub-link { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.hub-link:hover, .hub-link:focus-visible { border-color: var(--accent); }
.hub-link b { color: var(--accent); }
.hub-link span { color: var(--ink-2); font-size: 13px; }
.hub-section h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 6px 0 8px; }
.hub-more > summary { cursor: pointer; color: var(--ink-2); margin: 4px 0 10px; }
main { padding: 20px 22px 60px; max-width: 1500px; width: 100%; }

/* ---- page ---- */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { font-size: 20px; margin: 0; flex: 1; min-width: 200px; letter-spacing: -.01em; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tools .show-sel { width: auto; }
.tools input[type=search] { width: 280px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card.scroll { overflow-x: auto; }
.card.narrow { max-width: 460px; }
.card h2 { font-size: 15px; margin: 0 0 8px; }
fieldset.card { min-width: 0; }
fieldset.card legend { font-weight: 700; padding: 0 6px; font-size: 13px; color: var(--ink-2); }
details.card summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
details.card[open] summary { margin-bottom: 10px; }
.muted { color: var(--ink-3); } .small { font-size: 12px; } .strong { font-weight: 700; }
.notice { background: var(--info-soft); color: var(--info); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.form-error { color: var(--bad); min-height: 1.2em; margin: 4px 0; }

/* ---- forms ---- */
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.fields.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field.wide { grid-column: span 2; } .field.span2 { grid-column: span 2; } .field.span3 { grid-column: span 3; }
.field .lab { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.field .req { color: var(--bad); }
.field .hint { color: var(--ink-3); font-size: 11.5px; }
.field.check { flex-direction: row; align-items: center; gap: 8px; padding-top: 18px; }
.field.check span { font-size: 13px; color: var(--ink-2); }
input, select, textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel); min-height: 34px; }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
/* locked boxes: grey with no edge, so the white boxes with an edge are the ones you can type in */
input:disabled, select:disabled, textarea:disabled { background: var(--ro); color: var(--ink-2); border-color: transparent; }
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.side a:focus-visible { outline-color: var(--accent); outline-offset: -2px; }
.fields.cols6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
input.unpicked { border: 2px solid var(--bad); background: var(--bad-soft); }
.msg-err, .field-err { color: var(--bad); font-size: 12px; font-weight: 600; }
.field.has-err input, .field.has-err select { border: 2px solid var(--bad); }
.row { display: flex; gap: 6px; }
.inline { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); white-space: nowrap; }
.inline input[type=date] { width: auto; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.mform { display: grid; gap: 0; }

/* ---- buttons ---- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; min-height: 34px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; text-decoration: none; font-weight: 600; color: var(--ink); white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--ink-3); }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.danger-text { color: var(--bad); }
button.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--accent); font-weight: 500; }
button.icon { padding: 2px 8px; min-height: 26px; border-color: transparent; background: none; color: var(--ink-3); }
button.icon:hover { color: var(--bad); border-color: var(--line); }
.big { min-height: 42px; font-size: 15px; }

/* ---- tables ---- */
table.grid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.grid th, .grid td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.grid th { font-size: 12px; color: var(--ink-2); font-weight: 600; background: var(--panel-2); position: sticky; top: 0; white-space: nowrap; }
.grid .n, .grid th.n { text-align: right; white-space: nowrap; }
.grid tbody tr.click { cursor: pointer; }
.grid tbody tr.click:hover { background: var(--accent-soft); }
.grid tbody tr.click:focus { background: var(--accent-row); outline: none; }
.grid tbody tr.click:focus td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.grid tfoot td { font-weight: 700; background: var(--panel-2); }
.grid td.empty { text-align: center; color: var(--ink-3); padding: 28px; }
.grid.compact th, .grid.compact td { padding: 5px 8px; }
.grid.lines td { padding: 4px 6px; }
.grid.lines td.name { min-width: 230px; }
.grid td.name small { display: block; color: var(--ink-3); font-size: 11.5px; }
/* line shading with a bar on the left: changed terms (yellow), line at fault (red), the line the cursor is on (orange) */
.grid tr.cur td { background: var(--accent-row); }
.grid tr.changed td { background: var(--changed); }
.grid tr.changed td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.grid tr.bad td { background: var(--badrow); }
.grid tr.bad td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.grid tr.cur td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.grid tr.cancelled td { color: var(--ink-3); text-decoration: line-through; }
.grid tr.warnrow td { color: var(--warn); }
.grid td.detail { color: var(--ink-2); font-size: 12.5px; max-width: 520px; }
input.cell { min-height: 28px; padding: 3px 6px; text-align: right; }
.w4 { width: 58px; } .w5 { width: 72px; } .w6 { width: 86px; }
.addcard { padding: 10px 12px; margin-top: -8px; position: relative; z-index: 2; }
.addline { max-width: 560px; }

/* ---- totals ---- */
.totals-box { margin: 0 0 14px auto; max-width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
.totals-box div { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.totals-box div span { color: var(--ink-2); }
.totals-box .grand { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 8px; font-size: 17px; }
.totals-box .grand span { color: var(--ink); font-weight: 600; }

/* ---- pills, tiles ---- */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--accent); }
.tile-title { color: var(--ink-2); font-size: 13px; }
.tile b { font-size: 26px; letter-spacing: -.02em; }
.tile small { color: var(--ink-3); }
dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--ink-2); } dl.kv dd { margin: 0; }

/* ---- picker ---- */
.picker-wrap { position: relative; }
.picker { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 30; background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14); max-height: 300px; overflow-y: auto; min-width: 280px; }
.picker.open { display: block; }
.picker .opt { padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; }
.picker .opt small { color: var(--ink-3); }
.picker .opt.active, .picker .opt:hover { background: var(--accent-soft); }

/* ---- dialogs, toasts ---- */
dialog.modal { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; width: min(560px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
dialog.modal::backdrop { background: rgba(20, 16, 10, .45); }
dialog.modal h3 { margin: 0 0 10px; font-size: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-error { font-weight: 600; margin: 10px 0 0; } .modal-error:empty { display: none; }
.confirm-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-2); }
.confirm-list .warnli { color: var(--warn); font-weight: 700; }
.ship-to { margin: 8px 0 0; }

/* ---- entry screens: status strip, error bar, key guide, totals bar ---- */
.status { display: flex; align-items: center; gap: 12px; border-radius: var(--radius); padding: 9px 14px; margin: 0 0 12px; }
.status b { font-size: 12px; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; background: var(--panel); white-space: nowrap; }
.st-draft, .st-warn { background: var(--warn-soft); color: var(--warn); } .st-final { background: var(--info-soft); color: var(--info); }
.st-ok { background: var(--ok-soft); color: var(--ok); } .st-bad { background: var(--bad-soft); color: var(--bad); }
.errbar { display: flex; align-items: center; gap: 12px; background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad); border-radius: var(--radius);
  padding: 8px 14px; margin: 0 0 12px; font-weight: 600; position: sticky; top: 60px; z-index: 4; }
.errbar button { margin-left: auto; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
kbd { font: 600 11px/1 var(--mono); padding: 2px 5px; border-radius: 4px; border: 1px solid currentColor; opacity: .85; margin: 0 2px; }
button kbd, .btn kbd { margin-left: 6px; }
.totbar { display: flex; align-items: center; gap: 20px; position: sticky; bottom: 0; z-index: 4; background: var(--side); color: #eee6d6; border-radius: var(--radius);
  padding: 8px 14px; margin-top: 4px; font-variant-numeric: tabular-nums; box-shadow: 0 -4px 14px rgba(0, 0, 0, .12); }
.totbar .tb-cells { display: flex; gap: 20px; flex-wrap: wrap; }
.totbar span { display: block; color: #b9b0a0; font-size: 11.5px; }
.totbar b { font-size: 15px; }
.totbar .net { margin-left: auto; text-align: right; } .totbar .net b { font-size: 19px; color: #fff; }

/* ---- document screens: the side menu folds away (☰ opens it) so the item grid fits ---- */
body.fold .app { grid-template-columns: 1fr; }
body.fold .side { position: fixed; left: 0; top: 0; z-index: 40; width: 240px; transform: translateX(-100%); transition: transform .2s; }
body.fold.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
body.fold .menu-btn { display: inline-flex; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(440px, calc(100vw - 36px)); }
.toast { padding: 10px 14px; border-radius: 8px; background: var(--ok); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); transition: opacity .4s; }
.toast.err { background: var(--bad); }
.toast.out { opacity: 0; }

/* ---- sign-in page: design A "Brand glow" (owner, 27 Nov 2026, from signin-redesign/VPSSOFT-2-sign-in-final-A.pdf) ----
   A soft glow mixed from the three logo colours (Evergreen green, VP&S orange, Nova blue) and one white card with the three logos on top.
   The card stays white in dark mode too, so the logos keep their true colours; only the glow behind it turns dark. */
.login { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px 40px;
  background: radial-gradient(520px 420px at 14% 28%, rgba(0, 166, 81, .42), transparent 70%), radial-gradient(560px 440px at 88% 22%, rgba(232, 121, 43, .45), transparent 70%),
    radial-gradient(620px 460px at 58% 108%, rgba(59, 75, 176, .42), transparent 70%), #f6f5f2; }
.login-col { width: min(460px, 100%); }
.login-card { color-scheme: light; background: #fff; color: #111; border-radius: 26px; padding: 26px 38px 28px; box-shadow: 0 30px 80px rgba(20, 20, 20, .14), 0 0 0 1px rgba(0, 0, 0, .04); }
.login-logos { display: flex; justify-content: center; align-items: center; gap: 22px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #eee; }
.login-logos img { display: block; height: 54px; width: auto; }
.login-logos img.vps { height: 62px; }
.login-logos i { width: 1px; height: 40px; background: #e4e4e4; }
.login-card h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; color: #111; }
.login-sub { margin: 4px 0 0; color: #6b6b6b; font-size: 15px; line-height: 1.45; }
.login-card .field { margin-top: 14px; gap: 7px; }
.login-card .field .lab { font-size: 13.5px; font-weight: 600; color: #222; }
.login-card .field .hint { color: #666; font-size: 13px; }
.login-labrow { display: flex; justify-content: space-between; align-items: baseline; }
.login-card input, .login-card select { min-height: 52px; border: 0; border-radius: 12px; background: #f2f2f0; color: #111; font-size: 18px; padding: 0 16px; }
.login-card input:focus, .login-card select:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px #111; }
.login-card input.bad { background: #fff; box-shadow: 0 0 0 2px #c62828; }
.login-card .login-code { font: 600 26px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .3em; text-align: center; }
.login-card .login-code::placeholder { font: 400 17px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0; color: #8a8a8a; }
.login-card button.login-link { min-height: 0; padding: 2px 0; border: 0; background: none; color: #111; font-size: 13.5px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.login-card button.login-go { width: 100%; min-height: 54px; margin-top: 20px; border: 0; border-radius: 12px; background: #111; color: #fff; font-size: 17px; font-weight: 700; }
.login-card button.login-go:hover { background: #000; }
.login-msg { margin-top: 14px; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.45; }
.login-msg.bad { background: #fdecea; color: #8f1d16; }
.login-msg.info { background: #eaf1fb; color: #23466f; }
.login-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 14px; border-radius: 12px; background: #f6f6f4; font-size: 14px; color: #444; }
.login-card .login-pick select { width: auto; min-height: 40px; font-size: 15px; background: #fff; box-shadow: inset 0 0 0 1px #ddd; padding: 0 10px; }
.login-who { margin: 14px 0 0; text-align: center; font-size: 13.5px; color: #666; }
.login-help { margin: 18px 0 0; text-align: center; font-size: 13px; color: #555; }
@media (max-width: 480px) {
  .login { place-items: start center; padding: 24px 16px 32px;
    background: radial-gradient(260px 240px at 0% 16%, rgba(0, 166, 81, .42), transparent 70%), radial-gradient(260px 240px at 100% 8%, rgba(232, 121, 43, .45), transparent 70%),
      radial-gradient(330px 270px at 60% 104%, rgba(59, 75, 176, .42), transparent 70%), #f6f5f2; }
  .login-card { padding: 22px 20px 20px; border-radius: 22px; }
  .login-logos img { height: 44px; } .login-logos img.vps { height: 50px; }
}
@media (prefers-color-scheme: dark) {
  .login { background: radial-gradient(520px 420px at 14% 28%, rgba(0, 166, 81, .30), transparent 70%), radial-gradient(560px 440px at 88% 22%, rgba(232, 121, 43, .30), transparent 70%),
    radial-gradient(620px 460px at 58% 108%, rgba(70, 90, 200, .36), transparent 70%), #111214; }
  .login-card { box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
  .login-help { color: #9a9aa0; }
}
@media (prefers-color-scheme: dark) and (max-width: 480px) {
  .login { background: radial-gradient(260px 240px at 0% 16%, rgba(0, 166, 81, .30), transparent 70%), radial-gradient(260px 240px at 100% 8%, rgba(232, 121, 43, .30), transparent 70%),
    radial-gradient(330px 270px at 60% 104%, rgba(70, 90, 200, .36), transparent 70%), #111214; }
}

/* ---- small screens ---- */
@media (max-width: 1250px) { .fields.cols6 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .fields.cols4, .fields.cols6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 40; width: 240px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .menu-btn { display: inline-flex; }
  .top { padding: 8px 16px; gap: 10px; } .top .who .who-name { display: none; } .top .who .who-ini { display: inline-flex; }
  .goto { flex: 1; min-width: 0; } .goto-input { width: 100%; min-width: 0; } .top .ctx span { display: none; }   /* design C: Go to stays on phones */
  .top .ctx { gap: 8px; } .top .ctx b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top .ctx span { white-space: nowrap; font-size: 12px; }
  .card.flush { overflow-x: auto; }   /* wide lists scroll sideways instead of being cut off */
  main { padding: 14px 16px 48px; }
  .fields.cols4, .fields.cols6, .fields { grid-template-columns: 1fr; }
  .totbar .tb-cells, .keys, button kbd, .btn kbd { display: none; }   /* phone: only the net amount, and no keyboard hints */
  .field.wide, .field.span2, .field.span3 { grid-column: auto; }
  .tools input[type=search] { width: 100%; }
  .totals-box { max-width: none; }
  /* lists become cards: each row wraps like a short line of text instead of a table too wide for the phone */
  .card.flush > .grid:not(.lines):not(.compact) thead { display: none; }
  .card.flush > .grid:not(.lines):not(.compact) :is(tbody, tfoot) tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .card.flush > .grid:not(.lines):not(.compact) :is(tbody, tfoot) td { border: 0; padding: 0; text-align: left; white-space: normal; background: none; }
  .card.flush > .grid:not(.lines):not(.compact) td.empty { width: 100%; text-align: center; padding: 20px 0; }
  .stock-grid td.item { flex-basis: 100%; font-weight: 600; order: -1; }
  .stock-grid td[data-label]::before { content: attr(data-label) ' '; color: var(--ink-3); font-size: 12px; font-weight: 400; }
  .doc-summary { display: block !important; }
}
/* the summary card at the top of a document shows only on phones */
.doc-summary { display: none; }
.doc-summary .big-value { font-size: 24px; font-weight: 700; margin: 2px 0; }

/* ---- two-step setup ---- */
ol.steps { padding-left: 20px; margin: 0 0 12px; display: grid; gap: 10px; }
.qr-box { display: block; width: fit-content; background: #fff; padding: 6px; border: 1px solid var(--line-2); border-radius: 8px; margin: 8px 0 4px; line-height: 0; }   /* two-step setup: dark on white in every theme */
.qr-box svg { display: block; max-width: 100%; height: auto; }
.secret { font: 600 18px/1.4 var(--mono); letter-spacing: 1px; background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: 6px; padding: 8px 10px; margin: 6px 0; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; }
.codes code { font: 600 15px var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; text-align: center; }
.field.wide, p.wide { grid-column: 1 / -1; }

/* ---- stock receipt ---- */
.totals-box .sums { display: block; padding: 0; }
.totals-box .paperrow { align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.totals-box .paperrow label { font-weight: 600; }
.totals-box .paperrow input { width: 150px; min-height: 32px; text-align: right; }
.totals-box .papercheck.ok span, .totals-box .papercheck.ok b { color: var(--ok); font-weight: 600; }
.totals-box .papercheck.bad b, .totals-box .papercheck.bad span { color: var(--bad); }
input.cell.warn-cell { border-color: var(--warn); background: var(--warn-soft); }

/* ---- loading line: shown at the top while a screen loads (after a short pause, so fast screens do not flicker) ---- */
body.loading-screen::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; opacity: 0;
  background: linear-gradient(90deg, transparent 0, var(--accent) 50%, transparent 100%) 0 0 / 40% 100% no-repeat;
  animation: loadline 1.1s linear .25s infinite, loadshow .01s linear .25s forwards; }
@keyframes loadline { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@keyframes loadshow { to { opacity: 1; } }

/* GSTIN lookup (specs/party-gstin-lookup.md): live line under the GSTIN, Fetch details, the details box, filled boxes, invoice status line */
.gst-row input { flex: 1; min-width: 0; }
.gst-row .gst-fetch { white-space: nowrap; }
.gst-live { font-size: 12px; color: var(--ink-3); min-height: 1.2em; }
.gst-live.ok, .gst-records.ok { color: var(--ok); }
.gst-live.bad, .gst-records.bad, .gst-line.bad { color: var(--bad); font-weight: 600; }
.gst-records.warn, .gst-line.warn { color: var(--warn); }
.gst-records { font-size: 12.5px; align-self: end; }
.gst-line { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
dialog.modal:has(.gst-box) { width: min(760px, calc(100vw - 32px)); }
.gst-box .notice { margin: 0 0 10px; }
.gst-table td:first-child, .gst-table th:first-child { width: 44px; text-align: center; }
.gst-table .tag { font-size: 11px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.gst-table .tag.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
input.from-gst, select.from-gst { background: var(--changed); }
.gst-scroll { overflow-x: auto; max-width: 100%; }   /* phone: the details table scrolls sideways inside the box */
.gst-box { min-width: 0; }

/* 4a Return GR register: the cartons line (booked, opened, not opened) */
.gr-cartons { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; }
.gr-cartons > div span { display: block; font-size: 12px; color: var(--ink-3); }
.gr-cartons > div b { font-size: 20px; font-variant-numeric: tabular-nums; }
.gr-cartons p { flex-basis: 100%; margin: 0; }

/* 4b Sales return: "Billed to party" turns amber when more copies come back than were billed and not yet credited */
td.warn-text { color: var(--warn); font-weight: 600; }
.gr-returns { flex-basis: 100%; margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; }
.gr-returns li { padding: 2px 0; }

/* 4c Credit note: the returns to tick, and the Return % line under the totals */
.cn-returns { display: grid; gap: 6px; }
.cn-ret { display: flex; gap: 10px; align-items: baseline; cursor: pointer; padding: 4px 2px; }
.cn-ret input { flex: none; }
.cn-returns ul { margin: 0; padding-left: 18px; }
.cn-title { font-size: 14px; margin: 0 0 8px; }
.cn-pct { margin: 8px 2px 0; color: var(--ink-3); }
.cn-pct.over { color: var(--bad); font-weight: 600; }

/* 4d Rate-difference credit note: the "add bills" bar and the one-% row */
.rn-add { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.rn-add > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rn-add select { width: auto; max-width: 360px; }
.rn-add input, .rn-allper input { width: auto; }
.rn-add > div > span { white-space: nowrap; }
.rn-allper { display: flex; gap: 6px; align-items: center; }

/* 5a Receipts: the party's balance line under the boxes, the bills box heading with its two buttons, wider money cells */
.rc-info { margin: 10px 2px 0; }
.rc-info a { font-weight: 600; }
.rc-billhead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 14px; }
.rc-billhead span { display: flex; flex-wrap: wrap; gap: 8px; }
.w8 { width: 110px; }
.rc-bills td:nth-child(2), .rc-bills td:nth-child(3) { white-space: nowrap; }

/* 5b Cheque register: the facts grid on a cheque's page, the papers ticks, the follow-up buttons, the bills ticks on a post-dated cheque */
.chq-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 20px; }
.chq-facts > div span { display: block; font-size: 12px; color: var(--ink-3); }
.chq-facts > div b { font-weight: 600; }
.chq-papers { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.chq-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chq-bills { display: grid; gap: 4px; }
.field.span4 { grid-column: 1 / -1; }   /* 5b: the "Checks" ticks take a whole row */

/* 5c Payments: the money line, return GRs, cheque layout table, leaf buttons in the cheque book */
.py-money { margin: 6px 2px 0; }
.bad-text { color: var(--bad); font-weight: 600; }
.warn-text { color: var(--warn); }
.py-grs { display: grid; gap: 4px; margin-top: 8px; }
.fields.cols5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .fields.cols5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.py-layout input { width: 80px; }
.py-layout td { vertical-align: middle; }
td.chq-acts { margin-top: 0; gap: 4px 10px; white-space: nowrap; }
td.chq-acts a.link { color: var(--accent); font-weight: 500; }

/* 5d Vouchers (contra and journal): the old grid — code, account name, narration, debit, credit, agent; the A/c balance line; bills boxes per party line */
.vc-grid .vc-codecell { min-width: 130px; }
.vc-grid .vc-code { width: 120px; }
.vc-grid .vc-narrcell { min-width: 280px; width: 40%; }
.vc-grid .vc-narr { width: 100%; }
.vc-grid select { max-width: 150px; }
.vc-grid td.name small { display: block; }
.vc-bal { margin: 8px 2px 0; }
.vc-ct-head { margin: 0 0 10px; }
.vc-boxes { display: grid; gap: 12px; }
.vc-note { display: block; }
.totbar.vc-off .net b { color: #ffb4a8; }
/* module 7 GST: GSTR-1 screen (specs/07-gst.md) */
.gst-info { margin: -4px 0 12px; }
.gst-checks { margin: 4px 0 10px; padding-left: 20px; }
.gst-checks li { margin: 3px 0; }
.gst-checks.bad li::marker { color: var(--bad); }
.gst-checks.warn li::marker { color: var(--warn); }
.gst-links { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; margin-left: 8px; }
.gst-ok { color: var(--ok); font-weight: 600; }
.gst-head { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px 6px; }
.gst-head h2 { margin: 0; }
.gst-sum td.name { min-width: 280px; }
.gst-sum td.name small { display: block; color: var(--ink-3); font-size: 11.5px; }
.gst-detail > td { background: var(--panel-2); padding: 8px 12px 14px; }
.gst-detail .grid { background: var(--panel); }
.gst-detail .grid td { white-space: nowrap; }
@media (max-width: 760px) { .gst-sum td[data-label]::before { content: attr(data-label) ' '; color: var(--ink-3); font-size: 12px; font-weight: 400; } }
.gst-proof { padding: 10px 16px; margin: 0; font-size: 13px; }
.gst-proof.ok { color: var(--ok); } .gst-proof.bad { color: var(--bad); font-weight: 600; }
.gst-file .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
button.danger-link { background: none; border: none; color: var(--bad); text-decoration: underline; cursor: pointer; padding: 6px 4px; }
@media print {
  .side, .top, .page-head .tools, .gst-file .actions, .gst-file .grid button, #toasts { display: none !important; }
  .app { display: block !important; } .card { box-shadow: none; break-inside: avoid; }
}
/* module 7 GST 7b: GSTR-2B matching */
.gst-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 4px; }
.gst-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.gst-tabs button.on { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.gst-tabhelp { padding: 0 16px; margin: 6px 0 8px; }
.gst-acts { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.gst-diffs { margin: 0; padding-left: 16px; color: var(--warn); font-size: 12.5px; }
/* 7b A–D (owner 23 Nov 2026): within margin, the All and IMS lists, the IMS choice on each bill */
.gst-within { display: block; color: var(--info); margin-top: 2px; }
.gst-tabs .gst-tab-gap { margin-left: 12px; }
.gst-tabs button .pill.info { margin-left: -2px; }
label.ims { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); }
label.ims select { font-size: 12px; padding: 1px 4px; min-height: 0; height: auto; }
label.ims.ims-reject select { border-color: var(--bad); color: var(--bad); }
label.ims.ims-pending select { border-color: var(--warn); color: var(--warn); }
label.ims.ims-accept select { border-color: var(--ok); color: var(--ok); }
.gst-all tfoot td { font-weight: 600; background: var(--panel-2); }
.gst-ims section { padding: 4px 0 10px; }
.gst-ims h3 { margin: 10px 16px 6px; font-size: 14px; }
.gst-ims h3.ims-reject { color: var(--bad); } .gst-ims h3.ims-pending { color: var(--warn); } .gst-ims h3.ims-accept { color: var(--ok); }
@media print {
  .gst-print-ims .gst-sum-card, .gst-print-ims .gst-tabs, .gst-print-ims .gst-info, .gst-print-ims .gst-tabhelp { display: none !important; }
  .gst-print-ims label.ims select { border: none; appearance: none; color: inherit; }
}
.gst-note { display: block; color: var(--ink-2); }
.gst-note i { color: var(--ink-3); }
.gst-entry small { display: block; color: var(--ink-3); }
.gst-scroll { overflow-x: auto; }
/* module 7 GST 7c: GSTR-3B sheet */
.gst-3b h3 { font-size: 13px; margin: 10px 0 4px; }
.gst-3b td.name { min-width: 300px; }
.gst-sub td { background: var(--panel-2); font-size: 12.5px; }
.gst-sub td.name { padding-left: 22px; color: var(--ink-2); }
.gst-src { font-size: 12px; color: var(--ink-3); }
.gst-grey { color: var(--ink-3); }

/* 5e Bank reconciliation: statement balance with its side, the lines' clearing dates, changed lines, the statement box */
.rb-pair { display: flex; gap: 6px; }
.rb-pair input { flex: 1; min-width: 0; }
.rb-lines .rb-date { width: 150px; }
.rb-lines tr.rb-changed td { background: var(--accent-soft); }
.rb-lines td.name small { display: block; }
.rb-box { max-width: 560px; }
.rb-box tr.strong td { font-weight: 700; }
.rb-pad { padding: 0 14px 12px; }
.ok-text { color: var(--ok, #1f7a4d); }

/* 5f Bills sent automatically: the line under a bill / credit note / receipt, Messages sent */
.msgline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: 13px; }
.msgline .msg-lab { font-weight: 600; color: var(--ink-2); }
.msgline .msg { padding: 1px 8px; border-radius: 999px; background: var(--panel-2); }
.msgline .msg.ok { background: var(--ok-soft); color: var(--ok); }
.msgline .msg.bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.msgline .msg.wait { background: var(--warn-soft); color: var(--warn); }
.msgline .msg.test { background: var(--accent-soft); color: var(--accent); }
.msgline .msg.off { color: var(--ink-3); }
.msgline button.small { margin-left: auto; }
.pill.test { background: var(--accent-soft); color: var(--accent); }
pre.msgtext { white-space: pre-wrap; font: inherit; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; max-width: 640px; }
.actions-cell { white-space: nowrap; }
.actions-cell > * + * { margin-left: 6px; }
.row.wrap { flex-wrap: wrap; gap: 8px; }
.row.wrap > select { width: auto; }
td.nw, .nw { white-space: nowrap; }
/* module 6 Books — 6a ledger and statement, day / cash / bank book */
.bk-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.bk-closing { text-align: right; } .bk-big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.grid td.nowrap { white-space: nowrap; } .grid td.c { text-align: center; color: var(--ink-3); }
.grid tr.bk-ob td { font-style: italic; color: var(--ink-2); }
.grid tr.bk-day td { background: var(--panel-2); font-weight: 700; }
.grid tr.bk-daytot td { font-weight: 600; border-bottom: 2px solid var(--line); }
.grid tr.bk-v1 td { border-top: 1px solid var(--line); }
.bk-ledger td.name { min-width: 260px; }
.bk-box { max-width: 520px; }
.grid td.name small.warn-text { color: var(--warn); }
.bk-scroll { overflow-x: auto; max-width: 100%; }
/* 6b trial balance */
.tb-grid tr.tb-g td { font-weight: 600; } .tb-grid tr.tb-l td.name { padding-left: 34px; }
.tb-open { min-width: 22px; padding: 0 4px; font-size: 13px; }
.card.tb-proof-ok { border-left: 4px solid var(--ok, #1f7a4d); } .card.tb-proof-bad { border-left: 4px solid var(--bad); }
.card.tb-proof-ok h2 { color: var(--ok, #1f7a4d); } .card.tb-proof-bad h2 { color: var(--bad); }
/* 6c outstanding */
.os-grid tr.os-b td { font-size: 12.5px; color: var(--ink-2); background: var(--panel-2); } .os-grid tr.os-b td.name { padding-left: 34px; }
.os-grid td.name { min-width: 230px; }
/* 6d interest */
.in-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.in-amt { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; } .grid tr.in-b1 td { border-top: 1px solid var(--line); }
.in-grid td { white-space: nowrap; }
/* 6e trading and P&L */
.tr-h { padding: 12px 14px 4px; } .tr-grid { display: grid; grid-template-columns: 1fr 1fr; } .tr-grid > table + table { border-left: 1px solid var(--line); }
.tr-side tr.tr-res td { font-weight: 700; } .tr-side td small { display: block; }
@media (max-width: 900px) { .tr-grid { grid-template-columns: 1fr; } .tr-grid > table + table { border-left: 0; border-top: 2px solid var(--line); } }
.card.tr-sum h2 { color: var(--ink); } .card.tr-sum h2.tr-loss { color: var(--bad); }
/* 6f balance sheet */
.bs-side tr.bs-h td { font-weight: 700; background: var(--panel-2); } .bs-side tr.bs-s td:first-child { padding-left: 18px; }
.bs-side tr.bs-l td { font-size: 12.5px; color: var(--ink-2); } .bs-side tr.bs-l td:first-child { padding-left: 46px; }

/* module 10 reports (specs/10-reports.md): filters, quick dates, report tables with totals, not-locked rows, the check line */
.rep-filters .rep-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-filters .rep-quick button { min-height: 34px; }
.rep-f { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.rep-card { margin-top: 14px; overflow-x: auto; }
.rep-h { font-size: 14px; margin: 0; padding: 12px 16px 8px; }
.rep-grid td { white-space: nowrap; }
.rep-grid td.rc-party, .rep-grid td.rc-transport { white-space: normal; min-width: 160px; }
.rep-grid tr.rep-open td { color: var(--ink-2); font-style: italic; }
.rep-grid tr.rep-short td { color: var(--warn); font-weight: 600; }   /* 10b pending orders: an item short of stock */
.rep-hint { grid-column: 1 / -1; margin: 0; }
.rep-grid tr.rep-sub td { background: var(--panel-2); font-weight: 600; }
.rep-grid tr.rep-tot td { font-weight: 700; background: var(--panel-2); border-top: 2px solid var(--line-2); }
.rep-cancelled { margin-top: 14px; } .rep-cancelled ul { margin: 6px 0 0; padding-left: 18px; }
.rep-proof { font-size: 12.5px; margin: 10px 2px; } .rep-proof.ok { color: var(--ok); } .rep-proof.bad { color: var(--bad); font-weight: 600; }
@media (max-width: 760px) {
  .rep-grid td[data-label]::before { content: attr(data-label) ' '; color: var(--ink-3); font-size: 12px; font-weight: 400; }
  .rep-grid td.rc-party { flex-basis: 100%; font-weight: 600; order: -1; }
}
/* module 10, 10g owner dashboard: four cards, phone friendly */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.dash-card h2 { margin-bottom: 10px; } .dash-card h3 { font-size: 13px; margin: 12px 0 4px; color: var(--ink-2); }
.dash-wide { grid-column: 1 / -1; }
.dash-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 24px; }
.dash-kv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.dash-kv .dash-l { flex: 1 1 60%; color: var(--ink-2); } .dash-kv .dash-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-n { color: var(--ink-3); font-size: 12px; } .dash-kv .dash-n { flex-basis: 100%; text-align: right; }
.dash-list { margin: 0; padding-left: 20px; } .dash-list li { padding: 3px 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.dash-list .dash-r { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-up { color: var(--ok); font-weight: 600; } .dash-down { color: var(--bad); font-weight: 600; }
@media (max-width: 760px) {   /* 10g on a phone: each period of the sales table is a small card */
  .dash-t thead { display: none; }
  .dash-t tbody tr { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .dash-t td { border: 0; padding: 0; text-align: left; white-space: normal; }
  .dash-t td:first-child { flex-basis: 100%; font-weight: 600; }
  .dash-t td[data-label]::before { content: attr(data-label) ' '; color: var(--ink-3); font-size: 12px; font-weight: 400; }
}

/* 12b Support desk: the Help button, the ticket box with its pictures, tabs, the ticket page */
.help-btn { min-height: 30px; padding: 4px 12px; font-weight: 600; border-color: var(--accent); color: var(--accent); background: var(--panel); }
.help-btn:hover { background: var(--accent-soft); }
dialog.modal.ticket-box { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.ticket-box h4, .card h4, .modal-body h4 { margin: 14px 0 6px; font-size: 13px; color: var(--ink-2); }
.ticket-box .right { grid-column: 1 / -1; text-align: right; margin-top: -8px; }
.ticket-box .fields > .wide:not(.field) { grid-column: 1 / -1; }
.ticket-box .modal-actions { position: sticky; bottom: -18px; background: var(--panel); padding: 10px 0 2px; margin-bottom: -2px; border-top: 1px solid var(--line); }
.warn-line { margin: 12px 0 0; font-weight: 600; color: var(--warn); }
.attached { margin-top: 12px; }
.attached summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.ctx-table th { width: 220px; white-space: normal; position: static; }
ul.plain { list-style: none; margin: 0; padding: 0; } ul.plain li + li { margin-top: 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.pic-tray { display: grid; gap: 6px; }
.pic-list { display: grid; gap: 12px; }
.pic-item { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--panel-2); }
.pic-view { width: 100%; height: auto; max-height: 340px; object-fit: contain; cursor: crosshair; touch-action: none; background: #fff; border-radius: 4px; }
.pic-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pic-thumb img { display: block; max-width: 220px; max-height: 150px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pic-removed { padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 6px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; border-bottom: 1px solid var(--line); }
.tabs .tab { padding: 7px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; font-weight: 600; }
.tabs .tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--panel-2); font-size: 12px; color: var(--ink-2); }
.grid tr.urgentrow td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.ticket-head p { margin: 6px 0; }
.ticket-text, .line-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-text { margin-top: 8px; padding: 10px 12px; background: var(--panel-2); border-radius: 6px; }
.conv .line { padding: 8px 10px; border-left: 3px solid var(--line-2); margin: 8px 0; }
.conv .line.reply { border-left-color: var(--accent); }
.conv .line.note { background: var(--warn-soft); border-left-color: var(--warn); }
.conv .line.status, .conv .line.program { color: var(--ink-3); font-size: 12.5px; border-left-color: var(--line); padding: 2px 10px; }
.conv .line.status .line-head, .conv .line.program .line-head { display: none; }
.line-head { color: var(--ink-2); margin-bottom: 2px; }
.note-card { border-color: var(--warn); }
.desk-card textarea { margin-bottom: 6px; }
.desk-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.desk-actions .inline select, .desk-actions .inline input { width: auto; }
.desk-actions .inline input { min-width: 160px; }
.actions-left { justify-content: flex-start; margin-top: 8px; align-items: center; }
.actions-left .inline select, .actions-left .inline input { width: auto; }
.toast-act { margin-left: 10px; color: #fff; text-decoration: underline; font-weight: 700; }
@media (max-width: 700px) { .ctx-table th { width: auto; } .pic-thumb img { max-width: 140px; } }
/* 12b-2: the countdown, the Help count, Away */
.due { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.due-ok { background: var(--ok-soft); color: var(--ok); }
.due-soon { background: var(--warn-soft); color: var(--warn); }
.due-late { background: var(--bad-soft); color: var(--bad); }
.help-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.help-count.late { background: var(--bad); color: #fff; }
.tabs .count.bad { background: var(--bad); color: #fff; }
.away-card { align-items: center; gap: 10px 14px; margin-top: 14px; }
.away-card input[type=date] { width: auto; }
.people input { min-width: 120px; } .people input.w8 { width: 120px; } .people select { width: auto; }
/* 12b-3: the special kinds */
.settled { color: var(--ok); }
.needs { padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 6px; }
.access-row { grid-column: 1 / -1; }
.access-row[hidden] { display: none; }
/* 12b-4: help notes */
dialog.modal.help-panel { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.help-panel input[type=search] { margin-bottom: 10px; }
.note-list h4 { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.note { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 6px 0; background: var(--panel); }
.note summary { cursor: pointer; font-weight: 600; }
.note[open] summary { margin-bottom: 6px; }
.note-answer { white-space: pre-wrap; color: var(--ink-2); margin-bottom: 6px; }
.modal-actions.still { align-items: center; position: sticky; bottom: -18px; background: var(--panel); padding: 10px 0 2px; border-top: 1px solid var(--line); }
.modal-actions.still .muted { margin-right: auto; }
.keep-note { margin-left: 10px; font-size: 12px; }
/* 12b-5: the support report; the owner's Remove under a picture */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin: 14px 0; }
.report-grid .card { margin: 0; }
.pic-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
/* 14a book from 2B (specs/14-gst-quick-wins.md): the "From GSTR-2B" box on a new purchase, and the GSTR-2B line on a saved one */
.b2b-box { border-left: 4px solid var(--info); }
.b2b-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.b2b-head h3 { margin: 0; }
.b2b-sup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }
.b2b-rates { max-width: 860px; }
.b2b-pick { width: 100%; min-width: 220px; }
.b2b-cmp { margin-top: 8px; }
.ok-text { color: var(--ok); font-weight: 600; } .warn-text { color: var(--warn); font-weight: 600; }
.b2b-line { margin: 6px 0; padding: 6px 10px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.b2b-line.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.b2b-line.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.b2b-line.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.b2b-line small { display: block; }
/* 14b scan the e-invoice QR: the camera box, the QR text, the card on a new purchase */
.qr-scan { display: grid; gap: 8px; min-width: min(460px, 80vw); }
.qr-video { width: 100%; max-width: 460px; aspect-ratio: 4 / 3; object-fit: cover; background: #000; border-radius: var(--radius); }
.qr-text { width: 100%; font: 11px/1.3 var(--mono); word-break: break-all; }
.qr-card { border-left: 4px solid var(--ok); }
/* 14c GST notice register: papers beside reminders and links */
.gn-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.gn-grid > div > .card { margin-top: 0; }
.gn-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gn-files { overflow-x: auto; }
.gn-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 1000px) { .gn-grid { grid-template-columns: minmax(0, 1fr); } }
/* 14a on a phone: each 2B rate row stacks (figures with their names, the item box on its own line), so the page never scrolls sideways */
@media (max-width: 760px) {
  .b2b-rates thead { display: none; }
  .b2b-rates tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .b2b-rates td { border: 0; padding: 0; text-align: left; }
  .b2b-rates td:last-child { grid-column: 1 / -1; padding-top: 4px; }
  .b2b-rates td[data-label]::before { content: attr(data-label) ' '; color: var(--ink-3); font-size: 12px; font-weight: 400; }
  .b2b-pick { min-width: 0; }
}

/* 15a stock-take: a counted line is shaded; on a phone each item is a card with big boxes (specs/15-stock-more.md) */
.count-grid tr.done td { background: var(--ok-soft); }
@media (max-width: 760px) {
  .count-grid thead, .count-grid .hide-phone, .count-keys { display: none; }
  .count-grid tbody tr { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 4px 10px; padding: 12px; border-bottom: 1px solid var(--line); align-items: end; }
  .count-grid td { border: 0; padding: 0; background: none; text-align: left; }
  .count-grid td.name { grid-column: 1 / -1; font-size: 15px; font-weight: 600; }
  .count-grid td[data-label]::before { content: attr(data-label); display: block; color: var(--ink-3); font-size: 12px; font-weight: 400; }
  .count-grid input.cell { width: 100%; font-size: 20px; padding: 10px 8px; }
  .count-grid tr.done { background: var(--ok-soft); }
}
/* 15c pick list: one card per bill, a big tick box per line (phone friendly) */
.pick-bill { margin-bottom: 12px; }
.pick-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pick-head button { margin-left: auto; } .pick-head button + button { margin-left: 0; }
.pick-lines td.pick-tick { width: 44px; } .pick-box { width: 26px; height: 26px; }
.pick-lines tr.done td, .lines tr.done td { background: var(--ok-soft); }
/* module 8, 8a To approve (specs/08-approvals.md): cards that read on a phone; Approve / Reject stay in reach at the bottom */
.appr-list { display: grid; gap: 10px; max-width: 820px; margin-bottom: 12px; }
.appr-card { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.appr-card:hover { border-color: var(--accent); }
.appr-card.mine { border-left: 4px solid var(--info); }
.appr-what { font-weight: 600; } .appr-amt { font-weight: 700; text-align: right; white-space: nowrap; }
.appr-date { text-align: right; white-space: nowrap; }
.appr-note, .appr-by { grid-column: 1 / -1; color: var(--ink-3); font-size: 13px; }
.appr-item { max-width: 820px; }
.appr-head .big-value { font-size: 26px; font-weight: 700; margin: 2px 0; }
.appr-head .pill { margin-top: 6px; }
.appr-warn p { margin: 2px 0; color: var(--warn); font-weight: 500; }
.appr-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.appr-actions button { min-width: 140px; min-height: 44px; }
@media (max-width: 760px) {
  dl.kv.appr-kv { grid-template-columns: 1fr; gap: 0 0; } dl.kv.appr-kv dt { font-size: 12px; margin-top: 6px; }
  .appr-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; margin: 0; border-top: 1px solid var(--line); }
  .appr-actions button { flex: 1; min-width: 0; }
}
/* module 8, 8b: a request's line on a bill or order; the Asked tab's buttons */
.appr-req-line { margin-bottom: 10px; }
.appr-acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.appr-acts:empty { display: none; }
/* module 8, 8c / 8d: alerts, the daily summary, the settings ticks */
.appr-ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 16px; margin-top: 8px; }
.msg-preview { background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; }
ul.plain { margin: 0; padding-left: 18px; }
@media print { .appr-sum { grid-template-columns: 1fr 1fr; } }

/* 17a rights per person (Settings → Users): the ticks under the role */
dialog.modal:has(.rights-box) { width: min(980px, calc(100vw - 32px)); }
.rights-box { max-height: calc(100vh - 180px); overflow-y: auto; padding-right: 4px; }
.rights-head { display: flex; align-items: center; gap: 8px; margin: 16px 0 2px; font-size: 14px; }
.rights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 8px 14px; margin-top: 6px; }
.rights-area { border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px 8px; margin: 0; min-width: 0; }
.rights-area legend { font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 0 4px; }
.rights-job { display: grid; grid-template-columns: auto 2.1em minmax(0, 1fr) auto auto; align-items: center; gap: 6px; font-size: 13px; padding: 2px 0; }
.rights-job input { width: auto; min-height: 0; margin: 0; }
.rights-job input:disabled + .code, .rights-job input:disabled ~ span { opacity: .75; }
.rights-job .code { font-weight: 700; color: var(--ink-2); }
.rights-job .risk { font-size: 11px; color: var(--ink-3); }
.rights-job .risk.high { color: var(--bad); }
.rights-job .star { color: var(--warn); }
@media (max-width: 700px) { .rights-grid { grid-template-columns: 1fr; } }
/* 17b History box */
dialog.modal:has(.history-box) { width: min(980px, calc(100vw - 32px)); }
.history-box { max-height: calc(100vh - 180px); overflow-y: auto; }
.history-top { display: flex; align-items: flex-start; gap: 10px; } .history-top .notice { flex: 1; margin: 0 0 10px; }
.history-box td.detail { white-space: normal; } .history-box td.nowrap { white-space: nowrap; }
@media print {
  body.print-history > :not(dialog) { display: none !important; }
  body.print-history dialog.modal { position: static; box-shadow: none; border: 0; width: auto; }
  body.print-history .history-box { max-height: none; overflow: visible; }
  body.print-history .modal-actions, body.print-history .history-top button { display: none; }
}

/* 18 counter sale (specs/18-counter-sale.md): quick sale at an office desk, day end */
.qs-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 14px; align-items: start; }
@media (max-width: 1200px) { .qs-grid { grid-template-columns: minmax(0, 1fr); } }
input.scan { font-size: 1.15rem; padding: 10px 12px; }
.qs-total { font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.qs-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.qs-modes .mode { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font-weight: 600; }
.qs-modes .mode.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.qs-pay { margin: 6px 0; }
.qs-change { font-size: 1.25rem; font-weight: 700; color: var(--ok); margin-top: 6px; min-height: 1.4em; }
.qs-change.bad { color: var(--bad); }
.qs-qr { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.qs-qr svg { width: 180px; height: 180px; }
input.big-input { font-size: 1.3rem; }
.qs-done { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border-left: 4px solid var(--ok); }
.btn.big { font-size: 1.05rem; padding: 10px 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
button.linkish { background: none; border: 0; padding: 4px 0; color: var(--accent); text-decoration: underline; cursor: pointer; min-height: 0; }
table.notes input { width: 6em; }
td.bad { color: var(--bad); font-weight: 600; }
tr.warn td { background: var(--warn-soft); }
.checkcode { font: 700 1.3rem/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.05em; text-align: center; }
small.bad { color: var(--bad); font-weight: 600; display: block; }

/* 9a sample shelves: their stock columns and hints in a lighter colour */
.grid th.soft, .grid td.soft, tr.soft td, small.soft { color: var(--ink-3); }
/* spec 22a (26 Nov 2026): pilot mode — the strip above every screen (the server says so; it cannot be switched on a screen). It stays at the top
   while the screen scrolls; the full-height and sticky parts of the page move down by its height so nothing hides under it or pushes it away. */
body.pilot { --pilot-h: 28px; }
.pilot-strip { position: sticky; top: 0; z-index: 60; height: var(--pilot-h, 28px); box-sizing: border-box; padding: 0 12px; line-height: var(--pilot-h, 28px);
  background: #b00020; color: #fff; text-align: center; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pilot-strip b { letter-spacing: 1px; margin-right: 6px; }
body.pilot .app, body.pilot .login { min-height: calc(100vh - var(--pilot-h)); }
body.pilot .side { top: var(--pilot-h); height: calc(100vh - var(--pilot-h)); }
body.pilot .top { top: var(--pilot-h); }
body.pilot .errbar { top: calc(60px + var(--pilot-h)); }
body.pilot.fold .side { top: var(--pilot-h); height: calc(100vh - var(--pilot-h)); }
@media print { .pilot-strip { position: static; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }   /* a screen printed with Ctrl+P keeps it */

/* ======================================================================================================================================
   Brand glow, the whole program (owner, 27 Nov 2026: "all as you pick"; theme-mockup/VPSSOFT-2-theme-mockup.pdf). The sign-in page's look on
   every screen: the menu a floating white card with the three logos, a top bar on the glow, white cards with soft shadows, black main buttons,
   grey boxes to type in (44 px; 52 px on a phone), plain dotted text for what the program fills, status as coloured words. Only the look:
   no screen, field, key or message changes. Written last so it sits over the older rules above; the colours come from :root.
   ====================================================================================================================================== */
/* ---- the frame: the menu card ---- */
.app { grid-template-columns: 260px minmax(0, 1fr); }
.side { position: sticky; top: 12px; height: calc(100vh - 24px); width: 236px; margin: 12px 0 12px 12px; padding: 14px 12px 10px; overflow: hidden;
  display: flex; flex-direction: column; background: var(--card-bg); color: var(--ink-2); border-radius: 22px; box-shadow: var(--float);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.pilot .side { top: calc(var(--pilot-h) + 12px); height: calc(100vh - var(--pilot-h) - 24px); }
.side .brand { display: block; padding: 0; margin: 0 0 4px; color: inherit; }
.side-logos { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 4px 0 12px; margin: 0 4px 8px; border-bottom: 1px solid var(--line); }
.side-logos img { display: block; height: 34px; width: auto; } .side-logos img.vps { height: 39px; }
.side-logos i { width: 1px; height: 28px; background: var(--line-2); }
.appname { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: var(--ink-3); text-align: center; margin: 0 0 6px; }
.rail-mark, .rail-open { display: none; }
.navlist { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.side a { display: flex; align-items: center; gap: 11px; min-height: 36px; padding: 0 11px; border-radius: 11px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.side a .ico { color: var(--ink-3); }
.side a:hover { background: var(--side-on); color: var(--ink); }
.side a.on { background: var(--btn); color: var(--btn-ink); font-weight: 650; box-shadow: none; }
.side a.on .ico { color: var(--co); }
.side a:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.navgroup, .navgroup.plain { margin-bottom: 4px; }
button.navhead { min-height: 30px; margin-top: 6px; padding: 0 11px; color: var(--ink-3); font-size: 11px; font-weight: 700; letter-spacing: .12em; border: 0; }
button.navhead:hover { color: var(--ink); background: var(--side-on); }
.side-foot { display: flex; align-items: center; gap: 8px; margin: 6px 4px 0; padding: 10px 7px 4px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.side-foot b { color: var(--ink-2); }
.ico { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; }
.ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- the top bar on the glow: company, year, Go to, Help, you ---- */
.top { min-height: 70px; padding: 12px 24px 10px 14px; gap: 16px; border-bottom: 0; background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.top .ctx { gap: 12px; }
.top .ctx { min-width: 0; }
.top .ctx b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16.5px; letter-spacing: -.01em; color: var(--ink); }
.navhead .chev { font-size: 13px; }
.co-logo { display: block; flex: none; height: 36px; width: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.top .ctx span.chip { color: var(--ink-2); }
.chip .ico, .chip .ico svg { width: 14px; height: 14px; }
.goto { display: flex; align-items: center; gap: 10px; width: 440px; max-width: 34vw; height: 46px; padding: 0 8px 0 14px; border-radius: 14px; background: var(--panel);
  box-shadow: var(--shadow), 0 0 0 1px var(--line); color: var(--ink-3); }
.goto:focus-within { box-shadow: 0 0 0 2px var(--ring); }
.goto .goto-input, .goto .goto-input:focus { min-height: 40px; padding: 0; border: 0; outline: 0; box-shadow: none; background: transparent; font-size: 15px; }
.goto-kbd { margin: 0; padding: 5px 7px; border: 0; border-radius: 7px; background: var(--fill); color: var(--ink-3); font: 600 11.5px/1 var(--mono); opacity: 1; white-space: nowrap; }
.goto-list { top: calc(100% + 6px); padding: 6px; border: 0; border-radius: 16px; box-shadow: var(--float); }
.goto-list li { padding: 10px 12px; border-radius: 10px; }
.top .who { gap: 10px; }
details.dd > summary.help-btn { min-height: 42px; padding: 0 14px; gap: 8px; border: 0; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-weight: 600; }
details.dd > summary.help-btn:hover { background: var(--panel); box-shadow: inset 0 0 0 1px var(--ink-3); }
.help-count { background: var(--bad); color: #fff; }
details.dd > summary.who-btn { gap: 10px; padding: 4px 10px 4px 4px; border-radius: 99px; color: var(--ink); }
.who-ini { display: inline-flex; width: 38px; height: 38px; font-size: 15px; font-weight: 750; background: var(--accent-soft); color: var(--accent); }
.who-name { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; text-align: left; }
.who-name small { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.dd-pop { padding: 6px; border: 0; border-radius: 16px; box-shadow: var(--float); }
.dd-item { padding: 10px 12px; border-radius: 10px; }
.menu-btn { width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
main { padding: 4px 24px 80px 14px; }

/* ---- page, cards, notes ---- */
.page-head { margin: 4px 0 16px; align-items: flex-end; gap: 16px; }
.page-head h1 { font-size: 30px; line-height: 1.12; letter-spacing: -.025em; font-weight: 750; }
.home-sub { margin: -10px 0 14px; color: var(--ink-3); font-size: 15px; }
.home-sub a { color: var(--ink); font-weight: 700; }
.tools { gap: 10px; }
.card { border: 0; border-radius: 20px; box-shadow: var(--shadow); padding: 18px 20px; }
.card.flush { padding: 0; }
.card h2 { font-size: 17px; letter-spacing: -.015em; margin-bottom: 10px; }
.notice { border-radius: 16px; padding: 13px 16px; line-height: 1.45; }
details.card summary { color: var(--ink); }
.mform { counter-reset: sect; }
.mform fieldset.card legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -.015em; }
.mform fieldset.card legend::before { counter-increment: sect; content: counter(sect); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px;
  border-radius: 50%; background: var(--fill); color: var(--ink-2); font-size: 12.5px; font-weight: 750; vertical-align: 1px; }
.mform fieldset.card legend + * { clear: both; }
.hub-link { border: 0; border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px; }
.hub-link:hover, .hub-link:focus-visible { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line-2); }
.hub-link b { color: var(--ink); font-size: 15px; } .hub-link span { color: var(--ink-3); }
.hub-section h2 { font-size: 12px; font-weight: 750; letter-spacing: .12em; }
.msgline, .appr-card, .pic-item, .note { border: 0; border-radius: 16px; box-shadow: var(--shadow); }
.appr-card:hover { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line-2); }

/* ---- boxes: grey to type in, a black ring while typing, plain dotted text when the program fills it ---- */
.fields { gap: 14px 16px; }
.field { gap: 6px; }
.field .lab { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12px; }
input, select, textarea { min-height: 44px; padding: 8px 13px; border: 0; border-radius: 11px; background: var(--fill); color: var(--ink); font-size: 15px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: transparent; background: var(--panel); box-shadow: 0 0 0 2px var(--ring); }
input:disabled, select:disabled, textarea:disabled { padding-left: 2px; border: 0; border-bottom: 1.5px dotted var(--line-2); border-radius: 0; background: transparent;
  color: var(--ink); -webkit-text-fill-color: var(--ink); font-weight: 550; opacity: 1; }
input[type=checkbox], input[type=radio], input[type=checkbox]:disabled, input[type=radio]:disabled { width: 18px; height: 18px; min-height: 0; padding: 0; border: 0;
  background: none; box-shadow: none; accent-color: var(--btn); }
input.cell { min-height: 34px; padding: 4px 9px; border-radius: 9px; font-size: 14px; }
input.unpicked, .field.has-err input, .field.has-err select { border: 0; background: var(--bad-soft); box-shadow: 0 0 0 2px var(--bad); }
input.cell.warn-cell { border: 0; box-shadow: 0 0 0 2px var(--warn); }
.picker { border: 0; border-radius: 14px; box-shadow: var(--float); padding: 4px; }
.picker .opt { border-radius: 10px; padding: 9px 12px; }

/* ---- buttons: black for the main step, white with an edge for the rest ---- */
button, .btn { min-height: 40px; padding: 0 16px; gap: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--ink); font-size: 14.5px; font-weight: 650; }
.page-head .tools button, .page-head .tools .btn, .actions button, .actions .btn, .modal-actions button, .modal-actions .btn { min-height: 44px; }
button:hover, .btn:hover { border-color: var(--ink-3); }
.primary, .btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.primary:hover { filter: none; border-color: var(--btn); background: var(--btn); opacity: .9; }
.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.grid button, .grid .btn { min-height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; }
.big, .btn.big { min-height: 52px; font-size: 16px; }
button kbd, .btn kbd { margin-left: 4px; padding: 4px 6px; border: 0; border-radius: 6px; background: rgba(127, 127, 127, .18); font: 600 11px/1 var(--mono); opacity: 1; }
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---- lists and grids ---- */
table.grid { border-collapse: separate; border-spacing: 0; }
.grid th { padding: 11px 12px; background: var(--panel); color: var(--ink-3); font-size: 12px; font-weight: 650; border-bottom: 1px solid var(--line); }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.card.flush > .grid th:first-child, .card.flush > .grid td:first-child { padding-left: 20px; }
.card.flush > .grid th:last-child, .card.flush > .grid td:last-child { padding-right: 20px; }
.card.flush > .grid > tbody > tr:last-child > td { border-bottom: 0; }
.grid tbody tr.click:hover { background: var(--panel-2); }
.grid tbody tr.click:focus { background: var(--accent-row); }
.grid tbody tr.click:focus td:first-child, .grid tr.cur td:first-child { box-shadow: inset 3px 0 0 var(--co); }
.grid tfoot td { background: var(--panel-2); border-top: 1px solid var(--line-2); border-bottom: 0; }
.grid.compact th, .grid.compact td { padding: 8px 10px; }
.grid.lines th, .grid.lines td { padding: 5px 5px; }
.card.flush > .grid.lines th:first-child, .card.flush > .grid.lines td:first-child { padding-left: 12px; }
.card.flush > .grid.lines th:last-child, .card.flush > .grid.lines td:last-child { padding-right: 8px; }
.grid.lines td.name { min-width: 210px; }
.grid.lines input.cell { padding: 4px 8px; font-size: 13.5px; }
.grid td.empty { padding: 44px 20px; font-size: 15px; color: var(--ink-3); }
.rep-grid th, .rep-grid td { padding: 8px 8px; font-size: 13px; }   /* reports: many columns, so a little tighter */
.listbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.listbar input[type=search] { width: 380px; max-width: 100%; padding-left: 40px;
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center / 18px; }
.listbar input[type=search]:focus { background-color: var(--panel); }
.listbar .inline { color: var(--ink-2); font-size: 14px; gap: 9px; }
.listbar .inline input[type=date], .listbar select { width: auto; }
.radios { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 2px; }   /* a choice of two or three, one per line, its note under them */
.radios .inline { white-space: normal; gap: 9px; }
.tabrow { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 16px; border: 0; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.tabrow a { display: flex; align-items: center; min-height: 36px; padding: 0 16px; margin: 0; border: 0; border-radius: 10px; color: var(--ink-3); font-weight: 600; }
.tabrow a:hover { background: var(--panel-2); color: var(--ink); }
.tabrow a.on, .tabrow a.on:hover { background: var(--btn); color: var(--btn-ink); }

/* ---- status words, strips, the error bar, toasts, the confirm box ---- */
.pill { padding: 3px 10px; border: 0; background: var(--fill); color: var(--ink-2); font-size: 12.5px; font-weight: 650; }
.status { min-height: 54px; padding: 8px 16px; gap: 14px; border-radius: 16px; color: var(--ink-2); }
.status b { padding: 0; background: none; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; }
.st-draft b, .st-warn b { color: var(--warn); } .st-final b { color: var(--info); } .st-ok b { color: var(--ok); } .st-bad b { color: var(--bad); }
.errbar { min-height: 52px; padding: 8px 10px 8px 16px; border: 0; border-radius: 16px; top: 78px; }
body.pilot .errbar { top: calc(78px + var(--pilot-h)); }
#toasts { right: 22px; bottom: 22px; }
body:has(.totbar) #toasts { bottom: 104px; }   /* above a document's black totals bar, not on it */
.toast { padding: 14px 18px; border-radius: 14px; background: #111; color: #fff; font-size: 14.5px; box-shadow: 0 20px 50px rgba(0, 0, 0, .28); }
.toast::before { content: "✓"; margin-right: 10px; color: #5cc28d; font-weight: 800; }
.toast.err { background: #111; } .toast.err::before { content: "✕"; color: #f07a6e; }
.toast-act { color: inherit; }
dialog.modal { padding: 26px 28px 24px; border: 0; border-radius: 26px; box-shadow: var(--float); }
dialog.modal::backdrop { background: rgba(17, 17, 17, .32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
dialog.modal h3 { margin: 0 0 12px; font-size: 22px; letter-spacing: -.02em; }
.modal-actions { gap: 10px; margin-top: 20px; }
.confirm-list { gap: 0; padding: 0; list-style: none; color: var(--ink); }
.confirm-list li { position: relative; padding: 9px 0 9px 26px; border-bottom: 1px solid var(--line); }
.confirm-list li:last-child { border-bottom: 0; }
.confirm-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--ink-3); }
.confirm-list .warnli::before { content: "!"; left: 6px; color: var(--warn); font-weight: 800; }

/* ---- totals on a document: the box and the black bar at the bottom ---- */
.totals-box { max-width: 380px; padding: 16px 20px; border: 0; border-radius: 20px; box-shadow: var(--shadow); }
.totals-box .grand { margin-top: 8px; padding-top: 10px; border-top: 2px solid var(--ink); font-size: 22px; }
.totbar { bottom: 14px; min-height: 72px; gap: 22px; padding: 10px 10px 10px 22px; border-radius: 20px; background: #111; color: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.totbar span { color: rgba(255, 255, 255, .6); font-weight: 600; }
.totbar b { font-size: 16px; font-weight: 650; }
.totbar .net b { font-size: 26px; color: #fff; letter-spacing: -.02em; }
.totbar button, .totbar .btn, .totbar .primary { min-height: 52px; border-color: #fff; border-radius: 14px; background: #fff; color: #111; font-size: 15.5px; }

/* ---- Home: today's figures, tiles in groups, the safety line ---- */
.sect { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: var(--ink-3); font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.sect::after { content: ""; flex: 1; height: 1px; background: var(--line-2); opacity: .6; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 0; }
.tile { position: relative; gap: 2px; min-height: 118px; padding: 14px 16px; border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.tile:hover { border: 0; box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line-2); }
.tile .tile-title { padding-right: 22px; color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.3; }
.tile > .ico { position: absolute; right: 14px; top: 14px; color: var(--ink-3); }
.tile b { margin: 6px 0 2px; font-size: 32px; line-height: 1.1; letter-spacing: -.03em; }
.tile b.wordy { margin: 10px 0 4px; font-size: 23px; }
.tile small { font-size: 12.5px; line-height: 1.35; }
.tile.bad { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--bad); } .tile.bad b { color: var(--bad); }
.tile.warn b { color: var(--warn); }
a.today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin-bottom: 0; overflow: hidden; color: var(--ink); text-decoration: none; }
a.today:hover { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line-2); }
.today > div { padding: 16px 22px; border-right: 1px solid var(--line); }
.today > div:last-child { border-right: 0; }
.today small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.today b { display: block; margin-top: 2px; font-size: 26px; letter-spacing: -.02em; }
.today span { color: var(--ink-3); font-size: 12.5px; }
.card.well { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 14px; padding: 12px 18px; color: var(--ink-2); font-size: 13px; }
.well > span { display: inline-flex; align-items: center; gap: 8px; }
.well .well-lock { margin-left: auto; color: var(--ink-3); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.bad { background: var(--bad); }

/* ---- a bill or a wide report: the menu folds to a rail of icons; ☰ at its foot opens the whole menu over the screen ---- */
@media (min-width: 761px) {
  body.fold .app { grid-template-columns: 88px minmax(0, 1fr); }
  body.fold .side, body.pilot.fold .side { position: sticky; transform: none; transition: none; width: 64px; padding: 12px 8px 10px; align-items: center; }
  body.fold .side { top: 12px; height: calc(100vh - 24px); }
  body.pilot.fold .side { top: calc(var(--pilot-h) + 12px); height: calc(100vh - var(--pilot-h) - 24px); }
  body.fold:not(.nav-open) .side :is(.side-logos, .appname, .lbl, .navhead, .side-foot) { display: none; }
  body.fold:not(.nav-open) .side .rail-mark { display: block; width: 40px; height: 40px; margin: 2px auto 10px; border-radius: 12px; }
  body.fold:not(.nav-open) .side .navlist { width: 100%; margin: 0; padding: 0; scrollbar-width: none; }
  body.fold:not(.nav-open) .side a { justify-content: center; width: 46px; min-height: 40px; margin: 0 auto 2px; padding: 0; }
  body.fold:not(.nav-open) .side .navgroup { margin: 0; padding: 4px 0; border-top: 1px solid var(--line); }
  body.fold:not(.nav-open) .side .navgroup:first-child { border-top: 0; }
  body.fold:not(.nav-open) .side .navgroup:has(> .navitems[hidden]) { display: none; }
  body.fold .side .rail-open { display: grid; place-items: center; width: 46px; min-height: 42px; margin: 6px auto 0; padding: 0; border: 0; background: none; color: var(--ink-2); }
  body.fold .menu-btn { display: none; }
  body.fold.nav-open .side, body.pilot.fold.nav-open .side { position: fixed; left: 12px; z-index: 50; width: 236px; padding: 14px 12px 10px; align-items: stretch; }
  body.fold.nav-open .side .rail-mark { display: none; }
  body.fold.nav-open .side .rail-open { margin: 6px 0 0 auto; }
}

/* ---- phones: the menu card slides in from ☰; boxes and buttons 52 px; Home's tiles two to a row ---- */
@media (max-width: 760px) {
  .app, body.fold .app { grid-template-columns: minmax(0, 1fr); }
  .side, body.fold .side { position: fixed; top: 10px; bottom: 10px; left: 10px; height: auto; width: min(300px, calc(100vw - 56px)); margin: 0; z-index: 40;
    transform: translateX(calc(-100% - 24px)); transition: transform .2s; }
  body.pilot .side, body.pilot.fold .side { top: calc(var(--pilot-h) + 10px); height: auto; }
  body.nav-open .side, body.fold.nav-open .side { transform: none; box-shadow: var(--float), 0 0 0 100vmax rgba(17, 17, 17, .28); }
  .menu-btn { display: inline-grid; place-items: center; }
  .top { min-height: 64px; padding: 10px 12px; gap: 10px; }
  .co-logo { height: 30px; }
  .top .ctx b { font-size: 15px; }
  .goto { width: auto; height: 44px; max-width: none; flex: 1; min-width: 0; padding: 0 10px; }
  .goto-kbd, .goto > .ico { display: none; }
  .top .ctx b { display: none; }   /* the logo says which company; Go to gets the room */
  details.dd > summary.help-btn { width: 44px; padding: 0; justify-content: center; font-size: 0; }   /* the ? alone; its count stays */
  details.dd > summary.help-btn .help-count { font-size: 11px; margin-left: -6px; }
  .who-ini { width: 36px; height: 36px; }
  main { padding: 4px 14px 90px; }
  .page-head h1 { font-size: 26px; }
  input, select, textarea { min-height: 52px; font-size: 16px; }   /* 16 px: phones do not zoom in when a box is tapped */
  button, .btn { min-height: 48px; }
  .page-head .tools button, .page-head .tools .btn, .actions button, .modal-actions button { min-height: 52px; }
  .grid button, .grid .btn { min-height: 40px; }
  .listbar { padding: 12px; } .listbar input[type=search] { width: 100%; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { min-height: 108px; padding: 12px 13px; } .tile b { font-size: 26px; } .tile b.wordy { font-size: 18px; }
  a.today { grid-template-columns: 1fr 1fr; }
  .today > div { padding: 10px 14px; border-bottom: 1px solid var(--line); } .today > div:nth-child(2n) { border-right: 0; }
  .today b { font-size: 19px; }
  .well .well-lock { margin-left: 0; }
  .totbar { bottom: 10px; border-radius: 22px; padding: 10px 10px 10px 18px; }
  /* the pilot strip wraps on two lines instead of being cut off */
  body.pilot { --pilot-h: 46px; }
  .pilot-strip { display: block; white-space: normal; line-height: 17px; padding: 6px 14px; font-size: 12.5px; }
}

/* ---- dark mode (follows the device): the glow dims, the logos sit on a white plate as on the sign-in card, the bar and toasts turn light ---- */
@media (prefers-color-scheme: dark) {
  .side-logos { padding: 9px 0; margin: 0 2px 10px; border: 0; border-radius: 14px; background: #fff; }
  .side-logos i { background: #e4e4e4; }
  .totbar { background: #f1f1f2; color: #111; }
  .totbar span { color: #666; } .totbar .net b { color: #111; }
  .totbar button, .totbar .btn, .totbar .primary { background: #111; border-color: #111; color: #fff; }
  .toast, .toast.err { background: #f1f1f2; color: #111; }
  .toast::before { color: #1f7a4d; } .toast.err::before { color: #c62828; }
  .chip { box-shadow: inset 0 0 0 1px var(--line-2); }
}

/* a bill on a phone: each line is a card with big boxes (today the 16-column grid scrolled sideways); the names come from data-label */
@media (max-width: 760px) {
  .card.scroll:has(> .bill-lines) { overflow: visible; }
  .bill-lines, .bill-lines > tbody { display: block; }
  .bill-lines > thead { display: none; }
  .bill-lines > tbody > tr { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 10px; padding: 14px; border-bottom: 1px solid var(--line); }
  .bill-lines > tbody > tr > td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; background: none !important; box-shadow: none !important; }
  .bill-lines td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--ink-3); font-size: 11.5px; font-weight: 600; }
  .bill-lines td.name { grid-column: 1 / -1; order: -1; padding-right: 40px; font-size: 15px; font-weight: 650; }
  .bill-lines td.rm-cell { position: absolute; right: 8px; top: 8px; }
  .bill-lines td:is([data-label="#"], [data-label="Order"], [data-label="Tot qty"], [data-label="Gross"], [data-label="Taxable"], [data-label="GST"]) { display: none; }
  .bill-lines td[data-label="Bill rate"] { order: 1; } .bill-lines td[data-label="Bill qty"] { order: 2; } .bill-lines td[data-label="Sch qty"] { order: 3; }
  .bill-lines td[data-label="Disc %"] { order: 4; } .bill-lines td[data-label="CD%"] { order: 5; }
  .bill-lines > tbody > tr > td.n { text-align: left; white-space: normal; }   /* 9g: the "Free to sell" line under the stock wraps inside the card */
  .bill-lines > tbody > tr > td[data-label="Net ₹"] { order: 6; text-align: right; font-size: 16px; }
  .bill-lines td[data-label="MRP"] { order: 7; color: var(--ink-3); } .bill-lines td[data-label^="Stock"] { order: 8; grid-column: span 2; }
  .bill-lines input.cell { width: 100%; min-height: 46px; font-size: 16px; text-align: right; }
  .bill-lines > tbody > tr.cur { background: var(--accent-row); box-shadow: inset 3px 0 0 var(--co); }
  .bill-lines > tbody > tr.changed { background: var(--changed); } .bill-lines > tbody > tr.bad { background: var(--badrow); box-shadow: inset 3px 0 0 var(--bad); }
  .bill-lines td.empty { grid-column: 1 / -1; }
  .top .ctx { flex: none; }
}

/* ---- the About page (owner 27 Nov 2026: Evergreen Toolkit/about-page-ideas, cards 1–8) ---- */
.about-how { margin: -6px 0 14px; }
.about-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden;
  background: radial-gradient(420px 260px at 0% 0%, rgba(0, 166, 81, .12), transparent 70%), radial-gradient(460px 280px at 50% -20%, rgba(232, 121, 43, .14), transparent 70%),
    radial-gradient(420px 260px at 40% 130%, rgba(59, 75, 176, .10), transparent 70%), var(--panel); }
.about-credit { padding: 20px 26px 18px; display: flex; flex-direction: column; min-width: 0; }
.about-mark { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.about-mark img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.about-hero .about-line { margin: 12px 0 14px; font-size: 28px; line-height: 1.16; letter-spacing: -.02em; font-weight: 750; color: var(--ink); }
.about-ver { display: flex; align-items: center; gap: 12px; margin-top: auto; font-size: 12.5px; color: var(--ink-3); }
.about-vpill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--ink); color: var(--panel); font-size: 13.5px; white-space: nowrap; }
.about-vpill b { font-size: 14.5px; }
.about-new { margin: 12px 12px 12px 0; padding: 14px 18px 12px; border-radius: 12px; background: color-mix(in srgb, var(--panel) 78%, transparent); border: 1px solid var(--line); min-width: 0; }
.about-new h3 { margin: 0 0 6px; font-size: 14.5px; }
.about-new ul, .about-old ul { margin: 0; padding: 0; list-style: none; }
.about-new li { position: relative; padding: 4px 0 4px 22px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.about-new li::before { content: "✓"; position: absolute; left: 2px; top: 4px; color: var(--ok); font-weight: 800; }
.about-earlier { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.about-earlier summary { cursor: pointer; font-weight: 650; }
.about-old { margin-top: 8px; }
.about-old li { padding: 2px 0 2px 14px; position: relative; color: var(--ink-2); }
.about-old li::before { content: "·"; position: absolute; left: 3px; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.about-grid > .card { margin-bottom: 14px; }
.about-card h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 10px; }
.about-only { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-3); font-size: 11px; font-weight: 700; white-space: nowrap; }
.about-kv { display: grid; grid-template-columns: auto 1fr; font-size: 13.5px; }
.about-kv > span { padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.about-kv > span:nth-last-child(-n+2) { border-bottom: 0; }
.about-k { color: var(--ink-3); white-space: nowrap; }
.about-v { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 4px 7px; text-align: right; padding-left: 12px !important; }
.about-v small { color: var(--ink-3); }
.about-keylist .about-v { justify-content: flex-start; text-align: left; color: var(--ink-2); }
.about-keylist kbd { display: inline-block; min-width: 84px; text-align: center; margin: 0; padding: 4px 6px; border: 0; opacity: 1; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.about-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.about-dot.warn { background: var(--warn); } .about-dot.bad { background: var(--bad); }
.about-who { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.about-who b { display: block; font-size: 15.5px; }
.about-who small, .about-cohead small { display: block; color: var(--ink-3); font-size: 12.5px; }
.about-ini { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 750; font-size: 17px; display: grid; place-items: center; flex: none; }
.about-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.about-chips span { padding: 2px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.about-note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
.about-cohead { display: flex; align-items: center; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.about-cohead img { height: 40px; width: auto; display: block; }
.about-cohead b { display: block; font-size: 15.5px; }
.about-facts { margin: 4px 0 0; padding: 0; list-style: none; }
.about-facts li { position: relative; padding: 6px 0 6px 22px; font-size: 13.5px; line-height: 1.38; color: var(--ink-2); }
.about-facts li::before { content: "✓"; position: absolute; left: 2px; top: 6px; color: var(--ok); font-weight: 800; }
.about-promise { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.about-promise b { color: var(--ink); }
.about-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (prefers-color-scheme: dark) {
  .about-hero { background: radial-gradient(420px 260px at 0% 0%, rgba(0, 166, 81, .14), transparent 70%), radial-gradient(460px 280px at 50% -20%, rgba(232, 121, 43, .14), transparent 70%),
    radial-gradient(420px 260px at 40% 130%, rgba(70, 90, 200, .18), transparent 70%), var(--panel); }
  .about-cohead img, .about-mark img { background: #fff; border-radius: 8px; padding: 2px; }
}
@media (max-width: 1100px) { .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-new { margin: 0 12px 12px; }
  .about-hero .about-line { font-size: 23px; }
  .about-grid { grid-template-columns: 1fr; gap: 0; }
  .about-keys { display: none; }   /* phone: no keyboard */
}
