/* The stylesheet of payroll's base template (copied 2026-12-02), so the office sees one family.
   Kept: the tokens, the shell (top bar, sidebar), type, status tones, cards, tables, buttons,
   forms and the sign-in card. Left out: payroll's own pieces (view-as bar, month picker, home
   figures, pay-type tabs, sortable-table cues). Token values follow the Zeus design system
   (repo-aligned v2): ink, canvas, hairlines, brand blue, status tones, radii, type scale. Cards
   stay flat. Fonts are the system's: no font is loaded from another site. No inline style
   anywhere: the Content-Security-Policy refuses it. */
:root {
  /* brand */
  --zeus-50: #ebf3fb; --zeus-600: #0a60ac; --zeus-700: #084e8c;
  /* surfaces */
  --canvas: #f1f5f9; --surface: #ffffff; --surface-sunken: #f8fafc; --surface-band: #f6f8fa;
  --surface-track: #eef1f4; --surface-selected: #edf5fd;
  /* ink */
  --ink-primary: #0f172a; --ink-secondary: #3d5165; --ink-muted: #607087; --ink-faint: #93a7bd;
  /* lines */
  --line-subtle: #e2e8f0; --line-faint: #edf1f5; --line-control: #cbd5e1; --line-table: #dee5ee;
  --line-hover: #cfdae6; --line-selected: #6ca9de;
  /* action */
  --link: var(--zeus-600); --link-hover: var(--zeus-700); --focus-ring: var(--zeus-600); --focus-ring-dark: #7cc0ff;
  /* status tones: fill / ink / border / dot */
  --tone-info-fill: #ebf3fb; --tone-info-ink: #0a60ac; --tone-info-border: #c7dcf1; --tone-info-dot: #0a60ac;
  --tone-success-fill: #e7f6ee; --tone-success-ink: #146c3c; --tone-success-border: #bbe6cd; --tone-success-dot: #1a7f47;
  --tone-warning-fill: #fdf1e3; --tone-warning-ink: #8f4d0c; --tone-warning-border: #f6d9b0; --tone-warning-dot: #b26c09;
  --tone-critical-fill: #fcebea; --tone-critical-ink: #a5322a; --tone-critical-border: #f3c2bd; --tone-critical-dot: #c0392b;
  --tone-neutral-fill: #eef2f6; --tone-neutral-ink: #5d7085; --tone-neutral-border: #e2e8f0; --tone-neutral-dot: #8595a6;
  /* dark shell (top bar) */
  --shell-bg: #0c1a28; --shell-line: #16293c; --shell-active-bg: #12283c; --shell-active-edge: #4f9fe0;
  --shell-hover-bg: rgba(255, 255, 255, 0.06); --shell-ink-title: #eef4fa; --shell-ink-body: #cfe6fb;
  --shell-ink-label: #7d93a9; --shell-ink-hover: #e8f0f7; --shell-home-ink: #7fb3e0;
  /* type */
  --font-sans: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, monospace;
  /* shape + space */
  --radius-chip: 6px; --radius-button: 8px; --radius-card: 10px; --radius-pill: 9999px;
  --gutter-page: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink-primary); font: 400 13px/19px var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
