/* ═══ components ═══════════════════════════════════════════════════════════
   The pieces sections build from: tiles, cards, bars, switches, badges, and
   the three states every asynchronous screen has.

   That last group is the reason this file exists as its own concern. LOADING,
   EMPTY and ERROR are not decoration — they are the states a screen spends
   most of its life in during the minute somebody is actually looking at it,
   and if they are styled per-section they get skipped in the sections nobody
   demoed. Defining them once means a new section gets them by writing one
   class name.

   The distinction this build keeps re-learning applies here too: EMPTY and
   ERROR must never render the same. "There are no erasure requests" and "the
   erasure request list could not be loaded" look identical if both render as
   a blank table, and one of them means somebody's statutory deadline is
   quietly not being tracked.                                                 */

/* ── tiles: one number, its label, and what it means ───────────────────── */
/* The number is the point, so it is large, tight and tabular. The label above
   it is small and quiet; the meaning below it is the sentence that stops the
   number being trivia. A tile with no third line is a tile that has told
   somebody a fact and left them to work out whether to care. */
.tile{
  position:relative;overflow:hidden;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:17px 18px;box-shadow:var(--shadow-sm);
  transition:box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
a.tile:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
/* A hairline of colour down the left edge, keyed to the tone. Enough to make a
   row of tiles readable at a glance without colouring the whole card, which
   would make four things shout at once. */
.tile::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--accent);opacity:0;transition:opacity var(--fast) var(--ease);
}
.tile.on::before{opacity:1}
.tile.good::before{background:var(--good);opacity:1}
.tile.bad::before{background:var(--critical);opacity:1}
.tile.warn::before{background:var(--warn);opacity:1}
/* Toned tiles wear a faint wash of their colour, not just the hairline — the
   dashboard reads at arm's length now, and a white card with red text was
   quieter than the fact it carried. */
.tile.on{background:linear-gradient(180deg,var(--surface),
  color-mix(in srgb,var(--accent-wash) 50%,var(--surface)))}
.tile.good{background:linear-gradient(180deg,var(--surface),
  color-mix(in srgb,var(--good-wash) 55%,var(--surface)))}
.tile.bad{background:linear-gradient(180deg,var(--surface),
  color-mix(in srgb,var(--critical-wash) 55%,var(--surface)))}
.tile.warn{background:linear-gradient(180deg,var(--surface),
  color-mix(in srgb,var(--warn-wash) 55%,var(--surface)))}
.tile .k{
  font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-3);margin-bottom:10px;
}
.tile .v{
  font-size:30px;font-weight:660;letter-spacing:-.032em;line-height:1;
  font-variant-numeric:tabular-nums;color:var(--ink);
}
.tile .v.sm{font-size:21px;letter-spacing:-.024em}
.tile .m{font-size:12px;color:var(--ink-3);margin-top:9px;line-height:1.45}
.tile .m.good{color:var(--good);font-weight:500}
.tile .m.bad{color:var(--critical);font-weight:500}
.tile .m.warn{color:var(--warn);font-weight:500}

/* ── cards ─────────────────────────────────────────────────────────────── */
.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:20px 21px;box-shadow:var(--shadow-sm);
}
.card + .card{margin-top:14px}
.card .cardhead{
  display:flex;align-items:baseline;justify-content:space-between;gap:14px;
  margin:-4px 0 16px;
}
.card .cardhead h2{margin:0}
/* A card whose heading is the thing to act on. The rule underneath separates
   the heading from a table without needing a whole extra element. */
.card.lead{border-color:color-mix(in srgb,var(--accent) 30%,var(--line));box-shadow:var(--shadow)}
.card.lead .cardhead{border-bottom:1px solid var(--line-2);padding-bottom:12px}

