/* Modern theme layer — loaded after every other stylesheet.
   Direction: the CentralFlow CRM look. A near-black canvas with graphite cards
   and generous radii in dark, a soft grey canvas with white cards in light;
   filled neutral controls, a high-contrast active segment, blue primary
   actions and a sky-to-indigo gradient that marks the current section.
   Controls keep the panel's chosen rounded-rectangle shape (never full pills).
   This file only retunes tokens, colour, depth, radii and type; it never
   changes display, positioning, sizing or spacing, so removing the <link>
   restores the previous look exactly. Neutrals are written in oklch and
   translucent ink goes through the rgb channel primitives, so no raw hex or
   rgb literals are added. */

/* ── Brand tokens (both themes) ────────────────────────────────────────── */
.csvrec-root {
  /* Brand: a clear blue close to the panel's original oklch(48% .17 265)
     accent, with a sky-to-indigo gradient for the current section, icon
     tiles and primary actions. Every brand tint below derives from --tm-h,
     so the hue can be tuned in one place. The yellow tag is from the
     CentralFlow reference. */
  --tm-h: 259;
  --tm-blue: oklch(55% 0.2 var(--tm-h));
  --tm-blue-hover: oklch(60% 0.19 var(--tm-h));
  --tm-sky: oklch(72% 0.13 222);
  --tm-indigo: oklch(51% 0.21 272);
  --tm-yellow: oklch(90.1% 0.143 103);
  --tm-gradient: linear-gradient(135deg, var(--tm-sky) 0%, var(--tm-blue) 50%, var(--tm-indigo) 100%);
  --tm-glow: oklch(55% 0.2 var(--tm-h) / 55%);
  --tm-display: "Urbanist", var(--sans);
}

/* ── Dark: the reference look ──────────────────────────────────────────── */
html:not(.theme-light) .csvrec-root {
  --radius-sm: 0.75rem;
  --radius-md: 0.875rem;
  --radius-control: 0.75rem;
  --radius-xl: 1.5rem;

  --background: oklch(13% 0 0);
  --workspace-background-image: none;

  --panel-surface: oklch(19.5% 0 0);
  --panel-base: oklch(19.5% 0 0);
  --panel-bg: oklch(19.5% 0 0);
  --modal-surface: oklch(21.5% 0 0);
  --panel-border: rgba(var(--rgb-white), .06);
  --panel-soft-bg: oklch(25% 0 0);
  --panel-soft-border: rgba(var(--rgb-white), .05);
  --panel-header-fill: transparent;
  --panel-shadow: none;
  --modal-shadow: 0 30px 90px rgba(var(--rgb-black), .65);

  --text-strong: var(--color-white);
  --text-default: rgba(var(--rgb-white), .86);
  --text-muted: rgba(var(--rgb-white), .62);
  --text-faint: rgba(var(--rgb-white), .54);
  --text-label: rgba(var(--rgb-white), .60);
  --text-label-soft: rgba(var(--rgb-white), .54);

  --seg-active-bg: var(--color-white);
  --seg-active-border: var(--color-white);
  --seg-active-text: oklch(14% 0 0);
  --seg-idle-bg: oklch(25% 0 0);
  --seg-idle-border: transparent;
  --seg-idle-text: rgba(var(--rgb-white), .82);
  --seg-idle-hover-bg: oklch(29% 0 0);
  --seg-idle-hover-border: transparent;

  --btn-primary-bg: var(--tm-blue);
  --btn-primary-hover-bg: var(--tm-blue-hover);
  --btn-primary-border: transparent;
  --btn-primary-shadow: none;
  --btn-ghost-border: rgba(var(--rgb-white), .07);
  --btn-ghost-text: rgba(var(--rgb-white), .88);
  --btn-ghost-hover-bg: rgba(var(--rgb-white), .10);
  --tm-ghost-fill: rgba(var(--rgb-white), .06);
  --btn-secondary-bg: rgba(var(--rgb-white), .06);
  --btn-secondary-border: rgba(var(--rgb-white), .07);
  --btn-secondary-text: rgba(var(--rgb-white), .88);
  --btn-secondary-hover-bg: rgba(var(--rgb-white), .10);
  --btn-secondary-hover-border: rgba(var(--rgb-white), .10);
  --btn-secondary-hover-text: var(--color-white);

  --input-bg: oklch(25% 0 0);
  --input-border: rgba(var(--rgb-white), .05);
  --input-focus-border: oklch(62% 0.19 var(--tm-h) / 80%);
  --input-focus-ring: oklch(62% 0.19 var(--tm-h) / 22%);

  --table-head-bg: var(--panel-surface);
  --table-head-text: rgba(var(--rgb-white), .56);
  --table-row-border: rgba(var(--rgb-white), .05);

  /* Accent as text (links, eyebrows, stage names) must read on graphite:
     the brand blue, lifted to ~5:1. Fills keep using --tm-blue. */
  --accent: oklch(70% 0.14 var(--tm-h));
  --primary: oklch(70% 0.14 var(--tm-h));

  --tm-nav-tile: oklch(25% 0 0);
  --tm-nav-active-row: rgba(var(--rgb-white), .07);
}

/* ── Light: the same language on a soft grey canvas ────────────────────── */
.theme-light .csvrec-root {
  --radius-sm: 0.75rem;
  --radius-md: 0.875rem;
  --radius-control: 0.75rem;
  --radius-xl: 1.5rem;

  --background: oklch(95.5% 0.003 262);
  --workspace-background-image: none;

  --panel-surface: var(--color-white);
  --panel-base: var(--color-white);
  --panel-bg: var(--color-white);
  --panel-bg-strong: var(--color-white);
  --modal-surface: var(--color-white);
  --panel-border: rgba(var(--rgb-slate-900), .05);
  --panel-soft-bg: oklch(96.5% 0.003 262);
  --panel-soft-border: rgba(var(--rgb-slate-900), .04);
  --panel-header-fill: transparent;
  --panel-shadow: 0 1px 2px rgba(var(--rgb-slate-900), .03);
  --modal-shadow: 0 32px 90px -12px rgba(var(--rgb-slate-900), .28);

  --text-strong: oklch(16% 0.004 262);
  --text-default: oklch(27% 0.006 262);
  --text-muted: oklch(16% 0.004 262 / 64%);
  --text-faint: oklch(16% 0.004 262 / 60%);
  --text-label: oklch(16% 0.004 262 / 64%);
  --text-label-soft: oklch(16% 0.004 262 / 60%);

  --seg-active-bg: oklch(16% 0.004 262);
  --seg-active-border: oklch(16% 0.004 262);
  --seg-active-text: var(--color-white);
  --seg-idle-bg: oklch(95.5% 0.003 262);
  --seg-idle-border: transparent;
  --seg-idle-text: oklch(27% 0.006 262);
  --seg-idle-hover-bg: oklch(92.5% 0.004 262);
  --seg-idle-hover-border: transparent;

  --btn-primary-bg: var(--tm-blue);
  --btn-primary-hover-bg: var(--tm-blue-hover);
  --btn-primary-border: transparent;
  --btn-primary-shadow: none;
  --btn-ghost-border: rgba(var(--rgb-slate-900), .06);
  --btn-ghost-text: oklch(22% 0.005 262);
  --btn-ghost-hover-bg: rgba(var(--rgb-slate-900), .08);
  --btn-ghost-hover-text: oklch(16% 0.004 262);
  --tm-ghost-fill: rgba(var(--rgb-slate-900), .045);
  --btn-secondary-bg: oklch(95.5% 0.003 262);
  --btn-secondary-border: transparent;
  --btn-secondary-text: oklch(22% 0.005 262);
  --btn-secondary-hover-bg: oklch(92.5% 0.004 262);
  --btn-secondary-hover-border: transparent;
  --btn-secondary-hover-text: oklch(16% 0.004 262);

  --input-bg: oklch(96.5% 0.003 262);
  --input-border: rgba(var(--rgb-slate-900), .05);
  --input-focus-border: oklch(55% 0.2 var(--tm-h) / 60%);
  --input-focus-ring: oklch(55% 0.2 var(--tm-h) / 15%);

  --table-head-bg: var(--panel-surface);
  --table-head-text: oklch(16% 0.004 262 / 62%);
  --table-head-border: rgba(var(--rgb-slate-900), .06);
  --table-row-border: rgba(var(--rgb-slate-900), .05);
  --table-row-hover-bg: rgba(var(--rgb-slate-900), .025);

  --accent: var(--tm-blue);
  --primary: var(--tm-blue);

  --tm-nav-tile: oklch(95.5% 0.003 262);
  --tm-nav-active-row: oklch(94.5% 0.004 262);
  /* Warning text: the shared amber is a dark-theme colour and read at
     ~1.6:1 on white (Lots "Pending", Commercial "required"). */
  --warn: var(--color-amber-700);
  --warning: var(--color-amber-700);
}

/* The login page scopes the theme to a wrapper inside <body>, so the page
   behind it takes the same canvas instead of showing a band around it. */
html:not(.theme-light):has(> body > .csvrec-root),
html:not(.theme-light) body:has(> .csvrec-root) { background: oklch(13% 0 0); }
html.theme-light:has(> body > .csvrec-root),
.theme-light body:has(> .csvrec-root) { background: oklch(95.5% 0.003 262); }

/* ── Side navigation: neutral tiles, the gradient marks the current section ── */
.theme-light .csvrec-root .sideNav { background: var(--color-white); border-right: 1px solid rgba(var(--rgb-slate-900), .05); box-shadow: 0 1px 3px rgba(var(--rgb-slate-900), .05), 0 24px 48px -28px rgba(var(--rgb-slate-900), .30); }
html:not(.theme-light) .csvrec-root .sideNav { box-shadow: inset 0 1px 0 rgba(var(--rgb-white), .05), 0 28px 56px -28px rgba(var(--rgb-black), .95); }
.csvrec-root .sideNavIcon,
.csvrec-root .sideNavIcon[class*="icon-"],
.csvrec-root .sideNavIcon[class*="sideNavIcon--"],
.theme-light .csvrec-root .sideNavIcon,
.theme-light .csvrec-root .sideNavIcon[class*="icon-"],
.theme-light .csvrec-root .sideNavIcon[class*="sideNavIcon--"] {
  background: var(--tm-nav-tile);
  box-shadow: none;
  color: var(--text-default);
}
.csvrec-root .sideNavItem.active,
.csvrec-root #incidentsNavBtn.active,
.theme-light .csvrec-root .sideNavItem.active {
  background: var(--tm-nav-active-row);
  border-color: transparent;
  color: var(--text-strong);
  box-shadow: none;
}
.csvrec-root .sideNavItem.active .sideNavIcon,
.theme-light .csvrec-root .sideNavItem.active .sideNavIcon,
.theme-light .csvrec-root .sideNavItem.active .sideNavIcon[class*="icon-"],
.theme-light .csvrec-root .sideNavItem.active .sideNavIcon[class*="sideNavIcon--"] {
  background: var(--tm-gradient);
  color: var(--color-white);
}
.csvrec-root .sideBrandTitle svg { color: var(--tm-blue); }

/* Controls the base styles paint white-on-accent now follow the active text token. */
.csvrec-root .diff-tab--active,
.csvrec-root .quickChip--active,
.csvrec-root .incFiltersChip,
.theme-light .csvrec-root .diff-tab--active,
.theme-light .csvrec-root .quickChip--active,
.theme-light .csvrec-root .incFiltersChip { color: var(--seg-active-text); }

