/* RelevoHR design system. A neutral canvas, ONE accent (--brand: links, counts, the primary button, the active tab, the
   selected-row bar, focus), semantic color only in small glyphs and pills, weight for hierarchy, tabular numerals.
   Token names stay the same everywhere (HR screens use them); dark mode redefines them below.
   Bands: --surface-3 is the table header band (every table.t and table.grid header) and the group band; --surface-2 a quiet fill.
   Hairlines: --line panel borders, --line-2 control borders and the header's bottom rule, --hair grid rows. --hover is a row hover.
   --side-count-1-* and --side-count-2-* are the sidebar counts' two looks, taking turns row by row (a light tint of the brand, then
   gray; owner, November 2026). The sidebar has no red: an overdue count says so in its tooltip.
   RelevoHR's own look (indigo, lilac on the sidebar) is the default below; a company's branding (Settings, Branding) overrides these
   same tokens from /branding/theme.css (app/branding.py), which loads after this file. */
:root {
  color-scheme: light;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --bg: #eff3f8; --surface: #ffffff; --surface-2: #f7f8fa; --surface-3: #f0f2f6; --hover: #f6f8fb;
  --ink: #111827; --ink-2: #374151; --muted: #6b7280; --faint: #9ca3af;
  --line: #dde2ea; --line-2: #c9d1dc; --hair: #e3e7ed;
  --brand: #1d4f91; --brand-2: #173f73; --brand-soft: #edf1f6; --brand-ink: #ffffff; --brand-solid: #1d4f91;
  --accent: var(--brand); --accent-soft: var(--brand-soft);
  --ai: #7c3aed; --ai-soft: #f5f1fe; --ai-line: #e2d8fb;
  --good: #15803d; --good-soft: #eaf6ee; --good-ink: #ffffff; --warn: #b45309; --warn-soft: #fdf3e4; --bad: #b91c1c; --bad-soft: #fdeeee;
  --info: #334e7c; --info-soft: #eaeff7; --gold: #b7791f;
  --pulled: #1f5fd6; --pulled-soft: #eaf1fd;   /* a field filled in from an uploaded paper (.ai-pulled): never the brand color */
  --side-bg: #0e1a33; --side-bg-2: #0e1a33; --side-ink: #b7bac2; --side-ink-strong: #ffffff; --side-active: rgba(255,255,255,.10); --side-accent: #f2b544; --side-accent-soft: rgba(242,181,68,0.18);
  --side-count-1-bg: #193d72; --side-count-1-ink: #ffffff; --side-count-2-bg: #353f54; --side-count-2-ink: #ffffff;
  --side-tile-bg: #212c43; --side-tile-ink: #b7bac2;   /* the icon tiles (Settings, Branding: Sidebar highlight, Icon tiles) */
  --radius: 8px; --radius-sm: 6px;
  --shadow-1: none;   /* panels and cards: no shadow */
  --shadow-2: 0 4px 12px rgba(16,24,40,.08), 0 1px 3px rgba(16,24,40,.06);   /* menus, popovers */
  --shadow-3: 0 20px 48px rgba(16,24,40,.22);   /* drawers and modals */
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
  /* floating and inset levels (dark mode gives them their own steps: shadows don't show on dark) */
  --raised: var(--surface); --field: var(--surface); --menu-hover: var(--surface-3); --seg-on: var(--surface); --overlay: rgba(15,23,42,.38);
  /* chart tokens (validated palette, light) */
  --chart-surface: #ffffff; --grid: #e6e9ef; --axis: #c8ccd4;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s-other: #9aa3b2;
  --o1: #86b6ef; --o2: #5598e7; --o3: #2a78d6; --o4: #1c5cab;
  /* Decorative hues: a little color that never carries meaning. Section icons in the sidebar, the icon chip on each page header,
     stat-tile icon chips, avatars, empty-state pictures and Training course covers. Never text that means something, never a
     status, never a button: the brand color stays the one accent, red overdue, amber look at, green done.
     Steps per hue: --hue-X (icons, 3:1 or better on the surface and on its own soft tint), -soft (chip and avatar backgrounds),
     -ink (initials on -soft, 4.5:1 or better), -deep and -deep2 (a course cover's gradient; white title text 4.5:1 or better on
     both), -side (icons on the sidebar, which is dark in both themes: 3.5:1 or better on the RelevoHR indigo; a company's
     branding recomputes them for its own sidebar, app/branding.py). The dark values are in both dark blocks below. */
  --hue-rose: #983068; --hue-rose-soft: #f3e6ed; --hue-rose-ink: #883760; --hue-rose-deep: #912962; --hue-rose-deep2: #af457c;
  --hue-orange: #aa5303; --hue-orange-soft: #f5eae1; --hue-orange-ink: #884201; --hue-orange-deep: #884201; --hue-orange-deep2: #ae5604;
  --hue-azure: #247dcf; --hue-azure-soft: #e5eff9; --hue-azure-ink: #165a98; --hue-azure-deep: #03599e; --hue-azure-deep2: #1674c5;
  --hue-teal: #078e7d; --hue-teal-soft: #e1f1ef; --hue-teal-ink: #05675a; --hue-teal-deep: #05675a; --hue-teal-deep2: #098474;
  --hue-indigo: #4559b7; --hue-indigo-soft: #e9ebf6; --hue-indigo-ink: #40519a; --hue-indigo-deep: #3b4daa; --hue-indigo-deep2: #5268c8;
  --hue-gold: #7c5e01; --hue-gold-soft: #efece1; --hue-gold-ink: #6f5400; --hue-gold-deep: #6f5400; --hue-gold-deep2: #8e6c02;
  --hue-violet: #8959ba; --hue-violet-soft: #f1ebf7; --hue-violet-ink: #68448d; --hue-violet-deep: #6c3c9a; --hue-violet-deep2: #8656b7;
  --hue-green: #298a41; --hue-green-soft: #e5f1e8; --hue-green-ink: #18692e; --hue-green-deep: #036b28; --hue-green-deep2: #25873e;
  --hue-rose-side: #b64d83; --hue-orange-side: #ca6816; --hue-azure-side: #3389dc; --hue-teal-side: #0da995;
  --hue-indigo-side: #667ee0; --hue-gold-side: #987502; --hue-violet-side: #a272d4; --hue-green-side: #3f9c53;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0f1216; --surface: #171b21; --surface-2: #1b2027; --surface-3: #21272f; --hover: #1d232b;
    --raised: #1d2229; --field: #12161b; --menu-hover: #2a3039; --seg-on: #2b313a; --overlay: rgba(0,0,0,.6);
    --ink: #e6e9ee; --ink-2: #c6cdd6; --muted: #9ba5b3; --faint: #858f9d;
    --line: #2b323c; --line-2: #3b4451; --hair: #242a33;
    --brand: #6a9bdc; --brand-2: #8bb1e4; --brand-soft: #18263a; --brand-ink: #0f1216; --brand-solid: #1d4f91;
    --ai: #a78bfa; --ai-soft: #2b2b3f; --ai-line: #453f66;
    --good: #4ac16d; --good-soft: #1e322c; --good-ink: #0f1216; --warn: #e3a33a; --warn-soft: #342e25; --bad: #ff7070; --bad-soft: #37272c;
    --info: #a9bde0; --info-soft: #2b323c; --gold: #e2b04a;
    --pulled: #8db4f2; --pulled-soft: #1c2b45;
    --side-bg: #0d1526; --side-bg-2: #0d1526; --side-ink: #b6b9be; --side-ink-strong: #ffffff; --side-active: rgba(255,255,255,.10); --side-accent: #f2b544; --side-accent-soft: rgba(242,181,68,0.18);
    --side-count-1-bg: #183967; --side-count-1-ink: #ffffff; --side-count-2-bg: #343a49; --side-count-2-ink: #ffffff; --side-tile-bg: #202837; --side-tile-ink: #b6b9be;
    --shadow-2: 0 8px 24px rgba(0,0,0,.45); --shadow-3: 0 24px 64px rgba(0,0,0,.6);
    --chart-surface: #171b21; --grid: #262c35; --axis: #3b4451;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s-other: #6b7686;
    --o1: #3987e5; --o2: #2a78d6; --o3: #1c5cab; --o4: #184f95;
    --hue-rose: #b64d83; --hue-rose-soft: #342433; --hue-rose-ink: #f4c0d6; --hue-rose-deep: #770a4c; --hue-rose-deep2: #983068;
    --hue-orange: #ca6816; --hue-orange-soft: #37291f; --hue-orange-ink: #f4c6aa; --hue-orange-deep: #683101; --hue-orange-deep2: #904604;
    --hue-azure: #3389dc; --hue-azure-soft: #1c2f43; --hue-azure-ink: #b2d5fb; --hue-azure-deep: #01437a; --hue-azure-deep2: #035fa8;
    --hue-teal: #0da995; --hue-teal-soft: #153536; --hue-teal-ink: #a2e0d2; --hue-teal-deep: #024e44; --hue-teal-deep2: #046d5f;
    --hue-indigo: #667ee0; --hue-indigo-soft: #252d43; --hue-indigo-ink: #c1cffd; --hue-indigo-deep: #283590; --hue-indigo-deep2: #4053b1;
    --hue-gold: #987502; --hue-gold-soft: #2e2b1b; --hue-gold-ink: #e3cfa1; --hue-gold-deep: #543f03; --hue-gold-deep2: #755900;
    --hue-violet: #a272d4; --hue-violet-soft: #302b41; --hue-violet-ink: #dbc7f4; --hue-violet-deep: #562380; --hue-violet-deep2: #7241a0;
    --hue-green: #3f9c53; --hue-green-soft: #1e322a; --hue-green-ink: #b5ddb9; --hue-green-deep: #00511c; --hue-green-deep2: #02712b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1216; --surface: #171b21; --surface-2: #1b2027; --surface-3: #21272f; --hover: #1d232b;
  --raised: #1d2229; --field: #12161b; --menu-hover: #2a3039; --seg-on: #2b313a; --overlay: rgba(0,0,0,.6);
  --ink: #e6e9ee; --ink-2: #c6cdd6; --muted: #9ba5b3; --faint: #858f9d;
  --line: #2b323c; --line-2: #3b4451; --hair: #242a33;
  --brand: #6a9bdc; --brand-2: #8bb1e4; --brand-soft: #18263a; --brand-ink: #0f1216; --brand-solid: #1d4f91;
  --ai: #a78bfa; --ai-soft: #2b2b3f; --ai-line: #453f66;
  --good: #4ac16d; --good-soft: #1e322c; --good-ink: #0f1216; --warn: #e3a33a; --warn-soft: #342e25; --bad: #ff7070; --bad-soft: #37272c;
  --info: #a9bde0; --info-soft: #2b323c; --gold: #e2b04a;
  --pulled: #8db4f2; --pulled-soft: #1c2b45;
  --side-bg: #0d1526; --side-bg-2: #0d1526; --side-ink: #b6b9be; --side-ink-strong: #ffffff; --side-active: rgba(255,255,255,.10); --side-accent: #f2b544; --side-accent-soft: rgba(242,181,68,0.18);
  --side-count-1-bg: #183967; --side-count-1-ink: #ffffff; --side-count-2-bg: #343a49; --side-count-2-ink: #ffffff; --side-tile-bg: #202837; --side-tile-ink: #b6b9be;
  --shadow-2: 0 8px 24px rgba(0,0,0,.45); --shadow-3: 0 24px 64px rgba(0,0,0,.6);
  --chart-surface: #171b21; --grid: #262c35; --axis: #3b4451;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s-other: #6b7686;
  --o1: #3987e5; --o2: #2a78d6; --o3: #1c5cab; --o4: #184f95;
  --hue-rose: #b64d83; --hue-rose-soft: #342433; --hue-rose-ink: #f4c0d6; --hue-rose-deep: #770a4c; --hue-rose-deep2: #983068;
  --hue-orange: #ca6816; --hue-orange-soft: #37291f; --hue-orange-ink: #f4c6aa; --hue-orange-deep: #683101; --hue-orange-deep2: #904604;
  --hue-azure: #3389dc; --hue-azure-soft: #1c2f43; --hue-azure-ink: #b2d5fb; --hue-azure-deep: #01437a; --hue-azure-deep2: #035fa8;
  --hue-teal: #0da995; --hue-teal-soft: #153536; --hue-teal-ink: #a2e0d2; --hue-teal-deep: #024e44; --hue-teal-deep2: #046d5f;
  --hue-indigo: #667ee0; --hue-indigo-soft: #252d43; --hue-indigo-ink: #c1cffd; --hue-indigo-deep: #283590; --hue-indigo-deep2: #4053b1;
  --hue-gold: #987502; --hue-gold-soft: #2e2b1b; --hue-gold-ink: #e3cfa1; --hue-gold-deep: #543f03; --hue-gold-deep2: #755900;
  --hue-violet: #a272d4; --hue-violet-soft: #302b41; --hue-violet-ink: #dbc7f4; --hue-violet-deep: #562380; --hue-violet-deep2: #7241a0;
  --hue-green: #3f9c53; --hue-green-soft: #1e322a; --hue-green-ink: #b5ddb9; --hue-green-deep: #00511c; --hue-green-deep2: #02712b;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font: 600 20px/1.3 var(--font-display); margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
h3 { font-size: 13px; font-weight: 600; margin: 0; color: var(--ink-2); text-transform: none; letter-spacing: 0; }   /* section headings in guides, tools and panels */
b, strong { font-weight: 600; }
p { margin: 0 0 8px; }
.num, time, kbd, .tel, a[href^="tel:"] { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.nowrap { white-space: nowrap; } .grow { flex: 1; min-width: 0; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.nw { flex-wrap: nowrap; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- shell: flat sidebar (the customer's logo on a white plate), 48px white top bar ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; padding: 12px 10px; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; color: var(--side-ink-strong); text-decoration: none; min-width: 0; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 6px; background: var(--brand); display: grid; place-items: center; flex: none;
  font-weight: 700; font-size: 15px; color: var(--brand-ink); }
.side .logo-mark { background: var(--brand-solid); color: #fff; }
.logo-name { font-weight: 600; font-size: 15px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-sub { font-size: 11px; color: var(--side-ink); font-weight: 400; }
.logo-plate { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; padding: 6px 10px; background: #fff; border-radius: 6px; }
.logo-plate img { display: block; max-width: 100%; max-height: 40px; object-fit: contain; }
.logo.has-plate { padding: 2px 0 14px; }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
  margin: 0 -6px 0 -10px; padding: 0 6px 0 10px; }
.nav-sep { height: 1px; background: rgba(255,255,255,.07); margin: 10px 8px; }
.nav-label { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--side-ink) 80%, var(--side-bg)); }
.nav-group { display: flex; align-items: center; gap: 6px; width: calc(100% - 20px); background: none; border: 0; border-top: 1px solid rgba(255,255,255,.07);
  padding: 12px 0 2px; margin: 8px 10px 4px; cursor: pointer; font-family: inherit; text-align: left; }
.nav-group:first-of-type { border-top: 0; margin-top: 6px; }
.nav-group > span:first-child { flex: 1; }
.nav-group:hover { color: rgba(255,255,255,.72); }
.nav-group svg { width: 13px; height: 13px; transition: transform .15s; }
.nav-group[aria-expanded="false"] svg { transform: rotate(-90deg); }
.nav-group:focus-visible { outline: 2px solid var(--side-accent); outline-offset: 2px; border-radius: 4px; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--side-accent); }   /* a folded group: something new or overdue inside */
.nav a[hidden] { display: none; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 4px; color: var(--side-ink); font-size: 13.5px; font-weight: 500;
  text-decoration: none; position: relative; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--side-accent); }
.nav a:focus-visible { outline: 2px solid var(--side-accent); outline-offset: -2px; }
/* Inline icons default to the text size; component rules below override. */
svg.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .85; }
/* Sidebar icons are one calm color (owner, November 2026: the rainbow of section hues fought the indigo sidebar): the sidebar ink,
   like the labels; the page you're on lights its icon in the sidebar accent (indigo on the house look's white sidebar).
   The section hues stay on the pages themselves (.view[data-section] below). */
.nav a.active svg { opacity: 1; color: var(--side-accent); }
.nav a svg { color: inherit; }
/* The counts take turns row by row, whatever they mean (owner, November 2026: "light purple and gray offsetting counts, one line
   purple then next gray"): every other page link has the light brand tint, the ones between gray. Every link is a direct child of
   #nav (main.js navHtml), so a:nth-of-type counts the rows; a folded group's links stay in place, so the colors never shift. The
   .accent and .hot classes still say what a count is (the folded group's dot, the tooltip) but no longer color it: no red. */
.nav .count { margin-left: auto; font-size: 11px; font-weight: 600; background: var(--side-count-1-bg); color: var(--side-count-1-ink); border-radius: 999px;
  padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }
.nav a:nth-of-type(odd) .count { background: var(--side-count-2-bg); color: var(--side-count-2-ink); }
.side-foot { margin-top: auto; padding: 10px; font-size: 11px; color: var(--side-ink); opacity: .78; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; background: var(--surface);
  border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; height: 32px; padding: 0 64px 0 34px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; font-size: 13.5px; color: var(--ink); }
.search input:hover { border-color: var(--line-2); }
.search input:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: var(--focus); }
.search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
kbd { font: 11px var(--font); background: var(--surface-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--muted); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 6px; max-height: 70vh; overflow: auto; }
.search-results .grp { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px 4px; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--menu-hover); }
.search-results .jo { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; margin-right: 4px; }
.top-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
#quickAdd svg { color: var(--brand); }
.icon-btn { position: relative; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--faint); color: var(--ink); background: var(--hover); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.ghost { width: 28px; height: 28px; border-color: transparent; background: transparent; color: var(--muted); }
.icon-btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.ghost svg { width: 16px; height: 16px; }
.topbar .icon-btn { border-color: transparent; }
.topbar .icon-btn:hover { border-color: var(--line); }
.icon-btn .dot, .icon-btn .bell-n { position: absolute; top: -3px; right: -3px; width: auto; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--brand-solid); color: #fff;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); font-variant-numeric: tabular-nums; }
.page { padding: 20px 24px 48px; max-width: 1560px; width: 100%; margin: 0 auto; }
.page:has(> .view > .with-rail), .page:has(> .view > .full-width) { max-width: none; }   /* grids with a facet rail use the whole width */
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 2px; font-size: 13px; }
.page-head > .grow { flex: 1 1 260px; }   /* the title keeps at least 260px; on phones the buttons wrap below it */