/* ── bars: a comparison, not a chart ───────────────────────────────────── */
.bars{display:flex;flex-direction:column;gap:13px;margin-top:4px}
.barrow{display:grid;grid-template-columns:132px 1fr 74px;align-items:center;gap:13px}
.barrow .lab{font-size:13px;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.track{height:9px;background:var(--line-2);border-radius:99px;overflow:hidden}
.fill{height:100%;background:var(--accent);border-radius:99px;width:0;transition:width .7s var(--ease)}
.fill.bad{background:var(--critical)}
.fill.good{background:var(--good)}
.barrow .val{font-size:13px;text-align:right;font-variant-numeric:tabular-nums;color:var(--ink)}

/* ── badges ────────────────────────────────────────────────────────────── */
.pill{
  display:inline-block;font-size:10.5px;font-weight:600;letter-spacing:.03em;
  text-transform:uppercase;padding:3px 7px;border-radius:5px;
  background:var(--accent-wash);color:var(--accent-ink);white-space:nowrap;
}
.pill.good{background:var(--good-wash);color:var(--good)}
.pill.bad{background:var(--critical-wash);color:var(--critical)}
.pill.info{background:var(--info-wash);color:var(--info)}
.pill.violet{background:var(--violet-wash);color:var(--violet)}
.pill.warn{background:var(--warn-wash);color:var(--warn)}
.pill.quiet{background:var(--line-2);color:var(--ink-3)}
/* For identifiers. A key id is case-sensitive, and a pill that renders `k1` as
   `K1` is not styling — it is showing a different value than the one stored. */
.pill.exact{text-transform:none;font-family:var(--mono);letter-spacing:0;font-weight:500}

/* ── notes and callouts ────────────────────────────────────────────────── */
.note{
  padding:11px 13px;border-radius:9px;background:var(--accent-wash);
  color:var(--accent-ink);font-size:12.5px;line-height:1.55;
}
.note + .note{margin-top:8px}
.note.bad{background:var(--critical-wash);color:var(--critical)}
.note.warn{background:var(--warn-wash);color:var(--warn)}
.note.good{background:var(--good-wash);color:var(--good)}
.note.quiet{background:color-mix(in srgb,var(--ink) 4%,transparent);color:var(--ink-2)}
.note b{font-weight:600}
.note ul{margin:8px 0 0;padding-left:18px}
.note li{margin-bottom:4px}

/* Statute citations. Small, monospaced, and never the loudest thing in a row —
   they are provenance, not the finding. */
.cite{font-family:var(--mono);font-size:11px;color:var(--ink-3);letter-spacing:0}

/* ── module switches ───────────────────────────────────────────────────── */
.mod{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:15px 16px;display:flex;flex-direction:column;gap:9px;
  transition:border-color .2s var(--ease);
}
.mod.on{border-color:color-mix(in srgb,var(--accent) 38%,var(--line))}
.mod .top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.mod .nm{font-size:14px;font-weight:560;letter-spacing:-.012em}
.mod .tg{font-size:12.5px;color:var(--ink-2);line-height:1.45}
.mod .meta{font-size:11.5px;color:var(--ink-3);line-height:1.5}
.sw{
  position:relative;width:38px;height:22px;border-radius:99px;background:var(--line);
  transition:background .22s var(--ease);flex:none;
}
.sw::after{
  content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:99px;
  background:var(--knob);box-shadow:0 1px 3px rgba(0,0,0,.24);transition:transform .22s var(--ease);
}
.sw.on{background:var(--accent)}
.sw.on::after{transform:translateX(16px)}
.sw[disabled]{cursor:not-allowed}
/* Locked-on stays fully on. Fading it read as "half on", which is not a state
   this product has — it is on, and something else needs it that way. */
.sw.locked{background:color-mix(in srgb,var(--accent) 42%, var(--line))}
.sw.locked::after{box-shadow:0 1px 2px rgba(0,0,0,.18)}

/* ── loading / empty / error ───────────────────────────────────────────── */
.skel{
  background:linear-gradient(90deg,var(--line-2) 25%,var(--line) 37%,var(--line-2) 63%);
  background-size:400% 100%;border-radius:6px;height:13px;
  animation:shimmer 1.4s ease-in-out infinite;
}
.skel + .skel{margin-top:10px}
.skel.w60{width:60%} .skel.w40{width:40%} .skel.w80{width:80%}
@keyframes shimmer{0%{background-position:100% 0}100%{background-position:0 0}}

.state{
  text-align:center;padding:46px 24px;border:1px dashed var(--line);
  border-radius:var(--r);color:var(--ink-2);
}
.state .h{font-size:14.5px;font-weight:560;color:var(--ink);margin-bottom:6px}
.state .b{font-size:13px;line-height:1.6;max-width:52ch;margin:0 auto}
.state .actions{margin-top:16px;display:flex;gap:8px;justify-content:center}
/* An error is not an empty list with sadder wording. It is bordered, tinted,
   left-aligned and carries what actually failed. */
.state.error{
  border:1px solid color-mix(in srgb,var(--critical) 34%,var(--line));
  background:var(--critical-wash);text-align:left;padding:18px 19px;
}
.state.error .h{color:var(--critical)}
.state.error .b{margin:0;max-width:none}
.state.error .detail{
  font-family:var(--mono);font-size:11.5px;margin-top:10px;color:var(--ink-2);
  white-space:pre-wrap;word-break:break-word;
}

/* ── page transition ───────────────────────────────────────────────────── */
.pageenter{animation:pagein .3s var(--ease)}
@keyframes pagein{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* ── the honest placeholder ────────────────────────────────────────────── */
/* Sections with no back end yet. Styled to look UNFINISHED on purpose: a
   placeholder that looks like a finished screen is how a demo becomes a
   promise nobody remembers making. */
.stub{
  border:1px dashed var(--line);border-radius:var(--r);padding:24px 22px;
  background:repeating-linear-gradient(135deg,transparent,transparent 9px,
    color-mix(in srgb,var(--ink) 2%,transparent) 9px,
    color-mix(in srgb,var(--ink) 2%,transparent) 18px);
}
.stub h2{margin-bottom:8px}
.stub .b{font-size:13.5px;line-height:1.6;color:var(--ink-2);max-width:64ch}
.stub .what{margin-top:16px}
.stub .what li{font-size:13px;color:var(--ink-2);margin-bottom:6px;line-height:1.5}

/* ── platform console ──────────────────────────────────────────────────── */
/* A company row reads as an entity, not a string: the badge gives the eye
   something to land on when there are forty of them. */
.orgrow{display:inline-flex;align-items:center;gap:10px}
.initials{
  width:34px;height:34px;border-radius:9px;flex:none;display:grid;place-items:center;
  background:var(--accent-wash);color:var(--accent-ink);
  font-size:12px;font-weight:600;letter-spacing:.01em;
}
.initials.sm{width:26px;height:26px;border-radius:7px;font-size:10.5px}

.supportrow{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;
  padding:11px 0;border-bottom:1px solid var(--line-2);
}
.supportrow:last-child{border-bottom:0;padding-bottom:0}
.supportrow .pill{margin-left:6px}

/* An empty bar still needs to be visible, or a plan with no companies looks
   like a rendering failure rather than a plan nobody is on. */
.fill.empty{background:var(--line);min-width:2px}

/* ── modals ────────────────────────────────────────────────────────────── */
/* A real <dialog>, so the focus trap, Escape and the inert background come from
   the browser. The roster check lives in one of these and must not be
   dismissable by clicking past it: "fourteen people are not in this sheet"
   scrolling away behind a click is the same as never having checked. */
.modal{
  border:1px solid var(--line); border-radius:14px; padding:0;
  background:var(--surface); color:var(--ink);
  width:min(560px, calc(100vw - 32px)); max-height:min(78vh, 720px);
  box-shadow:0 24px 64px -18px rgba(15,23,42,.34), 0 2px 8px rgba(15,23,42,.06);
}
.modal.wide{width:min(820px, calc(100vw - 32px))}
/* The editor that IS the screen for a moment — his ask: full screen, stable.
   One fixed height whatever the content, so adding or removing a component
   never resizes the frame under the pointer; only the body scrolls. */
.modal.full{
  width:min(1180px, calc(100vw - 28px));
  height:min(92vh, 1040px); max-height:none;
}
.modal.full .modalform{height:100%;max-height:none}
.modal.full .modalbody{flex:1}
.modal::backdrop{
  background:color-mix(in srgb, var(--plane) 66%, transparent);
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
}
.modal[open]{animation:modalin .22s var(--ease)}
@keyframes modalin{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.modalform{display:flex;flex-direction:column;max-height:inherit;min-height:0}
.modalhead{padding:18px 22px 14px}
.modalhead h2{margin:0;font-size:17px;letter-spacing:-.02em}
.modalbody{
  padding:0 22px 16px;overflow:auto;font-size:13.5px;line-height:1.6;
  /* Hairlines top and bottom, so a body with more content below the fold reads
     as scrollable. Without them the roster check ends mid-sentence and looks
     like a rendering bug rather than a list somebody should scroll. */
  border-top:1px solid var(--line-2);border-bottom:1px solid var(--line-2);
  padding-top:14px;
}
/* Chromium makes a scrollable region keyboard-focusable and gives it the
   default focus ring, which lands a hard blue bar across the modal the moment
   it opens. Keeping the ring for keyboard focus and dropping it otherwise is
   the accessible version of removing it. */
.modalbody:focus{outline:none}
.modalbody:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--accent)}
.modalbody > :first-child{margin-top:0}
.modalfoot{
  display:flex;justify-content:flex-end;gap:8px;
  padding:14px 22px 16px;margin-top:auto;
}
.modal.bad .modalhead h2{color:var(--critical)}

/* A block of named problems inside a modal. Names, not counts: "3 employees
   have no attendance" sends somebody to a spreadsheet to find out which. */
.problem{
  border:1px solid var(--line); border-left:3px solid var(--critical);
  border-radius:9px; padding:12px 14px; margin-bottom:10px;
  background:var(--critical-wash);
}
.problem.soft{border-left-color:var(--warn);background:var(--warn-wash)}
.problem .ph{font-size:13.5px;font-weight:560;color:var(--ink);margin-bottom:5px}
.problem .pd{font-size:12.5px;color:var(--ink-2);line-height:1.55}
.problem ul{margin:9px 0 0;padding-left:17px;max-height:180px;overflow:auto}
.problem li{font-size:12.5px;color:var(--ink-2);margin-bottom:4px;line-height:1.5}
.problem .ov{
  display:flex;align-items:flex-start;gap:8px;margin-top:11px;padding-top:10px;
  border-top:1px solid color-mix(in srgb,var(--ink) 8%,transparent);
  font-size:12.5px;color:var(--ink-2);
}
.problem .ov input{width:auto;margin-top:2px;flex:none}
/* A problem nobody can override says so, rather than showing a disabled
   checkbox that reads as "not ticked yet". */
.problem .locked{
  margin-top:10px;font-size:11.5px;color:var(--critical);
  font-weight:500;letter-spacing:.01em;
}

/* ── a balance, as a number somebody can act on ────────────────────────── */
.balgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.bal{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:15px 16px}
.bal .bc{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.bal .bl{font-size:13px;color:var(--ink-2)}
.bal .bv{font-size:24px;font-weight:590;letter-spacing:-.026em;font-variant-numeric:tabular-nums}
/* Available and balance are DIFFERENT numbers when something is awaiting
   approval, and showing only the first is how two requests overdraw one
   balance. Both, always, with the difference named. */
.bal .bm{font-size:11.5px;color:var(--ink-3);margin-top:8px;line-height:1.5}
.bal .bm.held{color:var(--warn)}

/* ── a compact timeline of ledger movements ────────────────────────────── */
.mv{display:flex;gap:11px;padding:8px 0;border-bottom:1px solid var(--line-2);font-size:12.5px}
.mv:last-child{border-bottom:0}
.mv .md{color:var(--ink-3);white-space:nowrap;font-variant-numeric:tabular-nums;min-width:82px}
.mv .mn{color:var(--ink-2);flex:1;line-height:1.5}
.mv .mq{font-variant-numeric:tabular-nums;font-weight:560;white-space:nowrap}
.mv .mq.up{color:var(--good)}
.mv .mq.down{color:var(--critical)}

/* ── toasts ────────────────────────────────────────────────────────────────
   Bottom-right, stacked, and narrow enough that they never cover the table
   somebody is reading. A toast that has to be moved out of the way to see the
   thing it is describing is a modal with extra steps.                       */
.toasts{
  position:fixed;right:18px;bottom:18px;z-index:60;
  display:flex;flex-direction:column;gap:9px;
  max-width:min(380px,calc(100vw - 36px));pointer-events:none;
}
.toast{
  pointer-events:auto;display:flex;gap:10px;align-items:flex-start;
  background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--good);
  border-radius:var(--r-sm);box-shadow:var(--shadow-lg);
  padding:11px 12px 11px 13px;
  animation:toastin var(--mid) var(--ease);
}
.toast.warn{border-left-color:var(--warn)}
.toast.bad{border-left-color:var(--critical)}
.toast.quiet{border-left-color:var(--ink-4)}
.toast .tbody{flex:1;min-width:0}
.toast .tmsg{font-size:13px;font-weight:560;color:var(--ink);line-height:1.45}
.toast .tdet{font-size:11.5px;color:var(--ink-3);margin-top:3px;line-height:1.5}
.toast .tx{
  background:none;border:0;cursor:pointer;font-size:17px;line-height:1;
  color:var(--ink-4);padding:0 2px;margin-top:-1px;
}
.toast .tx:hover{color:var(--ink-2)}
.toast.going{animation:toastout 200ms var(--ease) forwards}
@keyframes toastin{from{opacity:0;transform:translateY(9px) scale(.985)}
                   to{opacity:1;transform:none}}
@keyframes toastout{to{opacity:0;transform:translateX(14px)}}
@media (prefers-reduced-motion:reduce){
  .toast{animation:none}
  .toast.going{animation:none;opacity:0}
}

/* ── sortable headers and the table toolbar ──────────────────────────────── */
.tbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:-2px 0 11px;
}
.tbar .thint{font-size:11.5px;color:var(--ink-3)}
table.sortable thead th[data-sortable]{
  cursor:pointer;user-select:none;position:relative;
  transition:color var(--fast) var(--ease);
}
table.sortable thead th[data-sortable]:hover,
table.sortable thead th[data-sortable]:focus-visible{color:var(--accent)}
table.sortable thead th[data-sortable]:focus-visible{outline:none;box-shadow:var(--ring)}
/* The arrow occupies its space whether or not the column is the sorted one, so
   a header does not shift sideways when clicked. */
