/* EnergyTime — app styles. Mobile-first. Light/dark follows the device
   (prefers-color-scheme) until the user picks a theme with the toggle, which
   sets data-theme="light"|"dark" on <html> (persisted in localStorage et_theme
   and applied pre-paint by the inline snippet in index.html). */

/* Energy Dance Company brand palette (sampled from the official mark):
   magenta #EC008C · cyan #00AEEF · green #8CC63F on black/white. */
:root {
  /* The studio's own "e", used as the E in the EnergyTime wordmark. Two
     files, one artwork: dark ink for a light page, light ink for a dark one.
     Token, not a media query on the element, so it follows the same
     defined-twice rule as every other colour here. (2026-09-03) */
  --brand-e: url('/img/brand-e.png');
  --accent-1: #ec008c;
  --accent-2: #00aeef;
  --accent-3: #8cc63f;
  --grad: linear-gradient(120deg, #ec008c, #b8006d);
  --stripes: linear-gradient(120deg, var(--accent-2) 0 33.4%,
             var(--accent-1) 33.4% 66.7%, var(--accent-3) 66.7% 100%);
  --accent: #ec008c;

  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f1f1f4;
  --text: #131316;
  --muted: #67676f;
  --border: #e5e5e9;
  --border-strong: #cfcfd6;

  --danger: #cb2f2f;
  --danger-bg: #fdecec;
  --ok: #5c9427;
  --ok-bg: #eef7e0;
  --warn: #a05f0a;
  --warn-bg: #fdf3e2;
  --info-bg: #e5f5fd;

  --radius: 14px;
  --radius-sm: 9px;

  /* Layout rails: staff pages stay narrow and readable, the admin payroll
     grid opts into the wide rail via .main-wide. */
  --main-max: 1180px;
  --topbar-h: 56px;
  --bottomnav-h: 56px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(10, 10, 14, .06), 0 8px 24px rgba(10, 10, 14, .07);
  --shadow-pop: 0 4px 12px rgba(10, 10, 14, .14), 0 16px 48px rgba(10, 10, 14, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  /* Display face for Reflections. Fraunces is loaded from Google Fonts in
     index.html with font-display:swap, so a slow or blocked font request costs
     the serif fallback and nothing else. It is the ONLY thing this app fetches
     from a third party — added 2026-09-02 for the reflections screen the owner
     approved, and used nowhere in the payroll path. */
  --display: "Fraunces", Georgia, "Times New Roman", serif;

  /* The brand colours as TEXT. #ec008c and #8cc63f are ink for a logo, not for
     small type on white — these are the same hues taken dark enough to read.
     Redefined lighter in both dark blocks below. */
  --ink-magenta: #9c005d;
  --ink-cyan: #00648a;
  --ink-green: #4e7220;
}

/* =====================================================================
   DARK TOKENS — DEFINED TWICE ON PURPOSE, EDIT BOTH BLOCKS TOGETHER.
   CSS cannot factor these out: the first block is "system dark unless the
   user forced light", the second is "user forced dark". The token sets
   must stay IDENTICAL — any new/changed dark token goes in BOTH.
   ===================================================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-e: url('/img/brand-e-light.png');
    --bg: #0e0e11;
    --surface: #17171b;
    --surface-2: #202026;
    --text: #f2f2f4;
    --muted: #9b9ba4;
    --border: #2a2a31;
    --border-strong: #3f3f49;
    --danger: #f07575;
    --danger-bg: #3a1d1f;
    --ok: #8cc63f;
    --ok-bg: #1c290f;
    --warn: #ecb45e;
    --warn-bg: #38290f;
    --info-bg: #0f2430;
    --ink-magenta: #ff7ac2;
    --ink-cyan: #5ecdf5;
    --ink-green: #a9dc66;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-pop: 0 4px 16px rgba(0, 0, 0, .5), 0 24px 64px rgba(0, 0, 0, .5);
  }
}
/* Identical twin of the block above — see the loud comment there. */
:root[data-theme="dark"] {
  --brand-e: url('/img/brand-e-light.png');
  --bg: #0e0e11;
  --surface: #17171b;
  --surface-2: #202026;
  --text: #f2f2f4;
  --muted: #9b9ba4;
  --border: #2a2a31;
  --border-strong: #3f3f49;
  --danger: #f07575;
  --danger-bg: #3a1d1f;
  --ok: #8cc63f;
  --ok-bg: #1c290f;
  --warn: #ecb45e;
  --warn-bg: #38290f;
  --info-bg: #0f2430;
  --ink-magenta: #ff7ac2;
  --ink-cyan: #5ecdf5;
  --ink-green: #a9dc66;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, .5), 0 24px 64px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.55rem; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent-2); }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex: none; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.spacer { flex: 1; }

/* ---------- Shell ---------- */

.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--stripes);
}

/* THE WORDMARK. The mark is not a badge beside the name any more — it IS the
   E, which is what it is in the studio's own logo, where "energy" is set with
   this exact letterform. (2026-09-03)

   The artwork is 250x199 with the slash tail occupying the left 21% of the box,
   so the box is sized by HEIGHT and the tail is pulled back with a negative
   left margin — otherwise the whole lockup sits indented by a tail that reads
   as padding. The letters that follow tuck under the bowl's right edge. */
.brand { display: inline-flex; align-items: baseline; text-decoration: none; color: inherit; }
.brand-e {
  /* MEASURED FROM THE ARTWORK, NOT EYEBALLED. In brand-e.png (250x199) the "e"
     ring occupies y 28..169 — 71.4% of the box, with the slash tip 14.1% above
     it and the tail 14.6% below. So to set the ring to the x-height of whatever
     type it sits in:
        box height = 1ex / 0.7136 = 1.4014ex
        drop       = 1ex * 0.2042   (puts the ring's bottom ON the baseline)
        width      = box height * 1.2563  (the artwork's aspect)
     `ex` rather than `em` on purpose: the ring is a lowercase e and must match
     the x-height of the n, r, g and y beside it, in whatever font is resolved.
     Change --e-ring to make it deliberately larger or smaller than the type. */
  /* SIZED TO THE CAP HEIGHT, not the x-height: this glyph is standing in for
     the capital E of "EnergyTime", so it should match the T of "Time" rather
     than the n beside it. ~1.45ex is cap height in this face; 1.5 sits a
     hair above it, which is what stops a circle reading small next to
     flat-topped letters. Raised from 1.06ex on 2026-09-03 — at x-height the
     mark read as a small lowercase e rather than the leading letter.

     Past about 1.65ex the slash starts crowding the n and the mark stops
     being a letter, so this is the top of the usable range. One number to
     change if it should be bigger or smaller. */
  --e-ring: 1.5ex;
  display: inline-block;
  flex: none;
  height: calc(var(--e-ring) * 1.4014);
  width: calc(var(--e-ring) * 1.4014 * 1.2563);
  /* The slash tail is the left 21% of the box. Pulled back so the lockup starts
     at the letter and the tail leads into it, instead of the word looking
     indented by what reads as padding. */
  margin-left: calc(var(--e-ring) * 1.4014 * -0.21);
  margin-right: -0.03em;
  transform: translateY(calc(var(--e-ring) * 0.2042));
  background: var(--brand-e) center / contain no-repeat;
}
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-name .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* "Viewing as someone else" (superadmin, read-only). The bar and the header
   stick as one block: the header gives up its own sticky position to the stack,
   so the bar can wrap to two lines on a phone without anyone having to know its
   height. Only ever rendered while acting as somebody. */
.topstack { position: sticky; top: 0; z-index: 30; }
/* The bar above it already carries the notch inset — the header must not pay
   for it a second time. */
.topstack .topbar { position: static; padding-top: 10px; }

.acting-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top));
  background: var(--warn-bg); color: var(--warn);
  border-bottom: 1px solid var(--border);
  font-size: .86rem;
}
.acting-eye { display: inline-flex; }
.acting-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acting-sub { opacity: .85; }
.acting-bar .btn { margin-left: auto; }

.topnav { display: none; gap: 2px; margin-left: 8px; }
.topnav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem;
  padding: 7px 12px; border-radius: 999px;
}
.topnav a:hover { color: var(--text); background: var(--surface-2); }
.topnav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.user-box { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-name { font-size: .88rem; color: var(--muted); display: none; }

.main {
  flex: 1;
  width: 100%;
  max-width: var(--main-max);
  margin: 0 auto;
  padding: 18px var(--gutter) calc(var(--bottomnav-h) + 42px + env(safe-area-inset-bottom));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  min-width: 0;
}
/* The payroll grid earns the extra width; staff pages stay readable. */
.main-wide { --main-max: 1400px; }

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around; align-items: stretch;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 7px;
  min-height: 54px;
  text-decoration: none; color: var(--muted);
  font-size: .68rem; font-weight: 600;
}
.bottom-nav a[aria-current="page"] { color: var(--accent-2); }
.bottom-nav a[aria-current="page"] svg { color: var(--accent-2); }

