:root{
  --navy-900:#0a1626; --navy-800:#0f1f33; --navy-700:#152a42; --navy-600:#1d3a59;
  --line:#22405f; --ink:#e8eef5; --ink-dim:#9fb3c8; --ink-faint:#6b8199;
  --amber:#f5a623; --teal:#2dd4bf; --green:#34d399; --red:#f87171;
  /* The top bar STATES its height so a frozen table header can clear it exactly. */
  --topbar-h:78px;
  /* The offset a frozen header parks at. Separate from --topbar-h so a scroll box can re-point its
     own headers to 0 without also poisoning any calc() that still needs the real bar height. */
  --thead-top:var(--topbar-h);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:'Segoe UI',system-ui,-apple-system,sans-serif;background:var(--navy-900);color:var(--ink);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
code{font-family:Consolas,ui-monospace,monospace;background:var(--navy-700);border:1px solid var(--line);border-radius:4px;padding:1px 6px;font-size:.85em;color:var(--amber)}

.app{display:grid;grid-template-columns:240px 1fr;min-height:100vh}

/* rail */
.rail{background:var(--navy-800);border-right:1px solid var(--line);position:sticky;top:0;height:100vh;overflow-y:auto}
.brand{display:flex;align-items:center;gap:10px;padding:1.3rem 1.3rem;border-bottom:1px solid var(--line)}
.brand-dot{width:32px;height:32px;border-radius:8px;background:linear-gradient(135deg,var(--amber),#e8890b);display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--navy-900);font-size:16px}
.brand-name{font-size:15px;font-weight:700}
.brand-sub{font-size:9px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:2px;margin-top:2px}
.nav{padding:.5rem 0 2rem}
.nav-group{font-size:10px;text-transform:uppercase;letter-spacing:1.5px;color:var(--ink-faint);font-weight:700;padding:1rem 1.3rem .35rem}
.nav-item{display:flex;align-items:center;gap:10px;padding:8px 1.3rem;font-size:13px;color:var(--ink-dim);border-left:2px solid transparent}
.nav-item:hover{background:var(--navy-700);color:var(--ink);border-left-color:var(--amber)}
.nav-item.active{background:var(--navy-700);color:var(--ink);border-left-color:var(--amber)}
.nav-item .ic{width:18px;text-align:center}

/* main */
.main{min-width:0;display:flex;flex-direction:column}
.topbar{display:flex;justify-content:space-between;align-items:center;height:var(--topbar-h);padding:.9rem 2rem;border-bottom:1px solid var(--line);background:var(--navy-800);position:sticky;top:0;z-index:5}
.topbar-title{font-size:13px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:1px}
.user-chip{display:flex;align-items:center;gap:8px;font-size:13px;background:var(--navy-700);border:1px solid var(--line);border-radius:20px;padding:5px 14px}

/* mobile nav drawer (B3 stage 1a) — the burger and backdrop exist only on narrow screens; the
   media query below turns them on. On desktop they stay out of the way and the rail is the grid. */
.nav-burger{display:none}
.nav-backdrop{display:none}
.user-chip .dot{width:8px;height:8px;border-radius:50%;background:var(--green)}
.content{padding:2rem;flex:1}

.page-h{font-size:1.5rem;font-weight:800;margin:0 0 .25rem;letter-spacing:-.4px}
.page-sub{color:var(--ink-dim);font-size:14px;margin:0 0 1.5rem}

/* kpis */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem;margin-bottom:1.5rem}
.kpi{background:var(--navy-800);border:1px solid var(--line);border-radius:10px;padding:1.1rem 1.2rem}
.kpi-v{font-size:1.8rem;font-weight:800}
.kpi-l{font-size:11px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:1px;margin-top:.3rem}

/* panel + table */
.panel{background:var(--navy-800);border:1px solid var(--line);border-radius:12px;padding:1.25rem 1.4rem;margin-bottom:1.25rem}
.panel-h{font-size:14px;font-weight:700;margin-bottom:.9rem}
.tbl{width:100%;border-collapse:collapse;font-size:13px}
.tbl th{text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.8px;color:var(--ink-faint);font-weight:700;padding:0 10px 9px;border-bottom:1px solid var(--line)}
.tbl td{padding:9px 10px;border-top:1px solid #ffffff0d}
/*  A NUMBER COLUMN'S HEADER SITS OVER ITS NUMBERS.

    .r was handled here from the start; .num - the other name for the same thing, and the one used four
    times as often - was not. Pages declare their own `.num{text-align:right}`, which is specificity
    (0,1,0) and loses to `.tbl th` (0,1,1) two lines above. So every `<th class="num">` in the product
    rendered LEFT while its `<td class="num">` rendered right: on Price approvals, CURRENT sat above
    nothing and PROPOSED sat above the previous column's figure. Verified in the browser rather than
    argued from the cascade - th.num computed `left`, td.num computed `right`.

    Both th and td, not just th: on the two pages where .num is declared without an alignment, fixing
    only the header would introduce a fresh misalignment in place of the old one.                    */
.tbl td.r,.tbl th.r,.tbl td.num,.tbl th.num{text-align:right}
.tbl td.strong,.tbl .strong{font-weight:600}
.tbl tr:hover td{background:var(--navy-700)}

/* ----------------------------------------------------------------------------
   .grid-table — THE BASE, WHICH WAS NEVER HERE (1.9.821)

   The comment below calls grid-table one of the four on-screen report families,
   and app.css styled only its FROZEN HEADER. It never gave it a width, a cell
   padding or a rule between rows — so every page using it carried its own copy
   of the base, and that is precisely how three pages came to define it in light
   colours while nobody noticed.

   Removing those page copies in 1.9.819/820 therefore took the layout with them:
   the promotions table collapsed to its content width with no padding, which is
   what Rostand saw. The base belongs here, beside .tbl, where it was always
   meant to be. A page that still declares its own wins, so nothing else moves.
   ---------------------------------------------------------------------------- */
.grid-table{width:100%;border-collapse:collapse;font-size:13.5px}
.grid-table th{text-align:left;padding:9px 10px;font-weight:700;color:var(--ink-dim);
               border-bottom:1px solid var(--line)}
.grid-table td{padding:9px 10px;border-bottom:1px solid #ffffff0d;color:var(--ink);vertical-align:top}
.grid-table td.r,.grid-table th.r{text-align:right}
.grid-table tr:hover td{background:var(--navy-700)}

/* ============================================================================
   FROZEN TABLE HEADERS (1.9.366).

   A header that scrolls away on line 40 of 407 makes every column under it a
   guess. Six pages had already tried this and FIVE OF THEM WERE DEAD CSS —
   present, parsing, and doing nothing. Three reasons, all of them here:

     1. top:0 parks the header UNDER .topbar, which is itself sticky at 0 with
        z-index 5. It has to stop at the bar's lower edge, so the bar states its
        own height and the header reads the same value. Measured 75.46px on the
        running Box; 78 clears it with headroom for the user chip rather than
        clipping it, and if a control is ever added up there both move together.

     2. A <th> has no background of its own and sticky lifts it out of the flow,
        so rows paint straight through the lettering. It must be opaque.

     3. THE BORDER IS A SHADOW, NOT A BORDER. .tbl is border-collapse:collapse,
        and a collapsed border belongs to the TABLE, not the cell — so a sticky
        th carries its text away and leaves its underline behind. An inset
        shadow is painted by the cell and travels with it.

   .in-box is for a table inside a capped scroll container: sticky resolves
   against that box, not the page, so the bar is not above it and the offset is
   0. Marking it explicitly beats relying on which stylesheet loaded last.
   ============================================================================ */
/* .tbl carries most reports; grid-table, gt and rpt are the other three ON-SCREEN report families.
   Print documents — invoices, trip sheets, deposit slips, statements — are deliberately absent: a
   document is not a scrolling report and freezing its header would be a bug, not a feature. */
.tbl thead th, .grid-table thead th, .gt thead th, .rpt thead th{
  position:sticky;top:var(--thead-top);z-index:2;background:var(--navy-900);
  padding-top:9px;box-shadow:inset 0 -1px 0 var(--line);border-bottom:none}
/*  ALL FOUR FAMILIES, not only .tbl (1.9.425). Sales overview puts a .gt table in its own capped box, and
    with the offset re-pointed for .tbl alone its header parked 78px down inside the box, over the rows. */
.tbl.in-box thead th, .grid-table.in-box thead th, .gt.in-box thead th, .rpt.in-box thead th{top:0}

/* A TABLE IN A SCROLL BOX STICKS TO THE BOX, NOT THE PAGE — which is why five of the six earlier
   attempts were dead. A wrapper made for HORIZONTAL overflow is a scroll container in BOTH axes
   (declare overflow-x:auto and the browser computes overflow-y to auto), and with no height cap it
   never scrolls vertically, so the header has nothing to stick to.

   Giving it a height fixes that. And because --thead-top is an inherited custom property, redefining
   it to 0 HERE re-points every header inside the box at the box's own top edge — the bar is not
   above them — without a single per-page edit or an extra class on 34 tables.

   :has() is Chrome/Edge 105+. Where it is not supported the whole rule is dropped and the page
   behaves exactly as it does today, so this can only add. */
.scroller:has(> table),
.tbl-wrap:has(> table),
/*  .scroll IS THE FOURTH, and it was missing until the ZRA VAT return showed why it mattered. That
    page declares its own ".scroll{overflow-x:auto}" for a wide table, which makes the div a scroll
    container in BOTH axes exactly as the note above warns. The header then resolved --thead-top
    against the BOX rather than the page and parked itself 78px INSIDE the table, painting over the
    rows it was meant to label - a floating band of column names in the middle of the data.
    Three pages use it: ZraReport, TradingReturnSummary, WeekBreakdown. */
.scroll:has(> table),
[style*="overflow"]:has(> table){
  max-height:calc(100vh - var(--topbar-h) - 5rem);
  --thead-top:0px;
}

.tag{font-size:11px;font-weight:600;padding:2px 9px;border-radius:5px}
.tag.ok{background:#34d39918;color:var(--green)}
.tag.danger{background:#f8717118;color:var(--red)}

.toolbar{display:flex;align-items:center;gap:14px;margin-bottom:1rem;flex-wrap:wrap}
/* A TOOLBAR CONTROL MUST BE WIDE ENOUGH TO READ. .sel further down sets width:100%, which is right for
   a stacked form but wrong inside a flex toolbar: every control asks for the full width, so flex shrinks
   them all equally and a crowded toolbar collapses into stubs. Measured on the goods-received report:
   selects at 37, 44, 49 and 58px - "All ch..", "- ev.." - and the page STILL overflowed sideways,
   1200px of content in a 990px body, because past a point they cannot shrink any further.
   So: size to content, floor it so a short one stays clickable, cap it so one long supplier name does
   not run away with the row, and let the toolbar WRAP rather than crush. The wrap is what makes the
   floor safe; without it the row would overflow instead of moving to a second line.
   Scoped to .toolbar, so stacked forms keep their full-width fields. */
.toolbar .sel{width:auto;min-width:130px;max-width:320px}
.search{flex:1;max-width:420px;background:var(--navy-800);border:1px solid var(--line);border-radius:8px;padding:9px 12px;color:var(--ink);font-size:13px}
.search::placeholder{color:var(--ink-faint)}
.muted{color:var(--ink-faint);font-size:13px}

.auth-msg{padding:3rem;text-align:center;color:var(--ink-dim)}
.auth-msg h2{color:var(--ink)}

/* B3 stage 1a: on a phone the rail is an off-canvas drawer, not display:none with no way back.
   The checkbox #nav-toggle (toggled by the burger and the backdrop, both <label>s) slides it in. */
@media (max-width:880px){
  .app{grid-template-columns:1fr}
  .content{padding:1.25rem}

  .rail{position:fixed;top:0;left:0;z-index:40;width:min(82vw,300px);height:100vh;
        transform:translateX(-100%);transition:transform .22s ease;box-shadow:0 0 40px rgba(0,0,0,.55)}
  #nav-toggle:checked ~ .rail{transform:translateX(0)}

  .nav-backdrop{display:none;position:fixed;inset:0;z-index:35;background:rgba(0,0,0,.5)}
  #nav-toggle:checked ~ .nav-backdrop{display:block}

  .nav-burger{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
              width:40px;height:40px;margin-right:.4rem;background:var(--navy-700);
              border:1px solid var(--line);border-radius:8px;color:var(--ink);font-size:20px;cursor:pointer}

  /* the topbar never overflows: shrink it, let it wrap, and drop the long title that stacked over
     four lines — the brand is in the drawer and the burger already says "menu". */
  .topbar{padding:.55rem .9rem;height:auto;min-height:56px;gap:.5rem;flex-wrap:wrap}
  .topbar-title{display:none}
  .topbar-right{gap:8px;flex-wrap:wrap}
  .user-chip{padding:5px 10px;font-size:12px}
}

/* ===== login ===== */
.login-wrap{display:grid;grid-template-columns:1.1fr .9fr;min-height:100vh}
.login-left{background:linear-gradient(135deg,#15346b,#0a1626);padding:3rem;display:flex;flex-direction:column;justify-content:center;color:#fff}
.login-left h1{font-size:2rem;font-weight:800;margin:0 0 .6rem;max-width:14ch}
.login-left p{color:#b9cbe0;max-width:38ch}
.login-badge{display:inline-flex;align-items:center;gap:6px;background:#ffffff14;border:1px solid #ffffff22;border-radius:20px;padding:6px 14px;font-size:12px;width:max-content;margin-bottom:1.5rem}
.login-right{background:var(--navy-800);padding:3rem;display:flex;flex-direction:column;justify-content:center}
.login-right .brand-mark{display:flex;align-items:center;gap:10px;margin-bottom:1.5rem}
.login-right h2{font-size:1.4rem;font-weight:700;margin:0 0 .2rem}
.login-right .sub{font-size:13px;color:var(--ink-faint);margin-bottom:1.5rem}
.login-right form{max-width:340px}
.fld{margin-bottom:1rem}
.fld label{font-size:11px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.5px;display:block;margin-bottom:6px}
.fld input{width:100%;background:var(--navy-900);border:1px solid var(--line);border-radius:8px;padding:11px 12px;color:var(--ink);font-size:14px}
.signin{width:100%;max-width:340px;background:var(--amber);color:var(--navy-900);font-weight:700;font-size:14px;border:none;border-radius:8px;padding:12px;cursor:pointer;margin-top:.3rem}
.signin:hover{filter:brightness(1.05)}
.err{background:#f8717118;border:1px solid #f8717140;color:#fca5a5;border-radius:8px;padding:9px 12px;font-size:13px;margin-bottom:1rem;max-width:340px}
.hint{font-size:12px;color:var(--ink-faint);margin-top:1.2rem}

/* ===== topbar logout ===== */
.topbar-right{display:flex;align-items:center;gap:12px}
.logout-form{margin:0}
.logout-btn{background:var(--navy-700);border:1px solid var(--line);color:var(--ink-dim);border-radius:7px;padding:6px 14px;font-size:12px;cursor:pointer}
.logout-btn:hover{color:var(--ink);border-color:var(--amber)}

/* ===== forms / buttons (admin) ===== */
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:1rem}
.fld2 label{font-size:11px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.5px;display:block;margin-bottom:5px}
.fld2 input,.fld2 select{width:100%;background:var(--navy-900);border:1px solid var(--line);border-radius:7px;padding:9px 11px;color:var(--ink);font-size:13px}
.btn{background:var(--amber);color:var(--navy-900);font-weight:700;font-size:13px;border:none;border-radius:7px;padding:9px 18px;cursor:pointer}
.btn:hover{filter:brightness(1.05)}
.btn-sm{background:var(--navy-700);border:1px solid var(--line);color:var(--ink-dim);border-radius:6px;padding:4px 10px;font-size:11px;cursor:pointer}
.btn-sm:hover{color:var(--ink);border-color:var(--amber)}
/* A DISABLED BUTTON HAS TO LOOK DISABLED. Nothing styled this, so every disabled button in the app was
   painted exactly like a working one — a full amber Import button that swallowed clicks and explained
   nothing. Applied to buttons generally rather than to one page, because the problem was general. */
.btn:disabled,.btn-sm:disabled,.btn-ghost:disabled,button:disabled{opacity:.42;cursor:not-allowed;filter:none}
.btn:disabled:hover,.btn-sm:disabled:hover,button:disabled:hover{filter:none;border-color:var(--line)}
.msg{margin-left:12px;font-size:13px;color:var(--teal)}

/* ===== customer detail ===== */
.row-link{color:var(--teal);text-decoration:none}
.row-link:hover{text-decoration:underline}
.detail-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem}
.detail-head .btn-sm{text-decoration:none;display:inline-block}
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;margin-bottom:1.25rem}
.kv{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid #ffffff0d;font-size:13px}
.kv:last-child{border-bottom:none}
.kv span{color:var(--ink-faint)}
.kv b{color:var(--ink)}
.tag.warn{background:#f5a62318;color:var(--amber)}
textarea{width:100%;background:var(--navy-900);border:1px solid var(--line);border-radius:7px;padding:9px 11px;color:var(--ink);font-size:13px;font-family:inherit;resize:vertical}
@media (max-width:760px){.detail-grid{grid-template-columns:1fr}}

/* version chip next to system title */
.ver{font-size:10px;color:var(--amber);background:var(--amber-soft);border:1px solid #f5a62340;border-radius:10px;padding:1px 8px;margin-left:8px;letter-spacing:.5px;vertical-align:1px}

/* ===== customer detail — professional CRM layout ===== */
.cust-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1.25rem;flex-wrap:wrap}
.cust-id{display:flex;gap:14px;align-items:center}
.cust-avatar{width:52px;height:52px;border-radius:12px;background:linear-gradient(135deg,var(--teal),#1d9c8c);color:#04201c;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;flex-shrink:0}
.cust-name{font-size:1.5rem;font-weight:800;margin:0;letter-spacing:-.3px}
.cust-meta{display:flex;align-items:center;gap:10px;font-size:12.5px;color:var(--ink-dim);margin-top:3px;flex-wrap:wrap}
.cust-meta .dotsep::before{content:"·";margin-right:10px;color:var(--ink-faint)}
.cust-actions{display:flex;gap:8px;flex-wrap:wrap}
.qa{display:inline-flex;align-items:center;gap:6px;background:var(--navy-700);border:1px solid var(--line);color:var(--ink-dim);border-radius:8px;padding:8px 13px;font-size:12.5px;cursor:pointer;text-decoration:none}
.qa:hover{color:var(--ink);border-color:var(--amber)}
.qa-back{color:var(--ink-faint)}

.cust-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:1.25rem}
.ctile{background:var(--navy-800);border:1px solid var(--line);border-radius:10px;padding:.9rem 1.1rem}
.ctile-l{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ink-faint);font-weight:700}
.ctile-v{font-size:1.4rem;font-weight:800;margin-top:.3rem}
.ctile-v.small{font-size:1rem;font-weight:700}
.ctile-v.neg{color:var(--red)}

.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:1.25rem}
.tab{background:none;border:none;color:var(--ink-dim);padding:10px 16px;font-size:13px;font-weight:600;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
.tab:hover{color:var(--ink)}
.tab.on{color:var(--ink);border-bottom-color:var(--amber)}
.tab .cnt{font-size:11px;background:var(--navy-600);color:var(--ink-dim);border-radius:10px;padding:1px 7px;margin-left:5px}

.two-pane{display:grid;grid-template-columns:340px 1fr;gap:1.25rem;align-items:start}
.pane-side{display:flex;flex-direction:column;gap:1.25rem}
.pane-main{display:flex;flex-direction:column;gap:1.25rem}
@media (max-width:900px){.two-pane{grid-template-columns:1fr}}

.type-pills{display:flex;gap:8px;flex-wrap:wrap}
.pill-btn{background:var(--navy-900);border:1px solid var(--line);color:var(--ink-dim);border-radius:20px;padding:6px 16px;font-size:12.5px;cursor:pointer}
.pill-btn:hover{color:var(--ink)}
.pill-btn.on{background:var(--amber);color:var(--navy-900);border-color:var(--amber);font-weight:700}

/* timeline */
.timeline{display:flex;flex-direction:column;gap:2px}
.tl-item{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid #ffffff0a;position:relative}
.tl-item:last-child{border-bottom:none}
.tl-ic{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:16px;background:var(--navy-700);border:1px solid var(--line);flex-shrink:0}
.tl-call{border-color:#34d39950}.tl-email{border-color:#60a5fa50}.tl-visit{border-color:#f5a62350}.tl-note{border-color:#9fb3c850}
.tl-body{flex:1;min-width:0}
.tl-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline;flex-wrap:wrap}
.tl-type{font-size:13px;font-weight:700;color:var(--ink)}
.tl-when{font-size:11px;color:var(--ink-faint)}
.tl-summary{font-size:13.5px;color:var(--ink);margin-top:2px}
.tl-detail{font-size:12.5px;color:var(--ink-dim);margin-top:3px}
.tl-follow{margin-top:7px}

/* ===== users manage box ===== */
.manage-box{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;background:var(--navy-900);border:1px solid var(--line);border-radius:9px;padding:1.1rem 1.3rem}
.manage-h{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--ink-faint);font-weight:700;margin-bottom:.7rem}
.role-checks{display:flex;flex-direction:column;gap:8px;margin-bottom:1rem}
.rchk{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--ink-dim);cursor:pointer}
.rchk input{width:15px;height:15px;accent-color:var(--amber)}
@media (max-width:760px){.manage-box{grid-template-columns:1fr}}

/* ===== reports bars + rank chips ===== */
.bar-row{display:flex;align-items:center;gap:12px;padding:6px 0;font-size:12.5px}
.bar-label{width:120px;color:var(--ink-dim);flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{flex:1;height:9px;background:var(--navy-600);border-radius:5px;overflow:hidden}
.bar-fill{height:100%;background:var(--teal);border-radius:5px}
.bar-fill.alt{background:var(--purple,#7f77dd)}
.bar-val{width:46px;text-align:right;color:var(--ink);font-weight:600}
.rank{display:inline-flex;width:20px;height:20px;border-radius:5px;align-items:center;justify-content:center;font-size:11px;font-weight:700;background:var(--navy-600);color:var(--ink-dim)}
.rank.g{background:#f5a62322;color:var(--amber)}
.reg{color:var(--teal)}

/* ===== organogram chart ===== */
.chart{overflow-x:auto;padding:1rem 0}
.tree{display:flex;flex-direction:column;align-items:center;min-width:max-content;gap:0}
.level,.child{display:flex;flex-direction:column;align-items:center;position:relative}
.node{background:var(--navy-800);border:1px solid var(--line);border-radius:10px;padding:.7rem 1rem;text-align:center;min-width:150px;position:relative;cursor:pointer;transition:border-color .15s}
.node:hover{border-color:var(--amber)}
.node.ceo{border-color:var(--amber);background:linear-gradient(180deg,#1a2c44,#0f1f33)}
.node .nt{font-size:13px;font-weight:700}
.node .nn{font-size:11px;color:var(--ink-dim);margin-top:2px}
.node .av{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--teal),#1d9c8c);color:#04201c;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;margin:0 auto 5px}
.node .badge{position:absolute;top:-8px;right:-8px;background:var(--navy-600);border:1px solid var(--line);border-radius:10px;font-size:10px;padding:1px 7px;color:var(--ink-dim)}
.connector-down{width:2px;height:26px;background:var(--line)}
.children{display:flex;gap:20px;position:relative;padding-top:14px}
.children::before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--line)}
.child::before{content:"";position:absolute;top:-14px;width:2px;height:14px;background:var(--line)}
.sel{width:100%;background:var(--navy-900);border:1px solid var(--line);border-radius:7px;padding:9px 11px;color:var(--ink);font-size:13px}

/* ===== manager → stores assigner ===== */
.role-pill{display:inline-block;font-size:11px;font-weight:700;padding:3px 12px;border-radius:20px;background:#34d39918;color:var(--green);margin-left:6px}
.store-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:8px;max-height:440px;overflow-y:auto;padding:4px}
.store-chk{display:flex;align-items:center;gap:10px;background:var(--navy-900);border:1px solid var(--line);border-radius:8px;padding:10px 12px;cursor:pointer}
.store-chk:hover{border-color:var(--amber)}
.store-chk.on{border-color:var(--green);background:#34d3990d}
.store-chk input{width:16px;height:16px;accent-color:var(--green);flex-shrink:0}
.store-name{font-size:13px;font-weight:600}
.store-meta{font-size:11px;color:var(--ink-faint)}
.store-cur{font-size:10px;color:var(--amber);margin-left:auto;white-space:nowrap}
.bar{display:flex;justify-content:space-between;align-items:center;margin-top:1rem}
.count{font-size:13px;color:var(--teal);font-weight:600}

/* regional role pill + AM grid (assign team) */
.role-pill.reg{background:#7f77dd22;color:#a9a4ec}
.am-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:8px;max-height:440px;overflow-y:auto;padding:4px}
.am-chk{display:flex;align-items:center;gap:10px;background:var(--navy-900);border:1px solid var(--line);border-radius:8px;padding:11px 13px;cursor:pointer}
.am-chk:hover{border-color:var(--amber)}
.am-chk.on{border-color:var(--green);background:#34d3990d}
.am-chk input{width:16px;height:16px;accent-color:var(--green);flex-shrink:0}
.am-name{font-size:13px;font-weight:600}
.am-meta{font-size:11px;color:var(--ink-faint)}
.am-stores{font-size:10px;color:var(--teal);margin-left:auto;white-space:nowrap}
.am-cur{font-size:10px;color:var(--amber);margin-left:auto;white-space:nowrap}
.summary{background:var(--navy-900);border:1px solid var(--line);border-radius:8px;padding:12px 14px;margin-top:1rem;font-size:12.5px;color:var(--ink-dim)}
.summary b{color:var(--ink)}

/* ===== roles & permissions (RBAC) ===== */
.rbac-grid{display:grid;grid-template-columns:280px 1fr;gap:1.25rem;align-items:start}
@media (max-width:820px){.rbac-grid{grid-template-columns:1fr}}
.role-list{display:flex;flex-direction:column;gap:6px;margin-bottom:1rem}
.role-item{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:8px;border:1px solid var(--line);background:var(--navy-900);cursor:pointer;font-size:13px}
.role-item:hover{border-color:var(--ink-faint)}
.role-item.on{border-color:var(--amber);background:#f5a6230d}
.role-item .rname{font-weight:600}
.role-item .rcount{font-size:11px;color:var(--ink-faint)}
.addrow{display:flex;gap:6px;margin-top:.5rem}
.addrow input{flex:1;background:var(--navy-900);border:1px solid var(--line);border-radius:7px;padding:8px 10px;color:var(--ink);font-size:12.5px}
.perm-group{margin-bottom:1.2rem}
.perm-group-h{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--teal);font-weight:700;margin-bottom:.6rem;border-bottom:1px solid var(--line);padding-bottom:5px}
.perm-row{display:flex;align-items:center;gap:10px;padding:7px 0;font-size:13px;cursor:pointer}
.perm-row input{width:16px;height:16px;accent-color:var(--green)}
.perm-row .pdesc{color:var(--ink-faint);font-size:11.5px;margin-left:auto}
.editing-h{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}
.editing-h .et{font-size:15px;font-weight:700}
.pill{font-size:11px;font-weight:700;padding:2px 10px;border-radius:20px;background:#34d39918;color:var(--green)}
.savebar{margin-top:1rem;display:flex;gap:10px;align-items:center}

/* ===== store visits ===== */
.filterbar{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap;background:var(--navy-900);border:1px solid var(--line);border-radius:10px;padding:1rem 1.2rem;margin-bottom:1.25rem}
.fg{display:flex;flex-direction:column;gap:5px}
.fg label{font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:var(--ink-faint);font-weight:700}
.fg input,.fg select{background:var(--navy-800);border:1px solid var(--line);border-radius:7px;padding:8px 11px;color:var(--ink);font-size:13px;min-width:150px}
.quick{display:flex;gap:6px;margin-left:auto;align-self:flex-end;flex-wrap:wrap}
.quick button{background:var(--navy-800);border:1px solid var(--line);color:var(--ink-dim);border-radius:18px;padding:7px 14px;font-size:12px;cursor:pointer}
.quick button.on{background:var(--amber);color:var(--navy-900);border-color:var(--amber);font-weight:700}
.rangelabel{font-size:12px;color:var(--teal);margin-bottom:.8rem}
.ctile-v.warn{color:var(--amber)}
.badge{font-size:11px;font-weight:700;padding:3px 10px;border-radius:20px;display:inline-block}
.b-draft{background:#6b819922;color:var(--ink-dim)}
.b-pending{background:#f5a62322;color:var(--amber)}
.b-approved{background:#34d39922;color:var(--green)}
.b-progress{background:#60a5fa22;color:#60a5fa}
.b-completed{background:#7f77dd22;color:#a9a4ec}
.b-review{background:#f5a62322;color:var(--amber)}
.b-revision{background:#f8717122;color:var(--red)}
.btn-green{background:var(--green);color:#04201c;font-weight:700;border:none;border-radius:7px;padding:7px 12px;font-size:11.5px;cursor:pointer}
.btn-red{background:#f8717122;color:var(--red);border:1px solid #f8717155;border-radius:7px;padding:7px 12px;font-size:11.5px;cursor:pointer}

/* ===== visit working page ===== */
.visit-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1.25rem;flex-wrap:wrap;gap:1rem}
.detail-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:1.25rem;align-items:start}
@media (max-width:900px){.detail-grid{grid-template-columns:1fr}}
.approve-box{background:#34d39910;border:1px solid #34d39933;border-radius:9px;padding:1rem 1.2rem;margin-bottom:1.25rem}
.approve-box .ttl{font-size:12px;font-weight:700;color:var(--green);margin-bottom:.4rem;text-transform:uppercase;letter-spacing:.5px}
.progress-bar{height:7px;background:var(--navy-600);border-radius:4px;overflow:hidden;margin-top:.5rem}
.progress-fill{height:100%;background:var(--green);transition:width .2s}
.checklist{display:flex;flex-direction:column;gap:2px}
.check-item{display:flex;align-items:flex-start;gap:11px;padding:11px 0;border-bottom:1px solid #ffffff0a}
.check-item:last-child{border-bottom:none}
.check-item input[type=checkbox]{width:17px;height:17px;accent-color:var(--green);margin-top:2px;flex-shrink:0}
.ci-text{font-size:13.5px}
.ci-done{color:var(--ink-faint);text-decoration:line-through}
.ci-note{font-size:11.5px;color:var(--ink-faint);margin-top:3px}
.ci-noteinput{width:100%;background:var(--navy-900);border:1px solid var(--line);border-radius:6px;padding:5px 9px;color:var(--ink-dim);font-size:11.5px;margin-top:5px}
.doc-row{display:flex;align-items:center;gap:10px;padding:9px 11px;background:var(--navy-900);border:1px solid var(--line);border-radius:8px;margin-bottom:6px;font-size:12.5px}
.doc-ic{width:28px;height:28px;border-radius:6px;background:#60a5fa18;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.doc-meta{margin-left:auto;color:var(--ink-faint);font-size:11px;white-space:nowrap}
.upload{border:1.5px dashed var(--line);border-radius:9px;padding:1.3rem;text-align:center;color:var(--ink-faint);font-size:12.5px}
.comment{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #ffffff0a}
.cm-av{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--teal),#1d9c8c);color:#04201c;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:11px;flex-shrink:0}
.cm-who{font-size:12px;font-weight:600}
.cm-when{font-size:10.5px;color:var(--ink-faint)}
.cm-text{font-size:12.5px;color:var(--ink-dim);margin-top:2px}
/* Allow the longer brand name to wrap neatly in the narrow sidebar */
.brand-name {
    line-height: 1.15;
    word-break: break-word
}

.brand-sub {
    white-space: nowrap
}
/* ============================================================================
   Global print (#65): print ONLY the page content — drop the nav rail, the
   top bar, and anything marked .no-print. Every report inherits this, so a
   printed page is the document alone, not the app chrome.
   ============================================================================ */
@media print {
    .rail, .topbar { display: none !important; }
    /* thead repeats per printed page natively — sticky only gets in the way. */
    .tbl thead th, .grid-table thead th, .gt thead th, .rpt thead th {
        position: static; box-shadow: none; border-bottom: 1px solid var(--line); }
    /* A capped scroll box would print only what fits in it — uncap for print or the report truncates. */
    /*  .scroll and .report were the two missing, and both cost a printed report its right-hand columns.
        A page that declares ".report{overflow-x:auto}" for a wide table on screen keeps that box when it
        prints - so the dispatch invoice summary printed as far as EXCL. VAT and dropped VAT, TOTAL and
        the ZRA column off the paper, with a scrollbar rendered onto the page. Thirty-three pages use
        .report and five of them make it a scroll box. */
    .scroller, .tbl-wrap, .scroll, .report, [style*="overflow"] { max-height: none !important; overflow: visible !important; }
    .main { margin: 0 !important; }
    .content { margin: 0 !important; padding: 0 !important; }
    .no-print { display: none !important; }
    body, .app, .main, .content { background: #fff !important; }
    @page { margin: 12mm; }
}

/* Shared Export/Print actions (#65) — the ReportActions component's button group. */
.rpt-actions { display: inline-flex; gap: .4rem; align-items: center; }

/* A CHECKBOX AND ITS WORDS ARE ONE CONTROL. Filter bars were labelling them with .lbl, which is the
   small uppercase caption used above a field — so the box and its text stacked and wrapped, and
   "only on hold" came out as three lines down the side of a toolbar. */
.chk{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap;font-size:.82rem;color:var(--ink)}
.chk input{accent-color:#1e4c8f;margin:0}

/* ─── ORDER CONTROL CENTRE ────────────────────────────────────────────────────────────────────────
   The preview's visual language, defined ONCE rather than per page. Three screens share it — the
   centre, the supplier scorecard and one order — and the first cut of the pages carried only the
   plain table styling, which is why the built screens looked nothing like what was agreed.

   Four meanings, four colours, used for nothing else on these pages: late/short is warm red,
   waiting-on-us is amber, a quantity note is blue, a price note is plum, and healthy is teal. The
   colour is never the only carrier — every pill and bar sits beside its own number or words. */
:root{
  --occ-late:#e88a6c; --occ-late-ink:#e88a6c; --occ-late-bg:#2b1a18; --occ-late-line:#5e3026;
  --occ-wait:#f0b95e; --occ-wait-bg:#2b2113; --occ-wait-line:#5c4722;
  --occ-qty:#6fb2e0;  --occ-qty-bg:#16263c;  --occ-qty-line:#27486b;
  --occ-price:#b296dd; --occ-price-bg:#1f1a2e; --occ-price-line:#40345e;
  --occ-ok:#7fd4c8;   --occ-ok-bg:#142b27;   --occ-ok-line:#1f4a42;
}

/*  THE QUEUES. Each tile is somebody's job, so each one carries its own accent down the left edge
    and its count at a size you can read across a desk. */
.occ-queues{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:13px;margin-bottom:1.25rem}
.occ-q{background:var(--navy-800);border:1px solid var(--line);border-left:3px solid var(--line);
       border-radius:10px;padding:16px 18px}
.occ-q.late{border-left-color:#c4603f}
.occ-q.wait{border-left-color:#d99a3e}
.occ-q.qty{border-left-color:#3f7fb8}
.occ-q.price{border-left-color:#8a6bbf}
.occ-q.plain{border-left-color:var(--teal)}
.occ-ql{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);font-weight:600}
.occ-qv{font-size:30px;font-weight:600;line-height:1;margin-top:9px;font-variant-numeric:tabular-nums}
.occ-q.late .occ-qv{color:var(--occ-late)}
.occ-q.wait .occ-qv{color:var(--occ-wait)}
.occ-q.qty .occ-qv{color:var(--occ-qty)}
.occ-q.price .occ-qv{color:var(--occ-price)}
.occ-qs{font-size:12.5px;color:var(--ink-dim);margin-top:8px;line-height:1.45}

/*  A PERCENTAGE IS A LENGTH BEFORE IT IS A NUMBER. The rail is what makes a column of delivered
    figures scannable; the figure stays beside it because a bar alone cannot be read off. */
.occ-bar{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.occ-track{width:56px;height:7px;background:var(--navy-900);border-radius:4px;overflow:hidden;flex:none}
.occ-fill{height:100%;background:var(--teal)}
.occ-fill.mid{background:#d99a3e}
.occ-fill.low{background:#c4603f}

.occ-pill{display:inline-block;font-size:11px;letter-spacing:.03em;border-radius:999px;padding:3px 9px;
          white-space:nowrap;border:1px solid var(--line);background:var(--navy-700);color:var(--ink-dim)}
.occ-pill.late{color:var(--occ-late);border-color:var(--occ-late-line);background:var(--occ-late-bg)}
.occ-pill.wait{color:var(--occ-wait);border-color:var(--occ-wait-line);background:var(--occ-wait-bg)}
.occ-pill.qty{color:var(--occ-qty);border-color:var(--occ-qty-line);background:var(--occ-qty-bg)}
.occ-pill.price{color:var(--occ-price);border-color:var(--occ-price-line);background:var(--occ-price-bg)}
.occ-pill.ok{color:var(--occ-ok);border-color:var(--occ-ok-line);background:var(--occ-ok-bg)}

.occ-grade{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;
           border-radius:7px;font-weight:700;font-size:15px;background:var(--navy-700);color:var(--ink-dim)}
.occ-grade.a{background:var(--occ-ok-bg);color:var(--occ-ok)}
.occ-grade.b{background:var(--occ-wait-bg);color:var(--occ-wait)}
.occ-grade.c{background:var(--occ-late-bg);color:var(--occ-late)}
.occ-grade.sm{width:22px;height:22px;font-size:12px}

/*  WHERE THE DAYS GO. One bar to the scale of the whole cycle, each segment labelled with its own
    days, and a legend that says which of them are ours — which is the entire point of the panel. */
.occ-days{display:flex;height:34px;border-radius:6px;overflow:hidden;margin-bottom:14px}
.occ-seg{display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:600;
         color:var(--navy-900);min-width:0;overflow:hidden;white-space:nowrap}
.occ-seg.s1{background:#d99a3e}
.occ-seg.s2{background:#3f7fb8;color:#e9f2fb}
.occ-seg.s3{background:#4a93c9}
.occ-seg.s4{background:var(--occ-ok)}
.occ-legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}
.occ-dot{width:10px;height:10px;border-radius:2px;flex:none;display:inline-block}
.occ-legend b{font-size:13px;font-weight:600}
.occ-legend p{margin:5px 0 0;font-size:12.5px;color:var(--ink-dim);line-height:1.45}

/*  THE ONE SENTENCE A MANAGER IS MEANT TO LEAVE WITH, given the weight of a callout rather than
    the weight of a footnote. */
.occ-call{font-size:13.5px;line-height:1.6;color:#e2cfa8;background:var(--occ-wait-bg);
          border:1px solid var(--occ-wait-line);border-radius:8px;padding:13px 15px;margin:16px 0 0}
.occ-call b{color:#f0c074}

.occ-accent{border-left:3px solid #c4603f}

/*  ONE ORDER'S CLOCK. A rail down the left with a node per stage, so the gaps read as time. */
.occ-step{display:flex;gap:16px;align-items:flex-start}
.occ-rail{display:flex;flex-direction:column;align-items:center;flex:none;width:18px}
.occ-node{width:11px;height:11px;border-radius:50%;flex:none;margin-top:4px;background:var(--teal)}
.occ-node.wait{background:#d99a3e}
.occ-node.them{background:#4a93c9}
.occ-node.open{background:var(--navy-900);border:2px solid #c4603f}
.occ-line{width:2px;flex:1 1 auto;background:var(--line);min-height:28px}
.occ-when{display:flex;flex-wrap:wrap;gap:12px;align-items:baseline;padding-bottom:20px}


/*  THE SPACER THAT PUSHES THE REST OF A TOOLBAR RIGHT (1.9.783).
 *
 *  57 pages put <span class="grow"> in a flex row; only 22 of them defined the class in their own
 *  <style> block, so on the other 35 the spacer collapsed and the buttons huddled against the
 *  control to their left — the supplier account page among them. One global rule retires the
 *  copy-paste. The two pages that qualify it further (.sel.grow, .filters .f.grow) are more
 *  specific and still win; GroupedSalesReport puts the class on a <tr>, where flex is inert. */
.grow{flex:1 1 auto}

/*  A BAND OF FIGURES ABOVE A LEDGER — owed, not yet due, overdue, 90 days+ (1.9.783).
 *
 *  Eleven pages used the class; SEVEN carried their own byte-identical copy inside their own style
 *  block, and a style block in a .razor renders with THAT page and nowhere else. The other four got
 *  no rules at all, so the label span and the value b both stayed inline and a farm's account read
 *  "OwedZMW 0.00  Not yet due0.00  Overdue0.00" — every figure welded to its own label, on the
 *  screen that answers whether a supplier has been paid.
 *
 *  This is the geometry those seven already drew, so none of them changes; the colours come from the
 *  theme tokens instead of seven hardcoded copies of #0b2843. The four that were broken now join the
 *  house style rather than acquiring a style of their own. */
.summary-band{display:flex;flex-wrap:wrap;gap:22px;padding:10px 14px;
  background:var(--navy-700);border:1px solid var(--line);border-radius:8px;margin-bottom:12px}
.summary-band>div{display:flex;flex-direction:column;gap:3px}
.summary-band span{font-size:.72rem;color:var(--ink-dim);text-transform:uppercase;letter-spacing:.03em}
.summary-band b{font-size:1.05rem;font-variant-numeric:tabular-nums}
.summary-band b.warn{color:var(--amber)}
.summary-band b.bad{color:var(--red)}
@media print{
  .summary-band{background:#f2f2f2;border-color:#999}
  .summary-band span{color:#444}
  .summary-band b,.summary-band b.warn,.summary-band b.bad{color:#000}
}

/*  A FIGURE THAT SHOWS ITS WORKING (1.9.804) — the <Metric> component's styles, global.

    Rostand, 19 Oct 2026: "adopt this details to all the breakdown ... im talking about the
    explaination ... explanation make easy to read the report ... and understand."

    THESE WERE DEFINED THREE TIMES AND NOWHERE. BlockTest, Deboning and Sausage/Batches each carried
    their own .metric / .metric-l / .metric-v, and only BlockTest had .metric-n — which is precisely
    why only BlockTest ever explained a number: the other two had no style to hang an explanation on.
    Same shape as `.summary-band`, defined in seven pages and used by eleven.

    .grid-metrics stays per page: the column count is layout and genuinely differs (four on the block
    test, five on deboning). What must not differ is what a metric LOOKS like.  */
.metric   { background:#141c28; border:1px solid #223047; border-radius:8px; padding:10px 12px; }
.metric-l { display:block; font-size:.72rem; color:#8aa0b8; text-transform:uppercase; letter-spacing:.03em; }
.metric-v { display:block; font-size:1.15rem; font-weight:600; margin-top:2px; }
.metric-n { display:block; font-size:.66rem; color:#6d8199; margin-top:3px; line-height:1.35; }

/*  AND IT SURVIVES THE PRINTER. The explanation is the part a manager reads, so it must not come out
    as pale grey on white — the fault fixed for the report tables in 1.9.803.  */
@media print {
    .metric   { background:#fff !important; border:1px solid #333; }
    .metric-l { color:#333; }
    .metric-v { color:#111; }
    .metric-n { color:#333; }
    /*  THE VOUCHER CARD, TURNED THE RIGHT WAY UP FOR PAPER (1.9.842).

        A browser does not print background colours, so the dark card simply vanished — and the white
        text went with it, leaving the text-shadow behind as grey ghosting. Rostand printed a batch
        and got five cards of illegible halo. It is the fault this estate already has a rule about:
        print is the document, not the screen, and a screen printed dark arrives blank.

        So on paper the card inverts: white, black type, a hairline border where the screen had a
        glow. The artwork stays as a pale watermark, which a printer can actually lay down, and the
        barcode and QR are untouched because they are the two things that must scan. It also uses a
        fraction of the ink of a dark card, which matters at three hundred of them. */
    .vcard { background:#fff !important; color:#111 !important; border:1px solid #444 !important;
             box-shadow:none !important; }
    .vcard::before { opacity:.12 !important; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
    .vcard::after { background:none !important; }          /* the screen's gradient has no job here */
    .vscrim { text-shadow:none !important; }
    .vbrand, .vvalue, .vcode, .vto, .vid { color:#111 !important; }
    .vevent, .vlabel, .vfoot, .vfine { color:#555 !important; opacity:1 !important; }
    .vhead { border-bottom:1px solid #bbb !important; }
    .vlogo { background:none !important; box-shadow:none !important; padding:0 !important; }
    .vscan { box-shadow:none !important; border:1px solid #ccc; }
    .vsheet { gap:10px; }
    aside, nav, header, .no-print { display:none !important; }
}

/* ================================================================================================
   VOUCHER CARD — the one card, used by the single print and the batch sheet (1.9.835, redrawn 1.9.839)

   Lives here rather than in <style> inside VoucherCard.razor because a sheet of three hundred cards
   would otherwise carry three hundred copies of these rules. app.css is already linked on every page.

   THE ARTWORK FILLS THE CARD, AND THE TEXT STILL READS. Three attempts got here, all of them looked
   at on a real batch rather than reasoned about:
     cover            — cropped a square logo into a fragment of the word ZAMBEEF and half a bull.
     contain          — nothing cropped, but a square image is as tall as the card, so every line of
                        text sat on top of the logo. Faintness did not fix it at .22, .18 or .10.
     corner watermark — readable, and not a gift card: a flat rectangle with a mark in the corner.
   What works is the artwork across the whole card UNDER a gradient that is heaviest where the words
   are and lightest on the right, where the art shows. Rostand: "full art background", and before
   that "is dominating and info cannot be read" — both, not either.

   The LOGO, the BARCODE and the QR are never optional and no rule here hides one: .sm changes the
   card's SIZE, never its contents.
   ================================================================================================ */
.vcard { position:relative; width:540px; max-width:100%; min-height:340px; border-radius:16px;
         overflow:hidden; display:flex; background-color:#0d1613;
         border:1px solid rgba(255,255,255,.10); box-shadow:0 10px 30px rgba(0,0,0,.18); color:#fff; }
/*  The artwork, edge to edge. Handed in as --art by the component so it can only be drawn here. */
.vcard::before { content:""; position:absolute; inset:0; pointer-events:none; background-image:var(--art);
                 background-size:cover; background-position:center; opacity:.42; }
/*  Heaviest on the left where the words are, lightest on the right where the art is allowed to show. */
.vcard::after { content:""; position:absolute; inset:0; pointer-events:none;
                background:linear-gradient(100deg, rgba(8,16,13,.92) 0%, rgba(8,16,13,.80) 42%,
                                                   rgba(8,16,13,.45) 100%); }
.vscrim { position:relative; z-index:1; width:100%; box-sizing:border-box; padding:20px 24px 18px 26px;
          display:flex; flex-direction:column; text-shadow:0 1px 4px rgba(0,0,0,.8); }
.vhead { display:flex; align-items:center; justify-content:space-between; gap:14px;
         border-bottom:1px solid rgba(255,255,255,.16); padding-bottom:10px; margin-bottom:12px; }
/*  ON A WHITE CHIP, NOT KNOCKED TO WHITE (1.9.840). The first attempt was
    `filter:brightness(0) invert(1)`, which turns every pixel white — fine for a one-colour mark and
    ruinous for a real one: the Zambeef badge, which is red and black, printed as a solid white
    rectangle. Seen on the batch sheet, not reasoned about. A small white panel lets ANY logo read on
    a dark card, in its own colours, and matches the panel the barcode sits on. */
/*  BIG ENOUGH TO READ (1.9.842). It was 30px tall, which rendered a 271x186 logo at 39x26 — measured
    on the live page, not guessed — and at that size "Feeding the Nation / ZAMBEEF / Products PLC" is
    mush. On the card it read as a plain white rectangle, which is exactly what Rostand saw.
    A company mark with words in it needs about 60px of width before the words survive. */
.vlogo { height:48px; width:auto; max-width:160px; object-fit:contain; flex:none;
         background:#fff; border-radius:6px; padding:5px 8px;
         box-shadow:0 2px 8px rgba(0,0,0,.3); }
.vevent { font-size:9.5px; letter-spacing:.22em; text-transform:uppercase; opacity:.7; }
.vbrand { font-size:21px; font-weight:700; margin-top:3px; }
.vto { margin-top:10px; font-size:14px; }
.vid { font-size:12px; opacity:.8; font-variant-numeric:tabular-nums; }
.vmsg { font-size:12.5px; font-style:italic; opacity:.85; }
.vamount { margin-top:auto; padding-top:10px; }
.vvalue { font-size:40px; font-weight:800; line-height:1; letter-spacing:-.02em;
          font-variant-numeric:tabular-nums; }
.vlabel { font-size:9px; text-transform:uppercase; letter-spacing:.2em; opacity:.6; margin-top:2px; }
.vcode { margin-top:8px; font-family:ui-monospace,Consolas,monospace; font-size:14px;
         letter-spacing:.22em; font-variant-numeric:tabular-nums; }
/*  ONE WHITE PANEL FOR BOTH SYMBOLS. A scanner needs the contrast and the quiet zone, and on the card
    it reads as the part you present at the till rather than as two stickers. */
.vscan { display:flex; gap:10px; align-items:center; margin-top:10px; align-self:flex-start;
         background:#fff; border-radius:8px; padding:8px 10px; box-shadow:0 2px 10px rgba(0,0,0,.35); }
.vbarcode, .vqr { line-height:0; }
.vbarcode svg { display:block; height:40px; width:auto; max-width:230px; }
.vqr img { display:block; width:58px; height:58px; }
.vfoot { font-size:9.5px; opacity:.6; margin-top:7px; }
.vfine { font-size:9px; opacity:.45; margin-top:3px; }
/* A sheet of many: smaller card, same contents. */
.vcard.sm { width:auto; min-height:250px; box-shadow:none; }
.vcard.sm .vscrim { padding:16px 18px; }
.vcard.sm .vlogo { height:42px; max-width:140px; padding:4px 7px; }
.vcard.sm .vevent { font-size:10px; }
.vcard.sm .vbrand { font-size:19px; }
.vcard.sm .vto { font-size:13px; margin-top:8px; }
.vcard.sm .vid { font-size:11px; }
.vcard.sm .vmsg { font-size:11.5px; }
.vcard.sm .vvalue { font-size:30px; }
.vcard.sm .vlabel { font-size:9.5px; }
.vcard.sm .vcode { font-size:13px; margin-top:7px; letter-spacing:.18em; }
.vcard.sm .vbarcode svg { height:30px; max-width:150px; }
.vcard.sm .vqr img { width:50px; height:50px; }
.vcard.sm .vfoot { font-size:10px; margin-top:8px; }
/*  THE FINE PRINT STAYS ON A BATCH CARD TOO (1.9.846). It was hidden here to save a line, and the
    line it saves is "treat this voucher as cash — it cannot be replaced if lost", which is the only
    sentence on the card that tells somebody what they are holding. A card handed to staff needs it
    more than the one printed singly, not less. */
.vcard.sm .vfine { font-size:8.5px; margin-top:3px; }

/* The A4 sheet: two across, and a card is never split across a page. */
.vsheet { display:grid; grid-template-columns:repeat(2, 1fr); gap:14px; }
.vsheet > * { break-inside:avoid; page-break-inside:avoid; }

/* ================================================================================================
   THE STANDARD REPORT LETTERHEAD (ReportLetterhead.razor) — global, so every report that prints
   carries the SAME head without copying these rules (memory: all print letterheads adopt the Tax
   report style). The block is .print-only: hidden on the dark screen, shown black-on-white on paper.

   It lives here rather than in <style> inside the component because the project loads no scoped-CSS
   bundle — only css/app.css is linked — and because the letterhead is shared by fifty reports.
   ================================================================================================ */
.print-only { display:none; }

@media print {
    .print-only { display:block !important; }
    .letterhead { display:block !important; margin-bottom:12px; color:#000; }
    .lh-head { display:flex; justify-content:space-between; align-items:flex-start; gap:30px; }
    .lh-co { font-size:17pt; font-weight:800; letter-spacing:.3px; }
    /*  nowrap: the locale uses a space as the thousands separator and in a phone number, so a contact
        line or TPIN must not break mid-number (Rostand's standing rule for report figures). */
    .lh-line { font-size:9pt; color:#333; margin-top:2px; white-space:nowrap; }
    .lh-line .lh-k { color:#666; } .lh-line b { color:#000; }
    .lh-right { text-align:right; }
    .lh-title2 { font-size:13pt; font-weight:800; letter-spacing:.3px; }
    .lh-meta { font-size:9pt; color:#333; margin-top:2px; } .lh-meta b { color:#000; }
    .lh-rule { border-bottom:2px solid #000; margin-top:8px; }
    .lh-band { display:flex; flex-wrap:wrap; gap:26px; background:#f2f2f2; border:1px solid #ccc;
               border-top:none; padding:5px 10px; font-size:9pt; color:#555; }
    .lh-band .lh-k { color:#777; } .lh-band b { color:#000; }

    /* ============================================================================================
       REPORT PRINT FOUNDATION — a report opts in by wrapping its printable content in `.report`.
       The screen is dark; paper is a document (the standing rule: print is the document, not the
       screen, and a screen printed dark arrives blank). Everything inside `.report` goes black on
       white; the app chrome and anything .no-print is already dropped by the print blocks above.
       Page-specific print rules still live on the page; this is the shared floor.  */
    .report { background:#fff !important; color:#000 !important; border:none !important;
              box-shadow:none !important; }
    .report .panel, .report .panel-b { background:#fff !important; color:#000 !important;
              border-color:#ccc !important; box-shadow:none !important; }
    .report .muted, .report .lbl { color:#444 !important; }
    .report table, .report th, .report td { color:#000 !important; background:#fff !important;
              border-color:#bbb !important; }
    .report .metric { background:#fff !important; border-color:#333 !important; }
    .report .metric-l, .report .metric-n { color:#333 !important; }
    .report .metric-v { color:#111 !important; }
    /* The house .ctile KPI cards: dark fill won't print and the light label would vanish, so force the
       card white and its label/value dark (the value inherits, the label and warn colour do not). */
    .report .ctile { background:#fff !important; border-color:#999 !important; }
    .report .ctile-l { color:#444 !important; }
    .report .ctile-v, .report .ctile-v.warn, .report .ctile-v.neg { color:#000 !important; }
    /* Numbers never wrap — the locale's space thousands-separator would split one across two lines. */
    .report td.num, .report th.num, .report .mono { white-space:nowrap; }
}

/* ================================================================================================
   THE "PROVE THE NUMBERS" NOTE — the .proof / .line house classes (the standing REPORTS rule).
   Used by 14 reports but previously defined ONLY inside Transactions, so every other report rendered
   the note as unstyled inline spans that ran together — DebtorsAgeing printed "…the share does
   not.343 account(s)…" with no break between distinct notes. Global now, so each .line is its own
   line on every report, and the .warn variant DebtorsAgeing uses actually has a colour.
   ================================================================================================ */
.proof { margin-top:12px; padding:9px 13px; border-radius:6px; font-size:.87rem; }
.proof.ok   { background:#16281c; border:1px solid #2f6b3f; }
.proof.warn { background:#2a2614; border:1px solid #7a6a2f; }
.proof.bad  { background:#2a1414; border:1px solid #7a2f2f; }
.proof.wait { background:#17202b; border:1px solid #3a4a5e; }   /* still to be counted: neither good nor bad (1.9.1131) */
.proof .line { display:block; margin-top:5px; color:var(--ink-dim, #b9c8da); }
.proof .warn-line { color:var(--amber, #f5a623); }

@media print {
    .proof { border:1px solid #999 !important; color:#000 !important; background:#fff !important; }
    .proof .line, .proof .warn-line { color:#000 !important; }
}

/*  t65 (Rostand, 22 Nov 2026, on Pre-orders at 1.9.1076: the tab row and the search row were the browser's own grey buttons and
    white boxes). The .ta-tabs row was styled only inside InvoiceApprovals.razor, so Pre-orders and Lay-bys looked right only
    after that page had been opened once. Site-wide now, like .tabs above: the open tab underlined in amber. And the search and
    filter boxes on those pages in the app's dark field look. */
.ta-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 12px;border-bottom:1px solid var(--line)}
.ta-tabs button{background:none;border:0;border-bottom:2px solid transparent;color:var(--ink-dim);padding:9px 15px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;margin-bottom:-1px}
.ta-tabs button:hover{color:var(--ink)}
.ta-tabs button.on{color:var(--ink);border-bottom-color:var(--amber)}
.po-filters input,.po-filters select,.lbi-tools input,.lbi-tools select{background:var(--navy-800);border:1px solid var(--line);border-radius:7px;padding:7px 11px;color:var(--ink);font:inherit;font-size:13px}
.po-filters input::placeholder,.lbi-tools input::placeholder{color:var(--ink-dim)}
.po-filters .btn-ghost,.lbi-tools .btn-sm{border-radius:7px}
/*  The controls a page adds to the shared filter bar (after its hairline) in the bar's own field look, not the browser's. */
.sfb-split ~ select,.sfb-split ~ input:not([type=checkbox]){background:var(--navy-900);border:1px solid var(--line);border-radius:7px;padding:8px 11px;color:var(--ink);font:inherit;font-size:13px}

/*  t65 (Rostand, 22 Nov 2026: "keep the same format for all hospitality reports"; PREVIEW-hospitality-reports-format.html, "go
    ahead"): THE HOSPITALITY REPORT FRAME, Transactions' look. Tiles on top with their working; one line per row, nothing wraps,
    the table scrolls sideways in its own box (never the table itself: FrozenHeaderTests); the document number gold on its first
    line and the lines under it dimmed. Print keeps the light document layout the pages already have. */
.hx-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 10px}
.hx-tools .sel{width:auto}
.hx-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));border:1px solid var(--line);border-radius:8px;overflow:hidden;margin:0 0 6px}
.hx-tile{padding:.55rem .9rem;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:3px;background:var(--navy-800)}
.hx-tile:last-child{border-right:none}
.hx-tile span{font-size:.68rem;text-transform:uppercase;letter-spacing:.07em;color:var(--ink-dim)}
.hx-tile b{font-size:1.1rem;font-variant-numeric:tabular-nums}
.hx-tile.big b{color:var(--amber);font-size:1.25rem}
.hx-work{color:var(--ink-dim);font-size:.85rem;margin:6px 0 12px}
.hx-scroll{overflow-x:auto}
.hx-cols{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.35rem 1rem;padding:.3rem .2rem .7rem;max-width:900px}
.hx-cols label{display:inline-flex;gap:.35rem;align-items:center;white-space:nowrap}
@media screen{
  table.tbl.hx th,table.tbl.hx td{white-space:nowrap;padding:4px 10px}
  table.tbl.hx tbody tr:nth-child(odd)>td{background:#10233a}
  table.tbl.hx tbody tr:nth-child(even)>td{background:#0d1d31}
  table.tbl.hx tbody tr:hover>td{background:#16304a}
  table.tbl.hx td.hx-no{color:#e8bd63;font-weight:600;font-family:Consolas,monospace}
  table.tbl.hx tr.hx-cont td.hx-no,table.tbl.hx tr.hx-cont td.hx-dim{color:#7f93a8;font-weight:400}
}
table.tbl.hx tr.hx-first>td{border-top:2px solid var(--line)}
table.tbl.hx td.num,table.tbl.hx th.num{text-align:right;font-variant-numeric:tabular-nums}
table.tbl.hx td.hx-name{font-weight:600}
/*  The Clear button on the Pre-orders and Lay-bys filter rows (Rostand's screenshot, 22 Nov: still the browser's own grey). */
.po-filters .btn-ghost{background:var(--navy-700);border:1px solid var(--line);color:var(--ink-dim);border-radius:7px;padding:7px 12px;font:inherit;font-size:13px;cursor:pointer}
.po-filters .btn-ghost:hover{color:var(--ink);border-color:var(--amber)}

/* t69 QC2 (agreed 24 Nov 2026, Rostand: "Till shouldn't refuse but we can highlighted the product in red"): a product on QC hold at
   the shop, on a transfer, an invoice or a delivery. Never refused; red, with the reason under it. */
tr.qc-held > td { background: rgba(239,68,68,.12); }
.qc-held-note { display: block; color: var(--red); font-size: 12px; font-weight: 600; margin-top: 3px; }
