/* GCC Finance Suite. Load after the original embedded stylesheet. */
:root,
:root[data-theme="light"] {
  --paper: #f4f6f8;
  --card: #ffffff;
  --surface-soft: #f8f9fb;
  --ink: #20252d;
  --ink-2: #495463;
  --mute: #637083;
  --line: #e4e8ee;
  --line-2: #cbd3df;
  --blue: #2362c9;
  --blue-ink: #205bbd;
  --blue-bg: #edf3ff;
  --green: #267049;
  --green-bg: #edf6f0;
  --green-line: #cbded1;
  --amber: #875716;
  --amber-bg: #fbf4e8;
  --amber-line: #e6d5b8;
  --red: #a63b39;
  --red-bg: #fcf0ef;
  --red-line: #eccfcd;
  --grey-bg: #edf0f4;
  --btn: #245fc3;
  --btn-ink: #ffffff;
  --btn-hover: #1b4d9f;
  --navy: var(--blue-ink);
  --navy-bg: var(--blue-bg);
  --bronze: var(--line-2);
  /* Chart fills, four slots, carrying the meaning Paul's dashboard already gave them: labour blue,
     parts green, services gold, fail and tax owed red.

     Validated with the palette checker against this surface, for the combinations that ACTUALLY
     co-occur — which is the honest test. Gold and red fail badly against each other (ΔE 3.6 deutan)
     but they never share a chart, so forcing a clean four-way pass would have moved a hue to settle
     a clash nobody can see.
       labour + parts + services   all-pairs, worst ΔE 6.7 protan / 16.6 normal — legal with the
                                   legend every multi-series chart carries
       blue + red (pass / fail)    ΔE 23.1 protan
     Green and red together fail CVD outright, so they are never the ONLY cue: a figure keeps its
     minus sign and a bar keeps its side of the zero line, and the colour only agrees with them.

     These are not the --blue/--green text tokens, which sit at L 0.77 — above the band for a fill,
     because they were picked to be read as type rather than seen as area. */
  --chart-1: #2362c9;
  --chart-2: #1f7a4d;
  --chart-3: #9c5d0e;
  --chart-4: #b03a38;
  --chart-grid: var(--line);
  --bronze-2: var(--line);
  --shadow: 0 2px 5px rgba(29, 42, 60, .025);
  --r: 10px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: var(--sans);
  --sidebar-width: 232px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111419;
    --card: #1a1e25;
    --surface-soft: #20252d;
    --ink: #edf0f5;
    --ink-2: #bec7d3;
    --mute: #98a5b7;
    --line: #2c333f;
    --line-2: #465264;
    /* Dark fills get their own steps, not a flip of the light ones: the dark text tokens are
       L 0.77 and the dark band for a filled mark is 0.48-0.67. Validated against #1a1e25. */
    --chart-1: #4f8ae4;
    --chart-2: #3aa86c;
    --chart-3: #ba8a2e;
    --chart-4: #d4605c;
    --chart-grid: var(--line);
    --blue: #8ab5ff;
    --blue-ink: #8ab5ff;
    --blue-bg: #23334d;
    --green: #90c8a8;
    --green-bg: #1e332a;
    --green-line: #3b5947;
    --amber: #e2bd81;
    --amber-bg: #352e23;
    --amber-line: #61503a;
    --red: #f1aaa5;
    --red-bg: #3a2628;
    --red-line: #6c4546;
    --grey-bg: #262d38;
    --btn: #326acc;
    --btn-hover: #2b5cb3;
    --shadow: 0 2px 5px rgba(0, 0, 0, .08);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #111419;
  --card: #1a1e25;
  --surface-soft: #20252d;
  --ink: #edf0f5;
  --ink-2: #bec7d3;
  --mute: #98a5b7;
  --line: #2c333f;
  --line-2: #465264;
  --blue: #8ab5ff;
  --blue-ink: #8ab5ff;
  --blue-bg: #23334d;
  --green: #90c8a8;
  --green-bg: #1e332a;
  --green-line: #3b5947;
  --amber: #e2bd81;
  --amber-bg: #352e23;
  --amber-line: #61503a;
  --red: #f1aaa5;
  --red-bg: #3a2628;
  --red-line: #6c4546;
  --grey-bg: #262d38;
  --btn: #326acc;
  --btn-hover: #2b5cb3;
  --shadow: 0 2px 5px rgba(0, 0, 0, .08);
  color-scheme: dark;
}

