/* Approved Payrolla glass preview, adapted to the live-data Flask components.
   Opaque defaults also serve browsers without backdrop-filter. Keep menus and
   drawers outside filtered ancestors so their fixed positioning stays intact. */
:root {
  --ink: #183b36;
  --ink-soft: #3c5550;
  --muted: #506963;
  --shell: #edf5f1;
  --surface-alt: #edf4ef;
  --line: #d9e8e2;
  --line-strong: #c3d9d3;
  --line-control: #7a958b;
  --radius: 22px;
  --radius-lg: 24px;
  --radius-sm: 11px;
  /* Page titles are set in the serif so a page has one clear top level;
     panel titles, labels and figures stay in Satoshi. */
  --font-display: Newsreader, Georgia, serif;
  --shadow: 0 16px 48px -22px #28624b26, 0 2px 6px #28624b03;
  --shadow-sm: 0 8px 28px -16px #28624b24;
  --glass-fill: #f9fefb;
  --glass-border: #fff;
  --workspace-gutter: clamp(24px, 2.5vw, 48px);
}

body.brand-shell-bg {
  min-height: 100vh;
  background-color: var(--shell);
  background-image:
    radial-gradient(ellipse at 8% 21%, #c2eee4a8, transparent 50%),
    radial-gradient(ellipse at 91% 41%, #b8e9d795, transparent 48%),
    radial-gradient(ellipse at 64% 100%, #dcead2b3, transparent 48%),
    linear-gradient(130deg, #f5f8f4, #edf7f3 52%, #e9f1ed);
  color: var(--ink);
}

.portal-topbar {
  position: sticky;
  top: 16px;
  max-width: none;
  width: calc(100% - 2 * var(--workspace-gutter));
  margin: 26px auto 0;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: transparent;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.portal-topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--glass-fill);
  pointer-events: none;
}
.portal-topbar-inner { max-width: none; min-height: 78px; padding: 14px 24px; gap: 20px; }
.portal-logo .payrolla-lockup { width: 125px; }
.portal-nav { gap: 4px; }
.portal-nav a {
  min-height: 44px;
  padding: 11px 13px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 500;
}
.portal-nav a[aria-current=page] {
  color: #075b50;
  background: #d7eee7;
  border: 0;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #fff9;
}
.portal-nav a:hover { background: #d6eee875; }
.portal-search input { border-radius: 11px; background: #ffffffb3; }
.account-avatar { background: var(--brand-deep); color: #fff; border: 1px solid #fff9; }
.utility-btn { border-radius: 11px; }
.utility-pop { background: #f9fefb; border: 1px solid #fff; border-radius: 16px; box-shadow: var(--shadow); }
/* Workspace surfaces follow the viewport; only individual forms and prose
   keep their reading-width limits. Both shells share the header gutters. */
.main-content, .portal-main { max-width: none; min-width: 0; padding: 32px var(--workspace-gutter) 56px; }
.main-content .topbar { border: 0; padding-bottom: 0; margin-bottom: 27px; }
.main-content .topbar h1, .page-head h1, .exec .exec-head h1 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.main-content .topbar-visual, .exec-period {
  background: #ffffff70;
  border: 1px solid #ffffffd9;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.exec-period { padding: 12px 15px; }
.topbar-sub, .exec .exec-head .sub { color: var(--muted); font-size: 13px; }

.panel, .xpanel, .chart-card, .stat-card, .card, .kpi, .metric-card,
.ops .xpanel, .exec .xpanel {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.panel, .xpanel, .chart-card, .ops .xpanel, .exec .xpanel { padding: 24px; }
.panel:hover, .xpanel:hover, .chart-card:hover, .stat-card:hover, .card:hover,
.ops .xpanel:hover, .exec .xpanel:hover {
  border-color: var(--glass-border);
  box-shadow: var(--shadow);
  transform: none;
}
.panel-head h2, .chart-head h2, .exec .panel-head h2 { font-size: 18px; letter-spacing: -.025em; }
.panel-sub, .exec .panel-sub, .chart-head small { font-size: 12px; color: var(--muted); }
.exec-grid { gap: 22px; }
.exec .area-health { border: 1px solid var(--glass-border); }
.exec .health-period { font-size: 25px; letter-spacing: -.025em; }
.exec .health-next { border: 1px solid #cee2d7; background: #e7f2e9; border-radius: 14px; }
.exec .health-next--warn { border-color: #e2c99c; background: var(--warn-soft); }
.exec .figures { background: #ffffff85; border-color: var(--line); border-radius: 14px; }
.figure dd, .kpi-value, .stat-value, .metric-value { color: var(--brand-deep); }
.ops .kpi-band, .exec .kpi-band, .kpi-band, .dist .kpi-band, .rq .kpi-band {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  border: 0;
}
.kpi-band .kpi, .ops .kpi-band .kpi, .exec .kpi-band .kpi {
  flex: 1 1 200px;
  min-width: 0;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.kpi-band .kpi:first-child { padding-inline-start: 22px; }
.kpi-band .kpi:last-child { border-inline-end: 1px solid var(--glass-border); }
.ops .kpi-band > .ops-reveal { flex: 1 1 0; min-width: 0; }
.kpi-band .kpi:hover, .exec .kpi-band .kpi:hover {
  background: #f4fcf6;
  border-color: var(--line-control);
  box-shadow: var(--shadow);
  transform: none;
}
.kpi-label, .stat-label, .metric-label { font-size: 10px; letter-spacing: .08em; }
.ops .qa-grid, .exec .area-actions--compact .qa-grid { display: grid; gap: 10px; }
.ops .qa-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.exec .area-actions--compact .qa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ops .qa, .exec .area-actions--compact .qa {
  flex: 1 1 200px;
  border: 1px solid var(--line);
  background: #ffffff85;
  border-radius: 13px;
  padding: 13px 15px;
}
.ops .qa:last-child, .exec .qa:last-child { border-inline-end: 1px solid var(--line); }
.ops .qa:hover, .exec .qa:hover { background: #d6eee875; border-color: var(--line-control); }
.qa-ico { border-radius: 10px; background: #dceee5; }
.ops-filters { border-bottom-color: var(--line); }

.btn { min-height: 44px; border-radius: 11px; }
.btn.primary, .btn-primary, .main-content .topbar .btn-light {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 5px 12px #0c6e621b;
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
}
.btn-outline-secondary, .btn-outline-primary, .main-content .topbar .btn-outline-light {
  background: #ffffffb3;
  border-color: var(--line-control);
  color: var(--brand);
}
.btn:disabled, .btn[aria-disabled=true] { box-shadow: none; }
.form-control, .form-select,
.portal-main input:not([type=checkbox]):not([type=radio]), .portal-main select, .portal-main textarea {
  background-color: #fcfefb;
  border-radius: 11px;
}
.dt-wrap, .table-responsive { background: #fcfefb; border: 1px solid #fff; border-radius: 20px; }
.panel.dt-wrap { padding: 0; }
.dt-table th, .table thead th, .portal-main table th { background: #edf4ef; font-size: 10px; }
.dt-table td, .table td, .portal-main table td { background: #fcfefb; border-bottom-color: #e6eee7; }
.dt-table tbody tr:hover td, .table tbody tr:hover td, .portal-main table tbody tr:hover td { background: #eef7f0; }
.cn-modal, .modal-content, .error-card, .auth-reset {
  background: var(--glass-fill);
  border: 1px solid #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.cn-modal-backdrop { background: #183b366b; }
.toast { border: 1px solid var(--line); border-radius: 14px; }
.error-page { background: transparent; }

/* Authentication uses the same glass as the workspace, with an opaque form. */
.auth-page { background: transparent; }
.auth-story {
  min-height: calc(100vh - 48px);
  margin: 24px 0 24px 24px;
  padding: 40px clamp(28px, 4vw, 64px);
  background: var(--glass-fill);
  color: var(--ink);
  border: 1px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.auth-story h2 { color: var(--brand-deep); font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; }
.auth-story .auth-eyebrow, .auth-principles li>span { color: var(--brand); }
.auth-story-copy>p:not(.auth-eyebrow), .auth-principles p, .auth-story-foot { color: var(--muted); }
.auth-principles strong { color: var(--ink); }
.auth-principles li>span { background: #dceee5; border-color: var(--line-control); border-radius: 11px; }
.auth-form-card {
  max-width: 430px;
  padding: 32px;
  background: var(--glass-fill);
  border: 1px solid #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.auth-form-card h1, .auth-reset h1 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; }
.auth-page--compact { background: transparent; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-fill: rgba(255,255,255,.56); }
  .portal-topbar::before, .panel, .xpanel, .chart-card, .stat-card, .card, .metric-card,
  .kpi-band .kpi, .auth-story, .auth-form-card, .auth-reset, .error-card {
    -webkit-backdrop-filter: blur(22px) saturate(1.12);
    backdrop-filter: blur(22px) saturate(1.12);
  }
}
@media (min-width: 1600px) {
  .exec .area-actions--compact .qa-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .ops .qa-grid, .exec .area-actions--compact .qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-topbar { top: 10px; width: calc(100% - 32px); margin-top: 16px; }
  .portal-topbar-inner { padding: 10px 18px; min-height: 70px; gap: 12px; }
  .portal-nav { background: #f5fcf7; }
  .main-content, .portal-main { padding: 28px 24px 48px; }
  .ops .kpi-band > .ops-reveal { flex-basis: 200px; }
}
@media (max-width: 640px) {
  .ops .qa-grid, .exec .area-actions--compact .qa-grid { grid-template-columns: minmax(0, 1fr); }
  .portal-topbar { width: calc(100% - 24px); margin-top: 12px; border-radius: 18px; }
  .portal-topbar-inner { min-height: 64px; padding: 8px 12px; gap: 8px; }
  .portal-logo .payrolla-lockup { width: 112px; }
  .main-content, .portal-main { padding: 26px 16px 40px; }
  .panel, .xpanel, .chart-card, .ops .xpanel, .exec .xpanel { padding: 19px; border-radius: 20px; }
  .panel.dt-wrap { padding: 0; }
  .kpi-band, .ops .kpi-band, .exec .kpi-band { gap: 12px; }
  .kpi-band .kpi, .ops .kpi-band .kpi, .exec .kpi-band .kpi { flex-basis: calc(50% - 6px); padding: 18px 14px; }
  .kpi-band .kpi:first-child { padding-inline-start: 14px; }
  .kpi-band .kpi:nth-child(even), .kpi-band .kpi:nth-child(n+3) { border: 1px solid var(--glass-border); }
  .ops .kpi-band > .ops-reveal { flex-basis: calc(50% - 6px); }
  .ops .kpi-band > .ops-reveal:first-child { flex-basis: 100%; }
  .ops .qa, .exec .area-actions--compact .qa { flex-basis: 100%; }
  .auth-form-side { padding: 24px 16px; }
  .auth-form-card { padding: 25px 22px; }
  .auth-mobile-brand { margin-bottom: 30px; }
}
@media (max-width: 360px) {
  .kpi-band .kpi, .ops .kpi-band .kpi, .exec .kpi-band .kpi { flex-basis: 100%; }
  .ops .kpi-band > .ops-reveal { flex-basis: 100%; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  :root { --glass-fill: #f9fefb; --glass-border: var(--line-control); }
  .portal-topbar::before, .panel, .xpanel, .chart-card, .stat-card, .card, .metric-card,
  .kpi-band .kpi, .auth-story, .auth-form-card, .auth-reset, .error-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media print {
  body.brand-shell-bg { background: #fff; }
  .main-content, .portal-main { padding: 0; }
  .panel, .xpanel, .card, .kpi-band .kpi, .ops .xpanel, .exec .xpanel {
    background: #fff; border: 1px solid #ccc; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* ---- Animated Payrolla mark (macros/brand.html, logo-player.js) ----------
   The video frame is larger than the P; these fractions crop the frame to the
   P's own box, the same numbers the landing's scroll mark uses. */
.brand-mark-anim, .mark-watermark {
  --mark-left: .2084;
  --mark-top: .4815;
  --mark-width: .5288;
  --mark-height: .4802;
  position: relative;
  display: inline-block;
  flex: none;
  overflow: visible;
}
.brand-mark-anim .mark-anim-media, .mark-watermark .mark-anim-media {
  position: absolute;
  display: block;
  left: calc(-100% * var(--mark-left) / var(--mark-width));
  top: calc(-100% * var(--mark-top) / var(--mark-height));
  width: calc(100% / var(--mark-width));
  height: calc(100% / var(--mark-height));
  max-width: none;
}
.brand-mark-anim .mark-anim-still, .mark-watermark .mark-anim-still,
.portal-logo .brand-mark-anim .mark-anim-still { display: block; width: 100%; height: 100%; max-width: none; }
.is-playing > .mark-anim-media .mark-anim-still,
.is-playing > .mark-anim-icon { visibility: hidden; }
.brand-mark-anim .mark-anim-icon, .portal-logo .brand-mark-anim .mark-anim-icon {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain;
}

.anim-lockup { display: inline-flex; align-items: center; gap: 5px; }
.anim-lockup .brand-mark-anim { height: 29px; width: calc(29px * 148 / 168); }
.portal-logo .anim-lockup .anim-wordmark { height: 27px; width: auto; margin-top: 1px; }
@media (max-width: 420px) {
  .portal-shell .portal-logo .anim-wordmark {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
}

/* Watermark: big, faint, behind the page's own content, never interactive. */
.mark-watermark {
  position: fixed;
  right: max(-6vw, -80px);
  bottom: -8vh;
  height: clamp(320px, 70vh, 760px);
  width: calc(clamp(320px, 70vh, 760px) * 148 / 168);
  opacity: .1;
  pointer-events: none;
  z-index: 0;
}
.mark-watermark--inline { position: relative; right: auto; bottom: auto; opacity: 1; height: clamp(150px, 22vh, 230px); width: calc(clamp(150px, 22vh, 230px) * 148 / 168); }
@media (prefers-contrast: more), (forced-colors: active), print { .mark-watermark { display: none; } }
.error-brand { display: inline-block; margin: 0 auto 18px; }
.error-brand img { height: 34px; width: auto; }
.error-card { position: relative; z-index: 1; text-align: center; }
.auth-page > .auth-story, .auth-page > .auth-form-side, .auth-page > .auth-reset { position: relative; z-index: 1; }

/* ---- Onboarding invite, access requests (operator shell) ---------------- */
.invite-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 10px; max-width: 760px; }
.invite-form .btn { margin-top: 6px; }
.invite-list, .request-list { list-style: none; margin: 0; padding: 0; }
.invite-list li, .request-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.invite-list li:first-child, .request-list li:first-child { border-top: 0; }
.invite-list li > div:first-child, .request-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 260px; }
.invite-list li span:not(.badge), .request-main span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.request-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.request-actions { display: flex; gap: 8px; margin-left: auto; }
.request-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; margin: 0; }
.request-facts dt { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.request-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.request-subhead { font-size: 14px; font-weight: 700; margin: 22px 0 6px; }
.request-message { white-space: pre-line; max-width: 72ch; color: var(--ink-soft); }
.decline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; max-width: 760px; }
.decline-form label { flex: 1 0 100%; margin: 0; }
.decline-form input { flex: 1 1 280px; }
.access-requests { margin-bottom: 20px; }

/* ---- KPI tiles: the figure always fits its tile --------------------------
   The figure gets its own full-width row (the sparkline moves down beside the
   movement chip), and its size follows the tile's width rather than the
   viewport, so "GH₵ 1,234,567.89" fits a four-up tile at 1280px and a single
   tile on a phone alike. 9.6cqi is the width a 16-character bold figure needs;
   the 34px cap keeps short figures ("85%") from shouting. These outrank the
   viewport-based sizes in interface.css, which overflowed the tile. */
.kpi-band .kpi {
  container-type: inline-size;
  grid-template-areas: "label label" "value value" "move spark" "caption caption";
  grid-template-columns: minmax(0, 1fr) auto;
}
.kpi-band .kpi .kpi-value {
  min-width: 0;
  font-size: clamp(17px, 9.6cqi, 34px);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.kpi-band .kpi .kpi-spark { align-self: center; }
@supports not (container-type: inline-size) {
  .kpi-band .kpi .kpi-value { font-size: clamp(17px, 1.7vw, 27px); }
}

/* ---- Operator audit (audit.html) ---------------------------------------- */
.audit-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 4px 0 18px; }
.audit-filter { display: flex; flex-direction: column; min-width: 140px; flex: 0 1 170px; }
.audit-filter--q { flex: 1 1 240px; }
.audit-filter--actions { flex-direction: row; gap: 8px; flex: 0 0 auto; min-width: 0; }
.audit-filter .form-label { margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.audit-wrap { border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.audit-grid { width: 100%; border-collapse: collapse; }
.audit-grid th { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: #f3f8f5; text-align: left; white-space: nowrap; }
.audit-grid td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; font-size: 13.5px; }
.audit-grid .cell-main { display: block; font-weight: 600; }
.audit-grid .cell-sub { display: block; font-size: 12px; color: var(--muted); }
.audit-grid .audit-when { white-space: nowrap; }
.audit-grid .audit-action { font-weight: 600; min-width: 13ch; }
.audit-grid .audit-desc { min-width: 30ch; overflow-wrap: anywhere; color: var(--ink-soft); }
.audit-expense > summary { cursor: pointer; list-style: none; margin: 0; }
.audit-expense > summary::-webkit-details-marker { display: none; }
.audit-expense > summary h2::after { content: " +"; color: var(--brand); }
.audit-expense[open] > summary h2::after { content: " \2212"; }
@media (max-width: 760px) {
  .audit-grid thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .audit-grid, .audit-grid tbody, .audit-grid tr, .audit-grid td { display: block; width: 100%; }
  .audit-grid tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  .audit-grid td { border: 0; padding: 2px 0; min-width: 0 !important; text-align: left !important; }
}

/* ---- PAYE band editor (statutory_rate_form.html) ------------------------ */
.band-editor { max-width: 860px; }
.band-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin-bottom: 6px; }
.band-table th { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 8px 2px; text-align: left; }
.band-table td { padding: 0 8px; vertical-align: middle; }
.band-table td:first-child, .band-table th:first-child { padding-left: 0; }
.band-table .band-base { font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.band-table td:last-child { width: 1%; }
@media (max-width: 640px) {
  .band-table thead { display: none; }
  .band-table tr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
  .band-table td { padding: 0; }
  .band-table .band-base { grid-column: 1 / -1; font-size: 13px; }
  .band-table .band-base::before { content: "Tax below this band: GH\20B5 "; font-weight: 500; color: var(--muted); }
}

/* ---- Edit figures (payroll_items_edit.html) ----------------------------- */
.figures-panel { padding-bottom: 12px; }
.figures-wrap {
  border: 1px solid var(--line); border-radius: 14px; overflow: auto;
  max-height: calc(100vh - 300px); background: #fff;
}
.figures-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.figures-grid th, .figures-grid td { padding: 6px 8px; border-bottom: 1px solid var(--line); background: #fff; white-space: nowrap; text-align: left; }
.figures-grid thead th { position: sticky; z-index: 2; background: #f1f7f4; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.figures-grid thead tr:first-child th { top: 0; height: 32px; }
.figures-grid thead tr:last-child th { top: 32px; }
.figures-grid--raw thead tr:last-child th { top: 0; }
.figures-grid .fg-groups th { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; color: var(--muted); border-bottom: 0; }
.figures-grid .fg-group-earn { box-shadow: inset 0 3px 0 var(--brand-bright, #17c3b2); }
.figures-grid .fg-group-ded { box-shadow: inset 0 3px 0 #c9a227; }
.figures-grid .fg-group-calc { box-shadow: inset 0 3px 0 var(--line-control); }
.figures-grid .fg-sticky { position: sticky; z-index: 1; }
.figures-grid thead .fg-sticky { z-index: 3; }
.figures-grid .fg-id { left: 0; min-width: 92px; }
.figures-grid .fg-name { left: 92px; min-width: 170px; font-weight: 600; color: var(--ink); box-shadow: 1px 0 0 var(--line); }
.figures-grid .fg-num { text-align: right; }
.figures-grid .fg-calc { background: #f6faf8; color: var(--muted); }
.figures-grid tbody tr:hover td, .figures-grid tbody tr:hover th { background: #f0fbf7; }
.figures-grid .fg-input {
  width: 104px; min-height: 34px; padding: 4px 8px; text-align: right; font: inherit; font-variant-numeric: tabular-nums;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink);
}
.figures-grid .fg-input--text { width: 140px; text-align: left; }
.figures-grid .fg-input:hover:not(:disabled) { border-color: var(--line-control); background: #fff; }
.figures-grid .fg-input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px #17c3b233; }
.figures-grid td.is-changed { background: #fff7df !important; }
.figures-grid td.is-changed .fg-input { font-weight: 700; }
.figures-bar {
  position: sticky; bottom: 12px; z-index: 5; margin-top: 14px;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 16px; background: var(--glass-fill); border: 1px solid #fff; box-shadow: var(--shadow);
}
.figures-bar-status { margin: 0 auto 0 0; color: var(--muted); font-size: 13.5px; }
.figures-bar-status.has-changes { color: #8a5a00; font-weight: 700; }
.audit-grid td.nums, .audit-grid th.text-end { white-space: nowrap; }
.audit-expense { max-width: none; }