.sarr{display:inline-block;width:11px;margin-left:5px;opacity:0}
th[data-sortable]:hover .sarr{opacity:.42}
th[aria-sort] .sarr{opacity:1;color:var(--accent)}
th[aria-sort=ascending] .sarr::after{content:"\2191"}
th[aria-sort=descending] .sarr::after{content:"\2193"}
th[data-sortable]:not([aria-sort]) .sarr::after{content:"\2195"}

/* ── the command palette ───────────────────────────────────────────────────
   Anchored near the top rather than centred. A centred box jumps as results
   arrive; one pinned to a top offset grows downwards, so the input stays
   exactly where the eye left it and under the cursor that opened it.        */
.palettescrim{
  position:fixed;inset:0;z-index:70;
  background:color-mix(in srgb,var(--ink) 26%,transparent);
  backdrop-filter:blur(2px);
  animation:fade var(--fast) var(--ease);
}
.palette{
  position:fixed;z-index:71;left:50%;top:88px;transform:translateX(-50%);
  width:min(620px,calc(100vw - 32px));
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow-lg);overflow:hidden;
  animation:palettein var(--mid) var(--ease);
}
.palette .pinput{
  display:flex;align-items:center;gap:10px;padding:13px 15px;
  border-bottom:1px solid var(--line);color:var(--ink-3);
}
.palette .pinput input{
  flex:1;border:0;background:none;padding:0;font-size:15px;color:var(--ink);
}
.palette .pinput input:focus{outline:none;box-shadow:none}
.palette kbd{
  font:inherit;font-size:10.5px;letter-spacing:.04em;color:var(--ink-4);
  border:1px solid var(--line);border-radius:4px;padding:2px 5px;
}
.presults{max-height:min(58vh,460px);overflow:auto;padding:6px}
.pgroup + .pgroup{border-top:1px solid var(--line-2);margin-top:6px;padding-top:6px}
.phead{
  font-size:10px;font-weight:650;letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-4);padding:6px 10px 4px;
}
.presult{
  padding:8px 10px;border-radius:var(--r-sm);cursor:pointer;
  border-left:2px solid transparent;
}
.presult.on{background:var(--accent-wash);border-left-color:var(--accent)}
.presult .pmain{font-size:13.5px;font-weight:560;color:var(--ink)}
.presult .pmeta{font-size:11.5px;color:var(--ink-3);margin-top:2px}
.presult .ptag{
  font-size:10px;text-transform:uppercase;letter-spacing:.05em;
  border:1px solid currentColor;border-radius:3px;
  padding:0 4px;margin-left:6px;vertical-align:1px;
  color:var(--ink-4);
}
/* On notice and gone are worth an amber; on probation is worth a mention and
   not an alarm. A tag that shouts for every state is a tag nobody reads. */