/* A page's section picks its hue (main.js sets data-section on the page's .view: home, ats, staffing, hr, team, consultant). */
.view { --sec: var(--ink-2); --sec-soft: var(--surface-3); --sec-ink: var(--ink-2); }   /* Settings and pages outside a section */
body { --sec: var(--ink-2); --sec-soft: var(--surface-3); --sec-ink: var(--ink-2); }   /* dialogs and drawers (outside any .view): the same neutral chip */
.view[data-section="home"] { --sec: var(--hue-indigo); --sec-soft: var(--hue-indigo-soft); --sec-ink: var(--hue-indigo-ink); }
.view[data-section="ats"] { --sec: var(--hue-azure); --sec-soft: var(--hue-azure-soft); --sec-ink: var(--hue-azure-ink); }
.view[data-section="staffing"] { --sec: var(--hue-violet); --sec-soft: var(--hue-violet-soft); --sec-ink: var(--hue-violet-ink); }
.view[data-section="hr"] { --sec: var(--hue-rose); --sec-soft: var(--hue-rose-soft); --sec-ink: var(--hue-rose-ink); }
.view[data-section="team"] { --sec: var(--hue-indigo); --sec-soft: var(--hue-indigo-soft); --sec-ink: var(--hue-indigo-ink); }
.view[data-section="consultant"] { --sec: var(--hue-violet); --sec-soft: var(--hue-violet-soft); --sec-ink: var(--hue-violet-ink); }

/* The page header's icon chip: <span class="page-ico" aria-hidden="true">${icon(name)}</span> as the first child of .page-head
   (ui.js pageIco(name)). */
.page-head > .page-ico { flex: none; align-self: center; width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center;
  background: var(--sec-soft); color: var(--sec); }
.page-head > .page-ico svg { width: 22px; height: 22px; }
.page-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }   /* a page head's buttons, kept together when they wrap */

/* Stat tiles: the label's icon becomes a small tinted chip; a tile can be a link or a button. */
.kpi .label > svg:first-child, .mini-kpis .mk .l > svg:first-child, .tile-ico { box-sizing: content-box; width: 14px; height: 14px; padding: 5px; flex: none;
  border-radius: var(--radius-sm); background: var(--sec-soft); color: var(--sec); }
a.card.kpi, button.card.kpi { display: block; width: 100%; color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
a.card.kpi:hover, button.card.kpi:hover { border-color: var(--line-2); background: var(--hover); text-decoration: none; }
a.card.kpi[aria-current="true"], button.card.kpi[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.kpi .value.bad { color: var(--bad); } .kpi .value.warn { color: var(--warn); }   /* overdue, or something to look at; words in the label say which */
.kpi .value.good { color: var(--good); }   /* done; the label says so in words (one shared rule: page sheets don't repeat it) */

/* Empty states: the icon sits in a round chip of the section tint (ui.js emptyState() markup is unchanged). */
.empty > svg:first-child { box-sizing: content-box; width: 26px; height: 26px; padding: 15px; border-radius: 50%; background: var(--sec-soft); color: var(--sec); }

/* Avatars: initials on a soft tint picked by name (ui.js avatar() sets data-hue); your own stays solid blue. */
.avatar[data-hue="violet"] { background: var(--hue-violet-soft); color: var(--hue-violet-ink); box-shadow: none; }
.avatar[data-hue="indigo"] { background: var(--hue-indigo-soft); color: var(--hue-indigo-ink); box-shadow: none; }
.avatar[data-hue="rose"] { background: var(--hue-rose-soft); color: var(--hue-rose-ink); box-shadow: none; }
.avatar[data-hue="azure"] { background: var(--hue-azure-soft); color: var(--hue-azure-ink); box-shadow: none; }

/* ---- The Recruiting look (r7): opt-in pieces the ATS screens use (Home, Job ads, the job file and its Board, Applicants,
   Candidates, the person's page, Placements). Nothing here restyles a plain .card, table or button, so the HR pages are unchanged.
   Decoration only: every color is a --hue- token (never blue/red/amber/green, which mean info/bad/warn/good), so dark mode and a
   company's branding follow on their own.
   - data-hue="<hue>" on any element sets --hu, --hu-soft, --hu-ink for the pieces inside it (avatars already carry it).
   - Step hues: each pipeline step's own hue (small dots, count chips): [data-step="<step key>"], a Board lane, a strip tile.
   - .kpi[data-hue], .mk[data-hue]: a stat tile's icon chip and a 3px top line in its hue.
   - .lift: a soft shadow that rises a little under the mouse (clickable cards). .src-badge: where an applicant came from.
   - --radius-lg for the larger cards; --lift / --lift-hover the soft shadows (dark values below). */
:root { --radius-lg: 12px; --lift: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06); --lift-hover: 0 8px 20px rgba(16,24,40,.10), 0 2px 6px rgba(16,24,40,.06); }
:root[data-theme="dark"] { --lift: 0 1px 2px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.02); --lift-hover: 0 10px 26px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --lift: 0 1px 2px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.02); --lift-hover: 0 10px 26px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4); } }
[data-hue="rose"] { --hu: var(--hue-rose); --hu-soft: var(--hue-rose-soft); --hu-ink: var(--hue-rose-ink); }
[data-hue="orange"] { --hu: var(--hue-orange); --hu-soft: var(--hue-orange-soft); --hu-ink: var(--hue-orange-ink); }
[data-hue="azure"] { --hu: var(--hue-azure); --hu-soft: var(--hue-azure-soft); --hu-ink: var(--hue-azure-ink); }
[data-hue="teal"] { --hu: var(--hue-teal); --hu-soft: var(--hue-teal-soft); --hu-ink: var(--hue-teal-ink); }
[data-hue="indigo"] { --hu: var(--hue-indigo); --hu-soft: var(--hue-indigo-soft); --hu-ink: var(--hue-indigo-ink); }
[data-hue="gold"] { --hu: var(--hue-gold); --hu-soft: var(--hue-gold-soft); --hu-ink: var(--hue-gold-ink); }
[data-hue="violet"] { --hu: var(--hue-violet); --hu-soft: var(--hue-violet-soft); --hu-ink: var(--hue-violet-ink); }
[data-hue="green"] { --hu: var(--hue-green); --hu-soft: var(--hue-green-soft); --hu-ink: var(--hue-green-ink); }
/* Step hues: a job ad's New azure, Pre-screen indigo, 1st interview rose, Hired violet; a job order's 2nd interview azure, Hired
   rose, Working violet. The retired steps keep a hue for old rows (Qualified violet, Contacted indigo, Offer indigo). No gold or teal
   (owner, November 2026: they read as brown and green next to the indigo look). Closed steps
   (Sent, Not selected, Withdrawn, Ended) stay neutral. */
