/* Self-hosted variable fonts, shared with the embedded Eval Console
   bundle (font-src 'self'; latin subsets). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("eval-console/assets/inter-variable.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("eval-console/assets/jetbrains-mono-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("eval-console/assets/lora-variable.woff2") format("woff2");
}

:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-soft: #faf9f5;
  --surface-muted: #f0eee6;
  --line: #e8e4d9;
  --line-soft: #efece3;
  --line-strong: #d8d3c4;
  --ink: #1f1e1d;
  --ink-soft: #44423d;
  --secondary: #6e6c64;
  /* Darkened from the prototype's decorative gray so 10–12px metadata meets WCAG AA. */
  --muted: #6e6c64;
  --faint: #9c9a90;
  --sidebar: #f0eee6;
  --sidebar-divider: #e0dccd;
  --sidebar-active: var(--accent-soft);
  --sidebar-text: #44423d;
  --sidebar-muted: #6e6c64;
  --brand: #d97757;
  --accent-strong: #c4623d;
  --accent-soft: #faeee8;
  --primary: #d97757;
  --blue: #6b5b8f;
  --blue-bg: #eae4f2;
  --blue-line: #dcd4ec;
  --green: #4a6b3a;
  --green-bg: #e2ebd9;
  --green-line: #cfdcc0;
  /* Status text keeps the prototype hue while clearing 4.5:1 on amber surfaces. */
  --amber: #8a6a1f;
  --amber-deep: #755712;
  --amber-bg: #f6e8c8;
  --amber-line: #ead7a8;
  --red: #a04b2c;
  --red-deep: #84391f;
  --red-bg: #f6dfd6;
  --red-line: #eac9b8;
  --indigo: #55447e;
  --indigo-bg: #e7e1f1;
  --indigo-line: #d5cbe6;
  --radius-control: 8px;
  --radius-panel: 8px;
  --radius-modal: 8px;
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Lora", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-width: 224px;
  --topbar-height: 52px;
  --z-sidebar: 40;
  --z-dropdown: 110;
  --z-backdrop: 70;
  --z-drawer: 80;
  --z-modal: 90;
  --z-dialog: 100;
  --z-toast: 120;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); color: var(--ink); font-family: var(--font); }