.presult .ptag.warn{color:var(--warn)}
.pnote{padding:14px 12px;font-size:12.5px;color:var(--ink-3);line-height:1.6}
.pnote.bad{color:var(--critical)}
@keyframes palettein{from{opacity:0;transform:translateX(-50%) translateY(-8px) scale(.99)}
                     to{opacity:1;transform:translateX(-50%)}}
@keyframes fade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){
  .palette,.palettescrim{animation:none}
}

/* ── a settings row ────────────────────────────────────────────────────────
   The whole design goal is that a CHOSEN setting and a product DEFAULT do not
   look alike. A page of filled-in fields claims the company configured all of
   it; the accent rail says which ones it actually did.                      */
.setrow{padding:16px 0;border-bottom:1px solid var(--line-2)}
.setrow:last-child{border-bottom:0;padding-bottom:2px}
.setrow.chosen{
  border-left:2px solid var(--accent);
  margin-left:-15px;padding-left:13px;
}
.sethead{display:flex;align-items:center;gap:9px;margin-bottom:8px;flex-wrap:wrap}
.sethead label{margin:0;font-size:13.5px;font-weight:560;color:var(--ink)}
.setctl{display:flex;align-items:center;gap:9px;max-width:340px}
.setctl input[type=number]{max-width:120px}
.setunit{font-size:12.5px;color:var(--ink-3);white-space:nowrap}
.seteffect{font-size:12.5px;color:var(--ink-2);margin-top:9px;line-height:1.6;max-width:70ch}
/* A caution is a statutory consequence, not a hint. It gets a rule of its own
   so it cannot be skimmed past as more help text. */
.setcaution{
  font-size:12px;color:var(--ink-2);margin-top:8px;line-height:1.6;max-width:70ch;
  border-left:2px solid var(--warn);padding-left:10px;
}
.setdefault{font-size:11.5px;color:var(--ink-3);margin-top:7px}
.switch{display:flex;align-items:center;gap:8px;margin:0;cursor:pointer}
.switch input{width:auto;margin:0}
.switch span{font-size:13px;color:var(--ink-2)}

/* ── who is away ───────────────────────────────────────────────────────────
   A row per day, not a seven-column month grid. The grid looks more like a
   calendar and answers the question worse: the cells are too small for names,
   so they hold counts, and a count sends the reader hunting for who.        */
.awaylist{display:flex;flex-direction:column}
.awayday{
  display:flex;gap:14px;align-items:flex-start;
  padding:7px 10px;border-bottom:1px solid var(--line-2);border-left:2px solid transparent;
}
.awayday:last-child{border-bottom:0}
/* A closed day is not an empty day. Nobody is in on Independence Day either,
   and a grid that draws the two the same gets checked against a paper one. */
.awayday.closed{background:var(--sunk);color:var(--ink-3)}
.awayday.busy{border-left-color:var(--warn)}
.awaydate{display:flex;align-items:baseline;gap:6px;min-width:56px}
.awaydate .dnum{font-size:14px;font-weight:590;font-variant-numeric:tabular-nums}
.awaydate .ddow{font-size:10.5px;color:var(--ink-4);text-transform:uppercase;
                letter-spacing:.05em}
.awaywho{display:flex;flex-wrap:wrap;gap:5px;align-items:center;
         font-size:12.5px;padding-top:1px;min-height:20px}
.awayperson{
  background:var(--accent-wash);color:var(--accent-ink);
  border:1px solid color-mix(in srgb,var(--accent) 24%,transparent);
  border-radius:4px;padding:1px 7px;font-size:12px;
}
/* A submitted request is a PLAN. Drawn solid, it is a week somebody plans
   around that may never be taken; left out, it is a week they overfill. */
.awayperson.plan{
  background:transparent;color:var(--ink-2);border-style:dashed;
  border-color:var(--ink-4);
}

/* ── job and salary history ────────────────────────────────────────────────
   The two timelines run side by side rather than merged. A promotion and a pay
   rise usually happen together and sometimes do not, and a merged list has to
   invent a row for whichever half did not move.                            */
.tlhead{
  font-size:10.5px;font-weight:650;letter-spacing:.07em;text-transform:uppercase;
  color:var(--ink-4);margin:0 0 8px;
}
.statusline{display:flex;flex-wrap:wrap;gap:7px}
.statuschip{
  display:inline-flex;gap:7px;align-items:baseline;
  background:var(--sunk);border-radius:var(--r-sm);padding:4px 9px;font-size:12px;
}
.statuschip .dim{font-size:11px;font-variant-numeric:tabular-nums}
td .up{color:var(--good)}
td .down{color:var(--critical)}

/* ── the attendance day book ───────────────────────────────────────────────
   A month grid, because the question is "which days" and a total cannot be
   argued with. Narrow cells, one letter each, and the source shown as a dot
   rather than a second colour — a cell carrying two colour meanings is a cell
   nobody reads correctly.                                                   */