@media (min-width: 900px) {
  .topnav { display: inline-flex; }
  .user-name { display: inline; }
  .bottom-nav { display: none; }
  .main { padding: 22px 24px 48px; }
  h1 { font-size: 1.8rem; }
}

/* NOTE: the phone touch-target overrides (.btn-sm, .icon-btn, .seg button …)
   used to live here, above the component rules they override — same specificity,
   so the later base rules won and phone buttons stayed at 34/38px. They now sit
   at the very END of this file, under "Phone touch targets". Keep them there. */

/* Admin tabs */
.tabs {
  display: flex; gap: 6px; margin: 0 0 16px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; text-decoration: none;
  padding: 8px 14px; border-radius: 999px;
  font-size: .88rem; font-weight: 600;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
}
.tabs a[aria-current="page"] {
  color: #fff; background: var(--grad); border-color: transparent;
}

/* ---------- Cards, buttons, chips ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card + .card { margin-top: 14px; }
.section { margin: 0 0 18px; }

.page-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.page-head h1 { margin: 0; }
.page-head .spacer { flex: 1 0 0; }

@media (max-width: 599px) {
  /* Phone: the page action becomes a full-width button under the title
     instead of a cramped chip fighting the heading for the same line. */
  .page-head { gap: 10px; }
  .page-head > .spacer { flex-basis: 100%; height: 0; }
  .page-head > .btn { flex: 1 1 160px; }
  .form-row > .btn { flex: 1 1 100%; }
  .toolbar { gap: 8px; }
  .toolbar > .seg { width: 100%; }
  .toolbar > .seg button { flex: 1; }
  .range-custom { width: 100%; }
  .range-custom .input { flex: 1 1 130px; width: auto; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 650; font-size: .94rem;
  cursor: pointer;
  text-decoration: none; color: inherit;
  transition: transform .06s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: var(--grad); color: #fff; border: none;
  box-shadow: 0 2px 10px rgba(160, 30, 160, .3);
}
.btn-primary:hover { background: var(--grad); filter: brightness(1.07); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); filter: brightness(1.08); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 34px; padding: 5px 11px; font-size: .85rem; border-radius: 8px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: none; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 650;
  background: var(--info-bg); color: var(--accent-2);
  white-space: nowrap;
}
.chip-neutral { background: var(--surface-2); color: var(--muted); }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-danger { background: var(--danger-bg); color: var(--danger); }

.badge {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--grad); color: #fff;
}

/* Segmented control */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2);
  border-radius: 999px;
}
.seg button {
  border: none; background: transparent; cursor: pointer;
  padding: 7px 14px; min-height: 38px;
  border-radius: 999px; font-size: .87rem; font-weight: 650; color: var(--muted);
}
.seg button[aria-pressed="true"] {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 4px rgba(10, 5, 25, .18);
}

