[hidden] { display: none !important; }
.audit-pagination { margin-top: 16px; }
.evidence-triage .evidence-filters { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 16px; margin: 20px 0; }
.evidence-filters label { display: grid; gap: 6px; min-width: 0; }
.evidence-group { border: 1px solid var(--line); border-radius: 9px; padding: 14px; margin: 10px 0; }
.evidence-group > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.evidence-group > summary > span:first-child { min-width: 0; }
.evidence-group summary code { display: block; color: var(--muted); overflow-wrap: anywhere; margin-top: 4px; }
.evidence-group > p { margin-top: 14px; }
.evidence-source { padding: 14px 0; border-top: 1px solid var(--line); }
.evidence-source h3 { font-size: 14px; }
.evidence-source dl { display: grid; grid-template-columns: minmax(90px,140px) minmax(0,1fr); gap: 8px 16px; }
.evidence-source dt { color: var(--muted); }
.evidence-source dd { margin: 0; overflow-wrap: anywhere; }
.evidence-rejected { padding: 14px; border: 1px solid var(--warn); border-radius: 8px; margin: 18px 0; }
.evidence-rejected summary { cursor: pointer; }
.evidence-group > summary > span:first-child { flex: 1; }
.evidence-group > summary::before { content: '›'; color: var(--muted); font-size: 24px; }
.evidence-group[open] > summary::before { transform: rotate(90deg); }
.evidence-time-warning { color: var(--warn); margin: 12px 0 0; }
.evidence-next { padding-left: 22px; }
.evidence-links { margin-top: 18px; }
.evidence-table { min-width: 1120px; }
.evidence-table td { max-width: 250px; overflow-wrap: anywhere; }
@media (max-width: 480px) { .evidence-triage .evidence-filters { grid-template-columns: minmax(0,1fr); } .evidence-group > summary { align-items: flex-start; flex-direction: column; } }
.audit-controls .page-actions { gap: 10px; }
.audit-table pre { max-width: 64ch; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
#audit-export-progress { min-height: 1.5em; margin: 14px 0 8px; }
/* Shared surfaces for sign-in and every workspace page. */
:root {
  color-scheme: light;
  --bg: #f5f5f8; --panel: #fff; --panel-soft: #f7f8fc; --sidebar: #fcfcfe;
  --line: #e1e5ee; --text: #202638; --muted: #626d82;
  --accent: #5145d8; --accent-soft: #eeedff; --accent-button: #5145d8;
  --good: #176d4a; --good-bg: #eaf7ef; --warn: #886015; --warn-bg: #fff6df;
  --danger: #b33147; --danger-bg: #fff0f2;
  --shadow: 0 12px 40px -28px #26304766;
  --radius: 18px; --header-height: 72px;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0d121d; --panel: #161d2b; --panel-soft: #1c2536; --sidebar: #111824;
  --line: #2c3850; --text: #edf1fc; --muted: #b0bbd0;
  --accent: #bcb4ff; --accent-soft: #2b294b; --accent-button: #6553e8;
  --good: #90e3b9; --good-bg: #19382e; --warn: #f3d38e; --warn-bg: #3c3220;
  --danger: #ffb0bd; --danger-bg: #41272f;
  --shadow: 0 14px 48px -24px #0009;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
button,input,select,textarea { font: inherit; }
button,a,input,textarea,select { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
[hidden],.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--panel); padding: 12px; border-radius: 10px; }
.skip-link:focus { top: 8px; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.25; letter-spacing: -1px; font-weight: 680; margin-bottom: 10px; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.25px; margin-bottom: 20px; }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.muted,small { color: var(--muted); }
/* Persistent brand and appearance controls. */
.global-bar { height: var(--header-height); padding: 0 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 30; }
.global-brand,.global-tools,.brand { display: flex; align-items: center; gap: 14px; }
.brand { color: var(--text); gap: 11px; }
.brand:hover { text-decoration: none; }
.brand strong { font-size: 22px; letter-spacing: -.8px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#7768f2,#4937c6); color: #fff; font-size: 27px; font-weight: 750; line-height: 1; box-shadow: 0 5px 12px #5145d824; }
.brand-note { color: var(--muted); font-size: 12px; border-left: 1px solid var(--line); margin-left: 6px; padding-left: 16px; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; min-width: 40px; min-height: 40px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--muted); font-size: 22px; }
.icon-button:hover { background: var(--panel-soft); border-color: var(--line); color: var(--text); }
.language-picker { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.language-picker select { width: auto; min-height: 40px; border: 0; background: transparent; padding: 0 4px; color: var(--text); font-size: 13px; }
.global-tools { gap: 14px; }
/* A product illustration, not a synthetic status or activity chart. */
.auth-layout { max-width: 1200px; min-height: calc(100svh - var(--header-height)); padding: 64px 40px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 80px; margin: auto; }
.auth-intro { padding-bottom: 12px; }
.product-label { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .08em; color: var(--muted); margin-bottom: 24px; }
.product-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.auth-intro h1 { font-size: clamp(38px,4.2vw,56px); line-height: 1.18; letter-spacing: -2px; margin: 0 0 22px; text-wrap: balance; max-width: 500px; }
.auth-subtitle { font-size: 17px; line-height: 1.8; color: var(--muted); max-width: 440px; margin-bottom: 28px; }
.auth-art { position: relative; height: 174px; max-width: 390px; margin: 8px 0 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(ellipse at center,var(--accent-soft),transparent 70%),var(--panel); }
.art-orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-18deg); }
.orbit-one { width: 240px; height: 120px; }
.orbit-two { width: 340px; height: 224px; }
.art-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-8deg); display: grid; place-items: center; width: 70px; height: 70px; border-radius: 24px; background: linear-gradient(145deg,#8b7ff6,#5145d8); color: white; font-size: 50px; font-weight: 750; line-height: 1; box-shadow: 0 14px 30px #5145d838; }
.art-node { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.node-people { top: 28px; left: 14%; color: var(--accent); }
.node-runner { bottom: 24px; left: 23%; color: var(--muted); }
.node-check { top: 54px; right: 15%; color: var(--good); }
.auth-features { display: grid; gap: 14px; }
.auth-features>div { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.feature-number { font: 11px ui-monospace,monospace; color: var(--accent); border: 1px solid var(--line); border-radius: 9px; width: 30px; height: 30px; display: grid; place-items: center; background: var(--panel); }
.security-note { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 12px; max-width: 440px; margin: 28px 0 0; line-height: 1.8; }
.security-note svg { width: 17px; height: 20px; margin-top: 2px; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 26px 80px -40px #28305266; padding: 40px; }
.auth-card h2 { font-size: 27px; line-height: 1.35; letter-spacing: -.75px; margin: 0 0 14px; }
.auth-card>p { color: var(--muted); margin: 0 0 26px; }
.auth-label { display: block; font-size: 11px; letter-spacing: .09em; color: var(--muted); margin-bottom: 16px; }
.auth-card .btn { width: 100%; min-height: 46px; }
.auth-card .secondary { margin-top: 12px; }
.auth-card .text-link { display: block; text-align: center; margin: 20px 0 0; font-size: 13px; }
.auth-card .auth-footnote { margin: 22px 0 0; font-size: 12px; line-height: 1.8; }
.auth-caption { font-size: 11px; color: var(--muted); text-align: center; letter-spacing: .07em; margin-top: 20px; }
.signed-identity { display: flex; gap: 12px; align-items: center; background: var(--panel-soft); padding: 16px; border-radius: 12px; margin: 22px 0; overflow-wrap: anywhere; }
.signed-identity>div { min-width: 0; font-size: 12px; color: var(--muted); }
.signed-identity strong { display: block; font-size: 14px; color: var(--text); }
.provider-buttons { display: grid; gap: 12px; }
.provider-button { display: flex; align-items: center; gap: 14px; padding: 16px; min-height: 80px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); text-align: left; transition: border-color .15s,background .15s,transform .15s; }
.provider-button:hover { background: var(--panel-soft); border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.provider-button[aria-disabled=true] { cursor: default; }
.provider-button[aria-disabled=true]:hover { transform: none; border-color: var(--line); }
.provider-button strong { display: block; font-size: 14px; }
.provider-button small { display: block; font-size: 12px; line-height: 1.5; margin-top: 3px; }
.provider-button>span:last-child { margin-left: auto; }
.provider-logo { width: 26px; height: 26px; }
.provider-logo.github { fill: currentColor; stroke: none; }
.provider-logo.cloudflare { color: #db6a23; stroke-width: 1.8; }
/* Workspace chrome and readable data surfaces. */
.shell { display: grid; grid-template-columns: 248px minmax(0,1fr); min-height: calc(100svh - var(--header-height)); }
.sidebar { height: calc(100svh - var(--header-height)); position: sticky; top: var(--header-height); display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line); padding: 28px 18px 20px; overflow-y: auto; }
.workspace-select { padding: 0 4px 28px; }
.workspace-select label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.workspace-select select { font-weight: 600; background: var(--panel); min-height: 46px; }
.nav-label { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin: 0 14px 11px; }
nav { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 11px; min-height: 46px; padding: 11px 13px; text-align: left; color: var(--muted); background: transparent; font-weight: 550; font-size: 13px; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:not(:disabled):hover { background: var(--panel-soft); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb,var(--accent) 14%,transparent); }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 22px 4px 0; display: flex; align-items: flex-start; gap: 11px; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.user-details { min-width: 0; }
.identity { font-size: 12px; overflow-wrap: anywhere; font-weight: 550; }
.user-role { margin: 7px 0; }
.user-role .badge { font-size: 10px; padding: 2px 7px; }
.signout { font-size: 12px; color: var(--muted); }
main { min-width: 0; display: flex; flex-direction: column; }
.topbar { padding: 40px 44px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 9px; }
.page-description { color: var(--muted); font-size: 14px; margin: 0; max-width: 620px; }
.content { padding: 0 44px 36px; min-height: 340px; }
.content-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 44px 28px; font-size: 12px; color: var(--muted); margin-top: auto; border-top: 1px solid var(--line); }
#data-age { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-bottom: 28px; }
.card,.section-card { min-width: 0; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card + .card, .card + .table-wrap { margin-top: 20px; }
.card > h3 { font-size: 17px; margin-bottom: 12px; }
.card > p { max-width: 80ch; }
.card > details { margin-top: 16px; }
.card .form { padding: 18px 0 0; border: 0; background: transparent; }
.card .table-wrap { margin-top: 18px; }
.details-note { color: var(--muted); font-size: 13px; margin: 14px 0; }
.details-note > summary { cursor: pointer; color: var(--text); padding: 6px 0; }
.details-note > p { margin: 10px 0 0; }
.table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
label > input, label > select, label > textarea { margin-top: 5px; }
.stat-card { padding: 24px; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 24px; right: 24px; width: 7px; height: 7px; border-radius: 3px; background: var(--accent); opacity: .7; }
.stat-label { font-size: 13px; color: var(--muted); margin: 0 20px 14px 0; }
.metric { font-size: 34px; font-weight: 680; letter-spacing: -1.2px; line-height: 1.35; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-detail { min-height: 27px; display: flex; align-items: center; font-size: 12px; color: var(--muted); margin-top: 14px; }
.section-card { padding: 28px; }
.section-card .table-wrap { border: 0; margin: 0 -28px -28px; border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; align-items: start; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); padding: 9px 15px; font-size: 13px; font-weight: 550; white-space: normal; transition: background .15s,border-color .15s; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--panel-soft); text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent-button); border-color: var(--accent-button); color: #fff; }
.btn.primary:hover { background: #4937c6; border-color: #4937c6; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); }
input,select,textarea { width: 100%; padding: 11px 13px; min-height: 44px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; min-width: 0; }
input::placeholder,textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; font: 13px/1.8 ui-monospace,SFMono-Regular,Menlo,monospace; }
label { font-size: 13px; font-weight: 550; color: var(--text); }
.form { display: grid; grid-template-columns: minmax(0,1fr) 180px auto; gap: 18px; align-items: end; background: var(--panel); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; box-shadow: var(--shadow); }
.form label,.stack-form label { display: grid; gap: 8px; }
.stack-form { display: grid; gap: 18px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.auth-card .stack-form { padding-top: 0; border-top: 0; }
.stack-form small { font-size: 12px; }
.form-error { color: var(--danger); font-size: 13px; margin: 0; }
.form[aria-busy=true] button,.stack-form[aria-busy=true] button { opacity: .55; pointer-events: none; }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; overscroll-behavior-x: contain; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 640px; }
th,td { padding: 18px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
th { font-size: 11px; font-weight: 600; background: var(--panel-soft); color: var(--muted); white-space: nowrap; letter-spacing: .025em; }
td { max-width: 380px; overflow-wrap: anywhere; }
td strong { font-weight: 600; }
td small { display: block; margin-top: 5px; font-size: 11px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel-soft); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 5px 9px; border-radius: 7px; color: var(--muted); background: var(--panel-soft); font-weight: 550; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.online,.badge.active,.badge.approved,.badge.owner { color: var(--good); background: var(--good-bg); }
.badge.stale,.badge.trial,.badge.pending { color: var(--warn); background: var(--warn-bg); }
.badge.disconnected,.badge.expired,.badge.disabled,.badge.suspended,.badge.revoked { color: var(--danger); background: var(--danger-bg); }
.badge.admin { color: var(--accent); background: var(--accent-soft); }
.kv { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 16px; margin: 26px 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.provider { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; font-weight: 550; }
.mono,code { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 12px; overflow-wrap: anywhere; }
.token-box { display: block; border: 1px solid var(--line); background: var(--panel); padding: 14px; border-radius: 10px; user-select: all; }
.notice { padding: 20px 24px; border: 1px solid var(--line); background: var(--panel-soft); border-radius: var(--radius); margin-bottom: 24px; color: var(--muted); font-size: 13px; }
.notice strong { color: var(--text); }
.notice p { margin: 8px 0 14px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; margin: 0 44px 24px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.banner.error { color: var(--danger); background: var(--danger-bg); }
.banner.success { color: var(--good); background: var(--good-bg); }
.loading,.empty { display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 56px 28px; text-align: center; color: var(--muted); min-height: 240px; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel); }
.section-card .empty { border: 0; background: transparent; }
.self-service { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 26px; }
.self-service>p { font-size: 13px; }
.billing-card { margin-bottom: 24px; }
.billing-card h2 { margin: 5px 0 0; }
.billing-summary { display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,1fr); gap: 24px; align-items: center; }
.billing-summary p { margin-bottom: 8px; }
.billing-seats { font-size: 32px; font-weight: 650; letter-spacing: -1px; line-height: 1.3; margin-bottom: 8px; }
.billing-seats>span { color: var(--muted); font-size: 23px; font-weight: 450; }
.billing-notice { padding: 12px 16px; border-radius: 12px; color: var(--warn); background: var(--warn-bg); margin-top: 18px; }
.billing-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin: 22px 0 14px; }
.billing-checkout { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.billing-checkout label { display: grid; gap: 7px; }
.billing-checkout input { width: 140px; }
.billing-feedback { color: var(--muted); margin: 12px 0 0; min-height: 1.6em; }
.billing-card .kv { margin: 0; }
@media (max-width: 560px) {
  .billing-summary { grid-template-columns: 1fr; gap: 14px; }
  .billing-actions,.billing-checkout { display: grid; width: 100%; }
  .billing-checkout input { width: 100%; }
  .billing-card .section-heading { flex-wrap: wrap; }
}
.runner-card { margin-bottom: 18px; }
#device-form { max-width: 820px; grid-template-columns: minmax(0,1fr); }
.runner-presets { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
#runner-expiry { grid-column: 1 / -1; margin: 0; }
#device-form > button { justify-self: start; }
#runner-receipt { margin-bottom: 18px; border-color: var(--info); }
#runner-receipt > label { display: grid; gap: 6px; }
#runner-receipt .page-actions { margin-top: 14px; }
@media (min-width: 901px) { #device-form { grid-template-columns: minmax(0,1.5fr) minmax(180px,1fr); } }
.policy-review-card pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; margin: 8px 0; }
.policy-diff table { min-width: 680px; table-layout: fixed; }
.policy-diff th:first-child { width: 22%; }
.policy-diff th:nth-child(2) { width: 105px; }
.policy-diff td:nth-child(2) { white-space: nowrap; }
.policy-diff th[scope="row"] { color: var(--text); }
.policy-diff td { overflow-wrap: anywhere; }
.policy-diff-summary { color: var(--muted); margin: 12px 0; }
.policy-partial { border-left: 3px solid var(--warn); padding: 10px 14px; }
.policy-candidate { margin: 16px 0; }
.policy-review-card summary { cursor: pointer; padding: 8px 0; }
/* One shell for every domain page; table scrolling stays inside the content pane. */
main, .card, .topbar > *, .content > * { min-width: 0; }
.card { overflow-wrap: anywhere; }
.sidebar { padding-bottom: 18px; }
#nav { overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 16px; }
.nav-group { margin: 16px 12px 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-group:first-child { margin-top: 0; }
.nav-item { min-height: 40px; }
.nav-item.active { box-shadow: inset 3px 0 var(--accent); color: var(--text); }
.page-description { color: var(--muted); max-width: 70ch; margin: 8px 0 0; }
.page-actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#data-age { margin-left: auto; color: var(--muted); font-size: 12px; }
.content { width:100%; max-width: 1600px; margin: 0 auto; }
.card > .table-wrap { max-width: 100%; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.kv { grid-template-columns: minmax(90px,140px) minmax(0,1fr); }
.btn, input, select { min-height: 42px; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position: calc(100% - 16px) 18px,calc(100% - 11px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 3px; }
[aria-busy="true"] { cursor: progress; }
kbd { font: 11px ui-monospace, monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; margin-left: 6px; }
dialog { color: var(--text); background: var(--panel); border: 1px solid #414b59; border-radius: 16px; width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 24px; box-shadow: 0 24px 80px #0009; }
dialog::backdrop { background: #0009; backdrop-filter: blur(3px); }
.search-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.search-heading h2 { font-size: 20px; margin: 0; }
#page-search-input { margin-top: 8px; }
#page-search-count { margin: 12px 0; font-size: 12px; }
.page-results { display: grid; gap: 4px; max-height: 52dvh; overflow-y: auto; padding: 3px; }
.page-result { min-height: 44px; text-align: left; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.page-result:hover, .page-result:focus-visible { background: var(--panel-2); border-color: var(--line); }
.records-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.records-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; min-width: 0; }
.records-toolbar label:first-child { flex: 1; min-width: min(220px,100%); }
.records-count { color: var(--muted); font-size: 12px; margin: 10px 0; }
.records-hint { color: var(--muted); font-size: 12px; max-width: 90ch; margin: 0 0 12px; }
.records-sort { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 42px; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.records-sort span { color: var(--muted); font-size: 12px; }
th[aria-sort] { color: var(--text); box-shadow: inset 0 -2px var(--accent); }
th[aria-sort] .records-sort span { color: var(--accent); }
.records-toolbar .records-page-size { min-width: 90px; }
@media (max-width: 480px) { .records-toolbar label:first-child { flex-basis: 100%; } .records-export { flex: 1; } }
.records-pagination { display: flex; gap: 8px; justify-content: flex-end; }
.records-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.records-meta .records-count { flex: 1; min-width: min(280px,100%); }
.table-scroll-hint { display: none; color: var(--muted); font-size: 12px; }
.member-intro { margin-bottom: 18px; }
.member-add { margin-top: 16px; }
.member-add summary { cursor: pointer; padding: 8px 0; }
.member-add p { margin-top: 10px; color: var(--muted); }
#member-editor { margin-bottom: 18px; border-color: var(--info); }
.member-edit-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.member-edit, .member-remove { margin: 2px 4px 2px 0; }
.ci-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.ci-filters label { display: grid; gap: 6px; flex: 1 1 180px; min-width: 0; }
.ci-filters select, .ci-filters input { width: 100%; min-width: 0; box-sizing: border-box; }
.ci-inspection { min-width: 0; }
.ci-inspection code, .ci-inspection dd { overflow-wrap: anywhere; white-space: normal; }
.ci-inspection select { width: 100%; min-width: 0; box-sizing: border-box; }
/* Keep the historical native selector out of the grid formatting context. */
.ci-inspection label.stack-form { display: block; }
.ci-inspection dl { display: grid; grid-template-columns: minmax(150px,1fr) minmax(0,3fr); gap: 8px 16px; }
.ci-inspection dt { color: var(--muted); }
.ci-inspection dd { margin: 0; }
.ci-inspection .badge { white-space: normal; line-height: 1.6; }
.ci-checklist { min-width: 520px; }
.ci-checklist ul { margin: 0; padding-left: 20px; }
@media (max-width: 480px) { .ci-inspection dl { grid-template-columns: minmax(0,1fr); } }
.ci-table { min-width: 900px; }
.ci-table details { margin-top: 8px; }
.ci-table details code { display: block; max-width: 240px; overflow-wrap: anywhere; white-space: normal; }
#ci-deliveries-title:focus { outline: 2px solid var(--info); outline-offset: 4px; }
@media (max-width: 480px) {
  .ci-filters { display: grid; grid-template-columns: minmax(0, 1fr); }
  .ci-filters label, .ci-filters button { width: 100%; }
}

.grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:20px; }
.grid > .card { grid-column:span 12; }
.grid > .card.half { grid-column:span 6; }
:root { --info:var(--accent); --panel-2:var(--panel-soft); }
.topbar { flex-wrap: wrap; align-items: flex-start; }
.topbar > div:first-child { flex: 1 1 380px; min-width: 0; }
.topbar .page-actions { align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar .page-actions .btn { white-space: nowrap; }
#share-page { color: var(--muted); }
.nav-section { margin: 18px 13px 4px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.nav-section:first-child { margin-top: 0; }
.sidebar-footer { margin-top: 24px; }
@media(max-width:560px) { .topbar > div:first-child { flex-basis:100%; } .topbar .page-actions { width:100%; } #page-search-open { flex:1; } .topbar kbd { display:none; } .card { padding:20px; } .member-edit-actions > .btn { flex:1; } }
@media(max-width:900px) { .grid > .card.half { grid-column:span 12; }
}
.empty p { max-width: 400px; font-size: 13px; margin: 0; }
.empty-mark { border: 1px solid var(--line); border-radius: 16px; width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 20px; background: var(--panel-soft); color: var(--accent); font-size: 24px; }
.loading { gap: 18px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 901px) { #menu-toggle { display: none; } }
@media (min-width: 1680px) { .topbar,.content,.content-footer { padding-left: 64px; padding-right: 64px; } .banner { margin-left: 64px; margin-right: 64px; } }
@media (max-width: 1100px) {
  .auth-layout { gap: 40px; padding: 48px 32px; }
  .content { padding: 0 28px 28px; }
  .topbar { padding: 32px 28px 26px; }
  .banner { margin-left: 28px; margin-right: 28px; }
  .content-footer { padding-left: 28px; padding-right: 28px; }
  .stats { gap: 12px; }
  .stat-card { padding: 20px; }
  .form { grid-template-columns: minmax(0,1fr) 160px; }
  .form>.btn { grid-column: 1/-1; justify-self: end; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { display: none; }
  .nav-open .sidebar { display: flex; position: fixed; left: 0; top: var(--header-height); width: min(300px,88vw); z-index: 25; box-shadow: 8px 0 40px #10172a40; overscroll-behavior: contain; }
  .auth-layout { grid-template-columns: 1fr; max-width: 580px; gap: 34px; padding: 44px 24px; }
  .auth-intro { padding: 0; }
  .auth-intro h1 { font-size: 38px; }
  .auth-art,.auth-features,.security-note { display: none; }
  .auth-subtitle { margin: 0; }
  .auth-card { padding: 30px; }
  .auth-intro .product-label { margin-bottom: 16px; }
  .icon-button,.nav-item { min-height: 44px; min-width: 44px; }
  .btn { min-height: 44px; }
  .global-tools { gap: 8px; }
}
@media (max-width: 560px) {
  :root { --header-height: 64px; }
  .global-bar { padding: 0 16px; }
  .global-tools { gap: 5px; }
  .brand-note { display: none; }
  .brand strong { font-size: 20px; }
  .auth-layout { padding: 34px 20px; gap: 26px; align-content: start; }
  .auth-intro h1 { font-size: 34px; }
  .auth-subtitle { font-size: 15px; }
  .auth-card { padding: 26px; }
  .auth-card h2 { font-size: 24px; }
  .topbar { padding: 28px 20px 24px; align-items: flex-start; gap: 14px; }
  .topbar h1 { font-size: 27px; }
  .topbar .btn { padding: 9px 11px; flex: none; }
  .page-description { font-size: 13px; }
  .content { padding: 0 20px 28px; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .stat-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 16px; padding: 19px 22px; }
  .stat-card::before { display: none; }
  .stat-label { margin: 0; }
  .metric { font-size: 28px; grid-row: 1/3; grid-column: 2; }
  .stat-detail { margin: 0; min-height: 0; }
  .section-card { padding: 22px; }
  .section-card .table-wrap { margin: 0 -22px -22px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 15px; }
  .form { grid-template-columns: 1fr; gap: 16px; padding: 22px; }
  .form>.btn { width: 100%; }
  .banner { margin: 0 20px 20px; }
  .content-footer { padding: 16px 20px 26px; flex-direction: column; gap: 6px; }
  .kv { grid-template-columns: 88px minmax(0,1fr); gap: 14px; }
  .auth-card .loading { padding: 28px 0; }
  .language-picker svg { display: none; }
  input,select { font-size: 16px; }
  .language-picker select { font-size: 13px; }
  td:first-child,th:first-child { position: sticky; left: 0; max-width: 160px; min-width: 112px; }
  td:first-child { background: var(--panel); box-shadow: 1px 0 var(--line); }
  tbody tr:hover td:first-child { background: var(--panel-soft); }
}
:root[lang=zh-CN] .auth-intro h1 { letter-spacing: -.8px; font-size: clamp(32px,3.6vw,48px); }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