/* Secondary buttons are filled, like the reference's neutral chips. */
.csvrec-root .ghost,
.csvrec-root .ghost-btn { background: var(--tm-ghost-fill); }
.csvrec-root .ghost:hover,
.csvrec-root .ghost-btn:hover { background: var(--btn-ghost-hover-bg); }

/* Primary actions take the brand fill (set below), never the old flat blue. */
.csvrec-root .primary-btn,
.theme-light .csvrec-root .primary-btn { background: var(--btn-primary-bg); border-color: transparent; box-shadow: none; }
.csvrec-root .primary-btn:hover,
.theme-light .csvrec-root .primary-btn:hover { background: var(--btn-primary-hover-bg); border-color: transparent; box-shadow: none; }

/* ── Type: large, calm headings ────────────────────────────────────────── */
.csvrec-root .pageHeaderTitle {
  font-size: var(--font-size-3xl);
  font-weight: 600;
  letter-spacing: -0.025em;
}
.csvrec-root .panelTitle { font-weight: 600; letter-spacing: -0.015em; }
.csvrec-root .metricCardValue { font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ══ Redesign: shell and components ═══════════════════════════════════════
   Geometry below changes spacing, radii and a few sizes only. It never
   changes display, positioning mode, stacking or visibility, so every view,
   drawer and modal keeps its existing behaviour. */

/* ── Floating side navigation (desktop) ────────────────────────────────── */
@media (min-width: 768px) {
  body.archive-fullscreen.csvrec-root #appShell > .sideNav,
  body.archive-fullscreen.csvrec-root #adminAppShell > .sideNav {
    top: 12px;
    margin: 12px 0 12px 12px;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    padding: var(--space-4) var(--space-3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
  }
  .theme-light body.archive-fullscreen.csvrec-root #appShell > .sideNav,
  .theme-light body.archive-fullscreen.csvrec-root #adminAppShell > .sideNav {
    border: 1px solid rgba(var(--rgb-slate-900), .05);
  }
  body.archive-fullscreen.csvrec-root #appShell > main,
  body.archive-fullscreen.csvrec-root #adminAppShell > main { padding-left: var(--space-2); }
}

/* A wider navigation column only where the content has room for it; tablets
   and laptops keep the original 232px so fixed-width tables (the Incidents
   queue needs about 1190px) are not cut at their right edge. */
@media (min-width: 1600px) {
  .csvrec-root .appShell,
  .csvrec-root #appShell,
  .csvrec-root #adminAppShell { grid-template-columns: 264px minmax(0, 1fr); }
}

/* Brand block: logo in a gradient tile, name and a quiet caption. */
.csvrec-root .sideBrand {
  padding: var(--space-1) var(--space-2) var(--space-4);
  margin-bottom: var(--space-2);
  border-bottom: 0;
}
.csvrec-root .sideBrandTitle {
  gap: var(--space-3);
  font-size: var(--font-size-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.theme-light .csvrec-root .sideBrandTitle { color: var(--text-strong); }
.csvrec-root .sideBrandTitle svg,
.theme-light .csvrec-root .sideBrandTitle svg {
  box-sizing: content-box;
  padding: 9px;
  border-radius: var(--radius-sm);
  background: var(--tm-gradient);
  color: var(--color-white);
}
.csvrec-root .sideBrandSub,
.theme-light .csvrec-root .sideBrandSub {
  margin: 2px 0 0 calc(34px + var(--space-3));
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Navigation rows: taller, calmer, icon tiles. */
.csvrec-root .sideNavSection { gap: 2px; }
.csvrec-root .sideNavItem {
  min-height: 40px;
  padding: 4px var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.theme-light .csvrec-root .sideNavItem { color: oklch(27% 0.006 262 / 82%); }
html:not(.theme-light) .csvrec-root .sideNavItem { color: rgba(var(--rgb-white), .70); }
.csvrec-root .sideNavItem:hover,
.theme-light .csvrec-root .sideNavItem:hover { background: var(--tm-nav-active-row); color: var(--text-strong); }
.csvrec-root .sideNavIcon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
}
.csvrec-root .sideNavSectionBottom {
  padding-top: var(--space-3);
  border-top: 1px solid var(--panel-border);
}
.csvrec-root .sideNavUser {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--tm-nav-active-row);
  color: var(--text-default);
}
.theme-light .csvrec-root .sideNavUserName,
.csvrec-root .sideNavUserName { color: var(--text-strong); font-family: var(--sans); font-weight: 600; font-size: var(--font-size-sm); }

/* ── Top bars: no strip, just floating controls ────────────────────────── */
.csvrec-root .topbar,
.theme-light .csvrec-root .topbar {
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.csvrec-root .projectSwitch,
.theme-light .csvrec-root .projectSwitch {
  gap: var(--space-2);
  padding: 8px 14px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  background: var(--panel-surface);
  color: var(--text-strong);
  box-shadow: none;
}
.csvrec-root .shellToggle { border-radius: var(--radius-md); background: var(--panel-surface); border-color: var(--panel-border); }

.csvrec-root .projectSwitchArrow,
.theme-light .csvrec-root .projectSwitchArrow { color: var(--text-muted); border-color: currentColor; }
/* Admin projects: every project is a rounded tile; the selected one carries
   the brand ring instead of a square periwinkle block. */
.csvrec-root .adminProjectCard,
.theme-light .csvrec-root .adminProjectCard {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.csvrec-root .adminProjectCard--selected,
.theme-light .csvrec-root .adminProjectCard--selected {
  background: oklch(55% 0.2 var(--tm-h) / 7%);
  border-color: oklch(55% 0.2 var(--tm-h) / 45%);
}

/* ── Page header: a big title next to a gradient icon tile ─────────────
   Every module header (shared .pageHeader, its compact variant, and the
   Balances, Profit Calc and Commercial headers) gets the same treatment. */
.csvrec-root .pageHeader,
.theme-light .csvrec-root .pageHeader,
.csvrec-root .panel.pageHeader,
.theme-light .csvrec-root .panel.pageHeader {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.csvrec-root .pageHeaderLeft,
.csvrec-root .pageHeader--compact .pageHeaderLeft { align-items: center; gap: var(--space-3); }
.csvrec-root .pageHeaderTitle,
.csvrec-root .pageHeader--compact .pageHeaderTitle,
.csvrec-root .balancesFpHeader h1,
.csvrec-root .profitCalculatorHeader h1,
.csvrec-root .commercialHeaderTitle,
.csvrec-root #knowledgeBaseHost .kb-host-header h1 {
  font-size: var(--font-size-5xl);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text-strong);
}
.csvrec-root .pageHeaderEmoji,
.theme-light .csvrec-root .pageHeaderEmoji,
.csvrec-root .pageHeader--compact .pageHeaderEmoji,
.theme-light .csvrec-root .pageHeader--compact .pageHeaderEmoji {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--tm-gradient);
  color: var(--color-white);
  box-shadow: none;
}
.csvrec-root .pageHeaderEmoji svg,
.csvrec-root .pageHeader--compact .pageHeaderEmoji svg { width: 20px; height: 20px; }

/* Balances renders no inline SVG (its security test forbids <svg> in that
   view's HTML), so its header icon is a CSS mask on an empty element. */
.csvrec-root .tmIconBalances {
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.5' y='4.3' width='13' height='9' rx='1.6'/%3E%3Cpath d='M1.5 7h13'/%3E%3Ccircle cx='11.6' cy='10.4' r='0.9' fill='black' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.5' y='4.3' width='13' height='9' rx='1.6'/%3E%3Cpath d='M1.5 7h13'/%3E%3Ccircle cx='11.6' cy='10.4' r='0.9' fill='black' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.csvrec-root .panel { border-radius: var(--radius-xl); }
.csvrec-root .panelHeader,
.theme-light .csvrec-root .panelHeader {
  padding: var(--space-5) var(--space-6) var(--space-2);
  border-bottom: 0;
  background: transparent;
}
.csvrec-root .panelTitle { font-size: var(--font-size-lg); }

/* ── Segmented controls: a filled track with a contrasting active chip ── */
.csvrec-root .reconciliationTabs,
.csvrec-root .incSegmentedBig,
.csvrec-root .adminTabs {
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--seg-idle-bg);
}
.csvrec-root .reconciliationTab,
.theme-light .csvrec-root .reconciliationTab,
.csvrec-root .incSegmentedBig button,
.csvrec-root .adminTabs .adminTab {
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--seg-idle-text);
  font-weight: 600;
  font-size: var(--font-size-md);
  line-height: 1.2;
  box-shadow: none;
}
.csvrec-root .reconciliationTab--active,
.theme-light .csvrec-root .reconciliationTab--active,
.csvrec-root .incSegmentedBig button.active,
.csvrec-root .adminTabs .adminTab--active,
.csvrec-root .adminTabs .adminTab.active {
  background: var(--seg-active-bg);
  color: var(--seg-active-text);
  box-shadow: 0 1px 2px rgba(var(--rgb-black), .12);
}

/* ── Metrics: big, light numbers on roomy cards ────────────────────────── */
.csvrec-root .metricCard,
.csvrec-root .metricGrid .metricCard { border-radius: var(--radius-xl); }
.csvrec-root .metricGrid .metricCardValue,
.csvrec-root .metricCardValue {
  font-family: var(--sans);
  font-size: var(--font-size-5xl);
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.csvrec-root .kpiValue { font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }

/* ── Tables: quiet captions, taller rows ─────────────────────────────── */
/* Captions keep each table's own case, size and weight (narrow and
   ellipsised columns depend on it); only their colour follows the theme. */
.csvrec-root :is(.opTable, .incFullTable) th {
  color: var(--table-head-text);
  background: var(--table-head-bg);
}
.csvrec-root :is(.opTable, .incFullTable) td { padding-top: 12px; padding-bottom: 12px; }

/* ── Controls: one height, softer corners ──────────────────────────────── */
.csvrec-root .primary-btn {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: var(--radius-control);
  font-weight: 600;
}
/* Secondary buttons keep each module's own size (row actions and icon
   buttons are deliberately compact); only their shape and weight change. */
.csvrec-root .ghost,
.csvrec-root .ghost-btn { border-radius: var(--radius-control); font-weight: 600; }
.csvrec-root :is(input.input, .input, select, textarea) { border-radius: var(--radius-control); }

/* ══ Style pass: light, depth and accents ════════════════════════════════ */

/* Aurora: soft sky and indigo glows behind the app pages (body is the
   theme root there; the login wrapper keeps its flat canvas). */
html:not(.theme-light) body.csvrec-root {
  --workspace-background-image:
    radial-gradient(52rem 40rem at 104% 108%, oklch(46% 0.19 268 / 24%), transparent 68%),
    radial-gradient(40rem 28rem at 92% -12%, oklch(64% 0.12 222 / 12%), transparent 70%);
  background-attachment: fixed;
}
.theme-light body.csvrec-root {
  --workspace-background-image:
    radial-gradient(52rem 40rem at 104% 108%, oklch(85% 0.08 262 / 45%), transparent 68%),
    radial-gradient(40rem 28rem at 92% -12%, oklch(91% 0.06 215 / 50%), transparent 70%);
  background-attachment: fixed;
}

/* Cards catch the light on their top edge and float on a long soft shadow. */
html:not(.theme-light) .csvrec-root {
  --panel-shadow: inset 0 1px 0 rgba(var(--rgb-white), .06), 0 2px 6px rgba(var(--rgb-black), .35), 0 28px 56px -28px rgba(var(--rgb-black), .95);
}
.theme-light .csvrec-root {
  --panel-shadow: 0 1px 3px rgba(var(--rgb-slate-900), .05), 0 22px 44px -26px rgba(var(--rgb-slate-900), .26);
}

/* Primary actions: a deeper cut of the brand gradient (white text stays
   readable on every stop) with a soft blue glow. */
.csvrec-root,
.theme-light .csvrec-root,
html:not(.theme-light) .csvrec-root {
  /* The lightest stop keeps white button text at 4.5:1 or more (57% gave 4.2:1). */
  --tm-cta: linear-gradient(120deg, oklch(54% 0.15 236), oklch(52% 0.2 var(--tm-h)) 50%, oklch(48% 0.21 272));
  --tm-cta-hover: linear-gradient(120deg, oklch(55% 0.15 236), oklch(56% 0.2 var(--tm-h)) 50%, oklch(52% 0.21 272));
  --btn-primary-bg: var(--tm-cta);
  --btn-primary-hover-bg: var(--tm-cta-hover);
}
.csvrec-root .primary-btn,
.theme-light .csvrec-root .primary-btn {
  box-shadow: 0 10px 24px -12px var(--tm-glow);
}
.csvrec-root .primary-btn:hover,
.theme-light .csvrec-root .primary-btn:hover {
  box-shadow: 0 14px 30px -12px oklch(53.2% 0.2 var(--tm-h) / 70%);
}

/* The current section glows softly from the left. */
html:not(.theme-light) .csvrec-root .sideNavItem.active,
html:not(.theme-light) .csvrec-root #incidentsNavBtn.active {
  background: linear-gradient(90deg, oklch(55% 0.2 var(--tm-h) / 26%), oklch(55% 0.2 var(--tm-h) / 4%));
}
.theme-light .csvrec-root .sideNavItem.active,
.theme-light .csvrec-root #incidentsNavBtn.active {
  background: linear-gradient(90deg, oklch(55% 0.2 var(--tm-h) / 13%), oklch(55% 0.2 var(--tm-h) / 2%));
}
.csvrec-root .sideNavItem.active .sideNavIcon { box-shadow: 0 6px 14px -6px var(--tm-glow); }

