/*
 * identity.fowlguard.com: the Fowlguard console standard, as server-rendered HTML.
 *
 * Every value comes from tokens.css, a byte-for-byte copy of the Secure repo's
 * branding/theme/tokens.css (scripts/check-branding.sh and html::tests check the hash). This file
 * only names those channels the way the pages use them and draws the console's components: the
 * shell (a dark rail of group icons and a dark sidebar), PageHeader, Section, Card, the table,
 * FormGrid and Field, the six buttons, StateBadge, StatCard, the notes, the confirm dialog and the
 * edit bar (docs/UI-CONVENTIONS.md in the Secure repo). The sign-in pages use the same components
 * inside one card, with a photograph filling the other half of a wide screen.
 *
 * Never write a color here: add it to tokens.css in the Secure repo and copy the file again.
 */

/* ── Names for the token channels ─────────────────────────────────────────── */
:root {
    --bg: rgb(var(--c-bg));
    --bg-2: rgb(var(--c-bg-2));
    --surface: rgb(var(--c-surface));
    --surface-2: rgb(var(--c-surface-2));
    --surface-3: rgb(var(--c-surface-3));
    --line: rgb(var(--c-line));
    --line-2: rgb(var(--c-line-2));
    --ink: rgb(var(--c-ink));
    --ink-2: rgb(var(--c-ink-2));
    --dim: rgb(var(--c-dim));
    --faint: rgb(var(--c-faint));
    --signal: rgb(var(--c-signal));
    --signal-hover: rgb(var(--c-signal-hover));
    --signal-ink: rgb(var(--c-signal-ink));
    --signal-soft: rgb(var(--c-signal-soft) / var(--a-signal-soft));
    --mint: rgb(var(--c-mint));
    --mint-ink: rgb(var(--c-mint-ink));
    --sky: rgb(var(--c-sky));
    --sky-ink: rgb(var(--c-sky-ink));
    --lilac: rgb(var(--c-lilac));
    --lilac-ink: rgb(var(--c-lilac-ink));
    --ok: rgb(var(--c-ok));
    --ok-bg: rgb(var(--c-ok-bg) / var(--a-ok-bg));
    --deny: rgb(var(--c-deny));
    --deny-bg: rgb(var(--c-deny-bg) / var(--a-deny-bg));
    --report: rgb(var(--c-report));
    --report-bg: rgb(var(--c-report-bg) / var(--a-report-bg));
    --warn: rgb(var(--c-warn));
    --warn-bg: rgb(var(--c-warn-bg) / var(--a-warn-bg));
    --focus: rgb(var(--c-focus));
    --sidebar: rgb(var(--c-sidebar));
    --sidebar-fg: rgb(var(--c-sidebar-fg));
    --sidebar-heading: rgb(var(--c-sidebar-heading));
    --sidebar-ink: rgb(var(--c-sidebar-ink));
    --sidebar-active: rgb(var(--c-sidebar-active) / var(--a-sidebar-active));
    --sidebar-line: rgb(var(--c-sidebar-line) / var(--a-sidebar-line));
    --scrim: rgb(var(--c-pine) / 0.55);
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 14px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
::placeholder { color: var(--faint); opacity: 1; }
code, .mono { font-family: var(--mono); }
code { font-size: 0.92em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ── The shell: rail, sidebar, top bar, content ───────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.side { position: relative; z-index: 40; flex: none; background: var(--sidebar); color: var(--sidebar-fg); }
.side-in { position: sticky; top: 0; height: 100vh; display: flex; }
.rail {
    width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 0; border-right: 1px solid var(--sidebar-line);
}
.rail .mark { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 8px; }
.rail .mark img { width: 26px; height: 26px; }
.rail-item {
    position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center;
    border-radius: 10px; color: var(--sidebar-fg); text-decoration: none; background: none; border: 0;
    cursor: pointer; transition: background-color .15s, color .15s;
}
.rail-item svg.i { width: 19px; height: 19px; }
.rail-item:hover { background: var(--sidebar-line); color: var(--sidebar-ink); }
.rail-item[aria-current], .rail-item[aria-current]:hover { background: var(--sidebar-active); color: var(--sidebar-ink); }
.rail-item[aria-current]::before {
    content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--sidebar-ink);
}
.rail-item .tip {
    pointer-events: none; position: absolute; left: 100%; top: 50%; z-index: 50; margin-left: 8px;
    transform: translateY(-50%); white-space: nowrap; padding: 4px 8px; border-radius: 10px;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
    font-size: 11.5px; font-weight: 500; box-shadow: var(--shadow); opacity: 0; transition: opacity .15s;
}
.rail-item:hover .tip, .rail-item:focus-visible .tip { opacity: 1; }
.rail .grow { flex: 1; }
.avatar {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--sidebar-active); color: var(--sidebar-ink); font: 600 10.5px/1 var(--font);
}
.acct-menu { position: relative; }
.acct-menu > summary { list-style: none; }
.acct-menu > summary::-webkit-details-marker { display: none; }
.acct-menu[open] .tip { display: none; }
.acct-menu .pop {
    position: absolute; left: 100%; bottom: 0; z-index: 60; margin-left: 8px; width: 16rem; max-width: 70vw;
    padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
    color: var(--ink); box-shadow: var(--shadow);
}
.acct-menu .who { padding: 8px 10px; }
.acct-menu .who b, .acct-menu .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu .who b { font-size: 14px; font-weight: 500; }
.acct-menu .who small { font-size: 11.5px; color: var(--dim); }
.acct-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.acct-menu .pop a {
    display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px;
    font-size: 14px; text-decoration: none; color: var(--ink);
}
.acct-menu .pop a:hover { background: var(--surface-3); }
.acct-menu .pop a svg.i { color: var(--faint); }