button, input, textarea, select { font-family: inherit; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---- shell: dark top bar, brand mark, nav ---- */
.topbar { background: var(--shell-bg); border-bottom: 1px solid var(--shell-line); padding: 0 var(--gutter-page); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 52px; }
.topbar :where(a, button):focus-visible { outline-color: var(--focus-ring-dark); }
.brand { display: inline-flex; align-items: center; gap: 9px; margin-right: 12px; padding: 9px 0; color: var(--shell-ink-title); font-size: 14px; font-weight: 700; }
.brand:hover { color: #ffffff; }
.mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-button); background: var(--zeus-600); color: #ffffff; font: 700 15px/1 var(--font-sans); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.nav a { padding: 6px 10px; border-radius: var(--radius-button); color: var(--shell-ink-body); font-size: 13px; font-weight: 500; transition: background 110ms ease, color 110ms ease; }
.nav a:hover { background: var(--shell-hover-bg); color: var(--shell-ink-hover); }
.nav a[aria-current="page"] { background: var(--shell-active-bg); color: var(--shell-ink-title); box-shadow: inset 0 -2px 0 var(--shell-active-edge); }
.who { margin-left: auto; padding: 6px 0; color: var(--shell-ink-label); font-size: 12px; }
.who a { color: var(--shell-home-ink); }
.who a:hover { color: var(--shell-ink-hover); }
/* Sign-out is a POST form; its button reads like payroll's sign-out link. */
.signout { display: inline; margin: 0; }
.signout button { margin: 0; padding: 0; background: none; border: 0; color: var(--shell-home-ink); font: inherit; cursor: pointer; }
.signout button:hover { color: var(--shell-ink-hover); }

/* ---- shell for people with many links: the same dark shell as a left sidebar. Everyone else
   keeps the top bar. Below 861px it folds into a bar with a Menu button. ---- */
body.has-sidebar { display: grid; grid-template-columns: 208px minmax(0, 1fr); align-items: start; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; overflow-y: auto; padding: 4px 10px 12px; background: var(--shell-bg); border-right: 1px solid var(--shell-line); }
.sidebar :where(a, button):focus-visible { outline-color: var(--focus-ring-dark); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.sidenav { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.sidenav .nav { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 1px; }
.sidenav .nav a { display: block; padding: 5px 10px; }
.sidenav .nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--shell-active-edge); }
.page { min-width: 0; }
.sidebar .who { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: auto 0 0; padding: 12px 10px 0; border-top: 1px solid var(--shell-line); }
.sidebar .who strong { color: var(--shell-ink-title); font-size: 13px; font-weight: 600; }
.navtoggle { display: none; }
.navtoggle-btn { display: none; padding: 6px 12px; border: 1px solid var(--shell-line); border-radius: var(--radius-button); color: var(--shell-ink-body); font-size: 13px; font-weight: 500; cursor: pointer; }
.navtoggle:focus-visible ~ .side-head .navtoggle-btn { outline: 2px solid var(--focus-ring-dark); outline-offset: 2px; }
@media (max-width: 860px) {
  body.has-sidebar { display: block; }
  .sidebar { position: static; height: auto; padding: 4px 12px; border-right: 0; border-bottom: 1px solid var(--shell-line); }
  .navtoggle { display: block; position: absolute; opacity: 0; pointer-events: none; }
  .navtoggle-btn { display: inline-flex; }
  .sidenav { display: none; padding-bottom: 10px; }
  .navtoggle:checked ~ .sidenav { display: flex; }
  .sidebar .who { margin-top: 12px; }
}

main { width: 100%; padding: var(--gutter-page); }

/* ---- page header + type ---- */
h1 { margin: 0 0 12px; font: 700 21px/28px var(--font-sans); letter-spacing: -0.011em; }
h2 { margin: 22px 0 10px; font: 700 14px/20px var(--font-sans); }
h3 { margin: 14px 0 6px; font: 700 13px/19px var(--font-sans); }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.page-head { margin: 0 0 16px; }
.page-head h1 { margin: 0; }
.lede { margin: 4px 0 0; max-width: 76ch; color: var(--ink-muted); font-size: 12.5px; line-height: 18px; }
.crumb { margin: 0 0 10px; font-size: 12px; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-muted); }
.flag { color: var(--tone-critical-ink); font-weight: 600; }
.error { color: var(--tone-critical-ink); }
.mono { font-family: var(--font-mono); font-size: 12px; }
.eyebrow { font: 700 10px/14px var(--font-sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); }