:is([data-step="new"], .lane[data-stage="new"], .strip .tile[data-tile="new"], [data-step="submitted"], .lane[data-stage="submitted"], .strip .tile[data-tile="submitted"]) {
  --hu: var(--hue-azure); --hu-soft: var(--hue-azure-soft); --hu-ink: var(--hue-azure-ink); }
:is([data-step="screened"], .lane[data-stage="screened"], .strip .tile[data-tile="screened"], [data-step="placed"], .lane[data-stage="placed"], .strip .tile[data-tile="placed"]) {
  --hu: var(--hue-violet); --hu-soft: var(--hue-violet-soft); --hu-ink: var(--hue-violet-ink); }
:is([data-step="phone_screen"], [data-step="contacted"], .lane[data-stage="phone_screen"], .strip .tile[data-tile="phone_screen"], [data-step="offer"], .lane[data-stage="offer"], .strip .tile[data-tile="offer"]) {
  --hu: var(--hue-indigo); --hu-soft: var(--hue-indigo-soft); --hu-ink: var(--hue-indigo-ink); }
:is([data-step="interview"], .lane[data-stage="interview"], .strip .tile[data-tile="interview"], [data-step="onboarding"], .lane[data-stage="onboarding"], .strip .tile[data-tile="onboarding"]) {
  --hu: var(--hue-rose); --hu-soft: var(--hue-rose-soft); --hu-ink: var(--hue-rose-ink); }
:is([data-step="hired"], .lane[data-stage="hired"], .strip .tile[data-tile="hired"]) { --hu: var(--hue-violet); --hu-soft: var(--hue-violet-soft); --hu-ink: var(--hue-violet-ink); }
.hue-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--hu, var(--line-2)); vertical-align: middle; }
.hue-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font: 600 11.5px/16px var(--font); font-variant-numeric: tabular-nums;
  background: var(--hu-soft, var(--surface-3)); color: var(--hu-ink, var(--ink-2)); white-space: nowrap; }
.card.kpi[data-hue], .mini-kpis .mk[data-hue] { --sec: var(--hu); --sec-soft: var(--hu-soft); --sec-ink: var(--hu-ink); position: relative; overflow: hidden; box-shadow: var(--lift); }
.card.kpi[data-hue]::before, .mini-kpis .mk[data-hue]::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--hu); }
.lift { box-shadow: var(--lift); transition: transform .16s ease, box-shadow .16s ease, border-color .12s; }
.lift:hover { transform: translateY(-2px); box-shadow: var(--lift-hover); }
@media (prefers-reduced-motion: reduce) { .lift, .lift:hover { transition: none; transform: none; } }
/* Where they came from: a small rounded badge, tinted by the source (src-badge data-src from grid.js srcBadge). Unknown sources stay neutral. */
.src-badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; padding: 1px 8px 1px 6px; border-radius: 999px; font: 600 11.5px/16px var(--font);
  background: var(--hu-soft, var(--surface-3)); color: var(--hu-ink, var(--ink-2)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.src-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--hu, var(--faint)); }
.src-badge > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.src-badge[data-src="indeed"] { --hu: var(--hue-indigo); --hu-soft: var(--hue-indigo-soft); --hu-ink: var(--hue-indigo-ink); }
.src-badge[data-src="apply"] { --hu: var(--hue-violet); --hu-soft: var(--hue-violet-soft); --hu-ink: var(--hue-violet-ink); }
.src-badge[data-src="craigslist"] { --hu: var(--hue-rose); --hu-soft: var(--hue-rose-soft); --hu-ink: var(--hue-rose-ink); }
.src-badge[data-src="referral"] { --hu: var(--hue-azure); --hu-soft: var(--hue-azure-soft); --hu-ink: var(--hue-azure-ink); }
.src-badge[data-src="board"] { --hu: var(--hue-indigo); --hu-soft: var(--hue-indigo-soft); --hu-ink: var(--hue-indigo-ink); }   /* job boards, like Indeed */
.src-badge[data-src="other"] { --hu: var(--faint); --hu-soft: var(--surface-3); --hu-ink: var(--ink-2); }   /* neutral, even inside a tinted header */
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.card-head h2 { flex: 1; }
.card-body { padding: 12px 16px 16px; }
.grid { display: grid; gap: 12px; }
/* Card grids never widen the page: a track's minimum is 0 (or the card width, capped at 100%), and a card can shrink below its
   longest line, so a no-wrap row (an ellipsis line, a name with a phone number) truncates instead of pushing the page sideways. */