/* The first figure of every KPI row is the hero card, tinted with the brand gradient. */
.csvrec-root .metricGrid > .metricCard:first-child,
.csvrec-root .kpiGrid > .kpi:first-child,
.csvrec-root .balancesFpKpis > .balancesFpKpi:first-child,
.csvrec-root .lotsFinanceOverviewDashboard > .lotsFinanceOverviewCard:first-child,
.csvrec-root .commercialSummary > :first-child {
  background:
    linear-gradient(135deg, oklch(72% 0.13 222 / 22%), oklch(55% 0.2 var(--tm-h) / 12%) 45%, oklch(51% 0.21 272 / 24%)),
    var(--panel-surface);
  border-color: oklch(58% 0.17 var(--tm-h) / 30%);
}

/* Headline type: larger and lighter, like the reference. */
.csvrec-root .pageHeaderTitle,
.csvrec-root .pageHeader--compact .pageHeaderTitle,
.csvrec-root .balancesFpHeader h1,
.csvrec-root .profitCalculatorHeader h1,
.csvrec-root .commercialHeaderTitle,
.csvrec-root #knowledgeBaseHost .kb-host-header h1 {
  font-size: var(--font-size-6xl);
  font-weight: 500;
  letter-spacing: -0.045em;
}
.csvrec-root .pageHeaderEmoji,
.theme-light .csvrec-root .pageHeaderEmoji,
.csvrec-root .pageHeader--compact .pageHeaderEmoji,
.theme-light .csvrec-root .pageHeader--compact .pageHeaderEmoji {
  box-shadow: 0 12px 24px -12px var(--tm-glow);
}

/* Small finishing touches: brand selection, visible keyboard focus, quiet scrollbars. */
.csvrec-root ::selection { background: oklch(55% 0.2 var(--tm-h) / 35%); }
.csvrec-root :is(button, a, .sideNavItem, [tabindex="0"]):focus-visible {
  outline: 2px solid oklch(62% 0.18 var(--tm-h));
  outline-offset: 2px;
}
html:not(.theme-light) body.csvrec-root,
html:not(.theme-light) .csvrec-root * { scrollbar-width: thin; scrollbar-color: rgba(var(--rgb-white), .16) transparent; }
.theme-light body.csvrec-root,
.theme-light .csvrec-root * { scrollbar-width: thin; scrollbar-color: rgba(var(--rgb-slate-900), .18) transparent; }

/* ══ Detail pass: type, tags and tables ══════════════════════════════════ */

/* Display typeface: Urbanist (OFL, assets/fonts) is the closest free match
   to the reference's Gilroy/Lufga. It sets headings, navigation, figures,
   tabs and buttons; dense data and Cyrillic text keep Inter (the stack
   falls back per glyph, and Urbanist ships Latin only). */
@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/fonts/Urbanist-Variable-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/fonts/Urbanist-Variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.csvrec-root :is(.pageHeaderTitle, .panelTitle, .sideBrandTitle, .sideNavItem, .metricCardValue, .kpiValue,
  .primary-btn, .ghost, .reconciliationTab, .incSegmentedBig button, .adminTab, .commercialHeaderTitle,
  .uiStateTitle, .modalTitle, .incTabsRow > button),
.csvrec-root :is(.balancesFpHeader, .profitCalculatorHeader) h1,
.csvrec-root #knowledgeBaseHost .kb-host-header h1,
.csvrec-root .lotsFinanceOverviewCard strong {
  font-family: var(--tm-display);
}

/* Sticky first columns sit on the card colour instead of the old navy ink. */
.csvrec-root :is(.incFullTable, .resultTable) .stickyCol { background: var(--panel-surface); }
.theme-light .csvrec-root :is(.incFullTable, .resultTable) .stickyCol { background: var(--panel-surface); }
.csvrec-root .resultTable .resultRow--amount .stickyCol {
  background: linear-gradient(rgba(var(--rgb-amber-400), .05), rgba(var(--rgb-amber-400), .05)), var(--panel-surface);
}
.csvrec-root .resultTable .resultRow--status .stickyCol {
  background: linear-gradient(rgba(var(--rgb-brand-pink), .05), rgba(var(--rgb-brand-pink), .05)), var(--panel-surface);
}

/* Tags: soft fills without outlines, like the reference's "#EVENTS" chips. */
.csvrec-root .pill,
.theme-light .csvrec-root .pill { border-color: transparent; }
.csvrec-root .pill-purple,
.theme-light .csvrec-root .pill-purple { background: oklch(55% 0.25 291 / 16%); color: oklch(72% 0.17 290); }
.theme-light .csvrec-root .pill-purple { color: oklch(45% 0.22 291); }

/* Counters inside tabs read as small neutral badges. */
.csvrec-root .incTabCount {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-family: var(--sans);
  font-size: var(--font-size-2xs);
  font-weight: 700;
}

/* Search fields and filter dropdowns use the interface face, not the code face. */
.csvrec-root input[type="search"],
.csvrec-root input.input[placeholder^="Search"],
.csvrec-root select,
.csvrec-root select.input,
.csvrec-root .toolGroup select { font-family: var(--sans); }

/* Status-mapping chips use the brand blue tint. */
.theme-light .csvrec-root .smapChip {
  background: oklch(55% 0.2 var(--tm-h) / 9%);
  border-color: oklch(55% 0.2 var(--tm-h) / 28%);
  color: oklch(42% 0.19 var(--tm-h));
}

/* Empty states: a gradient tray tile above a larger title, like the
   reference's illustrated placeholders. One rule covers every module's
   uiState("empty"); the tile is a data-URI image, no markup change. */
.csvrec-root .uiState--empty,
.csvrec-root .balancesFpMasterDetail .balancesFpModeState,
.csvrec-root .forecastNoData .historyEmpty,
.csvrec-root .lotsFinanceOverviewEmpty,
.csvrec-root .lotsFinanceTable td.muted[colspan] {
  padding-top: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='hsl(198 85% 58%)'/%3E%3Cstop offset='.5' stop-color='hsl(222 85% 58%)'/%3E%3Cstop offset='1' stop-color='hsl(248 75% 60%)'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='48' height='48' rx='14' fill='url(%23g)'/%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 25h5.5l2 3h5l2-3H34'/%3E%3Cpath d='M14 25l3.2-8.5A2 2 0 0 1 19 15h10a2 2 0 0 1 1.8 1.5L34 25v6a2 2 0 0 1-2 2H16a2 2 0 0 1-2-2z'/%3E%3C/g%3E%3C/svg%3E") center 8px / 44px 44px no-repeat;
}
.csvrec-root .uiState--empty .uiStateTitle { font-size: var(--font-size-lg); font-weight: 600; letter-spacing: -0.01em; }
.csvrec-root .forecastNoData .historyEmpty .panelTitle { font-size: var(--font-size-lg); font-weight: 600; }
.csvrec-root .uiState--error {
  padding-top: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='hsl(28 92% 62%)'/%3E%3Cstop offset='1' stop-color='hsl(350 78% 56%)'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='48' height='48' rx='14' fill='url(%23g)'/%3E%3Cg fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M24 16v10'/%3E%3Cpath d='M24 31.5v.5'/%3E%3C/g%3E%3C/svg%3E") center 8px / 44px 44px no-repeat;
}

/* People avatars carry the brand gradient. */
.csvrec-root .incBoardAvatar,
.theme-light .csvrec-root .incBoardAvatar { background: var(--tm-gradient); color: var(--color-white); }

/* Login: the same gradient logo tile as the side navigation. */
.csvrec-root .loginBrandMark {
  box-sizing: content-box;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--tm-gradient);
  color: var(--color-white);
  box-shadow: 0 12px 24px -12px var(--tm-glow);
}

/* Phones: headings and their icon tile step down so header actions keep one line. */
@media (max-width: 767px) {
  .csvrec-root .pageHeaderTitle,
  .csvrec-root .pageHeader--compact .pageHeaderTitle,
  .csvrec-root .balancesFpHeader h1,
  .csvrec-root .profitCalculatorHeader h1,
  .csvrec-root .commercialHeaderTitle,
  .csvrec-root #knowledgeBaseHost .kb-host-header h1 { font-size: var(--font-size-4xl); }
  .csvrec-root .pageHeaderEmoji,
  .theme-light .csvrec-root .pageHeaderEmoji,
  .csvrec-root .pageHeader--compact .pageHeaderEmoji,
  .theme-light .csvrec-root .pageHeader--compact .pageHeaderEmoji { width: 36px; height: 36px; }
  .csvrec-root .primary-btn { padding-left: 14px; padding-right: 14px; }
  /* Profit Calc packs title, action and status into one row: keep its original size. */
  .csvrec-root .profitCalculatorHeader h1 { font-size: var(--font-size-xl); }
}

/* Checkboxes: a shared touch-size rule (min-height: 24px) stretched every
   18px box into 18x24 and pushed its label off centre; boxes are square again
   and checkbox rows centre their text on the box. */
.csvrec-root input[type="checkbox"] { min-height: 0; }
.csvrec-root .checkboxRow,
.csvrec-root .predictionFpBackfillPopover .checkboxRow { align-items: center; }
.csvrec-root .predictionFpBackfillPopover .checkboxRow input { margin-top: 0; }
.csvrec-root .tasksRetentionSection label:has(input[type="checkbox"]) { align-items: center; }