.daybook{overflow-x:auto}
table.grid{border-collapse:separate;border-spacing:0;font-size:11.5px;width:auto}
table.grid th{padding:0 0 7px;font-size:9.5px;text-align:center;min-width:19px}
table.grid th.who,table.grid td.who{
  text-align:left;position:sticky;left:0;background:var(--surface);
  padding-right:14px;min-width:150px;z-index:1;
}
table.grid th.weekend{color:var(--ink-4)}
table.grid td.mark{
  text-align:center;padding:3px 0;border:1px solid var(--line-2);
  font-variant-numeric:tabular-nums;position:relative;min-width:19px;
}
table.grid td.mark.weekend{background:var(--sunk)}
table.grid td.mark.ok{background:var(--good-wash);color:var(--good)}
table.grid td.mark.bad{background:var(--critical-wash);color:var(--critical);font-weight:600}
table.grid td.mark.leave{background:var(--accent-wash);color:var(--accent-ink)}
/* two-letter leave codes (CL, EL, SL) in the same 19px cell */
table.grid td.mark.leave{font-size:9.5px;font-weight:650;letter-spacing:-.2px}
table.grid td.mark.warn{background:var(--warn-wash);color:var(--warn)}
table.grid td.mark.off{color:var(--ink-4)}
table.grid td.mark i{
  position:absolute;top:0;right:2px;font-size:13px;line-height:1;font-style:normal;
  color:var(--ink-3);
}
table.grid td.num{padding:3px 7px;text-align:right;font-variant-numeric:tabular-nums}
.legend{display:flex;flex-wrap:wrap;gap:14px;margin-top:12px;font-size:11.5px;
        color:var(--ink-3)}
.legend b{color:var(--ink-2);font-variant-numeric:tabular-nums}

/* ── the device format catalogue ───────────────────────────────────────────
   Shown in full rather than hidden behind the registration dropdown: "which of
   these is my terminal" is answered by reading the notes, and a dropdown does
   not let anybody read them.                                                */
.formatgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
.formatcard{
  background:var(--sunk);border-radius:var(--r-sm);padding:12px 13px;font-size:13px;
}

/* ── the work board ────────────────────────────────────────────────────────
   Columns scroll horizontally rather than wrapping. A board that wraps stops
   being a board — the whole affordance is that the columns are a row you can
   read left to right, and six of them on two lines reads as two boards.     */
.boardscroll{overflow-x:auto;padding-bottom:6px}
.board{display:flex;gap:12px;align-items:flex-start;min-width:min-content}
.bcol{
  flex:0 0 268px;background:var(--sunk);border-radius:var(--r);padding:10px;
}
.bcol.retired{opacity:.72;outline:1px dashed var(--warn)}
.bhead{display:flex;align-items:center;gap:8px;padding:2px 4px 10px}
.bhead .bname{font-size:12.5px;font-weight:590;color:var(--ink-2)}
.bhead .bcount{
  font-size:11px;color:var(--ink-3);background:var(--surface);
  border-radius:9px;padding:1px 7px;font-variant-numeric:tabular-nums;
}
.bbody{display:flex;flex-direction:column;gap:8px;min-height:56px;border-radius:var(--r-sm)}
.bbody.over{outline:2px dashed var(--accent);outline-offset:2px;background:var(--accent-wash)}
.bempty{font-size:11.5px;color:var(--ink-4);padding:12px 6px;text-align:center}
.bcard{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);
  padding:10px 11px;cursor:pointer;
  transition:box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.bcard:hover{box-shadow:var(--shadow-sm);transform:translateY(-1px)}
.bcard.dragging{opacity:.45}
/* Late is a left rail rather than a red card. A whole card in the critical
   colour on a board with nine of them makes the board unreadable, and the
   point of the mark is that the eye finds it — not that it shouts. */
.bcard.late{border-left:2px solid var(--critical)}
.bcard .bref{
  display:flex;align-items:center;gap:6px;font-size:10.5px;color:var(--ink-4);
  font-family:var(--mono);margin-bottom:4px;
}
.bcard .btitle{font-size:13px;line-height:1.45;color:var(--ink);font-weight:540}
.bcard .bmeta{
  display:flex;flex-wrap:wrap;gap:8px;margin-top:7px;font-size:11px;color:var(--ink-3);
}
.bcard .bmeta .bad{color:var(--critical)}
.bcard .bgroup{
  background:var(--accent-wash);color:var(--accent-ink);border-radius:3px;padding:0 5px;
}
.bcard .brecur{color:var(--ink-4)}
.bcard .bwho{margin-top:7px;font-size:11.5px;color:var(--ink-2)}
.bcard .bwho.none{color:var(--ink-4);font-style:italic}

/* ── a task's history, in the drawer ───────────────────────────────────── */
.tlist{display:flex;flex-direction:column;gap:6px}
.titem{display:flex;gap:9px;font-size:11.5px;line-height:1.5;align-items:baseline}
.titem .tw{color:var(--ink-4);font-variant-numeric:tabular-nums;white-space:nowrap}
.titem .te{color:var(--ink-2);font-weight:560;white-space:nowrap}
.titem .td{color:var(--ink-3)}

/* ── capacity ──────────────────────────────────────────────────────────── */
.loadbar{
  width:78px;height:6px;background:var(--sunk);border-radius:3px;overflow:hidden;
  display:inline-block;vertical-align:middle;
}
.loadbar span{display:block;height:100%;background:var(--accent);border-radius:3px}
.loadbar span.over{background:var(--critical)}

/* ── the readiness checklist ───────────────────────────────────────────────
   A row per check: what it is, what it blocks, what breaks quietly if it is
   ignored, and a way to go and fix it. The left rail is coloured by severity
   rather than the whole row, because a screen of six amber blocks reads as an
   emergency and most of these are not one. */
.checkrows{display:flex;flex-direction:column;gap:2px}
.checkrow{
  display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:start;
  padding:13px 14px;border-radius:var(--r-sm);
  border-left:3px solid var(--line);
}
.checkrow.blocker{border-left-color:var(--critical);background:var(--critical-wash)}
.checkrow.gap{border-left-color:var(--warn);background:var(--warn-wash)}
.checkrow.advisory{border-left-color:var(--line-2)}
.checkrow + .checkrow{margin-top:4px}
.checkmark{min-width:112px}
.checkbody{min-width:0}
.checktitle{margin:0 0 4px;font-size:13.5px;font-weight:600;color:var(--ink)}
.checkbody .help{margin:2px 0 0}
.checkfix{white-space:nowrap}
@media (max-width:720px){
  .checkrow{grid-template-columns:1fr;gap:8px}
  .checkmark{min-width:0}
}

/* ── the salary breakdown chips ────────────────────────────────────────────
   Replaces one column per component. Four fitted; a company's own catalogue
   does not, and a thirteen-column table pushed the figure anybody came for —
   what this person costs a month — behind seven columns of dashes. */