html { min-width: 320px; scroll-padding-top: 24px; }
body { font: 400 14px/1.55 var(--sans); }
button, input, select, textarea { font-family: var(--sans); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
::selection { background: var(--blue-bg); color: var(--ink); }
[hidden] { display: none !important; }

/* Application frame */
.app-shell {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
}
/* THE MENU STAYS IN VIEW (Josh, 15 Sep 2026): fixed to the viewport, its own
   scrollbar if the nav is taller than the screen; the workspace is pushed over by
   the same width. Below 760px the mobile rule turns it back into a top bar. */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 14px 16px;
  background: var(--card);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  z-index: 30;
}
.sidebar-brand { padding: 0 12px 22px; }
.brand-logo {
  display: block;
  width: 148px;
  height: 148px;
  max-width: 100%;
  margin: 0 0 17px;
  border-radius: 13px;
  object-fit: contain;
  background: #141414;
}
.brand-title { color: var(--ink); font-size: 15px; line-height: 1.4; font-weight: 650; letter-spacing: -.025em; }
.brand-sub { margin-top: 3px; color: var(--mute); font-size: 11.5px; line-height: 1.5; }
.sidebar .nav {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}
.nav-group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nav-group-label { padding: 0 13px 5px; color: var(--mute); font-size: 11px; font-weight: 550; letter-spacing: .025em; }
.sidebar .nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}
.sidebar .nav button svg { flex: 0 0 18px; width: 18px; height: 18px; }
.sidebar .nav button:hover { background: var(--surface-soft); color: var(--ink); }
.sidebar .nav button[aria-current="page"] { background: var(--blue-bg); color: var(--blue-ink); font-weight: 600; }
.sidebar .nav button[aria-current="page"]::after { content: none; }
.sidebar-footer {
  margin: auto 9px 0;
  padding: 22px 4px 2px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--mute);
  overflow-wrap: anywhere;
}
.sidebar-footer b, .sidebar-footer strong { color: var(--ink-2); font-weight: 600; }
.workspace { min-width: 0; margin-left: var(--sidebar-width); }
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 104px;
  padding: 22px 34px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.page-heading { min-width: 0; }
.page-heading small, .eyebrow { display: block; margin: 0 0 5px; color: var(--mute); font-size: 11.5px; font-weight: 500; letter-spacing: .01em; }
.page-heading h1 { margin: 0; color: var(--ink); font: 600 25px/1.25 var(--sans); letter-spacing: -.045em; }
.top-acts { gap: 8px; flex-wrap: nowrap; }
.top-acts .btn { min-height: 40px; padding: 10px 13px; font-size: 12.5px; }
.top-acts #theme { width: 40px; justify-content: center; padding: 10px; }
.wrap { max-width: 1500px; margin: 0 auto; padding: 30px 34px 64px; }

/* Controls and form fields */
.btn {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.2;
  box-shadow: 0 1px 1px rgba(10, 20, 35, .025);
}
.btn:hover { background: var(--surface-soft); border-color: var(--line-2); color: var(--ink); }
.btn-primary { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-ink); }
.btn:disabled { cursor: not-allowed; box-shadow: none; }
.btn-link { font-size: 12.5px; line-height: 1.5; text-underline-offset: 3px; }
.grid { gap: 17px; margin-bottom: 20px; }
.fld { min-width: 0; }
.fld label, .gate label, .pop label {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 7px;
}
.fld input, .fld select, .fld textarea, .gate input, .pop input {
  min-height: 43px;
  background: var(--card);
  border-color: var(--line-2);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
}
.fld textarea { width: 100%; padding: 11px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--mute); opacity: 1; }
.hint { color: var(--mute); font-size: 13px; line-height: 1.65; margin: 0 0 20px; max-width: 80ch; }
.pop { border-color: var(--line); box-shadow: 0 12px 36px rgba(10, 20, 35, .16); padding: 20px; }
.pop input { background: var(--surface-soft); }