/* Warning tags use the reference's yellow chip. */
.csvrec-root .pill-amber,
.theme-light .csvrec-root .pill-amber { background: var(--tm-yellow); color: oklch(25% 0.04 103); }

/* A little more depth on the controls people touch most. */
.theme-light .csvrec-root :is(.ghost, .ghost-btn) { box-shadow: 0 1px 2px rgba(var(--rgb-slate-900), .06); }
.csvrec-root :is(.reconciliationTab--active, .incSegmentedBig button.active, .adminTabs .adminTab--active, .adminTabs .adminTab.active) {
  box-shadow: 0 1px 2px rgba(var(--rgb-black), .10), 0 6px 16px -8px rgba(var(--rgb-black), .35);
}
/* Admin form fields size every input to the field (width 100%, padding),
   which also stretched their checkboxes ("Active" was 386px wide, project
   checks 21x24); checkboxes keep their own square box. */
.csvrec-root .adminFormField input[type="checkbox"] { width: 18px; padding: 0; }

/* ── Forms: one hierarchy ─────────────────────────────────────────────────
   Field labels are small, semi-bold captions above 13px controls; option
   groups (checkbox lists) look and size like the selects beside them. */
.csvrec-root :is(.merchantNotificationsSelectionGrid .fieldRow > span, .merchantNotificationsChoiceGroup legend, .merchantNotificationsRouteSelector legend) {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-label);
  letter-spacing: .01em;
}
.csvrec-root .merchantNotificationsChoiceList {
  min-height: 36px;
  padding: 4px 12px;
  align-items: center;
  align-self: start;
  font-size: var(--font-size-md);
  border-color: var(--input-border);
  background: var(--input-bg);
}
.csvrec-root .merchantNotificationsRouteSelector .merchantNotificationsChoiceList { padding: 10px 12px; gap: 12px; }
/* Options align to their first line, so a long method name that wraps keeps
   its checkbox level with the first line instead of the middle of the block. */
.csvrec-root .merchantNotificationsChoiceGroup label { align-items: flex-start; line-height: 18px; }
/* The module floated the legends (and cleared them below), which put the
   option boxes 8px lower than the selects beside them; legends now sit in
   normal flow with the same caption line-height and gap as span labels, so
   every field in a row starts and ends on the same line. */
.csvrec-root :is(.merchantNotificationsSelectionGrid .fieldRow > span, .merchantNotificationsChoiceGroup legend, .merchantNotificationsRouteSelector legend) { line-height: 1.25; }
.csvrec-root :is(.merchantNotificationsChoiceGroup, .merchantNotificationsRouteSelector) legend { float: none; margin: 0 0 8px; }
.csvrec-root .merchantNotificationsRouteChoice strong { font-size: var(--font-size-md); font-weight: 600; }
.csvrec-root .merchantNotificationsRouteChoice span > :last-child { font-size: var(--font-size-sm); color: var(--text-muted); }


/* Field labels everywhere: a label that wraps a text field, select or
   textarea is a small semi-bold caption, and the field inside it uses the
   13px control size. Before, these captions inherited the page's 16px and
   sat above 12-13px fields (Notifications history filters, Incidents
   schedule, Lots filters, HR calendar). Checkbox labels are unaffected. */
.csvrec-root label:has(:is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea)) {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-label);
}
.csvrec-root label :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  font-size: var(--font-size-md);
  font-weight: 400;
}

/* Commercial's currency menu sets its checkboxes 14px tall but left them
   18px wide; they are 14px squares. */

/* Date and time fields: Chrome pads its inner date editor and calendar
   icon, so date inputs came out 2-4px taller than the text fields and
   selects beside them (HR Vacation filters: 34/34/38/38). With the inner
   padding removed every field in a row has the same height. */
.csvrec-root input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"])::-webkit-datetime-edit,
.csvrec-root input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"])::-webkit-datetime-edit-fields-wrapper { padding: 0; line-height: 1.2; }
.csvrec-root input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"])::-webkit-calendar-picker-indicator { margin-block: 0; padding-block: 0; }

/* Counters on an active segment: in dark the active chip is white, so the
   base white-on-translucent-black counter all but vanished (contrast ~1). */
html:not(.theme-light) .csvrec-root .incSegmentedBig button.active .incTabCount {
  background: rgba(var(--rgb-black), .08);
  color: var(--seg-active-text);
}

/* Commercial Engagement search: the placeholder ("Search engagements...")
   was cut off — a search field also reserves room for its clear button. */
.csvrec-root .commercialEngagementToolbar input[type="search"] { min-width: 180px; }

/* Filter grids: a select is as wide as its longest option by default, so at
   1024px and below "Merchant method" and "Merchant" spilled over the next
   column in Notifications history. Fields now fit their grid cell. */
.csvrec-root .merchantNotificationsFilterGrid > * { min-width: 0; }
.csvrec-root .merchantNotificationsFilterGrid :is(select, input:not([type="checkbox"]):not([type="radio"])) { width: 100%; min-width: 0; }

/* Reconciliation archive filters: the unclassed selects took the base 9px
   padding (36px) beside 8px .input fields (34px); one height for the row. */
.csvrec-root .archiveBatchFilters select { padding-top: 8px; padding-bottom: 8px; }

/* Fields use the interface face, like every control in the reference: the
   code face on .input made dates, amounts and free text look like a
   terminal next to sans selects ("18.10.2026, 13:03" in Add engagement).
   Tabular figures keep numbers aligned. */
.csvrec-root .input,
.csvrec-root .toolGroup input,
.csvrec-root .toolGroup select { font-family: var(--sans); font-variant-numeric: tabular-nums; }

/* ── Visual pass fixes ───────────────────────────────────────────────── */

/* Reconciliation sources: the light theme already flattened the "box in a
   box" source fields and kept "+ Add file" at button height; dark now
   matches instead of a framed field and a 78px gradient block. */
.csvrec-root .toolGroup,
.csvrec-root .toolbar--airy .toolGroup {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  min-height: 0;
}
.csvrec-root .toolbarAction { align-items: flex-end; }

/* History keeps its tall panel for real runs, but an empty history no
   longer leaves a screen of blank card under the empty state. */
.csvrec-root .csvHistoryPanel:has(.opTableEmpty) { min-height: 0; }

/* Profit Calc: header breathes inside its card. */
.csvrec-root .profitCalculatorHeader { padding: var(--space-4) var(--space-5) var(--space-3); }

/* Ledger headline amounts use the display face like every other KPI. */
.csvrec-root :is(.ledgerAccountBalance, .ledgerExpenseSummary > strong, .ledgerInvestmentMetrics strong) {
  font-family: var(--tm-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Admin has no project bar above its header, so the page title sat on the
   top edge; and the active tab's counter was white on the white chip. */
@media (min-width: 768px) {
  .csvrec-root #adminAppShell > main.adminMain { padding-top: var(--space-5); }
}
html:not(.theme-light) .csvrec-root .adminTabs :is(.adminTab--active, .adminTab.active) .adminTabCount { color: oklch(14% 0 0 / 62%); }

/* Information notices (Security statuses and other info banners) use a soft
   brand blue instead of the old navy. */
html:not(.theme-light) .csvrec-root {
  --notice-info-bg: oklch(53.2% 0.2 var(--tm-h) / 12%);
  --notice-info-border: oklch(53.2% 0.2 var(--tm-h) / 30%);
  --notice-info-text: oklch(84% 0.07 var(--tm-h));
}
.theme-light .csvrec-root {
  --notice-info-bg: oklch(53.2% 0.2 var(--tm-h) / 7%);
  --notice-info-border: oklch(53.2% 0.2 var(--tm-h) / 22%);
  --notice-info-text: oklch(40% 0.18 var(--tm-h));
}

/* Security: the link-code action is a button, not a full-width bar, and the
   account navigation floats like the panel's. */
.csvrec-root.securityPage .securityCardBody > .primary-btn { justify-self: start; }
@media (min-width: 768px) {
  .csvrec-root.securityPage #appShell > .sideNav {
    top: 12px;
    margin: 12px 0 12px 12px;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    padding: var(--space-4) var(--space-3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
  }
}


/* Incidents: an empty filter-chip row still took its padding plus a grid
   gap (a ~60px hole above the tickets); an empty row is not rendered. */
.csvrec-root .incFilterChips:empty { display: none; }

/* Commercial entity cards: the name is the card title, not a grey plaque
   (it rendered as a secondary button). It reads as a link on hover. */
.csvrec-root .linkButton.commercialEntityName,
.theme-light .csvrec-root .linkButton.commercialEntityName {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-strong);
  font-family: var(--tm-display);
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: left;
}
.csvrec-root .linkButton.commercialEntityName:hover { color: var(--accent); background: transparent; }

/* Phones: KPI rows read as a 2x2 grid instead of four full-width cards
   (Incidents spent a whole screen on four numbers), and the Notifications
   header aligns left like every other module header. */
@media (max-width: 560px) {
  .csvrec-root .metricGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .csvrec-root .merchantNotificationsHeader { align-items: flex-start; }
}

/* Phone card-tables: the row captions (td::before from data-label) inherit
   the cell's face, so "TX ID" and "OPERATION DATE" came out in the code face
   next to sans "PROVIDER". Captions use one face. */
.csvrec-root td[data-label]::before,
.csvrec-root .adminDataTableMobile td::before { font-family: var(--sans); }

/* Wide screens: content uses the width instead of a narrow column.
   - Security was capped at 780px (two thirds of a 1920px screen empty);
     from 1200px its two cards sit side by side at one shared height.
   - The Incidents digest schedule is a short single-column form; its card
     takes the form's width instead of a full-width card with the form
     pressed to its left edge. */
@media (min-width: 1200px) {
  .csvrec-root.securityPage .securityContent {
    width: min(100%, 1240px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .csvrec-root.securityPage .securityContent > .securityCard { align-self: stretch; }
  .csvrec-root.securityPage .securityContent > .pageHeader { grid-column: 1 / -1; }
}
.csvrec-root .panel:has(.incScheduleBody) { max-width: 46rem; }

/* Profit Calc table:
   - Merchant and Method had 95px columns and inputs capped at 130px, so
     names like "UI DEMO · Northwind Market" were cut; they get room (the
     table already scrolls sideways), and Net profit fits its two figures.
   - Its first and last columns are pinned while the table scrolls, but they
     were painted with translucent colours (--panel, the net-result tints), so
     scrolled columns showed through ("2.5" under Net profit). Pinned cells
     are opaque; the result tint is layered over the card colour. */
.csvrec-root .profitCalculatorTable col[data-field="merchant_name"],
.csvrec-root .profitCalculatorTable col[data-field="method_name"] { width: 200px; }
.csvrec-root .profitCalculatorTable col[data-field="net_profit_usd"] { width: 150px; }
.csvrec-root .profitCalculatorTable :is(td[data-field="merchant_name"], td[data-field="method_name"]) .profitCalculatorInput { max-width: none; }
.csvrec-root .profitCalculatorTable td:first-child,
.csvrec-root .profitCalculatorTable td:last-child { background: var(--panel-surface); }
.csvrec-root .profitCalculatorTable td.profitCalculatorNet--burgundy { background: linear-gradient(var(--profit-net-burgundy-bg), var(--profit-net-burgundy-bg)), var(--panel-surface); }
.csvrec-root .profitCalculatorTable td.profitCalculatorNet--red { background: linear-gradient(var(--profit-net-red-bg), var(--profit-net-red-bg)), var(--panel-surface); }
.csvrec-root .profitCalculatorTable td.profitCalculatorNet--orange { background: linear-gradient(var(--profit-net-orange-bg), var(--profit-net-orange-bg)), var(--panel-surface); }
.csvrec-root .profitCalculatorTable td.profitCalculatorNet--green { background: linear-gradient(var(--profit-net-green-bg), var(--profit-net-green-bg)), var(--panel-surface); }

/* One page gutter for every section. Reconciliation, Incidents, Prediction
   and Balances sit 32px (24px below 1440px) inside the content column, after
   the 8px gap beside the floating navigation; Ledger, Lots, HR, Tasks,
   Notifications and Profit Calc used their own 12-32px, and Knowledge Base
   had no gap, and Admin had none on the right, so titles and cards jumped
   sideways when switching sections.
   The HR, Tasks, Ledger and Lots top bars span that padding with negative
   margins, so they follow the same values. */
@media (min-width: 768px) {
  .csvrec-root { --tm-gutter: var(--space-6); }
  body.archive-fullscreen.csvrec-root #appShell > :is(main.ledgerMain, main.lotsFinanceMain),
  body.archive-fullscreen.csvrec-root #appShell > :is(main#hrView, main#tasksView).main--airy {
    padding-left: calc(var(--space-2) + var(--tm-gutter));
    padding-right: var(--tm-gutter);
  }
  body.archive-fullscreen.csvrec-root #appShell > main#hrView.main--airy > #hrRoot > .topbar,
  .csvrec-root #tasksView #tasksTopbar > .topbar,
  body.archive-fullscreen.csvrec-root #appShell > main.ledgerMain > #ledgerRoot > .topbar,
  body.archive-fullscreen.csvrec-root #appShell > main.lotsFinanceMain > #lotsFinanceRoot > .topbar {
    margin-left: calc(-1 * (var(--space-2) + var(--tm-gutter)));
    margin-right: calc(-1 * var(--tm-gutter));
  }
  .csvrec-root #appShell > #knowledgeBaseView { padding-left: var(--space-2); }
  /* Admin ran edge to edge on the right. */
  body.archive-fullscreen.csvrec-root #adminAppShell > main.adminMain {
    padding-left: calc(var(--space-2) + var(--tm-gutter));
    padding-right: var(--tm-gutter);
    padding-bottom: var(--tm-gutter);
  }
  .csvrec-root #merchantNotificationsView .merchantNotificationsPage {
    padding-left: var(--tm-gutter);
    padding-right: var(--tm-gutter);
  }
  .csvrec-root #profitCalculatorView .profitCalculator { margin: var(--space-6) var(--tm-gutter); }
}
@media (min-width: 1440px) {
  .csvrec-root { --tm-gutter: var(--space-8); }
}