.breakdown{display:flex;flex-wrap:wrap;gap:4px;max-width:380px}
.bchip{
  display:inline-flex;align-items:baseline;gap:5px;
  padding:2px 7px;border-radius:var(--r-sm);
  background:var(--accent-wash);font-size:11px;line-height:1.6;
}
.bchip .bk{color:var(--accent-ink);opacity:.8}
.bchip .bv{color:var(--accent-ink);font-weight:650;font-variant-numeric:tabular-nums}
/* A deduction chip is money going the other way, and must not dress like pay. */
.bchip.minus{background:var(--critical-wash)}
.bchip.minus .bk,.bchip.minus .bv{color:var(--critical)}

/* Two columns of component inputs in the editor, one on a narrow screen. */
.compgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
@media (max-width:640px){ .compgrid{grid-template-columns:1fr} }

/* Which statutory job a component does, beside its label. */
.rolechip{
  display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;
  background:var(--accent-wash);color:var(--accent);
  font-size:10px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;
}

/* ── letters ───────────────────────────────────────────────────────────────*/
.starters{display:flex;flex-wrap:wrap;gap:8px}
.fieldlist{display:grid;grid-template-columns:1fr 1fr;gap:4px 20px}
.fieldrow{display:flex;gap:10px;align-items:baseline;font-size:12px}
.fieldrow code{
  font-family:var(--mono);font-size:11.5px;color:var(--accent);
  background:var(--accent-wash);padding:1px 5px;border-radius:var(--r-sm);
  white-space:nowrap;
}
.letterpreview{
  white-space:pre-wrap;font-family:var(--mono);font-size:12px;line-height:1.65;
  background:var(--line-2);padding:16px;border-radius:var(--r-sm);
  max-height:52vh;overflow:auto;margin:0;color:var(--ink);
}
tr.retired td{opacity:.55}
.checkline{display:flex;gap:9px;align-items:flex-start;margin-top:10px}
.checkline input[type=checkbox]{width:auto;margin-top:2px}
@media (max-width:720px){ .fieldlist{grid-template-columns:1fr} }

/* ── the employee editor ───────────────────────────────────────────────────
   Sections that save independently, because they are different acts with
   different authority — identity and job are HR's, the bank account is the
   payroll seat's. One big Save would couple four permissions into one button. */
dialog.modal.editor{max-width:760px;width:92vw}
.editsec{padding:14px 0 18px;border-top:1.5px solid var(--line)}
.editsec:first-child{border-top:0;padding-top:2px}
.editsec h3{margin:0 0 12px;font-size:13px;letter-spacing:.01em;color:var(--ink)}
.editsec .btn{margin-top:4px}

/* ── the guided pay run ──────────────────────────────────────────────────── */
/* Five numbered steps down the page. Done steps collapse to a receipt line,
   the current one carries its working area and ONE primary button, the ones
   ahead are dim with what they will need. The rail connects the numbers. */
.gflow{margin-top:6px}
.gstep{display:flex;gap:14px;position:relative;padding-bottom:18px}
.gstep:last-child{padding-bottom:2px}
.gstep::before{
  content:"";position:absolute;left:14px;top:30px;bottom:-2px;width:2px;
  background:var(--line);
}
.gstep:last-child::before{display:none}
.gstep.done::before{background:color-mix(in srgb,var(--accent) 45%,var(--line))}
.gnum{
  width:29px;height:29px;border-radius:50%;flex:none;z-index:1;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;
  background:var(--plane);border:2px solid var(--line);color:var(--ink-3);
}
.gstep.done .gnum{
  background:linear-gradient(135deg,var(--accent),var(--violet));
  border-color:transparent;color:var(--on-accent);font-size:14px;
  box-shadow:0 2px 6px color-mix(in srgb,var(--accent) 30%,transparent);
}
.gstep.current .gnum{
  background:var(--accent-wash);border-color:var(--accent);color:var(--accent-ink);
  box-shadow:0 0 0 4px var(--accent-wash);
}
.gbody{flex:1;min-width:0;padding-top:4px}
.ghead{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;font-size:14px}
.ghead b{letter-spacing:-.01em}
.gstep.ahead .ghead b{color:var(--ink-3);font-weight:600}
.gstep.done .ghead b{color:var(--ink-2)}
.grec{font-size:12px;color:var(--ink-3)}
.gstep.ahead .grec{font-style:italic}
.gcard{
  margin-top:10px;padding:15px 17px;border:1.5px solid
  color-mix(in srgb,var(--accent) 30%,var(--line));
  border-radius:var(--r-sm);
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--accent-wash) 45%,var(--surface)), var(--surface) 70px);
  box-shadow:var(--shadow);
}

/* Card-heading identity dots — a small coloured mark before a working card's
   title, so One-time pay, Held salaries and the payslip table stop reading as
   three identical white slabs. */
.hdot{
  display:inline-block;width:9px;height:9px;border-radius:50%;
  margin-right:8px;vertical-align:1px;
}
.hdot.violet{background:var(--violet)}
.hdot.warn{background:var(--warn)}
.hdot.accent{background:var(--accent)}
.hdot.good{background:var(--good)}
.hdot.info{background:var(--info)}

/* The gather tiles in miniature — pinned under the ✓ step so the month's
   inputs stay VISIBLE after locking, instead of vanishing into a receipt. */
.gmini{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.gmini .stchip{font-size:11.5px}

/* Attendance-first: until something is recorded, the later tiles wait —
   his competitor's ordering, said with saturation instead of a lock. */
.ptile.waiting{opacity:.55;filter:saturate(.55)}
.ptile.waiting .pm::after{content:" — attendance first";color:var(--ink-4)}
.gacts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.gcard .card{box-shadow:none;border:1px solid var(--line);margin:10px 0}
.gpart{
  display:inline-flex;align-items:center;gap:7px;
  font-size:10.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--accent-ink);background:var(--accent-wash);
  border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));
  padding:4px 12px;border-radius:99px;margin:2px 0 12px 43px;
}
.gpart::before{
  content:"";width:7px;height:7px;border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--violet));
}
.gstep+.gpart,.gstep~.gpart{margin-top:10px}

/* The prepare-step's action tiles — the SHRMpro wall of doors, tastefully. */
.ptiles{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:10px;margin:0 0 12px;
}
.ptile{
  display:block;border:1px solid var(--line);border-radius:var(--r-sm);
  padding:11px 13px;background:var(--plane);text-decoration:none;color:inherit;
  transition:box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
  cursor:pointer;
}
.ptile:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
.ptile .pt{font-size:11px;font-weight:700;letter-spacing:.05em;
  text-transform:uppercase;color:var(--ink-3)}