/* Dashboard */
.command-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 25px; }
.command-intro { max-width: 68ch; }
.command-intro h2 { margin: 0 0 7px; color: var(--ink); font: 600 24px/1.3 var(--sans); letter-spacing: -.035em; }
.command-intro p { margin: 0; color: var(--mute); font-size: 13.5px; line-height: 1.7; }
.command-hero .range { margin-top: 1px; }
.command-hero .range > .btn { min-height: 42px; }
.statusrow { align-items: stretch; gap: 12px; margin-bottom: 22px; }
.status { min-height: 47px; border-color: var(--green-line); background: var(--green-bg); color: var(--green); padding: 12px 16px; font-size: 12.5px; font-weight: 500; }
.status.bad { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }
.status-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 0 0 23px; padding: 13px 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.status-item { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.status-item svg { flex: 0 0 auto; width: 16px; height: 16px; }
.status-item.good { color: var(--green); }
.status-item.bad { color: var(--red); }
.status-item.warn { color: var(--amber); }
.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 22px; }
.kpi { position: relative; min-width: 0; padding: 21px 21px 22px; border-color: var(--line); border-radius: 12px; }
.kpi > div:first-child { min-width: 0; width: 100%; }
.kpi .t { min-height: 30px; padding-right: 40px; color: var(--mute); font-size: 12px; font-weight: 500; line-height: 1.4; margin-bottom: 19px; }
.kpi .v { color: var(--ink); font-family: var(--sans); font-size: clamp(25px, 2.1vw, 31px); font-weight: 600; line-height: 1.15; letter-spacing: -.045em; overflow-wrap: anywhere; }
.kpi .ic { position: absolute; top: 18px; right: 18px; width: 33px; height: 33px; border-radius: 9px; }
.kpi .ic svg { width: 18px; height: 18px; }
.kpi .kpi-note { margin: 8px 0 0; color: var(--mute); font-size: 12px; font-weight: 500; line-height: 1.35; }
.supplier-position-note { margin: -6px 0 16px; }
.supplier-month { margin: 0 0 18px; padding-bottom: 4px; }
.supplier-month-h { margin: 2px 0 8px; color: var(--ink); font: 700 15px var(--sans); letter-spacing: -.01em; }
.supplier-month-k { margin: 12px 0 6px; color: var(--ink-2); font: 600 12.5px var(--sans); }
.supplier-month-net { margin: 8px 0 0; color: var(--ink-2); font-size: 13px; }
.supplier-month-net b { color: var(--ink); font-weight: 600; }
.kpi.blue .v, .kpi.navy .v, .kpi.grey .v, .kpi.green .v { color: var(--ink); }
.kpi.amber .v { color: var(--amber); }
.kpi.blue .ic, .kpi.navy .ic { color: var(--blue-ink); background: var(--blue-bg); }
.metrics-note { margin: -8px 0 24px; color: var(--mute); font-size: 11.5px; line-height: 1.65; }
.panels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 22px; }
.attention-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.attention-item { display: flex; align-items: center; gap: 15px; min-height: 76px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.attention-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.attention-item:first-child { padding-top: 5px; }
.attention-item > div { flex: 1; min-width: 0; }
.attention-item h3, .attention-item strong { display: block; margin: 0 0 4px; color: var(--ink); font-size: 13px; font-weight: 550; line-height: 1.5; }
.attention-item p, .attention-item small { display: block; margin: 0; color: var(--mute); font-size: 12px; line-height: 1.6; }
.attention-item > svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--amber); }
.attention-item .btn, .attention-item .btn-link { flex: 0 0 auto; }

/* Ledger surfaces and dense financial data */
.panel { min-width: 0; border-color: var(--line); border-radius: 12px; }
.panel-h { align-items: center; padding: 22px 24px 18px; gap: 12px; flex-wrap: wrap; }
.panel-h h2 { color: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1.5; letter-spacing: -.02em; }

