/* Visual refresh (2026-11-24, palette changed 2026-11-25 on the user's request): readability + warmth on top of
   "Lamp & Ledger". Loaded last by _UiHead (after ui.css and bootstrap-bridge.css), before each app's site.css.
   Palette: one deep wine (solid, no orange gradient), white on wine, a thin gold accent, solid pill buttons. From the old
   pages: the coloured header band, bold headings with an accent rule, stat tiles with a coloured top edge, tinted table
   heads, colour on money (paid green, due red), a stronger active menu item. Kept from the new pages: the layout, the
   menu by subject, tokens, both themes. Tokens only below the token block. */

/* ---------- tokens ---------- */
:root {
  --ink-2: #47403d; --ink-3: #6b6360;
  --frame: #f4f2f1; --sunken: #faf8f8; --hover: #f5eff0; --line: #e6e0df; --line-strong: #d2c9c8;
  --brand: #7a1420; --brand-hover: #620f19; --brand-text: #7a1420; --brand-soft: #f7ebed; --brand-ring: rgba(122,20,32,.26);
  --brand-deep: #6a0f1a; --head-ink: #6a0f1a;
  --grad-brand: linear-gradient(180deg, #74121e 0%, #680f1a 100%);
  --grad-btn: linear-gradient(180deg, #7a1420 0%, #7a1420 100%);
  --grad-btn-hover: linear-gradient(180deg, #620f19 0%, #620f19 100%);
  --saffron: #c9a44e; --saffron-ink: #b8913a; --ember: #c9a44e; --ember-soft: #f8f1e1;
  --th-bg: #f6eef0; --th-ink: #6a0f1a; --zebra: #fbf9f9; --row-hover: #f7eef0;
  --card-shadow: 0 1px 2px rgba(40,10,14,.05), 0 8px 24px -10px rgba(40,10,14,.12);
  --wine-shadow: rgba(106,15,26,.35);
  --fs-body: .90625rem; /* 14.5px */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink-2: #c6bebc; --ink-3: #a39a98;
    --brand: #9e2433; --brand-hover: #b02c3c; --brand-text: #f0a3ad; --brand-soft: rgba(240,163,173,.12); --brand-ring: rgba(240,163,173,.32);
    --brand-deep: #f0a3ad; --head-ink: #f4bcc3;
    --grad-brand: linear-gradient(180deg, #4d0b14 0%, #440a12 100%);
    --grad-btn: linear-gradient(180deg, #9e2433 0%, #9e2433 100%);
    --grad-btn-hover: linear-gradient(180deg, #b02c3c 0%, #b02c3c 100%);
    --saffron: #d4b064; --saffron-ink: #d9b86e; --ember: #d4b064; --ember-soft: rgba(212,176,100,.12);
    --th-bg: #241a1c; --th-ink: #f4bcc3; --zebra: #1b1718; --row-hover: #2b2023;
    --card-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 26px -12px rgba(0,0,0,.6);
    --wine-shadow: rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --ink-2: #c6bebc; --ink-3: #a39a98;
  --brand: #9e2433; --brand-hover: #b02c3c; --brand-text: #f0a3ad; --brand-soft: rgba(240,163,173,.12); --brand-ring: rgba(240,163,173,.32);
  --brand-deep: #f0a3ad; --head-ink: #f4bcc3;
  --grad-brand: linear-gradient(180deg, #4d0b14 0%, #440a12 100%);
  --grad-btn: linear-gradient(180deg, #9e2433 0%, #9e2433 100%);
  --grad-btn-hover: linear-gradient(180deg, #b02c3c 0%, #b02c3c 100%);
  --saffron: #d4b064; --saffron-ink: #d9b86e; --ember: #d4b064; --ember-soft: rgba(212,176,100,.12);
  --th-bg: #241a1c; --th-ink: #f4bcc3; --zebra: #1b1718; --row-hover: #2b2023;
  --card-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 26px -12px rgba(0,0,0,.6);
  --wine-shadow: rgba(0,0,0,.45);
}

/* ---------- base: a size up, darker secondary text ---------- */
body { font-size: var(--fs-body); }
.small, small { font-size: var(--fs-13); }
.text-body-secondary, .muted { color: var(--ink-3) !important; }

/* ---------- top bar = the old header band ---------- */
.topbar { background: var(--grad-brand); border-bottom: 2px solid var(--saffron); backdrop-filter: none; color: #fff; height: 56px; box-shadow: 0 6px 18px -8px var(--wine-shadow); }
.topbar .crumbs, .topbar .crumbs a { color: rgba(255,255,255,.82); }
.topbar .crumbs a:hover { color: #fff; }
.topbar .crumbs .sep { color: rgba(255,255,255,.5); }
.topbar .crumbs [aria-current] { color: #fff; font-weight: 700; }
.topbar .top-search { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.32); color: rgba(255,255,255,.9); border-radius: var(--r-full); height: 34px; }
.topbar .top-search:hover { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.5); color: #fff; }
.topbar .top-search .kbd { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff; }
.topbar .icon-btn { color: #fff; }
.topbar .icon-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.topbar .avatar { width: 34px; height: 34px; background: #fff; color: var(--brand-deep); border: 2px solid var(--saffron); font-size: var(--fs-12); }
:root[data-theme="dark"] .topbar .avatar { background: var(--raised); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar .avatar { background: var(--raised); } }
.topbar .popover { color: var(--ink); }

/* ---------- menu ---------- */
.nav-head { color: var(--ink-2); font-weight: 700; }
.nav-item { font-size: var(--fs-13); color: var(--ink-2); min-height: 34px; border-radius: var(--r-md); }
.nav-item .ic { color: var(--ink-3); }
.nav-item:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 12%, transparent), color-mix(in srgb, var(--brand) 3%, transparent)); color: var(--brand-text); }
.nav-item:hover .ic { color: var(--brand-text); }
.nav-item[aria-current="page"] { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 18%, transparent), color-mix(in srgb, var(--brand) 5%, transparent)); color: var(--brand-text); box-shadow: inset 3px 0 0 var(--brand); font-weight: 700; }
.nav-item[aria-current="page"]::before { display: none; }
.side-brand b { color: var(--brand-deep); font-weight: 800; }

/* ---------- page header ---------- */
.page { padding: 24px 28px 48px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: var(--fs-28); font-weight: 800; color: var(--head-ink); letter-spacing: -.02em; }
.page-head .lead { font-size: var(--fs-14); color: var(--ink-2); margin-top: 6px; }
.old-link { border-radius: var(--r-full); }

/* ---------- cards ---------- */
.section, .office-grid section, .carry-side, .bus-form, .desk-card { border-radius: var(--r-xl); border-color: var(--line); box-shadow: var(--card-shadow); padding: 18px 20px; }
/* a form row inside a card is not another card */
.section .bus-form, .desk-card .bus-form, .office-grid section .bus-form, .section .section { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
.section > h2, .section > h3, .office-grid section > h3, .section .report-head > h2, .sec-title {
  font: 800 var(--fs-18)/1.25 var(--font-display); color: var(--ink); letter-spacing: -.01em;
  padding-left: 12px; border-left: 4px solid var(--saffron-ink); margin-bottom: 14px; }
.section .report-head { align-items: center; margin-bottom: 12px; }
.section .report-head > h2 { margin-bottom: 0; }
.h6 { font-size: var(--fs-14); font-weight: 700; }
.sub-title, .section > h3.sub-title, .section > h2.sub-title { font: 700 var(--fs-12)/1.2 var(--font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 4px; padding-left: 0; border-left: 0; }

/* ---------- fields ---------- */
.form-label { font-size: var(--fs-12); font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.form-control, .form-select { min-height: 38px; border-radius: var(--r-md); font-size: var(--fs-14); }
.form-control-sm, .form-select-sm { min-height: 34px; font-size: var(--fs-14); border-radius: var(--r-md); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { color: var(--ink-2); }

/* ---------- buttons: pills, the maroon gradient for the main one ---------- */
.btn { --bs-btn-font-size: var(--fs-13); --bs-btn-font-weight: 600; --bs-btn-border-radius: var(--r-full); --bs-btn-padding-x: 16px; min-height: 36px; }
.btn-sm { --bs-btn-font-size: var(--fs-13); --bs-btn-border-radius: var(--r-full); --bs-btn-padding-x: 14px; min-height: 34px; }
.btn-lg { --bs-btn-font-size: var(--fs-16); --bs-btn-border-radius: var(--r-full); min-height: 46px; --bs-btn-padding-x: 22px; }
.btn-primary { background-image: var(--grad-btn); border-color: transparent; box-shadow: 0 2px 6px -2px var(--wine-shadow); }
.btn-primary:hover, .btn-primary:focus-visible { background-image: var(--grad-btn-hover); border-color: transparent; }
.btn-outline-primary { --bs-btn-border-color: color-mix(in srgb, var(--brand) 35%, var(--line-strong)); }

/* ---------- pills ---------- */
.pill { height: 24px; padding: 0 10px; font-weight: 600; }

/* ---------- stat tiles: a coloured top edge like the old summary cards ---------- */
.stat { border-radius: var(--r-lg); border-top: 4px solid var(--c6); box-shadow: var(--card-shadow); padding: 12px 16px 14px; }
.stat span { font: 700 var(--fs-11)/1.2 var(--font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.stat b { font-size: var(--fs-28); font-weight: 800; }
.stat.ok { border-top-color: var(--ok); } .stat.bad { border-top-color: var(--bad); } .stat.warn { border-top-color: var(--warn); } .stat.brand { border-top-color: var(--brand); } .stat.info { border-top-color: var(--info); }

/* ---------- tables: tinted head, zebra, roomier rows ---------- */
.report-table-wrap, .table-wrap { border-radius: var(--r-lg); }
.report-table, .data-table { font-size: var(--fs-14); }
.report-table th, .report-table td, .data-table th, .data-table td { padding: 8px 12px; }
.report-table thead th, .data-table thead th { background: var(--th-bg); color: var(--th-ink); font: 700 var(--fs-11)/1.2 var(--font-ui); letter-spacing: .07em; text-transform: uppercase; height: 38px; }
.report-table tbody tr:nth-child(even), .data-table tbody tr:nth-child(even) { background: var(--zebra); }
.report-table tbody tr:hover, .report-table tbody tr:nth-child(even):hover, .data-table tbody tr:hover { background: var(--row-hover); }
.report-table tfoot td, .report-table tfoot th, .data-table tfoot td { background: var(--th-bg); color: var(--th-ink); font-weight: 800; }

/* money words: use on read-only amounts */
.amt-due { color: var(--bad); font-weight: 700; }
.amt-paid { color: var(--ok); font-weight: 700; }
.amt-zero { color: var(--ink-3); }

/* ---------- empty state ---------- */
.empty .empty-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--brand-text); }
.empty .empty-ic .ic { width: 26px; height: 26px; }
.empty b { font: 800 var(--fs-18) var(--font-display); }
.empty p { font-size: var(--fs-14); color: var(--ink-2); max-width: 420px; }

@media (max-width: 720px) { .page { padding: 16px 16px 40px; } .page-head h1 { font-size: var(--fs-22); } }

/* phones: 16px fields, or iOS zooms the page in when a box is tapped (proposal from the /apply pass) */
@media (max-width: 575.98px) {
  .form-control, .form-select, .form-control-sm, .form-select-sm { font-size: max(16px, 1em); }
}

/* ---------- shared fixes proposed by the page-group passes (2026-11-25) ---------- */
/* the open / picked row of a moved-over list (OldPageHtml marks it fc-row--sel; it had no style anywhere) */
.report-table tbody tr.fc-row--sel > td { background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.report-table tbody tr.fc-row--sel > td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
/* OldPageHtml's visually-hidden <caption> made every short table 1px too tall, so the wrap showed a scroll bar */
.report-table > caption.visually-hidden { position: fixed !important; }
/* a zero in a coloured figure tile stays muted */
.stat b.amt-zero { color: var(--ink-3); }
/* the sticky save bar assumes the page edge; inside a card it sits on the card's own edge */
.section .form-actions { margin: 18px -20px -18px; padding: 12px 20px; border-radius: 0 0 var(--r-xl) var(--r-xl); }
@media (max-width: 900px) { .section .form-actions { margin: 16px -20px -18px; padding: 12px 20px; } }
/* money words inside tables win over the table's own cell colour */
.report-table td.amt-due, .data-table td.amt-due { color: var(--bad); font-weight: 700; }
.report-table td.amt-paid, .data-table td.amt-paid { color: var(--ok); font-weight: 700; }
.report-table td.amt-zero, .data-table td.amt-zero { color: var(--ink-3); }
/* visually-hidden labels inside a scrolling table must not widen the page on phones (from the fees pass) */
.report-table-wrap, .table-wrap { position: relative; }
/* Bootstrap's own rgb copies of the brand (focus shadows, link underlines) follow the wine */
:root, :root[data-theme] { --bs-primary-rgb: 122,20,32; --bs-link-color-rgb: 122,20,32; --bs-link-hover-color-rgb: 98,15,25; }