.list { width: 224px; flex: none; display: flex; flex-direction: column; min-width: 0; }
.list-head { height: 56px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.list-head span { min-width: 0; flex: 1; }
.list-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--sidebar-ink); }
.list-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; line-height: 1.45; color: var(--sidebar-heading); }
.list nav { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 12px; }
.list h2 { padding: 12px 8px 8px; font-size: 18px; font-weight: 600; line-height: 1.25; color: var(--sidebar-ink); }
.list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.list nav a {
    display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 6px 8px; border-radius: 10px;
    font-size: 14px; line-height: 1.25; color: var(--sidebar-fg); text-decoration: none; transition: background-color .15s, color .15s;
}
.list nav a svg.i { width: 15px; height: 15px; }
.list nav a:hover { background: var(--sidebar-line); color: var(--sidebar-ink); }
.list nav a[aria-current="page"] { background: var(--sidebar-active); color: var(--sidebar-ink); font-weight: 600; }
.list nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list nav h2 a { display: inline; padding: 0; min-height: 0; font-size: inherit; font-weight: inherit; color: inherit; text-decoration: none; background: none; }
.list h2 a:hover { text-decoration: underline; }
.fold > summary { list-style: none; position: relative; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary > a { padding-right: 32px; }
.fold .chev { position: absolute; right: 4px; top: 50%; transform: translateY(-50%) rotate(-90deg); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: var(--sidebar-fg); cursor: pointer; transition: transform .15s; }
.fold .chev:hover { background: var(--sidebar-line); }
.fold[open] .chev { transform: translateY(-50%); }
.fold .chev svg.i { width: 14px; height: 14px; }
.list .kids { margin: 2px 0 4px 15px; padding-left: 8px; border-left: 1px solid var(--sidebar-line); }
.list .kids a svg.i { width: 14px; height: 14px; }

.main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: 48px; flex: none; display: flex; align-items: center;
    gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.topbar .grow { flex: 1; }
/* The breadcrumb, where a page's navigation is not Identity's own (Work's people pages). */
.crumbs { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; margin-right: 8px; font-size: 14px; color: var(--dim); white-space: nowrap; }
.crumbs a { color: var(--dim); text-decoration: none; flex: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--ink); }
@media (max-width: 639.98px) { .crumbs { display: none; } }
.search-pill {
    display: flex; align-items: center; gap: 8px; height: 32px; width: 100%; max-width: 24rem; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--faint);
    font: 400 14px/1 var(--font); cursor: pointer; text-align: left;
}
.search-pill:hover { color: var(--ink); }
.search-pill span { flex: 1; }
kbd { padding: 2px 5px; border-radius: 4px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface-2); font: 500 10.5px/1 var(--mono); color: var(--faint); }
.palette { position: fixed; inset: 0; z-index: 140; display: flex; justify-content: center; padding: 12vh 16px 16px; background: var(--scrim); backdrop-filter: blur(3px); }
.palette .box { width: 100%; max-width: 36rem; height: fit-content; overflow: hidden; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); }
.palette .q { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--faint); }
.palette .q input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; color: var(--ink); font: 400 15px var(--font); outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 380px; overflow-y: auto; }
.palette li a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.palette li a small { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.palette li a[aria-selected="true"], .palette li a:hover { background: var(--surface-3); }
.palette .none { padding: 36px 16px; text-align: center; color: var(--dim); font-size: 14px; }
.icon-btn {
    width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 999px;
    border: 0; background: none; color: var(--dim); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg.i { width: 16px; height: 16px; }
.nav-open, .list-hide { display: none; }
#nav-toggle, #list-toggle { position: absolute; opacity: 0; pointer-events: none; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding: 20px 24px 32px; }
@media (max-width: 639.98px) { .content { padding: 20px 16px 32px; } }
.scrim { display: none; }

@media (min-width: 768px) {
    .list-hide { display: grid; }
    #list-toggle:checked ~ .shell .list { display: none; }
}
@media (max-width: 767.98px) {
    .side { position: fixed; inset: 0 auto 0 0; width: 20rem; max-width: 88vw; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
    .side-in { height: 100%; }
    .t col.k-label { width: 9rem; }
    .list { flex: 1; width: auto; }
    .nav-open { display: grid; }
    #nav-toggle:checked ~ .shell .side { transform: none; }
    #nav-toggle:checked ~ .shell .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: var(--scrim); }
    .rail-item .tip { display: none; }
}

/* ── Page, Section, Card ──────────────────────────────────────────────────── */
.ph { display: flex; flex-direction: column; gap: 4px; }
.ph-row, .sec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ph h1 { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.ph h1 span, .sec h2 span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph h1 svg.i, .sec h2 svg.i { width: 20px; height: 20px; color: var(--signal); }
.ph > p, .sec-head > p { max-width: 65ch; font-size: 14px; color: var(--dim); }
.actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; scroll-margin-top: 64px; }
.content > * { min-width: 0; }
.sec-head { display: flex; flex-direction: column; gap: 4px; padding: 0 20px; }
.sec-row { min-height: 32px; }
.sec h2 { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 18px; line-height: 1.35; font-weight: 600; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 20px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card.flush { padding: 0 20px; gap: 0; overflow-x: auto; }
.card h3 { font-size: 15px; font-weight: 600; line-height: 1.5; }
.card p { color: var(--dim); }
.card p b { color: var(--ink); }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: -12px; font-size: 11.5px; font-weight: 500; color: var(--dim); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.back-link svg.i { width: 14px; height: 14px; }

/* Tiles (TL1, S5b): a landing page's destinations. */
.tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: var(--ok-bg); color: var(--ink); text-decoration: none; transition: filter .15s; }
.tile:hover { filter: brightness(0.97); }
.tile.warn { background: var(--warn-bg); }
.tile .ico { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--signal); }
.tile .ico svg.i { width: 16px; height: 16px; }
.tile > span:nth-child(2) { min-width: 0; flex: 1; }
.tile b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.tile small { display: block; font-size: 11.5px; color: var(--dim); }
.tile > svg.i { margin-left: auto; color: var(--faint); opacity: 0; transition: opacity .15s; }
.tile:hover > svg.i { opacity: 1; }

/* ── Toolbar, search, pager ───────────────────────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 20px; }
.toolbar form { display: contents; }
.toolbar .end { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter { width: 11rem; }
.copyline { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.copyline .in { flex: 1; font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.copyline .b { flex: none; }
/* On a phone the value needs the room: Copy keeps its icon and its name (the text stays for a
   screen reader), not the 6rem of a labeled button that left the value no width at all. */
@media (max-width: 639.98px) { .copyline .b { min-width: 0; width: 32px; padding: 0; font-size: 0; } }
/* The phone's narrower label column (9rem, under "The shell") lost to the 14rem rule further down,
   which comes later at the same specificity; this one outranks it. */
@media (max-width: 767.98px) { .t.dl col.k-label { width: 9rem; } }
.seg { display: grid; width: 100%; height: 32px; gap: 2px; padding: 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.seg label { position: relative; display: flex; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: 999px; padding: 0 12px; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--dim); transition: background-color .15s, color .15s; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.seg input:disabled { cursor: not-allowed; }
.seg input:disabled + span, .seg label:hover input:disabled + span { opacity: .45; color: var(--dim); }
.seg input:disabled:checked + span { color: var(--bg); }
.search { position: relative; width: 18rem; max-width: 100%; }
.search svg.i { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .in { padding-left: 30px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pager > span { color: var(--dim); }
.pager > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pager > div > span, .pager .pp { color: var(--dim); }
.pager .pp { display: flex; align-items: center; gap: 8px; }
.pager .pp .in { width: 4.5rem; }
.pager > div > div { display: flex; gap: 8px; }

/* ── Tables (DataTable, DetailList) ───────────────────────────────────────── */
table.t { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; }
table.t.dl { min-width: 0; }
.t th, .t td { padding: 11px 12px; text-align: left; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t tr > :first-child { padding-left: 0; }
.t tr > :last-child { padding-right: 0; }
.t thead th { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.t tbody td { color: var(--ink-2); }
.t tbody th { font-weight: 600; color: var(--ink); }
.t tbody tr + tr > * { border-top: 1px solid var(--line); }
.t tbody tr:hover > * { background: var(--surface-2); }
.t td.empty { color: var(--dim); white-space: normal; }
.t td.wrap, .t td:has(.badges) { white-space: normal; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0; }
.badges .badge + .badge { margin-left: 0; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t .act { text-align: right; overflow: visible; }
.t .act form { display: inline; margin: 0; }
.t .act > * + * { margin-left: 6px; }
.t col.k-rank { width: 4rem; }
.t col.k-number { width: 7rem; }
.t col.k-state { width: 9.5rem; }
.t col.k-date { width: 12.5rem; }
.t col.k-id { width: 12rem; }
.t col.k-label { width: 14rem; }
.t col.k-act1 { width: 6.75rem; }
.t col.k-act2 { width: 13.25rem; }
.t col.k-act3 { width: 19.75rem; }
a.rec { font-weight: 500; color: var(--signal); text-decoration: none; }
a.rec:hover { text-decoration: underline; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }

/* DataTable (T1 to T17): the rows scroll inside the card under a sticky header; a filter cell under
   each column; a resize handle on each header's right edge; a cell cut short opens whole. */
.dt { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dt-card.card.flush { padding: 0; overflow: visible; }
.dt-scroll { overflow: auto; max-height: calc(100vh - 18rem); padding: 0 20px; }
.dt-card > .pager { margin: 0 20px; }
.t thead { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.t thead th { position: relative; }
.t thead tr:last-child > th { border-bottom: 1px solid var(--line); }
.t thead tr:first-child:not(:last-child) > th { border-bottom: 0; }
.t.filtered thead tr:first-child > th { padding-bottom: 0; }
.t .frow th { padding: 4px 12px 8px; font-weight: 400; overflow: visible; }
.t .frow th:first-child { padding-left: 0; }
.t .frow th:last-child { padding-right: 0; }
.t .frow .in { width: 100%; min-width: 0; font-weight: 400; }
.fx { position: relative; display: block; }
.fx.on .in { padding-right: 24px; }
.fx-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--dim); cursor: pointer; }
.fx-x[hidden] { display: none; }
.fx-x:hover { color: var(--ink); }
.fx-x svg.i { width: 14px; height: 14px; }
.rz { position: absolute; right: 0; top: 0; z-index: 1; width: 8px; height: 100%; cursor: col-resize; touch-action: none; user-select: none; outline: none; }
.rz::after { content: ""; position: absolute; top: 6px; bottom: 6px; right: 2px; width: 2px; border-radius: 999px; background: transparent; }
.rz:hover::after { background: var(--line); }
.rz:focus-visible::after, .rz.on::after { background: var(--signal); }
.t td[data-clipped] { cursor: pointer; }
.t td[data-clipped]:focus-visible { outline-offset: -2px; }
.peek { position: fixed; z-index: 50; width: max-content; max-width: min(36rem, calc(100vw - 1rem)); max-height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; box-shadow: var(--shadow); outline: none; }
.cols-pop { position: fixed; z-index: 50; width: 16rem; max-height: 70vh; overflow: auto; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.cols-pop ul { list-style: none; margin: 0; padding: 0; }
.cols-pop li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; font-size: 14px; }
.cols-pop li:hover, .cols-pop li.over { background: var(--surface-3); }
.cols-pop li.drag { opacity: .5; }
.cols-pop li > svg.i { width: 14px; height: 14px; color: var(--dim); cursor: grab; }
.cols-pop label { display: flex; flex: 1; min-width: 0; align-items: center; gap: 8px; cursor: pointer; }
.cols-pop label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cols-pop input { width: 14px; height: 14px; margin: 0; accent-color: var(--signal); }
.cols-pop li button { display: grid; place-items: center; padding: 2px; border: 0; border-radius: 4px; background: none; color: var(--ink); cursor: pointer; }
.cols-pop li button:hover { background: var(--line); }
.cols-pop li button:disabled { opacity: .3; pointer-events: none; }
.cols-pop li button svg.i { width: 14px; height: 14px; }
.cols-pop .reset { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.cols-pop .reset button { display: flex; width: 100%; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--dim); font: 400 14px/1.5 var(--font); text-align: left; cursor: pointer; }
.cols-pop .reset button:hover { background: var(--surface-3); }
.cols-pop .reset svg.i { width: 14px; height: 14px; }
/* A list's tools at the right of its section heading (SH4), and a header dragged to reorder (T17). */
.dt-tools { display: contents; }
.t thead th[draggable="true"] { cursor: grab; }
.t thead th.drag { opacity: .5; }
.t thead th.over { box-shadow: inset 2px 0 0 var(--signal); }

/* RowMenu: two or more verbs on a row, a details element so it needs no script. */
.menu { position: relative; display: inline-block; text-align: left; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg.i { width: 14px; height: 14px; }
.menu .pop {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 9rem; padding: 4px; overflow: hidden;
    border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow);
    display: grid;
}
.menu .pop form { display: block !important; margin: 0 !important; }
.menu .pop button, .menu .pop a {
    display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 10px;
    background: none; color: var(--ink); font: 400 14px/1.5 var(--font); text-align: left; cursor: pointer; text-decoration: none;
}
.menu .pop button:hover, .menu .pop a:hover { background: var(--surface-3); }
.menu .pop .danger { color: var(--deny); }

/* ── Buttons: six variants, one size (B2, B5) ─────────────────────────────── */
.b {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 6rem;
    padding: 0 16px; border-radius: 999px; border: 1px solid transparent; font: 600 14px/1 var(--font);
    white-space: nowrap; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s;
}
.b svg.i { width: 16px; height: 16px; }
.menu > summary svg.i { margin-left: 4px; }
.b-default { background: var(--signal); color: var(--signal-ink); }
.b-default:hover { background: var(--signal-hover); }
.b-dark { background: var(--ink); color: var(--bg); }
.b-dark:hover { background: color-mix(in srgb, var(--ink) 85%, transparent); }
.b-soft { background: var(--signal-soft); color: var(--signal); }
.b-soft:hover { background: rgb(var(--c-signal) / .15); }
.b-outline { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.b-outline:hover { border-color: var(--ink); }
.b-ghost { background: transparent; color: var(--dim); }
.b-ghost:hover { background: var(--surface-2); color: var(--ink); }
.b-destructive { background: var(--deny); color: var(--signal-ink); }
.b-destructive:hover { background: color-mix(in srgb, var(--deny) 90%, transparent); }
.b[disabled], .b[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.b-row { margin: -6px 0; }

/* ── StateBadge (C1) ──────────────────────────────────────────────────────── */
/* One size for every badge on every page (product owner, 2026-10-27: "make everything one size"):
   one height, and one width that holds the longest word in use, "MDM Configuration" (126.5px),
   so Owner and Administrator, Active and Awaiting Approval, read as peers. A sentence is wider. */
.badge { display: inline-flex; align-items: center; justify-content: center; height: 24px; min-width: 8rem; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; text-align: center; white-space: nowrap; vertical-align: middle; }
.badge + .badge { margin-left: 4px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.deny { background: var(--deny-bg); color: var(--deny); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.report { background: var(--report-bg); color: var(--report); }
.badge.enforce { background: var(--lilac); color: var(--lilac-ink); }
.badge.neutral { background: var(--surface-3); color: var(--dim); }
.badge.tag { border: 1px solid var(--line-2); color: var(--dim); }

/* ── StatRow (TL2, S5b) ───────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: block; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--mint); background: var(--mint); color: var(--ink); text-decoration: none; transition: filter .15s; }
a.stat:hover { filter: brightness(0.97); border-color: var(--line-2); }
.stat.ok { background: var(--ok-bg); border-color: transparent; }
.stat.warn { background: var(--warn-bg); border-color: transparent; }
.stat.deny { background: var(--deny-bg); border-color: transparent; }
.stat.report { background: var(--report-bg); border-color: transparent; }
.stat > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--faint); }
.stat > b { display: flex; align-items: baseline; gap: 6px; height: 32px; margin-top: 4px; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat > b small { font-size: 11.5px; font-weight: 600; color: var(--faint); letter-spacing: 0; }

/* ── Fields and FormGrid (F1, F5) ─────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); align-items: end; gap: 16px; max-width: 64rem; }
.grid .wide { grid-column: 1 / -1; }
.grid .span-2 { grid-column: span 2; }
/* A record's fields on fixed columns: every row's labels and boxes line up (the person page). */
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 899.98px) { .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639.98px) { .grid.cols-3 { grid-template-columns: minmax(0, 1fr); } .grid.cols-3 .span-2 { grid-column: auto; } }
.grid > .span-2 > .f { height: 100%; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f > .l { font-size: 11.5px; font-weight: 600; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f > .h { font-size: 11.5px; color: var(--faint); }
.in {
    height: 32px; width: 100%; min-width: 0; padding: 0 9px; border-radius: 10px; border: 1px solid var(--line-2);
    background: var(--surface-2); color: var(--ink); font: 400 14px/1.5 var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.in { height: auto; min-height: 7rem; padding: 8px 9px; line-height: 1.45; font-family: var(--mono); font-size: 12.5px; resize: vertical; }
select.in {
    appearance: none; padding-right: 26px;
    background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%);
    background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.in:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgb(var(--c-signal) / .15); }
.in:disabled { cursor: not-allowed; opacity: .7; }
.in[readonly] { color: var(--dim); }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--signal); }
form.inline { display: inline; margin: 0; }
form.stack { display: flex; flex-direction: column; gap: 24px; }
.grid.top { align-items: start; }
.card-form { display: flex; flex-direction: column; gap: 16px; }
/* A dependent field (ui::dependent): hidden until the control it depends on holds its value. One
   rule per dependency, read from the form itself, so it needs no script and follows Cancel. */
.dep { display: none; }
form:has(input[name="join_mode"][value="group"]:checked) .when-join-group,
form:has(select[name="sp_cert_mode"] option[value="custom"]:checked) .when-cert-import,
.content:has(input[name="sso_protocol"][value="saml"]:checked) .when-proto-saml,
.content:has(input[name="sso_protocol"][value="oidc"]:checked) .when-proto-oidc { display: contents; }

/* EditBar (F2): one Save per card; quiet until something changes. */
.editbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.editbar > span { font-size: 14px; color: var(--faint); }
.editbar .actions { margin-left: auto; }
.editbar.dirty { position: sticky; bottom: 12px; padding: 5px 5px 5px 12px; border: 1px solid var(--signal); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 3px var(--signal-soft); }
.editbar.dirty > span { color: var(--ink); }
/* With the script, no bar until something changes (F2): then it sticks, saying so, with Save and
   Cancel. Without it the bar stays, so Save is always reachable. A card holding only the bar goes too. */
.js .editbar[data-gate]:not(.dirty), .js .card:has(> .editbar[data-gate]:only-child:not(.dirty)) { display: none; }

/* ── Notes (X1) and messages ──────────────────────────────────────────────── */
.note { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 8px; font-size: 14px; line-height: 1.45; }
.note svg.i { margin-top: 2px; }
.note.err { border: 1px solid color-mix(in srgb, var(--deny) 40%, transparent); background: color-mix(in srgb, var(--deny) 5%, transparent); color: var(--deny); }
.note.warn { border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-bg); color: var(--warn); }
.note.ok { border: 1px solid transparent; background: var(--ok-bg); color: var(--ok); }
.note.info { border: 1px solid transparent; background: var(--report-bg); color: var(--report); }
.flash { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 1.45; }
.flash.err { border: 1px solid color-mix(in srgb, var(--deny) 40%, transparent); background: color-mix(in srgb, var(--deny) 5%, transparent); color: var(--deny); }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.secret { font: 500 14px/1.4 var(--mono); letter-spacing: .06em; padding: 10px 12px; border-radius: 8px; background: var(--surface-3); color: var(--ink); overflow-wrap: anywhere; }
.secret.uri { font-size: 12px; letter-spacing: 0; color: var(--dim); }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px; border-radius: 12px; background: var(--surface-3); font: 500 14px/1 var(--mono); }
.codes span { padding: 8px 10px; border-radius: 8px; background: var(--surface); text-align: center; letter-spacing: .06em; overflow-wrap: anywhere; }
.row-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ── Confirm (useConfirm) and the copied toast ────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: var(--scrim); backdrop-filter: blur(3px); }
.modal .box { position: relative; width: 100%; max-width: 420px; padding: 18px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.modal .head { display: flex; gap: 10px; align-items: flex-start; padding-right: 24px; }
.modal .head svg.i { margin-top: 3px; color: var(--deny); }
.modal h2 { font-size: 18px; font-weight: 600; line-height: 1.35; }
.modal p { margin-top: 8px; font-size: 14px; line-height: 1.625; color: var(--dim); }
.modal .row { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 220; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); }

/* ── Sign-in pages: the card, and a photograph beside it ──────────────────── */
/* Two halves from 900px: the card's column and the photograph (CC0, assets/photos/CREDITS.md),
   which covers its half and stays in view while the card's column scrolls. Below 900px the card
   is alone; the page's <source> only matches from 900px, so a phone never fetches the photo. */
body.auth-body { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
.auth-col { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.auth-photo { display: none; }
@media (min-width: 900px) {
    body.auth-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .auth-photo {
        display: block; position: sticky; top: 0; height: 100vh; padding: 0;
    }
    .auth-photo { display: grid; }
    .auth-photo > * { grid-area: 1 / 1; }
    .auth-photo picture { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; background: #071A16; }
    .auth-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.04); animation: slowzoom 24s ease-in-out infinite alternate; }
    /* Pine from the bottom, so the destination panel reads over any photograph; a little more in dark mode. */
    .auth-photo picture::after {
        content: ""; position: absolute; inset: 0; pointer-events: none;
        background: linear-gradient(180deg, rgb(7 26 22 / calc(.2 + var(--photo-veil, 0))) 0%, rgb(7 26 22 / .55) 40%, rgb(7 26 22 / .94) 78%);
    }
    /* The destination, on the photograph: where this sign-in goes, as the sign-in design drew it. */
    .auth-photo-text { position: relative; align-self: end; padding: clamp(28px, 4vw, 56px); color: #E8F3EF; }
    .auth-photo-text .label { display: inline-flex; align-items: center; gap: 10px; font: 500 11.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #CFE5DC; }
    .auth-photo-text .label::before { content: ""; width: 18px; height: 1.5px; border-radius: 2px; background: #F0662B; }
    .auth-photo-text h2 { margin: 14px 0 12px; max-width: 16ch; font-size: clamp(28px, 2.8vw, 42px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
    .auth-photo-text p { max-width: 46ch; font-size: 15px; line-height: 1.55; color: #BFD6CD; }
    .photo-dest { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 12px 14px; border-radius: 14px; background: rgb(127 221 184 / .12); border: 1px solid rgb(127 221 184 / .45); }
    .photo-dest .ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgb(255 255 255 / .08); color: #7FDDB8; }
    .photo-dest .ico svg.i { width: 18px; height: 18px; }
    .photo-dest b { font-size: 15px; color: #fff; }
    .photo-dest .host { margin-left: auto; font: 12px/1.2 var(--mono); color: #8FB0A5; white-space: nowrap; }
    .trust-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: 13px; color: #9DB8AF; }
    .trust-row span { display: inline-flex; align-items: center; gap: 7px; }
    .trust-row svg.i { width: 15px; height: 15px; color: #7FDDB8; }
    /* The photograph says where the sign-in goes, so the card's own line is for narrow screens only. */
    .auth-card .auth-dest { display: none; }
}
@keyframes slowzoom { from { transform: scale(1.04); } to { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .auth-photo img { animation: none; } }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --photo-veil: 0.35; }
}
:root[data-theme="dark"] { --photo-veil: 0.35; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; flex: none; }
.brand small { margin-left: 4px; font-size: 14px; font-weight: 600; color: var(--faint); }
.auth-top .back { font-size: 14px; font-weight: 600; color: var(--dim); text-decoration: none; }
.auth-top .back:hover { color: var(--ink); }
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 8px 16px 32px; }
.auth-card {
    width: 100%; max-width: 440px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
    padding: 28px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.auth-dest { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.auth-dest svg.i { width: 15px; height: 15px; color: var(--signal); }
.auth-dest b { color: var(--dim); font-weight: 600; }
.auth-card h1 { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.auth-card .sub { margin-top: -10px; font-size: 14px; line-height: 1.5; color: var(--dim); }
.auth-card .sub b { color: var(--ink); }
.auth-card form { display: grid; gap: 14px; }
.auth-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 16px 24px; font-size: 12.5px; color: var(--faint); }
.auth-foot .sp { margin-left: auto; }
.theme { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.theme button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 999px; background: none; color: var(--faint); cursor: pointer; }
.theme button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }
.theme button svg.i { width: 15px; height: 15px; }

/* The sign-in card's parts, as every sign-in step writes them. */
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > label, .fld .row > label, .fld > .hint:first-child { font-size: 12.5px; font-weight: 600; color: var(--dim); }
.fld .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fld .row a { font-size: 12.5px; font-weight: 600; color: var(--signal); text-decoration: none; }
.fld .row a:hover { text-decoration: underline; }
.fld input, .fld select, .fld textarea {
    height: 40px; width: 100%; min-width: 0; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2);
    background: var(--surface-2); color: var(--ink); font: 400 15px/1 var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.fld input.code { height: 52px; text-align: center; font: 600 22px/1 var(--mono); letter-spacing: .3em; }
.fld .hint, .hint { font-size: 12.5px; color: var(--faint); }
.pw { position: relative; }
.pw input { padding-right: 44px; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; }
.pw button:hover { background: var(--surface-3); color: var(--ink); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.strength i { height: 4px; border-radius: 999px; background: var(--line); transition: background .2s; }
.strength[data-s="1"] i:nth-child(-n+1) { background: var(--deny); }
.strength[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.strength[data-s="3"] i:nth-child(-n+3) { background: var(--ok); }
.strength[data-s="4"] i { background: var(--ok); }
.strength-note { font-size: 12.5px; color: var(--faint); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
    border-radius: 999px; border: 1px solid transparent; background: var(--ink); color: var(--bg);
    font: 600 14px/1 var(--font); white-space: nowrap; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s;
}
.auth-card .btn { width: 100%; }
.btn svg.i, .btn svg.logo { width: 17px; height: 17px; }
.btn-go { background: var(--signal); color: var(--signal-ink); }
.btn-go:hover { background: var(--signal-hover); }
.btn-line, .btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-line:hover, .btn.ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--deny); border-color: color-mix(in srgb, var(--deny) 40%, transparent); }
.btn-danger:hover { background: var(--deny-bg); }
.btn-danger-solid { background: var(--deny); color: var(--signal-ink); }
.btn-sm, .btn-xs { height: 32px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.progress { display: flex; gap: 6px; }
.progress i { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.progress i.on { background: var(--signal); }
.or { display: flex; align-items: center; gap: 14px; font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; gap: 10px; }
.social .btn { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.social .btn:hover { border-color: var(--ink); }
svg.logo { width: 18px; height: 18px; flex: none; }
.fine-print { font-size: 14px; color: var(--dim); text-align: center; }
.fine-print a { color: var(--ink); font-weight: 600; text-decoration: none; }
.fine-print a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.fine-print .sep { margin: 0 6px; color: var(--line-2); }
.auth-card .check { font-size: 14px; }
.auth-card .kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; margin: 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.auth-card .kv dt { color: var(--dim); font-weight: 600; }
.auth-card .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.auth-card .actions { margin: 0; display: grid; gap: 10px; }

/* The sign-in design's proportions: the steps sit on the page beside the photograph rather than in a
   box, with a display heading, 50px fields and buttons and roomy choice cards. Scoped to .auth-card,
   which only the sign-in frame draws; the admin pages keep the console's sizes. Wide enough that every
   step's heading ("Set Up Two-Step Sign-In", "Add a Recovery Method") stays on one line. */
.auth-card { max-width: 480px; gap: 22px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.auth-card h1 { font-size: clamp(30px, 3vw, 42px); line-height: 1.02; font-weight: 700; letter-spacing: -0.04em; }
.auth-card .sub { font-size: 16.5px; }
.auth-card form { gap: 16px; }
.auth-card .fld > label, .auth-card .fld .row > label { font-size: 14px; }
.auth-card .fld .row a { font-size: 14px; }
.auth-card .fld input, .auth-card .fld select { height: 50px; border-radius: 12px; background: var(--surface); font-size: 16px; }
.auth-card .fld input.code { height: 56px; font-size: 24px; }
.auth-card .btn { height: 50px; font-size: 15px; }
.auth-card .choice { padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); transition: border-color .15s, transform .15s, box-shadow .15s; }
.auth-card .choice:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.auth-card .choice .ico { width: 42px; height: 42px; border-radius: 12px; font-size: 15px; }
.auth-card .choice .ico svg.i, .auth-card .choice .ico svg.logo { width: 20px; height: 20px; }
.auth-card .choice b { font-size: 16px; font-weight: 700; }
.auth-card .choice small { font-size: 13.5px; }
.auth-card .choice.pick { padding: 0 6px 0 0; }
.auth-card .pick-go { padding: 14px 0 14px 16px; }
.auth-card .pick-rm { width: 40px; height: 40px; border-radius: 12px; }
.auth-card .fine-print a { font-weight: 700; }
.choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.choice {
    position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.choice:hover { border-color: var(--ink); }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice .ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface-3); color: var(--dim); font: 700 14px/1 var(--font); }
.choice .ico svg.i, .choice .ico svg.logo { width: 19px; height: 19px; }
.choice > span:nth-child(2) { min-width: 0; }
.choice b { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.choice small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--dim); }
.choice .end { margin-left: auto; color: var(--faint); }
.choice .chip { font-weight: 600; }
.choice.pick { padding: 0 6px 0 0; cursor: default; }
.pick-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 0 12px 14px; color: inherit; text-decoration: none; }
.pick .who { display: flex; flex-direction: column; min-width: 0; }
.pick .who b, .pick .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ico.initials { background: var(--surface-3); color: var(--ink); }
.acct-state.on { color: var(--ok); }
.acct-state.off { color: var(--faint); }
.pick-rm { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--faint); text-decoration: none; }
.pick-rm:hover { background: var(--surface-3); color: var(--ink); }
.chip { display: inline-flex; align-items: center; justify-content: center; height: 24px; min-width: 8rem; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--dim); }
.chip.ok, .chip.t-mint { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.deny { background: var(--deny-bg); color: var(--deny); }
.chip.plain, .chip.t-plain { background: var(--surface-3); color: var(--dim); }
.state { display: grid; gap: 14px; justify-items: start; }
.state .badge { width: 52px; min-width: 0; height: 52px; padding: 0; border-radius: 16px; display: grid; place-items: center; }
.state .badge svg.i { width: 26px; height: 26px; }
.state .badge.ok { background: var(--ok-bg); color: var(--ok); }
.state .badge.warn { background: var(--warn-bg); color: var(--warn); }
.state .badge.info { background: var(--report-bg); color: var(--report); }
.state .badge.acc { background: var(--signal-soft); color: var(--signal); }
.note-line { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); font-size: 14px; color: var(--dim); }
.note-line svg.i { margin-top: 2px; color: var(--signal); }
.handoff { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--signal); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.qr { width: 180px; height: 180px; flex: none; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.qr svg { width: 100%; height: 100%; }
/* Setting up two-step sign-in: the code beside its key. Black on its own white tile, quiet zone
   included, in every theme and at a size every authenticator's camera reads: at 136px on the page's
   color only Fowlguard Authenticator read it (2026-10-29). */
.qr-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.qr-pair .qr { width: 200px; height: 200px; padding: 8px; border: 0; border-radius: 12px; background: #fff; }
/* A code shown on its own (the Fowlguard Authenticator link page) sits in the middle of the column. */
.qr-pair.qr-alone { justify-content: center; }
/* "Link Another Phone": a button that opens the code form under the linked phones. */
.link-another { margin-top: 16px; }
.link-another > summary { list-style: none; display: flex; justify-content: center; cursor: pointer; }
.link-another > summary::-webkit-details-marker { display: none; }
.link-another[open] > summary { display: none; }
/* FS-702: the number to tap in Fowlguard Authenticator, and the code form behind "Use a Code Instead". */
.approve-number { margin: 14px 0 6px; text-align: center; font: 600 56px/1.1 var(--mono); letter-spacing: .08em; }
.approve-hint { margin: 0 0 14px; text-align: center; color: var(--dim); font-size: 14px; }
.code-alt { margin-top: 14px; }
.code-alt > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.code-alt[open] > summary { margin-bottom: 10px; }
.qr-key { flex: 1; min-width: 0; display: grid; gap: 8px; }
.qr-key .scan { font-size: 14px; line-height: 1.45; color: var(--dim); }
.qr-key .scan b { color: var(--ink); font-weight: 600; }
.qr-key .secret { font-size: 13px; letter-spacing: .04em; line-height: 1.5; }
/* A row of the recovery overview that is a fact, not a link. */
.choice.static { cursor: default; }
.choice .ico.t-mint { background: var(--ok-bg); color: var(--ok); }
.choice.static:hover { border-color: var(--line-2); transform: none; box-shadow: none; }
.prod-signup fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.prod-signup legend { padding: 0; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.prod-signup .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prod-signup .pick-app { padding: 10px 14px; }
.prod-signup:has(#plan-free:checked) .seats-pick { display: none; }
.prod-signup:has(input[name=plan]:checked):not(:has(#plan-individual-apps:checked)) .apps-pick { display: none; }
@media (max-width: 480px) {
    /* No box on a phone either: the steps use the full width, so a heading stays on one line. */
    .auth-card { padding: 0; }
    .prod-signup .app-grid { grid-template-columns: minmax(0, 1fr); }
    .codes { grid-template-columns: minmax(0, 1fr); }
}

/* ── Legacy: pages not yet moved onto the components above ────────────────── */
/* The users list (FS-597 rebuilds it as People) still writes the portal's older form-and-table
   markup; these rules draw it from the same tokens until it moves. Delete with the last user. */
.portal { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.portal h1 { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.portal h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.portal .sub { color: var(--dim); margin-top: -12px; }
.portal .card { overflow-x: auto; display: block; }
.portal .card:has(> table) { padding: 0 20px; }
.portal table { width: 100%; border-collapse: collapse; }
.portal th { text-align: left; padding: 11px 12px; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; border-bottom: 1px solid var(--line); }
.portal td { text-align: left; padding: 11px 12px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); vertical-align: top; }
.portal tr:first-child td, .portal tr:nth-child(2) td { border-top: 0; }
.portal th:first-child, .portal td:first-child { padding-left: 0; }
.portal th:last-child, .portal td:last-child { padding-right: 0; }
.portal label { display: block; font-size: 11.5px; font-weight: 600; color: var(--dim); margin: 12px 0 6px; }
.portal label:has(> input[type=checkbox]) { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--ink-2); }
.portal input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--signal); }
.portal input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .portal select { width: 100%; max-width: 28rem; height: 32px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 400 14px/1 var(--font); }
.portal input:focus, .portal select:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.portal .row { display: flex; flex-wrap: wrap; gap: 16px; }
.portal .row > div { flex: 1; min-width: 12rem; }
.portal form.inline { display: inline; margin: 0; }
form.stack { display: flex; flex-direction: column; gap: 24px; }
.grid.top { align-items: start; }
.portal button, .portal .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 6rem; padding: 0 16px; margin-top: 12px; border-radius: 999px; border: 1px solid transparent; background: var(--signal); color: var(--signal-ink); font: 600 14px/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer; }
.portal button:hover, .portal .btn:hover { background: var(--signal-hover); }
.portal button.ghost, .portal .btn.ghost { background: var(--ink); color: var(--bg); margin-top: 0; }
.portal button.ghost:hover, .portal .btn.ghost:hover { background: color-mix(in srgb, var(--ink) 85%, transparent); }
.portal td button, .portal td .btn { margin: 2px 0; }
.portal .seats { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.portal .seats small { font-size: 14px; color: var(--dim); font-weight: 500; }
.portal .bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.portal .bar > i { display: block; height: 100%; background: var(--signal); }
.portal hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.portal .toolbar { padding: 0; }
.portal .toolbar input { max-width: 18rem; }
.portal .toolbar button, .portal .toolbar .btn { margin: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .side, .topbar { display: none; }
}

/* The picker (people/pick.rs): chosen rows pinned above the box, results under it. */
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.picker { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.picker .picked { display: flex; flex-wrap: wrap; gap: 0 16px; }
.picker .picked .check { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .in { width: 100%; max-width: 28rem; }
.pick-results { position: absolute; z-index: 20; top: 100%; left: 0; width: 100%; max-width: 28rem; max-height: 50vh; overflow: auto; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); }
.pick-results button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: none; border-radius: 6px; color: var(--ink); font: inherit; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.pick-results button:hover, .pick-results button:focus { background: var(--surface-3); }
.pick-results .faint { padding: 6px 10px; font-size: 13px; }