/* Reconciliation:
   - The Settings card inset its blocks by only 12px (margins on each child)
     while every other card sits 24px in; card padding makes up the rest.
   - Archive's Reset filled a whole 188px filter cell at 27px tall beside
     34px fields; it keeps its own width at the fields' height. */
.csvrec-root .reconciliationSettings { padding: var(--space-3) var(--space-3) var(--space-5); }
.csvrec-root .archiveBatchFilters > button {
  justify-self: start;
  min-height: 34px;
  padding-inline: var(--space-4);
}

/* Incidents › Schedule: its help paragraphs were unstyled browser text
   (16px with 16px margins), larger than the labels and fields they explain. */
.csvrec-root .incScheduleBody p {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

/* Incidents › Board: its columns sat 14px inside the line the KPI cards and
   panels above and below them share. */
.csvrec-root .incBoard { padding-left: 0; padding-right: 0; }

/* Commercial's link-style buttons (breadcrumbs, table links, board card
   titles) lost their transparent background to the global
   `html[data-theme="light"] button` rule and showed as grey blocks. */
.csvrec-root button.linkButton,
.csvrec-root button.linkButton:hover {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

/* Lots forms and filters use the sans face with tabular figures like every
   other form, and the filter row keeps a gap before the table it filters. */
.csvrec-root .lotsFinanceField :is(input, select, textarea) {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}
/* Every single-choice select shows the app's drop-down arrow. Module rules
   that paint a field with the `background` shorthand (HR, Lots and others)
   wiped the global arrow, so those selects looked like text inputs. Compact
   pickers inside table cells (Incidents' quick priority) stay arrowless. */
.csvrec-root select:not([multiple], [size], td select) {
  padding-right: 28px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--input-placeholder) 50%),
    linear-gradient(135deg, var(--input-placeholder) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 1px), calc(100% - 11px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.csvrec-root .lotsFinanceFormGrid[aria-label$="filters"] { margin-bottom: var(--space-4); }

/* Keep the scrollbar's space reserved, so pages and tabs short enough to
   need no scrollbar do not sit 10px wider than long ones and the content
   does not shift sideways when switching between them. */
html:has(> body.csvrec-root) { scrollbar-gutter: stable; }

/* Section tabs share one look. HR and Commercial tabs were loose grey chips
   in the browser's default 13px regular type, and the Reconciliation and
   Admin tracks were painted in the page colour, so they vanished in light
   mode. HR's row holds only tabs and gets the full track; Commercial's row
   also holds the Queue/Board switch on the right, so its tabs take the chip
   style without a track. */
.csvrec-root .incTabsRow.hrTabs {
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--seg-idle-bg);
}
.csvrec-root .incTabsRow:is(.hrTabs, .commercialTabs) > button {
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--seg-idle-text);
  font-family: var(--tm-display);
  font-size: var(--font-size-md);
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}
.csvrec-root .incTabsRow:is(.hrTabs, .commercialTabs) > button:hover:not(.active) { background: var(--seg-idle-hover-bg); }
.csvrec-root .incTabsRow:is(.hrTabs, .commercialTabs) > button.active {
  background: var(--seg-active-bg);
  color: var(--seg-active-text);
  box-shadow: 0 1px 2px rgba(var(--rgb-black), .10), 0 6px 16px -8px rgba(var(--rgb-black), .35);
}
.theme-light .csvrec-root :is(.reconciliationTabs, .adminTabs, .incTabsRow.hrTabs) { background: rgba(var(--rgb-white), .55); }

/* Drawn icons (.uiIcon) replace the emoji and text glyphs the panel used as
   icons (close ✕, menus ⋯, sort ⇅, carets, edit, link, checks, warnings).
   They are 1.6px line icons in the text colour; inline they sit on the text's
   optical centre, and in icon-only buttons the button's own centring applies. */
.csvrec-root .uiIcon {
  flex-shrink: 0;
  vertical-align: -0.18em;
}
.csvrec-root :is(.sortInd, .col-filter-icon, .col-filter-active, .projectSwitchArrow) .uiIcon { vertical-align: -0.1em; }
/* The morning greeting's sun and the Admin wish banner's gift sit in the
   brand gradient tile, like every page header icon. */
.csvrec-root .bdayEmoji,
.csvrec-root .adminWishBannerEmoji {
  width: 56px;
  height: 56px;
  padding: 13px;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  background: var(--tm-gradient);
  color: var(--color-white);
  line-height: 0;
  text-align: center;
  box-shadow: 0 12px 24px -12px var(--tm-glow);
}
.csvrec-root .bdayEmoji { margin: 0 auto 16px; }
.csvrec-root .adminWishBannerEmoji { width: 48px; height: 48px; padding: 13px; }

/* Incidents: the toolbar's search, Filters, Closed & Archive and SLA stood
   at 33, 31, 27 and 27px; they share the search field's height. Queue
   captions may wrap to two lines ("Operation / date") with a little less
   tracking in sentence case instead of being cut to "OPERATIO…" in their
   fixed columns. */
.csvrec-root .incToolbarRight button { min-height: 33px; }
.csvrec-root #incidentsArchiveRoot .incQueueTable thead th[data-inc-col] {
  padding-left: 5px;
  padding-right: 5px;
  white-space: normal;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.25;
  vertical-align: bottom;
}
.csvrec-root #incidentsArchiveRoot .incFullTable thead th { letter-spacing: 0; text-transform: none; }

/* HR › Calendar: the toolbar sat 12px and the explanatory note 0px from the
   card's rounded edge; both take the 20px card inset. */
.csvrec-root .hrCalendarPanel > .hrCalendarToolbar { padding: var(--space-4) var(--space-5); }
.csvrec-root .hrCalendarPanel > p { padding-inline: var(--space-5); }

/* Incident details: Copy link sat alone in the middle of the header
   (the header spaces its three children apart); it joins Close on the right. */
.csvrec-root #incDetailCopyLink { margin-left: auto; margin-right: var(--space-2); }

/* File pickers: the browser's grey "Choose File" button becomes a secondary
   button like the rest of the panel's controls. */
.csvrec-root input[type="file"] { color: var(--text-muted); font-size: var(--font-size-sm); }
.csvrec-root input[type="file"]::file-selector-button {
  margin-right: var(--space-3);
  padding: 7px 14px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--tm-ghost-fill);
  color: var(--text-strong);
  font-family: var(--tm-display);
  font-size: var(--font-size-md);
  font-weight: 600;
  cursor: pointer;
}
.csvrec-root input[type="file"]::file-selector-button:hover { background: var(--btn-ghost-hover-bg); }

/* Profit Calc table edges: the first and last columns take the card's 20px
   inset (the dates sat 1px from the card edge), and the pinned Date and
   Net profit columns cast a soft shadow over the columns scrolling beneath
   them, so a cut-off column reads as "scrolls" rather than "broken". */
.csvrec-root .profitCalculatorTable :is(th, td):first-child {
  padding-left: var(--space-5);
  box-shadow: 10px 0 14px -12px rgba(var(--rgb-slate-900), .22);
}
.csvrec-root .profitCalculatorTable :is(th, td):last-child {
  padding-right: var(--space-5);
  box-shadow: -10px 0 14px -12px rgba(var(--rgb-slate-900), .22);
}
html:not(.theme-light) .csvrec-root .profitCalculatorTable :is(th, td):first-child { box-shadow: 10px 0 14px -12px rgba(var(--rgb-black), .7); }
html:not(.theme-light) .csvrec-root .profitCalculatorTable :is(th, td):last-child { box-shadow: -10px 0 14px -12px rgba(var(--rgb-black), .7); }

/* ── Phones ─────────────────────────────────────────────────────────────
   - One 16px page edge for every section: they used 10px (Notifications),
     12px (most), 20px (Ledger, Lots) and 32px (HR, whose desktop padding
     never switched off). The HR and Tasks top bars follow it.
   - The shell grid stretched its empty first row (everything in it is
     fixed-position) over short pages, so Profit Calc started 200px down.
   - Stacked table rows label each value with a quiet sentence-case caption
     instead of heavy uppercase that competed with the value. */