.ptile .pv{font-size:21px;font-weight:700;letter-spacing:-.02em;color:var(--ink);
  margin:3px 0 1px;font-variant-numeric:tabular-nums}
.ptile .pm{font-size:11.5px;color:var(--ink-3);line-height:1.45}
.ptile .pa{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.ptile.accent{background:var(--accent-wash);border-color:color-mix(in srgb,var(--accent) 30%,var(--line))}
.ptile.accent .pt{color:var(--accent-ink)}
.ptile.good{background:var(--good-wash);border-color:color-mix(in srgb,var(--good) 30%,var(--line))}
.ptile.good .pt{color:var(--good)}
.ptile.warn{background:var(--warn-wash);border-color:color-mix(in srgb,var(--warn) 35%,var(--line))}
.ptile.warn .pt{color:var(--warn)}
.ptile.violet{background:var(--violet-wash);border-color:color-mix(in srgb,var(--violet) 30%,var(--line))}
.ptile.violet .pt{color:var(--violet)}
.ptile.info{background:var(--info-wash);border-color:color-mix(in srgb,var(--info) 30%,var(--line))}
.ptile.info .pt{color:var(--info)}

/* ── home dashboard charts ───────────────────────────────────────────────── */
/* The deductions chart carries its labels ON the rows, so it has no legend —
   the old `.chartlegend .sw` swatches collided with the settings toggle's
   `.sw` class and rendered as five switch knobs. */
.chartcard svg{display:block;width:100%;height:auto}

/* ── table pagination ────────────────────────────────────────────────────── */
.tpager{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap;padding:10px 2px 0;
}
.tpleft{display:inline-flex;align-items:center;gap:12px;flex-wrap:wrap}
.tplabel{
  display:inline-flex;align-items:center;gap:7px;
  font-size:12.5px;color:var(--ink-2);white-space:nowrap;
}
.tplabel input[data-pginput]{
  width:52px;padding:4px 6px;text-align:center;font-size:12.5px;
  font-variant-numeric:tabular-nums;
}
.tplabel select[data-pgsize]{width:auto;padding:4px 26px 4px 8px;font-size:12.5px}
.tpdiv{width:1px;height:18px;background:var(--line)}
.tpinfo{font-size:12px;color:var(--ink-3);font-variant-numeric:tabular-nums}
.tpbtns{display:inline-flex;gap:5px;align-items:center;flex-wrap:wrap}
.tpbtns .btn[disabled]{opacity:.4;cursor:default}
.tpbtns .tpnum{min-width:32px;justify-content:center;font-variant-numeric:tabular-nums}
.tpgap{color:var(--ink-3);font-size:12.5px;padding:0 2px}

/* ── active/inactive filter chips, the TaskFlow pattern ──────────────────── */
.tabchips{display:flex;gap:8px;margin:0 0 14px}
.tabchip{
  display:inline-flex;align-items:center;gap:7px;padding:7px 13px;
  border:1px solid var(--line);border-radius:99px;background:var(--surface);
  font-size:13px;color:var(--ink-2);cursor:pointer;
  transition:border-color var(--fast) var(--ease), color var(--fast) var(--ease),
             background var(--fast) var(--ease);
}
.tabchip:hover{border-color:color-mix(in srgb,var(--accent) 40%,var(--line))}
.tabchip.on{
  background:var(--accent-wash);border-color:color-mix(in srgb,var(--accent) 45%,var(--line));
  color:var(--accent-ink);font-weight:600;
}
.tabchip .tcn{
  font-size:11px;font-weight:650;padding:1px 7px;border-radius:99px;
  background:var(--sunk);color:var(--ink-3);font-variant-numeric:tabular-nums;
}
.tabchip.on .tcn{background:var(--surface);color:var(--accent-ink)}

/* ── required-field marker ──────────────────────────────────────────────── */
/* The red * beside a mandatory label — the same red the import template's
   mandatory columns wear, so the form and the sheet speak one convention. */
.req{color:var(--critical);font-weight:700}

/* ── the structure editor's dynamic rows + statutory x-ray ───────────────── */
.xoff{
  border:0;background:none;color:var(--ink-4);cursor:pointer;font-size:15px;
  line-height:1;padding:0 3px;border-radius:var(--r-sm);margin-left:auto;
}
.xoff:hover{color:var(--critical);background:var(--critical-wash)}
.statuglance{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;min-height:26px}
.stchip{
  display:inline-flex;align-items:baseline;gap:6px;padding:4px 10px;
  border:1px solid var(--line);border-radius:99px;background:var(--plane);
  font-size:12px;color:var(--ink-3);font-variant-numeric:tabular-nums;
}
.stchip b{font-size:10.5px;letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-2)}
.stchip i{font-style:normal;color:var(--ink-3);font-size:11.5px;
  max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stchip.on{
  background:var(--accent-wash);color:var(--accent-ink);
  border-color:color-mix(in srgb,var(--accent) 35%,var(--line));
}
.stchip.on b{color:var(--accent-ink)}
.stchip.warn{
  background:var(--warn-wash);color:var(--warn);
  border-color:color-mix(in srgb,var(--warn) 40%,var(--line));
}
.stchip.warn b{color:var(--warn)}
/* Informational by default — his find: the PF/ESI/PT x-ray chips read as
   buttons. A span chip never invites a click; only the LINK form does. */
.stchip{cursor:default}
a.stchip{text-decoration:none;cursor:pointer}
a.stchip:hover{filter:brightness(.97)}
.stchip.note-ish{border-style:dashed}
.statuglance .stlabel{
  align-self:center;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--ink-3);font-weight:600;
}
/* The × / undo inside a PF or ESI chip — the one part of the x-ray that IS a
   control, and dressed as one: a bordered mini-button, not chip text. */
.stchip .stx{
  border:1px solid color-mix(in srgb,currentColor 40%,transparent);
  background:transparent;color:inherit;font:inherit;font-size:10.5px;
  border-radius:99px;padding:0 7px;line-height:1.5;cursor:pointer;
  margin-left:2px;align-self:center;
}
.stchip .stx:hover{background:var(--critical-wash);color:var(--critical);
  border-color:var(--critical)}

/* ── the payslip canvas designer ────────────────────────────────────────────
   Left: a palette of fields not on the page (app chrome — follows the theme).
   Right: the page itself (PAPER — white in every theme, because that is what
   the printer produces, and the company's accent colour was chosen against
   white). Everything inside .pdz-page therefore wears --paper-* tokens. */
.pdz{display:grid;grid-template-columns:212px minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:760px){ .pdz{grid-template-columns:1fr} }