/* ── Headings ──────────────────────────────────────────────────────────────
   Paul, 10 Oct: "the headings dont seem to stand out, could we make the headings across the suite
   BOLD with an accent". They did not stand out because they were not meant to: the card titles were
   grey on grey at 12px, which reads as a caption on the figure below rather than as the name of the
   thing. Full ink and 700 fixes the weight.

   The accent is three pixels of the house blue and no more. Blue is the only saturated colour on
   these pages — it is what a link and a primary button are made of — so a heading SET in it would
   compete with every control, and eleven blue headings would be a worse problem than quiet ones. A
   short rule before the text points at the heading without being part of the word, and it repeats
   on every panel and every card, which is what makes it read as structure rather than decoration. */
.panel-h h2, .board-h h2 { color: var(--ink); }
.panel-h h2::before, .board-h h2::before {
  content: ""; display: inline-block; width: 3px; height: .82em; border-radius: 2px;
  margin-right: 9px; background: var(--blue); vertical-align: -.06em;
}
/* A backgrounded rule is the first thing a printer drops, and a heading that loses its mark on
   paper is just a heading. Ink, where the colour was never the point. */
@media print { .panel-h h2::before, .board-h h2::before { background: var(--ink); } }
.panel-h .rt { min-width: 0; }
.panel-b { padding: 0 24px 23px; }
.line { padding: 13px 0; border-bottom-color: var(--line); font-size: 13px; line-height: 1.55; }
.line .amt { font-size: 13px; font-weight: 500; }
.line.total { margin: 10px -24px 0; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-soft); font-size: 13px; font-weight: 600; }
.line.total .amt { font-weight: 600; }
.badge { border: 1px solid var(--amber-line); background: var(--amber-bg); color: var(--amber); font-size: 10.5px; font-weight: 550; line-height: 1.3; padding: 4px 8px; }
/* Older templates set these status border values inline. Keep them themed. */
.badge[style*="border-color:#D3DEEA"] { border-color: var(--line-2) !important; }
.badge[style*="border-color:#CFE3D7"] { border-color: var(--green-line) !important; }
span[style*="color:#9B2C20"] { color: var(--red) !important; }
.tbl-scroll { max-width: 100%; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.tbl-scroll > table { min-width: 500px; }
thead th { padding: 6px 12px 12px; border-bottom-color: var(--line); color: var(--mute); font-size: 11.5px; font-weight: 500; line-height: 1.5; text-transform: none; letter-spacing: 0; }
tbody td { padding: 14px 12px; border-bottom-color: var(--line); font-size: 13px; line-height: 1.65; vertical-align: middle; }
tfoot td { padding: 14px 12px 0; color: var(--ink); font-size: 13px; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
td.date { width: 82px; font-size: 12px; }
td.num, td.r { font-variant-numeric: tabular-nums; }
tr.row-go:hover td { background: var(--surface-soft); }
table .sel { max-width: 260px; min-height: 36px; }
.notice { margin-top: 20px; padding-top: 0; color: var(--mute); font-size: 11.5px; line-height: 1.75; max-width: 100ch; }
.notice p { margin-bottom: 7px; }
.msg { padding: 13px 16px; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.msg.err { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }
.msg.ok { border-color: var(--green-line); background: var(--green-bg); color: var(--green); }
.empty { padding: 35px 15px; font-size: 13px; line-height: 1.75; }
.skel { padding: 30px 4px; font-size: 13px; }

/* Sign-in uses the same unmodified GCC artwork. */
.gate { max-width: 440px; margin: 9vh auto; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.gate .pound { width: 150px; height: 150px; margin-bottom: 23px; }
.gate .pound .brand-logo, .gate > .brand-logo { width: 150px; height: 150px; margin: 0 auto 23px; }
.gate h1 { font: 600 26px/1.3 var(--sans); color: var(--ink); letter-spacing: -.04em; }
.gate .sub { color: var(--mute); font-size: 12.5px; margin: 8px 0 28px; }
.gate input { background: var(--surface-soft); }
.gate .btn { margin-top: 15px; min-height: 46px; }
.gate .note { color: var(--mute); font-size: 11.5px; margin-top: 18px; }

@media (max-width: 1280px) {
  :root, :root[data-theme] { --sidebar-width: 208px; }
  .topbar { padding: 22px 26px; }
  .wrap { padding: 26px 26px 56px; }
  .kpi { padding: 19px 18px; }
  .kpi .ic { top: 16px; right: 15px; }
  .kpi .t { padding-right: 33px; }
  .panel-h { padding-left: 21px; padding-right: 21px; }
  .panel-b { padding-left: 21px; padding-right: 21px; }
  .line.total { margin-left: -21px; margin-right: -21px; padding-left: 21px; padding-right: 21px; }
}

@media (max-width: 1120px) {
  :root, :root[data-theme] { --sidebar-width: 192px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .sidebar-brand { padding-left: 10px; padding-right: 10px; }
  .brand-logo { width: 132px; height: 132px; }
  .sidebar .nav button { padding-left: 10px; padding-right: 9px; font-size: 12px; }
  .nav-group-label { padding-left: 10px; }
  /* Some existing screens explicitly request three summary columns inline. */
  .cards, .cards[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .kpi .v { font-size: 29px; }
  .command-hero { flex-wrap: wrap; gap: 15px; }
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 15px; }
  .top-acts { margin-left: auto; }
  .page-heading h1 { font-size: 23px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 16px; }
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; height: auto; padding: 14px 0 0; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .workspace { margin-left: 0; }
  .sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 18px 13px; flex-wrap: wrap; }
  .brand-logo { width: 56px; height: 56px; margin: 0; border-radius: 8px; }
  .brand-title { font-size: 14px; }
  .brand-sub { font-size: 11px; }
  .sidebar .nav { flex-direction: row; gap: 17px; padding: 0 18px 10px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .nav-group { flex-direction: row; gap: 5px; flex: 0 0 auto; }
  .nav-group-label { display: none; }
  .sidebar .nav button { width: auto; padding: 10px 12px; min-height: 42px; white-space: nowrap; font-size: 12px; }
  .sidebar .nav button svg { width: 16px; height: 16px; flex-basis: 16px; }
  .sidebar-footer { margin: 0; padding: 0 18px 10px; font-size: 10.5px; }
  .topbar { min-height: 0; padding: 22px 20px; align-items: center; gap: 17px; }
  .top-acts { width: auto; margin-left: auto; }
  .top-acts .btn { flex: 0 0 auto; font-size: 12px; }
  .wrap { padding: 23px 20px 48px; }
  .command-intro h2 { font-size: 22px; }
  .command-intro p { font-size: 13px; }
  .command-hero { margin-bottom: 21px; }
  .status { flex-basis: 100%; }
  .cards { gap: 12px; }
  .kpi { padding: 19px 18px; }
  .kpi .v { font-size: 27px; }
  .panel-h { padding: 19px 20px 15px; }
  .panel-b { padding: 0 20px 20px; }
  .line.total { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .panel-h .rt[style*="display:flex"] { flex-wrap: wrap; }
  .gate { margin: 6vh auto; }
}

@media (max-width: 520px) {
  .page-heading h1 { font-size: 23px; }
  .topbar { padding: 20px 16px; }
  .top-acts { width: 100%; margin-left: 0; gap: 7px; }
  .top-acts .btn { flex: 1 1 auto; justify-content: center; padding-left: 10px; padding-right: 10px; }
  .top-acts #theme { flex: 0 0 40px; }
  .wrap { padding: 21px 16px 44px; }
  .cards, .cards[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .kpi { padding: 18px 20px; }
  .kpi .t { min-height: 0; margin-bottom: 12px; padding-right: 38px; }
  .kpi .v { font-size: 29px; }
  .kpi .ic { top: 18px; right: 18px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .fld input, .fld select, .fld textarea, .gate input, .pop input { font-size: 16px; }
  .range, .range > .btn { width: 100%; justify-content: center; }
  .command-hero { gap: 17px; }
  .status-strip { align-items: flex-start; flex-direction: column; gap: 9px; }
  .panel-h { gap: 9px; padding-left: 18px; padding-right: 18px; }
  .panel-h h2 { font-size: 14px; }
  .panel-b { padding-left: 18px; padding-right: 18px; }
  .line { flex-wrap: wrap; gap: 7px; }
  .line .amt { margin-left: auto; }
  .line.total { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .attention-item { flex-wrap: wrap; gap: 11px; }
  .attention-item > div { flex-basis: calc(100% - 36px); }
  .attention-item .btn { min-height: 38px; }
  .gate { width: calc(100% - 32px); padding: 25px 23px; }
}

.trend-panel { margin: 22px 0; }
.finance-chart { width: 100%; height: auto; min-height: 180px; }
.finance-chart text { fill: var(--mute); font-size: 12px; font-family: inherit; }
.chart-axis { stroke: var(--line); }
.chart-revenue { fill: var(--blue); }
.chart-cost { fill: var(--mute); opacity: .7; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.chart-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 7px; background: var(--mute); }
.chart-legend .legend-revenue::before { background: var(--blue); }
.activity-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.activity-row > div { min-width: 0; overflow-wrap: anywhere; }
.activity-row > .num { flex: 0 0 auto; white-space: nowrap; }
.activity-row strong { font-size: 14px; font-weight: 500; }
.activity-row small { display: block; color: var(--mute); margin-top: 5px; }
.status-strip .status-item { flex: 1 1 170px; flex-direction: column; align-items: flex-start; gap: 0; }
.status-item b, .status-item span { display: block; }
.status-item b { font-size: 13px; font-weight: 600; }
.status-item span { font-size: 11px; margin-top: 4px; color: var(--mute); }
.panel + .panel { margin-top: 20px; }
#supplier-back { margin-bottom: 20px; }
label[for="sp-memo"] { display: block; color: var(--ink-2); font-size: 12px; font-weight: 500; margin-bottom: 7px; }
#sp-memo { display: block; width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 14px; }
#sp-record { margin-top: 20px; }
details summary { cursor: pointer; margin-top: 14px; color: var(--mute); font-size: 13px; padding: 8px 0; }
@media (max-width: 520px) {
  .status-strip .status-item { flex: 0 1 auto; width: 100%; }
  #sp-memo { font-size: 16px; }
  #hmrc-connect, #hmrc-disconnect { width: 100%; justify-content: center; white-space: normal; }
  #hmrc-disconnect { margin: 10px 0 0 !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .sidebar .nav button { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  :root, :root[data-theme="dark"] { --paper: #fff; --card: #fff; --surface-soft: #f5f5f5; --ink: #111; --ink-2: #333; --mute: #555; --line: #ccc; --line-2: #bbb; color-scheme: light; }
  .app-shell { display: block; }
  .sidebar, .top-acts, .range, .btn, .btn-link { display: none !important; }
  .topbar { border: 0; padding: 0 0 20px; }
  .wrap { max-width: none; padding: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .panel, .kpi { box-shadow: none; break-inside: avoid; }
  .tbl-scroll { overflow: visible; }
  .tbl-scroll > table { min-width: 0; }
  .notice { color: #555; }
}

/* Direct QuickBooks import and source-record review. */
.qbo-view { min-width: 0; }
.qbo-view > .panel { margin: 20px 0 0; min-width: 0; }
.qbo-view .panel-b { min-width: 0; }
.qbo-view h2, .qbo-view dd, .qbo-view td { overflow-wrap: anywhere; }
.qbo-view .btn { white-space: normal; justify-content: center; line-height: 1.4; }
.qbo-view .btn-link { min-height: 36px; }
.qbo-view input[type="checkbox"] { width: 19px; height: 19px; min-height: 19px; margin: 0; padding: 0; flex: 0 0 19px; accent-color: var(--btn); cursor: pointer; }
.qbo-view input[type="checkbox"]:disabled { cursor: not-allowed; }
.qbo-view input[type="checkbox"]:focus-visible, .qbo-table-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.qbo-connection { padding-top: 23px; }
.qbo-connection-heading, .qbo-progress-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.qbo-connection-heading h2 { margin: 0 0 8px; color: var(--ink); font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
.qbo-eyebrow { margin: 0 0 8px; font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--mute); }
.qbo-tags, .qbo-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.qbo-tag { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-soft); color: var(--ink-2); font-size: 11px; font-weight: 500; }
.qbo-actions { margin: 17px 0 8px; }
.qbo-small { font-size: 12px; line-height: 1.75; color: var(--mute); margin: 12px 0; overflow-wrap: anywhere; }
.qbo-message { border: 1px solid var(--line-2); background: var(--surface-soft); color: var(--ink-2); }
.qbo-review-note { padding: 16px 20px; margin: 20px 0; border: 1px solid var(--amber-line); border-radius: 9px; color: var(--amber); background: var(--amber-bg); font-size: 13px; line-height: 1.7; }
.qbo-review-note strong { font-weight: 600; }
.qbo-review-note p { margin: 5px 0 0; }
.qbo-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.qbo-stat { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-width: 0; }
.qbo-stat span { font-size: 11px; line-height: 1.6; color: var(--mute); }
.qbo-stat strong { font-size: 28px; line-height: 1.2; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.04em; overflow-wrap: anywhere; }
.qbo-confirm { display: flex; align-items: flex-start; gap: 12px; margin: 21px 0; padding: 16px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-soft); font-size: 13px; line-height: 1.65; cursor: pointer; }
.qbo-confirm input { margin-top: 2px !important; }
.qbo-entity-picker { padding: 5px 0; }
.qbo-entity-picker summary { color: var(--ink-2); font-size: 13px; }
.qbo-entity-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px 18px; padding: 10px 0 15px; }
.qbo-entity-options label { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.7; cursor: pointer; }
.qbo-progress-heading { margin: 22px 0 10px; align-items: center; font-size: 13px; }
.qbo-progress-heading span { color: var(--mute); font-size: 12px; }
.qbo-view progress { appearance: none; display: block; width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 8px; background: var(--grey-bg); color: var(--blue); accent-color: var(--blue); }
.qbo-view progress::-webkit-progress-bar { background: var(--grey-bg); }
.qbo-view progress::-webkit-progress-value { background: var(--blue); border-radius: 8px; }
.qbo-view progress::-moz-progress-bar { background: var(--blue); border-radius: 8px; }
.qbo-table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; margin: 16px 0; border: 1px solid var(--line); border-radius: 8px; }
.qbo-table-scroll > table { min-width: 650px; margin: 0; }
.qbo-table-scroll > .qbo-history-table { min-width: 1040px; }
.qbo-table-scroll > .qbo-contact-table { min-width: 850px; }
.qbo-table-scroll th { background: var(--surface-soft); }
.qbo-table-scroll td { vertical-align: top; }
.qbo-amount { white-space: nowrap; }
.qbo-conflict { display: block; margin-top: 6px; color: var(--amber); font-size: 11px; }
.qbo-filters { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.qbo-filters .fld { margin: 0; flex: 0 1 210px; min-width: 0; }
.qbo-filters .qbo-search-field { flex: 1 1 240px; }
.qbo-filters .btn { min-height: 43px; }
.qbo-pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 14px; margin: 17px 0 0; }
.qbo-pagination span { color: var(--mute); font-size: 12px; }
.qbo-detail .panel-h { flex-wrap: wrap; }
.qbo-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; margin: 20px 0; }
.qbo-detail-grid dt { color: var(--mute); font-size: 11px; margin: 0 0 6px; }
.qbo-detail-grid dd { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.65; font-variant-numeric: tabular-nums; }
.qbo-detail-subheading { font-size: 14px; margin: 22px 0 10px; font-weight: 600; }
.qbo-reference-list { color: var(--ink-2); font-size: 13px; line-height: 1.9; padding-left: 19px; }
.qbo-cancel-prompt, .qbo-supplier-defaults { margin: 18px 0; padding: 16px; background: var(--surface-soft); border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; line-height: 1.7; }
.qbo-cancel-prompt p, .qbo-supplier-defaults > p { margin-top: 0; }
.qbo-contact-phone { display: block; margin-top: 5px; color: var(--mute); font-size: 12px; }
.qbo-contact-state { color: var(--mute); font-size: 12px; line-height: 1.65; }
.qbo-contact-state.qbo-ready { color: var(--green); }
.qbo-contact-apply-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.qbo-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1120px) {
  .qbo-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qbo-entity-options, .qbo-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .qbo-summary { gap: 10px; }
  .qbo-stat { padding: 16px; gap: 8px; }
  .qbo-stat strong { font-size: 24px; }
  .qbo-connection-heading h2 { font-size: 19px; }
  .qbo-actions, .qbo-actions .btn, .qbo-contact-apply-row .btn { width: 100%; }
  .qbo-entity-options, .qbo-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .qbo-filters { align-items: stretch; }
  .qbo-filters .fld, .qbo-filters .btn { flex: 1 1 100%; }
  .qbo-review-note { padding: 14px 16px; }
  .qbo-confirm { padding: 13px; }
  .qbo-pagination { justify-content: space-between; gap: 8px; }
}

/* ── reconciliation review ──────────────────────────────────────────────────
   Everything here is built from the existing tokens rather than fixed hexes,
   so it follows the light/dark switch the rest of the suite already honours. */
.msg.note{border-color:var(--line-2);background:var(--grey-bg,transparent);color:var(--ink)}
.msg.warn{border-color:var(--amber);background:var(--amber-bg);color:var(--amber)}

.badge-green{background:var(--green-bg);color:var(--green);border-color:var(--green)}
.badge-amber{background:var(--amber-bg);color:var(--amber);border-color:var(--amber)}
.badge-grey {background:var(--grey-bg);color:var(--mute);border-color:var(--line-2)}

/* Money reads faster when the sign is a colour as well as a character, and the
   digits line up — tabular figures stop the columns dancing row to row. */
td.r{font-variant-numeric:tabular-nums}
td.neg{color:var(--red)}
td.pos{color:var(--green)}

/* The decide row opens underneath the line it belongs to, so the amount stays
   on screen while the account is chosen. */
.rv-form>td{background:var(--grey-bg);padding:14px 12px}
.rv-decide{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-end}
.rv-decide .fld{min-width:260px;flex:1 1 260px;margin:0}
.rv-decide .hint{flex-basis:100%;margin:0}
.rv-acts{display:flex;gap:8px}
@media (max-width:640px){
  .rv-decide{flex-direction:column;align-items:stretch}
  .rv-acts{width:100%}
  .rv-acts .btn{flex:1}
}

/* The reconciliation state strip. These numbers are mostly zero and that is the
   message — nothing is matched or posted — so they are given room rather than
   tucked away where a reader would assume the work is further along. */
.rv-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:14px}
.rv-stat{border:1px solid var(--line);border-radius:var(--r);padding:12px 14px}
.rv-stat-v{font:600 24px/1.1 var(--serif);font-variant-numeric:tabular-nums;color:var(--navy)}
.rv-stat-l{font-size:13px;font-weight:600;margin-top:4px}
.rv-stat-h{font-size:12px;color:var(--mute);margin-top:2px}

.rv-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-bottom:14px}
.rv-filters .fld{margin:0;min-width:190px;flex:1 1 190px}
.rv-pager{display:flex;gap:12px;align-items:center;justify-content:center;margin-top:14px}
@media (max-width:640px){
  .rv-filters{flex-direction:column;align-items:stretch}
  .rv-filters .fld{min-width:0}
}

/* A suggested match is the fastest right answer, so it is the one green button on the feed. */
/* #15803D: white text reaches 4.5:1 (AA); the lighter --green did not (WCAG scan, 26 Sep) */
.btn-match, .btn.btn-match{background:#15803D!important;color:#fff!important;border-color:#15803D!important;font-weight:600}
.btn-match:hover{filter:brightness(1.08)}

/* ── REGISTRATION PLATES (Paul, 6 Oct 2026) ──────────────────────────────────
   "the first column registration to be in a registration box and colour yellow
   like a registration plate … generic across the suite, not just in trade."
   A plate is yellow with black letters on the car, so it stays yellow in dark
   mode too — the colours are the thing being recognised, not the theme. The
   border and inner highlight are what make it read as a plate rather than a
   coloured label. */
.plate {
  display: inline-block; padding: 3px 8px 2px; border-radius: 4px;
  border: 1px solid rgba(17, 18, 26, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  background: #ffd400; color: #15161c;
  font: 700 12.5px/1.35 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
}
.plate.plate-sm { padding: 2px 6px 1px; font-size: 11.5px; letter-spacing: .05em; }