@media (max-width: 767px) {
  .csvrec-root { --tm-gutter: var(--space-4); }
  body.archive-fullscreen.csvrec-root #appShell { align-content: start; }
  .csvrec-root .main--airy,
  body.archive-fullscreen.csvrec-root #appShell > main.main--airy,
  body.archive-fullscreen.csvrec-root #appShell > :is(main.ledgerMain, main.lotsFinanceMain),
  body.archive-fullscreen.csvrec-root #adminAppShell > main.adminMain,
  .csvrec-root #merchantNotificationsView .merchantNotificationsPage,
  .csvrec-root .commercialRoot,
  .csvrec-root #knowledgeBaseHost :is(.kb-host-header, .kb-host-empty),
  .csvrec-root .kbRoot {
    padding-left: var(--tm-gutter);
    padding-right: var(--tm-gutter);
  }
  body.archive-fullscreen.csvrec-root #appShell > main#hrView.main--airy > #hrRoot > .topbar,
  .csvrec-root #tasksView #tasksTopbar > .topbar,
  body.archive-fullscreen.csvrec-root #appShell > main.ledgerMain > #ledgerRoot > .topbar,
  body.archive-fullscreen.csvrec-root #appShell > main.lotsFinanceMain > #lotsFinanceRoot > .topbar {
    margin-left: calc(-1 * var(--tm-gutter));
    margin-right: calc(-1 * var(--tm-gutter));
  }
  .csvrec-root #profitCalculatorView .profitCalculator { margin: var(--space-4) var(--tm-gutter); }
  .csvrec-root .profitCalculatorTable :is(th, td):last-child { box-shadow: none; }
  /* Stacked one per row, Lots cards take their content's height (the
     desktop minimum left a half-empty Fund card). */
  .csvrec-root .lotsFinanceOverviewCard { min-height: 0; }
  .csvrec-root :is(td[data-label], .adminDataTableMobile td)::before {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
  }
}

/* Login: the first screen people see. The same sky and indigo glows as the
   app behind a roomier card, a display-face heading, 40px fields with
   readable 14px text, and "Back to login" styled as a secondary button
   instead of the browser's default. */
/* The glows live on the page itself (the wrapper is only as tall as the
   card, which clipped them into visible rectangles). */
.loginPage .csvrec-root { background-color: transparent; }
.theme-light body.loginPage:has(> .csvrec-root) {
  background:
    radial-gradient(44rem 34rem at 88% 108%, oklch(85% 0.08 262 / 55%), transparent 68%),
    radial-gradient(36rem 26rem at 8% -10%, oklch(91% 0.06 215 / 60%), transparent 70%),
    oklch(95.5% 0.003 262);
  background-attachment: fixed;
}
html:not(.theme-light) body.loginPage:has(> .csvrec-root) {
  background:
    radial-gradient(44rem 34rem at 88% 108%, oklch(46% 0.19 268 / 26%), transparent 68%),
    radial-gradient(36rem 26rem at 8% -10%, oklch(64% 0.12 222 / 14%), transparent 70%),
    oklch(13% 0 0);
  background-attachment: fixed;
}
.loginPage .csvrec-root .panel { box-shadow: var(--panel-shadow), 0 40px 80px -40px var(--tm-glow); }
.loginPage .csvrec-root .panelHeader { padding: var(--space-6) var(--space-6) 0; }
.loginPage .csvrec-root .panelTitle {
  font-family: var(--tm-display);
  font-size: var(--font-size-4xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.loginPage .csvrec-root form .toolGroup label,
.loginPage .csvrec-root form label { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-label); }
.loginPage .csvrec-root .input {
  min-height: 40px;
  font-size: var(--font-size-base);
}
.loginPage .csvrec-root .primary-btn { min-height: 42px; font-size: var(--font-size-base); }
.loginPage .csvrec-root #backToLogin {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--tm-ghost-fill);
  color: var(--text-strong);
  font-family: var(--tm-display);
  font-size: var(--font-size-md);
  font-weight: 600;
}

/* Monospace is kept for identifiers (transaction IDs, audit actors, codes).
   Counts, dates, ages, people and names were also set in it, which read as
   raw data dumps; they use the interface face with even-width figures. */