/* ---- status tones: badge (dot + word) and notice (tinted band) ---- */
.tone-info, .badge-info, .notice-info { --t-fill: var(--tone-info-fill); --t-ink: var(--tone-info-ink); --t-border: var(--tone-info-border); --t-dot: var(--tone-info-dot); }
.tone-success, .badge-success, .notice-success { --t-fill: var(--tone-success-fill); --t-ink: var(--tone-success-ink); --t-border: var(--tone-success-border); --t-dot: var(--tone-success-dot); }
.tone-warning, .badge-warning, .notice-warning { --t-fill: var(--tone-warning-fill); --t-ink: var(--tone-warning-ink); --t-border: var(--tone-warning-border); --t-dot: var(--tone-warning-dot); }
.tone-critical, .badge-critical, .notice-critical { --t-fill: var(--tone-critical-fill); --t-ink: var(--tone-critical-ink); --t-border: var(--tone-critical-border); --t-dot: var(--tone-critical-dot); }
.tone-neutral, .badge-neutral, .notice-neutral { --t-fill: var(--tone-neutral-fill); --t-ink: var(--tone-neutral-ink); --t-border: var(--tone-neutral-border); --t-dot: var(--tone-neutral-dot); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border: 1px solid var(--t-border, var(--tone-neutral-border)); border-radius: var(--radius-pill); background: var(--t-fill, var(--tone-neutral-fill)); color: var(--t-ink, var(--tone-neutral-ink)); font: 500 11px/15px var(--font-sans); white-space: nowrap; vertical-align: middle; }
.badge::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--t-dot, var(--tone-neutral-dot)); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.notice { display: block; margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--t-border); border-radius: var(--radius-button); background: var(--t-fill); color: var(--t-ink); font-size: 12.5px; font-weight: 500; line-height: 18px; }

/* ---- cards: flat, hairline border, no shadow ---- */
.card { margin: 14px 0; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line-subtle); border-radius: var(--radius-card); }
.card.scroll { padding: 0; }
.card > :last-child { margin-bottom: 0; }
details.card summary { cursor: pointer; font-weight: 600; }