.pdz-sidehead{
  font-size:10.5px;font-weight:650;letter-spacing:.07em;text-transform:uppercase;
  color:var(--ink-3);margin:0 0 8px;
}
.pdz-palette{
  display:flex;flex-direction:column;gap:6px;min-height:64px;
  padding:8px;border:1.5px dashed var(--line);border-radius:var(--r-sm);
  background:var(--plane);
}

/* A field chip. In the palette it is an app-side card; dropped into the
   employee-details band it becomes a row of the printed grid. */
.pdz-field{cursor:grab;user-select:none;-webkit-user-select:none}
.pdz-field:active{cursor:grabbing}
.pdz-field.ghosting{opacity:.3}
.pdz-field .l{font-size:11.5px}
.pdz-field .v{font-size:11.5px;font-weight:600;white-space:nowrap}
.pdz-palette .pdz-field{
  display:flex;justify-content:space-between;gap:10px;align-items:baseline;
  padding:6px 9px;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--surface);box-shadow:var(--shadow-sm);
}
.pdz-palette .pdz-field .l{color:var(--ink-2)}
.pdz-palette .pdz-field .v{color:var(--ink-4);font-weight:500;overflow:hidden;
  text-overflow:ellipsis}
.pdz-palette .pdz-field:hover{border-color:color-mix(in srgb,var(--accent) 45%,var(--line))}

/* The page. Fixed paper — never theme-flipped. */
.pdz-page{
  background:var(--paper);color:var(--paper-ink);
  border:1px solid var(--line);border-radius:var(--r-sm);
  box-shadow:var(--shadow);padding:16px 18px 12px;min-width:0;
}
.pdz-head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:12px;
  border-bottom:2px solid;padding-bottom:8px;margin-bottom:6px;font-size:13px;
}
.pdz-sub{color:var(--paper-ink-2);font-size:11px;margin-top:1px}
.pdz-who{text-align:right;font-size:11px;color:var(--paper-ink);line-height:1.5}
.pdz-fixed{
  margin-top:8px;padding-top:7px;border-top:1.5px dashed var(--paper-line);
  text-align:center;font-size:10px;letter-spacing:.05em;color:var(--paper-ink-3);
}

/* A band — one draggable block of the page. */
.pdz-band{
  border:1.5px dashed transparent;border-radius:var(--r-sm);
  padding:2px 6px 6px;margin:2px 0;cursor:grab;
}
.pdz-band:active{cursor:grabbing}
.pdz-band:hover{border-color:var(--paper-line);background:var(--paper-sunk)}
.pdz-band.ghosting{opacity:.35;border-color:var(--accent)}
.pdz-band.off .pdz-bandbody{opacity:.3;filter:grayscale(1)}
.pdz-bandbar{
  display:flex;align-items:center;gap:7px;margin-bottom:2px;
  font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--paper-ink-3);
}
.pdz-grab{font-size:12px;letter-spacing:0;color:var(--paper-ink-3)}
.pdz-bandname{font-weight:650}
.pdz-eye,.pdz-always{
  margin-left:auto;font-size:9.5px;letter-spacing:.05em;text-transform:uppercase;
}
.pdz-always{color:var(--paper-ink-3)}
.pdz-eye{
  border:1px solid var(--paper-line);border-radius:99px;background:var(--paper);
  color:var(--paper-ink-2);padding:2px 9px;cursor:pointer;font-weight:650;
}
.pdz-eye:hover{border-color:var(--paper-ink-3)}
.pdz-band.off .pdz-eye{
  background:var(--paper-sunk);color:var(--paper-ink-3);border-style:dashed;
}

/* Band bodies — miniatures of what the print really renders. */
.pdz-idgrid{
  display:grid;grid-template-columns:1fr 1fr;gap:2px 18px;min-height:26px;
  font-size:11.5px;
}
.pdz-idgrid .pdz-field{
  display:flex;justify-content:space-between;gap:10px;align-items:baseline;
  border-bottom:1px dotted var(--paper-line);padding:2px 0;min-width:0;
}
.pdz-idgrid .pdz-field .l{color:var(--paper-ink-2)}
.pdz-idgrid .pdz-field .v{color:var(--paper-ink);overflow:hidden;text-overflow:ellipsis}
.pdz-idgrid .pdz-field:hover{background:var(--paper-sunk)}
@media (max-width:760px){ .pdz-idgrid{grid-template-columns:1fr} }
.pdz-idhint{
  border:1.5px dashed var(--paper-line);border-radius:var(--r-sm);
  padding:10px;text-align:center;font-size:11px;color:var(--paper-ink-3);
}
.pdz-lv{
  display:flex;gap:14px;flex-wrap:wrap;font-size:11px;align-items:baseline;
  padding:6px 9px;background:var(--paper-sunk);border-radius:var(--r-sm);
  color:var(--paper-ink-2);
}
.pdz-lv b{color:var(--paper-ink);font-size:10px;letter-spacing:.05em;
  text-transform:uppercase}
.pdz-pay{display:grid;grid-template-columns:1fr 1fr;gap:4px 20px}
@media (max-width:760px){ .pdz-pay{grid-template-columns:1fr} }
.pdz-pay i,.pdz-emp i{
  display:block;font-style:normal;font-size:9.5px;letter-spacing:.06em;
  text-transform:uppercase;color:var(--paper-ink-3);
  border-bottom:1px solid var(--paper-ink-3);padding-bottom:2px;margin-bottom:2px;
}
.pdz-pay em,.pdz-emp em{
  display:flex;justify-content:space-between;gap:10px;font-style:normal;
  font-size:11.5px;color:var(--paper-ink-2);
  border-bottom:1px dotted var(--paper-line);padding:2px 0;
}
.pdz-pay em b,.pdz-emp em b{
  color:var(--paper-ink);font-weight:500;font-variant-numeric:tabular-nums;
}
.pdz-pay em.t{border-top:1.5px solid var(--paper-ink);border-bottom:0;
  font-weight:700;color:var(--paper-ink)}
.pdz-pay em.t b{font-weight:700}
.pdz-net{
  margin-top:8px;padding:7px 10px;border:1.5px solid;
  display:flex;justify-content:space-between;font-weight:700;font-size:12.5px;
  color:var(--paper-ink);
}
.pdz-emp{font-size:11.5px}
.pdz-ytd{font-size:11px;color:var(--paper-ink-2);margin:0}
.pdz-ytd b{color:var(--paper-ink)}

/* ── pager: long tables page rather than scroll forever ─────────────────── */
.pager{display:flex;justify-content:space-between;align-items:center;
  margin-top:10px;flex-wrap:wrap;gap:8px}