.csvrec-root :is(
  #incidentsArchiveRoot .incFullTable td.mono,
  .incBoardColCount, .incBoardCardId, .incFiltersChip, .incTabCount,
  .panelTitleCount, .projectSwitchValue,
  .adminTabCount, .adminChip, .adminProjectCardStat,
  .slaSubPct, .slaSubMeta
) {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

/* ── One KPI card ───────────────────────────────────────────────────────
   Every module drew its figure cards its own way: labels from 10px tracked
   uppercase (Incidents, Lots) to 14px white (Balances), values from 24px/700
   Inter to 28px/700 Urbanist. They now share one label (12px semibold,
   muted, sentence case) and one value (28px display face, even-width
   figures); a value keeps its own meaning colour. HR's cards no longer sit
   inside a second card. */
.csvrec-root :is(
  .metricCard .eyebrow, .lotsFinanceOverviewCard > .eyebrow, .commercialMetricLabel,
  .balancesFpKpi > span, .ledgerAccountLabel, .hrSummaryCard > span:first-child
) {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.csvrec-root :is(
  .metricCard .metricCardValue, .commercialMetricValue, .balancesFpKpi > strong,
  .ledgerAccountBalance, .hrSummaryCard > b, .merchantNotificationsAttentionCounts strong
) {
  font-family: var(--tm-display);
  font-size: var(--font-size-5xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.csvrec-root .panel.hrSummaryPanel,
.theme-light .csvrec-root .panel.hrSummaryPanel {
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.csvrec-root .hrSummaryCard {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  background: var(--panel-surface);
  box-shadow: var(--panel-shadow);
}

/* Captions in sentence case. Small tracked uppercase labels (eyebrows,
   table headers in Reconciliation, Incidents and Lots, Lots form captions)
   sat beside sentence-case labels everywhere else; one calm caption style
   reads cleaner and is narrower in tight table columns. */
.csvrec-root :is(.eyebrow, .eyebrow-soft, .lotsFinanceField, .lotsFinanceField > span, .incCountdown) {
  letter-spacing: 0;
  text-transform: none;
}
.csvrec-root :is(.eyebrow, .eyebrow-soft, .lotsFinanceField > span) { font-size: var(--font-size-sm); font-weight: 600; }
.csvrec-root :is(.opTable, .incFullTable, .lotsFinanceTable, .denseTable) th {
  letter-spacing: 0;
  text-transform: none;
}

/* Lots' own empty messages ("No alerts.", empty tables) take the shared
   empty-state tile above centred text, like every other section. */
.csvrec-root :is(.lotsFinanceOverviewEmpty, .lotsFinanceTable td.muted[colspan]) {
  padding-bottom: var(--space-5);
  text-align: center;
}

/* Notifications › Active Incidents and History: their heading, Refresh,
   list and pager sat straight on the page while every other section is a
   card. Each becomes one card, and History's filters an inset tray in it
   rather than a card inside a card. */
.csvrec-root .merchantNotificationsIncidentPage {
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  background: var(--panel-surface);
  box-shadow: var(--panel-shadow);
}
.csvrec-root .merchantNotificationsIncidentPage > .panelHeader,
.theme-light .csvrec-root .merchantNotificationsIncidentPage > .panelHeader { padding: 0; }
.csvrec-root .merchantNotificationsIncidentPage .panel.merchantNotificationsHistoryFilters,
.theme-light .csvrec-root .merchantNotificationsIncidentPage .panel.merchantNotificationsHistoryFilters {
  border-color: transparent;
  border-radius: var(--radius-md);
  background: var(--panel-soft-bg);
  box-shadow: none;
}
.csvrec-root .merchantNotificationsIncidentPage .merchantNotificationsHistoryFilters :is(input, select) { background-color: var(--panel-surface); }

/* Loading states draw placeholder lines with a soft sweep where the content
   will appear (a skeleton), instead of a spinner; the "Loading..." text stays
   below them for screen readers and as a caption. */
.csvrec-root .uiState--loading {
  padding-top: 112px;
  background:
    linear-gradient(90deg, transparent, color-mix(in oklab, var(--panel) 70%, transparent), transparent) -150% 20px / 40% 84px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 84'%3E%3Cg fill='hsl(222 18%25 55%25 / .16)'%3E%3Crect x='50' y='0' width='320' height='14' rx='7'/%3E%3Crect x='0' y='35' width='420' height='14' rx='7'/%3E%3Crect x='80' y='70' width='260' height='14' rx='7'/%3E%3C/g%3E%3C/svg%3E") center 20px / min(420px, 86%) 84px no-repeat;
  animation: tmSkeletonSweep 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .csvrec-root .uiState--loading { animation: none; }
}

/* Clickable cards answer the pointer with a brand-tinted edge and a soft
   lift; pressed buttons darken a touch. */
.csvrec-root :is(.incBoardCard, .commercialBoardCard, .commercialEntityCard, .commercialKpiFilter) {
  transition: border-color .15s ease, box-shadow .15s ease;
}
.csvrec-root :is(.incBoardCard, .commercialBoardCard, .commercialEntityCard, .commercialKpiFilter):hover {
  border-color: oklch(58% 0.17 var(--tm-h) / 40%);
  box-shadow: 0 12px 26px -16px oklch(55% 0.2 var(--tm-h) / 55%);
}
.csvrec-root .primary-btn:active:not(:disabled) { filter: brightness(.93); }
.csvrec-root :is(.ghost, .ghost-btn):active:not(:disabled) { background: var(--seg-idle-hover-bg); }

/* Items in an overflow menu are plain rows, not separate bordered buttons. */
.csvrec-root .lotsFinanceMoreMenu > button,
.theme-light .csvrec-root .lotsFinanceMoreMenu > button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-weight: 500;
}
.csvrec-root .lotsFinanceMoreMenu > button:hover,
.theme-light .csvrec-root .lotsFinanceMoreMenu > button:hover { background: var(--seg-idle-hover-bg); }

/* Empty, error and loading states keep a 24px gap below their text: inside
   cards with no padding of their own (HR Vacation and Payroll) the message
   sat 1px from the card's bottom edge. */
.csvrec-root :is(.uiState--empty, .uiState--error, .uiState--loading) { padding-bottom: var(--space-6); }
/* A lone HR filter (Reports' Year) keeps a field's width instead of
   stretching across the page for a four-digit value. */
.csvrec-root .hrFilters > .hrFilterField:only-child { max-width: 220px; }

/* Lots cards' label/value rows (Next salary, Recipients, …) were raw
   browser text: 16px labels above italic 16px values. Labels are small and
   muted, values plain and semibold. Lots table headers match the other
   tables, and computed read-only fields take the brand tint, not violet. */
.csvrec-root .lotsFinanceOverviewRow > span:first-child { color: var(--text-muted); font-size: var(--font-size-sm); font-weight: 500; }
.csvrec-root .lotsFinanceOverviewRow > :is(em, b) {
  color: var(--text-strong);
  font-size: var(--font-size-base);
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.csvrec-root .lotsFinanceTable th { font-size: var(--font-size-sm); font-weight: 600; }
.csvrec-root .lotsFinanceField input[readonly] {
  border-color: oklch(58% 0.15 var(--tm-h) / 30%);
  background: oklch(58% 0.15 var(--tm-h) / 7%);
}

/* The account card's avatar wears the brand gradient, like the logo tile. */
.csvrec-root .accountAvatar { background: var(--tm-gradient); box-shadow: 0 6px 14px -8px var(--tm-glow); }

/* Logout in the account menu reads as the exit it is: red text and icon,
   a soft red fill on hover. */
.csvrec-root .accountMenu :is(#logoutBtn, [data-account-logout], [data-archive-action="logout"]),
.theme-light .csvrec-root .accountMenu :is(#logoutBtn, [data-account-logout], [data-archive-action="logout"]) {
  color: var(--danger);
}
.csvrec-root .accountMenu :is(#logoutBtn, [data-account-logout], [data-archive-action="logout"]) .sideNavIcon,
.theme-light .csvrec-root .accountMenu :is(#logoutBtn, [data-account-logout], [data-archive-action="logout"]) .sideNavIcon {
  background: color-mix(in oklch, var(--danger) 10%, transparent);
  color: var(--danger);
}
.csvrec-root .accountMenu :is(#logoutBtn, [data-account-logout], [data-archive-action="logout"]):hover,
.theme-light .csvrec-root .accountMenu :is(#logoutBtn, [data-account-logout], [data-archive-action="logout"]):hover {
  background: color-mix(in oklch, var(--danger) 9%, transparent);
  color: var(--danger);
}

/* Commercial provider / merchant card:
   - the title uses the display face like other page titles, and the
     breadcrumb's "Commercial" reads as the link it is;
   - side-column lists (Contacts) read label → value left to right at a fixed
     label width, in sentence case, instead of pushing the two apart;
   - a currency's header keeps its name at the start (with three flex children
     spread apart, "AED" sat in the middle) and its buttons at the end;
   - a method's header buttons keep their labels on one line and move under the
     name when the card is narrow, instead of squeezing both. */
.csvrec-root .commercialDetailTitle {
  font-family: var(--tm-display);
  font-size: var(--font-size-5xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.csvrec-root .commercialBreadcrumb .linkButton {
  padding: 0;
  color: var(--accent);
  font-weight: 600;
}
.csvrec-root .commercialBreadcrumb .linkButton:hover { text-decoration: underline; }
/* On the page canvas (not a white card) the light accent sat at 4.4:1. */
.theme-light .csvrec-root .commercialBreadcrumb .linkButton { color: oklch(48% 0.2 var(--tm-h)); }
.csvrec-root .commercialOverviewSide .commercialTable td {
  justify-content: flex-start;
  text-align: left;
}
.csvrec-root .commercialOverviewSide .commercialTable td::before {
  flex: 0 0 76px;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.csvrec-root .commercialDirectionHeader { justify-content: flex-start; gap: var(--space-2); }
.csvrec-root .commercialDirectionHeader > .commercialRowAction { margin-left: auto; }
.csvrec-root .commercialMethodOverviewHeader { flex-wrap: wrap; }
.csvrec-root .commercialMethodOverviewHeader .commercialRowAction { flex-wrap: wrap; }
.csvrec-root .commercialMethodOverviewHeader .commercialRowAction > :is(button, select, .ghost) { white-space: nowrap; }

/* Commercial card bodies line up with their panel title instead of sitting
   10px left of it. */
.csvrec-root .panel > .commercialCardBody { padding-inline: var(--space-6); }

/* One column-header style for every data table: 12px, semibold, sentence
   case (Incidents sat at 10px, Archive/HR/Ledger at 13px). */
.csvrec-root :is(.opTable, .incFullTable, .adminTable, .denseTable, .profitCalculatorTable, .ledgerExpenseAccessible) thead th,
.csvrec-root #incidentsArchiveRoot :is(.opTable, .incFullTable, .adminTable) thead th,
.theme-light .csvrec-root #incidentsArchiveRoot :is(.opTable, .incFullTable, .adminTable) thead th {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* HR filter rows grow their first field because on People it is the search
   box. Where the first field is a select (Vacation status, Payroll
   department) it keeps its own width and the employee picker takes the slack. */
.csvrec-root .hrFilters > .hrFilterField:first-child:has(> select) { flex: 0 1 220px; }
.csvrec-root .hrFilters > .hrFilterField:has([data-hr-combobox-filter]) { flex: 1 1 260px; }

/* Notifications tables start and end on the card's title inset. */
.csvrec-root .panel .merchantNotificationsTable :is(th, td):first-child { padding-left: var(--space-6); }
.csvrec-root .panel .merchantNotificationsTable :is(th, td):last-child { padding-right: var(--space-6); }

/* Admin: project stat captions follow the sentence-case caption style, and
   the users table starts on the card's title inset. */
.csvrec-root :is(.adminProjectCardStats, .adminProjectCardActions) .eyebrow-soft {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
@media (min-width: 768px) {
  .csvrec-root .adminMain .panel .incFullTable :is(th, td):first-child { padding-left: var(--space-6); }
  .csvrec-root .adminMain .panel .incFullTable :is(th, td):last-child { padding-right: var(--space-6); }
}
/* Audit filters sat on the card edge while the title kept the 24px inset. */
.csvrec-root .panel > .adminAuditFilters { padding: var(--space-2) var(--space-6) 0; }
.csvrec-root .panel > .adminAuditAdvancedFilters { margin-inline: var(--space-6); }
.csvrec-root .panel:not(.adminActivity) > .adminFilterActions { padding-inline: var(--space-6); }
/* Journals pad their own section, so a second inset here would stagger them. */
.csvrec-root .panel.adminActivity > :is(.panelHeader, .adminFilterActions) { padding: 0; }

/* Prediction's and Balances' cards used a compact 6px, shadowless frame; they
   take the panel's radius and depth like every other module. */
.csvrec-root .predictionFpPage .panel,
.csvrec-root .balancesFpMasterDetail .panel,
.csvrec-root .balancesFpKpi { border-radius: var(--radius-xl); box-shadow: var(--panel-shadow); }

/* Reconciliation: its cards share the panel radius, and the airy toolbar's
   field captions ("Source A") lose the old tracked 10px style. */
.csvrec-root .reconciliationTabPanel .panel { border-radius: var(--radius-xl); }
.csvrec-root .toolbar--airy .eyebrow {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0;
}

/* Ledger expense chart: the total follows the brand blue (it was the old
   violet) and the categories get distinct hues instead of six near-identical
   purples; axis figures use the interface face. */
.csvrec-root .ledgerExpenseSvg text { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.csvrec-root .ledgerExpenseLine--total { stroke: oklch(70% 0.16 var(--tm-h)); }
.csvrec-root .ledgerExpenseLegendTotal::before { border-color: oklch(70% 0.16 var(--tm-h)); }
.csvrec-root :is(.ledgerExpenseLine--0, .ledgerExpenseLegendSwatch--0) { --expense-color: oklch(76% 0.12 210); }
.csvrec-root :is(.ledgerExpenseLine--1, .ledgerExpenseLegendSwatch--1) { --expense-color: oklch(74% 0.14 165); }
.csvrec-root :is(.ledgerExpenseLine--2, .ledgerExpenseLegendSwatch--2) { --expense-color: oklch(80% 0.14 75); }
.csvrec-root :is(.ledgerExpenseLine--3, .ledgerExpenseLegendSwatch--3) { --expense-color: oklch(70% 0.16 20); }
.csvrec-root :is(.ledgerExpenseLine--4, .ledgerExpenseLegendSwatch--4) { --expense-color: oklch(70% 0.15 300); }
.csvrec-root :is(.ledgerExpenseLine--5, .ledgerExpenseLegendSwatch--5) { --expense-color: oklch(72% 0.04 250); }
.theme-light .csvrec-root .ledgerExpenseLine--total { stroke: oklch(52% 0.2 var(--tm-h)); }
.theme-light .csvrec-root .ledgerExpenseLegendTotal::before { border-color: oklch(52% 0.2 var(--tm-h)); }
.theme-light .csvrec-root :is(.ledgerExpenseLine--0, .ledgerExpenseLegendSwatch--0) { --expense-color: oklch(58% 0.12 210); }
.theme-light .csvrec-root :is(.ledgerExpenseLine--1, .ledgerExpenseLegendSwatch--1) { --expense-color: oklch(55% 0.13 165); }
.theme-light .csvrec-root :is(.ledgerExpenseLine--2, .ledgerExpenseLegendSwatch--2) { --expense-color: oklch(66% 0.15 70); }
.theme-light .csvrec-root :is(.ledgerExpenseLine--3, .ledgerExpenseLegendSwatch--3) { --expense-color: oklch(56% 0.19 20); }
.theme-light .csvrec-root :is(.ledgerExpenseLine--4, .ledgerExpenseLegendSwatch--4) { --expense-color: oklch(54% 0.18 300); }
.theme-light .csvrec-root :is(.ledgerExpenseLine--5, .ledgerExpenseLegendSwatch--5) { --expense-color: oklch(56% 0.04 250); }

/* Admin: the project chip kept its dark-theme cyan (1.4:1 on white) and now
   reads as a neutral chip in both themes; audit times use the interface face
   so a full "27.09.2026, 00:02:44" fits its column. */
.csvrec-root .adminChip,
.theme-light .csvrec-root .adminChip {
  color: var(--text-default);
  background: color-mix(in oklab, var(--text-strong) 8%, transparent);
  border-color: transparent;
}
.csvrec-root .adminMain .incFullTable td.mono.stickyCol { font-family: var(--sans); font-variant-numeric: tabular-nums; }
/* The chart's 600-unit viewBox shrinks to ~320px on phones, which took the
   axis figures down to ~6px; scale the label size back up there. */
@media (max-width: 767px) { .csvrec-root .ledgerExpenseSvg text { font-size: var(--font-size-lg); } }
@media (max-width: 480px) { .csvrec-root .ledgerExpenseSvg text { font-size: var(--font-size-2xl); } }
@media (max-width: 820px) { .csvrec-root .reconciliationTab { padding-left: var(--space-2); padding-right: var(--space-2); } }

/* Balances' "not available yet" / "select a provider" notes use the shared
   empty-state tile above; they drop their own thin box. */
.csvrec-root .balancesFpMasterDetail .balancesFpModeState { border: 0; color: var(--text-muted); }
.csvrec-root tr[tabindex="0"]:focus-visible { outline-offset: -2px; }

/* Incident charts follow the status colours used in text: open in the brand
   blue, resolved green, closed grey (they were indigo / blue / green). */
.csvrec-root {
  --chart-status-open: oklch(60% 0.19 var(--tm-h));
  --chart-status-resolved: var(--color-green-500);
  --chart-status-closed: var(--color-slate-400);
  --chart-created: oklch(60% 0.19 var(--tm-h) / 80%);
  --chart-series-primary: oklch(60% 0.19 var(--tm-h) / 70%);
}

/* Knowledge Base joins the panel's look: its section tabs use the shared
   segmented track, the category list and the article list sit in cards, and
   the selected category is a soft fill instead of an outlined pill. */
.csvrec-root .kbRoot .kbNav {
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  margin-bottom: var(--space-5);
  padding: 4px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--seg-idle-bg);
}
.theme-light .csvrec-root .kbRoot .kbNav { background: rgba(var(--rgb-white), .55); }
.csvrec-root .kbRoot .kbNav > .kbButton {
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--seg-idle-text);
  font-family: var(--tm-display);
  font-size: var(--font-size-md);
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}
.csvrec-root .kbRoot .kbNav > .kbButton:hover:not([aria-current="page"]) { background: var(--seg-idle-hover-bg); }
.csvrec-root .kbRoot .kbNav > .kbButton[aria-current="page"] {
  background: var(--seg-active-bg);
  color: var(--seg-active-text);
  box-shadow: 0 1px 2px rgba(var(--rgb-black), .10), 0 6px 16px -8px rgba(var(--rgb-black), .35);
}
.csvrec-root .kbRoot :is(.kbSidebar, .kbCatalogueContent) {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}
.csvrec-root .kbRoot .kbSidebar { align-self: start; }
.csvrec-root .kbRoot .kbSidebar .kbSectionTitle {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.csvrec-root .kbRoot .kbSidebar .kbButton[aria-pressed="true"] {
  border-color: transparent;
  background: oklch(55% 0.2 var(--tm-h) / 10%);
  color: var(--text-strong);
}
.csvrec-root .kbRoot .kbCards { border-top: 0; }
.csvrec-root .kbRoot .kbCard:last-child { border-bottom: 0; }
/* An open article reads as one card: display-face title, soft Contents and
   Article review boxes instead of thin outlines. */
.csvrec-root .kbRoot .kbMain:has(> .kbTitle) {
  padding: var(--space-5) var(--space-6) var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}
.csvrec-root .kbRoot .kbMain > .kbTitle {
  font-family: var(--tm-display);
  font-size: var(--font-size-5xl);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.csvrec-root .kbRoot :is(.kbContents, .kbMaintenance) {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--panel-soft-bg);
}
.csvrec-root .kbRoot :is(.kbContents, .kbMaintenance) > h2 { font-size: var(--font-size-lg); font-weight: 600; }
.csvrec-root .kbRoot .kbSectionLink { color: var(--text-muted); }

/* Tasks: the header reads like every other module's page title (no framed
   strip), the task rows are cards with the title as the main line and the
   board as a small caption (the caption was larger than the title). */
.csvrec-root .tasksHeader,
.theme-light .csvrec-root .tasksHeader { padding: var(--space-2) 0 var(--space-4); border: 0; background: transparent; }
.csvrec-root #tasksRoot > h1,
.theme-light .csvrec-root #tasksRoot > h1 { padding: var(--space-2) 0 var(--space-4); border: 0; background: transparent; }
.csvrec-root :is(.tasksHeader > h1, #tasksRoot > h1) {
  font-family: var(--tm-display);
  font-size: var(--font-size-6xl);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--text-strong);
}
@media (max-width: 767px) {
  .csvrec-root :is(.tasksHeader > h1, #tasksRoot > h1) { font-size: var(--font-size-4xl); }
}
.csvrec-root :is(.tasksGroup, .tasksList) li {
  padding: var(--space-3) var(--space-4);
  border-color: transparent;
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--panel-shadow);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}
.csvrec-root :is(.tasksGroup, .tasksList) li > button {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-strong);
  box-shadow: none;
}
.csvrec-root :is(.tasksGroup, .tasksList) li > button:hover { background: transparent; color: var(--accent); text-decoration: underline; }
.csvrec-root .tasksGroup li > .tasksTaskBoard { font-size: var(--font-size-sm); color: var(--text-muted); }
/* Tasks moves focus to its title on every view change for screen readers;
   the focus stays, the ring it drew around the page title on each load goes. */
.csvrec-root #tasksRoot > h1:focus,
.csvrec-root #tasksRoot > .tasksHeader > h1:focus { outline: none; }
.csvrec-root .tasksKanbanColumn,
.theme-light .csvrec-root .tasksKanbanColumn {
  padding: var(--space-3);
  border: 0;
  border-radius: var(--radius-xl);
  background: color-mix(in oklab, var(--panel) 55%, transparent);
}
.csvrec-root .tasksKanbanColumn > h2 { color: var(--text-muted); font-size: var(--font-size-sm); font-weight: 600; }
.csvrec-root .tasksList li > button { flex: 1 1 auto; text-align: left; }
.csvrec-root .tasksList li > span { font-size: var(--font-size-sm); }
/* Task detail is a flat form in the page; its fields keep a readable form
   width instead of stretching across a wide screen. */
.csvrec-root #tasksRoot > :is(.tasksDetailField, .tasksScheduleAdvanced, .tasksScheduleHint, .tasksDuplicate) { max-width: 760px; }

/* ── One action-menu style ────────────────────────────────────────────────
   Dropdown menus of commands (project switcher, Lots "More", Tasks
   Views/More/Admin/Board and card menus, Commercial file menus) share one
   look: a white popover with a soft shadow, plain rows that tint on hover,
   the current row in the brand tint. Tasks drew every row as a grey button
   and highlighted with the black chip; value pickers stay native selects. */
.csvrec-root :is(.projectSwitchMenu, .lotsFinanceMoreMenu, .tasksMenuItems, .commercialFileMenu, .commercialListCurrencyMenu),
.theme-light .csvrec-root :is(.projectSwitchMenu, .lotsFinanceMoreMenu, .tasksMenuItems, .commercialFileMenu, .commercialListCurrencyMenu) {
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 2px 6px rgba(var(--rgb-black), .06), 0 16px 36px -12px rgba(var(--rgb-black), .28);
}
.csvrec-root :is(.projectSwitchMenu .projectSwitchOption, .lotsFinanceMoreMenu > button, .tasksMenuItems button, .commercialFileMenu button),
.theme-light .csvrec-root :is(.projectSwitchMenu .projectSwitchOption, .lotsFinanceMoreMenu > button, .tasksMenuItems button, .commercialFileMenu button) {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  box-shadow: none;
  color: var(--text-strong);
  font-size: var(--font-size-base);
  font-weight: 500;
  text-align: left;
}
.csvrec-root :is(.projectSwitchMenu .projectSwitchOption, .lotsFinanceMoreMenu > button, .tasksMenuItems button, .commercialFileMenu button):hover,
.theme-light .csvrec-root :is(.projectSwitchMenu .projectSwitchOption, .lotsFinanceMoreMenu > button, .tasksMenuItems button, .commercialFileMenu button):hover {
  background: color-mix(in oklab, var(--text-strong) 6%, transparent);
  color: var(--text-strong);
}
.csvrec-root :is(.projectSwitchMenu .projectSwitchOption, .tasksMenuItems button):is(.active, [aria-current], [aria-pressed="true"]),
.theme-light .csvrec-root :is(.projectSwitchMenu .projectSwitchOption, .tasksMenuItems button):is(.active, [aria-current], [aria-pressed="true"]) {
  background: oklch(55% 0.2 var(--tm-h) / 10%);
  color: var(--text-strong);
}

/* ── Task detail as a card ───────────────────────────────────────────────
   The detail renders flat inside #tasksRoot; it now reads as one white card
   (colours here, the two-column grid in design-system.css) with the status
   as a brand badge, a text back link and a soft Duplicate box. */
.csvrec-root #tasksRoot:has(> .tasksDetailSave) {
  width: 100%;
  max-width: 960px;
  margin-inline: 0;
  padding: var(--space-5) var(--space-6) var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}
.csvrec-root #tasksRoot:has(> .tasksDetailSave) > .tasksDetailField { max-width: none; }
.csvrec-root #tasksRoot:has(> .tasksDetailSave) > p:not([class]) {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: oklch(55% 0.2 var(--tm-h) / 10%);
  color: oklch(42% 0.19 var(--tm-h));
  font-size: var(--font-size-sm);
  font-weight: 600;
}
html:not(.theme-light) .csvrec-root #tasksRoot:has(> .tasksDetailSave) > p:not([class]) { color: oklch(82% 0.1 var(--tm-h)); }
.csvrec-root #tasksRoot:has(> .tasksDetailSave) > button:first-child {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 600;
}
.csvrec-root #tasksRoot:has(> .tasksDetailSave) > button:first-child:hover { color: var(--text-strong); }
.csvrec-root #tasksRoot > .tasksDuplicate {
  max-width: none;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--panel-soft-bg);
}
.csvrec-root #tasksRoot > .tasksDuplicate > h2 { font-size: var(--font-size-lg); font-weight: 600; }
.csvrec-root .tasksDetailSections {
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--seg-idle-bg);
}
.theme-light .csvrec-root .tasksDetailSections { background: color-mix(in oklab, var(--text-strong) 5%, transparent); }
.csvrec-root .tasksDetailSections > button {
  padding: 7px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  box-shadow: none;
  color: var(--seg-idle-text);
  font-size: var(--font-size-md);
  font-weight: 600;
}
.csvrec-root .tasksDetailSections > button:hover { background: var(--seg-idle-hover-bg); }
.csvrec-root #tasksRoot > .tasksDetailSection {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--panel-soft-bg);
}

/* Tasks renders option checkboxes as bare <label><input> text</label>; the
   box sat flush against its words ("Include archived tasks", "Unread only"). */
.csvrec-root #tasksRoot label:not([class]) > input:is([type="checkbox"], [type="radio"]):first-child { margin: 0 8px 0 0; vertical-align: -2px; }
/* The toolbar's own page (Search) reads as the current item, not a dimmed one. */
.csvrec-root .tasksToolbar > button.active:disabled { border-color: transparent; background: oklch(55% 0.2 var(--tm-h) / 12%); color: var(--text-strong); }

/* ── Multi-value pickers ─────────────────────────────────────────────────
   Commercial's checkbox pickers (list currency filter, Currencies and
   Verticals-style form fields) open from a field that carries the same
   drawn arrow as a native select, not a "▾" glyph that read as a dot. The
   list filter floats as an ordinary menu; the form pickers expand in place
   so a modal's scroll never clips them, with the same rows: the app's
   checkbox, an 8px gap, a soft hover tint. */
.csvrec-root :is(.commercialListCurrencyFilter, .commercialCurrencyDropdown, .commercialFixedDropdown) > summary.input {
  padding-right: 28px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--input-placeholder) 50%),
    linear-gradient(135deg, var(--input-placeholder) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 1px), calc(100% - 11px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.csvrec-root :is(.commercialListCurrencyMenu, .commercialFixedOptions, .commercialCurrencyOptions) label {
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  cursor: pointer;
}
.csvrec-root :is(.commercialListCurrencyMenu, .commercialFixedOptions, .commercialCurrencyOptions) label:hover { background: color-mix(in oklab, var(--text-strong) 6%, transparent); }
.csvrec-root :is(.commercialListCurrencyMenu, .commercialFixedOptions, .commercialCurrencyOptions) input[type="checkbox"] { flex: 0 0 auto; margin: 0; }
/* The list filter forced the browser's own 14px box; it takes the app's. */
.csvrec-root .commercialListCurrencyMenu input[type="checkbox"] { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; flex-basis: 18px; border-radius: var(--radius-xs); }
.csvrec-root .commercialListCurrencyMenu { min-width: max(100%, 140px); max-height: 280px; }
.csvrec-root :is(.commercialFixedOptions, .commercialCurrencyDropdownBody) {
  gap: 2px;
  padding: 6px;
  border-color: var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.csvrec-root .commercialCurrencyDropdownBody { gap: 6px; }
.csvrec-root .commercialCurrencyOptions { gap: 2px; padding: 0; border: 0; }

/* HR employee card: the "Employment & access" box (new in main) titles and
   sets its text like the card's other boxes (Employment, Vacation): the
   title in the panel title face, the state line at body size and the
   explanations under it muted, instead of 16px bold UI text throughout. */
.csvrec-root .hrLifecycle > b {
  font-family: var(--tm-display);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-strong);
}
.csvrec-root .hrLifecycle p { font-size: var(--font-size-md); color: var(--text-strong); }
.csvrec-root .hrLifecycle p ~ p { color: var(--text-muted); }

/* Sections start below their module bars, but Admin's header sits at the top of its main. */
body.archive-fullscreen.shell-collapsed.csvrec-root #adminAppShell > main.adminMain { padding-top: calc(var(--shell-toggle-inset) + var(--shell-toggle-size) + var(--space-1)); }