body { margin: 0; min-width: 320px; min-height: 100vh; font-size: 13px; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .58; }
a { color: #a04b2c; text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.secondary { color: var(--secondary); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Authentication */
.auth-shell { min-height: 100vh; background: var(--bg); display: grid; place-items: center; padding: 40px 20px; }
.auth-card-wrap { width: min(400px, 100%); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; background: var(--brand); color: #fff; font-size: 16px; font-weight: 700; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.auth-brand small { margin-top: 2px; color: var(--sidebar-muted); font-size: 11px; }
.auth-card { min-height: 238px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-modal); box-shadow: 0 8px 30px rgba(31, 30, 29, .08); }
.auth-form { display: grid; gap: 13px; }
.auth-form-heading { margin-bottom: 2px; }
.auth-form-heading h1 { margin: 0 0 4px; font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.25; }
.auth-form-heading p { margin: 0; color: var(--secondary); font-size: 12.5px; line-height: 1.5; }
.auth-form label, .field { display: grid; gap: 5px; min-width: 0; }
.auth-form label > span, .field > span, .field-label { font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: #fff; padding: 8px 10px; font-size: 12.5px; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
textarea { line-height: 1.5; resize: vertical; }
.field-help { margin: -5px 0 0; color: var(--secondary); font-size: 11.5px; }
.auth-error, .auth-notice, .warning-box { margin: 0; padding: 8px 11px; border-radius: 6px; font-size: 12px; line-height: 1.4; }
.auth-error { border: 1px solid var(--red-line); background: var(--red-bg); color: var(--red); }
.auth-notice { border: 1px solid var(--green-line); background: var(--green-bg); color: var(--green); }
.warning-box { border: 1px solid var(--amber-line); background: var(--amber-bg); color: var(--amber-deep); }
.auth-back-link { justify-self: center; font-size: 12.5px; }
.auth-footer { margin: 16px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
.auth-loading { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--secondary); }
.auth-loading p { margin: 0; }
.auth-spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Application shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; inset: 0 auto 0 0; top: 0; z-index: var(--z-sidebar); height: 100vh; display: flex; flex-direction: column; background: var(--sidebar); color: var(--sidebar-text); }
.sidebar-brand { min-height: 58px; padding: 14px 16px; border-bottom: 1px solid var(--sidebar-divider); display: flex; align-items: center; gap: 9px; }
.sidebar-brand .brand-mark { width: 26px; height: 26px; border-radius: 6px; font-size: 13px; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { color: var(--ink); font-family: var(--font-display); font-size: 13px; font-weight: 600; line-height: 1.2; }
.sidebar-brand small { margin-top: 2px; color: var(--sidebar-muted); font-size: 10.5px; }
.primary-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group + .nav-group { margin-top: 7px; }
.nav-group-label { display: flex; align-items: center; gap: 6px; padding: 10px 8px 4px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.nav-group-label b { padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 9px; }
.nav-role-switcher { margin: 0 2px 12px; padding: 9px; border: 1px solid var(--sidebar-divider); border-radius: 8px; display: grid; gap: 5px; background: var(--surface); }
.nav-role-switcher > span { color: var(--muted); font-size: 9.5px; font-weight: 600; letter-spacing: .02em; }
.nav-role-switcher .custom-select-trigger { min-height: 30px; padding: 5px 26px 5px 8px; border-color: var(--line-strong); background: var(--surface); color: var(--ink); font-size: 12px; }
.nav-role-switcher .custom-select-trigger:hover { border-color: var(--brand); background: var(--surface-soft); }
.nav-role-switcher .custom-select-menu { border-color: var(--line-strong); background: var(--surface); }
.nav-item { width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 10px; background: transparent; color: var(--sidebar-text); text-align: left; font-size: 13px; }
.nav-item:hover { background: #e8e4d9; color: var(--ink); }
.nav-item.is-active { background: var(--sidebar-active); color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
.nav-item svg { width: 14px; height: 14px; flex: none; }
.nav-item span { flex: 1; }
.nav-item b { min-width: 21px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; text-align: center; font-size: 10.5px; }
.sidebar-user { min-height: 60px; padding: 12px 14px; border-top: 1px solid var(--sidebar-divider); display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: #e2decf; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.sidebar-user > span:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user strong { overflow: hidden; color: var(--ink); font-size: 12.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { margin-top: 2px; color: var(--sidebar-muted); font-size: 10.5px; letter-spacing: .06em; }
.app-stage { min-width: 0; min-height: 100vh; background: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-height); padding: 0 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; background: var(--surface); }
.breadcrumbs { display: flex; align-items: center; gap: 7px; flex: none; color: var(--secondary); font-size: 13px; white-space: nowrap; }
.breadcrumbs i { color: var(--faint); font-style: normal; }
.breadcrumbs strong { color: var(--ink); }
.global-search { position: relative; width: min(420px, 42vw); margin-left: 8px; }
.global-search > svg { position: absolute; top: 9px; left: 10px; z-index: 1; width: 14px; height: 14px; color: var(--secondary); }
.global-search input { height: 34px; padding-left: 31px; border-color: var(--line); background: var(--surface-muted); }
.search-results { position: absolute; top: 38px; left: 0; right: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: 0 4px 16px rgba(31, 30, 29, .07); }
.search-result { width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--surface-muted); display: flex; align-items: center; gap: 10px; background: #fff; text-align: left; }
.search-result:hover { background: #f5f3ec; }
.search-result b { padding: 1px 5px; border: 1px solid var(--line); border-radius: 6px; color: var(--secondary); font-size: 10.5px; }
.search-result span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sync-pill { padding: 4px 10px; border: 1px solid var(--green-line); border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; background: var(--green-bg); color: var(--green); font-size: 11.5px; font-weight: 600; }
.sync-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.sync-pill[data-state="stale"] { border-color: var(--amber-line); background: var(--amber-bg); color: var(--amber-deep); }
.sync-pill[data-state="offline"] { border-color: var(--ink-soft); background: var(--ink-soft); color: #fff; }
.sync-pill[data-state="error"] { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }
.sync-pill[data-state="loading"] { border-color: var(--blue-line); background: var(--blue-bg); color: var(--blue); }
.alert-button, .icon-button { position: relative; border: 0; display: inline-grid; place-items: center; background: transparent; color: var(--secondary); }
.alert-button { width: 28px; height: 28px; }
.alert-button svg { width: 16px; height: 16px; }
.alert-button b { position: absolute; top: -2px; right: -4px; min-width: 16px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 9.5px; line-height: 15px; }
.icon-button { width: 30px; height: 30px; padding: 0; border-radius: 6px; }
.icon-button:hover { background: var(--surface-muted); color: var(--ink); }
.icon-button.on-dark:hover { background: var(--sidebar-divider); color: var(--ink); }
.mobile-menu { display: none; }
.system-banner { position: sticky; top: var(--topbar-height); z-index: 28; min-height: 38px; padding: 8px 20px; border-bottom: 1px solid; display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.system-banner strong { font-weight: 700; }
.system-banner span { flex: 1; }
.system-banner button { padding: 4px 10px; border: 1px solid currentColor; border-radius: 5px; background: transparent; color: inherit; font-size: 12px; font-weight: 600; }
.system-banner[data-state="stale"] { border-color: var(--amber-line); background: var(--amber-bg); color: var(--amber-deep); }
.system-banner[data-state="offline"] { border-color: var(--ink-soft); background: var(--ink-soft); color: #fff; }
.system-banner[data-state="error"] { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }
.role-preview-banner { min-height: 42px; padding: 7px 20px; border-bottom: 1px solid #eed9c9; display: flex; align-items: center; gap: 12px; background: var(--accent-soft); color: var(--ink); font-size: 12px; }
.role-preview-banner strong { flex: none; }
.role-preview-banner > span { color: var(--secondary); }
.preview-reviewer-field { margin-left: auto; display: flex; align-items: center; gap: 7px; color: var(--secondary); font-size: 11.5px; font-weight: 600; }
.preview-reviewer-field .custom-select { width: 190px; }
.preview-reviewer-field .custom-select-trigger { min-height: 29px; padding-top: 4px; padding-bottom: 4px; border-color: var(--line-strong); background: #fff; color: var(--ink); }
.preview-reviewer-empty { margin-left: auto; font-weight: 600; }
.preview-exit-button { min-height: 29px; padding: 5px 10px; border: 1px solid #e0c3b0; border-radius: 8px; background: #fff; color: #a04b2c; font-size: 11.5px; font-weight: 600; }
.preview-exit-button:hover { background: var(--accent-soft); }

/* Shared product components */
.custom-select { position: relative; width: 100%; min-width: 0; }
.custom-select-trigger { width: 100%; min-height: 34px; padding: 7px 30px 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); position: relative; display: flex; align-items: center; background: #fff; color: var(--ink); text-align: left; font-size: 12.5px; line-height: 1.3; transition: border-color 160ms ease, background-color 160ms ease; }
.custom-select-trigger:hover { border-color: #aeb6c2; background: #fbfcfd; }
.custom-select-trigger > svg { position: absolute; top: 50%; right: 9px; width: 13px; height: 13px; color: var(--muted); transform: translateY(-50%) rotate(90deg); transition: transform 180ms cubic-bezier(.16, 1, .3, 1), color 160ms ease; }
.custom-select[data-open="true"] .custom-select-trigger { border-color: var(--brand); }
.custom-select[data-open="true"] .custom-select-trigger > svg { color: var(--brand); transform: translateY(-50%) rotate(-90deg); }
.custom-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-menu { position: absolute; z-index: var(--z-dropdown); top: calc(100% + 6px); left: 0; width: max(100%, 128px); max-width: min(360px, calc(100vw - 24px)); max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: 0 4px 8px rgba(22, 32, 46, .18); animation: select-reveal 140ms cubic-bezier(.16, 1, .3, 1); }
.custom-select-option { width: 100%; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 5px; display: flex; align-items: center; gap: 7px; background: transparent; color: var(--ink-soft); text-align: left; font-size: 12.5px; line-height: 1.35; }
.custom-select-option:hover, .custom-select-option:focus-visible { outline: none; background: #edf3fd; color: var(--ink); }
.custom-select-option.is-selected { background: var(--blue-bg); color: #12396f; font-weight: 600; }
.custom-select-check { width: 13px; flex: none; color: var(--blue); font-size: 12px; font-weight: 800; opacity: 0; }
.custom-select-option.is-selected .custom-select-check { opacity: 1; }
.custom-select-option-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select[data-disabled="true"] { cursor: not-allowed; opacity: .58; }
@keyframes select-reveal { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }

.page-root { min-height: calc(100vh - var(--topbar-height)); padding: 20px; }
.page { max-width: 1500px; margin: 0 auto; }
.page-header { min-height: 44px; margin-bottom: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-header h1 { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.25; font-weight: 600; }
.page-header p { margin: 2px 0 0; color: var(--secondary); font-size: 12.5px; line-height: 1.45; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.primary-button, .secondary-button, .danger-button, .danger-outline-button, .success-button, .quiet-button, .link-button { min-height: 32px; padding: 7px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.primary-button { border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.primary-button:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.secondary-button, .quiet-button { border: 1px solid var(--line-strong); background: #fff; color: var(--ink); }
.secondary-button:hover, .quiet-button:hover { background: var(--surface-soft); }
.danger-button { border: 1px solid var(--red); background: var(--red); color: #fff; }
.danger-outline-button { border: 1px solid color-mix(in srgb, var(--red) 52%, var(--line)); background: #fff; color: var(--red); }
.danger-outline-button:hover { border-color: var(--red); background: var(--red-bg); }
.success-button { border: 1px solid var(--green-line); background: var(--green-bg); color: var(--green); }
.link-button { min-height: auto; padding: 0; border: 0; background: none; color: #a04b2c; }
.button-icon { display: inline-flex; align-items: center; gap: 7px; }
.button-icon svg { width: 14px; height: 14px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.panel-header { min-height: 42px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 13px; font-weight: 600; }
.panel-header p { margin: 2px 0 0; color: var(--secondary); font-size: 11.5px; }
.panel-link { border: 0; background: none; color: #a04b2c; font-size: 12px; }
.toolbar { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .search-field { position: relative; flex: 1 1 220px; max-width: 360px; }
.search-field svg { position: absolute; top: 9px; left: 10px; width: 14px; height: 14px; color: var(--muted); }
.search-field input { padding-left: 31px; }
.filter-select { width: auto; min-width: 138px; }
.segmented { display: inline-flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.segmented button { min-height: 30px; padding: 6px 10px; border: 0; border-right: 1px solid var(--line-strong); background: #fff; color: var(--secondary); font-size: 12px; }
.segmented button:last-child { border-right: 0; }
.segmented button.is-active { background: var(--primary); color: #fff; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.tabs button { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--secondary); font-size: 12.5px; }
.tabs button.is-active { border-bottom-color: var(--primary); color: var(--ink); font-weight: 600; }
.tabs b { margin-left: 5px; font-weight: 600; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 3px 9px; border: 0; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.status-badge i { width: 12px; font-style: normal; text-align: center; }
.status-running { border-color: var(--blue-line); background: var(--blue-bg); color: var(--blue); }
.status-idle { border-color: var(--line); background: var(--surface-soft); color: var(--secondary); }
.status-ready, .status-approved { border-color: var(--green-line); background: var(--green-bg); color: var(--green); }
.status-paused, .status-stale, .status-changes { border-color: var(--amber-line); background: var(--amber-bg); color: var(--amber-deep); }
.status-attention, .status-failed { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }
.status-archived, .status-withdrawn, .status-unassigned, .status-closed { border-color: var(--line); background: var(--surface-muted); color: var(--secondary); }
.status-assigned { border-color: var(--indigo-line); background: var(--indigo-bg); color: var(--indigo); }
.status-review, .status-submitted { border-color: var(--blue-line); background: var(--blue-bg); color: var(--blue); }
.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th { height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--secondary); text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.data-table th[data-width="7%"] { width: 7%; }
.data-table th[data-width="8%"] { width: 8%; }
.data-table th[data-width="9%"] { width: 9%; }
.data-table th[data-width="10%"] { width: 10%; }
.data-table th[data-width="12%"] { width: 12%; }
.data-table th[data-width="13%"] { width: 13%; }
.data-table th[data-width="18%"] { width: 18%; }
.data-table th[data-width="20%"] { width: 20%; }
.data-table th[data-width="24%"] { width: 24%; }
.data-table th[data-width="28%"] { width: 28%; }
.data-table th[data-width="30%"] { width: 30%; }
.data-table th[data-width="32%"] { width: 32%; }
.data-table td { height: 44px; padding: 7px 12px; border-bottom: 1px solid var(--surface-muted); vertical-align: middle; font-size: 12px; }
.data-table tr.is-compact td { height: 36px; padding-top: 4px; padding-bottom: 4px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-clickable="true"] { cursor: pointer; }
.data-table tbody tr[data-clickable="true"]:hover { background: #f5f3ec; }
.table-primary { display: block; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.table-secondary { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.empty-state, .error-state { padding: 48px 24px; text-align: center; }
.empty-state .empty-icon, .error-state .empty-icon { color: var(--faint); font-size: 24px; }
.empty-state h2, .empty-state h3, .error-state h2, .error-state h3 { margin: 8px 0 0; font-size: 13px; }
.empty-state p, .error-state p { max-width: 520px; margin: 4px auto 0; color: var(--secondary); font-size: 12.5px; line-height: 1.5; }
.empty-state button, .error-state button { margin-top: 12px; }
.skeleton { background: linear-gradient(90deg, #edebe0 25%, #f6f4ec 50%, #edebe0 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton-row { height: 44px; border-bottom: 1px solid var(--surface-muted); }
.tag-list { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--secondary); font-size: 10.5px; }
.pagination-toolbar { justify-content: flex-end; margin-top: 10px; }
.settings-grid-spaced { margin-top: 12px; }
.campaign-row { width: 100%; min-height: 50px; padding: 8px 12px; border: 0; border-top: 1px solid var(--surface-muted); display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto 16px; align-items: center; gap: 12px; background: #fff; color: var(--ink); text-align: left; }
.campaign-row:hover { background: #f5f3ec; }
.campaign-row > span:first-child strong, .campaign-row > span:first-child small { display: block; }
.campaign-row > span:first-child small { margin-top: 2px; color: var(--muted); }
.campaign-row svg { width: 14px; height: 14px; color: var(--muted); }
.artifact-row, .note-row { padding: 10px 0; border-top: 1px solid var(--surface-muted); display: flex; align-items: center; gap: 10px; }
.artifact-row > span, .note-row > p { min-width: 0; flex: 1; }
.artifact-row strong, .artifact-row small { display: block; }
.artifact-row small { margin-top: 2px; color: var(--muted); }
.completed-attempt-actions { padding: 14px 16px 16px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.completed-attempt-actions .secondary-button { width: 100%; justify-content: flex-start; text-align: left; }
.completed-attempt-actions .secondary-button:disabled { opacity: .7; }
.note-row { align-items: flex-start; }
.note-row p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-row > div { display: grid; justify-items: end; gap: 3px; }
.note-row small { color: var(--muted); white-space: nowrap; }
.error-callout { padding: 10px 12px; border: 1px solid var(--red-line); border-radius: 8px; background: var(--red-bg); color: var(--red-deep); }
.error-callout p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.incident-guide { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); }
.incident-guide dt { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.incident-guide dd { margin: 2px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); }
.review-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.review-card { min-height: 160px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; }
.review-card:hover { border-color: var(--line-strong); }
.review-card h2 { margin: 18px 0 5px; font-size: 14px; }
.review-card p { margin: 0; color: var(--secondary); }
.review-card footer { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--surface-muted); display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.feedback-row { padding: 12px 0; border-top: 1px solid var(--surface-muted); }
.feedback-row > div { display: flex; justify-content: space-between; gap: 12px; }
.feedback-row small { color: var(--muted); }
.feedback-row p { margin: 7px 0 0; white-space: pre-wrap; }
.confirmation-mark { width: 54px; height: 54px; margin: 12px auto; border-radius: 50%; display: grid; place-items: center; background: var(--surface-soft); color: var(--primary); font-size: 24px; font-weight: 700; }

/* Overview */
.metric-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 10px; }
.metric { min-height: 76px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.metric:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.metric span { display: block; color: var(--secondary); font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.metric strong { display: block; margin-top: 6px; font-family: var(--mono); font-size: 22px; line-height: 1; }
.metric[data-tone="ready"] strong { color: var(--green); }
.metric[data-tone="attention"] strong { color: var(--red); }
.metric[data-tone="paused"] strong, .metric[data-tone="stale"] strong { color: var(--amber-deep); }
.metric[data-tone="archived"] strong { color: var(--secondary); }
.overview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.overview-row.lower { grid-template-columns: 1.1fr .9fr; }
.compact-list { margin: 0; padding: 0; list-style: none; }
.compact-list-item { min-height: 38px; padding: 8px 16px; border-bottom: 1px solid var(--surface-muted); display: flex; align-items: center; gap: 10px; }
.compact-list-item:last-child { border-bottom: 0; }
.compact-list-item button { width: 100%; padding: 0; border: 0; display: flex; align-items: center; gap: 10px; background: transparent; text-align: left; }
.compact-list-item .item-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-list-item time, .compact-list-item .item-meta { flex: none; color: var(--secondary); font-size: 11.5px; }
.shortcut-list { padding: 12px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.shortcut { padding: 7px 10px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 600; }
.shortcut[data-tone="attention"] { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }
.shortcut[data-tone="ready"] { border-color: var(--green-line); background: var(--green-bg); color: var(--green); }
.shortcut[data-tone="stale"] { border-color: var(--amber-line); background: var(--amber-bg); color: var(--amber-deep); }

/* Details and operational pages */
.detail-heading { margin-bottom: 16px; display: flex; align-items: flex-start; gap: 12px; }
.detail-heading > div { min-width: 0; flex: 1; }
.detail-heading h1 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.detail-heading p { margin: 3px 0 0; color: var(--secondary); font-size: 11.5px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 12px; }
.detail-stack { display: grid; align-content: start; gap: 12px; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.info-box { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.info-box span { display: block; color: var(--secondary); font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.info-box strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 13px; }
.info-box small { display: block; margin-top: 2px; color: var(--secondary); font-size: 11.5px; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; min-height: 43px; padding: 9px 16px 9px 36px; border-bottom: 1px solid var(--surface-muted); }
.timeline li:last-child { border-bottom: 0; }
.timeline li::before { content: ""; position: absolute; top: 15px; left: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.timeline strong, .timeline small { display: block; }
.timeline strong { font-size: 12px; }
.timeline small { margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.code-block { padding: 10px; border: 1px solid var(--red-line); border-radius: 8px; background: var(--red-bg); color: var(--red-deep); font-family: var(--mono); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.note-list { display: grid; gap: 8px; padding: 12px; }
.note-card { padding: 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface-soft); }
.note-card p { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.note-card footer { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.alert-severity { font-weight: 700; }
.alert-severity.is-high { color: var(--red); }
.alert-severity.is-warning { color: var(--amber); }
.progress-track { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: var(--line-soft); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

/* Review, users, audit, settings */
.review-summary { display: flex; gap: 18px; }
.review-summary div { text-align: right; }
.review-summary strong, .review-summary span { display: block; }
.review-summary strong { font-family: var(--mono); font-size: 18px; }
.review-summary span { color: var(--muted); font-size: 10.5px; }
.user-groups { display: grid; gap: 12px; }
.user-group-heading { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: var(--surface-soft); }
.user-group-heading h2 { margin: 0; font-size: 12px; }
.user-row { min-height: 51px; padding: 8px 14px; border-bottom: 1px solid var(--surface-muted); display: grid; grid-template-columns: minmax(220px, 1.6fr) .6fr .7fr .6fr auto; align-items: center; gap: 12px; }
.user-row:last-child { border-bottom: 0; }
.user-identity { min-width: 0; }
.user-identity strong, .user-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity strong { font-size: 12.5px; }
.user-identity small { margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-actions button { min-height: 27px; padding: 5px 8px; border-radius: 8px; font-size: 11px; }
.machine-check { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--blue); font-size: 11px; font-weight: 600; line-height: 1.25; }
.machine-check > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.machine-check-spinner { width: 13px; height: 13px; border: 2px solid var(--blue-line); border-top-color: var(--blue); border-radius: 50%; flex: none; animation: spin .8s linear infinite; }
.machine-check-result { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 7px; row-gap: 1px; line-height: 1.25; }
.machine-check-summary { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11px; font-weight: 700; white-space: nowrap; }
.machine-check-summary i { width: 13px; height: 13px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: currentColor; color: #fff; font-size: 9px; font-style: normal; }
.machine-check-result.is-eligible .machine-check-summary { color: var(--green); }
.machine-check-result.is-ineligible .machine-check-summary { color: var(--red); }
.machine-check-result small { grid-column: 1 / -1; min-width: 0; overflow: hidden; color: var(--secondary); font-size: 9.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.machine-check-result .link-button { min-height: auto; padding: 0; color: var(--accent-strong); font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.machine-action-disabled { width: 100%; min-width: 0; overflow: hidden; color: var(--secondary); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.machine-action-state { display: inline-block; max-width: 100%; overflow: hidden; font-size: 10.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.machine-action-stack { min-width: 0; display: grid; gap: 5px; }
.machine-action-stack > button { width: 100%; min-height: 28px; padding: 5px 7px; font-size: 10.5px; }
.machine-resume-progress { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--accent-strong); font-size: 10.5px; font-weight: 650; line-height: 1.3; }
.machine-resume-progress span { overflow: hidden; text-overflow: ellipsis; }
.machine-resume-result { min-width: 0; display: grid; gap: 1px; color: var(--red); font-size: 10px; line-height: 1.25; }
.machine-resume-result small, .machine-advisory-note { display: -webkit-box; overflow: hidden; color: var(--secondary); font-size: 9px; font-weight: 500; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.machine-resume-limit { color: var(--secondary); font-size: 9.5px; font-weight: 650; }
.warning-callout { padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--red-bg) 68%, #fff); }
.warning-callout strong { display: block; color: var(--red); font-size: 12px; }
.warning-callout p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.audit-row { min-height: 43px; padding: 8px 14px; border-bottom: 1px solid var(--surface-muted); display: grid; grid-template-columns: 145px 130px minmax(180px, 1fr) minmax(120px, .7fr); align-items: center; gap: 12px; }
.audit-row:last-child { border-bottom: 0; }
.audit-action { width: max-content; padding: 1px 6px; border-radius: 6px; background: var(--surface-muted); color: var(--ink-soft); font-family: var(--mono); font-size: 10.5px; font-weight: 600; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.settings-panel { padding: 16px; }
.settings-panel h2 { margin: 0 0 3px; font-size: 13px; }
.settings-panel > p { margin: 0 0 14px; color: var(--secondary); font-size: 11.5px; }
.settings-form { display: grid; gap: 12px; }
.capability-list { display: flex; gap: 7px; flex-wrap: wrap; }
.capability { padding: 4px 8px; border: 1px solid; border-radius: 999px; font-size: 11px; }
.capability[data-allowed="true"] { border-color: var(--green-line); background: var(--green-bg); color: var(--green); }
.capability[data-allowed="false"] { border-color: var(--line); background: var(--surface-muted); color: var(--muted); }
.client-summary { margin-bottom: 12px; display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 8px; }
.client-summary-card { min-height: 64px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; justify-content: center; background: #fff; }
.client-summary-card span { color: var(--secondary); font-size: 11px; font-weight: 600; }
.client-summary-card strong { margin-top: 2px; font-family: var(--mono); font-size: 18px; line-height: 1.2; }
.client-summary + .toolbar .segmented button { display: inline-flex; align-items: center; gap: 6px; }
.client-summary + .toolbar .segmented b { min-width: 17px; padding: 0 4px; border-radius: 999px; background: var(--surface-muted); color: var(--secondary); font-family: var(--mono); font-size: 9.5px; line-height: 17px; }
.client-summary + .toolbar .segmented button.is-active b { background: rgba(255, 255, 255, .18); color: #fff; }
.client-workspace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.client-workspace-card { min-height: 164px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: flex-start; background: #fff; text-align: left; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.client-workspace-card:hover { border-color: var(--line-strong); box-shadow: 0 7px 22px rgba(31, 30, 29, .07); transform: translateY(-1px); }
.client-workspace-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.client-workspace-card h2 { margin: 18px 0 4px; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.client-workspace-card p { margin: 0; color: var(--secondary); font-size: 12px; }
.client-workspace-card .panel-link { margin-top: auto; color: var(--primary); font-size: 12px; font-weight: 650; }
.production-backbar { margin: -4px 0 10px; }
.production-panel { margin-bottom: 12px; overflow: hidden; }
.production-panel > .table-shell { border-width: 1px 0 0; border-radius: 0; }
.production-panel .panel-header { border-bottom: 0; }
.export-list { display: grid; }
.export-list .artifact-row { min-height: 58px; padding: 10px 14px; border-bottom: 1px solid var(--surface-muted); }
.export-list .artifact-row:last-child { border-bottom: 0; }
.export-list .artifact-row span { min-width: 0; }
.export-list .artifact-row strong, .export-list .artifact-row small { display: block; }
.export-list .artifact-row small { margin-top: 3px; color: var(--secondary); font-size: 11px; }

/* Drawers and modals */
.overlay-backdrop { position: fixed; inset: 0; z-index: var(--z-backdrop); border: 0; background: rgba(31, 30, 29, .25); }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: var(--z-drawer); width: min(440px, 100vw); display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line); box-shadow: 0 8px 30px rgba(31, 30, 29, .08); }
.drawer-header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.drawer-header > div { min-width: 0; flex: 1; }
.drawer-header h2 { margin: 5px 0 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.drawer-header p { margin: 3px 0 0; color: var(--muted); font-size: 11.5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-form { display: grid; gap: 14px; }
.drawer-footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal { position: fixed; inset: 0; z-index: var(--z-modal); width: min(460px, calc(100vw - 28px)); height: max-content; max-height: calc(100vh - 32px); margin: auto; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-modal); background: #fff; box-shadow: 0 8px 30px rgba(31, 30, 29, .08); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.modal-header p { margin: 3px 0 0; color: var(--secondary); font-size: 12px; }
.modal-body { padding: 16px 20px; }
.modal-form { display: grid; gap: 12px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.confirm-dialog { z-index: var(--z-dialog); width: min(400px, calc(100vw - 28px)); padding: 20px; }
.confirm-dialog h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.confirm-dialog p { margin: 0 0 18px; color: var(--secondary); font-size: 12.5px; line-height: 1.5; }
.reviewer-picker { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.reviewer-picker button { width: 100%; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--surface-muted); background: #fff; text-align: left; font-size: 12.5px; }
.reviewer-picker button:hover { background: #f5f3ec; }
.toast { position: fixed; bottom: 22px; left: 50%; z-index: var(--z-toast); width: max-content; max-width: calc(100vw - 24px); padding: 10px 18px; border-radius: 8px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 8px 30px rgba(31, 30, 29, .08); font-size: 12.5px; font-weight: 500; line-height: 1.4; transform: translateX(-50%); }
.toast::before { content: "✓"; color: #4a6b3a; }
.toast[data-tone="error"]::before { content: "✕"; color: #a04b2c; }
.toast[data-tone="warning"]::before { content: "⚠"; color: #8a6a1f; }

/* Responsive */
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .data-table { min-width: 920px; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 216px; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); transition: transform 180ms ease-out; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; border: 0; background: rgba(31, 30, 29, .3); }
  .mobile-menu { display: inline-grid; flex: none; }
  .breadcrumbs > span, .breadcrumbs > i { display: none; }
  .global-search { width: min(360px, 52vw); margin-left: 0; }
  .overview-row, .overview-row.lower, .detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .client-summary { grid-template-columns: repeat(3, 1fr); }
  .review-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-row { grid-template-columns: minmax(200px, 1.4fr) .6fr .7fr auto; }
  .user-row > :nth-child(4) { display: none; }
}

@media (max-width: 680px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .breadcrumbs { max-width: 130px; overflow: hidden; }
  .breadcrumbs strong { overflow: hidden; text-overflow: ellipsis; }
  .global-search { flex: 1; width: auto; }
  .sync-pill { width: 28px; height: 28px; padding: 0; justify-content: center; }
  .sync-pill span { display: none; }
  .page-root { padding: 14px 12px 24px; }
  .page-header { align-items: stretch; flex-direction: column; }
  .page-actions { justify-content: flex-start; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 70px; }
  .toolbar { align-items: stretch; }
  .toolbar .search-field, .toolbar .custom-select, .filter-select { max-width: none; width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .info-grid { grid-template-columns: 1fr; }
  .client-summary { grid-template-columns: 1fr; }
  .client-summary-card { min-height: 54px; }
  .client-workspace-grid { grid-template-columns: 1fr; }
  .client-workspace-card { min-height: 136px; }
  .production-panel > .table-shell { border: 0; }
  .export-list .artifact-row { align-items: stretch; flex-direction: column; gap: 10px; }
  .export-list .artifact-row .secondary-button { width: 100%; justify-content: center; }
  .review-card-grid { grid-template-columns: 1fr; }
  .campaign-row { grid-template-columns: minmax(0, 1fr) auto 16px; }
  .campaign-row > :nth-child(3), .campaign-row > :nth-child(4) { display: none; }
  .role-preview-banner { padding: 9px 12px; align-items: flex-start; flex-wrap: wrap; }
  .role-preview-banner > span { flex-basis: calc(100% - 120px); }
  .preview-reviewer-field, .preview-reviewer-empty { width: 100%; margin-left: 0; }
  .preview-reviewer-field .custom-select { width: min(240px, 100%); }
  .system-banner { position: static; align-items: flex-start; flex-wrap: wrap; }
  .system-banner button { margin-left: auto; }
  .user-row { grid-template-columns: 1fr auto; }
  .user-row > :not(.user-identity):not(.row-actions) { display: none; }
  .audit-row { grid-template-columns: 1fr; gap: 4px; padding: 11px 14px; }
  .table-shell.mobile-cards { overflow: visible; border: 0; background: transparent; }
  .table-shell.mobile-cards .data-table, .table-shell.mobile-cards tbody, .table-shell.mobile-cards tr, .table-shell.mobile-cards td { display: block; width: 100%; }
  .table-shell.mobile-cards thead { display: none; }
  .table-shell.mobile-cards tr { margin-bottom: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .table-shell.mobile-cards td { height: auto; min-height: 36px; padding: 8px 12px 8px 42%; border-bottom: 1px solid var(--surface-muted); position: relative; }
  .table-shell.mobile-cards td::before { content: attr(data-label); position: absolute; top: 9px; left: 12px; width: 36%; color: var(--secondary); font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
  .drawer { width: 100vw; }
}

@media (max-width: 430px) {
  .auth-shell { padding: 24px 14px; }
  .auth-card { padding: 22px 18px; }
  .global-search input::placeholder { color: transparent; }
  .metric-grid { gap: 8px; }
  .metric { padding: 10px 11px; }
  .metric strong { font-size: 22px; }
  .tabs { overflow-x: auto; }
  .tabs button { flex: none; }
  .drawer-header, .drawer-body, .drawer-footer, .modal-header, .modal-body, .modal-footer { padding-left: 14px; padding-right: 14px; }
}

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

/* Unified Tasks workspace. The iframe is same-origin and served only after the
   backend has authorized an Admin or Owner session. */
.eval-console-page { display: flex; min-height: calc(100vh - var(--topbar-height) - 40px); flex-direction: column; }
.eval-console-panel { min-height: 600px; flex: 1; display: flex; flex-direction: column; }
.eval-console-source { min-height: 34px; padding: 7px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 7px; color: var(--secondary); font-size: 11px; }
.eval-console-source .source-dot { width: 7px; height: 7px; flex: none; border-radius: 999px; background: var(--green); }
.eval-console-source > span:nth-child(3) { margin-left: auto; color: var(--muted); }
.eval-console-fullscreen { color: var(--primary); font-weight: 600; text-decoration: none; }
.eval-console-fullscreen:hover { text-decoration: underline; }
.eval-console-frame { display: block; width: 100%; min-height: 560px; flex: 1; border: 0; background: #faf9f5; }

@media (max-width: 760px) {
  .eval-console-page { min-height: calc(100vh - var(--topbar-height) - 32px); }
  .eval-console-source { align-items: flex-start; flex-wrap: wrap; }
  .eval-console-source > span:nth-child(3) { width: calc(100% - 14px); margin-left: 14px; }
  .eval-console-fullscreen { margin-left: 14px; }
  .eval-console-frame { min-height: 640px; }
}