.grid:not(table) > * { min-width: 0; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.g-kpi.g-dash { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-dash .kpi.hero { grid-column: span 2; }
@media (max-width: 1100px) { .g-kpi.g-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
@media (max-width: 1180px) { .g-main { grid-template-columns: minmax(0, 1fr); } }   /* minmax(0, …): a wide table can't stretch the page */
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- buttons, inputs: 4px corners, one solid accent primary per view ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 var(--font); padding: 8px 12px; border-radius: 4px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { border-color: var(--faint); background: var(--hover); text-decoration: none; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
/* AI: a normal button with the violet sparkle (violet stays on AI content only, never as a fill) */
.btn.ai { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn.ai svg { color: var(--ai); }
.btn.ai:hover { border-color: color-mix(in srgb, var(--ai) 45%, var(--line-2)); background: var(--ai-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.good, .btn.advance { background: var(--good); border-color: var(--good); color: var(--good-ink); }
.btn.good:hover, .btn.advance:hover { background: color-mix(in srgb, var(--good) 86%, #000); border-color: color-mix(in srgb, var(--good) 86%, #000); }
.btn.danger, .btn.reject { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line-2)); background: var(--surface); }
.btn.danger:hover, .btn.reject:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.advance svg, .btn.reject svg { width: 14px; height: 14px; }
/* A row's own actions are plain buttons (the page's one primary is at the top). "Showed up", "Approve": a plain button whose icon
   carries the meaning, icon("checkCircle", "good"); "No-show": icon("ban", "bad"). */
.btn svg.good { color: var(--good); } .btn svg.bad { color: var(--bad); }
/* A toggle button that is on (a quick filter): the selected look, not a second solid primary. */
.btn[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.btn .n { font-variant-numeric: tabular-nums; font-weight: 600; opacity: .9; }
.btn.sm { padding: 6px 9px; font-size: 12.5px; border-radius: 4px; }
.btn.xs { padding: 3px 7px; font-size: 11.5px; border-radius: 4px; gap: 4px; }
.btn.xs svg, .btn.sm svg { width: 14px; height: 14px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn.primary:disabled:hover { background: var(--brand); }
.btn-group { display: inline-flex; } .btn-group .btn { border-radius: 0; } .btn-group .btn:first-child { border-radius: 4px 0 0 4px; } .btn-group .btn:last-child { border-radius: 0 4px 4px 0; } .btn-group .btn + .btn { margin-left: -1px; }
.btn-group .btn.on { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); position: relative; z-index: 1; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line-2); border-radius: 4px; padding: 7px 10px; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { width: 100%; resize: vertical; min-height: 80px; line-height: 1.45; }
select { padding-right: 28px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 15px; height: 15px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.form .wide { grid-column: 1 / -1; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; }
.toggle { position: relative; width: 36px; height: 20px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; background: var(--line-2); border-radius: 20px; transition: .15s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- chips, grades, avatars (pill language: 4px corners, soft tint, darker text) ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; line-height: 16px; }
.chip svg { width: 12px; height: 12px; }
/* Steps have no colors of their own: progress shows by position (stepper, counter strip, the Step / Status cell). */
.chip.stage { --c: var(--faint); background: var(--surface-3); color: var(--ink-2); }
.chip.stage::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.chip.outline { background: transparent; border: 1px solid var(--line-2); padding: 1px 6px; }
.chip.ai { background: var(--surface-3); color: var(--ink-2); }
.chip.ai svg { color: var(--ai); }
.chip.good { background: var(--good-soft); color: var(--good); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.blue { background: var(--info-soft); color: var(--info); }   /* a status ("Scheduled", "Sent"): the info tone; the accent is for links, counts and selection */
.chip.on { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent); }   /* a picked choice (talent pool) */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); }
.tag button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 13px; line-height: 1; }
/* AI grade: a small neutral letter badge on every screen (no green A or blue B: most rows are A or B, so a tint would color the
   whole Grade column). A is ink and bold, B and C ink-2, D muted and outlined. The gold star glyph (top match) is the highlight. */
.grade { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 4px; font: 600 11.5px/1 var(--font);
  background: var(--surface-3); color: var(--ink-2); font-variant-numeric: tabular-nums; vertical-align: middle; }
.grade.A { color: var(--ink); font-weight: 700; }
.grade.D { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.grade.none { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }   /* "–": not graded yet */
.grade.lg { min-width: 40px; height: 40px; font-size: 20px; border-radius: 6px; }
.match-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 12px; flex: none;
  background: var(--surface-3); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.avatar.own { --c: var(--brand-solid); background: var(--c); color: #fff; box-shadow: none; }   /* the signed-in user's own avatar */
.avatar.sm { width: 24px; height: 24px; font-size: 10px; } .avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; } .avatar.xl { width: 72px; height: 72px; font-size: 26px; }
/* r7: a person's initials beside their name in a grid row or on a Board card (the avatar sits left of the two-line cell). */
.nm-av { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nm-av > .avatar { flex: none; }
.nm-av > .cell2 { flex: 1 1 auto; min-width: 0; }
.source { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.source i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.stars { color: var(--gold); letter-spacing: 1px; cursor: pointer; user-select: none; }
.stars .off { color: color-mix(in srgb, var(--muted) 80%, var(--surface)); }   /* an empty star is part of a control: 3:1 or better in both themes */

/* ---------- KPI tiles and charts: numbers carry the interest ---------- */
.kpi { padding: 14px 16px 12px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; }   /* its first icon is the tinted chip (above) */
.kpi .value { font: 600 28px/1.1 var(--font-display); letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi .delta { font-size: 12px; font-weight: 600; margin-left: 8px; }
.kpi .delta.up { color: var(--good); } .kpi .delta.down { color: var(--bad); } .kpi .delta.flat { color: var(--muted); }
.kpi .foot { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi .spark { margin-top: 8px; height: 34px; }
/* The one headline number on the dashboard: a normal tile, two columns wide, its number in the accent. */
.kpi.hero .value { color: var(--brand); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font: 11px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin: 4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2);
  padding: 8px 10px; font-size: 12px; min-width: 140px; }
.tip .t { color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 8px; } .tip .r b { margin-left: auto; font-variant-numeric: tabular-nums; }
.tip .r i { width: 10px; height: 2px; border-radius: 1px; display: inline-block; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 92px; gap: 10px; align-items: center; padding: 4px 0; }
.funnel-row .bar { height: 18px; border-radius: 0 3px 3px 0; min-width: 2px; background: var(--s1); }
/* an optional step (a job order's Offer): a lighter bar with an outline, and no percentage (charts.js funnel) */
.funnel-row.opt .bar { background: color-mix(in srgb, var(--s1) 28%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s1) 55%, transparent); }
.funnel-row .lbl .hint { font-size: 11px; font-weight: 400; color: var(--muted); }
.funnel-row .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.funnel-row .val { font-size: 12.5px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meter { height: 6px; background: color-mix(in srgb, var(--s1) 16%, var(--surface)); border-radius: 3px; overflow: hidden; }
.meter > div { height: 100%; background: var(--s1); border-radius: 3px; }
.segbar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-3); }
.segbar > div { height: 100%; }
.minibar { height: 6px; border-radius: 3px; background: var(--s1); min-width: 2px; }
.table-view summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ---------- tables (plain lists across the app; the ATS data grid is table.grid further down) ---------- */
/* One header style for every table, plain lists and the data grid alike: an 11.5px/600 sentence-case label in --ink-2 on the
   header band (--surface-3) with a firm --line-2 rule under it. table.grid th keeps the same look at a fixed 32px. */
.table-wrap { overflow: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t th { text-align: left; font: 600 11.5px/1.25 var(--font); color: var(--ink-2); text-transform: none; letter-spacing: 0; padding: 9px 12px;
  border-bottom: 1px solid var(--line-2); background: var(--surface-3); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
/* A sortable header: its label is a button (click sorts, click again flips the order; the th says aria-sort), and the funnel beside
   it (.th-f) opens the filter menu. Same controls on the Candidates list, the Applicants grids and Job orders.
   The label button looks like grid.css's .th-s: a soft hover chip, the sort arrow in the accent, the sorted column in ink. */
table.t th .th-in > button:not(.th-f) { display: inline-flex; align-items: center; gap: 3px; min-width: 0; max-width: 100%; margin: 0 -3px; padding: 2px 3px;
  border: 0; border-radius: 4px; background: none; font: inherit; color: inherit; text-align: left; white-space: inherit; cursor: pointer; }
table.t th .th-in > button:not(.th-f):hover { color: var(--ink); background: var(--surface-2); }
table.t th[aria-sort] { color: var(--ink); }
table.t th .th-sort { display: inline-grid; color: var(--brand); }
table.t tr.group-row td { background: var(--surface-3); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding: 6px 12px; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tbody tr:hover td { background: var(--hover); }
table.t tr.sel td { background: var(--brand-soft); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bulkbar { position: fixed; bottom: 20px; left: calc(50% + 110px); transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100vw - 260px); flex-wrap: wrap; display: flex; gap: 8px; align-items: center; padding: 8px 10px 8px 16px;
  background: #0f172a; color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-3); }
.bulkbar .btn { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.14); }
.bulkbar .btn:hover { background: rgba(255,255,255,.16); }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { padding: 6px 10px; font-size: 13px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 4px; padding: 2px; gap: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: none; font: 600 12.5px var(--font); color: var(--muted); padding: 5px 10px; border-radius: 3px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.1), 0 0 0 1px var(--line); }
/* Toolbars: one 32px height for the search box, selects, segmented filters and buttons. */
.tb-search { position: relative; display: inline-flex; align-items: center; flex: 0 1 260px; width: 260px; max-width: 100%; }
.tb-search > svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.tb-search > input[type=search] { width: 100%; height: 32px; padding: 0 10px 0 32px; font-size: 13px; }
.filters > select, .filters > .tb-select { height: 32px; padding: 0 28px 0 10px; font-size: 13px; max-width: 220px; }
.filters > .btn, .filters > a.btn { height: 32px; padding-top: 0; padding-bottom: 0; }
.filters > .seg { height: 32px; box-sizing: border-box; }
.filters > .seg > button { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; }
.seg .n { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; } .seg .on .n { color: var(--brand); }
.tb-note { font-size: 12px; color: var(--muted); }   /* the one muted line at a toolbar's right end: "44 active", "Only admins…" */
@media (max-width: 640px) { .tb-search { flex: 1 1 100%; width: 100%; } .filters > select, .filters > .tb-select { flex: 1 1 calc(50% - 8px); max-width: none; } }

/* ---------- tabs: the active tab is underlined in the accent ---------- */
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px var(--line); margin-bottom: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a, .tabs button { padding: 9px 12px; font: 600 13px var(--font); color: var(--muted); border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .on { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .on svg { color: var(--brand); }
.tabs svg { width: 15px; height: 15px; }
.tabs .count { font-size: 11px; background: var(--surface-3); color: var(--ink-2); border-radius: 4px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.tabs .on .count { background: var(--brand-soft); color: var(--brand); }
.tabs .count.accent { background: var(--brand-soft); color: var(--brand); }   /* new things to look at (unanswered questions, new replies) */
.tabs .count.hot { background: var(--bad-soft); color: var(--bad); }          /* only when the number itself is an overdue count */

/* ---------- kanban (the job Board): neutral lanes, no colored lane tops ---------- */
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.lane { flex: 0 0 272px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.lane.collapsed { flex-basis: 52px; cursor: pointer; }
.lane.collapsed .lane-body, .lane.collapsed .lane-name, .lane.collapsed .lane-hint { display: none; }
.lane-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.lane-title { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.lane-count { font-size: 12px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.lane-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lane-body { padding: 8px 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.lane.over { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-soft); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px; cursor: grab; position: relative; transition: border-color .12s, box-shadow .12s; }
.kcard:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.kcard.dragging { opacity: .45; transform: rotate(1deg); }
.kcard.sel { outline: 2px solid var(--brand); }
.kcard .k-top { display: flex; gap: 8px; align-items: center; }
.kcard .k-name { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.kcard .k-reason { font-size: 12px; color: var(--ink-2); margin: 6px 0 7px; }
.kcard .k-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.kcard .k-sel { position: absolute; top: 8px; right: 8px; opacity: 0; }
.kcard:hover .k-sel, .kcard.sel .k-sel { opacity: 1; }
/* Days in a step: plain ink up to 7 business days, red only past 7 (the same rule as the grid's Days column and the Board). */
.age { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--ink-2); }
.age.ok, .age.mid { background: var(--surface-3); color: var(--ink-2); } .age.old { background: var(--bad-soft); color: var(--bad); }

/* ---------- AI panel: violet only as an accent on AI-written content ---------- */
.ai-panel { border: 1px solid var(--line); border-top: 2px solid color-mix(in srgb, var(--ai) 55%, var(--line)); background: var(--surface); border-radius: var(--radius); }
.ai-title { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--ink); }
.ai-title svg { width: 17px; height: 17px; color: var(--ai); }
.ai-note { font-size: 11.5px; color: var(--muted); }
.fit { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.fit + .fit { margin-top: 8px; }
.list-dot { margin: 4px 0 0; padding-left: 18px; } .list-dot li { margin: 2px 0; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; }
.profile-head h1 { font-size: 22px; }
.contact-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 500; } .kv dd { margin: 0; font-weight: 500; }
.timeline { position: relative; }
.tl-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 0; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 14px; top: 34px; bottom: -8px; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); border: 2px solid var(--surface); }
.tl-icon svg { width: 14px; height: 14px; }
.tl-icon.ai { background: var(--ai-soft); color: var(--ai); } .tl-icon.stage { background: var(--brand-soft); color: var(--brand); }
.tl-icon.good { background: var(--good-soft); color: var(--good); } .tl-icon.bad { background: var(--bad-soft); color: var(--bad); }
.tl-body .meta { font-size: 11.5px; color: var(--muted); }
.note { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 10px 12px; }
:root[data-theme="dark"] .note { background: #2b2924; border-color: #544428; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .note { background: #2b2924; border-color: #544428; } }
.composer { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.composer .tabs { margin: 0; padding: 0 8px; }
.composer-body { padding: 12px; }
.resume { white-space: pre-wrap; font: 13px/1.55 var(--font); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; max-height: 520px; overflow: auto; }
/* Work experience (the top card on a profile) and the pre-screen carousel */
.xp-item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.xp-item + .xp-item { border-top: 1px solid var(--line); }
.xp-item[hidden] { display: none; }
.xp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); margin-top: 6px; }
.xp-item:first-child .xp-dot { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.xp-stay { flex: none; font-variant-numeric: tabular-nums; }
.xp-duties { margin-top: 6px; color: var(--ink-2); }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fit-nav { gap: 6px; margin-bottom: 8px; }
.fit-nav .icon-btn { width: 30px; height: 30px; }
.fit-nav .icon-btn:disabled { opacity: .4; cursor: default; }
.fit-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; align-items: flex-start; border-radius: var(--radius); }
.fit-track::-webkit-scrollbar { display: none; }
.fit-track:focus-visible { outline: 2px solid var(--ai); outline-offset: 2px; }
.fit-track > .fit { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.fit-track > .fit + .fit { margin-top: 0; }
.car-dots { display: flex; justify-content: center; gap: 2px; margin-top: 6px; }
.car-dots button { width: 24px; height: 24px; display: grid; place-items: center; border: 0; padding: 0; background: none; cursor: pointer; }
.car-dots button::after { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--line-2); transition: width .15s; }
.car-dots button.on::after { width: 18px; background: var(--ai); }
@media (prefers-reduced-motion: reduce) { .car-dots button::after { transition: none; } }
.work-item { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 6px 0; }
.work-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 6px; }

/* ---------- overlays: the only places with shadows ---------- */
.drawer-back, .modal-back { position: fixed; inset: 0; background: var(--overlay); z-index: 60; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--raised); z-index: 61; box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slide .18s ease-out; }
.drawer.wide { width: min(820px, 100vw); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { flex: 1; font-size: 16px; }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }
.modal { position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--raised); border-radius: 8px; box-shadow: var(--shadow-3); animation: pop .16s ease-out; }
.modal.wide { width: min(760px, calc(100vw - 32px)); }
.modal-head { padding: 16px 20px 0; display: flex; gap: 10px; align-items: center; } .modal-head h2 { flex: 1; font-size: 16px; }
.modal-body { padding: 14px 20px; } .modal-foot { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; }
.modal-head .icon-btn, .drawer-head .icon-btn { border-color: transparent; }
.modal-head .icon-btn:hover, .drawer-head .icon-btn:hover { border-color: var(--line); }
.menu { position: fixed; z-index: 80; min-width: 200px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 4px; animation: pop .12s ease-out; }
.menu button, .menu a { display: flex; width: 100%; gap: 9px; align-items: center; padding: 7px 10px; border: 0; background: none; font: 500 13px var(--font); color: var(--ink); border-radius: 4px; cursor: pointer; text-align: left; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--menu-hover); text-decoration: none; }
.menu button:focus { outline: none; }
.menu button:focus-visible { background: var(--menu-hover); box-shadow: inset 0 0 0 2px var(--brand); }   /* arrow keys move this */
.menu button:disabled { opacity: .5; cursor: default; background: none; }
.menu svg { width: 15px; height: 15px; color: var(--muted); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 4px; }
.menu .lbl { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .06em; }
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: #111827; color: #fff; padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow-2); max-width: 420px; display: flex; gap: 10px; align-items: center; animation: pop .16s ease-out; font-weight: 500; }
.toast.err { background: #b91c1c; } .toast.ok svg { color: #4ade80; } .toast svg { width: 18px; height: 18px; flex: none; }
/* Dark mode: the dark toast and the floating bulk bar need an edge, or they melt into the dark canvas. */
:root[data-theme="dark"] .toast, :root[data-theme="dark"] .bulkbar { border: 1px solid var(--line-2); }
:root[data-theme="dark"] .toast:not(.err), :root[data-theme="dark"] .bulkbar { background: var(--raised); }
:root[data-theme="dark"] .side { border-right: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .toast, :root:where(:not([data-theme="light"])) .bulkbar { border: 1px solid var(--line-2); }
  :root:where(:not([data-theme="light"])) .toast:not(.err), :root:where(:not([data-theme="light"])) .bulkbar { background: var(--raised); }
  :root:where(:not([data-theme="light"])) .side { border-right: 1px solid var(--line); } }
@keyframes fade { from { opacity: 0; } } @keyframes slide { from { transform: translateX(30px); opacity: 0; } } @keyframes pop { from { transform: translate(-50%, -48%) scale(.98); opacity: 0; } }
.menu, .toast { animation-name: fadeup; } @keyframes fadeup { from { opacity: 0; transform: translateY(4px); } }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty svg { margin-bottom: 8px; }   /* the picture's size and section tint: .empty > svg:first-child (above) */
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .btn svg { width: 15px; height: 15px; margin: 0; color: inherit; }   /* a button inside an empty state keeps its small icon */
.banner { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: var(--radius); border: 1px solid; border-color: var(--line); margin-bottom: 14px; }   /* a banner without a tone keeps a hairline, never an ink border */
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--ink); }
.banner.warn > svg { color: var(--warn); }
.banner.info { background: var(--surface); border-color: var(--line); border-left: 3px solid var(--info); }
.banner.info > svg { color: var(--info); }
.banner.ai { background: var(--surface); border-color: var(--line); border-left: 3px solid color-mix(in srgb, var(--ai) 60%, var(--line)); }
.banner.ai > svg { color: var(--ai); }
.banner svg { width: 18px; height: 18px; flex: none; }
/* A field the AI filled from an uploaded paper is blue until someone changes it (the owner, Nov 16 2026: "highlight the ones that get
   pre filled from the sheet in blue so i know which got pulled"): the incident report, "Add from a document" and a claim's documents
   (erdocs.js markPulled). Its own blue, not the brand color (a client's branding changes that): the --pulled tokens, light and dark
   (light 5.9:1 on white; dark over 7:1 on the dark field). Only an element given .ai-pulled changes. */
.ai-pulled input:not([type=checkbox]):not([type=radio]), .ai-pulled select, .ai-pulled textarea {
  background: var(--pulled-soft); border-color: var(--pulled); box-shadow: inset 3px 0 0 var(--pulled); }
.ai-pulled input:not([type=checkbox]):not([type=radio]):focus, .ai-pulled select:focus, .ai-pulled textarea:focus {
  border-color: var(--brand); box-shadow: var(--focus), inset 3px 0 0 var(--pulled); }   /* the keyboard focus still shows */
.ai-pulled > span:first-child { color: var(--pulled); }
label.check.ai-pulled, .ai-pulled .er-adm label.check:has(input:checked) {
  background: var(--pulled-soft); box-shadow: 0 0 0 1px var(--pulled); border-radius: var(--radius-sm, 4px); padding: 1px 6px; }
.ai-pulled-key { display: inline-block; width: 11px; height: 11px; margin-right: 4px; vertical-align: -1px; border-radius: var(--radius-sm, 4px);
  background: var(--pulled-soft); box-shadow: inset 0 0 0 1px var(--pulled); }
.drop { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 36px 20px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.drop svg { width: 34px; height: 34px; margin-bottom: 6px; }
/* Import resumes (dashboard/js/resumeimport.js) */
.imp-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.imp-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .2s; }
@media (prefers-reduced-motion: reduce) { .imp-bar i { transition: none; } }
.imp-hist { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; cursor: pointer; color: inherit; font: inherit; }
.imp-hist:hover b { color: var(--brand); }
.copybox { position: relative; }
.copybox textarea { font: 12.5px/1.5 Consolas, "Cascadia Mono", monospace; min-height: 120px; background: var(--surface-2); }
.copybox .btn { position: absolute; top: 8px; right: 8px; }
.qr svg { width: 168px; height: 168px; background: #fff; border-radius: 6px; padding: 6px; }
.checklist .ci { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 4px; }
.checklist .ci:hover { background: var(--surface-2); }
.checklist .ci.done .txt { color: var(--muted); text-decoration: line-through; }
.agenda-day { font-weight: 600; font-size: 13px; padding: 14px 0 6px; color: var(--ink-2); }
.slot { display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; margin: 3px; }
.auth { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 20px; }
.auth-card { width: min(420px, 100%); padding: 28px; border-top: 3px solid var(--brand); }
.auth-card .logo { color: var(--ink); padding: 0 0 18px; }
.auth-card .logo-sub { color: var(--muted); }
.auth-card .logo-plate { width: auto; height: auto; padding: 0; background: none; }
.auth-card .logo-plate img { max-height: 56px; }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-veil { opacity: .55; pointer-events: none; transition: opacity .15s; }
/* Narrow screens: the sidebar becomes a drawer opened by the menu button in the top bar. */
.menu-btn, .side-back { display: none; }
@media (max-width: 860px) {
  .bulkbar { left: 50%; max-width: calc(100vw - 24px); } .app { grid-template-columns: minmax(0, 1fr); } .page { padding: 16px; } .g-2 { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 84vw); z-index: 70; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-3); }
  .app.nav-open .side { transform: none; }
  .app.nav-open .side-back { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 65; }
  .menu-btn { display: grid; flex: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .search kbd, #askAi { display: none; }
  .search input { padding-right: 10px; }
}
@media print { .side, .topbar, .bulkbar, .menu-btn, .side-back { display: none; } .app { display: block; } }
.banner.bad { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--ink); }
.banner.bad > svg { color: var(--bad); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 15%, transparent); }
.field-err { color: var(--bad); font-size: 12px; margin-top: 4px; }

/* ---------------------------------------------------------------- team chat */
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: calc(100vh - 190px); min-height: 460px; overflow: hidden; padding: 0; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 8px 0; background: var(--surface-2); }
.chat-section { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 4px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chat-section .icon-btn { width: 26px; height: 26px; }
.chat-item { display: flex; align-items: center; gap: 8px; padding: 7px 14px; color: var(--ink-2); text-decoration: none; cursor: pointer; border: 0; background: none; font: inherit; text-align: left; border-radius: 4px; }
.chat-list .chat-item { margin: 1px 6px; }
.chat-item:hover { background: var(--surface-3); text-decoration: none; }
.chat-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.chat-item .hash { width: 26px; text-align: center; color: var(--muted); font-weight: 600; }
.chat-item .count { font-size: 11px; border-radius: 4px; padding: 0 7px; background: var(--surface-3); }
.chat-item .count.hot { background: var(--bad, #dc2626); color: #fff; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-thread { flex: 1; overflow-y: auto; padding: 10px 18px; }
.chat-day { text-align: center; margin: 14px 0 6px; font-size: 11.5px; color: var(--muted); }
.chat-day span { background: var(--surface); padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; }
.msg { display: flex; gap: 10px; padding: 6px 0 2px; }
.msg.grouped { padding-top: 0; }
.msg-gap { width: 28px; flex: none; }
.msg-meta { display: flex; gap: 8px; align-items: baseline; }
.msg-body { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.msg-body .mention, .mention { color: var(--brand); }
.cand-card { display: flex; gap: 10px; align-items: center; margin-top: 6px; padding: 10px 12px; max-width: 460px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--ink); text-decoration: none; }
.cand-card:hover { border-color: var(--brand); text-decoration: none; }
.chat-compose { border-top: 1px solid var(--line); padding: 10px 14px; }
.chat-compose textarea { flex: 1; resize: none; min-height: 40px; max-height: 160px; }
/* Phones: channels and direct messages sit above the conversation instead of disappearing. */
@media (max-width: 860px) { .chat { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 150px); }
  .chat-list { display: block; max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------------------------------------------------------------- clients and job orders (clients.js, client.js, jobs.js, job.js) */
/* Small stat tiles: report card, list summaries. Two across on phones. */
.mini-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.mini-kpis .mk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.mini-kpis .mk .l { font-size: 11.5px; font-weight: 600; color: var(--muted); display: flex; gap: 5px; align-items: center; }   /* its first icon: the tinted chip */
.mini-kpis .mk .v { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mini-kpis .mk .f { font-size: 11.5px; color: var(--muted); }
.mini-kpis .mk.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); } .mini-kpis .mk.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
@media (max-width: 520px) { .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Headcount by week: one series, thin columns with rounded tops on a shared baseline and a 2px gap. */
.hc-chart { display: flex; align-items: flex-end; gap: 2px; height: 96px; border-bottom: 1px solid var(--axis); padding-top: 14px; }
.hc-chart .hc-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; cursor: default; }
.hc-chart .hc-bar { width: 100%; max-width: 28px; background: var(--s1); border-radius: 4px 4px 0 0; min-height: 2px; }
.hc-chart .hc-col:hover .hc-bar { background: color-mix(in srgb, var(--s1) 80%, var(--ink)); }
.hc-chart .hc-col .hc-n { position: absolute; top: -14px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hc-axis { display: flex; gap: 2px; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.hc-axis span { flex: 1; min-width: 0; text-align: center; overflow: hidden; white-space: nowrap; }
@media (max-width: 520px) { .hc-axis span:nth-child(even) { visibility: hidden; } }
/* Tables that become stacked cards on phones (each cell shows its column name). */
@media (max-width: 640px) {
  table.t.stack-sm thead { display: none; }
  table.t.stack-sm, table.t.stack-sm tbody, table.t.stack-sm tr, table.t.stack-sm td { display: block; width: 100%; }
  table.t.stack-sm tr { border-bottom: 1px solid var(--line); padding: 8px 4px; }
  table.t.stack-sm td { border: 0; padding: 3px 8px; text-align: left !important; }
  table.t.stack-sm td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 108px; font-size: 11px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
  table.t.stack-sm td.cell-main::before { display: none; }
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable .arrow { opacity: .45; margin-left: 3px; } th.sortable.on .arrow { opacity: 1; color: var(--brand); }
/* Client contacts, worksites, documents. */
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
@media (max-width: 400px) { .cards-2 { grid-template-columns: minmax(0, 1fr); } }
.ccard { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); min-width: 0; }
.ccard.off { opacity: .6; }
.ccard .ccard-head { display: flex; gap: 10px; align-items: flex-start; }
.ccard .ccard-head b { overflow-wrap: anywhere; }
.ccard .ccard-lines { margin-top: 8px; display: grid; gap: 3px; font-size: 12.5px; overflow-wrap: anywhere; }
.ccard .ccard-lines svg { width: 14px; height: 14px; color: var(--muted); margin-right: 4px; }
.ccard .ccard-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.kv.kv-tight { grid-template-columns: 120px minmax(0, 1fr); } .kv dd { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 420px) { .kv { grid-template-columns: 1fr; gap: 0 12px; } .kv dd { margin-bottom: 6px; } }
.star-on { color: var(--gold); }
/* Timeline filter chips and composer type picker. */
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-row button { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 600 12px var(--font); padding: 4px 10px; border-radius: 4px; cursor: pointer; }
.chips-row button.on { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.change-list { margin: 4px 0 0; padding: 0; list-style: none; font-size: 12.5px; }
.change-list li { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; padding: 1px 0; }
.change-list .was { color: var(--muted); text-decoration: line-through; } .change-list .now { font-weight: 650; }
/* Job orders list: card facts row and table view. */
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.facts > div { min-width: 0; }
.facts .tiny { text-transform: uppercase; letter-spacing: .04em; }
.view-toggle .btn { padding: 7px 10px; }
.toolbar-search { width: 260px; max-width: 100%; }   /* older markup (a bare search input); new toolbars use .tb-search */
@media (max-width: 520px) { .toolbar-search { width: 100%; } .filters select { flex: 1 1 140px; min-width: 0; } }
/* Job pipeline board: show-more per lane, last-contacted and do-not-return badges. */
.lane-more { margin: 2px 0 4px; width: 100%; justify-content: center; }
.k-last { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--ink-2); }
.k-last.stale { background: var(--warn-soft); color: var(--warn); } .k-last.never { background: var(--bad-soft); color: var(--bad); }
.k-suggest { display: flex; gap: 6px; align-items: center; margin-top: 7px; padding: 5px 7px; border-radius: 4px; background: var(--good-soft); font-size: 11.5px; color: var(--good); font-weight: 600; }
.k-suggest .btn { margin-left: auto; }
/* Rate lines and money breakdowns. */
.rate-grid { display: grid; grid-template-columns: auto repeat(2, minmax(0, 1fr)); gap: 4px 14px; font-size: 13px; font-variant-numeric: tabular-nums; }
.rate-grid .h { font-size: 11px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pill-list { display: flex; flex-wrap: wrap; gap: 4px; }
.picker-results { border: 1px solid var(--line); border-radius: var(--radius); margin-top: 6px; max-height: 220px; overflow: auto; }
.picker-results button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.picker-results button:hover, .picker-results button.on { background: var(--surface-3); }
@media (max-width: 640px) { .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }   /* stat tiles two across on a phone, every page */
@media (max-width: 640px) { .page-head > .btn, .page-head > .seg { flex: 0 1 auto; } .page-head h1 { font-size: 20px; } .page-head > .page-ico { width: 36px; height: 36px; align-self: flex-start; }
  .page-head > .page-ico + .grow { flex: 1 1 240px; min-width: 0; } }   /* the title stays beside its chip on a phone (a page's own head rules too), down to
   320px wide; at 240px the page's buttons still wrap below the title on a 390px phone instead of squeezing it (Training's New) */

/* ---------------------------------------------------------------- placements, reports, dashboard cards and sourcing spend (staffing) */
.kpi.sm { padding: 13px 16px 11px; }
.kpi.sm .value { font-size: 22px; }
.kpi .foot a { color: var(--brand); }
.pl-kpis { margin-bottom: 16px; }
.pl-filters input[type=search] { flex: 1 1 220px; min-width: 180px; }
.pl-date { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.pl-date input { height: 32px; padding-top: 0; padding-bottom: 0; }   /* the 32px toolbar height (app.css Toolbars) */
.bad-text { color: var(--bad); } .warn-text { color: var(--warn); }
/* A field the form shows but doesn't let you change (forms.js whereFields: a job order's client is fixed). */
.fixed-val { display: flex; align-items: center; gap: 6px; min-height: 34px; min-width: 0; }
.fixed-val svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
/* The job ad and job order forms (forms.js adForm, orderForm): the ads feeding an order, the shifts an ad offers, the suggestion
   from a client's request. */
.jf-ads { gap: 6px 16px; }
.jf-shift { gap: 6px; margin: 6px 0; max-width: 420px; }
.jf-shift input { flex: 1; min-width: 0; }
.jf-addshift { gap: 10px; align-items: center; margin: 6px 0 4px; }
.jf-addshift input[type="time"] { width: 120px; }
.jf-sug .jf-sug-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 4px; }
.jf-sug .check { display: flex; gap: 6px; align-items: flex-start; }
.jf-sug .jf-sub { margin-left: 22px; font-size: 12px; color: var(--ink-2); }
table.t.compact th, table.t.compact td { padding: 6px 8px; }
/* a link that reads as the text around it (a job's number and title on Home, a job order in a table): the brand color on hover */
a.plain { color: inherit; }
a.plain:hover { color: var(--brand); text-decoration: none; }
a.plain:focus-visible { outline: none; border-radius: 3px; box-shadow: var(--focus); }
.side-row, .dash-row { padding: 7px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.side-row:last-child, .dash-row:last-child { border-bottom: 0; }
.side-row:hover b, .dash-row:hover b { color: var(--brand); }
.day1-card { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); box-shadow: none; }
.pl-actions { gap: 6px; }
.money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.money-grid > div { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.money-grid span { font-size: 12px; color: var(--muted); font-weight: 600; }
.money-grid b { font-size: 17px; font-variant-numeric: tabular-nums; }
.money-grid em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.att-row { gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.att-row .icon-btn { width: 30px; height: 30px; }
.hours-prev tr.dim td { opacity: .55; }
.hours-prev select { max-width: 280px; font-size: 12px; padding: 4px 6px; }
.rep-bar { margin-bottom: 4px; }
.rep-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.rep-row select, .rep-row input { width: 100%; min-width: 0; }
.rep-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; }
.spend-grid input { width: 86px; padding: 5px 7px; text-align: right; }
.spend-grid input.saved { border-color: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 18%, transparent); }
.spend-grid td:first-child { white-space: nowrap; }
.email-preview { white-space: pre-wrap; margin: 0; font: 12.5px/1.5 Consolas, "Cascadia Mono", monospace; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; max-height: 60vh; overflow: auto; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .card-head { flex-wrap: wrap; }
  .pl-filters > input, .pl-filters > select, .pl-filters > .pl-date { flex: 1 1 100%; }
  .pl-date input { flex: 1; }
  .rep-row { grid-template-columns: 1fr 1fr; }
  .money-grid { grid-template-columns: 1fr 1fr; }
}
@media print { [data-xl], #rPrint, #rExport, .rep-bar select, #weeklyCard { display: none !important; } .card { break-inside: avoid; } }

/* ---------------------------------------------------------------- candidates list and profile (candidates.js, candidate.js) */
/* Filter bar: pick-lists (cities, shifts, equipment, columns), the "More filters" panel and removable filter chips. */
.fchip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; padding: 2px 2px 2px 9px; border-radius: 4px; background: var(--brand-soft); color: var(--brand); max-width: 100%; }
.fchip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 6px; opacity: .85; }
.fchip button:hover { opacity: 1; }
.mpick { position: fixed; z-index: 80; width: 290px; max-height: min(440px, 72vh); display: flex; flex-direction: column; gap: 6px; padding: 10px;
  background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); animation: fadeup .12s ease-out; }
.mpick-search { width: 100%; padding: 7px 10px; }
.mpick-list { overflow: auto; display: flex; flex-direction: column; gap: 1px; min-height: 40px; }
.mpick-list label { padding: 6px 6px; border-radius: 6px; font-size: 13px; }
.mpick-list label:hover { background: var(--surface-3); }
.mpick-foot { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.gq { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.gq svg { width: 12px; height: 12px; }
.th-in { display: inline-flex; align-items: center; gap: 2px; }
.th-f { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 4px; background: none; color: var(--faint);
  cursor: pointer; padding: 0; }
.th-f:hover, .th-f:focus-visible { color: var(--ink); background: var(--surface-3); }
.th-f.on { color: var(--brand); background: var(--brand-soft); }
.th-f svg, .th-sort svg { width: 12px; height: 12px; }
.th-sort { display: inline-grid; color: var(--ink-2); }
.filters .small svg { width: 12px; height: 12px; vertical-align: -2px; }
.colmenu .cm-sorts { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.cm-sort { display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px; border: 0; border-radius: 6px; background: none; color: inherit;
  font: inherit; font-size: 13px; cursor: pointer; }
.cm-sort:hover { background: var(--surface-3); }
.cm-sort.on { font-weight: 650; }
.cm-sort svg, .cm-gap { width: 14px; height: 14px; flex: none; display: inline-block; color: var(--brand); }
.cm-all { padding: 4px 6px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
/* Phones: the filter bars' pick-lists and selects share the width. */
@media (max-width: 720px) {
  .filters > input#q { min-width: 0 !important; flex: 1 1 100%; }
  .filters > select { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .mpick { left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; max-height: 70vh; }
  .bulkbar { bottom: 10px; padding: 8px; gap: 6px; }
  .bulkbar .btn { padding: 6px 8px; }
}

/* Profile: header on phones, work preferences, phone screen, files, tasks, interviews and the assignment history table. */
#dnrChips:empty { display: none !important; }
@media (max-width: 640px) {
  .cand-head { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .cand-head .avatar.xl { width: 52px; height: 52px; font-size: 19px; }
  .cand-head h1 { font-size: 20px; }
  .cand-head .owner-col { width: 100%; flex-direction: row !important; align-items: center !important; }
  .cand-head .contact-actions .btn { padding: 8px 10px; }
  .kv { grid-template-columns: 112px minmax(0, 1fr); }
}
.banner.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.banner.good > svg { color: var(--good); }
.banner.small { padding: 8px 12px; font-size: 12.5px; margin-bottom: 0; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.eq-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.eq-grid input { width: 100%; }
.ps-q { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.ps-q + .ps-q { margin-top: 8px; }
.ps-q.must { border-left: 3px solid var(--brand); }
.ps-q.invalid-box { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 15%, transparent); }
.ps-q .ps-text { font-weight: 600; }
/* the question in Spanish (candidate.js draws it as .ps-es; .es is its older name): plain italic muted text, never a tag */
.ps-q .ps-es, .ps-q .es { display: block; margin-top: 2px; padding: 0; color: var(--muted); font: italic 400 12.5px/1.45 var(--font); letter-spacing: 0; box-shadow: none; }
.ps-q .ps-in { margin-top: 8px; }
.ps-state { flex: none; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 4px; white-space: nowrap; }
.ps-state.ok { background: var(--good-soft); color: var(--good); } .ps-state.no { background: var(--bad-soft); color: var(--bad); } .ps-state.na { background: var(--surface-3); color: var(--muted); }
details.screen > summary { cursor: pointer; list-style: none; }
details.screen > summary::-webkit-details-marker { display: none; }
details.screen[open] > summary { margin-bottom: 4px; }
.file-row, .task-row, .iv-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child, .task-row:last-child, .iv-row:last-child { border-bottom: 0; }
.iv-row { display: block; }
.file-row .ico { width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.file-row .ico svg { width: 16px; height: 16px; }
.task-row input[type=checkbox] { margin-top: 3px; flex: none; }
.task-row.done b { color: var(--muted); text-decoration: line-through; }
.task-row.overdue .due { color: var(--bad); font-weight: 600; }
.note .note-body textarea { min-height: 90px; }
table.assign td, table.assign th { padding: 8px 10px; }
@media (max-width: 720px) {
  table.assign thead { display: none; }
  table.assign, table.assign tbody, table.assign tr, table.assign td { display: block; width: 100%; }
  table.assign tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.assign td { border: 0; padding: 2px 0; display: flex; gap: 8px; align-items: center; }
  table.assign td::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; font-weight: 600; min-width: 92px; }
}

/* ---------------------------------------------------------------- recruiter workflow: tasks, interview calendar, inbox and texting
   (tasks.js, interviews.js, inbox.js, the task and interview dialogs in forms.js). Colors come from the theme tokens, so dark mode follows. */
.pick-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 4px; padding: 5px 6px 5px 10px; background: var(--surface-2); min-height: 38px; }
.pick-search { position: relative; }
.pick-search input { width: 100%; }
.pick-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 70; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 4px; max-height: 260px; overflow: auto; }
.pick-results button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 4px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.pick-results button:hover, .pick-results button:focus { background: var(--menu-hover); outline: none; }

/* tasks (the stat row is the shared button.card.kpi.sm tiles, above) */
.tk-filters input[type=search] { min-width: 160px; flex: 1; max-width: 280px; }
.tk-filters select { max-width: 200px; }
.tk-list { margin-bottom: 14px; overflow: hidden; }
.tk-group { display: flex; gap: 8px; align-items: center; padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink); }   /* sentence case, like a grid's group row */
.tk-group .count { background: var(--surface-3); border-radius: 4px; padding: 0 7px; }
.tk-group .check { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }   /* a control, not the Overdue heading: never red */
.tk-group.late { color: var(--bad); }
.tk-row { display: grid; grid-template-columns: 18px 18px 26px minmax(0, 1fr) minmax(0, 220px) 150px 140px 32px; gap: 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.tk-row:hover { background: var(--hover); }
.tk-row.sel { background: var(--brand-soft); box-shadow: inset 2px 0 0 var(--brand); }
.tk-row.done .tk-title { text-decoration: line-through; color: var(--muted); }
.tk-type { width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.tk-main { border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-title { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk-repeat { font-size: 11px; color: var(--muted); font-weight: 500; display: inline-flex; gap: 3px; align-items: center; }
.tk-notes { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-rel { display: flex; flex-direction: column; gap: 2px; font-size: 12px; min-width: 0; }
.tk-rel a { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); max-width: 100%; }
.tk-due { display: flex; flex-direction: column; font-size: 12px; }
.tk-due span { color: var(--muted); }
.tk-due.late b, .tk-due.late span { color: var(--bad); }
.tk-who { display: flex; gap: 6px; align-items: center; font-size: 12px; min-width: 0; }
.tk-who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-more { width: 30px; height: 30px; }
.tk-digest { margin-bottom: 72px; }
@media (max-width: 980px) {
  .tk-row { grid-template-columns: 18px 18px minmax(0, 1fr) auto 32px; grid-template-areas: "sel done main main more" ". . rel rel rel" ". . due who who"; row-gap: 4px; padding: 10px 12px; }   /* the assignee spans the last two columns, so the name shows whole (not "I.") */
  .tk-sel { grid-area: sel; } .tk-done { grid-area: done; } .tk-type { display: none; } .tk-main { grid-area: main; } .tk-more { grid-area: more; }
  .tk-rel { grid-area: rel; flex-direction: row; flex-wrap: wrap; gap: 2px 10px; }
  .tk-due { grid-area: due; flex-direction: row; gap: 6px; flex-wrap: wrap; }
  .tk-who { grid-area: who; justify-content: flex-end; }
  .tk-filters select, .tk-filters input[type=search] { flex: 1 1 140px; max-width: none; }
}

/* interview calendar: 15-minute rows (--rh), one column per interviewer (day) or per day (week) */
.cal-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 12px; }
.cal-nav { gap: 6px; flex-wrap: wrap; }
.cal-nav input[type=date] { padding: 6px 8px; }
.cal-bar > .filters { min-width: 0; max-width: 100%; }   /* the filters wrap inside the bar on a phone instead of widening the page */
.cal-label { font-size: 14px; white-space: nowrap; }
.cal-flip { transform: scaleX(-1); }
.cal-card { overflow: hidden; }
.cal-wrap { overflow: auto; max-height: calc(100vh - 250px); min-height: 380px; position: relative; overscroll-behavior: contain; }
.cal-grid { display: grid; min-width: min-content; }
.cal-corner, .cal-head { position: sticky; top: 0; z-index: 6; background: var(--surface-2); border-bottom: 1px solid var(--line); height: 38px; }
.cal-corner { left: 0; z-index: 7; border-right: 1px solid var(--line); }
.cal-head { display: flex; align-items: center; gap: 6px; padding: 0 10px; font-weight: 650; font-size: 12.5px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-head i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cal-head.today { color: var(--brand); }
.cal-times { position: sticky; left: 0; z-index: 5; background: var(--surface); border-right: 1px solid var(--line); }
.cal-time { position: absolute; right: 6px; margin-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: linear-gradient(to bottom, var(--line-2) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px);
  background-size: 100% calc(var(--rh) * 4), 100% var(--rh); }
.cal-col.today { background-color: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.cal-ev { --c: var(--brand); position: absolute; z-index: 1; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; line-height: 1.25; overflow: hidden; cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c);
  color: var(--ink); box-shadow: var(--shadow-1); }
.cal-ev[data-drag] { cursor: grab; }
.cal-ev:hover, .cal-ev:focus-visible { z-index: 3; box-shadow: var(--shadow-2); outline: none; }
.cal-ev:focus-visible { outline: 2px solid var(--brand); }
.cal-ev.dragging { z-index: 8; opacity: .92; cursor: grabbing; box-shadow: var(--shadow-3); outline: 2px solid var(--c); }
.cal-ev-time { font-weight: 600; font-size: 11px; color: color-mix(in srgb, var(--c) 65%, var(--ink)); display: flex; gap: 3px; align-items: center; }
.cal-ev-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.st-completed { background: color-mix(in srgb, var(--good) 13%, var(--surface)); }
.cal-ev.st-no_show { background: var(--bad-soft); border-left-color: var(--bad); }
.cal-ev.st-canceled { opacity: .55; }
.cal-ev.st-canceled .cal-ev-name { text-decoration: line-through; }
.cal-ev.client { border-left-style: dashed; }
.ivl-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; }
.ivl-row.past { opacity: .75; }
.ivl-row.st-canceled { opacity: .55; }
.ivl-time { width: 70px; flex: none; }
.ivl-notes { white-space: pre-wrap; margin-top: 4px; color: var(--ink-2); }
.ivl-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.slot-row { display: flex; flex-wrap: wrap; gap: 2px; }
button.slot { cursor: pointer; font: inherit; font-size: 12.5px; color: var(--ink); flex-wrap: wrap; }
button.slot:hover { border-color: var(--brand); }
.slot.full { background: var(--surface-3); }
.slot-who { font-size: 11.5px; color: var(--brand); font-weight: 600; }
@media (max-width: 760px) {
  .cal-wrap { max-height: 70vh; min-height: 300px; }
  .cal-bar .cal-nav { flex-wrap: wrap; }
  .cal-label { white-space: normal; flex-basis: 100%; }
  .ivl-row { flex-wrap: wrap; }
  .ivl-time { width: 56px; }
  .ivl-actions { width: 100%; justify-content: flex-start; }
}

/* inbox: conversation list and thread */
.ib { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ib-list, .ib-thread { display: flex; flex-direction: column; max-height: calc(100vh - 210px); min-height: 440px; overflow: hidden; }
.ib-folders { margin: 0; padding: 0 6px; flex: none; }
.ib-tools { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; flex: none; }
.ib-tools input[type=search] { width: 100%; }
.ib-tools select { padding: 5px 8px; font-size: 12.5px; max-width: 170px; }
.chip-btn { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 4px; padding: 3px 10px; font: 600 12px var(--font); cursor: pointer; }
.chip-btn.on { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.ib-items { overflow-y: auto; flex: 1; min-height: 0; }
.ib-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ib-item:hover { background: var(--surface-2); text-decoration: none; }
.ib-item.on { background: var(--brand-soft); }
.ib-item.unread b { font-weight: 700; }
.ib-item.unread .ib-prev { color: var(--ink); font-weight: 600; }
.ib-prev { color: var(--muted); }
.ib-prev svg { margin-right: 4px; }
.ib-badge { background: var(--brand); color: var(--brand-ink); border-radius: 4px; font-size: 11px; font-weight: 700; padding: 0 6px; margin-left: 6px; line-height: 17px; }
.ib-more { padding: 8px 12px; text-align: center; flex: none; border-top: 1px solid var(--line); }
.ib-more:empty { display: none; }
.ib-empty { padding: 30px 16px; display: grid; place-items: center; flex: 1; }
.ib-head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex: none; }
.ib-back { display: none; flex: none; }
.ib-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex: none; }
.ib-status .chip { white-space: normal; }
.ib-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.msg-b { max-width: min(560px, 88%); align-self: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface-2); }
.msg-b.out { align-self: flex-end; background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.msg-b-meta { font-size: 11px; color: var(--muted); display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.msg-b-subj { font-weight: 650; margin-bottom: 2px; }
.msg-b-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.msg-b-body.clamp { max-height: 12em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.msg-b-status { font-size: 11px; color: var(--muted); margin-top: 4px; }
.msg-b-status.bad { color: var(--bad); }
.msg-b-warn { margin-top: 6px; font-size: 12px; color: var(--warn); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ib-compose { border-top: 1px solid var(--line); padding: 10px 14px 12px; flex: none; background: var(--surface); }
.ib-compose .seg { margin-bottom: 8px; }
.ib-compose textarea { min-height: 64px; }
.ib-send { margin-top: 6px; gap: 8px; }
.ib-why { padding: 6px 0; display: flex; gap: 6px; align-items: flex-start; }
.ib-batches { margin-bottom: 14px; }
.ib-batches summary { cursor: pointer; }
.ib-batch { padding: 8px 0; border-top: 1px solid var(--line); gap: 6px; flex-wrap: wrap; }
.mt-fill { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) {
  .ib { grid-template-columns: 1fr; }
  .ib.open .ib-list { display: none; }
  .ib:not(.open) .ib-thread { display: none; }
  .ib-back { display: grid; }
  .ib-list { max-height: none; min-height: 0; }
  .ib-thread { max-height: none; height: calc(100dvh - 150px); min-height: 420px; }
  .ib-hide-sm { display: none; }
  .ib-head { padding: 10px 12px; }
  .ib-msgs { padding: 12px; }
}

/* ---- Phone layout safety net: a title keeps room before the buttons beside it wrap below, and wide plain tables
   (4+ columns, not the ones that turn into cards on phones) scroll inside their frame instead of squeezing every cell. */
.card-head > h2 { flex: 1 1 160px; }
.filters > .grow { flex: 1 1 220px; }
.filters > .grow:empty { flex: 1 1 0; }   /* a toolbar's empty spacer takes what's left, not a 220px start (a .grow title keeps its start) */
/* a row of filter buttons wider than a phone scrolls inside itself instead of widening the page */
.filters > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.filters > .seg > button { flex: none; }
@media (max-width: 640px) {
  .table-wrap > table.t:not(.stack-sm):not(.people):not(.assign):has(tr > :nth-child(4)) { min-width: 540px; }
}

/* ---- Candidate chat in the Inbox (app/chat.py, views/inbox.js): chat bubbles get a thin brand edge, photos a candidate
   sent show inside the bubble, and "Seen" sits under our own chat messages. */
.msg-b.chat { border-left: 3px solid var(--brand); }
.msg-b.chat.out { border-left-width: 1px; border-right: 3px solid var(--brand); }
.ib-photo { display: block; max-width: min(320px, 100%); max-height: 320px; border-radius: var(--radius); margin: 4px 0; border: 1px solid var(--line); }

/* ================================================================ the ATS visual system (job orders, applicants, the job and applicant files)
   One language for the Recruiting area. Build screens from these classes; they use the tokens at the top, so dark mode follows.
   - Pills: <span class="pill good">Passed</span> (ui.js pill()). Tones: good, warn, bad, info, muted, accent; none = neutral.
   - Glyphs: 14px icons with a tooltip (ui.js glyph()). Tones: accent, good, bad, warn, gold, muted. .dot is the unviewed dot.
   - Record header: .hdr > .crumbs, .hdr-title (.hdr-id + h1 + pills), .facts > .fact (span label over b value), then .strip.
   - Counter strip: .strip > a.tile (b numeral over span label); .tile.on, .tile.zero, .tile.closed, .sep before the closed tiles.
   - Data grid: <table class="t grid"> with .g glyph cells, .num, .cell2 (b over small), tr.sel, tr.last, tr.muted-row.
   - Left facet rail: .with-rail > .rail + main. Applied filters: .chiprow > .fchip. Selection bar: .selbar on top of a grid. */

/* ---- pills: 11.5px/600, 2px 7px, 4px corners, a soft tint with darker text. One pill per concept. */
.pill { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font: 600 11.5px/16px var(--font); padding: 2px 7px; border-radius: 4px;
  background: var(--surface-3); color: var(--ink-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; font-variant-numeric: tabular-nums; }
.pill svg { width: 12px; height: 12px; flex: none; }
.pill.good { background: var(--good-soft); color: var(--good); box-shadow: none; }
.pill.warn { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.pill.bad { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.pill.info { background: var(--info-soft); color: var(--info); box-shadow: none; }
.pill.accent { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.pill.muted { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.solid { background: var(--brand-solid); color: #fff; box-shadow: none; }   /* rare: "+3 new" on a dark or busy row */
.pill.sm { font-size: 11px; line-height: 14px; padding: 1px 5px; }
a.pill:hover { text-decoration: none; filter: brightness(.97); }
.pills { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ---- glyphs: small stroke icons that carry meaning; color is never the only signal (each has a title) */
.glyph { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; color: var(--muted); vertical-align: middle; line-height: 1; }
.glyph svg { width: 14px; height: 14px; }
.glyph.accent { color: var(--brand); }
.glyph.good { color: var(--good); }
.glyph.bad { color: var(--bad); }
.glyph.warn { color: var(--warn); }
.glyph.gold { color: var(--gold); }
.glyph.muted { color: var(--faint); }
.glyph.info { color: var(--info); }
.glyph .glyph-n { position: absolute; right: -5px; bottom: -4px; min-width: 11px; height: 11px; padding: 0 2px; border-radius: 6px; background: var(--surface); color: inherit;
  font: 700 9px/11px var(--font); text-align: center; box-shadow: 0 0 0 1px currentColor; font-variant-numeric: tabular-nums; }
.glyphs { display: inline-flex; gap: 3px; align-items: center; }
/* "Prefers Spanish" is one glyph everywhere: glyph("es", "", "Prefers Spanish") from ui.js, the muted "ES" icon with its tooltip.
   There is no stand-alone .es tag style: class "es" means Spanish text (the phone screen's translated question, .ps-q .es). */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; vertical-align: middle; }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.good { background: var(--good); } .dot.muted { background: var(--line-2); }
/* Icon key popover rows (grid toolbars) */
.iconkey { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); padding: 4px 6px; }

/* ---- record header: white band, crumbs, ID + title + one status pill, a fact row, then the counter strip */
.hdr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.hdr .crumbs { margin-bottom: 4px; }
.hdr .crumbs .sep { margin: 0 5px; color: var(--muted); }   /* separators 3:1 or better, numbers and placeholders 4.5:1, in both themes */
.hdr-top { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.hdr-top > .grow { flex: 1 1 320px; }
.hdr-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.hdr-title { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; min-width: 0; margin: 0; font: 600 22px/1.25 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.hdr-title h1, .hdr-title .t { font: inherit; letter-spacing: inherit; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hdr-id { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.hdr-title .pill, .hdr-title .glyph { font-family: var(--font); letter-spacing: 0; }
.hdr-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hdr .facts { gap: 8px 28px; margin-top: 10px; }
.fact { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fact > span { font: 600 11px/1.35 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.fact > b { font: 600 13px/1.4 var(--font); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.fact > b a { color: inherit; } .fact > b a:hover { color: var(--brand); }
.fact .bar { display: block; width: 72px; height: 4px; margin-top: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.fact .bar > i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.fact .bar.full > i { background: var(--good); }

/* ---- counter strip: flat tiles with hairline separators; numbers in the accent, the active one underlined */
.strip { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px;
  overflow-x: auto; scrollbar-width: thin; }
.strip .tile { flex: 1 0 auto; min-width: 84px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 14px 6px;
  border-left: 1px solid var(--hair); border-bottom: 2px solid transparent; color: inherit; text-decoration: none; background: none; font: inherit; text-align: left; cursor: pointer; }
.strip .tile:first-child, .strip .sep + .tile { border-left: 0; }
.strip .tile b { font: 600 22px/1.1 var(--font-display); color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.strip .tile span { font: 600 11px/1.3 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.strip .tile small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.strip .tile:hover { background: var(--hover); text-decoration: none; }
.strip .tile.on { border-bottom-color: var(--brand); background: var(--brand-soft); }
.strip .tile.on span { color: var(--ink); }
.strip .tile.zero b { color: var(--muted); }
.strip .tile.closed b { color: var(--muted); }
.strip .tile.warn b { color: var(--warn); }
.strip .sep { flex: 0 0 10px; background: var(--surface-2); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.hdr .strip { margin: 12px -16px -12px; border-width: 1px 0 0; border-radius: 0 0 var(--radius) var(--radius); }
.hdr .strip .tile:first-child { border-bottom-left-radius: var(--radius); }

/* ---- left facet rail + main (stacks under 900px; the rail folds behind a toggle there) */
.with-rail { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: start; }
.with-rail > .rail-main, .with-rail > main, .with-rail > section { min-width: 0; }
.rail { width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0 10px; font-size: 13px;
  position: sticky; top: 60px; max-height: calc(100vh - 72px); overflow-y: auto; scrollbar-width: thin; }
.with-rail > .rail { width: auto; }
.rail h4 { display: flex; align-items: center; gap: 6px; margin: 14px 14px 4px; font: 600 11px/1.3 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rail h4:first-child, .rail .rail-search + h4 { margin-top: 6px; }
.rail h4 button, .rail h4 a { margin-left: auto; border: 0; background: none; padding: 0; font: 500 11.5px var(--font); text-transform: none; letter-spacing: 0; color: var(--brand); cursor: pointer; }
.rail .rail-sec + .rail-sec { border-top: 1px solid var(--hair); margin-top: 8px; }
.rail label, .rail .rail-item { display: flex; align-items: center; gap: 8px; padding: 4px 14px; cursor: pointer; color: var(--ink-2); line-height: 1.3; min-width: 0; text-decoration: none; }
.rail label:hover, .rail .rail-item:hover { background: var(--hover); text-decoration: none; }
.rail label > span:not(.n), .rail .rail-item > span:not(.n) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail label .n, .rail .rail-item .n { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.rail label.zero, .rail .rail-item.zero { color: var(--muted); }
.rail label.on, .rail .rail-item.on { color: var(--ink); font-weight: 600; }
.rail label.on .n { color: var(--brand); }
.rail .rail-item.on { background: var(--brand-soft); box-shadow: inset 2px 0 0 var(--brand); }
.rail input[type=checkbox], .rail input[type=radio] { width: 14px; height: 14px; margin: 0; flex: none; }
.rail .rail-search { display: block; width: calc(100% - 24px); margin: 2px 12px 6px; padding: 6px 8px; font-size: 13px; }
.rail .rail-grp { display: flex; align-items: center; gap: 8px; padding: 6px 14px 2px; font-weight: 600; color: var(--ink); font-size: 12.5px; }
.rail .rail-grp .n { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 12px; font-variant-numeric: tabular-nums; }
.rail .rail-more { display: block; padding: 2px 14px; font-size: 12px; color: var(--brand); background: none; border: 0; cursor: pointer; font-family: inherit; }
.rail-toggle { display: none; }
@media (max-width: 900px) {
  .with-rail { grid-template-columns: minmax(0, 1fr); }
  .rail, .with-rail > .rail { position: static; width: auto; max-height: none; }
  .rail-toggle { display: inline-flex; }
  .rail.folded > :not(.rail-head) { display: none; }
}

/* ---- applied filters and the selection bar */
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; min-height: 0; }
.chiprow:empty { display: none; }
.chiprow .fchip b { font-weight: 600; color: var(--ink-2); margin-right: 3px; }
.chiprow .clear { border: 0; background: none; padding: 0 4px; font: 500 12px var(--font); color: var(--brand); cursor: pointer; }
.selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; padding: 5px 10px; background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; font-size: 13px; }
.selbar + * { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.selbar .sel-n { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.selbar .sel-why { color: var(--muted); }
.selbar .sel-why.warn { color: var(--warn); }
.selbar .btn { padding: 5px 10px; font-size: 12.5px; }
.selbar .spacer { flex: 1; }
/* .selbar.over takes the place of a table's header row while rows are selected: put a .selbar-slot first in the table's card and the
   bar inside it. It is the header row's height, 32px (--selbar-h, the same as table.grid th), on every list: the grids, the Board and
   Candidates; a page whose header is taller sets --sel-h to it. So no row moves under the cursor, and the slot is sticky, so the bar
   stays under the top bar while the list scrolls. The page makes the covered header row inert (no Tab stops under the bar).
   The plain .selbar (no .over) keeps its own 40px size for bars that sit above a list instead of over it.
   Below 900px (the page scrolls there, so a header-sized bar would scroll away) it docks at the bottom of the screen instead. */
:root { --selbar-h: 32px; }
.selbar-slot { position: sticky; top: 48px; z-index: 6; height: 0; }
.selbar.over { position: absolute; top: 0; left: 0; right: 0; height: var(--sel-h, var(--selbar-h)); min-height: 0; padding: 0 8px 0 8px; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; white-space: nowrap; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line-2));
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; box-shadow: 0 2px 6px rgba(16,24,40,.06); font-size: 12.5px; }
.selbar.over .btn { height: 24px; padding: 0 8px; gap: 5px; flex: none; font-size: 12px; }
.selbar.over .btn svg { width: 13px; height: 13px; }
.selbar.over .icon-btn { width: 24px; height: 24px; flex: none; }
.selbar.over > input[type=checkbox] { margin: 0 2px 0 0; flex: none; }
.selbar .sel-all { border: 0; background: none; padding: 0; font: 600 12.5px var(--font); color: var(--brand); cursor: pointer; white-space: nowrap; }
.selbar .sel-all:hover { text-decoration: underline; }
@media (max-width: 899px) {
  .selbar-slot { position: fixed; top: auto; left: 10px; right: 10px; bottom: 10px; height: auto; z-index: 40; }
  .selbar.over { position: static; height: auto !important; min-height: 40px; padding: 6px 10px; flex-wrap: wrap; overflow: visible; white-space: normal;
    border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line-2)); border-radius: var(--radius); box-shadow: var(--shadow-2); }
  .selbar.over .btn { height: auto; padding: 5px 9px; }
}
@media print { .selbar-slot { display: none; } }

/* ---- the data grid: 13px rows of ~34px, a sticky header on the header band, hairline rows */
table.grid { display: table; gap: 0; width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; color: var(--ink); background: var(--surface); }
table.grid th { height: 32px; padding: 0 10px; background: var(--surface-3); color: var(--ink-2); font: 600 11.5px/1.2 var(--font); text-transform: none; letter-spacing: 0;
  border-bottom: 1px solid var(--line-2); position: sticky; top: 0; z-index: 2; white-space: nowrap; text-align: left; vertical-align: middle; }
table.grid th.sortable:hover { color: var(--ink); }
table.grid th .arrow, table.grid th .sort-n { color: var(--brand); font-size: 10px; font-weight: 700; margin-left: 2px; }
table.grid td { height: 34px; padding: 2px 10px; border-bottom: 1px solid var(--hair); vertical-align: middle; line-height: 1.3; }
table.grid tbody tr:last-child td { border-bottom: 1px solid var(--hair); }
table.grid tbody tr:hover td { background: var(--hover); }
table.grid tr.sel td, table.grid tbody tr.sel:hover td { background: var(--brand-soft); }
table.grid tr.sel > td:first-child { box-shadow: inset 2px 0 0 var(--brand); }
table.grid tr.last > td:first-child { box-shadow: inset 2px 0 0 color-mix(in srgb, var(--warn) 60%, transparent); }   /* the row you last opened */
table.grid tr.click, table.grid tr[data-open] { cursor: pointer; }
table.grid tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
table.grid .num, table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.g, table.grid th.g { width: 22px; min-width: 22px; padding: 0 1px; text-align: center; }
table.grid td.g:first-child, table.grid th.g:first-child { padding-left: 6px; }
table.grid td.sel-cell, table.grid th.sel-cell { width: 30px; padding: 0 4px 0 10px; }
table.grid td.sel-cell input { opacity: 0; transition: opacity .1s; }
table.grid tr:hover td.sel-cell input, table.grid tr.sel td.sel-cell input, table.grid td.sel-cell input:checked, table.grid td.sel-cell input:focus-visible,
table.grid.selecting td.sel-cell input { opacity: 1; }
/* Touch screens have no hover: row checkboxes always show, and a finger gets a bigger box and cell to hit. */
@media (hover: none) {
  table.grid td.sel-cell input { opacity: 1; }
  .kcard .k-sel { opacity: 1; }
}
@media (pointer: coarse) {
  table.grid td.sel-cell, table.grid th.sel-cell { width: 44px; padding: 0 6px 0 12px; }
  table.grid td.sel-cell input, table.grid th.sel-cell input, table.t td > input[type=checkbox], table.t th > input[type=checkbox],
  .selbar > input[type=checkbox], .kcard .k-sel { width: 20px; height: 20px; }
}
table.grid td.clip { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.grid a.name, table.grid .name { font-weight: 600; color: var(--ink); }
table.grid a.name:hover { color: var(--brand); }
table.grid a.count, table.grid .count-link { color: var(--brand); font-weight: 600; font-variant-numeric: tabular-nums; }
table.grid .zero, .unset { color: var(--muted); }   /* a zero count, "–" or "Not set" is still data: muted ink, never faint */
table.grid .late { color: var(--warn); font-weight: 600; } table.grid .later { color: var(--bad); font-weight: 600; }
table.grid tr.group-row td, table.grid tr.band td { height: 30px; background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; }
table.grid tr.group-row td .n, table.grid tr.band td .n { color: var(--muted); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
table.grid.compact td { height: 30px; padding-top: 1px; padding-bottom: 1px; }
table.grid.compact .cell2 small { display: none; }
table.grid .flow-dd { min-height: 24px; padding: 2px 7px; font-size: 12px; }
/* Knockouts (missed a must-have) read in muted ink, never faded: the text stays readable (4.5:1 or better) and a td.keep cell (the
   must-have reason, a job title) keeps full strength. Pills, grades, glyphs and red/amber second lines keep their own colors. */
table.grid tr.muted-row td:not(.keep) { color: var(--muted); }
table.grid tr.muted-row td:not(.keep) a.name, table.grid tr.muted-row td:not(.keep) .name, table.grid tr.muted-row td:not(.keep) .cell2 b,
table.grid tr.muted-row td:not(.keep) .cell2 > a:first-child { color: var(--ink-2); font-weight: 500; }
/* stacked two-line cell: Step over Status, Name over phone */
.cell2 { display: flex; flex-direction: column; justify-content: center; min-width: 0; max-width: 100%; }
.cell2 b, .cell2 > a:first-child { font-size: 13px; font-weight: 600; line-height: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell2 > a:first-child:hover { color: var(--brand); }
.cell2 small { font-size: 12px; line-height: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cell2 small.bad { color: var(--bad); } .cell2 small.warn { color: var(--warn); } .cell2 small.good { color: var(--good); }
.muted-row { color: var(--muted); }   /* by ink color, not opacity (opacity drops small text below readable contrast) */
.grid-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.grid-foot .grow { flex: 1; }
.grid-empty { padding: 18px 12px; color: var(--muted); font-size: 13px; text-align: center; }

/* "→ Interview" next-step button inside a grid row */
.next-btn { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 7px; border: 1px solid transparent; border-radius: 4px; background: none;
  font: 600 12px/1.4 var(--font); color: var(--brand); cursor: pointer; white-space: nowrap; }
.next-btn:hover { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.next-btn svg { width: 13px; height: 13px; }

@media (max-width: 640px) {
  .hdr { padding: 12px; }
  .hdr .strip { margin: 12px -12px -12px; }
  .hdr-title { font-size: 19px; }
  .hdr .facts { gap: 8px 18px; }
  .strip .tile { min-width: 72px; padding: 7px 10px 5px; }
  .strip .tile b { font-size: 19px; }
  .strip { scrollbar-width: none; }   /* swipe sideways; no bar that reads like an underline */
}

/* Notes at the top of a person's profile (owner, Nov 19 2026): the newest notes, cut to 3 lines, and a one-line box to add one */
.cp-notes .card-head h2 { display: flex; align-items: center; gap: 6px; }
.cp-notes .card-head h2 svg { width: 16px; height: 16px; color: var(--muted); }
.cp-notes .card-body { display: flex; flex-direction: column; gap: 10px; }
.cp-note { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cp-note-body { white-space: pre-wrap; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cp-note-add { gap: 8px; align-items: flex-start; }
.cp-note-add textarea { flex: 1; min-height: 34px; resize: vertical; }
/* The lists' Note column: the first words of the newest note; pointing at it shows all of it */
table.grid td.notec .note-cell { cursor: help; }