/* ---------- Forms ---------- */

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: .84rem; font-weight: 650; margin-bottom: 5px; color: var(--text); }
.field-hint { display: block; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.field-error { display: block; font-size: .8rem; color: var(--danger); margin-top: 4px; font-weight: 600; }

.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.textarea { min-height: 74px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: 2px solid var(--accent-2); outline-offset: 0; border-color: transparent;
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: var(--danger);
}
.input-sm { min-height: 36px; padding: 5px 9px; }

/* Fields only pair up once there is room for two comfortable columns; below
   ~470px they stack full width. */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > .field { flex: 1 1 210px; margin-bottom: 12px; }
.form-row > .field-narrow { flex: 0 1 160px; }

.check {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; cursor: pointer; font-weight: 600; font-size: .92rem;
}
.check input { width: 20px; height: 20px; accent-color: var(--accent-2); }

/* Category chip picker — a real tap grid on phones, not a ragged chip pile. */
.cat-picker {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}
.cat-picker button {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 12px; min-height: 54px;
  font-size: .92rem; font-weight: 650; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-align: center;
  transition: transform .06s ease, border-color .12s ease;
}
.cat-picker button:hover { border-color: var(--accent-1); }
.cat-picker button:active { transform: scale(.985); }
.cat-picker button[aria-pressed="true"] {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 2px 10px rgba(236, 0, 140, .28);
}
@media (min-width: 900px) {
  .cat-picker { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .cat-picker button { min-height: 48px; }
}

/* Hours stepper: ±0.25 buttons around a big tabular number, plus quick picks. */
.stepper { display: flex; align-items: stretch; gap: 8px; }
.stepper button {
  flex: none; width: 54px; min-height: 54px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  border-radius: var(--radius); cursor: pointer;
  display: grid; place-items: center;
}
.stepper button:hover { background: var(--surface-2); border-color: var(--accent-2); }
.stepper button:disabled { opacity: .45; cursor: not-allowed; }
.stepper .input {
  flex: 1; min-width: 0; min-height: 54px;
  text-align: center; font-size: 1.3rem; font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.quick-hours { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-hours button {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; min-height: 36px;
  font-size: .84rem; font-weight: 700; cursor: pointer;
}
.quick-hours button:hover { color: var(--text); border-color: var(--border-strong); }
.quick-hours button[aria-pressed="true"] { background: var(--info-bg); color: var(--accent-2); border-color: var(--accent-2); }

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 100%;
}
/* Data grid: the wrap itself scrolls in both axes so thead/tfoot and the name
   column can stick, and the PAGE never scrolls sideways. */
.table-scroll {
  overflow: auto;
  max-height: min(72vh, calc(100dvh - 250px));
  scrollbar-gutter: stable;
}
@media (max-width: 899px) { .table-scroll { max-height: none; } }
table.tbl { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl thead th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: var(--surface-2);
  white-space: nowrap; position: sticky; top: 0;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.tbl tfoot td {
  font-weight: 750; border-top: 2px solid var(--border-strong); border-bottom: none;
  background: var(--surface-2);
}
.tbl .row-click { cursor: pointer; }
.tbl .row-selected { background: var(--info-bg) !important; }
.tbl .voided td { opacity: .5; text-decoration: line-through; }
.tbl .voided td:last-child { text-decoration: none; }
.tbl tr.inactive td { opacity: .55; }

th.sortable button {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit;
}
th.sortable button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.sort-arrow { font-size: .8em; }

/* Sticky name column + header/footer for the wide payroll grid. */
.tbl-sticky th:first-child,
.tbl-sticky td:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.tbl-sticky thead th { z-index: 2; }
/* Long category labels wrap instead of forcing the last money columns off the
   right edge ("Performance/Competition" breaks after the slash). */
.tbl-sticky thead th { white-space: normal; vertical-align: bottom; font-size: .68rem; }
.tbl-sticky th, .tbl-sticky td { padding: 9px 10px; }
.tbl-sticky thead th.num button { justify-content: flex-end; text-align: right; }
.tbl-sticky thead th button { display: inline-flex; flex-wrap: wrap; }
.tbl-sticky thead th:first-child { z-index: 3; background: var(--surface-2); }
.tbl-sticky tfoot td { position: sticky; bottom: 0; z-index: 2; }
.tbl-sticky tfoot td:first-child { z-index: 3; background: var(--surface-2); }
.tbl-sticky tbody tr:hover td:first-child { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.tbl-sticky tbody tr.row-selected td:first-child { background: var(--info-bg); }

.th-name { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }

/* Compact segmented control used for the name-sort key inside header cells. */
.seg-xs { padding: 2px; }
.seg-xs button {
  min-height: 26px; padding: 2px 9px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: none;
}
@media (max-width: 899px) { .seg-xs button { min-height: 32px; padding: 4px 12px; font-size: .78rem; } }
.sort-chip { display: inline-flex; align-items: center; gap: 8px; }
.sort-chip > .lbl {
  font-size: .78rem; font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}

/* ---------- Record cards (the phone form of a table) ---------- */

.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%; text-align: left;
}
button.rec, .rec.row-click { cursor: pointer; font: inherit; color: inherit; }
button.rec:hover, .rec.row-click:hover { border-color: var(--border-strong); }
.rec.row-selected { border-color: var(--accent-1); box-shadow: 0 0 0 1px var(--accent-1); }
.rec-top { display: flex; align-items: flex-start; gap: 10px; }
.rec-name { font-weight: 750; font-size: 1rem; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rec-figures { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.rec-fig .k {
  font-size: .68rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.rec-fig .v { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rec-kv {
  display: grid; gap: 5px 14px;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.rec-kv > div { font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.rec-kv b { color: var(--text); font-variant-numeric: tabular-nums; }
.rec-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.rec-actions .btn { flex: 1 1 auto; }
.rec-meta { font-size: .84rem; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.rec-total {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 12px 14px; font-weight: 750;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}
.rec.inactive { opacity: .62; }
.rec.voided .rec-name { text-decoration: line-through; }

/* Show one of the two shapes; JS renders only the active one, this is the belt
   and braces for anything rendered before a resize. */
.only-phone { display: block; }
.only-desk { display: none; }
@media (min-width: 900px) {
  .only-phone { display: none; }
  .only-desk { display: block; }
}

.cell-warn { background: var(--warn-bg); }
.warn-ico { color: var(--warn); display: inline-block; vertical-align: -3px; }

/* ---------- Stats / totals cards ---------- */

.stat-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  margin-bottom: 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.stat .k { font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: .8rem; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.stat-hero {
  background: var(--grad); border: none; color: #fff;
}
@media (max-width: 599px) {
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .stat-hero { grid-column: 1 / -1; }
}
.stat-hero .k, .stat-hero .s { color: rgba(255, 255, 255, .82); }

/* ---------- Entry list ---------- */

/* ---------- "Put EnergyTime on your home screen" ----------

   A bottom sheet, above the bottom nav and clear of the home indicator, shown
   at most twice ever and never once the app is already on a home screen. The
   step icons are pictures of buttons on the USER'S phone (iOS share box,
   Android overflow dots), not this app's own iconography — they have to look
   like what is on the screen in front of them. (2026-09-03) */

.ins-sheet {
  position: fixed; z-index: 60;
  left: 0; right: 0;
  /* Above the bottom nav, and above the home indicator under it. */
  bottom: calc(54px + env(safe-area-inset-bottom) + 10px);
  padding: 0 10px;
  animation: ins-rise .22s ease-out both;
}
@media (prefers-reduced-motion: reduce) { .ins-sheet { animation: none; } }
@keyframes ins-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.ins-card {
  position: relative;
  max-width: 460px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .38);
  padding: 16px 16px 12px;
}
.ins-x { position: absolute; top: 8px; right: 8px; }
.ins-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 30px; }
.ins-head h2 { margin: 0 0 2px; font-size: 1.02rem; }
.ins-sub { margin: 0; color: var(--muted); font-size: .85rem; }

/* The real icon, so the sheet shows the thing it is asking them to save. */
.ins-app-icon {
  flex: none; width: 44px; height: 44px; border-radius: 11px;
  background: #fff url('/img/icon-512.png') center / contain no-repeat;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.ins-lead { margin: 14px 0 8px; font-size: .86rem; font-weight: 650; }
.ins-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.ins-steps li { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; }
.ins-ico {
  flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.ins-where { display: block; color: var(--muted); font-size: .78rem; margin-top: 1px; }

.ins-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ins-actions .spacer { flex: 1; }

/* No bottom nav on a desktop layout — but the sheet never shows there anyway,
   so this only matters for a large phone in landscape. */
@media (min-width: 900px) { .ins-sheet { bottom: calc(env(safe-area-inset-bottom) + 16px); } }

/* ---------- My Time: what this window means, my details, my reflections ----

   Written mobile-first and left that way: nearly every person who reads this
   page is holding a phone in a studio, so the phone layout is the base rule and
   the desktop one is the media query. (2026-09-09) */

.period-note {
  margin: 2px 0 14px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.period-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period-dates { font-weight: 700; font-size: 1rem; }
.period-mode { flex: none; }
.period-lead { margin: 5px 0 0; font-size: .9rem; }
.period-why { margin-top: 6px; }
/* A tap target, not a hover: hover does not exist on the device this is read on. */
.period-why > summary {
  cursor: pointer; font-size: .82rem; color: var(--muted);
  padding: 4px 0; list-style: none;
}
.period-why > summary::-webkit-details-marker { display: none; }
.period-why > summary::before { content: "＋ "; }
.period-why[open] > summary::before { content: "－ "; }
.period-why p { margin: 2px 0 2px; }

/* ----- My details ----- */
.prof-card h2 { margin: 0 0 10px; font-size: 1.02rem; }
.prof-row { padding: 10px 0; border-top: 1px solid var(--border); }
.prof-row:first-of-type { border-top: 0; padding-top: 0; }
.prof-k { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.prof-v { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.prof-emails { flex-direction: column; align-items: stretch; gap: 6px; }
.prof-email { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prof-note { margin-top: 5px; }

/* ----- My reflections, summarised ----- */
.refl-sum { margin-bottom: 12px; padding: 13px 14px; }
.refl-sum-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; }
.refl-sum-stat { display: flex; flex-direction: column; line-height: 1.1; }
.refl-sum-n { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.refl-sum-n2 { font-size: 1rem; font-weight: 700; padding-bottom: 4px; }
.refl-sum-l { font-size: .74rem; color: var(--muted); margin-top: 2px; }

.refl-spark {
  display: flex; align-items: flex-end; gap: 4px;
  margin-top: 14px; height: 58px;
}
/* Two rows, not a bottom-aligned stack: with flex-end the label rides DOWN as
   its bar grows, so a tall month's name sits lower than its neighbours' and the
   row stops reading as an axis. The grid pins every label to one baseline. */
.refl-bar-wrap {
  flex: 1 1 0; min-width: 0; height: 100%;
  display: grid; grid-template-rows: 1fr auto;
}
.refl-bar { align-self: end; width: 100%; border-radius: 4px 4px 0 0; background: var(--grad); min-height: 4px; }
.refl-bar-m {
  font-size: .62rem; color: var(--muted); text-align: center;
  margin-top: 4px; overflow: hidden; white-space: nowrap;
}

@media (min-width: 900px) {
  .refl-sum-row { gap: 30px; }
  .refl-spark { height: 72px; gap: 6px; }
  .refl-bar-m { font-size: .68rem; }
}

/* ---------- Dashboard: "Needs you" ----------

   The one thing at the top of the owner dashboard. Rows are a chip, a sentence,
   and one button — nothing else, because the point is that it can be read on a
   phone between classes without deciding anything. (2026-09-03) */

.ny-card { margin-bottom: 18px; }
.ny-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ny-head h2 { margin: 0; }
.ny-sub { margin: 4px 0 12px; }
.ny-rows { display: flex; flex-direction: column; }

.ny-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "chip body" ".    act";
  align-items: start;
  gap: 6px 10px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.ny-row:first-child { border-top: 0; padding-top: 2px; }
.ny-row > .chip { grid-area: chip; margin-top: 1px; }
.ny-body { grid-area: body; min-width: 0; }
.ny-row > .btn, .ny-row > a.btn { grid-area: act; justify-self: start; }
.ny-title { font-weight: 650; overflow-wrap: anywhere; }
.ny-detail { margin-top: 2px; }
.ny-who { margin-top: 4px; }
.ny-who summary { cursor: pointer; }
.ny-clear { padding: 4px 0 2px; }
.ny-checked { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }

/* A tier-1 row is the only thing on this page allowed to be loud. */
.ny-tier-1 .ny-title { font-size: 1.05rem; }

@media (min-width: 900px) {
  .ny-row {
    grid-template-columns: 6.5rem minmax(0, 1fr) auto;
    grid-template-areas: "chip body act";
    align-items: center;
    gap: 12px;
  }
  .ny-row > .btn, .ny-row > a.btn { justify-self: end; }
}

/* ---------- Entry cards (Admin > Pay summary drill-down, and the shared
   entry list in ui.mjs). STILL IN USE — the employee "My Time" list moved to
   the .log layout below on 2026-09-03, these did not. ---------- */

.day-group { margin-bottom: 18px; }
.day-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 7px; padding: 0 2px;
}
.day-head h3 { margin: 0; font-size: .95rem; }
.entry-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 12px;
  margin-bottom: 8px;
}
.entry-main { flex: 1; min-width: 0; }
.entry-line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.entry-hours { font-weight: 800; font-variant-numeric: tabular-nums; }
.entry-note { color: var(--muted); font-size: .84rem; margin-top: 3px; overflow-wrap: anywhere; }
.entry-actions { display: flex; gap: 2px; }

/* ---------- My Time: the logged-hours list ----------

   ONE DOM, TWO GRID TEMPLATES. A phone gets a stacked row; from 900px the same
   row becomes an aligned line so a month of hours reads down its columns. The
   list is separated by hairlines rather than built from cards: 89% of days
   carry exactly one entry, so a card per entry was a box around a single line.
   (2026-09-03) */

.log-summary {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 0 2px 14px;
}
.log-sum-total { display: flex; align-items: baseline; gap: 6px; }
.log-sum-h {
  font-size: 2.1rem; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.log-sum-unit { color: var(--muted); font-size: .95rem; }
.log-sum-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.log-sum-days { color: var(--muted); font-size: .92rem; }

.log { border-bottom: 1px solid var(--border); }
.log-row {
  display: grid;
  align-items: baseline;
  gap: 1px 10px;
  padding: 9px 2px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "date  hours acts"
    "what  what  what"
    "note  note  note";
}
/* THE RULE MARKS A NEW DAY, not a new row. Drawn on the top of the row that
   starts a day, so the second entry of a two-entry day is not fenced off from
   the first — it was reading as an orphan with a blank date and a floating
   number. Instead it hangs under its day, indented, behind a short stub. */
.log-row-first { border-top: 1px solid var(--border); }
.log-row:not(.log-row-first) {
  padding-top: 2px; padding-left: 14px; position: relative;
}
.log-row:not(.log-row-first)::before {
  content: ""; position: absolute; left: 4px; top: 4px; bottom: 8px;
  border-left: 2px solid var(--border); border-radius: 2px;
}

.log-date { grid-area: date; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.log-date-txt { font-weight: 650; font-size: .95rem; }
.log-day-total { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }

.log-what { grid-area: what; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.log-cat { color: var(--muted); font-size: .9rem; }

.log-hours { grid-area: hours; white-space: nowrap; }
.log-hours-n { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.log-hours-u { color: var(--muted); font-size: .82rem; margin-left: 2px; }

.log-note {
  grid-area: note; margin: 2px 0 0;
  color: var(--muted); font-size: .86rem; overflow-wrap: anywhere;
}
.log-acts { grid-area: acts; display: flex; gap: 2px; }

@media (min-width: 900px) {
  .log-row {
    /* date | what | note | hours | actions — the note takes the slack so the
       hours column stays put and the numbers line up down the page. */
    grid-template-columns: 10.5rem 13rem minmax(0, 1fr) 5rem auto;
    grid-template-areas: "date what note hours acts";
    align-items: baseline;
    gap: 12px;
    padding: 9px 4px;
  }
  /* NO INDENT ON DESKTOP. The columns are the whole point of this layout, and
     shifting a continuation row pushed its category and note out of line with
     every row below it. The blank date cell already says "same day"; the stub
     sits inside that empty cell rather than moving the content. */
  .log-row:not(.log-row-first) { padding-top: 5px; padding-left: 2px; }
  .log-row:not(.log-row-first)::before { left: 2px; top: 2px; bottom: 4px; }
  .log-note { margin: 0; }
  .log-hours { text-align: right; }
  .log-row:hover { background: var(--surface); }
}

/* ---------- Toolbar / range picker ---------- */

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.range-custom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range-custom[hidden] { display: none; }
.range-custom .input { width: auto; min-height: 40px; }

/* ---------- Toasts ---------- */

.toasts {
  position: fixed; z-index: 200;
  left: 50%; transform: translateX(-50%);
  bottom: calc(70px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  width: min(94vw, 420px);
  pointer-events: none;
}
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast {
  pointer-events: auto;
  background: var(--text); color: var(--bg);
  padding: 11px 16px; border-radius: 12px;
  font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow-pop);
  max-width: 100%;
  animation: toast-in .22s ease;
}
.toast-success { background: var(--ok); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transition: opacity .3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Dialogs ---------- */

dialog.dlg {
  border: none; padding: 0; margin: auto;
  width: min(500px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  background: var(--surface); color: var(--text);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
}
dialog.dlg[open] { display: flex; flex-direction: column; }
dialog.dlg::backdrop { background: rgba(10, 6, 22, .55); backdrop-filter: blur(2px); }
.dlg-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 0;
  flex: none; position: relative;
}
.dlg-head h2 { margin: 0; flex: 1; font-size: 1.1rem; }
.dlg-body { padding: 12px 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.dlg-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 4px 16px 16px;
  flex: none;
}

/* Phones: dialogs become bottom sheets — thumb-reachable, full-width actions. */
@media (max-width: 599px) {
  dialog.dlg {
    width: 100%; max-width: 100%;
    margin: auto auto 0;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    animation: sheet-up .22s cubic-bezier(.2, .8, .3, 1);
  }
  .dlg-head { padding-top: 14px; }
  .dlg-head::before {
    content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
    width: 38px; height: 4px; border-radius: 999px; background: var(--border-strong);
  }
  .dlg-foot {
    position: sticky; bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    margin-top: 4px;
  }
  .dlg-foot .btn { flex: 1 1 0; }
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } }

/* Sticky primary action (submit hours) — sits above the phone bottom nav. */
.sticky-actions {
  position: sticky;
  bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  z-index: 20;
  margin: 16px calc(var(--gutter) * -1) 0;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.sticky-actions .btn { width: 100%; min-height: 52px; font-size: 1rem; }
@media (min-width: 900px) {
  .sticky-actions {
    position: static; margin: 18px 0 0; padding: 0;
    background: none; border: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .sticky-actions .btn { width: auto; min-width: 220px; }
}

/* ---------- Loading ---------- */

.spinner {
  width: 26px; height: 26px; margin: 28px auto;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent-2);
  animation: spin .8s linear infinite;
}
/* In-button busy indicator (submit-in-flight). */
.btn .spinner {
  width: 18px; height: 18px; margin: 0;
  border-width: 2px;
  border-color: rgba(255, 255, 255, .35);
  border-top-color: currentColor;
}
.btn:not(.btn-primary):not(.btn-danger) .spinner { border-color: var(--border); border-top-color: var(--accent-2); }
@keyframes spin { to { transform: rotate(360deg); } }

.skel-group { display: flex; flex-direction: column; gap: 10px; }
.skel {
  height: 52px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface-2) 40%, var(--surface) 50%, var(--surface-2) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Empty / notice states ---------- */

.empty {
  text-align: center; padding: 42px 18px; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty .big { font-size: 1.9rem; margin-bottom: 6px; }
.empty h3 { color: var(--text); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: .88rem;
  margin-bottom: 14px;
}
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-info { background: var(--info-bg); color: var(--accent-2); }
.notice ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Auth screen ---------- */

.auth-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  padding: 20px;
  background:
    radial-gradient(60vmax 60vmax at 8% -10%, color-mix(in srgb, var(--accent-1) 14%, transparent), transparent 60%),
    radial-gradient(60vmax 60vmax at 105% 110%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 60%),
    var(--bg);
}
.auth-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 34px 26px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: var(--stripes);
}
/* The sign-in screen shows the same lockup, just bigger — no separate badge
   above it, because the logo is now inside the name. */
.auth-title {
  font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em;
  margin: 4px 0 6px;
  display: inline-flex; align-items: baseline; justify-content: center;
}
/* Slightly larger than the type on the sign-in screen: it is the one place
   the logo is doing a logo's job rather than a letter's. */
.auth-title .brand-e { --e-ring: 1.6ex; }
.auth-title .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-sub { color: var(--muted); font-size: .92rem; margin-bottom: 24px; }
/* "What happens next" list on the access-requested sign-in state: left-aligned
   inside the centred card so it reads as steps, not as prose. */
.auth-steps {
  list-style: none; margin: 0 0 22px; padding: 0;
  display: flex; flex-direction: column; gap: 9px;
  text-align: left; font-size: .87rem; color: var(--muted); line-height: 1.45;
}
.auth-steps li { position: relative; padding-left: 24px; }
.auth-steps li::before {
  content: ''; position: absolute; left: 6px; top: .5em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--grad);
}
.gis-host { display: flex; justify-content: center; min-height: 44px; }
.auth-fine { margin-top: 20px; font-size: .78rem; color: var(--muted); }

/* Sign-in card footer: small text-button variant of the theme toggle. */
.auth-theme { margin-top: 14px; display: flex; justify-content: center; }
.theme-text-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); font-size: .8rem; font-weight: 650;
  padding: 8px 12px; border-radius: 999px; min-height: 36px;
}
.theme-text-btn:hover { color: var(--text); background: var(--surface-2); }

/* ---------- Reflections stream ---------- */

.refl-card { margin-bottom: 12px; }
.refl-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.refl-q { font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-2); margin: 10px 0 2px; }
.refl-a { font-size: .92rem; overflow-wrap: anywhere; }

/* ---------- Reflections: the owner's screen (2026-09-02) ----------
   The warning when something has not been checked, the word cloud, then the
   reflections browser below. The display face is only used here. */

.display { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
.refl-sec { margin: 0 0 26px; }
.refl-sec h2 { font-size: 1.2rem; margin: 0 0 3px; }
.refl-sec .lede { font-size: .85rem; color: var(--muted); margin: 0 0 14px; }

/* the gap nobody knew about */
.refl-gap {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--warn-bg); border: 1px solid var(--warn);
  border-radius: var(--radius); padding: 13px 15px;
  font-size: .88rem; color: var(--warn); margin: 0 0 24px;
}
.refl-gap svg { flex: none; margin-top: 1px; }
.refl-gap-body { min-width: 0; }
.refl-gap-body p { margin: 6px 0 0; }
.refl-gap-act { margin-top: 10px; }

/* word cloud */
.refl-cloud-card { padding: 0; overflow: hidden; }
/* The band the cloud is drawn into. Sized to what the spiral actually fills at
   each width (measured, not guessed): a taller box just adds dark. */
.refl-cloud { position: relative; width: 100%; height: 300px; overflow: hidden; }
.refl-cloud-foot {
  border-top: 1px solid var(--border); padding: 10px 15px;
  font-size: .78rem; color: var(--muted); text-align: center;
}
.refl-word {
  position: absolute; font-family: var(--display); font-weight: 600;
  letter-spacing: -.025em; white-space: nowrap; cursor: default;
  background: none; border: 0; padding: 0; line-height: 1.1;
  transition: opacity .14s ease, transform .14s ease;
  transform-origin: center;
}
.refl-word.tone-magenta { color: var(--ink-magenta); }
.refl-word.tone-cyan { color: var(--ink-cyan); }
.refl-word.tone-green { color: var(--ink-green); }
/* Hover holds one word and fades the rest. Only on devices that really hover —
   on a phone this rule would fire on tap and leave the cloud stuck dimmed. */
@media (hover: hover) {
  .refl-cloud:hover .refl-word { opacity: .26; }
  .refl-cloud .refl-word:hover { opacity: 1; transform: scale(1.06); }
  .refl-cloud .refl-word:hover i { opacity: .9; }
}
.refl-cloud .refl-word[data-held] { opacity: 1; transform: scale(1.06); }
.refl-cloud .refl-word[data-held] i { opacity: .9; }
.refl-word i {
  font-style: normal; font-family: var(--font); font-weight: 400;
  font-size: 10px; color: var(--muted); vertical-align: super;
  margin-left: 3px; opacity: 0; transition: opacity .14s ease;
}
@media (max-width: 640px) { .refl-cloud { height: 190px; } }

/* Read by a screen reader, not drawn. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Reflections browser (2026-09-14) ----------

   One list, every number a filter, urgent reports pinned above it, and a tap
   opens the whole reflection. Phone first: nearly everyone reading this is
   holding one, so the phone layout is the base rule and the desktop one is the
   900px query. Tap targets are at least 44px tall. */

.refl-controls { margin: 4px 0 12px; }

.refl-search-row { position: relative; }
.refl-search {
  width: 100%; min-height: 46px; padding-right: 44px;
  font-size: 1rem; /* 16px: iOS zooms the whole page into anything smaller */
}
.refl-search-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
/* .icon-btn sets display, which beats the browser's own [hidden] rule — the same
   trap as .badge[hidden] below. Without this the clear button sits in an empty
   search box. */
.refl-search-clear[hidden] { display: none; }

/* THE NUMBERS ARE THE FILTERS. On a phone they scroll sideways, and the fade on
   the right edge is what says there are more than fit. */
.refl-tiles {
  display: flex; gap: 8px; margin: 12px -16px 0; padding: 2px 16px 6px;
  overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* the fade on the right already says there is more */
  scroll-padding-inline: 16px; /* snap in line with the search box, not the screen edge */
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
          mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.refl-tiles::-webkit-scrollbar { display: none; }
.refl-tile {
  flex: none; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-width: 88px; min-height: 58px; padding: 8px 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; text-align: left; cursor: pointer;
}
.refl-tile .n {
  font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.refl-tile .k { font-size: .74rem; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.refl-tile.tone-urgent .n { color: var(--danger); }
.refl-tile.tone-watch .n { color: var(--warn); }
.refl-tile.active {
  border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text);
  background: var(--surface-2);
}
.refl-tile.active .k { color: var(--text); font-weight: 650; }
.refl-tile.inert { cursor: default; opacity: .85; }
.refl-inert-note { flex: none; align-self: center; margin: 0; }
.refl-tiles-note { margin: 6px 0 10px; }

.refl-selects { display: grid; grid-template-columns: 1fr; gap: 8px; }
/* Side by side only once both chosen values fit: at 375px "Most urgent first"
   and "Everyone · 40 people" were cut off. */
@media (min-width: 520px) { .refl-selects { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.refl-select { min-height: 44px; font-size: 1rem; }

.refl-person-sum {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 12px; padding: 10px 12px;
  background: var(--surface-2); border-radius: var(--radius-sm); font-size: .9rem;
}
.refl-person-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.refl-waiting { color: var(--warn); }
.refl-person-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.refl-person-chip { min-height: 44px; cursor: pointer; border: 1px solid var(--border); }

/* Fixed above the bottom nav and the home indicator: she has usually scrolled a
   long way down by the time she presses Done, and a notice at the top of the
   list was off-screen for the whole time it offered Undo. */
.refl-undo {
  position: fixed; z-index: 55; left: 10px; right: 10px;
  bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 10px);
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px;
  background: var(--text); color: var(--bg); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); font-size: .9rem;
}
.refl-undo > span { flex: 1; }
.refl-undo .btn { min-height: 40px; }
.refl-undo .icon-btn { color: var(--bg); }
@media (min-width: 900px) { .refl-undo { bottom: calc(env(safe-area-inset-bottom) + 18px); } }

/* Pinned urgent reports: above the list, never sorted into it. */
.refl-pinned {
  margin: 0 0 16px; border: 1px solid var(--danger); border-left-width: 4px;
  border-radius: var(--radius-sm); background: var(--surface); overflow: hidden;
}
.refl-pin-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px;
  padding: 9px 12px; background: var(--danger-bg); color: var(--danger); font-size: .9rem;
}
/* On a phone the note drops under the count rather than squeezing it into two
   lines beside it. */
.refl-pin-head .muted { color: var(--danger); font-size: .78rem; }
.refl-pin-row {
  display: block; width: 100%; min-height: 56px; padding: 9px 12px;
  background: none; border: 0; border-top: 1px solid var(--border);
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.refl-pin-top { display: flex; justify-content: space-between; gap: 8px; }
.refl-pin-name { font-weight: 650; }
.refl-pin-wait { font-size: .8rem; color: var(--muted); white-space: nowrap; }
/* Three lines, not one: at 375px a single line showed a quarter of a report. */
.refl-pin-words {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  margin-top: 2px; color: var(--text); font-size: .9rem; overflow: hidden;
}
.refl-pin-all { margin: 8px 12px 10px; }
.refl-pin-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 8px 12px; min-height: 44px;
  border: 1px solid var(--danger); border-radius: var(--radius-sm);
  background: var(--danger-bg); color: var(--danger); font-size: .88rem;
}
.refl-pin-line span { flex: 1 1 12rem; }

.refl-result { margin: 0 0 8px; }
.refl-list { display: flex; flex-direction: column; gap: 10px; }

/* A reflection card: the name opens that person's list; the rest of the card
   opens the reflection. Two separate buttons, so neither steals the other's
   tap. */
.refl-card2 {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.refl-card2.tone-urgent { border-left-color: var(--danger); }
.refl-card2.tone-watch { border-left-color: var(--warn); }
.rc-head { padding: 0 12px; }
.rc-name {
  min-height: 44px; padding: 0; background: none; border: 0;
  font: inherit; font-weight: 700; font-size: .98rem; color: var(--text);
  text-decoration: underline; text-decoration-color: var(--border-strong);
  text-underline-offset: 3px; cursor: pointer; text-align: left;
}
.rc-when { font-size: .8rem; color: var(--muted); }
.rc-status { font-size: .72rem; }
.rc-status.tone-urgent { background: var(--danger-bg); color: var(--danger); }
.rc-status.tone-watch { background: var(--warn-bg); color: var(--warn); }
.rc-status.tone-quiet { background: var(--surface-2); color: var(--muted); }
.rc-open {
  display: block; width: 100%; min-height: 44px; padding: 0 12px 12px;
  background: none; border: 0; font: inherit; color: inherit;
  text-align: left; cursor: pointer;
}
.rc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rc-field { display: block; margin-top: 8px; }
.rc-k {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.rc-v {
  display: block; margin-top: 2px;
  font-family: var(--display); font-weight: 400; font-size: 1rem; line-height: 1.5;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.rc-quiet { display: block; margin-top: 8px; font-size: .78rem; color: var(--muted); }
/* Strong enough to find at a glance: the warn-bg tint alone measured 1.1:1
   against the card. */
.refl-card2 mark, .refl-entry mark {
  background: color-mix(in srgb, var(--warn) 32%, transparent); color: inherit;
  font-weight: 650; border-radius: 3px; padding: 0 1px;
}

.refl-more-host { margin: 14px 0 6px; text-align: center; }
/* Scoped to the admin list: My Time's "Show older" uses .refl-more too. */
.refl-more-host .refl-more { width: 100%; min-height: 46px; margin-top: 6px; }
.refl-end { margin: 10px 0 0; }
.refl-held { padding: 0 15px 12px; text-align: center; }
.refl-held:empty { display: none; }

/* One reflection, whole. A sheet on a phone, a dialog on a desktop. */
.refl-sheet { max-height: 92dvh; overflow: auto; }
/* The actions are in the body, not the dialog foot, so the body carries the
   home-indicator inset itself or the last button sits under it. */
.refl-sheet .dlg-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.refl-entry { display: flex; flex-direction: column; gap: 16px; }
.re-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
/* Sentence case and full colour, so a section heading never reads as one more
   of the small grey field labels underneath it. */
.re-sec h3 { margin: 0 0 8px; font-size: .95rem; font-weight: 700; color: var(--text); }
.re-field { margin: 0 0 10px; }
.re-v {
  font-family: var(--display); font-size: 1.05rem; line-height: 1.55;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.re-hours { list-style: none; margin: 0; padding: 0; }
.re-hours li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
  padding: 7px 0; border-top: 1px solid var(--border); font-size: .9rem;
}
.re-hours li:first-child { border-top: 0; }
.re-hours li.voided { color: var(--muted); }
.re-hours li.voided .re-h-n { text-decoration: line-through; }
.re-h-when { color: var(--muted); min-width: 3.6rem; }
.re-h-cat { font-weight: 650; }
.re-h-n { font-variant-numeric: tabular-nums; }
.re-h-note { flex-basis: 100%; color: var(--muted); }
/* The computer's read: labelled, quieter than her staff's words, and never in
   the display face the staff member's own words are set in. */
.re-ai {
  padding: 10px 12px; background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); font-size: .88rem;
}
.re-ai-k {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.re-ai-reason { margin-top: 4px; color: var(--muted); }
.re-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.re-acts:empty { display: none; }
.re-acts .btn { min-height: 44px; }
.re-acts-note { flex-basis: 100%; margin: 0; }
.re-links { display: flex; flex-wrap: wrap; gap: 8px; }

@media (min-width: 900px) {
  .refl-tiles { flex-wrap: wrap; overflow: visible; margin: 12px 0 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .refl-tile { min-width: 112px; }
  .refl-selects { grid-template-columns: 280px 220px; }
  .refl-more-host .refl-more { width: auto; min-width: 240px; }
}

/* ---------- Misc ---------- */

details.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
details.panel > summary {
  cursor: pointer; padding: 13px 16px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > .panel-body { padding: 4px 16px 16px; }

.drill { margin-top: 16px; }
.drill-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.drill-head h2 { margin: 0; flex: 1; min-width: 0; font-size: 1.1rem; }

/* Pay summary: table + drill-down. Stacked on phone/tablet, side-by-side on a
   wide desktop so the payroll grid stays visible while reading one person. */
.summary-layout {
  display: grid; gap: 16px; align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1180px) {
  .summary-layout.has-drill { grid-template-columns: minmax(0, 1fr) 400px; }
  .summary-layout.has-drill .drill {
    margin-top: 0;
    position: sticky; top: calc(var(--topbar-h) + 12px);
    max-height: calc(100dvh - var(--topbar-h) - 34px);
    overflow-y: auto;
  }
}
.summary-hint { margin: 8px 0 0; }

.kv { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.kv > div { font-size: .86rem; color: var(--muted); }
.kv b { color: var(--text); font-variant-numeric: tabular-nums; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 9px 0; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: none; }

pre.json {
  margin: 6px 0 0; padding: 9px 11px;
  background: var(--surface-2); border-radius: 8px;
  font-size: .76rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}

.success-hero { text-align: center; padding: 40px 16px 24px; }
.success-ico {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
  display: grid; place-items: center;
}

/* ---------- Duplicate review (admin panel + employee /review page) ---------- */

.chip-info { background: var(--info-bg); color: var(--accent-2); }

/* .badge sets display, which beats the UA [hidden] rule — so an empty count
   badge stayed visible as a "0". Restore the hide. */
.badge[hidden] { display: none; }

.dup-bar { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.dup-bar p { margin: 0; flex: 1 1 260px; }
.dup-filter { flex: none; }

.dup-case { margin: 12px 0 0; }
.dup-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.dup-head .muted { font-size: .88rem; }

/* Side by side on desktop, stacked below 900px (the app-wide breakpoint). */
.dup-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .dup-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

.dup-sub {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; background: var(--surface-2);
  display: flex; flex-direction: column;
}
.dup-sub.is-kept { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok) inset; }
.dup-sub.is-void { opacity: .62; }
.dup-sub-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dup-sub-foot { margin-top: auto; padding-top: 12px; }

.dup-items { margin-top: 8px; }
.dup-li { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.dup-li:last-child { border-bottom: none; }
.dup-li-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dup-li-note { color: var(--muted); font-size: .82rem; margin-top: 3px; overflow-wrap: anywhere; }
.dup-li.voided .dup-li-main { text-decoration: line-through; opacity: .7; }

.dup-refl { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 6px; }
.dup-refl .refl-q { margin-top: 8px; }

.dup-note {
  margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); font-size: .86rem; color: var(--muted);
}
.dup-note strong { color: var(--text); }

.dup-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.dup-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.dup-link .input { flex: 1 1 220px; font-size: .82rem; }

.dup-choose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.dup-choice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer;
}
.dup-choice:hover { background: var(--surface-2); }
.dup-choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent-1); flex: none; }
.dup-choice.is-void { opacity: .55; cursor: not-allowed; }

.review-hero { text-align: center; padding: 28px 18px; }
.review-hero h1 { margin-bottom: 10px; }
.review-hero .btn { margin-top: 10px; }
.review-cta { text-align: center; }
.review-cta p { margin-bottom: 6px; }
.review-cta .btn { margin-top: 10px; }

/* ---------- Ask the data (AI query, can_query only) ---------- */

.ask-intro { max-width: 62ch; margin: -4px 0 14px; }

.ask-box { padding: 14px; }
.ask-input { width: 100%; min-height: 84px; resize: vertical; font-size: 1rem; }
.ask-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px;
}
.ask-actions .btn { min-width: 108px; }

.ask-examples { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.ask-example {
  cursor: pointer; border: 1px solid var(--border); background: transparent;
  color: var(--muted); font: inherit; font-size: .8rem; line-height: 1.3;
  padding: 5px 10px; border-radius: 999px; text-align: left;
}
.ask-example:hover:not(:disabled) { color: var(--text); border-color: var(--accent-1); }
.ask-example:disabled { opacity: .5; cursor: not-allowed; }

.ask-state:empty { display: none; }
.ask-state { margin-top: 14px; }
.ask-state .notice { flex-direction: column; gap: 4px; margin-bottom: 0; }
.ask-state .notice p { margin: 0; }
.ask-state .notice .btn { align-self: flex-start; margin-top: 8px; }

.ask-loading { display: flex; align-items: center; gap: 10px; padding: 8px 2px; }
.ask-loading .spinner { width: 20px; height: 20px; margin: 0; }

.ask-results { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }

.ask-card { position: relative; overflow: hidden; padding-left: 18px; }
.ask-card::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--stripes);
}
.ask-q {
  display: flex; gap: 8px; align-items: flex-start;
  color: var(--muted); font-size: .84rem; margin-bottom: 8px;
}
.ask-q svg { flex: none; margin-top: 2px; color: var(--accent-1); }

.ask-answer { white-space: pre-wrap; line-height: 1.55; font-size: 1rem; }

/* A caution qualifies the totals directly below it, so it sits between them and
   the answer — never inside the collapsed "Data used" panel. (2026-09-02) */
.ask-cautions { margin-top: 12px; display: grid; gap: 8px; }
.ask-caution {
  margin: 0; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--warn-bg); color: var(--warn);
  font-size: .86rem; line-height: 1.5;
}

.ask-totals {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.ask-totals-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 7px;
}
.ask-total-chips { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ask-total { display: flex; flex-direction: column; }
.ask-total .k { font-size: .74rem; color: var(--muted); }
.ask-total .v { font-size: 1.02rem; font-weight: 650; }

.ask-data { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.ask-data > summary {
  cursor: pointer; font-size: .84rem; color: var(--accent-2); list-style: none;
}
.ask-data > summary::-webkit-details-marker { display: none; }
.ask-data > summary::before { content: '▸ '; }
.ask-data[open] > summary::before { content: '▾ '; }
.ask-data-body { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.ask-params { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: .82rem; }
.ask-notes li { margin-bottom: 3px; }
.ask-context { font-size: .84rem; display: flex; flex-direction: column; gap: 3px; }
.ask-data .tbl td { white-space: normal; max-width: 340px; }

@media (max-width: 560px) {
  .ask-actions .btn { flex: 1 1 auto; }
  .ask-total-chips { gap: 8px 14px; }
}

/* ---------- Owner dashboard (Insights, /admin/dashboard) ---------- */

/* Tile row: 2×3 on phones, 6-up on desktop. */
.dash-tiles { grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
@media (min-width: 900px) { .dash-tiles { grid-template-columns: repeat(6, 1fr); } }
.dash-tiles .stat .v.neg { color: var(--danger); }
.dash-tiles .stat .s.neg { color: var(--danger); }

/* Card grid: single column on phones, 2 then 3 columns on desktop. */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 900px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-span2 { grid-column: 1 / -1; }
}
@media (min-width: 1180px) {
  .dash-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-span2 { grid-column: span 2; }
}
.dash-card h2 { margin: 0 0 10px; font-size: 1rem; }
.dash-card + .dash-card { margin-top: 0; } /* grid gap handles spacing */

/* "Where the hours go" — horizontal category bars (brand color rotation). */
.dash-bar-row {
  display: grid; grid-template-columns: minmax(86px, 130px) 1fr auto;
  gap: 8px; align-items: center; padding: 4px 0;
}
.dash-bar-label { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.dash-bar-track { background: var(--surface-2); border-radius: 999px; height: 12px; overflow: hidden; }
.dash-bar-fill { height: 100%; border-radius: 999px; }
.dash-bar-val { font-size: .84rem; white-space: nowrap; }

/* Weekly mini bar chart — pure CSS columns. */
.dash-cols { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 4px; }
.dash-col {
  flex: 1 1 0; min-width: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
}
.dash-col-bar {
  width: 100%; max-width: 46px; flex: 1 1 auto; min-height: 0;
  background: var(--surface-2); border-radius: 8px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.dash-col-fill { width: 100%; background: linear-gradient(180deg, var(--accent-2), var(--accent-1)); }
.dash-col-val { line-height: 1; }
.dash-col-label { font-size: .68rem; color: var(--muted); white-space: nowrap; }

/* Follow-up flag cards. */
.flag-card {
  border: 1px solid var(--border); border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px;
  background: var(--surface);
}
.flag-card.urgent { border-left-color: var(--danger); }
.flag-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flag-text { margin-top: 4px; font-size: .9rem; overflow-wrap: anywhere; }
.flag-text .lbl {
  display: block; margin-top: 6px; font-size: .7rem; font-weight: 750;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.flag-reason { margin: 6px 0 0; font-style: italic; }
.flag-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.flag-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.dash-scanline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* Simple lists (suggestions, wins, top staff, missing rates). */
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; overflow-wrap: anywhere; }
.dash-list li:last-child { border-bottom: none; padding-bottom: 0; }
.dash-meta { display: block; margin-top: 2px; }
.dash-rank { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.dash-chiplist { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-nudge { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.dash-nudge .input { flex: 1 1 120px; min-width: 0; font-size: .82rem; }

/* ACTION REQUIRED — pinned above everything, and only rendered when it has
   rows. Warm border so it reads as "do something" without shouting danger. */
.dash-action {
  border-left: 4px solid var(--warn);
  background: var(--surface);
  margin-bottom: 16px;
}
.dash-action .act-title { display: flex; align-items: center; gap: 8px; color: var(--warn); }
.act-lead { margin: 0 0 6px; font-size: .9rem; }
.act-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 8px 0; border-top: 1px solid var(--border);
}
.act-body { flex: 1 1 260px; min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
.act-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.act-warn { color: var(--warn); }

/* Money tiles carry a permanent basis line, so no figure is ever ambiguous. */
.stat-basis {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-top: 2px;
}
.dash-basis-note { margin: -6px 0 16px; }

/* Activity section: by_category + by_week under ONE toggle of their own. */
.dash-activity { margin-bottom: 16px; }
.dash-activity-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.dash-activity-head h2 { margin: 0; font-size: 1.05rem; }
.dash-activity-note { margin: 0 0 10px; }

/* Needs a nudge. */
.dash-nudge-card { margin-bottom: 16px; }
.dash-clear { font-size: .9rem; margin: 0; }
.nudge-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.nudge-selectall { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 650; }
.nudge-list { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 4px 0 10px; }
@media (min-width: 700px) { .nudge-list { grid-template-columns: repeat(2, 1fr); column-gap: 18px; } }
@media (min-width: 1180px) { .nudge-list { grid-template-columns: repeat(3, 1fr); } }
.nudge-row {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 4px 2px; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.nudge-row input[type="checkbox"] { width: 20px; height: 20px; flex: none; }
.nudge-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.nudge-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.nudge-actions .input { flex: 1 1 200px; min-width: 0; }
.nudge-status:not(:empty) { margin-top: 10px; }
.nudge-fails { list-style: none; margin: 6px 0 0; padding: 0; }
.nudge-fails li { padding: 2px 0; }
.nudge-copy { margin-top: 10px; }
.nudge-copy summary { cursor: pointer; font-size: .84rem; color: var(--muted); min-height: 32px; }

/* "Not working here anymore?" — collapsed by default, never nudged. */
.dormant { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.dormant summary { cursor: pointer; font-size: .88rem; font-weight: 650; min-height: 32px; }
.dormant-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.dormant-row span:first-child { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }

/* Postcards — participation for the period, per person underneath.
   Deliberately NEUTRAL: brand cyan bars on the ordinary track colour, muted
   counts, and no danger red anywhere. A low number here is a conversation the
   owner has with her staff, not a failure state the app shouts about. */
.pc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pc-rate {
  font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pc-headmeta { flex: 1 1 150px; min-width: 0; }
.pc-of { font-size: .9rem; overflow-wrap: anywhere; }
.pc-trend { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.pc-explain { margin: 10px 0 12px; }
.pc-listhead {
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  font-size: .68rem; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.pc-list { display: grid; grid-template-columns: 1fr; }
.pc-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 64px auto;
  gap: 10px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .88rem;
}
.pc-list .pc-row:last-child { border-bottom: none; }
.pc-who { min-width: 0; }
.pc-name { display: block; overflow-wrap: anywhere; }
.pc-last { display: block; line-height: 1.25; }
.pc-track { background: var(--surface-2); border-radius: 999px; height: 6px; overflow: hidden; }
.pc-fill { height: 100%; border-radius: 999px; background: var(--accent-2); }
.pc-count { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.pc-more { margin-top: 8px; }
.pc-more summary { cursor: pointer; font-size: .84rem; color: var(--muted); min-height: 32px; }

/* "How late hours get entered" — the payroll-surprise leading indicator. */
.lag-figures { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.lag-fig { flex: 1 1 70px; min-width: 0; }
.lag-v { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; text-align: left; }
.lag-k { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lag-lead { margin: 6px 0 2px; font-weight: 650; }

/* ---------- Employee home (My Time) ----------
   Designed at 390px first: one column, big numbers, nothing to scroll
   sideways. Hours only — there is no money anywhere on this page. */

.home-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.home-head h2 { margin: 0; font-size: 1rem; flex: 1 1 auto; min-width: 0; }

.home-total { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.home-total-v { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.home-total-u { font-size: .95rem; font-weight: 650; color: var(--muted); }
.home-total-s { flex: 1 1 100%; font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* Category breakdown: label · proportional bar · hours. The bar is relative to
   this person's own biggest category — never to anyone else's. */
.cat-hours { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
/* Phone: label and hours on one line, the bar full width underneath. Category
   names are single unbreakable tokens ("Performance/Competition"), so squeezing
   them into a narrow first column hyphenates them mid-word at 390px. */
.cat-hour { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 10px; }
.cat-hour-k { font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.cat-hour-bar {
  grid-column: 1 / -1;
  background: var(--surface-2); border-radius: 999px; height: 8px; overflow: hidden;
}
@media (min-width: 560px) {
  .cat-hour { grid-template-columns: minmax(0, 1fr) minmax(90px, 1.6fr) auto; align-items: center; gap: 12px; }
  /* One line: label · bar · hours. The DOM order is label, hours, bar (so the
     phone layout needs no re-parenting), so the bar is ordered back between. */
  .cat-hour-bar { grid-column: auto; height: 10px; order: 1; }
  .cat-hour-v { order: 2; }
}
.cat-hour-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent-1)); }
.cat-hour-v { font-size: .88rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Final three days before the period closes. Warm, not alarming: this is a
   heads-up, never a telling-off. */
.close-banner {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 14px;
  background: var(--warn-bg); color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  border-radius: var(--radius);
}
.close-banner > div { flex: 1 1 200px; min-width: 0; }
.close-banner svg { flex: none; margin-top: 2px; }
.close-banner .btn { flex: 0 0 auto; }

/* "Last entry" + "Postcards": facts, deliberately neutral. No red, no ranking,
   no comparison to anyone else — postcards are a personal habit here. */
.home-facts { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 700px) { .home-facts { grid-template-columns: 1fr 1fr; } }
.fact {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.fact-ico { color: var(--muted); display: flex; margin-top: 1px; }
.fact-k { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fact-v { font-size: .95rem; margin-top: 2px; overflow-wrap: anywhere; }

/* Range-picker total above the entry list (hours, never money). */
.range-total { margin: 0 2px 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.refl-more { margin-top: 4px; }

/* ---------- Admin › Periods: period-close reminder settings ---------- */

.rem-card { margin-bottom: 18px; }
.rem-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rem-line h2 { margin: 0; font-size: 1rem; }
.rem-next { font-size: .92rem; margin: 0 0 10px; }
.rem-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rem-controls .field { margin-bottom: 0; }
.rem-days { width: 92px; }
.rem-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rem-result { margin-top: 10px; }
.rem-result:empty { display: none; }
@media (max-width: 559px) {
  .rem-controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .rem-days { width: 100%; }
  .rem-actions .btn { flex: 1 1 auto; }
}

/* ---------- Admin › Sheet sync ----------
   The state banner is the whole point of this page: a system that is switched
   off must never be rendered in the same calm grey as a healthy one, so the
   "off" variant is a red-bordered panel at the very top with the reason and the
   date in it. `.is-on` is the quiet green twin. */

.sync-banner {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.sync-banner.is-off {
  background: var(--danger-bg);
  border-color: color-mix(in srgb, var(--danger) 42%, transparent);
  /* Full-strength left edge: in light mode the tinted background alone is a
     pale pink that reads as decoration. "Off" has to be legible at a glance. */
  border-left: 5px solid var(--danger);
}
.sync-banner.is-on {
  background: var(--ok-bg);
  border-color: color-mix(in srgb, var(--ok) 38%, transparent);
  border-left: 5px solid var(--ok);
}
.sync-banner-ico { flex: none; margin-top: 2px; }
.sync-banner.is-off .sync-banner-ico { color: var(--danger); }
.sync-banner.is-on .sync-banner-ico { color: var(--ok); }
.sync-banner-body { flex: 1 1 auto; min-width: 0; }
.sync-banner h2 { margin: 0 0 4px; font-size: 1.02rem; letter-spacing: -.01em; }
.sync-banner.is-off h2 { color: var(--danger); }
.sync-banner.is-on h2 { color: var(--ok); }
.sync-banner p { margin: 4px 0 0; font-size: .89rem; max-width: 76ch; }
.sync-banner-why { font-weight: 650; }
.sync-banner-what { color: var(--muted); }
.sync-banner.is-off .sync-banner-what { color: color-mix(in srgb, var(--danger) 72%, var(--text)); }

.sync-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .sync-cards { grid-template-columns: 1fr 1fr; } }
.sync-cards .card + .card { margin-top: 0; }
.sync-card { display: flex; flex-direction: column; }
.sync-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.sync-card-head h2 { margin: 0; font-size: 1rem; flex: 1 1 auto; min-width: 0; }

.sync-facts { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.sync-fact {
  border-top: 1px solid var(--border); padding-top: 9px;
}
.sync-fact-k {
  font-size: .72rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.sync-fact-v { font-size: .89rem; margin-top: 3px; overflow-wrap: anywhere; }
.sync-fact.is-alert .sync-fact-k { color: var(--warn); }
.sync-fact.is-alert .sync-fact-v { font-weight: 600; }

.sync-emails { border-top: 1px solid var(--border); padding-top: 9px; }
.sync-emails ul { margin: 6px 0 0; padding-left: 18px; font-size: .86rem; }
.sync-emails li { margin-bottom: 3px; overflow-wrap: anywhere; }
.sync-email-flag { color: var(--warn); }
/* The lists on "Check the sheet first". A bucket somebody has to DO something
   about (nobody matched, could not be read) is marked the same way an alerting
   fact is — same colour, same weight — so the page has one visual vocabulary
   for "this one needs you". */
.sync-emails.is-alert .sync-fact-k { color: var(--warn); }
.sync-emails.is-alert li { font-weight: 600; }
.sync-emails.is-alert li .small { font-weight: 400; }

.sync-actions { margin-top: 14px; }
.sync-actions .btn { width: 100%; justify-content: center; }
.sync-refused {
  display: flex; gap: 7px; align-items: flex-start;
  margin: 9px 0 0; font-size: .82rem; color: var(--warn);
}
.sync-refused svg { flex: none; margin-top: 2px; }

.sync-dir { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }

/* The tuition text as her staff will actually receive it, blanks filled in. */
.trade-preview {
  margin: 0; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  white-space: pre-wrap; font-size: .92rem;
}

/* ---------- The rate pass (Admin › People › Rates) ----------
   The dialog she walks the roster in. `.walk` sits at the LEFT of the flex-end
   dialog footer (margin-right:auto) so Back / "12 of 48" / Next are together and
   the two Save buttons stay where the eye already looks for them. */

.walk { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; }

/* Find someone on the roster. Above the list on both layouts, because 48 rows
   is a scroll on a laptop and a very long scroll on a phone. */
.find-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.find-bar .input { max-width: 260px; }

/* "Copy rates from someone…" and the line saying it writes nothing. */
.copy-from { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }


/* ---------- Phone touch targets (MUST stay last) ----------
   Every interactive target clears 44px on phones, and form controls stay at
   16px so iOS never zooms the page on focus. These are same-specificity
   overrides of the component rules above, so source order is what makes them
   win — do not move this block up. */
@media (max-width: 899px) {
  .btn-sm { min-height: 44px; padding: 7px 14px; }
  .icon-btn { width: 44px; height: 44px; }
  .input, .select, .textarea, input, select, textarea { font-size: 16px; }
  .input-sm { min-height: 44px; }
  .seg button { min-height: 44px; }
  .seg-xs button { min-height: 36px; }
  .chip.ask-example { min-height: 44px; }
  .tabs a { min-height: 44px; display: inline-flex; align-items: center; }
  /* Dashboard: the nudge/dormant disclosure triangles are real tap targets. */
  .nudge-copy summary, .dormant summary, .pc-more summary { min-height: 44px; display: flex; align-items: center; }
  /* The nudge checkboxes are wrapped in a full-width <label> that is already
     44px tall, so the row IS the tap target; the box itself is grown too so
     aiming straight at it also works. */
  .nudge-selectall { min-height: 44px; }
  .nudge-row input[type="checkbox"], .nudge-selectall input[type="checkbox"] { width: 24px; height: 24px; }
}

/* ---------- Close and send to Erik (Admin › Periods, 2026-09-15) ---------- */
.period-send h3.period-send-h { margin: 0 0 10px; font-size: 1.02rem; }
.period-send-dl { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px 12px; margin: 0 0 12px; }
.period-send-dl dt { color: var(--muted); font-size: .85rem; padding-top: 1px; }
.period-send-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.period-send-addr { font-weight: 600; }
.period-send-warn {
  background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 0 0 12px; font-size: .9rem;
}
.period-send-note { margin: 0 0 12px; font-size: .9rem; }
.period-send-fail { margin: 0 0 8px; font-weight: 600; color: var(--danger); }
/* The actions sit in the body so each step can swap them. Stacked on a phone,
   primary on top where the thumb is; in a row, primary last, on wider screens. */
.period-send-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.period-send-acts .btn { min-height: 46px; width: 100%; }
@media (min-width: 560px) {
  .period-send-acts { flex-direction: row-reverse; justify-content: flex-start; flex-wrap: wrap; }
  .period-send-acts .btn { width: auto; min-height: 40px; }
}
.period-sent { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.period-sent-failed { color: var(--danger); }
.period-row-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Pay summary: find a person (2026-09-28) ---------- */
.summary-search { position: relative; margin: 0 0 8px; }
.summary-search-input { width: 100%; padding-right: 44px; }
.summary-search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--muted);
}
.summary-search-clear[hidden] { display: none; }
.summary-match { margin: 0 0 10px; }
@media (min-width: 900px) { .summary-search { max-width: 340px; } }

/* ---------- Dashboard + duplicates, 2026-09-30 ---------- */
.ny-topics { margin-top: 2px; }
.dash-topics { margin: 0 0 10px; }
.dup-looks { margin: 2px 0 8px; color: var(--text); }
.dup-ai-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.dup-ai { margin: 0; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.dup-ai .lbl { color: var(--muted); }
.dup-normal { margin-top: 12px; }
.dup-normal > summary { cursor: pointer; color: var(--muted); padding: 6px 0; }
.dup-normal-body { display: grid; gap: 10px; margin-top: 8px; }
.aud-what { display: grid; gap: 3px; min-width: 16ch; }
.aud-what .aud-mirror { justify-self: start; }
.aud-note { overflow-wrap: anywhere; }
.summary-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.summary-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.summary-filter { cursor: pointer; min-height: 34px; border: 1px solid var(--border); background: var(--surface); }
.summary-filter.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.summary-filter[disabled] { opacity: .45; cursor: default; }
.summary-sort { max-width: 46vw; }
@media (min-width: 900px) { .summary-sort, .summary-dir { display: none; } }
