/* Styles for the rebuilt admin pages (2026-09-23, from storykeeper-mockups-v2/remaining.html). v2.css vocabulary first; only what it lacks goes here. */

/* ── Shared bits across the group ─────────────────────────────────────────────────────────────── */
/* A segmented control with a tab per department / list can outgrow the toolbar: let it wrap instead of spilling. */
.seg.ad-seg-wrap{flex-wrap:wrap;max-width:100%}
/* Compact inputs inside a table row being edited, and the row itself. */
.tbl tr.ad-editrow td{background:var(--accent-soft)}
.in.ad-in-sm{height:30px;font-size:13.5px}
.in.ad-in-r{width:100px;text-align:right}
/* Group header rows: the right-hand figure reads as ordinary text, not a shouted label. */
.ad-grp-n{text-transform:none;letter-spacing:0;font-weight:400;text-align:right}
.ad-grp-n .num{font-weight:600}
/* A quiet inset panel inside a card (a form opened in place, a message preview). */
.ad-inset{background:var(--surface-2);border-radius:8px;padding:10px 12px}
.in.ad-ta{height:auto;padding:8px 10px;font-size:13.5px;resize:vertical;line-height:1.45}
.ad-pre{white-space:pre-line}
.ad-trunc{display:inline-block;max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.ad-danger-link{color:var(--crit);font-weight:600;cursor:pointer}
.ad-danger-link:hover{text-decoration:underline}
/* A row that is a fact, not a link (a year with no labour). */
.tbl tr.ad-quiet td{color:var(--faint)}
/* Horizontal bars with a label, a bar and "862 h · 44%" — the value column needs more room than .mk gives. */
.mk.ad-mk{grid-template-columns:minmax(90px,140px) minmax(0,1fr) 92px}
.mk.ad-mk > span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ── Employee ────────────────────────────────────────────────────────────────────────────────── */
.av.ad-av{width:48px;height:48px;font-size:17px}
/* The four main pay rates as small tiles. */
.ad-rate{padding:9px 11px;border:1px solid var(--rule-2);border-radius:8px;min-width:0}
.ad-rate .v{font-size:17px;font-weight:500;overflow-wrap:anywhere}
.ad-rate.unset .v{color:var(--faint);font-size:14px;font-family:inherit}
.ad-more{margin-top:10px}
.ad-more summary{cursor:pointer;font-size:13px;color:var(--ink-2);font-weight:600}
/* An employment-history entry opened in place in the timeline. */
.ad-evform{display:flex;flex-direction:column;gap:10px;margin:4px 0 8px;padding:12px;border:1px solid var(--accent);border-radius:8px;background:var(--surface)}
.tl.slim .ev .s.ad-pre{white-space:pre-line}

/* Employee year: 12 month columns; the selected month is the one dark bar. */
.ey-chart{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;height:180px}
.ey-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;min-width:0;padding:0;border:0;background:transparent;cursor:pointer;font:inherit;color:inherit}
.ey-col .bw{flex:1;width:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;min-height:0}
.ey-col i{display:block;width:100%;background:var(--data-soft);border-radius:4px 4px 0 0;min-height:2px}
.ey-col:hover i{background:var(--data);opacity:.6}
.ey-col.on i{background:var(--data);opacity:1}
.ey-col .n{font-size:11.5px;color:var(--muted);margin-bottom:3px;white-space:nowrap}
.ey-col.on .n{color:var(--ink);font-weight:700}
.ey-col .m{font-size:12px;color:var(--muted);margin-top:6px}
.ey-col.on .m{color:var(--ink);font-weight:700}
.ey-col.zero .m{color:var(--faint)}
@media (max-width:640px){.ey-chart{gap:3px;height:150px}.ey-col .n{font-size:9.5px}.ey-col .m{font-size:10.5px}}