/* ---- tables ---- */
.scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line-subtle); border-radius: var(--radius-card); }
.card .scroll { margin: 8px 0; }
:where(main table) { width: 100%; border-collapse: collapse; font-size: 13px; }
:where(main table).fit { width: auto; }
:where(main table) th { padding: 9px 12px; background: var(--surface-band); border-bottom: 1px solid var(--line-table); color: var(--ink-muted); font: 700 10px/14px var(--font-sans); letter-spacing: 0.07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
:where(main table) td { padding: 8px 12px; border-bottom: 1px solid var(--line-faint); vertical-align: top; }
:where(main table) tbody tr:last-child td, :where(main table) tbody tr:last-child th { border-bottom: 0; }
:where(main table) tbody tr:hover td { background: var(--surface-selected); }
:where(main table) tbody th { width: 14rem; background: var(--surface-sunken); border-bottom: 1px solid var(--line-faint); color: var(--ink-secondary); font: 600 12px/17px var(--font-sans); letter-spacing: 0; text-transform: none; white-space: normal; }
:where(main table) tfoot th, :where(main table) tfoot td { border-top: 1px solid var(--line-table); border-bottom: 0; background: var(--surface-band); color: var(--ink-primary); font: 700 13px/19px var(--font-sans); letter-spacing: 0; text-transform: none; }
th.num { text-align: right; }
td.num { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
tfoot th.num { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
td form { margin: 0; }

/* ---- buttons: primary blue, secondary white ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 1px solid var(--zeus-600); border-radius: var(--radius-button); background: var(--zeus-600); color: #ffffff; font: 500 13px/1 var(--font-sans); white-space: nowrap; cursor: pointer; transition: background 110ms ease, border-color 110ms ease, color 110ms ease; }
.btn:hover { background: var(--zeus-700); border-color: var(--zeus-700); color: #ffffff; }
.btn-secondary { background: var(--surface); border-color: var(--line-control); color: var(--ink-secondary); }
.btn-secondary:hover { background: var(--surface-sunken); border-color: var(--line-hover); color: var(--ink-primary); }
.btn-sm { min-height: 26px; padding: 0 10px; border-radius: var(--radius-chip); font-size: 12px; }
.btn:disabled, .btn:disabled:hover { background: var(--surface-track); border-color: var(--line-subtle); color: #7f96ac; cursor: not-allowed; }

/* ---- forms ---- */
label { color: var(--ink-secondary); font-size: 12.5px; font-weight: 500; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]), select, textarea { min-height: 32px; max-width: 100%; padding: 5px 10px; background: var(--surface); border: 1px solid var(--line-control); border-radius: var(--radius-button); color: var(--ink-primary); font: 400 13px/19px var(--font-sans); }
textarea { padding: 8px 10px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):focus, select:focus, textarea:focus { border-color: var(--zeus-600); outline: 2px solid var(--focus-ring); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: 15px; height: 15px; margin: 0 6px 0 0; accent-color: var(--zeus-600); vertical-align: -3px; }
input[type=file] { max-width: 100%; font-size: 12px; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-track); border-color: var(--line-subtle); color: #7f96ac; cursor: not-allowed; }
label > input:not([type=checkbox]):not([type=radio]), label > select { margin-left: 6px; }
.fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.fields > label, .filters > label { display: inline-flex; align-items: center; gap: 6px; }
.fields > label > input:not([type=checkbox]):not([type=radio]), .fields > label > select, .filters > label > input:not([type=checkbox]):not([type=radio]), .filters > label > select { margin-left: 0; }
.fields > p, .filters > p { margin: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; padding: 9px 12px; background: var(--surface-band); border: 1px solid var(--line-subtle); border-radius: var(--radius-card); }
.stack-form p { margin: 0 0 12px; }
.stack-form label { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.stack-form label > input:not([type=checkbox]):not([type=radio]), .stack-form label > select { margin-left: 0; }
fieldset.bare { min-width: 0; margin: 0; padding: 0; border: 0; }
ul.plain { margin: 0; padding: 0; list-style: none; }
ul.plain li { padding: 4px 0; }

/* ---- the screen kit (U8-0; app/templates/kit/macros.html, dev_guide_ui.md §19) ---- */
/* A label read by screen readers only (a row's field in a table, whose column says what it is). */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.field { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0 0 12px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; margin: 0; }
.inline-form .field { margin: 0; }
.inline-form .notice { flex-basis: 100%; margin: 0; }
.field-refusal { max-width: 40ch; color: var(--tone-critical-ink); font-size: 12px; font-weight: 500; line-height: 16px; }
input[aria-invalid="true"]:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]), select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--tone-critical-dot); }
/* Money is typed as text (never type=number) and right-aligned in figures of one width. */
input.money:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]) { width: 10rem; font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
/* Confirm, then submit: the question and the real button open under the action's name. */
details.confirm { display: inline-block; margin: 0 0 12px; vertical-align: top; }
details.confirm > summary { list-style: none; }
details.confirm > summary::-webkit-details-marker { display: none; }
details.confirm[open] > summary { background: var(--surface-sunken); border-color: var(--line-hover); }
.confirm-panel { max-width: 60ch; margin: 8px 0 0; padding: 10px 12px; background: var(--tone-warning-fill); border: 1px solid var(--tone-warning-border); border-radius: var(--radius-card); }
.confirm-panel > p { color: var(--ink-primary); }
.month-switcher { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
:where(main table) caption { padding: 9px 12px; caption-side: top; color: var(--ink-primary); font: 700 13px/19px var(--font-sans); text-align: left; }
.empty { margin: 14px 0; padding: 18px 16px; background: var(--surface); border: 1px dashed var(--line-control); border-radius: var(--radius-card); color: var(--ink-muted); text-align: center; }

/* ---- HTMX's request indicator: HTMX 2.0.4's own rules, here because the base template switches
   off the inline <style> HTMX would add (the Content-Security-Policy refuses inline styles) ---- */
.htmx-indicator { opacity: 0; }
.htmx-request .htmx-indicator { opacity: 1; transition: opacity 200ms ease-in; }
.htmx-request.htmx-indicator { opacity: 1; transition: opacity 200ms ease-in; }

/* ---- sign-in and the other one-card pages ---- */
.signin { max-width: 400px; margin: 4rem auto; padding: 24px; text-align: center; }
.signin .mark { width: 40px; height: 40px; margin: 0 0 12px; border-radius: 10px; font-size: 20px; }
.signin h1 { margin: 0 0 14px; }

@media (max-width: 720px) {
  main { padding: 14px 12px; }
  .topbar { padding: 4px 12px; }
  .who { width: 100%; margin-left: 0; padding: 2px 0 8px; }
  h1 { font-size: 19px; line-height: 26px; }
  .card { padding: 12px; }
  .filters { align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