/* ── Campaign ────────────────────────────────────────────────────────────────────────────────── */
/* Callbacks due today or earlier are tinted. */
.tbl.ad-members tr.due td{background:var(--warn-soft)}
.tbl.ad-members tr.due:hover td{background:var(--warn-soft);filter:brightness(.98)}
.ad-oc .in{height:30px;font-size:13px;width:auto;max-width:150px;padding:0 8px}
.ad-oc .in.ad-date{max-width:150px}
.ad-oc .in.ad-ta{width:100%;max-width:none;min-width:260px;height:auto;padding:8px 10px}
.btn.ad-on{border-color:var(--accent);color:var(--accent)}
/* "＋ Add a customer" search with its result list, which closes on a click elsewhere (.menu-scrim) or Escape. */
.ad-add{position:relative}
.ad-add .search.ad-focus{border-color:var(--accent);color:var(--ink)}
.ad-add-list{position:absolute;right:0;top:38px;width:360px;max-width:calc(100vw - 32px);z-index:60;box-shadow:var(--shadow);padding:4px 0}
/* Reach figures on the Text members card. */
.ad-stat{padding:9px 11px;border:1px solid var(--rule-2);border-radius:8px;min-width:0}
.ad-stat .v{font-size:18px}

/* ── Work order types: department rows ───────────────────────────────────────────────────────── */
.ad-mv{display:flex;flex-direction:column;gap:2px;flex-shrink:0}
.st-admin .ad-mv .mv{width:24px;height:20px;font-size:10px}
.in.ad-code{width:56px;flex-shrink:0;text-transform:uppercase;font-family:var(--f-data)}
.ad-code-preview{display:flex;align-items:center;background:var(--surface-2);min-width:150px;color:var(--ink)}
.ad-dept .btn{flex-shrink:0}

/* ── Sign in / change password: a full page with no app shell ────────────────────────────────── */
.ad-auth{min-height:100vh;display:grid;place-items:center;padding:24px 16px;background:var(--ground);color:var(--ink)}
.ad-auth-box{width:min(400px,100%)}
.ad-auth-card{padding:30px 28px 26px;box-shadow:var(--shadow)}
.ad-auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:22px}
.ad-auth-mark{width:40px;height:40px;border-radius:9px;background:var(--brand);display:grid;place-items:center;color:#fff;font-weight:900;font-style:italic;font-size:14px;letter-spacing:-.03em;flex-shrink:0}
.ad-auth-name{font-weight:800;font-size:18px;line-height:1.1}
.ad-auth-h{font-weight:800;font-size:22px;letter-spacing:-.015em}
.ad-auth-sub{color:var(--muted);font-size:14px;margin:4px 0 18px}
.ad-auth-err{margin-bottom:14px}
.btn.ad-auth-btn{width:100%;justify-content:center;height:40px}
@media (max-width:480px){.ad-auth-card{padding:24px 18px 20px}}

/* ── Sign-in link on a person's record (patch 68; mockup sign-in-link.html, option B) ── */
.ad-sl-line{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ad-sl-status{font-size:12.5px;color:var(--muted);margin-top:6px;line-height:1.45}
.dlg.ad-sl-dlg{width:min(560px,100%)}
.ad-sl-dlg .dlg-body{padding:16px 22px 6px}
.ad-sl-foot{display:flex;gap:8px;justify-content:flex-end;padding:14px 22px;border-top:1px solid var(--rule-2);flex-wrap:wrap}
.ad-sl-prev{border:1px dashed var(--rule);border-radius:8px;padding:10px 12px;font-size:13.5px;line-height:1.55;white-space:pre-line;background:var(--surface-2);margin-top:6px;overflow-wrap:anywhere}
.ad-sl-kv{display:inline-block;font-family:var(--f-data,var(--font-mono,ui-monospace,monospace));background:var(--surface);border:1px solid var(--rule-2);border-radius:6px;padding:0 8px;font-weight:600}
.ad-sl-link{color:var(--info,#1d4ed8);text-decoration:underline}
