/* ==========================================================================
   Secure Web console - design system
   --------------------------------------------------------------------------
   One stylesheet, no external requests. Sections:

     1  Fonts                        12  Badges, status chips, role pill, chips
     2  Tokens (light, dark)         13  Alerts and flash messages
     3  Base and typography          14  Empty state, pagination, tabs, modal
     4  Icons                        15  Code, key-value lists
     5  App shell: top bar and nav   16  Progress, meters, bars, skeletons
     6  Page layout and footer       17  Stat cards and dashboard pieces
     7  Cards                        18  Sign-in and other public pages
     8  Layout utilities and grids   19  Legacy page components
     9  Tables                       19b Page components (second pass)
    10  Forms                        20  Utilities
    11  Buttons                      21  Reduced motion
                                     22  Print

   CLASS NAMES FOR TEMPLATES (new -> what it is). Legacy names on the right
   still work and are styled as the new component, so untouched templates
   keep rendering; prefer the new names when restyling a page.

     Layout     .page-header .page-title .page-subtitle .page-actions
                .section-title  .stack(-sm|-lg) .cluster .grid-2/3/4
                .grid-auto .split                  <- .request-page-header
     Card       .card .card-header .card-title .card-subtitle .card-body
                .card-footer .card-prominent .card-flush
                                                   <- .tile, .kpi-tile, .chart-tile
     Table      .table-wrap (scroll container) .table .table-sticky
                .table-compact .num (right/tabular) .is-selected
                                                   <- bare <table>, <div style="overflow-x:auto">
     Form       .field .label .help-text .field-error .is-invalid
                .input .select .textarea .checkbox .form-actions .form-grid
                                                   <- .request-field .request-hint .hint
     Button     .btn + .btn-primary | .btn-secondary | .btn-ghost | .btn-danger
                .btn-sm .btn-icon .btn-block
                bare <button>                      = .btn .btn-primary
                .cta-button                        = .btn .btn-primary (link)
                .btn-secondary .link-button button[class*="-cancel"]
                                                   = .btn .btn-secondary
                .btn-danger button[class*="delete-button"] .decide-deny-button
                                                   = .btn .btn-danger
     Status     .badge + .is-success | .is-warning | .is-danger | .is-info | .is-neutral
                .badge-count (navy count bubble)
                .status-chip + same .is-* tones (pill with dot, for live state)
                .badge.status-allow/success/popular/allowed_perm = .is-success
                .badge.status-warn/pending                       = .is-warning
                .badge.status-deny/block/failed/denied           = .is-danger
                .badge.status-closed                             = .is-info
                .badge.status-error/cancelled/reference          = .is-neutral
                .icon + .icon-ok|bad|warn|pending|neutral|closed|info (CSS glyphs)
     Alert      .alert + .is-*  .alert-title       <- .flash .flash-error|warning|success|info
                                                   <- .tile.warning, .tile.info
     Empty      .empty-state .empty-state-title .empty-state-text
     Paging     .pagination (links, [aria-current=page], .is-disabled)
     Tabs       .tabs > a (.tab-active | [aria-current=page] | [aria-selected=true])
     Modal      dialog.modal | .modal  .modal-header .modal-title .modal-body .modal-footer
     Code       code, kbd, pre, .code-block, .secret  <- .job-log
     Key-value  dl.kv (dt/dd pairs)
     Progress   progress.progress, .progress > .progress-bar,
                svg.meter-bar > rect.meter-bar-track + rect.meter-bar-fill.is-*
                                                   <- .meter-track/.meter-fill, .bar-track/.bar-fill, .hbar-*
     Loading    .skeleton .skeleton-text .spinner  <- .spinner-dot
     Stat       .stat-card .stat-head .stat-label .stat-icon .stat-value .stat-unit
                .stat-detail .stat-link            <- .stat-tile .stat-tile-label/-value/-unit/-detail/-row/-note/-link
     Utility    .visually-hidden .text-muted .text-meta .text-danger .nowrap .mono
                .tabular .truncate .mt-0 .mb-0 .no-print .preserve-lines
     Page bits  .page-back (link above a title)  .card-section-title
                .confirm-panel(.is-danger|.is-info) inline "are you sure" row
                .busy-panel (spinner + text + optional .job-log)
                .filter-form.is-stacked > .filter-grid > .field + .filter-footer
                .search-row > .field + .btn     .field-narrow .field-medium .input-xs
                th/td.actions + .cell-actions   td.empty-cell  .cell-sub  .check-col
                .policy-card .policy-grid .policy-part(-title)
                .domain-block-head .decide-panel .decide-actions .claim-row
                .kpi-row.is-auto .kpi-value.is-*  .donut-* .trend-* .legend-dot.is-*
                .user-menu-form + button.user-menu-item (POST sign-out)
     Scripts    Page behaviour lives in static/js/<page>.js (loaded with defer);
                shared: console.js (data-confirm on forms, menus, copy, reload),
                inline-confirm.js, domain-age.js, job-poll.js. No inline
                script, style or on* handlers, for a strict CSP.

   Contrast: every text/background pair meets WCAG AA (4.5:1, or 3:1 for
   large text). Two derived roles exist for that reason: --accent-ink (teal
   text on light surfaces; brand-teal itself is 3.9:1 on white, so it is
   used for dots, rings and active marks) and --danger-ink (error text).
   ink-faint is decorative only (hairline icons, disabled marks), never text.
   ========================================================================== */

/* 1  Fonts ================================================================ */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Marcellus";
  src: url("fonts/marcellus-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 2  Tokens =============================================================== */

:root {
  color-scheme: light;

  /* Brand: these are the stylesheet's own colours; /brand/theme.css (Settings > Branding) overrides them and the
     tokens derived from them with the organisation's colours. */
  --brand-teal-strong: #12977e;
  --brand-teal: #0f9179;
  --brand-navy: #143a63;
  --brand-gradient: linear-gradient(165deg, #12977e 0%, #143a63 100%);
  --on-brand: #ffffff;

  /* Surfaces and ink */
  --surface: #ffffff;
  --surface-sunken: #f4f6f9;
  --surface-line: #e4e9ef;
  --surface-raised: #ffffff;
  --ink: #1b2733;
  --ink-muted: #56606b;
  --ink-faint: #5f6a76;
  --bubble-sent: #dcf0ea;
  --danger: #c94a4a;

  /* Derived roles */
  --heading: var(--brand-navy);
  --accent: var(--brand-teal);
  --accent-ink: #0b7562;
  --link: var(--accent-ink);
  --link-hover: var(--brand-navy);
  --link-underline: rgba(11, 117, 98, 0.4);
  --focus-ring: var(--brand-teal);
  --field-border: #858f9b;
  --field-bg: #ffffff;
  --danger-ink: #a63a3a;
  --danger-hover: #b23f3f;
  --overlay: rgba(11, 27, 43, 0.48);

  /* Semantic tones: -bg (chip fill), -ink (text on bg and on surface),
     -line (border/dot). */
  --success-bg: #e2f4ee;
  --success-ink: #0a6b58;
  --success-line: #0f9179;
  --warning-bg: #fbf1dc;
  --warning-ink: #8a5a0a;
  --warning-line: #c99a3e;
  --danger-bg: #fbecec;
  --danger-line: #c94a4a;
  --info-bg: #e6eef7;
  --info-ink: #1d4f86;
  --info-line: #4f7fb5;
  --neutral-bg: #eef1f4;
  --neutral-ink: #4f5965;
  --neutral-line: #9aa4b0;

  /* Type */
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-page-title: 20px;   --lh-page-title: 28px;
  --fs-wordmark: 21px;     --lh-wordmark: 26px;
  --fs-title: 14px;        --lh-title: 20px;
  --fs-body: 13px;         --lh-body: 18px;
  --fs-meta: 12px;         --lh-meta: 16px;
  --fs-label: 11px;        --lh-label: 14px;
  --fs-button: 13px;       --lh-button: 16px;
  /* Compact density: one control and row height for the whole console. */
  --control-h: 30px;
  --control-h-sm: 26px;
  --cell-py: 6px;
  --cell-px: 10px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 20px;

  /* Radius */
  --radius-badge: 6px;
  --radius-field: 6px;
  --radius-bar: 6px;
  --radius-card: 10px;
  --radius-card-dense: 8px;
  --radius-full: 999px;

  /* Shadows (one per element, never stacked): hairline-and-soft, so cards
     read as layers without heavy drop shadows. */
  --shadow-card: 0 1px 2px rgba(16, 32, 52, 0.05), 0 12px 32px -16px rgba(16, 32, 52, 0.16);
  --shadow-card-subtle: 0 1px 2px rgba(16, 32, 52, 0.05);
  --shadow-field: 0 0 0 4px rgba(15, 145, 121, 0.16);
  --shadow-float: 0 1px 2px rgba(16, 32, 52, 0.08);
  --shadow-popover: 0 4px 6px -2px rgba(16, 32, 52, 0.05), 0 16px 32px -8px rgba(16, 32, 52, 0.2);

  /* Top bar and fixed footer: translucent surface over the page. */
  --bar-bg: rgba(255, 255, 255, 0.88);
  --bar-ink: var(--ink);
  --bar-ink-muted: #46525f;
  --bar-hover: #eef2f6;
  --bar-active-bg: #dcf0ea;
  --bar-active-ink: #0a6352;
  --footer-h: 32px;
  --footer-bg: rgba(255, 255, 255, 0.96);

  /* Primary buttons: solid, AA contrast with white text. */
  --btn-primary-bg: #0b7562;
  --btn-primary-hover: #095e4f;
  --btn-primary-ink: #ffffff;

  /* Layout */
  --page-max: 1600px;
  --topbar-h: 48px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

}

/* Dark theme: navy-based surfaces, teal accent. Applied when the toggle
   (or the OS, before a choice is saved) selects it. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bar-bg: rgba(16, 34, 52, 0.88);
  --footer-bg: rgba(16, 34, 52, 0.96);
  --bar-ink: #e6edf4;
  --bar-ink-muted: #b4c1cf;
  --bar-hover: #1d3a56;
  --bar-active-bg: #17423f;
  --bar-active-ink: #7fe0c4;
  --btn-primary-bg: #36b89b;
  --btn-primary-hover: #4fcfb2;
  --btn-primary-ink: #052019;
  --surface: #13283d;
  --surface-sunken: #0d1d2e;
  --surface-line: #22394f;
  --surface-raised: #1a3550;
  --ink: #e6edf4;
  --ink-muted: #a7b4c2;
  --ink-faint: #93a4b6;
  --bubble-sent: #17423f;
  --heading: #bcd4ee;
  --accent: #36b89b;
  --accent-ink: #4fcfb2;
  --link-hover: #bcd4ee;
  --link-underline: rgba(79, 207, 178, 0.45);
  --focus-ring: #4fcfb2;
  --field-border: #6a7f96;
  --field-bg: #0f2236;
  --danger-ink: #ef8f8f;
  --danger-hover: #d65a5a;
  --overlay: rgba(3, 10, 18, 0.66);
  --success-bg: #123a35;
  --success-ink: #6fd6b8;
  --success-line: #36b89b;
  --warning-bg: #392f1a;
  --warning-ink: #e9bf6b;
  --warning-line: #c99a3e;
  --danger-bg: #3b2128;
  --danger-line: #d65a5a;
  --info-bg: #163252;
  --info-ink: #93bfee;
  --info-line: #6c9fd6;
  --neutral-bg: #22384e;
  --neutral-ink: #b4c0cc;
  --neutral-line: #73859a;
  --surface-line: #24405a;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.5);
  --shadow-card-subtle: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-field: 0 0 0 4px rgba(79, 207, 178, 0.2);
  --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-popover: 0 16px 32px -8px rgba(0, 0, 0, 0.55);
}
/* Same palette when JavaScript is off and the OS prefers dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bar-bg: rgba(16, 34, 52, 0.88);
    --footer-bg: rgba(16, 34, 52, 0.96);
    --bar-ink: #e6edf4;
    --bar-ink-muted: #b4c1cf;
    --bar-hover: #1d3a56;
    --bar-active-bg: #17423f;
    --bar-active-ink: #7fe0c4;
    --btn-primary-bg: #36b89b;
    --btn-primary-hover: #4fcfb2;
    --btn-primary-ink: #052019;
    --surface: #13283d;
    --surface-sunken: #0d1d2e;
    --surface-line: #22394f;
    --surface-raised: #1a3550;
    --ink: #e6edf4;
    --ink-muted: #a7b4c2;
    --ink-faint: #93a4b6;
    --bubble-sent: #17423f;
    --heading: #bcd4ee;
    --accent: #36b89b;
    --accent-ink: #4fcfb2;
    --link-hover: #bcd4ee;
    --link-underline: rgba(79, 207, 178, 0.45);
    --focus-ring: #4fcfb2;
    --field-border: #6a7f96;
    --field-bg: #0f2236;
    --danger-ink: #ef8f8f;
    --danger-hover: #d65a5a;
    --overlay: rgba(3, 10, 18, 0.66);
    --success-bg: #123a35;
    --success-ink: #6fd6b8;
    --success-line: #36b89b;
    --warning-bg: #392f1a;
    --warning-ink: #e9bf6b;
    --danger-bg: #3b2128;
    --danger-line: #d65a5a;
    --info-bg: #163252;
    --info-ink: #93bfee;
    --info-line: #6c9fd6;
    --neutral-bg: #22384e;
    --neutral-ink: #b4c0cc;
    --neutral-line: #73859a;
  }
}

/* 3  Base and typography ================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + var(--space-4));
  /* Keeps a focused control from scrolling in under the fixed footer. */
  scroll-padding-bottom: calc(var(--footer-h) + var(--space-3));
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: var(--footer-h);
  display: flex;
  flex-direction: column;
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; color: var(--heading); font-weight: 700; }
h1 {
  font-size: var(--fs-page-title);
  line-height: var(--lh-page-title);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-5);
}
h2 { font-size: var(--fs-title); line-height: var(--lh-title); margin: 0 0 var(--space-3); }
h3 { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); margin: var(--space-4) 0 var(--space-2); }
h4 {
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-muted);
  margin: var(--space-4) 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
small { font-size: var(--fs-meta); line-height: var(--lh-meta); }
strong, b { font-weight: 700; }
ul, ol { margin: 0 0 var(--space-3); padding-left: 1.4em; }
li + li { margin-top: 2px; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--surface-line); margin: var(--space-5) 0; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: var(--link-underline);
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

::selection { background: var(--bubble-sent); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-field);
  box-shadow: var(--shadow-popover);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 4  Icons ================================================================
   .i      sprite icon (base.html symbols), 20px line icon in currentColor.
   .icon   small CSS-drawn status glyph inside a circle (no images, so it
           works under a strict CSP); colour follows its tone or its badge. */

.i {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  vertical-align: -5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.i-sm { width: 18px; height: 18px; vertical-align: -4px; }
h1 .i, h1 .stat-icon { width: 21px; height: 21px; margin-right: var(--space-2); vertical-align: -3px; }

.icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.4em;
  vertical-align: -0.18em;
  border: 1.6px solid currentColor;
  border-radius: 50%;
  color: var(--neutral-ink);
}
.icon::before, .icon::after { content: ""; position: absolute; box-sizing: border-box; }
.icon-ok { color: var(--success-ink); }
.icon-ok::after {
  left: 50%; top: 44%;
  width: 0.24em; height: 0.46em;
  border: solid currentColor;
  border-width: 0 1.6px 1.6px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}
.icon-bad { color: var(--danger-ink); }
.icon-bad::before, .icon-bad::after {
  left: 50%; top: 50%;
  width: 0.5em; height: 1.6px;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.icon-bad::after { transform: translate(-50%, -50%) rotate(-45deg); }
.icon-warn { color: var(--warning-ink); }
.icon-warn::before {
  left: 50%; top: 18%;
  width: 1.6px; height: 0.36em;
  background: currentColor;
  border-radius: 1px;
  transform: translateX(-50%);
}
.icon-warn::after {
  left: 50%; bottom: 16%;
  width: 1.9px; height: 1.9px;
  background: currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
}
.icon-info { color: var(--info-ink); }
.icon-info::before {
  left: 50%; bottom: 18%;
  width: 1.6px; height: 0.34em;
  background: currentColor;
  border-radius: 1px;
  transform: translateX(-50%);
}
.icon-info::after {
  left: 50%; top: 16%;
  width: 1.9px; height: 1.9px;
  background: currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
}
.icon-pending { color: var(--neutral-ink); }
.icon-pending::before {
  left: 50%; top: 18%;
  width: 1.6px; height: 0.34em;
  background: currentColor;
  border-radius: 1px;
  transform: translateX(-50%);
}
.icon-pending::after {
  left: calc(50% - 0.8px); top: calc(50% - 0.8px);
  width: 0.26em; height: 1.6px;
  background: currentColor;
  border-radius: 1px;
}
.icon-neutral { color: var(--neutral-ink); }
.icon-neutral::after, .icon-closed::after {
  left: 50%; top: 50%;
  width: 0.46em; height: 1.6px;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}
.icon-closed { color: var(--info-ink); }

/* 5  App shell: top bar and navigation ==================================== */

.topnav {
  position: relative;
  background: var(--bar-bg);
  color: var(--bar-ink);
  border-bottom: 1px solid var(--surface-line);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
/* The brand gradient, kept as a 3px band along the top edge. */
.topnav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-teal-strong), var(--brand-navy));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-right: var(--space-4);
  color: var(--heading);
  text-decoration: none;
  border-radius: var(--radius-bar);
}
.brand:hover { color: var(--heading); }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  flex: 0 0 auto;
}
.brand-wordmark {
  font-family: var(--font-display);
  font-size: var(--fs-wordmark);
  line-height: var(--lh-wordmark);
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* Top-level items: plain links and dropdown triggers share one look. */
.topnav .nav-link,
.topnav .nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 var(--space-3);
  margin: 0;
  border: 0;
  border-radius: var(--radius-bar);
  background: transparent;
  box-shadow: none;
  color: var(--bar-ink-muted);
  font: 600 var(--fs-body)/var(--lh-body) var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
  max-width: none;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.topnav .nav-link:hover,
.topnav .nav-dropdown-trigger:hover,
.topnav .nav-dropdown-trigger[aria-expanded="true"] {
  background: var(--bar-hover);
  color: var(--bar-ink);
  transform: none;
}
.topnav .nav-link.active,
.topnav .nav-dropdown-trigger.active {
  background: var(--bar-active-bg);
  color: var(--bar-active-ink);
  font-weight: 700;
}
.topnav :focus-visible { outline-color: var(--focus-ring); }

.nav-dropdown { position: relative; }

/* Desktop: submenus float and open on hover or .is-open. The admin/support
   nav (.nav-full, nine items) needs 1280px; the end-user nav fits at 900px. */
@media (min-width: 900px) {
  .topnav:not(.nav-full) .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 60;
    padding-top: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease), visibility 0s linear 0.15s;
  }
  .topnav:not(.nav-full) .nav-dropdown:hover .nav-dropdown-menu,
  .topnav:not(.nav-full) .nav-dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
  }
  .topnav:not(.nav-full) .nav-toggle { display: none; }
}
@media (min-width: 1280px) {
  .topnav.nav-full .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 60;
    padding-top: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease), visibility 0s linear 0.15s;
  }
  .topnav.nav-full .nav-dropdown:hover .nav-dropdown-menu,
  .topnav.nav-full .nav-dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
  }
  .topnav.nav-full .nav-toggle { display: none; }
}

/* User menu */
.user-menu { position: relative; }
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 34px;
  padding: 0 10px 0 4px;
  margin: 0;
  border: 0;
  border-radius: var(--radius-bar);
  background: transparent;
  box-shadow: none;
  color: var(--bar-ink);
  font: 600 var(--fs-body)/var(--lh-body) var(--font-sans);
  cursor: pointer;
}
.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] { background: var(--bar-hover); color: var(--bar-ink); transform: none; }
.user-menu-caret { flex: 0 0 auto; width: 14px; height: 14px; opacity: 0.75; transition: transform 0.15s var(--ease); }
.user-menu-trigger[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  color: var(--on-brand);
  font-weight: 700;
  font-size: var(--fs-body);
  flex: 0 0 auto;
}
.whoami { display: inline-flex; align-items: center; gap: var(--space-2); max-width: 18rem; }
.whoami-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--space-2);
  border-radius: var(--radius-bar);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: capitalize;
  white-space: nowrap;
  background: var(--neutral-bg);
  color: var(--neutral-ink);
}
.topnav .role-pill { background: var(--bar-active-bg); color: var(--bar-active-ink); }
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 60;
  min-width: 15rem;
  padding: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-card-dense);
  box-shadow: var(--shadow-popover);
  color: var(--ink);
}
.user-menu-header {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3) var(--space-3);
  margin-bottom: 4px;
  border-bottom: 1px solid var(--surface-line);
}
.user-menu-name { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-role { font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; color: var(--ink-muted); }
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px var(--space-3);
  border-radius: var(--radius-field);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.user-menu-item .i { color: var(--ink-muted); width: 18px; height: 18px; }
.user-menu-item:hover { background: var(--bubble-sent); color: var(--ink); }
.user-menu-item.active { background: var(--bubble-sent); color: var(--heading); }

/* Icon buttons on the bar */
.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  box-shadow: none;
  color: var(--bar-ink-muted);
  cursor: pointer;
}
.theme-toggle:hover,
.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] { background: var(--bar-hover); color: var(--bar-ink); transform: none; }
.theme-toggle .i { opacity: 0.9; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: inline-block; }

/* The long admin/support nav shows the avatar only (the name is in the
   user menu) and drops the product name below 1600px. */
.topnav.nav-full .whoami { display: none; }
.topnav.nav-full .user-menu-trigger { padding-right: 6px; }
@media (max-width: 1599.98px) {
  .topnav.nav-full .nav-link,
  .topnav.nav-full .nav-dropdown-trigger { padding: 0 10px; }
}
@media (max-width: 1099.98px) {
  .whoami { max-width: 10rem; }
}
@media (max-width: 640px) {
  .brand-text, .whoami { display: none; }
  .user-menu-trigger { padding-right: 6px; }
}

/* Narrow windows: the nav collapses behind a menu button (#nav-toggle). */
@media (max-width: 899.98px) {
  .topnav .brand { margin-right: 0; }
  .topnav .nav-link,
  .topnav .nav-dropdown-trigger {
    width: 100%;
    height: 44px;
    justify-content: space-between;
    color: var(--ink);
    border-radius: var(--radius-field);
  }
  .topnav .nav-link:hover,
  .topnav .nav-dropdown-trigger:hover,
  .topnav .nav-dropdown-trigger[aria-expanded="true"] { background: var(--surface-sunken); color: var(--ink); }
  .topnav .nav-link.active,
  .topnav .nav-dropdown-trigger.active {
    background: var(--bubble-sent);
    color: var(--heading);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .topnav .nav-dropdown-menu { display: none; padding: 2px 0 var(--space-2) var(--space-3); }
  .topnav .nav-dropdown-menu.is-open { display: block; }
}
@media (max-width: 1279.98px) {
  .topnav.nav-full .brand { margin-right: 0; }
  .topnav.nav-full .nav-link,
  .topnav.nav-full .nav-dropdown-trigger {
    width: 100%;
    height: 44px;
    justify-content: space-between;
    color: var(--ink);
    border-radius: var(--radius-field);
  }
  .topnav.nav-full .nav-link:hover,
  .topnav.nav-full .nav-dropdown-trigger:hover,
  .topnav.nav-full .nav-dropdown-trigger[aria-expanded="true"] { background: var(--surface-sunken); color: var(--ink); }
  .topnav.nav-full .nav-link.active,
  .topnav.nav-full .nav-dropdown-trigger.active {
    background: var(--bubble-sent);
    color: var(--heading);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .topnav.nav-full .nav-dropdown-menu { display: none; padding: 2px 0 var(--space-2) var(--space-3); }
  .topnav.nav-full .nav-dropdown-menu.is-open { display: block; }
}

/* 6  Page layout and footer =============================================== */

main.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-6);
}
main.page:focus { outline: none; }
@media (max-width: 640px) {
  main.page { padding: var(--space-5) var(--space-4); }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
}
.page-header > :first-child { min-width: 0; }
.page-title {
  font-size: var(--fs-page-title);
  line-height: var(--lh-page-title);
  font-weight: 700;
  color: var(--heading);
  margin: 0;
}
.page-subtitle {
  margin: var(--space-1) 0 0;
  color: var(--ink-muted);
  max-width: 70ch;
}
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.section-title {
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  color: var(--heading);
  margin: var(--space-6) 0 var(--space-3);
}
.eyebrow {
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-muted);
  margin: 0 0 var(--space-1);
}

/* Fixed to the bottom of the window; body keeps --footer-h free for it. */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  border-top: 1px solid var(--surface-line);
  background: var(--footer-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
.site-footer p {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 500;
  color: var(--ink-muted);
}
.site-footer-sep { margin: 0 var(--space-2); }
@media (max-width: 640px) {
  .site-footer-sep, .site-footer-credit { display: none; }
}

/* 7  Cards ================================================================
   .card            dense data card (radius 20, subtle shadow)
   .card-prominent  feature/standalone card (radius 28, card shadow)       */

.card,
.tile {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-card-dense);
  box-shadow: var(--shadow-card-subtle);
  padding: var(--space-5);
  margin: 0 0 var(--space-4);
  min-width: 0;
}
/* Legacy tiles scroll their own overflow (bare wide tables inside). */
.tile { overflow-x: auto; }
.card > :last-child, .tile > :last-child { margin-bottom: 0; }
.card-prominent {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
}
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-header { padding: var(--space-5) var(--space-5) 0; }
.card-flush > .card-footer { padding: var(--space-3) var(--space-5); }
.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}
.card-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: 700;
  color: var(--heading);
}
.card-title .i { color: var(--accent-ink); }
.card-subtitle {
  margin: var(--space-1) 0 0;
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 500;
  color: var(--ink-muted);
}
.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--surface-line);
}
.card > form + .card-section,
.card-section + .card-section {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--surface-line);
}

.tile.warning, .tile.info {
  box-shadow: none;
  border-color: transparent;
  border-left: 4px solid var(--warning-line);
  background: var(--warning-bg);
  color: var(--ink);
}
.tile.info { border-left-color: var(--info-line); background: var(--info-bg); }
.warning { color: var(--warning-ink); }
.tile.warning { color: var(--ink); }

/* 8  Layout utilities and grids =========================================== */

.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.stack > *, .stack-sm > *, .stack-lg > * { margin-top: 0; margin-bottom: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }

.grid-2, .grid-3, .grid-4, .grid-auto,
.dashboard-grid, .dashboard-grid-wide, .analytics-grid, .user-dash-stats {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-auto > *,
.dashboard-grid > *, .dashboard-grid-wide > *, .analytics-grid > *, .user-dash-stats > * { margin-bottom: 0; min-width: 0; }
.grid-2, .dashboard-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4, .user-dash-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.analytics-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
@media (max-width: 900px) {
  .grid-4, .user-dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid-2, .grid-3, .dashboard-grid, .dashboard-grid-wide, .analytics-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .grid-4, .user-dash-stats { grid-template-columns: minmax(0, 1fr); }
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
}
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* 9  Tables ===============================================================
   Wrap wide tables in .table-wrap (horizontal scroll). Add .is-scroll to
   cap its height and get a sticky header. Mark number columns with .num. */

.table-wrap {
  position: relative; /* contains .visually-hidden header labels */
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-field);
}
.table-wrap.is-scroll { max-height: 70vh; overflow-y: auto; }
.table-wrap + .table-wrap, .table-wrap + p, .two-col + p { margin-top: var(--space-3); }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
table th,
table td {
  padding: var(--cell-py) var(--cell-px);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--surface-line);
}
table th {
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-muted);
  white-space: nowrap;
}
/* Header cells: <thead> or a first row made only of <th>. Rows that mix a
   <th> label with <td> values are row headers and stay plain. */
table thead th,
table tr:first-child:not(:has(td)) > th {
  background: var(--surface-sunken);
}
table thead tr:first-child th:first-child, table tr:first-child:not(:has(td)) > th:first-child { border-top-left-radius: var(--radius-field); }
table thead tr:first-child th:last-child, table tr:first-child:not(:has(td)) > th:last-child { border-top-right-radius: var(--radius-field); }
table tr:has(td) > th { color: var(--ink-muted); white-space: normal; width: 1%; min-width: 9rem; }
table tr:last-child > td { border-bottom: 0; }
table tbody tr:hover > td,
table tr:hover > td { background: var(--surface-sunken); }
table tr.is-selected > td { background: var(--bubble-sent); }
table tr:hover, table tr.is-selected { --ink-muted: #56606b; }
:root[data-theme="dark"] table tr:hover,
:root[data-theme="dark"] table tr.is-selected { --ink-muted: #b6c2ce; }
table td button { min-height: 32px; padding: 6px 12px; font-size: 13px; border-radius: var(--radius-field); }
.table-wrap.is-scroll thead th,
.table-wrap.is-scroll tr:first-child:not(:has(td)) > th,
table.table-sticky thead th { position: sticky; top: 0; z-index: 1; }
th.num, td.num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-compact { width: auto; min-width: 20rem; max-width: 34rem; }
.table-compact th, .table-compact td { padding: 6px 10px; }
.domains-cell { max-width: 420px; white-space: normal; word-break: break-word; }
.job-history-table th, .job-history-table td { white-space: nowrap; }
.job-history-table td.job-message { white-space: normal; min-width: 16rem; }
.request-domains-table { width: auto; min-width: 40%; }
.nowrap-cell { white-space: nowrap; }
@media (max-width: 720px) {
  /* Bare legacy tables scroll on small screens. */
  main.page > table, .tile > table, .card > table { display: block; overflow-x: auto; }
}

/* 10  Forms =============================================================== */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); min-width: 0; }
.field > .help-text, .field > .field-error { margin: 0; }
.label,
.field > label,
.form-grid label {
  display: block;
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink);
}
.label-optional { font-weight: 500; color: var(--ink-muted); }
.help-text, .hint, .request-hint {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 500;
  color: var(--ink-muted);
  margin: var(--space-1) 0 var(--space-3);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}
.form-grid label.checkbox, .form-grid .checkbox { display: inline-flex; font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 500; letter-spacing: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-5); }

input[type="text"], input[type="password"], input[type="number"], input[type="email"],
input[type="url"], input[type="search"], input[type="tel"], input[type="date"],
input[type="datetime-local"], input[type="time"], input:not([type]),
select, textarea, .input, .select, .textarea {
  font: 400 var(--fs-body)/var(--lh-body) var(--font-sans);
  color: var(--ink);
  background-color: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-field);
  min-height: var(--control-h);
  padding: 5px var(--cell-px);
  max-width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
select, .select { padding-right: var(--space-2); cursor: pointer; }
select[multiple] { padding: 6px; min-height: 6rem; }
textarea, .textarea { min-height: 64px; resize: vertical; display: block; }
.input-block, .field input, .field select, .field textarea { width: 100%; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-muted); }
input:focus, select:focus, textarea:focus { outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus,
input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus,
input[type="date"]:focus, input:not([type]):focus, select:focus, textarea:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--accent);
  box-shadow: var(--shadow-field);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--surface-sunken);
  color: var(--ink-muted);
  border-color: var(--surface-line);
  cursor: not-allowed;
}
.is-invalid, input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger) !important;
}
.is-invalid:focus, [aria-invalid="true"]:focus { outline-color: var(--danger); }
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0 6px 0 0;
  vertical-align: -3px;
  accent-color: var(--accent);
  cursor: pointer;
}
.checkbox, .filter-form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
}
.checkbox input, .filter-form-checkbox input { margin: 0; }
input[type="file"] { font: inherit; color: var(--ink-muted); max-width: 100%; }
input[type="file"]::file-selector-button {
  font: 700 13px/18px var(--font-sans);
  margin-right: var(--space-3);
  padding: 6px 14px;
  border-radius: var(--radius-field);
  border: 1.5px solid var(--heading);
  background: transparent;
  color: var(--heading);
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--bubble-sent); }
fieldset { border: 1px solid var(--surface-line); border-radius: var(--radius-field); padding: var(--space-4); margin: 0 0 var(--space-4); }
legend { padding: 0 var(--space-1); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.3px; }

.inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-1) 0; }
.inline-form input[type="text"] { width: 12rem; }
.inline-form + .inline-form { margin-left: var(--space-2); }

details > summary { cursor: pointer; }
@media (max-width: 640px) {
  /* 16px stops iOS zooming into focused fields. */
  input[type="text"], input[type="password"], input[type="number"], input[type="email"],
  input[type="url"], input[type="search"], input[type="date"], input:not([type]), select, textarea { font-size: 16px; }
}
details > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 6px; }

/* 11  Buttons =============================================================
   .btn base + one variant. A bare <button> renders as primary so untouched
   templates keep working. */

.btn,
button,
input[type="submit"],
input[type="button"],
.cta-button,
.link-button {
  --btn-bg: var(--btn-primary-bg);
  --btn-ink: var(--btn-primary-ink);
  --btn-border: transparent;
  --btn-shadow: var(--shadow-float);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  max-width: 100%;
  min-height: var(--control-h);
  padding: 5px 12px;
  margin: 0;
  border: 1.5px solid var(--btn-border);
  border-radius: var(--radius-bar);
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: var(--btn-shadow);
  font: 700 var(--fs-button)/var(--lh-button) var(--font-sans);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.cta-button:hover, .link-button:hover {
  color: var(--btn-ink);
  text-decoration: none;
}
/* Primary hover: only buttons that are primary (custom buttons set their
   own --btn-bg and keep it). */
.btn-primary:hover,
.btn:not([class*="btn-"]):hover,
button:not([class]):hover,
input[type="submit"]:not([class]):hover,
.cta-button:hover { --btn-bg: var(--btn-primary-hover); }
.btn:active, button:active, .cta-button:active, .link-button:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled, button:disabled, input[type="submit"]:disabled, .btn.is-disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn .i, button .i, .cta-button .i { width: 18px; height: 18px; vertical-align: 0; }

/* Primary - solid brand teal */
.btn-primary,
.decide-approve-button,
.decide-approve-confirm-button { --btn-bg: var(--btn-primary-bg); --btn-ink: var(--btn-primary-ink); --btn-border: transparent; --btn-shadow: var(--shadow-float); }
.btn-primary:hover,
.decide-approve-button:hover,
.decide-approve-confirm-button:hover { --btn-bg: var(--btn-primary-hover); }

/* Secondary - outlined on the surface */
.btn-secondary,
button.btn-secondary,
.link-button,
button[class*="-cancel"],
a[class*="-cancel"],
input[type="button"] {
  --btn-bg: var(--surface);
  --btn-ink: var(--heading);
  --btn-border: var(--field-border);
  --btn-shadow: var(--shadow-float);
}
.btn-secondary:hover, button.btn-secondary:hover, .link-button:hover,
button[class*="-cancel"]:hover, a[class*="-cancel"]:hover, input[type="button"]:hover { --btn-bg: var(--bubble-sent); }

/* Ghost - text only */
.btn-ghost { --btn-bg: transparent; --btn-ink: var(--accent-ink); --btn-border: transparent; --btn-shadow: none; }
.btn-ghost:hover { --btn-bg: var(--bubble-sent); }

/* Danger - destructive actions only */
.btn-danger,
button.btn-danger,
button[class*="delete-button"],
button[class*="delete-confirm-button"],
.decide-deny-button {
  --btn-bg: var(--danger);
  --btn-ink: #ffffff;
  --btn-border: transparent;
  --btn-shadow: none;
}
.btn-danger:hover, button.btn-danger:hover, button[class*="delete-button"]:hover,
button[class*="delete-confirm-button"]:hover, .decide-deny-button:hover { --btn-bg: var(--danger-hover); }

/* Sizes and shapes */
.btn-sm, .chip-add-button, .domain-age-cell button {
  min-height: var(--control-h-sm);
  padding: 3px 10px;
  font-size: 12px;
  border-radius: var(--radius-field);
}
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

/* Buttons that should look like text or controls, not buttons */
.btn-reset,
.log-group-toggle,
.ticket-expand-btn,
button.refresh-indicator,
.chip-remove,
.lookup-suggest-item,
.domains-toggle,
.dp-msdrop-toggle {
  --btn-bg: transparent;
  --btn-ink: inherit;
  --btn-border: transparent;
  --btn-shadow: none;
  min-height: 0;
  padding: 0;
  border-radius: 6px;
  font-weight: inherit;
  font-size: inherit;
  transform: none !important;
}
.log-group-toggle, .domains-toggle {
  --btn-ink: var(--link);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: normal;
}
.refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
}
button.refresh-indicator {
  --btn-ink: var(--heading);
  --btn-border: var(--heading);
  min-height: var(--control-h);
  padding: 4px 12px 4px 10px;
  border-radius: var(--radius-bar);
  font-size: 13px;
  font-weight: 700;
}
button.refresh-indicator:hover { --btn-bg: var(--bubble-sent); }
.refresh-indicator .i { width: 18px; height: 18px; }
.refresh-indicator.spinning .i { animation: sw-spin 0.7s linear infinite; }
@keyframes sw-spin { to { transform: rotate(360deg); } }

/* 12  Badges, status chips, role pill, chips ============================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 2px var(--space-2);
  border-radius: var(--radius-badge);
  background: var(--neutral-bg);
  color: var(--neutral-ink);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}
.badge .icon { margin-right: 0; width: 12px; height: 12px; color: inherit; font-size: 12px; }
.badge.is-success, .badge.status-allow, .badge.status-success, .badge.status-popular, .badge.status-allowed_perm {
  background: var(--success-bg); color: var(--success-ink);
}
.badge.is-warning, .badge.status-warn, .badge.status-pending {
  background: var(--warning-bg); color: var(--warning-ink);
}
.badge.is-danger, .badge.status-deny, .badge.status-block, .badge.status-failed, .badge.status-denied {
  background: var(--danger-bg); color: var(--danger-ink);
}
.badge.is-info, .badge.status-closed { background: var(--info-bg); color: var(--info-ink); }
.badge.is-neutral, .badge.status-error, .badge.status-cancelled, .badge.status-reference {
  background: var(--neutral-bg); color: var(--neutral-ink);
}
.badge-count {
  min-width: 22px;
  justify-content: center;
  padding: 2px 7px;
  background: var(--brand-navy);
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
:root[data-theme="dark"] .badge-count { background: var(--heading); color: var(--surface-sunken); }

/* Status chip: pill with a leading dot for live states (service up/down). */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 3px var(--space-3) 3px 10px;
  border-radius: var(--radius-bar);
  background: var(--neutral-bg);
  color: var(--neutral-ink);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 600;
  white-space: nowrap;
}
.status-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral-line);
  flex: 0 0 auto;
}
.status-chip.is-success { background: var(--success-bg); color: var(--success-ink); }
.status-chip.is-success::before { background: var(--success-line); }
.status-chip.is-warning { background: var(--warning-bg); color: var(--warning-ink); }
.status-chip.is-warning::before { background: var(--warning-line); }
.status-chip.is-danger { background: var(--danger-bg); color: var(--danger-ink); }
.status-chip.is-danger::before { background: var(--danger-line); }
.status-chip.is-info { background: var(--info-bg); color: var(--info-ink); }
.status-chip.is-info::before { background: var(--info-line); }

/* Plain-text statuses (legacy) */
.status { display: inline-flex; align-items: center; font-weight: 600; }
.status-allowed_perm { color: var(--success-ink); font-weight: 600; }
.status-pending { color: var(--warning-ink); font-weight: 600; }
.status-denied { color: var(--danger-ink); font-weight: 600; }

/* Dots (legends, inline status) */
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: var(--space-2);
  background: var(--neutral-line);
  flex: 0 0 auto;
}
.dot-green, .dot.is-success { background: var(--success-line); }
.dot-red, .dot.is-danger { background: var(--danger-line); }
.dot.is-warning { background: var(--warning-line); }
.dot.is-info { background: var(--info-line); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: var(--space-2); vertical-align: -1px; }

/* Removable chips (policy pages) */
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 var(--space-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 12px;
  border-radius: var(--radius-bar);
  background: var(--surface-sunken);
  border: 1px solid var(--surface-line);
  color: var(--ink);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 600;
  white-space: nowrap;
}
.chip-empty { color: var(--ink-muted); font-style: italic; font-size: var(--fs-meta); }

/* 13  Alerts and flash messages =========================================== */

.flashes { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.alert,
.flash {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-field);
  border: 1px solid transparent;
  border-left-width: 4px;
  background: var(--info-bg);
  border-color: var(--info-bg);
  border-left-color: var(--info-line);
  color: var(--ink);
}
.flashes .flash { margin: 0; }
.alert > .icon, .flash > .icon { margin: 2px 0 0; }
.alert-body { min-width: 0; }
.alert-body > :last-child { margin-bottom: 0; }
.alert-title { display: block; font-weight: 700; margin-bottom: 2px; }
.alert.is-success, .flash-success { background: var(--success-bg); border-color: var(--success-bg); border-left-color: var(--success-line); }
.alert.is-warning, .flash-warning { background: var(--warning-bg); border-color: var(--warning-bg); border-left-color: var(--warning-line); }
.alert.is-danger, .flash-error, .flash-danger { background: var(--danger-bg); border-color: var(--danger-bg); border-left-color: var(--danger-line); }
.alert.is-neutral { background: var(--surface-sunken); border-color: var(--surface-line); border-left-color: var(--neutral-line); }
.flash a, .alert a { color: inherit; text-decoration-color: currentColor; font-weight: 600; }
/* Legacy <p class="flash flash-error"> with no icon: keep text readable. */
p.flash { display: block; }

/* 14  Empty state, pagination, tabs, modal ================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  color: var(--ink-muted);
}
.empty-state .i {
  width: 21px;
  height: 21px;
  padding: 10px;
  box-sizing: content-box;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--ink-muted);
}
.empty-state-title { margin: var(--space-1) 0 0; font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 700; color: var(--ink); }
.empty-state-text { margin: 0; max-width: 46ch; }
.empty-state.is-compact { padding: var(--space-4) var(--space-3); flex-direction: row; justify-content: center; text-align: left; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
}
.pagination li { margin: 0; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--control-h);
  height: var(--control-h);
  padding: 0 var(--space-3);
  border-radius: var(--radius-field);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { background: var(--bubble-sent); color: var(--ink); }
.pagination [aria-current="page"] { background: var(--brand-navy); color: #ffffff; }
:root[data-theme="dark"] .pagination [aria-current="page"] { background: var(--heading); color: var(--surface-sunken); }
.pagination .is-disabled { color: var(--ink-muted); opacity: 0.6; pointer-events: none; }
.pagination-meta { margin: 0 var(--space-2); color: var(--ink-muted); font-size: var(--fs-meta); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: 4px;
  margin: 0 0 var(--space-5);
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-bar);
  width: fit-content;
  max-width: 100%;
}
.tabs a, .tabs button {
  --btn-bg: transparent;
  --btn-ink: var(--ink-muted);
  --btn-border: transparent;
  --btn-shadow: none;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px var(--space-4);
  border-radius: var(--radius-bar);
  color: var(--ink-muted);
  font-weight: 600;
  font-size: var(--fs-body);
  text-decoration: none;
  transform: none !important;
}
.tabs a:hover, .tabs button:hover { color: var(--ink); background: var(--surface-sunken); }
.tabs a.tab-active, .tabs a[aria-current="page"], .tabs [aria-selected="true"] {
  background: var(--brand-navy);
  color: #ffffff;
}
:root[data-theme="dark"] .tabs a.tab-active,
:root[data-theme="dark"] .tabs a[aria-current="page"],
:root[data-theme="dark"] .tabs [aria-selected="true"] { background: var(--heading); color: var(--surface-sunken); }

.modal,
dialog.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  overflow: auto;
}
dialog.modal::backdrop { background: var(--overlay); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) var(--space-6) 0; }
.modal-title { margin: 0; font-size: 18px; line-height: 24px; color: var(--heading); }
.modal-body { padding: var(--space-4) var(--space-6); }
.modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); padding: 0 var(--space-6) var(--space-6); }

/* 15  Code, key-value lists =============================================== */

/* Free text people typed (a request's reason) keeps its line breaks. */
.preserve-lines { white-space: pre-line; overflow-wrap: anywhere; }

code, kbd, samp, .mono { font-family: var(--font-mono); font-size: 0.92em; }
/* In tables, .mono marks addresses and ids: the UI face with tabular
   figures reads better than a system monospace fallback. */
td.mono, th.mono, td .mono, dd.mono, dd .mono { font-family: var(--font-sans); font-size: inherit; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-sunken);
  border: 1px solid var(--surface-line);
  color: var(--ink);
  word-break: break-word;
}
kbd {
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--field-border);
  border-bottom-width: 2px;
  background: var(--surface);
}
pre, .code-block, .job-log {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-field);
  background: #0f2236;
  color: #dce6ef;
  border: 1px solid #22394f;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 19px;
  overflow-x: auto;
  white-space: pre;
}
pre code, .code-block code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.job-log { max-height: 240px; overflow-y: auto; white-space: pre-wrap; }
.secret {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  border: 1px dashed var(--field-border);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.08em;
  color: var(--ink);
  word-break: break-all;
  user-select: all;
}

dl.kv {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr);
  gap: 0;
  margin: 0 0 var(--space-3);
}
dl.kv dt, dl.kv dd {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-line);
}
dl.kv dt { padding-right: var(--space-5); color: var(--ink-muted); font-weight: 600; }
dl.kv dd { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
dl.kv dt:last-of-type, dl.kv dd:last-of-type { border-bottom: 0; }
@media (max-width: 560px) {
  dl.kv { grid-template-columns: minmax(0, 1fr); }
  dl.kv dt { border-bottom: 0; padding-bottom: 0; }
}

/* 16  Progress, meters, bars, skeletons =================================== */

progress.progress {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--surface-line);
  color: var(--accent);
  overflow: hidden;
}
progress.progress::-webkit-progress-bar { background: var(--surface-line); border-radius: var(--radius-full); }
progress.progress::-webkit-progress-value { background: var(--accent); border-radius: var(--radius-full); }
progress.progress::-moz-progress-bar { background: var(--accent); border-radius: var(--radius-full); }
.progress:not(progress) { height: 8px; border-radius: var(--radius-full); background: var(--surface-line); overflow: hidden; }

/* SVG bar: width comes from the rect's width="NN%" attribute, so no inline
   style is needed (CSP friendly). */
svg.meter-bar { display: block; width: 100%; height: 8px; overflow: visible; }
.meter-bar-track { fill: var(--surface-line); }
.meter-bar-fill { fill: var(--accent); }
.meter-bar-fill.is-success { fill: var(--success-line); }
.meter-bar-fill.is-warning { fill: var(--warning-line); }
.meter-bar-fill.is-danger { fill: var(--danger-line); }
.meter-bar-fill.is-info { fill: var(--info-line); }
.meter-bar-fill.is-navy { fill: var(--heading); }

.meter {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: var(--space-3);
}
.meter-track, .bar-track, .hbar-track {
  position: relative;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-line);
  overflow: hidden;
}
.meter-fill, .bar-fill, .hbar-fill { height: 100%; border-radius: inherit; background: var(--accent); }

@keyframes sw-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--surface-line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: sw-spin 0.8s linear infinite;
  vertical-align: -4px;
}
@keyframes sw-pulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: var(--space-3);
  padding: 2px 10px 2px 8px;
  border-radius: var(--radius-bar);
  background: var(--success-bg);
  color: var(--success-ink);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 700;
  letter-spacing: 0.3px;
  vertical-align: middle;
}
.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-line);
  animation: sw-live 1.6s ease-out infinite;
}
@keyframes sw-live {
  0% { box-shadow: 0 0 0 0 var(--pulse-colour, rgba(15, 145, 121, 0.5)); }
  70% { box-shadow: 0 0 0 7px var(--pulse-clear, rgba(15, 145, 121, 0)); }
  100% { box-shadow: 0 0 0 0 var(--pulse-clear, rgba(15, 145, 121, 0)); }
}

/* 17  Stat cards and dashboard pieces ===================================== */

.stat-card,
.stat-tile,
.stat-tile-wide {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.stat-head, .stat-tile-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 700;
  color: var(--ink);
}
.stat-head .i, .stat-tile-label .i {
  width: 20px;
  height: 20px;
  padding: 7px;
  box-sizing: content-box;
  border-radius: var(--radius-field);
  background: var(--bubble-sent);
  color: var(--accent-ink);
  margin: 0;
}
.stat-window, .stat-tile-window {
  margin-left: auto;
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}
.stat-value, .stat-tile-value {
  display: block;
  margin: 0 0 var(--space-1);
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-link, .stat-tile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--space-3);
  font-weight: 700;
  color: var(--accent-ink);
  text-decoration: none;
  align-self: flex-start;
}
.stat-link .i { width: 16px; height: 16px; transition: transform 0.15s var(--ease); }
.stat-link:hover, .stat-tile-link:hover { color: var(--heading); text-decoration: underline; }
.stat-link:hover .i { transform: translateX(2px); }

/* Welcome panel (end-user dashboard) */
.welcome, .user-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-4);
}
.welcome-text, .user-hero-text { flex: 1 1 320px; min-width: 0; }
.welcome-title, .user-hero-greeting {
  margin: 0 0 var(--space-1);
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  color: var(--heading);
}
.welcome-lede, .user-hero-lede { margin: 0; color: var(--ink-muted); max-width: 60ch; }

/* Request rows with a mini timeline */
.request-card-list { display: flex; flex-direction: column; gap: var(--space-2); }
.request-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-field);
  background: var(--surface);
  transition: background-color 0.15s var(--ease);
}
.request-card-row:hover { background: var(--bubble-sent); --ink-muted: #56606b; }
:root[data-theme="dark"] .request-card-row:hover { --ink-muted: #b6c2ce; }
.request-card-main { flex: 1 1 200px; min-width: 0; }
.request-card-domain { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.request-card-meta { margin-top: 2px; font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; color: var(--ink-muted); }
.request-card-row .badge { flex: 0 0 auto; }

/* Donut ring (traffic split) and gauge (security score) */
.traffic-split-card, .donut-card { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.traffic-split-ring { width: 128px; height: 128px; flex: 0 0 auto; transform: rotate(-90deg); }
.traffic-split-ring circle { fill: none; stroke-width: 3.6; }
.traffic-split-track { stroke: var(--surface-line); }
.traffic-split-allowed { stroke: var(--success-line); }
.traffic-split-blocked { stroke: var(--danger-line); }
.traffic-legend { flex: 1 1 180px; min-width: 0; }
.traffic-legend-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 7px 0;
  border-bottom: 1px solid var(--surface-line);
}
.traffic-legend-value { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.traffic-legend-total { border-bottom: 0; font-weight: 700; color: var(--heading); }

/* Ranked bars (top sites) */
.bar-list { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.bar-list li { margin: 0; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px var(--space-3);
}
.bar-row-domain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bar-row-hits { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; }
.bar-row > .bar-track, .bar-row > svg.meter-bar { grid-column: 1 / -1; }

/* 18  Sign-in and other public pages ====================================== */

main.page.auth-shell {
  max-width: none;
  padding: 0;
  display: flex;
}
.auth-split {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  width: 100%;
  min-height: calc(100vh - var(--footer-h));
}
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  padding: 44px 48px;
  background: var(--brand-gradient);
  color: var(--on-brand);
  overflow: hidden;
}
.auth-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--on-brand);
  text-decoration: none;
}
.auth-lockup .brand-mark { width: 44px; height: 44px; }
.auth-lockup .brand-wordmark { font-size: 28px; line-height: 34px; letter-spacing: 0.5px; }
.auth-lockup-product { display: block; font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 600; }
.auth-statement {
  max-width: 26rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 42px;
  font-weight: 400;
  color: var(--on-brand);
}
.auth-statement-sub { max-width: 30rem; margin: var(--space-3) 0 0; font-size: 14px; line-height: 22px; color: var(--on-brand); }
.auth-brand-foot { margin: 0; font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 600; color: var(--on-brand); }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--space-5);
  background: var(--surface-sunken);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.auth-card.is-wide { max-width: 560px; }
.auth-card > :last-child { margin-bottom: 0; }
.auth-card .flashes { margin-bottom: var(--space-4); }
.auth-title { margin: 0 0 var(--space-1); font-size: 20px; line-height: 28px; font-weight: 700; color: var(--heading); }
.auth-subtitle { margin: 0 0 var(--space-5); color: var(--ink-muted); }
.auth-card .field input { min-height: 44px; }
.auth-card .btn-block { min-height: 46px; margin-top: var(--space-2); }
.auth-foot {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--surface-line);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 500;
  color: var(--ink-muted);
}
.auth-foot .i { width: 18px; height: 18px; color: var(--accent-ink); }
.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-full);
  background: var(--bubble-sent);
  color: var(--accent-ink);
}
.auth-icon .i { width: 21px; height: 21px; }
.auth-icon.is-success { background: var(--success-bg); color: var(--success-ink); }
.auth-icon.is-warning { background: var(--warning-bg); color: var(--warning-ink); }

/* Login challenge box */
.challenge {
  margin: var(--space-2) 0 var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  border: 1px solid var(--surface-line);
}
.challenge .field { margin-bottom: 0; }
.challenge-head { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); font-weight: 700; color: var(--heading); }
.challenge-head .i { width: 18px; height: 18px; color: var(--accent-ink); }

/* Certificate card (home) */
.cert-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  border: 1px solid var(--surface-line);
}
.cert-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bubble-sent);
  color: var(--accent-ink);
  flex: 0 0 auto;
}
.cert-card-body { min-width: 0; flex: 1 1 auto; }
.cert-card-title { margin: 0 0 2px; font-weight: 700; color: var(--ink); }
.cert-card-text { margin: 0 0 var(--space-2); font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--ink-muted); }
.cert-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0 0; }
.cert-card-expiry { font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; color: var(--ink-muted); }
.cert-card .btn { margin-top: var(--space-1); }

/* Access denied */
.blocked-site {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  border: 1px solid var(--surface-line);
}
.blocked-site-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--warning-bg);
  color: var(--warning-ink);
  flex: 0 0 auto;
}
.blocked-site-text { min-width: 0; }
.blocked-site-name { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.blocked-site-meta { margin-top: 2px; }
.steps { list-style: none; margin: var(--space-5) 0 0; padding: 0; counter-reset: step; }
.steps li { position: relative; display: flex; gap: var(--space-3); margin: 0; padding: 0 0 var(--space-4); }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  background: var(--bubble-sent);
  color: var(--accent-ink);
  font-size: var(--fs-meta);
  font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 30px;
  bottom: 4px;
  width: 2px;
  background: var(--surface-line);
}
.steps strong { display: block; color: var(--ink); }
.steps span { color: var(--ink-muted); }

/* MFA setup */
.qr-frame {
  display: inline-block;
  padding: 10px;
  line-height: 0;
  border-radius: var(--radius-field);
  background: #ffffff;
  border: 1px solid var(--surface-line);
}
.qr-frame svg { width: 180px; height: 180px; display: block; }
.qr-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.qr-row > .stack-sm { flex: 1 1 200px; min-width: 0; }
.secret-sm { font-size: var(--fs-meta); line-height: 18px; letter-spacing: 0; margin-top: var(--space-2); }
.setup-steps { margin: 0 0 var(--space-4); padding-left: 1.3em; }
.setup-steps li { margin: 0 0 6px; color: var(--ink); }
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  list-style: none;
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  border: 1px dashed var(--field-border);
}
.code-grid li {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0.04em;
  color: var(--ink);
  user-select: all;
}
@media (max-width: 420px) { .code-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 899.98px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-brand { padding: var(--space-6) var(--space-5); gap: var(--space-5); }
  .auth-statement { font-size: 24px; line-height: 32px; }
  .auth-brand-foot { display: none; }
  .auth-panel { padding: var(--space-6) var(--space-4) 40px; align-items: flex-start; }
}
@media (max-width: 480px) {
  .auth-card { padding: var(--space-6) var(--space-5); }
}

/* 19  Legacy page components ==============================================
   Styled with the new tokens so pages that have not been restyled yet stay
   coherent. Grouped by the page that uses them. */

/* Page header used by request pages */
.request-page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.request-lede { color: var(--ink-muted); max-width: 60ch; margin: var(--space-1) 0 var(--space-5); }

/* New request (request_new.html) */
.request-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  max-width: 1180px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-subtle);
  overflow: hidden;
}
.request-form-col { padding: 36px 40px; }
.request-form-col h1 { margin-top: 0; }
.request-field { margin-bottom: var(--space-5); }
.request-field label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink);
}
.request-required { color: var(--danger-ink); }
.request-field textarea { width: 100%; }
.request-form-col button[type="submit"] { margin-top: var(--space-1); }
.request-preview-col { padding: 36px 32px; background: var(--surface-sunken); border-left: 1px solid var(--surface-line); }
.request-preview-title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-muted);
}
.request-preview-title:not(:first-child) { margin-top: var(--space-6); }
.request-chip-row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.request-chip {
  padding: 4px var(--space-3);
  border-radius: var(--radius-bar);
  background: var(--surface);
  border: 1px solid var(--surface-line);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 600;
  color: var(--ink);
}
.request-chip-placeholder { color: var(--ink-muted); font-style: italic; border-style: dashed; }
.request-chip-more { background: var(--bubble-sent); color: var(--accent-ink); border-color: transparent; }
.request-division-readout { margin: var(--space-3) 0 0; font-size: var(--fs-meta); color: var(--ink-muted); }
.request-division-readout strong { color: var(--ink); }
.request-sla-card {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-radius: var(--radius-field);
  background: var(--surface);
  border: 1px solid var(--surface-line);
}
.request-sla-big { font-size: 24px; line-height: 30px; font-weight: 700; color: var(--heading); }
.request-sla-label { margin-top: var(--space-1); font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--ink-muted); }
.request-timeline { display: flex; flex-direction: column; }
.request-tl-item { position: relative; display: flex; gap: var(--space-3); padding-bottom: var(--space-4); }
.request-tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--surface-line);
}
.request-tl-dot { width: 14px; height: 14px; margin-top: 2px; flex: 0 0 auto; border-radius: 50%; background: var(--surface); border: 2px solid var(--neutral-line); }
.request-tl-active .request-tl-dot { background: var(--accent); border-color: var(--accent); }
.request-tl-text { display: flex; flex-direction: column; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--ink-muted); }
.request-tl-text strong { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); }
.request-policy-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-field);
  background: var(--info-bg);
}
.request-policy-note .i { color: var(--info-ink); }
.request-policy-note p { margin: 0; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--ink); }
@media (max-width: 900px) {
  .request-split { grid-template-columns: minmax(0, 1fr); }
  .request-form-col, .request-preview-col { padding: var(--space-6) var(--space-5); }
  .request-preview-col { border-left: 0; border-top: 1px solid var(--surface-line); }
}

/* My requests / request detail */
.request-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.request-id-badge {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: var(--radius-badge);
  background: var(--brand-navy);
  color: #ffffff;
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 700;
  white-space: nowrap;
}
:root[data-theme="dark"] .request-id-badge { background: var(--heading); color: var(--surface-sunken); }
.request-meta-item { color: var(--ink-muted); white-space: nowrap; }
.request-meta-item strong { color: var(--ink); font-weight: 600; }
.request-reason { margin: 0 0 var(--space-3); color: var(--ink-muted); }
.request-envelope-card { scroll-margin-top: calc(var(--topbar-h) + var(--space-4)); }
.request-envelope-card:target { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }

/* Truncated reason / URL cells (audit trail, logs) */
.reason-cell { max-width: 18rem; }
.reason-details > summary,
.url-details > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: default;
  color: var(--ink);
  font-weight: 400;
}
.reason-details > summary::-webkit-details-marker,
.url-details > summary::-webkit-details-marker { display: none; }
.reason-details > summary::before,
.url-details > summary::before {
  content: "";
  flex: 0 0 auto;
  display: inline-block;
  transition: transform 0.15s var(--ease);
}
.reason-details.reason-truncated > summary,
.url-details.url-truncated > summary { cursor: pointer; color: var(--link); }
.reason-details.reason-truncated > summary::before,
.url-details.url-truncated > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(-45deg);
  margin: 0 2px;
}
.reason-details[open] > summary::before,
.url-details[open] > summary::before { transform: rotate(45deg); }
.reason-preview { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reason-full, .url-full { margin-top: 6px; white-space: normal; color: var(--ink); }
.reason-full { word-break: break-word; }
.reason-plain { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }

/* Expandable ticket rows (audit trail) */
.ticket-expand-btn { --btn-ink: var(--link); padding: 4px 6px; line-height: 1; }
.ticket-summary-row.ticket-expanded > td { background: var(--surface-sunken); }
.ticket-detail-row > td { padding: 0 0 var(--space-3) 36px; }
.ticket-detail-table { width: 100%; background: var(--surface-sunken); border-radius: var(--radius-field); }
.ticket-detail-table th { color: var(--ink-muted); background: transparent; }

.log-group-extra td { background: var(--surface-sunken); color: var(--ink-muted); }

/* Reports */
.reports-overview .exec-summary, .exec-summary {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  line-height: 21px;
}
.kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
@media (max-width: 1000px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-tile, .chart-tile {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-card-dense);
}
.kpi-label { margin-bottom: var(--space-1); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; letter-spacing: 0.3px; color: var(--ink-muted); }
.kpi-value { font-size: 24px; line-height: 30px; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.kpi-sub { margin-top: 2px; font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; color: var(--ink-muted); }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.3fr); gap: var(--space-3); margin-bottom: var(--space-3); align-items: stretch; }
.chart-grid-2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .chart-grid, .chart-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.chart-tile h3 { margin: 0 0 var(--space-3); color: var(--heading); }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-meta); color: var(--ink); }
.hbar-row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 6px; font-size: var(--fs-meta); }
.hbar-label { width: 7.5rem; flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.hbar-value { width: 4.5rem; flex: 0 0 auto; text-align: right; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Lookup typeahead */
.lookup-typeahead { position: relative; display: inline-block; }
.field .lookup-typeahead { display: block; }
.lookup-suggest-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 46; /* above the fixed footer (45), below the top bar (50) */
  min-width: 260px;
  max-width: 420px;
  max-height: 240px;
  margin: 6px 0 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface-raised);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-field);
  box-shadow: var(--shadow-popover);
}
.lookup-suggest-item { --btn-ink: var(--ink); display: block; width: 100%; padding: 7px 10px; border-radius: 10px; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.lookup-suggest-item:hover, .lookup-suggest-item.active { --btn-bg: var(--bubble-sent); }
.lookup-suggest-empty { padding: 7px 10px; color: var(--ink-muted); }
.lookup-candidate-list { display: flex; flex-direction: column; gap: var(--space-2); max-width: 560px; margin: 0 0 var(--space-4); }
.lookup-candidate-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-3);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-field);
  font-weight: 500;
  cursor: pointer;
}
.lookup-candidate-item:hover { background: var(--bubble-sent); }
.lookup-candidate-item:has(input:checked) { border-color: var(--accent); background: var(--bubble-sent); }
.member-summary { display: flex; flex-direction: column; gap: 4px; min-width: 14rem; }
.member-summary-label { font-weight: 600; color: var(--ink-muted); }

/* 19b  Page components (second pass) =======================================
   Shared pieces for the request, policy, log and report pages. */

.page-title .live-badge, .page-title .badge { margin-left: var(--space-2); vertical-align: 3px; }
.page-title .i { width: 21px; height: 21px; margin-right: var(--space-2); vertical-align: -3px; color: var(--accent-ink); }

/* Inline confirm panel: revealed in place of the button that opened it. */
.confirm-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-2) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-field);
  border-left: 4px solid var(--warning-line);
  background: var(--warning-bg);
  color: var(--ink);
  white-space: normal;
  text-align: left;
}
.confirm-panel > p { flex: 1 1 14rem; min-width: 0; margin: 0; }
.confirm-panel > form { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; }
.confirm-panel.is-danger { border-left-color: var(--danger-line); background: var(--danger-bg); }
.confirm-panel.is-info { border-left-color: var(--info-line); background: var(--info-bg); }
td .confirm-panel { min-width: 17rem; }

/* Busy panel shown while a scan or job runs */
.busy-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-field);
  border-left: 4px solid var(--info-line);
  background: var(--info-bg);
  color: var(--ink);
}
.busy-panel > p { margin: 0; display: flex; align-items: center; gap: var(--space-2); }
.busy-panel .job-log { margin: 0; }
.job-log:empty { display: none; }
.domain-block > .card-section { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--surface-line); }

/* Table helpers */
th.actions, td.actions { width: 1%; text-align: right; white-space: nowrap; }
td.actions .confirm-panel { white-space: normal; }
.cell-actions { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
@media (max-width: 640px) { .cell-actions { flex-wrap: wrap; } }
.cell-actions > form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
td.empty-cell { padding: var(--space-5) var(--space-3); text-align: center; color: var(--ink-muted); }
.cell-sub { display: block; margin-top: 2px; font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; color: var(--ink-muted); }
.wrap-anywhere { overflow-wrap: anywhere; word-break: break-word; }
/* Host names and URLs in table cells: room for a typical name before they
   wrap (the table scrolls sideways instead of breaking every name). */
td.wrap-anywhere { min-width: 11rem; }
.check-col { width: 1%; }
.check-col input { margin: 0; }
table .badge + .cell-sub { margin-top: 4px; }

.card-footer > .pagination { margin: 0; }

/* Field widths */
.input-xs { width: 6.5rem !important; min-width: 0; }
.field-narrow { max-width: 24rem; }

/* Domain block (request detail): one card per requested site. */
.domain-block-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-3); }
.domain-block-title { margin: 0; font-size: 18px; line-height: 24px; color: var(--heading); overflow-wrap: anywhere; }
.decide-panel {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  border: 1px solid var(--surface-line);
}
.decide-panel .field textarea { min-height: 72px; }
.decide-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2); }
.decide-actions .confirm-panel { flex: 1 1 100%; margin: 0; }
.claim-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.claim-row > form { display: inline-flex; margin: 0; }

/* Section heading inside a card */
.card-section-title { margin: 0 0 var(--space-3); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 700; color: var(--heading); }
.card-section-title .i { width: 18px; height: 18px; margin-right: 6px; vertical-align: -4px; color: var(--accent-ink); }

.choice-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-2); }
.choice-row > .checkbox { flex: 0 0 auto; }
.choice-row > select, .choice-row > input[type="text"] { flex: 1 1 10rem; min-width: 0; }
.policy-part-title {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-muted);
}
.chip a { color: var(--ink); text-decoration: none; }
.chip a:hover { color: var(--accent-ink); text-decoration: underline; }

/* Ticket expand chevron (audit trail) */
.ticket-expand-btn .i { width: 16px; height: 16px; transition: transform 0.15s var(--ease); }
.ticket-expand-btn[aria-expanded="true"] .i { transform: rotate(90deg); }

/* Reports: KPI tones, donut, bars and trend line drawn without inline styles */
.kpi-row.is-auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi-value.is-success { color: var(--success-ink); }
.kpi-value.is-warning { color: var(--warning-ink); }
.kpi-value.is-danger { color: var(--danger-ink); }
.donut-chart { width: 120px; height: 120px; flex: 0 0 auto; }
.donut-track, .donut-allowed, .donut-blocked { fill: none; stroke-width: 6; }
.donut-track { stroke: var(--surface-line); }
.donut-allowed { stroke: var(--success-line); }
.donut-blocked { stroke: var(--danger-line); }
.donut-total { fill: var(--heading); font-size: 6px; font-weight: 700; font-family: var(--font-sans); }
.donut-caption { fill: var(--ink-muted); font-size: 3.6px; font-family: var(--font-sans); }
.legend-dot.is-success { background: var(--success-line); }
.legend-dot.is-danger { background: var(--danger-line); }
.legend-dot.is-neutral { background: var(--neutral-line); }
.legend-dot.is-info { background: var(--info-line); }
.hbar-row > svg.meter-bar { flex: 1 1 0%; width: auto; min-width: 2rem; }
.trend-chart { display: block; width: 100%; max-width: 420px; height: 70px; }
.trend-line { fill: none; stroke: var(--info-line); stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend-dot { fill: var(--info-line); }
.chart-tile .help-text { margin-bottom: 0; }

/* Manager approval page (public, no top bar) */
.gate-card { max-width: 640px; margin: 0 auto; }

/* MFA QR code (the server adds class="qr-svg" width/height 180) */
.qr-svg { display: block; width: 180px; height: 180px; }

/* Sign-out button in the user menu: looks like the menu links. */
.user-menu-form { margin: 0; }
button.user-menu-item {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-border: transparent;
  --btn-shadow: none;
  width: 100%;
  min-height: 0;
  justify-content: flex-start;
  border: 0;
  font: 600 var(--fs-body)/var(--lh-body) var(--font-sans);
  text-align: left;
}
button.user-menu-item:hover, button.user-menu-item:active { transform: none; }

/* 20  Utilities =========================================================== */

.visually-hidden, .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;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.text-muted { color: var(--ink-muted); }
.text-meta { font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; color: var(--ink-muted); }
.text-danger { color: var(--danger-ink); }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.divider-top { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--surface-line); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* 21  Reduced motion ====================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, button:hover, .cta-button:hover, .link-button:hover { transform: none; }
}

/* 22  Print (reports, audit pages) ======================================= */

@page { margin: 14mm 12mm; }

@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --surface: #ffffff;
    --surface-sunken: #f4f6f8;
    --surface-line: #d5dbe1;
    --surface-raised: #ffffff;
    --ink: #000000;
    --ink-muted: #3f4852;
    --heading: #143a63;
    --accent-ink: #0b7562;
    --bubble-sent: #ffffff;
    --success-bg: #ffffff; --warning-bg: #ffffff; --danger-bg: #ffffff; --info-bg: #ffffff; --neutral-bg: #ffffff;
    --success-ink: #0a6b58; --warning-ink: #6b4600; --danger-ink: #8f2f2f; --info-ink: #1d4f86; --neutral-ink: #333b44;
  }
  html, body { background: #ffffff !important; font-size: 11pt; }
  .topbar, .site-footer, .skip-link, .page-actions, .nav-toggle, .theme-toggle,
  .filter-form, .refresh-indicator, .flashes, .no-print,
  button, .btn, .cta-button, .link-button, form .form-actions { display: none !important; }
  main.page { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .card, .tile, .kpi-tile, .chart-tile, .stat-card {
    box-shadow: none !important;
    border: 1px solid #d5dbe1 !important;
    border-radius: 8px;
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: visible !important;
  }
  .badge, .status-chip { border: 1px solid currentColor; }
  table { font-size: 9.5pt; }
  table th, table td { padding: 4px 6px; }
  thead { display: table-header-group; }
  tr, img, svg { break-inside: avoid; page-break-inside: avoid; }
  table tr:hover > td { background: transparent !important; }
  .table-wrap, .tile { overflow: visible !important; max-height: none !important; }
  .grid-2, .grid-3, .grid-4, .dashboard-grid, .dashboard-grid-wide, .chart-grid, .kpi-row { gap: 8px; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
}

/* Settings tabs: sit under the page header, scroll sideways on a phone */
.settings-tabs { overflow-x: auto; flex-wrap: nowrap; }
.settings-tabs a { white-space: nowrap; }

/* Long tables keep their header row in view: the table scrolls inside its card */
.table-wrap.is-sticky-head { max-height: 75vh; overflow: auto; }
.table-wrap.is-sticky-head thead th { background: var(--surface-sunken); }

/* A card right after a stack of cards, and a form right after a card's introduction, keep the usual spacing. */
.stack + .card { margin-top: var(--space-4); }
.card-subtitle + form { margin-top: var(--space-4); }
.notice-list { margin: var(--space-3) 0 var(--space-5); padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--space-2); color: var(--ink); }

.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.chart-title { font-weight: 600; color: var(--heading); }
.chart-latest { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.chart-empty { margin: var(--space-6) 0; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid-line { stroke: var(--surface-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-label { fill: var(--ink-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-area { fill: var(--accent); opacity: 0.12; stroke: none; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-end { fill: var(--accent); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-hit { fill: transparent; }
.chart-hit:hover { fill: var(--accent); opacity: 0.08; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.check-list li { display: flex; gap: var(--space-2); align-items: flex-start; }

/* ========================================================================
   Application shell: an icon rail of sections, the section's pages
   in a side panel, an app bar with the breadcrumb and quick jump (Ctrl K),
   and the fixed footer. Pages render inside .shell-main exactly as before.
   ======================================================================== */
:root {
  --rail-w: 60px;
  --sidenav-w: 216px;
  --appbar-h: 48px;
  --rail-bg: #0f2a46;
  --rail-ink: #a9bccf;
  --rail-hover: rgba(255, 255, 255, 0.08);
  --rail-active-bg: rgba(54, 184, 155, 0.18);
  --rail-active-ink: #ffffff;
  --sidenav-bg: #f7f9fb;
  --sidenav-item-hover: #eef2f6;
  --sidenav-item-active: #ffffff;
  --appbar-bg: rgba(255, 255, 255, 0.92);
  --chip-bg: #eef1f4;
  --surface-sunken: #f3f5f8;
}
:root[data-theme="dark"] {
  --rail-bg: #081626;
  --rail-ink: #8ea3b8;
  --rail-hover: rgba(255, 255, 255, 0.06);
  --rail-active-bg: rgba(54, 184, 155, 0.22);
  --sidenav-bg: #0f2133;
  --sidenav-item-hover: #17304a;
  --sidenav-item-active: #1a3550;
  --appbar-bg: rgba(13, 29, 46, 0.92);
  --chip-bg: #1a3550;
  --surface-sunken: #0b1a2a;
}

html { scroll-padding-top: calc(var(--appbar-h) + var(--space-4)); }

.shell { display: flex; flex: 1 0 auto; width: 100%; min-height: calc(100vh - var(--footer-h)); }

/* Rail */
.rail {
  position: fixed; top: 0; bottom: var(--footer-h); left: 0; z-index: 40;
  width: var(--rail-w);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: 12px 0;
  background: var(--rail-bg);
}
.rail-brand { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.08); margin-bottom: var(--space-3); }
.rail-brand img { width: 28px; height: 28px; }
.rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rail-item {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  color: var(--rail-ink); background: transparent; border: 0; padding: 0; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.rail-item .i { width: 20px; height: 20px; }
.rail-item:hover { background: var(--rail-hover); color: #fff; }
.rail-item.is-active { background: var(--rail-active-bg); color: var(--rail-active-ink); }
.rail-item.is-active::before {
  content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--rail-active-mark, #36b89b);
}
.rail-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rail-label {
  position: absolute; left: 50px; top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
  padding: 5px 9px; border-radius: 8px; background: #0b1f33; color: #fff; font-size: 12px; font-weight: 600;
  opacity: 0; transition: opacity 0.12s ease; box-shadow: 0 6px 20px rgba(0,0,0,0.2); z-index: 60;
}
.rail-item:hover .rail-label, .rail-item:focus-visible .rail-label { opacity: 1; }
.rail-end { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.rail .theme-toggle { width: 36px; height: 36px; }

/* Side panel */
.sidenav {
  position: fixed; top: 0; bottom: var(--footer-h); left: var(--rail-w); z-index: 35;
  width: var(--sidenav-w); overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: 16px 12px 12px;
  background: var(--sidenav-bg); border-right: 1px solid var(--surface-line);
}
.sidenav-eyebrow { margin: 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.sidenav-title { margin: 2px 8px 0; font-size: 18px; line-height: 24px; font-weight: 700; color: var(--heading); }
.sidenav-group { display: flex; flex-direction: column; gap: 4px; }
.sidenav-group-label { margin: 0 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.sidenav-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sidenav-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px;
  color: var(--ink); font-weight: 500; text-decoration: none; transition: background-color 0.12s ease;
}
.sidenav-item .i { width: 17px; height: 17px; color: var(--ink-muted); flex: none; }
.sidenav-item:hover { background: var(--sidenav-item-hover); color: var(--ink); }
.sidenav-item.is-active { background: var(--sidenav-item-active); font-weight: 650; color: var(--heading);
  box-shadow: 0 1px 2px rgba(16,32,52,0.06), 0 0 0 1px var(--surface-line); }
.sidenav-item.is-active .i { color: var(--accent); }
.sidenav-status {
  margin-top: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--surface-line); color: var(--ink); text-decoration: none;
  font-size: 13px; line-height: 18px;
}
.sidenav-status:hover { border-color: var(--accent); color: var(--ink); }
.sidenav-status strong { display: block; font-weight: 650; }
.sidenav-status-meta { display: block; color: var(--ink-muted); font-size: 12px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; }
.status-dot.is-good { background: var(--success-line); box-shadow: 0 0 0 3px var(--success-bg); }
.status-dot.is-bad { background: var(--warning-line); box-shadow: 0 0 0 3px var(--warning-bg); }
.sidenav-scrim { position: fixed; inset: 0; z-index: 34; background: var(--overlay); }

/* Main column and app bar */
.shell-main { flex: 1; min-width: 0; margin-left: calc(var(--rail-w) + var(--sidenav-w)); display: flex; flex-direction: column; }
.appbar {
  position: sticky; top: 0; z-index: 30; height: var(--appbar-h);
  display: flex; align-items: center; gap: var(--space-4); padding: 0 var(--space-5);
  background: var(--appbar-bg); border-bottom: 1px solid var(--surface-line);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
}
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; white-space: nowrap; }
.crumb { color: var(--ink-muted); }
.crumb.is-current { color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.crumb-sep { color: var(--ink-faint); }
.jump {
  position: relative; flex: 0 1 420px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px 0 12px; border-radius: 8px; background: var(--surface-sunken);
  border: 1px solid var(--surface-line);
}
.jump:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--success-bg); }
.jump .i { width: 17px; height: 17px; color: var(--ink-muted); flex: none; }
.jump input { flex: 1; min-width: 0; min-height: 0; border: 0; background: transparent; color: var(--ink); font: inherit; outline: none; padding: 0; height: 28px; }
.jump kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--surface-line); color: var(--ink-muted); background: var(--surface); white-space: nowrap; }
.appbar-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.appbar-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--chip-bg); color: var(--ink-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; }
.appbar-chip.is-warning { background: var(--warning-bg); color: var(--warning-ink); letter-spacing: 0; }
.appbar-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--surface-line); background: var(--surface); color: var(--ink-muted); cursor: pointer; }
.appbar-icon:hover { color: var(--ink); border-color: var(--field-border); }
.appbar-icon .i { width: 18px; height: 18px; }
.appbar .nav-toggle { display: none; }
.appbar .user-menu-trigger { border-radius: 999px; padding: 3px 10px 3px 3px; }

/* Content */
.shell-main main.page { max-width: none; width: 100%; margin: 0; padding: 16px 20px 32px; }
.shell-main .page-title { font-size: var(--fs-page-title); line-height: var(--lh-page-title); letter-spacing: -0.01em; }
.shell-main .card { border-radius: var(--radius-card-dense); border-color: var(--surface-line); box-shadow: 0 1px 2px rgba(16, 32, 52, 0.04); }
.shell-main table thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-muted); }

/* Footer: release - copyright - time zone */
.site-footer p { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); max-width: none; padding: 0 var(--space-5); }
.site-footer-release, .site-footer-tz { flex: 1 1 0; color: var(--ink-faint); font-weight: 500; }
.site-footer-tz { text-align: right; }
.site-footer-rights { flex: 0 1 auto; color: var(--ink-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* Collapsed side panel (the rail's << button) */
.shell.sidenav-hidden .sidenav { display: none; }
.shell.sidenav-hidden .shell-main { margin-left: var(--rail-w); }
.shell.sidenav-hidden #sidenav-collapse .i { transform: rotate(180deg); }

@media (max-width: 1100px) {
  .sidenav { transform: translateX(-110%); transition: transform 0.2s ease; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
  .sidenav.is-open { transform: none; }
  .shell-main, .shell.sidenav-hidden .shell-main { margin-left: var(--rail-w); }
  .appbar .nav-toggle { display: grid; }
  #sidenav-collapse { display: none; }
  .shell.sidenav-hidden .sidenav { display: flex; }
}
@media (max-width: 720px) {
  :root { --rail-w: 0px; }
  .rail { display: none; }
  .sidenav { left: 0; }
  .jump { display: none; }
  .appbar { padding: 0 var(--space-4); }
  .appbar .whoami, .appbar-chip:not(.is-warning) { display: none; }
  .appbar-chip.is-warning .appbar-chip-action { display: none; }
  .shell-main main.page { padding: 20px 16px 32px; }
  .site-footer-release, .site-footer-tz { display: none; }
  .site-footer p { justify-content: center; }
}
@media print {
  .rail, .sidenav, .appbar { display: none !important; }
  .shell-main { margin-left: 0 !important; }
}
.shell-main .settings-tabs { display: none; }

/* =========================================================================
   Design system: layout rules every page follows, and the components
   of the Check Point style rulebase, request tracking and settings lists.
   Rules: cards in a row are the same height and their footers line up;
   table text lines up with the card title; numbers right-aligned.
   ========================================================================= */

/* Cards in a grid row: same height, footer pinned to the bottom. */
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card, .grid-auto > .card,
.dashboard-grid > .card, .dashboard-grid-wide > .card { display: flex; flex-direction: column; }
.grid-2 > .card > .card-footer:last-child, .grid-3 > .card > .card-footer:last-child,
.grid-4 > .card > .card-footer:last-child, .grid-auto > .card > .card-footer:last-child,
.dashboard-grid > .card > .card-footer:last-child, .dashboard-grid-wide > .card > .card-footer:last-child,
.card .pin-bottom { margin-top: auto; }
/* Card headers in a row end at the same line: room for a title plus one line of subtitle. */
.grid-2 > .card > .card-header, .grid-3 > .card > .card-header, .dashboard-grid > .card > .card-header { min-height: 36px; }
/* Table text lines up with the card title. */
.card:not(.card-flush) > .table-wrap table :is(th, td):first-child { padding-left: 0; }
.card:not(.card-flush) > .table-wrap table :is(th, td):last-child { padding-right: 0; }
.card-flush > .table-wrap table :is(th, td):first-child { padding-left: var(--space-5); }
.card-flush > .table-wrap table :is(th, td):last-child { padding-right: var(--space-5); }
.card:not(.card-flush) > .table-wrap table thead th { background: transparent; }
td.num, th.num { text-align: right; }

/* Object chips (rulebase cells): type icon + name. */
.obj { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 8px 2px 6px; border-radius: 7px;
  font-size: 13px; line-height: 20px; font-weight: 600; color: var(--ink); background: var(--neutral-bg); white-space: nowrap; }
.obj a { color: inherit; text-decoration: none; }
.obj a:hover { text-decoration: underline; }
.obj .i { width: 14px; height: 14px; flex: none; }
.obj.is-source { background: var(--success-bg); } .obj.is-source .i { color: var(--success-ink); }
.obj.is-group { background: var(--info-bg); } .obj.is-group .i { color: var(--info-ink); }
.obj.is-category { background: var(--warning-bg); } .obj.is-category .i { color: var(--warning-ink); }
.obj.is-threat { background: var(--danger-bg); } .obj.is-threat .i { color: var(--danger-ink); }
.obj.is-any { background: transparent; border: 1px dashed var(--surface-line); color: var(--ink-muted); }

/* Action pills: Allow / Block / Warn / Enforce. */
.action { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 7px; border-radius: 999px;
  font-size: 12px; font-weight: 800; white-space: nowrap; }
.action .i { width: 14px; height: 14px; }
.action.is-allow { background: var(--success-bg); color: var(--success-ink); }
.action.is-block { background: var(--danger-bg); color: var(--danger-ink); }
.action.is-warn, .action.is-enforce { background: var(--info-bg); color: var(--info-ink); }

/* The rulebase: one ordered table, sections as row groups. */
.rulebase { min-width: 760px; }
.rulebase th, .rulebase td { vertical-align: top; }
.rulebase td { padding-top: 10px; padding-bottom: 10px; }
.rulebase .rb-hits { width: 84px; white-space: nowrap; }
.rulebase .hits { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.rulebase .hits.is-zero { font-weight: 600; color: var(--ink-muted); }
.rulebase tr.is-off td { opacity: 0.55; }
.rulebase tr.is-locked td { background: color-mix(in srgb, var(--surface-sunken) 55%, var(--surface)); }
.rulebase tr.is-cleanup td { background: var(--surface-sunken); }
.rulebase tr:hover td { background: color-mix(in srgb, var(--success-bg) 45%, var(--surface)); }
.layer-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--surface-line); margin-bottom: var(--space-4); }
.layer-tabs a { padding: 10px 14px; font-weight: 600; color: var(--ink-muted); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.layer-tabs a[aria-current="page"] { color: var(--heading); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.layer-tabs a .badge-count { margin: 0; }
.rule-details > summary { cursor: pointer; list-style: none; }
.rule-details > summary::-webkit-details-marker { display: none; }
.rule-details[open] { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Request progress: Submitted > Manager approval > IT review > Completed. */
.tracker { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.tracker li { padding-top: 8px; border-top: 4px solid var(--surface-line); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.tracker li.is-done { border-top-color: var(--accent); color: var(--ink); font-weight: 700; }
.tracker li.is-now { border-top-color: var(--warning-line); color: var(--warning-ink); font-weight: 700; }
.tracker li.is-stopped { border-top-color: var(--danger-line); color: var(--danger-ink); font-weight: 700; }
.tracker li.is-skipped { border-top-style: dashed; }
.tracker li span { display: block; font-weight: 500; color: var(--ink-muted); }

.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.kpi-label .i { width: 15px; height: 15px; }
.kpi-value { font-size: 24px; line-height: 32px; font-weight: 800; color: var(--heading); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* Verdict banner (URL lookup, policy tester). */
.verdict { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-4) var(--space-5); border-radius: var(--radius-card-dense);
  border: 1px solid var(--surface-line); margin-bottom: var(--space-4); }
.verdict-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.verdict-icon .i { width: 24px; height: 24px; }
.verdict-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 800; }
.verdict.is-block { background: var(--danger-bg); border-color: var(--danger-line); } .verdict.is-block .verdict-icon { background: var(--danger-ink); } .verdict.is-block .verdict-title { color: var(--danger-ink); }
.verdict.is-allow { background: var(--success-bg); border-color: var(--success-line); } .verdict.is-allow .verdict-icon { background: var(--success-ink); } .verdict.is-allow .verdict-title { color: var(--success-ink); }
.verdict.is-warn { background: var(--info-bg); border-color: var(--info-line); } .verdict.is-warn .verdict-icon { background: var(--info-ink); } .verdict.is-warn .verdict-title { color: var(--info-ink); }

/* "Needs you" list rows. */
.task-row { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; border-top: 1px solid var(--surface-line); }
.task-row:first-child { border-top: 0; padding-top: 0; }
.task-row .task-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.task-row .task-icon.is-warning { background: var(--warning-bg); color: var(--warning-ink); }
.task-row .task-icon.is-danger { background: var(--danger-bg); color: var(--danger-ink); }
.task-row .task-icon.is-info { background: var(--info-bg); color: var(--info-ink); }

/* Horizontal bar rows (top lists). */
.bar-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 64px; gap: var(--space-3); align-items: center; font-size: 13px; }
.bar-row + .bar-row { margin-top: var(--space-2); }
.bar-row .num { text-align: right; font-weight: 700; }
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Meters drawn as SVG (the CSP allows no inline style attributes). */
svg.meter { display: block; width: 100%; height: 6px; }
svg.meter .meter-track { fill: var(--neutral-bg); }
svg.meter .meter-fill { fill: var(--accent); }
svg.meter.is-danger .meter-fill { fill: var(--danger-line); }
svg.meter.is-navy .meter-fill { fill: var(--heading); }
.request-steps { margin: var(--space-2) 0 var(--space-4); }

/* =========================================================================
   Pages: Logs (search bar, breakdown, records with a record panel),
   Service health, Reports, Audit trail and the request queue.
   ========================================================================= */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success-line); box-shadow: 0 0 0 3px var(--success-bg); }

/* Search bar with filter tokens */
.log-search { margin-bottom: var(--space-4); }
.qbar { display: flex; align-items: center; gap: var(--space-2); padding: 2px 3px 2px 10px; border: 1px solid var(--field-border);
  border-radius: var(--radius-field); background: var(--field-bg); }
.qbar:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.qbar > .i { width: 17px; height: 17px; color: var(--ink-muted); flex: none; }
.qbar input[type="search"] { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; padding: 3px 0; font-family: var(--font-mono);
  font-size: 12px; box-shadow: none; outline: none; }
.qbar .qbar-range { flex: none; width: auto; min-width: 140px; height: 26px; min-height: 26px; padding-top: 0; padding-bottom: 0; }
.log-search-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: flex-start; justify-content: space-between; margin-top: 6px; }
.log-search-meta .help-text { margin: 0; flex: 1 1 420px; }
.log-search-meta code { padding: 1px 5px; border-radius: 5px; background: var(--surface-sunken); font-size: 12px; }
.log-dates summary { cursor: pointer; font-size: var(--fs-meta); font-weight: 600; color: var(--link); }
.log-dates-fields { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin-top: var(--space-2); }
.log-dates-fields .field { margin: 0; }
.log-dates-fields .help-text { margin: 0; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: var(--space-2); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border-radius: var(--radius-full);
  background: var(--info-bg); color: var(--info-ink); font-size: 12px; text-decoration: none; }
.filter-chip b { font-weight: 700; }
.filter-chip .i { width: 13px; height: 13px; opacity: 0.7; }
.filter-chip:hover .i { opacity: 1; }
.filter-clear { font-size: 12px; font-weight: 600; margin-left: 4px; }

.facet-title { margin: 0 0 2px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }

/* Records with the record panel */
.log-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.log-split.has-record { grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); }
@media (max-width: 1360px) { .log-split.has-record { grid-template-columns: minmax(0, 1fr); } .log-split.has-record .log-record { order: -1; position: static; } }
.hist-bar { fill: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.hist-bar:hover { fill: var(--accent); }
.log-table td { vertical-align: top; }
.log-table tr[data-href] { cursor: pointer; }
.log-table tr.is-selected td { background: color-mix(in srgb, var(--info-bg) 70%, var(--surface)); }
.log-table .badge { display: inline-flex; }
.log-time { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); text-decoration: none; }
.log-table a { color: inherit; text-decoration: none; }
.log-table a:hover { text-decoration: underline; color: var(--link); }
.cell-strong { font-weight: 700; }
.log-site { max-width: 340px; }
.log-site > a.mono { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.rule-ref { display: inline-block; min-width: 28px; padding: 1px 6px; border-radius: 6px; background: var(--surface-sunken); font-weight: 800;
  text-align: center; font-variant-numeric: tabular-nums; }
.log-record { position: sticky; top: var(--space-4); margin: 0; }
.log-record .card-title { margin-top: 6px; overflow-wrap: anywhere; }
.record-kv { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px var(--space-3); margin: 0 0 var(--space-4); font-size: 13px; }
.record-kv dt { color: var(--ink-muted); font-weight: 600; }
.record-kv dd { margin: 0; overflow-wrap: anywhere; }
.record-actions { display: flex; flex-direction: column; gap: 6px; }
.record-actions .btn { justify-content: flex-start; }

/* Service health */
.server-strip { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); padding: 0; margin-bottom: var(--space-4); }
.server-strip > div { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.server-strip > div + div { border-left: 1px solid var(--surface-line); }
.server-id { flex-direction: row !important; align-items: center; gap: var(--space-3) !important; }
.server-id strong { display: block; font-size: 14px; color: var(--heading); }
.server-id .text-meta { display: block; }
.server-icon { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--heading); color: var(--surface); }
.server-icon .i { width: 22px; height: 22px; }
.server-metric-label { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.server-metric-value { font-size: 20px; line-height: 28px; font-weight: 800; color: var(--heading); font-variant-numeric: tabular-nums; }
.server-metric .status-chip { align-self: flex-start; }
@media (max-width: 1100px) { .server-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-strip > div + div { border-left: 0; } .server-strip > div { border-top: 1px solid var(--surface-line); } .server-strip > .server-id { grid-column: 1 / -1; border-top: 0; } }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: var(--space-5) 0 var(--space-3); }
.section-head .section-title { margin: 0; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.svc-name { flex: 1; min-width: 0; color: var(--heading); line-height: 1.3; }
.svc-state { font-size: 12px; font-weight: 700; color: var(--success-ink); }
.svc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.svc-dot.is-ok { background: var(--success-line); box-shadow: 0 0 0 3px var(--success-bg); }
.svc-dot.is-bad { background: var(--danger-line); box-shadow: 0 0 0 3px var(--danger-bg); }

/* Horizontal bars (Reports, Audit trail) */
.hbars { display: flex; flex-direction: column; gap: var(--space-2); }
.hbar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--space-3); align-items: center; font-size: 13px; }
.hbar-row svg.meter { grid-column: 1 / -1; grid-row: 2; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Audit trail */
.audit-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-4); }
.audit-search { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; min-width: 220px; padding: 0 12px; border: 1px solid var(--field-border);
  border-radius: var(--radius-field); background: var(--field-bg); }
.audit-search:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.audit-search .i { width: 16px; height: 16px; color: var(--ink-muted); flex: none; }
.audit-search input { border: 0; background: transparent; box-shadow: none; outline: none; padding: 8px 0; flex: 1; min-width: 0; }
.audit-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.audit-field input, .audit-field select { width: auto; min-width: 120px; height: var(--control-h); padding-top: 0; padding-bottom: 0; }
.audit-filters .log-dates { flex-basis: 100%; }

.audit-days { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.audit-pages { margin-top: 0; }

/* Request queue: the list and the selected request */
.queue-split { display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 1000px) { .queue-split { grid-template-columns: minmax(0, 1fr); } }
.queue-list, .queue-detail { margin: 0; }
.queue-search { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--surface-line); }
.queue-item { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--surface-line); color: var(--ink); text-decoration: none; }
.queue-item:hover { background: color-mix(in srgb, var(--surface-sunken) 70%, var(--surface)); }
.queue-item.is-selected { background: color-mix(in srgb, var(--info-bg) 70%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.queue-item .badge { flex: none; white-space: nowrap; }
.queue-pages { padding: var(--space-3) var(--space-4); margin: 0; }
.queue-title { font-size: 18px; line-height: 26px; overflow-wrap: anywhere; }
.queue-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.queue-reason { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.queue-progress { border-top: 1px solid var(--surface-line); padding-top: var(--space-4); margin-bottom: var(--space-4); }
.queue-domain { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.queue-domain-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.queue-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; border-top: 1px solid var(--surface-line); padding-top: var(--space-4); }
.badge-count.is-danger { background: var(--danger-bg); color: var(--danger-ink); }
.queue-split.is-empty { grid-template-columns: minmax(0, 1fr); }
/* The rulebase gained a Hits column; long object names wrap so the table fits a laptop screen. */
.rulebase .obj { white-space: normal; overflow-wrap: break-word; }
.rulebase th, .rulebase td { padding-left: 10px; padding-right: 10px; }
.card-flush > .table-wrap .rulebase :is(th, td):first-child { padding-left: var(--space-5); }
.card-flush > .table-wrap .rulebase :is(th, td):last-child { padding-right: var(--space-5); }
.rulebase .rb-hits { width: 72px; }
.approvals-table .obj { white-space: normal; overflow-wrap: break-word; }
.approvals-table .obj.is-category { white-space: nowrap; }
@media (max-width: 640px) {
  .qbar { flex-wrap: wrap; }
  .qbar input[type="search"] { flex: 1 1 calc(100% - 30px); }
  .qbar .qbar-range { flex: 1 1 auto; min-width: 0; }
}

.review-tools { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.review-table { max-height: 60vh; }
.review-row.is-flagged td { background: color-mix(in srgb, var(--warning-bg) 45%, transparent); }
.review-row.is-refused td { background: var(--danger-bg); }
.review-row.is-refused label { text-decoration: line-through; color: var(--ink-muted); }
.review-extra details + details { margin-top: var(--space-2); }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-4); }
.review-actions .text-meta { margin-right: auto; }

/* Audit trail: what exactly changed --------------------------------------------------------------------------------- */
.audit-changes { margin: var(--space-2) 0; }
.audit-changes > summary { cursor: pointer; color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.chg { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); background: var(--surface); }
.chg-head { margin: 0 0 var(--space-1); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.chg-action { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.chg-action.is-created, .chg-action.is-restored { color: var(--success-ink); }
.chg-action.is-deleted { color: var(--danger-ink); }
.chg-fields { width: 100%; border-collapse: collapse; font-size: 13px; }
.chg-fields th, .chg-fields td { text-align: left; vertical-align: top; padding: 4px 8px 4px 0; border-top: 1px solid var(--surface-line); }
.chg-fields thead th { border-top: 0; font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .03em; }
.chg-fields tbody th { font-weight: 600; white-space: nowrap; }
.chg-before { color: var(--danger-ink); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger-ink) 50%, transparent); }
.chg-after { color: var(--success-ink); font-weight: 600; }
.chg-plus { color: var(--success-ink); font-weight: 700; font-size: 12px; }
.chg-minus { color: var(--danger-ink); font-weight: 700; font-size: 12px; }
.chg-values { list-style: none; margin: 2px 0 0; padding: 0; max-height: 220px; overflow: auto; }
.chg-values li { font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }

/* Install policy --------------------------------------------------------------------------------------------- */
.install-sheet { display: flex; justify-content: center; padding: var(--space-2) 0 var(--space-6); }
.install-dialog { width: 100%; max-width: 1100px; padding: 0; overflow: hidden; border-radius: var(--radius-card); box-shadow: 0 24px 60px -28px rgba(8, 22, 40, 0.45); }
.install-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-4); border-bottom: 1px solid var(--surface-line); }
.install-mark { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(165deg, var(--brand-teal-strong), var(--brand-navy)); color: var(--on-brand); }
.install-mark .i { width: 22px; height: 22px; }
.install-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 800; color: var(--heading); }
.install-close { margin-left: auto; }
.install-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.install-changes { padding: var(--space-4) var(--space-6); min-width: 0; border-right: 1px solid var(--surface-line); }
.install-changes .audit-changes > summary { display: none; }
.install-changes-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.install-sub { margin: 0; font-size: 14px; font-weight: 800; color: var(--heading); }
.install-checks { padding: var(--space-4) var(--space-5); background: var(--surface-sunken); }
.install-steps { margin: var(--space-3) 0 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: var(--space-3); }
.install-steps li { counter-increment: step; display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--space-2); font-size: 13px; }
.install-steps li::before { content: counter(step); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--success-ink); font-size: 12px; font-weight: 800; }
.install-steps li span { color: var(--ink-muted); font-size: 12px; }
.install-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--surface-line); }
.install-note { flex: 1 1 360px; margin: 0; }
.install-actions { display: flex; gap: var(--space-2); margin-left: auto; }
@media (max-width: 899.98px) {
  .install-body { grid-template-columns: minmax(0, 1fr); }
  .install-changes { border-right: 0; border-bottom: 1px solid var(--surface-line); }
  .install-head, .install-changes, .install-foot { padding-left: var(--space-4); padding-right: var(--space-4); }
}
.chg-fields { table-layout: fixed; }
.chg-fields col.chg-col-field { width: 170px; }

/* ==========================================================================
   Lists (Policy, Requests and Reports pages): a toolbar over one table with
   folding sections, row selection, a right-click menu and a footer; edit pages
   are a form with a "Select entries" panel beside it. Markup: _list.html;
   behaviour: js/list.js.
   ========================================================================== */
.fl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.fl-head h1 { margin: 0; }
.fl-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.fl-pending { font-size: 13px; color: var(--warning-ink); }
.fl-pending a { font-weight: 700; }
.fl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: var(--space-3); }
.fl-toolbar .btn { min-height: 32px; padding: 5px 11px; font-size: 13px; font-weight: 600; border-radius: 7px; gap: 6px; box-shadow: none; }
.fl-toolbar .btn-secondary { --btn-border: var(--surface-line); }
.fl-toolbar .btn .i { width: 15px; height: 15px; }
.fl-spacer { margin-left: auto; }
.fl-search { display: inline-flex; align-items: center; gap: 7px; height: var(--control-h); width: min(280px, 100%); padding: 0 9px; border-radius: 7px; border: 1px solid var(--surface-line); background: var(--surface); color: var(--ink-muted); }
.fl-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); outline: none; padding: 0; min-height: 0; box-shadow: none; }
.fl-search .i { width: 15px; height: 15px; }
.fl-seg { display: inline-flex; border: 1px solid var(--surface-line); border-radius: 7px; overflow: hidden; background: var(--surface); }
.fl-seg a, .fl-seg button { display: inline-flex; align-items: center; height: 30px; min-height: 30px; padding: 0 11px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: 600 13px/1 var(--font-sans); text-decoration: none; cursor: pointer; box-shadow: none; }
.fl-seg [aria-current="page"], .fl-seg [aria-pressed="true"], .fl-seg [aria-checked="true"] { background: var(--heading); color: var(--surface); }
.fl-card { position: relative; background: var(--surface); border: 1px solid var(--surface-line); border-radius: 8px; }
.fl-scroll { overflow-x: auto; }
.fl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fl-table th, .fl-table td { padding: 0 10px; height: 32px; border-bottom: 1px solid var(--surface-line); white-space: nowrap; vertical-align: middle; }
.fl-table thead th { height: 34px; background: var(--surface-sunken); font-size: 12px; font-weight: 700; letter-spacing: 0; color: var(--ink-muted); border-radius: 0 !important; }
.fl-table td.fl-wrap, .fl-table th.fl-wrap { white-space: normal; }
.fl-table .fl-check { width: 34px; padding-right: 0; }
.fl-table .fl-num { text-align: right; font-variant-numeric: tabular-nums; }
.fl-table .fl-id { color: var(--ink-muted); width: 44px; }
.fl-table .fl-name { font-weight: 700; color: var(--ink); }
.fl-table .i { width: 14px; height: 14px; vertical-align: -2px; color: var(--ink-muted); }
.fl-table tr.fl-row { cursor: default; }
.fl-table tr.fl-row:hover > td { background: var(--surface-sunken); }
.fl-table tr.fl-row.is-selected > td { background: var(--info-bg); }
.fl-table tr.fl-row.is-match > td { background: var(--success-bg); }
.fl-table tr.fl-row.is-match > td:first-child { box-shadow: inset 3px 0 0 var(--success-line); }
.fl-table tr.fl-row.is-off > td { color: var(--ink-faint); }
.fl-table tr.fl-row.is-locked > td { color: var(--ink-muted); }
.fl-table tr.fl-section > td { height: 34px; background: var(--neutral-bg); font-size: 13px; }
.fl-table tr.fl-section button { display: inline-flex; align-items: center; gap: 8px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--heading); font: 700 13px/1.4 var(--font-sans); cursor: pointer; box-shadow: none; }
.fl-table tr.fl-section button .i { color: var(--ink-muted); transition: transform 0.15s var(--ease); }
.fl-table tr.fl-section[data-folded] button .i { transform: rotate(-90deg); }
.fl-table tr.fl-section .fl-count, .fl-table tr.fl-section .fl-meta { font-weight: 500; color: var(--ink-muted); }
.fl-table tr.fl-section .fl-meta { font-size: 12px; margin-left: 6px; }
.fl-table.is-sequence tr.fl-section { display: none; }
.fl-table tr.fl-empty > td { color: var(--ink-muted); }
.fl-obj { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; }
.fl-obj a { color: inherit; }
.fl-act { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.fl-act.is-allow { color: var(--success-ink); }
.fl-act.is-block { color: var(--danger-ink); }
.fl-act.is-enforce, .fl-act.is-warn { color: var(--info-ink); }
.fl-act .i { color: currentColor !important; }
.fl-dot { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--warning-line); vertical-align: middle; }
.fl-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.fl-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fl-state.is-ok { color: var(--success-ink); }
.fl-state.is-warn { color: var(--warning-ink); }
.fl-state.is-bad { color: var(--danger-ink); }
.fl-state.is-info { color: var(--info-ink); }
.fl-state.is-off { color: var(--ink-muted); }
.fl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 12px; color: var(--ink-muted); }
.fl-menu { position: fixed; z-index: 95; width: 220px; padding: 4px; background: var(--surface-raised); border-radius: 8px; box-shadow: 0 12px 28px -10px rgba(16, 32, 52, 0.35), 0 0 0 1px var(--surface-line); }
.fl-menu[hidden] { display: none; }
.fl-menu button { display: flex; width: 100%; align-items: center; gap: 8px; min-height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: 500 13px/1.3 var(--font-sans); text-align: left; cursor: pointer; box-shadow: none; }
.fl-menu button:hover, .fl-menu button:focus-visible { background: var(--info-bg); }
.fl-menu button:disabled { opacity: 0.45; }
.fl-menu button.is-danger { color: var(--danger-ink); }
.fl-menu .i { width: 14px; height: 14px; color: var(--ink-muted); }
.fl-menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--surface-line); }
.fl-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: var(--space-3); border-radius: 8px; font-size: 13px; border: 1px solid transparent; }
.fl-banner.is-success { background: var(--success-bg); color: var(--success-ink); }
.fl-banner.is-info { background: var(--info-bg); color: var(--info-ink); }
.fl-banner.is-danger { background: var(--danger-bg); color: var(--danger-ink); }
.fl-banner.is-warning { background: var(--warning-bg); color: var(--warning-ink); }
.fl-banner .fl-banner-end { margin-left: auto; font-weight: 700; }
.fl-banner details { flex-basis: 100%; }
.fl-banner ol { margin: 6px 0 0; padding-left: 18px; color: var(--ink); }
/* Edit pages */
.fl-split { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-start; }
.fl-form-card { flex: 1 1 620px; min-width: 0; background: var(--surface); border: 1px solid var(--surface-line); border-radius: 8px; }
.fl-form-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--surface-line); }
.fl-form-head h2 { margin: 0; font-size: 14px; color: var(--heading); }
.fl-form-head .text-meta { font-size: 12px; }
.fl-form-body { padding: 6px 16px 8px; max-width: 900px; }
.fl-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--surface-line); background: var(--surface-sunken); border-radius: 0 0 8px 8px; }
.fl-row-field { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 38px; padding: 2px 0; }
.fl-row-field > .fl-label { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.fl-row-field .help-text { margin: 4px 0 0; font-size: 12px; }
.fl-row-field input[type="text"], .fl-row-field input[type="time"], .fl-row-field select, .fl-row-field textarea { min-height: var(--control-h); font-size: 13px; }
.fl-row-field input[type="text"].is-medium { max-width: 360px; }
.fl-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: var(--control-h); max-width: 600px; box-sizing: border-box; padding: 3px 4px; border-radius: 7px; border: 1px solid var(--field-border); background: var(--field-bg); }
.fl-picker.is-active { border-color: var(--info-line); box-shadow: 0 0 0 3px var(--info-bg); }
.fl-token { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 5px 0 7px; border-radius: 5px; background: var(--surface-sunken); font-size: 12px; }
.fl-token .i { width: 13px; height: 13px; color: var(--ink-muted); }
.fl-token button { min-height: 0; padding: 0 2px; border: 0; background: transparent; color: var(--ink-muted); font-size: 14px; line-height: 1; cursor: pointer; box-shadow: none; }
.fl-picker-empty { font-size: 13px; color: var(--ink-faint); padding-left: 4px; }
.fl-picker-add { margin-left: auto; width: 22px; height: 22px; min-height: 22px; padding: 0; border-radius: 6px; border: 1px dashed var(--field-border); background: var(--surface); color: var(--accent-ink); font: 700 14px/1 var(--font-sans); cursor: pointer; box-shadow: none; }
.fl-entries { flex: 0 0 340px; max-width: 100%; background: var(--surface); border: 1px solid var(--surface-line); border-radius: 8px; display: flex; flex-direction: column; }
.fl-entries[hidden] { display: none; }
.fl-entries-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--surface-line); }
.fl-entries-head strong { color: var(--heading); }
.fl-entries-tools { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; }
.fl-entries-tools .fl-search { width: 100%; box-sizing: border-box; }
.fl-entry { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 14px; border-top: 1px solid var(--surface-line); font-size: 13px; cursor: pointer; }
.fl-entry:hover { background: var(--surface-sunken); }
.fl-entry:has(input:checked) { background: var(--info-bg); }
.fl-entry input { margin: 0; }
.fl-entry .fl-entry-name { flex: 1; min-width: 0; }
.fl-entry .text-meta { font-size: 12px; }
.fl-entries-note { margin: 0; padding: 12px 14px; border-top: 1px solid var(--surface-line); font-size: 12px; color: var(--ink-muted); }
.fl-days { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.fl-dialog .modal-body .fl-row-field { grid-template-columns: 110px minmax(0, 1fr); }
.fl-dialog ul, .fl-dialog ol { padding-left: 18px; }
.fl-changes { margin: 0; padding: 0; list-style: none; }
.fl-changes li { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--surface-line); font-size: 13px; }
.fl-changes .is-created { color: var(--success-ink); font-weight: 700; }
.fl-changes .is-changed, .fl-changes .is-restored { color: var(--warning-ink); font-weight: 700; }
.fl-changes .is-deleted { color: var(--danger-ink); font-weight: 700; }
@media (max-width: 720px) {
  .fl-row-field, .fl-dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .fl-row-field > .fl-label { padding-top: 0; }
  .fl-entries { flex-basis: 100%; }
}
dialog.modal.fl-dialog.is-wide { width: min(720px, calc(100vw - 32px)); }
.fl-fieldset { border: 0; margin: 0; min-width: 0; }
.fl-after { margin-top: var(--space-4); }
.fl-picker-static { margin-bottom: 6px; }
.fl-inline-form { display: inline; }
.fl-table a.fl-name { text-decoration: none; }
.fl-table a.fl-name:hover { text-decoration: underline; }
.fl-table td.fl-wrap { min-width: 9rem; }
.fl-row-field input[type="text"], .fl-row-field textarea { width: 100%; max-width: 560px; box-sizing: border-box; }
.fl-row-field .fl-days, .fl-row-field > div > label.checkbox:first-child { min-height: var(--control-h); display: flex; align-items: center; }
.fl-row-field .fl-days { flex-wrap: wrap; }
.fl-entries a.fl-entry { text-decoration: none; color: var(--ink); }
.fl-pad { padding: var(--space-4); }
.queue-list .fl-table tr.fl-row[data-href] { cursor: pointer; }
.audit-table td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; height: auto; }
.audit-table .audit-changes { margin-top: 4px; }
.fl-table td.fl-namecell { min-width: 11rem; max-width: 20rem; }
.fl-menu button { justify-content: flex-start; }
.fl-search input[type="search"], .fl-search input[type="text"] { height: 28px; min-height: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }

/* ==========================================================================
   One look in every browser. Checkboxes, radio buttons and dropdowns are drawn here rather than by the
   browser; search boxes lose the browser's own clear button; scrollbars are thin and themed; forms keep their
   OK / Save bar in view (.action-bar, .fl-form-foot).
   ========================================================================== */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; appearance: none;
  display: inline-grid; place-content: center; flex: none;
  width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -3px;
  border: 1.5px solid var(--field-border); border-radius: 4px; background: var(--field-bg);
  transition: background-color 0.12s var(--ease), border-color 0.12s var(--ease);
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: ""; width: 9px; height: 9px; transform: scale(0); transition: transform 0.1s var(--ease);
  background: var(--btn-primary-ink); clip-path: polygon(14% 44%, 0 62%, 40% 100%, 100% 22%, 84% 6%, 38% 66%);
}
input[type="radio"]::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; transform: scale(0); transition: transform 0.1s var(--ease);
  background: var(--btn-primary-ink);
}
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:indeterminate { background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); }
input[type="checkbox"]:indeterminate::before { transform: scale(1); clip-path: none; height: 2px; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 0.5; cursor: not-allowed; }
select:not([multiple]), .select {
  -webkit-appearance: none; appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366707c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px 12px;
}
:root[data-theme="dark"] select:not([multiple]), :root[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a7b4c2' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) select:not([multiple]), :root:not([data-theme="light"]) .select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a7b4c2' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  }
}
select::-ms-expand { display: none; }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
input[type="time"]::-webkit-calendar-picker-indicator, input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.55; cursor: pointer; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
* { scrollbar-width: thin; scrollbar-color: var(--field-border) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--field-border); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
button, input, select, textarea { font-family: var(--font-sans); }

/* The bar holding a form's OK / Save / Approve stays at the bottom of the window while the form scrolls. */
.action-bar, .fl-form-foot {
  position: sticky; bottom: var(--footer-h); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  padding: 8px var(--space-4); margin: 0;
  background: var(--surface); border-top: 1px solid var(--surface-line);
  box-shadow: 0 -8px 16px -12px rgba(16, 32, 52, 0.35);
}
.action-bar .text-meta, .fl-form-foot .text-meta { font-size: 12px; }
.card > .action-bar:last-child { margin: var(--space-4) calc(-1 * var(--space-5)) calc(-1 * var(--space-5)); border-radius: 0 0 var(--radius-card-dense) var(--radius-card-dense); }

/* Help in an (i) beside a label: the sentence shows on hover or keyboard focus. */
.hint { position: relative; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 4px; vertical-align: -2px;
  border: 1.3px solid var(--ink-faint); border-radius: 50%; color: var(--ink-muted); font: 700 11px/1 var(--font-sans); cursor: help; }
.hint::after { content: attr(data-hint); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 60;
  width: max-content; max-width: 280px; padding: 6px 9px; border-radius: 6px; background: var(--heading); color: var(--surface);
  font: 500 12px/16px var(--font-sans); text-transform: none; letter-spacing: 0; white-space: normal; text-align: left;
  display: none; pointer-events: none; }
.hint:hover::after, .hint:focus-visible::after, .hint:focus::after { display: block; }

/* Header: "Not installed · Install policy" replaces the banner that sat on every page. */
.appbar-chip.is-warning .appbar-chip-action { margin-left: 6px; padding-left: 6px; border-left: 1px solid currentColor; font-weight: 800; }

.fl-row-pair { grid-template-columns: 124px minmax(0, 300px) 96px minmax(0, 1fr); }
@media (max-width: 760px) { .fl-row-pair { grid-template-columns: 124px minmax(0, 1fr); } }
@media (max-width: 560px) { .fl-row-field, .fl-row-pair { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
/* Segmented choice: radio buttons drawn as one bar of options. */
.seg { display: inline-flex; border: 1px solid var(--field-border); border-radius: var(--radius-field); overflow: hidden; flex: none; }
.seg label { display: inline-flex; align-items: center; height: calc(var(--control-h) - 2px); padding: 0 12px; margin: 0; font-size: 12px; font-weight: 600;
  cursor: pointer; background: var(--field-bg); color: var(--ink); border-left: 1px solid var(--field-border); }
.seg label:first-child { border-left: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.seg label:has(input:checked) { background: var(--heading); color: var(--surface); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.seg label:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
/* Schedule: the days and hours show only when "Only on" is picked. */
.sched { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sched-detail { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sched:has(input[value="always"]:checked) .sched-detail { display: none; }
.day-chip { display: inline-grid; place-items: center; width: 28px; height: 26px; margin: 0; border-radius: 5px; background: var(--surface-sunken);
  font-size: 12px; font-weight: 700; cursor: pointer; }
.day-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.day-chip:has(input:checked) { background: var(--heading); color: var(--surface); }
.day-chip:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.time-in { width: 64px !important; text-align: center; font-variant-numeric: tabular-nums; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.toggle-track { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--field-border); flex: none; transition: background-color 0.12s var(--ease); }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left 0.12s var(--ease); }
.toggle:has(input:checked) .toggle-track { background: var(--btn-primary-bg); }
.toggle:has(input:checked) .toggle-track::after { left: 14px; }
.toggle:has(input:focus-visible) .toggle-track { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.fl-title-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 var(--space-3); }
.fl-title-line .page-title { margin: 0; }
.fl-title-line .text-meta { font-size: 12px; }

/* Logs: one summary line, one line per record. */
.fl-compact-head { align-items: center; margin-bottom: var(--space-3); }
.fl-compact-head .fl-title-line { margin: 0; }
.log-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 6px var(--space-4); margin: 0 0 var(--space-3);
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); font-size: 12px; }
.log-sum-item { white-space: nowrap; color: var(--ink); text-decoration: none; }
a.log-sum-item:hover b { text-decoration: underline; }
.log-sum-item b { color: var(--heading); font-variant-numeric: tabular-nums; }
.log-sum-item.is-ok b { color: var(--success-ink); } .log-sum-item.is-bad b { color: var(--danger-ink); } .log-sum-item.is-info b { color: var(--info-ink); }
.log-sum-item.is-warn b { color: var(--warning-ink); }
.log-sum-hist { margin-left: auto; display: inline-block; width: 220px; height: 26px; }
.log-sum-hist svg { width: 100%; height: 26px; display: block; }
.log-table td { white-space: nowrap; }
.log-table td.log-ellipsis { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.log-table .log-time { color: var(--ink); text-decoration: none; font-size: 12px; }
.log-table .badge { font-size: 11px; }
.log-search .qbar { min-height: 0; }
.log-search-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 4px 0 var(--space-3); }

/* Service health: warnings first, a slim server strip, services as a grid of one-line cells. */
.health-warnings { display: flex; align-items: flex-start; gap: 10px; padding: 8px var(--space-4); margin: 0 0 var(--space-3);
  border: 1px solid var(--warning-line); border-radius: var(--radius-card-dense); background: var(--warning-bg); color: var(--warning-ink); font-size: 12px; }
.health-warnings > .i { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.health-warnings > div { flex: 1; min-width: 0; }
.health-warnings ul { margin: 2px 0 0; padding-left: 16px; columns: 2 320px; column-gap: 24px; }
.health-warnings li { margin: 1px 0; break-inside: avoid; }
.health-warnings .btn { flex: none; }
.server-strip > div { padding: 8px var(--space-4); gap: 3px; }
.server-metric-value { font-size: 16px; line-height: 22px; }
.server-icon { width: 32px; height: 32px; border-radius: 8px; }
.svc-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; margin-bottom: var(--space-3); background: var(--surface);
  border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); overflow: hidden; }
.svc-cell { display: flex; align-items: center; gap: 8px; min-width: 0; height: 32px; padding: 0 12px; border-right: 1px solid var(--surface-line); border-bottom: 1px solid var(--surface-line); margin: 0 -1px -1px 0; }
.svc-cell .svc-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-cell .svc-state { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--success-ink); white-space: nowrap; }
.svc-cell.is-down { background: var(--danger-bg); } .svc-cell.is-down .svc-state { color: var(--danger-ink); }
.health-tables { align-items: start; }
@media (min-width: 1100px) { .grid-2.health-tables { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.health-tables > .card { margin: 0; }
.section-head { margin-bottom: 6px; }

/* Request detail: the decision first, the request's facts in a narrow panel beside it. */
.req-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-4); align-items: start; }
.req-main { min-width: 0; }
.req-side { position: sticky; top: calc(var(--appbar-h) + 12px); margin: 0; padding: var(--space-3) var(--space-4); }
.req-side .kv { grid-template-columns: 96px minmax(0, 1fr); font-size: 12px; }
@media (max-width: 1100px) { .req-split { grid-template-columns: minmax(0, 1fr); } .req-side { position: static; order: -1; } }
.decide-actions.action-bar { margin: var(--space-3) calc(-1 * var(--space-4)) 0; padding-left: var(--space-4); padding-right: var(--space-4); }
.domain-block .card-section { padding-top: var(--space-3); margin-top: var(--space-3); }

/* Member editors: one list with a type filter, one Add line; paste and import open a window. */
.fl-members-tools { padding: 8px var(--space-4); margin: 0; border-top: 1px solid var(--surface-line); }
.fl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-sunken);
  color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.fl-chip span { color: var(--ink-muted); font-weight: 700; }
.fl-chip.is-on { background: var(--heading); color: var(--surface); } .fl-chip.is-on span { color: var(--surface); opacity: 0.85; }
.fl-form-card .fl-scroll { border-top: 1px solid var(--surface-line); }
.fl-form-card > .action-bar { border-radius: 0 0 var(--radius-card-dense) var(--radius-card-dense); }
.fl-results { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; border: 1px solid var(--surface-line); border-radius: var(--radius-field); }
.fl-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 10px; border-top: 1px solid var(--surface-line); font-size: 12px; }
.fl-result:first-child { border-top: 0; }
.fl-dialog-sub { margin: var(--space-3) 0 6px; font-size: 13px; color: var(--heading); }
.file-pick { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.file-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-pick:focus-within .btn { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.fl-form-card .cell-strong { font-weight: 700; }
.fl-scroll-cap { max-height: 60vh; overflow-y: auto; }
.fl-ip-in { width: 200px !important; }
.fl-form-body > .fl-row-field .fl-days form.fl-days { display: inline-flex; gap: 8px; }

/* ==========================================================================
   Settings pages and Web safety in the compact list and form style; the Dashboard on one 12-column grid.
   ========================================================================== */
.num-in { width: 80px !important; text-align: right; font-variant-numeric: tabular-nums; }
.unit-in { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); }
.set-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 7px var(--space-4); margin: 0 0 var(--space-3);
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); font-size: 12px; }
.set-strip > strong { color: var(--heading); font-size: 13px; }
svg.set-meter { width: 120px; height: 6px; flex: none; }
.set-overview td { vertical-align: middle; }
.set-overview .set-sec td { padding: 6px 12px; background: var(--surface-sunken); font-size: 12px; font-weight: 700; color: var(--heading); }
.set-overview .set-sec span { color: var(--ink-muted); font-weight: 600; }
.set-area-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.set-area-name .i { width: 15px; height: 15px; color: var(--accent); }
.set-area-text { font-size: 12px; }
.set-card { padding: 0 var(--space-4); margin: 0 0 var(--space-3); }
.set-card > .action-bar:last-child { margin: var(--space-2) calc(-1 * var(--space-4)) 0; border-radius: 0 0 var(--radius-card-dense) var(--radius-card-dense); }
.set-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 38px; margin: 0 calc(-1 * var(--space-4)) 6px;
  padding: 0 var(--space-4); border-bottom: 1px solid var(--surface-line); }
.set-card-head > .status-chip:last-child { margin-left: auto; }
.set-card-title { margin: 0; font-size: 14px; color: var(--heading); display: inline-flex; align-items: center; }
.set-sub { margin: var(--space-4) 0 6px; font-size: 14px; color: var(--heading); }
.set-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 6px 0 10px; }
.set-inline > .fl-label { font-size: 12px; font-weight: 600; white-space: nowrap; }
.set-inline-tight { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.set-grow { flex: 1 1 320px; min-width: 0; }
.set-pw { flex: 0 1 220px; min-width: 0; }
.set-role { width: 120px; }
.set-host { width: 220px !important; }
.set-div-in { width: 220px; }
.set-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 32px; padding-bottom: 6px; }
.set-col { min-width: 0; }
.set-col-title { margin: 6px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.set-form .set-col-title + .fl-row-field { margin-top: 0; }
.set-form .set-col-title:not(:first-of-type) { padding-top: 8px; border-top: 1px solid var(--surface-line); }
.set-hostport { display: flex; align-items: center; gap: 6px; }
.set-hostport > input:first-child { flex: 1; min-width: 0; }
.set-port { width: 72px !important; }
.set-nets { min-height: var(--control-h); resize: vertical; field-sizing: content; max-width: 640px; }
.set-roles td { vertical-align: middle; }
.set-roles td:first-child { width: 120px; white-space: nowrap; }
.set-roles td:last-child { width: 130px; }
.dn-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px 0; }
.dn-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 24px; padding: 0 4px 0 8px; margin: 0; border-radius: 6px;
  background: var(--surface-sunken); font-size: 12px; }
.dn-chip .i { width: 13px; height: 13px; color: var(--ink-muted); flex: none; }
.dn-chip .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-chip button { border: 0; background: none; color: var(--ink-muted); font-size: 15px; line-height: 1; padding: 0 4px; cursor: pointer; border-radius: 4px; }
.dn-chip button:hover:not(:disabled) { color: var(--danger-ink); background: var(--danger-bg); }
.dn-chip button:disabled { opacity: 0.35; cursor: not-allowed; }
.set-check { margin-top: var(--space-3); }
.set-check > input[type="text"] { width: 240px; }
.set-check-result { font-size: 12px; }
.set-manual { margin-top: var(--space-3); font-size: 12px; }
.set-manual summary { cursor: pointer; color: var(--link, var(--accent)); }
.set-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 7px var(--space-4); margin: 0 0 var(--space-3);
  border-radius: var(--radius-card-dense); font-size: 12px; border: 1px solid; }
.set-note.is-danger { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-line); }
.set-note.is-info { background: var(--info-bg); color: var(--info-ink); border-color: var(--info-line); }
.set-note .text-meta { margin-left: auto; }
.set-note-text { min-width: 0; }
.fl-toolbar .set-inline-tight .btn { min-height: 32px; }
.fl-toolbar .hint { margin-left: 2px; }
.ws-table td:nth-child(3), .ws-table td:nth-child(4) { white-space: nowrap; }

/* Dashboard (staff): totals strip, then cards on one 12-column grid; cards in a row share their height. */
.dash-totals { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 var(--space-3); background: var(--surface);
  border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); overflow: hidden; }
.dash-total { min-width: 0; padding: 7px var(--space-4); border-left: 1px solid var(--surface-line); }
.dash-total:first-child { border-left: 0; }
.dash-total-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
.dash-total-label .i { width: 13px; height: 13px; }
.dash-total-value { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.dash-total-value strong { font-size: 20px; line-height: 28px; color: var(--heading); font-variant-numeric: tabular-nums; }
.dash-total-value span, .dash-total-value a { font-size: 11px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-total-value a { color: var(--accent); font-weight: 700; }
@media (max-width: 1100px) { .dash-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-total:nth-child(4) { border-left: 0; }
  .dash-total:nth-child(n+4) { border-top: 1px solid var(--surface-line); } }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-3); align-items: stretch; }
.dash-card { grid-column: span 4; min-width: 0; display: flex; flex-direction: column; margin: 0; background: var(--surface);
  border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); overflow: hidden; }
.dash-card.is-8 { grid-column: span 8; }
.dash-card-head { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-bottom: 1px solid var(--surface-line); flex: none; }
.dash-card-head h2 { margin: 0; font-size: 13px; color: var(--heading); }
.dash-card-head .text-meta { margin-left: auto; font-size: 11px; white-space: nowrap; }
.dash-card-head .dash-card-total { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--heading); }
.dash-card-head .dash-card-total + .text-meta { margin-left: 0; }
.dash-card-body { flex: 1; min-width: 0; }
.dash-card table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dash-card th { height: 26px; padding: 0 12px; font-size: 11px; font-weight: 700; color: var(--ink-muted); text-align: left; background: var(--surface-sunken);
  border-bottom: 1px solid var(--surface-line); }
.dash-card td { height: 27px; padding: 0 12px; font-size: 12px; border-bottom: 1px solid var(--surface-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-card tr:last-child td { border-bottom: 0; }
.dash-card .num { text-align: right; font-variant-numeric: tabular-nums; width: 76px; }
.dash-card .dash-empty { padding: 10px 12px; font-size: 12px; color: var(--ink-muted); }
.dash-need { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 12px; border-bottom: 1px solid var(--surface-line); }
.dash-need:last-child { border-bottom: 0; }
.dash-need .task-icon { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.dash-need .task-icon .i { width: 14px; height: 14px; }
.dash-need strong { font-size: 12px; white-space: nowrap; }
.dash-need .text-meta { font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-need .btn { margin-left: auto; flex: none; }
.dash-kv { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; padding: 0 12px; }
.dash-kv > dt, .dash-kv > dd { margin: 0; min-height: 28px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--surface-line); font-size: 12px; }
.dash-kv > dt { color: var(--ink-muted); }
.dash-kv > dt:nth-last-child(2), .dash-kv > dd:last-child { border-bottom: 0; }
.dash-kv svg.meter-bar { flex: 1; height: 6px; }
.dash-kv .dash-pct { width: 36px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-kv a { font-weight: 700; }
@media (max-width: 1100px) { .dash-card, .dash-card.is-8 { grid-column: span 6; } }
@media (max-width: 760px) { .dash-card, .dash-card.is-8 { grid-column: 1 / -1; } .dash-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.text-warning { color: var(--warning-ink); }
.dash-kv .badge { font-size: 11px; }
.dash-kv svg.meter-bar { width: auto; flex: 1 1 auto; min-width: 0; }
.fl-row-field > .fl-label, .set-inline > .fl-label { margin: 0; display: inline-flex; align-items: center; }
.fl-row-field input[type="email"], .fl-row-field input[type="password"], .fl-row-field input[type="url"],
.fl-row-field input[type="number"]:not(.num-in) { width: 100%; min-height: var(--control-h); font-size: 13px; }
.set-roles td:last-child { padding-right: 12px; }

/* ==========================================================================
   One header on the four Policy tabs; one line per row in the lists (the grey second line became a column,
   a tag on the same line, or a hover text); Reports shows one report at a time.
   ========================================================================== */
.pol-head { display: flex; align-items: center; gap: 12px; min-height: 32px; margin: 0 0 6px; }
.pol-head .page-title { margin: 0; white-space: nowrap; }
.pol-head-meaning { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pol-head-state { flex: none; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.pol-head-state.is-pending { color: var(--warning-ink); }
.pol-head-state a { font-weight: 700; }
.pol-head .btn { flex: none; }
.pol-head + .layer-tabs { margin-bottom: var(--space-3); }
@media (max-width: 760px) { .pol-head { flex-wrap: wrap; } .pol-head-meaning { flex-basis: 100%; order: 3; } }
/* One line per row: cells never wrap; a long text ends with … and shows in full on hover (title). */
.fl-table.is-oneline td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.fl-table.is-oneline td.fl-check, .fl-table.is-oneline td.fl-num { max-width: none; }
.fl-table.is-oneline { table-layout: fixed; }
.fl-desc { color: var(--ink-muted); }
.fl-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--surface-sunken); color: var(--ink-muted);
  font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; }
.fl-tag.is-info { background: var(--info-bg); color: var(--info-ink); } .fl-tag.is-ok { background: var(--success-bg); color: var(--success-ink); }
.fl-tag.is-warn { background: var(--warning-bg); color: var(--warning-ink); } .fl-tag.is-bad { background: var(--danger-bg); color: var(--danger-ink); }
.fl-when { font-variant-numeric: tabular-nums; } .fl-when .fl-ago { color: var(--ink-muted); font-size: 11.5px; }
.col-check { width: 36px; }
/* List pages: the title and its meaning on one line (full meaning on hover). */
.fl-head > div:first-child { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1 1 400px; }
.fl-head > div:first-child .page-title { white-space: nowrap; }
.fl-head > div:first-child .page-subtitle { margin: 0; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Request queue: the request's facts as one label column and their values beside it. */
.queue-kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 0; margin: 0 0 var(--space-3); font-size: 12.5px; }
.queue-kv > dt, .queue-kv > dd { margin: 0; padding: 5px 0; border-bottom: 1px solid var(--surface-line); }
.queue-kv > dt { color: var(--ink-muted); font-weight: 500; }
.queue-kv > dd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-kv > dd.queue-reason { white-space: normal; }
.approvals-table.is-oneline { table-layout: fixed; width: 100%; }
.approvals-table.is-oneline td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; height: 32px; padding-top: 4px; padding-bottom: 4px; vertical-align: middle; }
.approvals-table.is-oneline td.actions { overflow: visible; max-width: none; }
.approvals-table.is-oneline .cell-actions { flex-wrap: nowrap; justify-content: flex-end; }
.approvals-table.is-oneline .obj { margin-right: 4px; }
/* Audit trail: one line per record; "N items ›" opens the before / after in the row underneath. */
.fl-linkbtn { border: 0; background: none; padding: 0; margin: 0; min-height: 0; height: auto; line-height: inherit; vertical-align: baseline; box-shadow: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--link, var(--accent)); cursor: pointer; }
.fl-linkbtn:hover { text-decoration: underline; }
.audit-chg-row > td { white-space: normal !important; max-width: none !important; background: var(--surface-sunken); padding: 6px 12px 10px; }
.audit-chg-row .audit-changes > summary { display: none; }
.audit-days > .fl-card > .fl-foot { align-items: center; }
.audit-days .fl-foot .pagination { margin: 0; }
/* Metrics and alerts: one strip of six sparklines; events and rules one line each. */
.spark-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 var(--space-3); background: var(--surface);
  border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); overflow: hidden; }
.spark { margin: 0; min-width: 0; padding: 6px 12px 4px; border-left: 1px solid var(--surface-line); }
.spark:first-child { border-left: 0; }
.spark figcaption { display: flex; flex-direction: column; gap: 0; }
.spark-title { font-size: 11px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark-figures strong { font-size: 18px; line-height: 24px; color: var(--heading); font-variant-numeric: tabular-nums; }
.spark-figures .text-meta { font-size: 11px; }
.spark-chart { display: block; width: 100%; height: 24px; }
.spark-empty { margin: 4px 0; font-size: 11px; }
@media (max-width: 1100px) { .spark-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .spark:nth-child(4) { border-left: 0; } }
table.is-oneline-plain { table-layout: fixed; width: 100%; }
table.is-oneline-plain td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; height: 32px; padding-top: 3px; padding-bottom: 3px; vertical-align: middle; }
table.is-oneline-plain td .hint { vertical-align: -2px; }
table.is-oneline-plain td:has(.hint) { overflow: visible; }
.set-note.is-warn { background: var(--warning-bg); color: var(--warning-ink); border-color: var(--warning-line); }
.set-note .alert-body { margin: 0; }
.review-line strong { color: var(--heading); font-variant-numeric: tabular-nums; }
.review-actions.action-bar { justify-content: flex-end; border-radius: var(--radius-card-dense); }
/* Reports: one report at a time under a tab bar; one range line; totals in a strip; one 27 px row per bar. */
.seg-links { display: inline-flex; border: 1px solid var(--field-border); border-radius: var(--radius-field); overflow: hidden; }
.seg-links a { display: inline-flex; align-items: center; height: calc(var(--control-h) - 2px); padding: 0 11px; font-size: 12px; font-weight: 600;
  color: var(--ink); text-decoration: none; border-left: 1px solid var(--field-border); background: var(--field-bg); }
.seg-links a:first-child { border-left: 0; }
.seg-links a[aria-current="true"] { background: var(--heading); color: var(--surface); }
.report-range-bar .fl-label { font-size: 12px; font-weight: 600; }
.report-date { width: 150px !important; min-height: var(--control-h); }
.report-sep { width: 1px; height: 20px; background: var(--surface-line); }
.reports-page .card { padding: var(--space-3) var(--space-4); }
.reports-page .card.card-flush { padding: 0; }
.reports-page .card-header { min-height: 36px; margin-bottom: var(--space-2); }
.reports-page .exec-summary { margin: 0 0 var(--space-3); padding: 7px 12px; font-size: 12.5px; }
.reports-page .kpi-row, .reports-page .kpi-row.is-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 0 0 var(--space-3);
  border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); overflow: hidden; background: var(--surface); }
.reports-page .kpi-tile { padding: 7px 14px; margin: 0; border: 0; border-left: 1px solid var(--surface-line); border-radius: 0; box-shadow: none; background: none; min-height: 0; }
.reports-page .kpi-tile:first-child { border-left: 0; }
.reports-page .kpi-label { font-size: 11px; }
.reports-page .kpi-value { font-size: 20px; line-height: 28px; }
.reports-page .kpi-sub { font-size: 11px; }
.reports-page .chart-grid, .reports-page .chart-grid-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.reports-page .chart-tile { padding: 8px 12px; margin: 0; }
.reports-page .chart-tile h3 { margin: 0 0 6px; font-size: 13px; }
.reports-page .hbar-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34%) 64px; gap: 8px; align-items: center; min-height: 27px; margin: 0;
  border-bottom: 1px solid var(--surface-line); font-size: 12px; }
.reports-page .hbar-row:last-child { border-bottom: 0; }
.reports-page .hbar-row > svg.meter-bar { grid-column: auto; grid-row: auto; width: 100%; height: 6px; min-width: 0; }
.reports-page .hbar-label { width: auto; }
.reports-page .hbar-value { width: auto; font-weight: 600; color: var(--ink); }
.reports-page .donut-chart { width: 96px; height: 96px; }
.reports-page table td { padding-top: 4px; padding-bottom: 4px; }
.reports-page .grid-2 { gap: var(--space-3); }
@media (max-width: 1100px) { .reports-page .chart-grid, .reports-page .chart-grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Column widths of the one-line lists (no inline styles: the console's CSP allows none). */
.cw-9p { width: 9%; }
.cw-10p { width: 10%; }
.cw-13p { width: 13%; }
.cw-15p { width: 15%; }
.cw-16p { width: 16%; }
.cw-17p { width: 17%; }
.cw-18p { width: 18%; }
.cw-19p { width: 19%; }
.cw-20p { width: 20%; }
.cw-40px { width: 40px; }
.cw-44px { width: 44px; }
.cw-50px { width: 50px; }
.cw-64px { width: 64px; }
.cw-70px { width: 70px; }
.cw-84px { width: 84px; }
.cw-86px { width: 86px; }
.cw-90px { width: 90px; }
.cw-92px { width: 92px; }
.cw-96px { width: 96px; }
.cw-100px { width: 100px; }
.cw-104px { width: 104px; }
.cw-110px { width: 110px; }
.cw-112px { width: 112px; }
.cw-120px { width: 120px; }
.cw-130px { width: 130px; }
.cw-132px { width: 132px; }
.cw-134px { width: 134px; }
.cw-140px { width: 140px; }
.cw-150px { width: 150px; }
.cw-170px { width: 170px; }
.cw-176px { width: 176px; }
.cw-180px { width: 180px; }
.cw-200px { width: 200px; }
.cw-230px { width: 230px; }
.cw-240px { width: 240px; }
.cw-250px { width: 250px; }
.cw-260px { width: 260px; }

/* Approvals intro on one line. */
.page-header.is-oneline-head { align-items: center; }
.page-header.is-oneline-head > div:first-child { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.page-header.is-oneline-head .page-subtitle { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Seeing a whole row (static/js/rowpanel.js). The details panel sits at the right, under the top bar; on wide
   screens the page makes room for it so the list stays visible beside it. */
.row-panel { position: fixed; z-index: 60; top: calc(var(--topbar-h) + 8px); right: 8px; bottom: calc(var(--footer-h) + 8px); width: 400px; max-width: calc(100vw - 16px);
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense);
  box-shadow: -12px 0 28px -18px rgba(16, 32, 52, 0.5); overflow: hidden; }
.row-panel[hidden] { display: none; }
.row-panel-head { padding: 10px 14px 8px; border-bottom: 1px solid var(--surface-line); }
.row-panel-top { display: flex; align-items: center; gap: 6px; }
.row-panel-kind { flex: 1; min-width: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.row-panel-nav { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-muted); }
.row-panel-pos { margin: 0 4px; white-space: nowrap; }
.row-panel-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; min-height: 26px; padding: 0; border: 1px solid var(--surface-line); border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: none; }
.row-panel-btn:disabled { opacity: 0.4; cursor: default; }
.row-panel-close { border-color: transparent; }
.row-panel-title { margin: 4px 0 0; font-size: 16px; line-height: 22px; color: var(--heading); overflow-wrap: anywhere; }
.row-panel-sub { margin: 2px 0 0; font-size: 12px; color: var(--ink-muted); }
.row-panel-sub:empty { display: none; }
.row-panel-body { flex: 1; overflow: auto; padding: 2px 14px 12px; }
.row-panel-facts { margin: 0; }
.row-panel-fact { display: grid; grid-template-columns: 112px minmax(0, 1fr) 24px; gap: 10px; align-items: start; padding: 7px 0; border-bottom: 1px solid var(--surface-line); }
.row-panel-fact dt { font-size: 12px; color: var(--ink-muted); padding-top: 2px; }
.row-panel-fact dd { margin: 0; font-size: 12.5px; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.row-panel-fact dd .fl-obj { display: inline-flex; margin: 0 6px 2px 0; }
.row-panel-copy { grid-column: 3; display: inline-grid; place-items: center; width: 24px; height: 24px; min-height: 24px; padding: 0; border: 1px solid var(--surface-line); border-radius: 5px; background: var(--surface); color: var(--ink-muted); cursor: pointer; box-shadow: none; }
.row-panel-copy .i { width: 13px; height: 13px; }
.row-panel-copy.is-copied, .row-panel-foot .is-copied { border-color: var(--accent); color: var(--accent); }
.row-panel-extra h3 { margin: 12px 0 6px; font-size: 13px; color: var(--heading); }
.row-panel-extra details > summary { display: none; }
.row-panel-extra table { width: 100%; table-layout: fixed; }
.row-panel-extra td, .row-panel-extra th { white-space: normal !important; overflow-wrap: anywhere; max-width: none !important; }
.row-panel-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--surface-line); background: var(--surface-sunken); }
tr.is-panel-row > td { background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important; }
table[data-row-panel="click"] > tbody > tr:not(.fl-section):not(.fl-empty) { cursor: pointer; }
@media (min-width: 1200px) {
  body.has-row-panel main.page { padding-right: 416px; }
}
@media (max-width: 640px) {
  .row-panel { top: 0; right: 0; bottom: 0; width: 100vw; max-width: none; border-radius: 0; }
}
/* Rows: One line | Wrap */
.rows-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.rows-switch .fl-seg button { height: 24px; min-height: 24px; padding: 0 9px; font-size: 12px; }
.rows-foot { justify-content: flex-end; border-top: 1px solid var(--surface-line); }
table.is-wrapped td, table.is-wrapped th { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; word-break: normal; height: auto; vertical-align: top; }
table.is-wrapped td { padding-top: 6px !important; padding-bottom: 6px !important; }
@media print {
  table.is-oneline td, table.is-oneline-plain td, table[data-row-panel] td { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
  .row-panel, .rows-switch { display: none !important; }
}
.cw-74px { width: 74px; }

/* One line of controls (edit pages, Policy tester, URL and User lookup, Live logs). */
.fl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 9px 14px; margin: 0 0 var(--space-3); background: var(--surface);
  border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); }
.fl-form-card > .fl-line { margin: 0; border: 0; border-bottom: 1px solid var(--surface-line); border-radius: 0; }
.fl-line .fl-label { display: inline-flex; align-items: center; gap: 5px; margin: 0; white-space: nowrap; }
.fl-line-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.fl-line-sep { width: 1px; height: 22px; background: var(--surface-line); }
.fl-line input[type="text"], .fl-line input[type="search"], .fl-line input[type="number"], .fl-line input[type="password"], .fl-line select { height: 30px; min-height: 30px; margin: 0; }
.fl-in-name { width: 200px !important; }
.fl-in-site { width: 250px !important; }
.fl-line .fl-seg button { height: 28px; min-height: 28px; font-size: 12.5px; }
.fl-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.fl-stack > label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-muted); margin: 0; }
.fl-stack input { width: 100%; height: 30px; min-height: 30px; }
.tester-line { align-items: flex-end; }
.tester-line .is-site { flex: 1 1 280px; max-width: 380px; }
.tester-line .is-ip { flex: 0 1 170px; }
.tester-line .is-user { flex: 0 1 200px; }
.tester-line .is-port { flex: 0 0 76px; }
.tester-go { min-height: 30px; }
.tester-go .checkbox { margin: 0; font-size: 12.5px; }
.tester-table td.tester-detail { white-space: normal !important; overflow: visible; text-overflow: clip; }
.tester-table td .icon { vertical-align: middle; }
/* "Where used" as a line above the list (edit pages), and other one-line notes. */
.fl-used { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 var(--space-3); padding: 7px 12px; background: var(--surface);
  border: 1px solid var(--surface-line); border-radius: var(--radius-card-dense); font-size: 12.5px; }
.fl-used > .i { width: 14px; height: 14px; color: var(--ink-muted); }
.fl-form-card > .fl-foot { border-top: 1px solid var(--surface-line); align-items: center; }
/* URL lookup / User lookup */
.lookup-bar { margin: 0 0 var(--space-3); }
.lookup-bar .fl-line { margin: 0; }
.lookup-in { width: 420px !important; max-width: 100%; }
.lookup-type-in { width: 150px; }
.lookup-bar .lookup-typeahead.lookup-in input { width: 100%; }
.lookup-bar .busy-panel { margin-top: var(--space-2); }
.verdict.is-line { flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; margin: 0 0 var(--space-3); font-size: 12.5px; }
.verdict.is-line .verdict-icon { width: 24px; height: 24px; border-radius: 7px; }
.verdict.is-line .verdict-icon .i { width: 14px; height: 14px; }
.verdict.is-line .verdict-title { font-size: 14px; line-height: 20px; }
.verdict-why { min-width: 0; }
.verdict-rule { font-weight: 600; }
.verdict-facts { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; }
.lookup-page .card:has(> .empty-state.is-compact) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 14px; }
.lookup-page .card:has(> .empty-state.is-compact) > .card-header { padding: 0; border: 0; min-height: 0; margin: 0; }
.lookup-page .card:has(> .empty-state.is-compact) > .empty-state.is-compact { padding: 0; margin: 0; text-align: left; display: block; }
.lookup-page .card:has(> .empty-state.is-compact) .empty-state-text { margin: 0; color: var(--ink-muted); }
.lookup-page .card:has(> .empty-state.is-compact) .card-subtitle { display: none; }
/* Background jobs: one status line */
.jq-status .jq-item { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.jq-sep { width: 1px; height: 18px; background: var(--surface-line); }
.job-history-table td.job-message { white-space: nowrap; }
/* My requests: totals strip */
.totals-strip > span:not(.fl-spacer) { display: inline-flex; align-items: center; gap: 6px; }
.totals-strip > span .i { width: 14px; height: 14px; color: var(--ink-muted); }
.totals-strip strong { color: var(--heading); }
/* Live logs */
.live-filters .lf-user { width: 120px; } .live-filters .lf-ip { width: 110px; } .live-filters .lf-site { width: 140px; } .live-filters .lf-cat { width: 110px; }
.live-filters .lf-result { width: 120px; }
.live-filters .checkbox { margin: 0; font-size: 12.5px; }
.fl-repeat { display: inline-flex; align-items: center; height: 18px; min-height: 18px; margin-left: 6px; padding: 0 6px; border: 0; border-radius: 4px;
  background: var(--info-bg); color: var(--info-ink); font: 700 11px/18px var(--font-sans); cursor: pointer; vertical-align: 1px; box-shadow: none; }
.fl-repeat[aria-expanded="true"] { background: var(--info-ink); color: var(--surface); }
tr.log-group-extra > td { background: var(--surface-sunken); }
/* Install policy: short when nothing changed; the five steps folded */
.install-body { grid-template-columns: minmax(0, 1fr); }
.install-changes { border-right: 0; }
.install-checks { padding: var(--space-3) var(--space-6); border-top: 1px solid var(--surface-line); }
.install-checks > summary { cursor: pointer; color: var(--accent); }
.install-dialog.is-quiet { max-width: 760px; }
.install-dialog.is-quiet .install-changes { padding-top: var(--space-3); padding-bottom: var(--space-2); }
/* Account security: the two actions side by side */
.acct-actions { align-items: stretch; }
.acct-action { margin: 0; }
.acct-action-title { margin: 0 0 4px; font-size: 14px; color: var(--heading); }
.acct-confirm { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.acct-confirm .fl-stack { flex: 1 1 150px; }
.acct-or { font-size: 12px; color: var(--ink-muted); padding-bottom: 7px; }
.cw-40p { width: 40%; }

/* Validate (the review before adding to a URL category or a source group). */
.validate-checks { padding: 8px 10px; border-radius: 6px; background: var(--surface-sunken); font-size: 12.5px; color: var(--ink); }
.validate-checks ul { margin: 4px 0 4px; padding-left: 18px; }
.validate-checks li { margin: 1px 0; }
.validate-reasons { margin: 0 0 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.review-why .fl-tag { margin: 0 4px 0 0; }
.review-row.is-flagged td { background: color-mix(in srgb, var(--warning-bg) 35%, transparent); }
.keep-toggle { display: inline-flex; border: 1px solid var(--surface-line); border-radius: 7px; overflow: hidden; cursor: pointer; background: var(--surface); }
.keep-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.keep-toggle .keep-on, .keep-toggle .keep-off { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; font: 600 12.5px/1 var(--font-sans); color: var(--ink); }
.keep-toggle .keep-off { border-left: 1px solid var(--surface-line); }
.keep-toggle input:checked ~ .keep-on { background: var(--heading); color: var(--surface); }
.keep-toggle input:not(:checked) ~ .keep-off { background: var(--danger-ink); color: var(--surface); }
.keep-toggle:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* What each entry is (URL category and source group edit pages) */
.fl-flag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-right: 1px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 20px; white-space: nowrap; vertical-align: middle; }
.fl-flag:last-child { margin-right: 0; }
.fl-flag.is-warn { background: var(--warning-bg); color: var(--warning-ink); }
.fl-flag.is-bad { background: var(--danger-bg); color: var(--danger-ink); }
.fl-flag.is-info { background: var(--info-bg); color: var(--info-ink); }
.fl-flag.is-off { background: var(--surface-sunken); color: var(--ink-muted); }
.entry-table tbody tr { cursor: pointer; }
.entry-table td .i { vertical-align: -2px; }
.unused-list .fl-result input { margin-right: 6px; vertical-align: -2px; }
/* Many columns: the first one never shrinks below a readable width; the list scrolls sideways instead (with the panel
   open the page is narrower). */
#entries.entry-table { min-width: 1200px; }
#members.entry-table { min-width: 1080px; }
/* Logs show the MM rank and the inspection */
.log-table td.log-mm { font-variant-numeric: tabular-nums; }
.fl-flag.is-ok { background: var(--success-bg); color: var(--success-ink); }
.site-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cw-270px { width: 270px; }
/* Group by (grouping.js) */
.group-controls { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group-by { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); font-weight: 700; color: var(--ink-2, var(--ink)); }
.group-by select { height: 30px; min-width: 9rem; }
.group-toolbar { margin-bottom: 8px; }
.group-summary { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 6px 12px; border-radius: 8px; background: var(--info-bg); color: var(--info-ink); font-size: var(--fs-meta); }
.group-summary[hidden] { display: none; }
.group-summary .i { flex: none; }
tr.fl-group td { position: sticky; top: 0; z-index: 2; background: var(--surface-sunken); border-top: 1px solid var(--surface-line); padding: 0 10px; height: 34px; cursor: pointer; }
.fl-group-line { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.fl-group-fold { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: inherit; color: var(--heading); cursor: pointer; }
.fl-group-fold .i { transition: transform .15s; }
tr.fl-group.is-folded .fl-group-fold .i { transform: rotate(-90deg); }
.fl-group-count { color: var(--ink-muted); font-weight: 500; }
.fl-group-meta { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; }
.fl-group-act { margin-left: 6px; font-weight: 700; }
tr.is-g-folded { display: none; }
tr.is-g-picked td { background: color-mix(in srgb, var(--info-bg) 60%, var(--surface)); }
.entry-table:not(.is-grouped) .g-sub { color: inherit; font-weight: inherit; }
.entry-table.is-grouped .g-sub { color: var(--ink-muted); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .fl-group-fold .i { transition: none; } }
a.fl-flag { text-decoration: none; } a.fl-flag:hover { text-decoration: underline; }

/* Site impact: the request form's per-site check, the "About this site" block on the request page and the
   manager page, and the impact level chips. */
.site-checks { display: flex; flex-direction: column; gap: var(--space-2); margin: 0 0 var(--space-3); }
.site-checks:empty { display: none; }
.site-check { border: 1px solid var(--surface-line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.site-check-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; background: var(--neutral-bg); }
.site-check-head code { font-size: 13.5px; font-weight: 700; color: var(--heading); margin-right: 4px; word-break: break-all; background: none; padding: 0; }
.site-check > :not(.site-check-head) { margin-left: 12px; margin-right: 12px; }
.site-check-facts, .site-check-areas { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 12px; margin-top: 8px; }
.site-check-areas > span { display: inline-flex; align-items: center; gap: 5px; }
.site-check-text, .site-check-never { margin-top: 6px; margin-bottom: 10px; font-size: 12.5px; line-height: 1.45; }
.site-check-never { color: var(--danger-ink); }
.site-check.is-never { border-color: var(--danger-line); }
.site-check .field { margin-bottom: 10px; }
.site-check-days { border: 0; padding: 0; }
.site-check-days legend { font-weight: 600; font-size: 13px; margin-bottom: 4px; padding: 0; }
.site-check-extra { color: var(--info-ink); }
.impact-level { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; line-height: 17px; }
.impact-level.is-high { background: var(--danger-bg); color: var(--danger-ink); }
.impact-level.is-medium { background: var(--warning-bg); color: var(--warning-ink); }
.impact-level.is-low { background: var(--success-bg); color: var(--success-ink); }
.decide-access legend, .decide-access .help-text { margin-bottom: 4px; }
.decide-access { border: 0; padding: 0; margin: 0 0 var(--space-3); }
.decide-wanted { margin: 0 0 var(--space-3); padding: 8px 12px; border-radius: 8px; background: var(--success-bg); color: var(--success-ink); font-size: 12.5px; line-height: 1.5; }
.decide-wanted.is-info { background: var(--info-bg); color: var(--info-ink); }
.gate-question { margin: 0 0 6px; font-size: 17px; color: var(--heading); }
.gate-ask { margin: 0 0 var(--space-3); font-size: 13px; line-height: 1.5; }
/* URL lookup: the result line as one grid (icon | answer, links | rules | facts | impact) */
.verdict.is-line.is-grid { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 5px; align-items: center; }
.verdict.is-grid .verdict-icon { grid-row: 1 / span 4; align-self: start; }
.verdict.is-grid .verdict-links { display: inline-flex; gap: 14px; white-space: nowrap; }
.verdict.is-grid .verdict-why, .verdict.is-grid .verdict-facts, .verdict.is-grid .verdict-impact { grid-column: 2 / -1; }
.verdict.is-grid .verdict-facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-left: 0; padding-top: 6px; border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent); }
.verdict.is-grid .verdict-impact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.verdict-area { display: inline-flex; align-items: center; gap: 5px; }
.verdict-it { flex-basis: 100%; color: var(--ink); }
.site-check-days .seg, .decide-access .seg { width: max-content; max-width: 100%; flex-wrap: wrap; }
/* The request form's manager picker */
.manager-pick .field { position: relative; }
.manager-list { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; z-index: 20; background: var(--surface);
  border: 1px solid var(--field-border); border-top: 0; border-radius: 0 0 6px 6px; box-shadow: var(--shadow-float); max-height: 320px; overflow-y: auto; }
.manager-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--surface-line); cursor: pointer; font-size: 12.5px; }
.manager-list li[aria-selected="true"], .manager-list li:hover { background: var(--info-bg); }
.manager-list li.is-foot { cursor: default; color: var(--ink-muted); background: var(--neutral-bg); font-size: 11.5px; }
.manager-list .who { display: flex; flex-direction: column; min-width: 0; }
.manager-list .note { margin-left: auto; color: var(--warning-ink); font-weight: 700; font-size: 11.5px; text-align: right; }
nav.seg .seg-link { display: inline-flex; align-items: center; height: calc(var(--control-h) - 2px); padding: 0 12px; font-size: 12px; font-weight: 600;
  color: var(--ink); text-decoration: none; border-left: 1px solid var(--field-border); }
nav.seg .seg-link:first-child { border-left: 0; }
nav.seg .seg-link.is-active { background: var(--heading); color: var(--surface); }
.gate-pass summary { cursor: pointer; font-weight: 600; color: var(--heading); }
.gate-pass[open] summary { margin-bottom: 8px; }
.approve-warnings { border: 1px solid var(--warning-line); border-radius: 8px; background: var(--warning-bg); color: var(--warning-ink);
  padding: 10px 12px; margin: 0 0 var(--space-3); display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 1.45; }
.approve-warnings-title { margin: 0 0 2px; font-weight: 800; }
.approve-warning { margin: 0; }
.approve-warning.is-info { color: var(--ink-muted); }
.approve-warnings-tick { margin-top: 4px; font-weight: 600; }
.manager-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--space-3); font-size: 12.5px; }

/* Performance check (V128.5): one line per check, filters in the summary, trend line, 24-hour strip, other servers */
.perf-summary { align-items: center; }
.perf-picker { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.perf-picker select { font: inherit; font-weight: 700; color: var(--ink); padding: 3px 8px; border: 1px solid var(--surface-line); border-radius: 8px; background: var(--surface); }
button.perf-chip { font: inherit; border: 0; background: transparent; padding: 3px 8px; border-radius: 8px; cursor: pointer; }
button.perf-chip[aria-pressed="true"] { background: var(--bubble-sent); }
button.perf-chip:hover b { text-decoration: underline; }
.perf-auto { gap: 8px; }
.perf-switch { width: 28px; height: 16px; border-radius: 8px; background: var(--ink-faint); position: relative; flex: none; }
.perf-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); }
.perf-auto[aria-pressed="true"] .perf-switch { background: var(--success-line); }
.perf-auto[aria-pressed="true"] .perf-switch::after { left: 14px; }
.perf-col-check { width: 230px; }
.perf-col-trend { width: 110px; }
.perf-col-since { width: 72px; }
.perf-table tbody tr { cursor: pointer; }
.perf-table tbody tr:focus-visible { outline: 2px solid var(--success-line); outline-offset: -2px; }
.perf-spark { display: block; width: 88px; height: 20px; }
.perf-spark.is-ok { color: var(--success-line); }
.perf-spark.is-warn { color: var(--warning-ink); }
.perf-spark.is-bad { color: var(--danger-ink); }
.perf-spark.is-off { color: var(--ink-faint); }
.perf-foot { border-top: 1px solid var(--surface-line); }
.perf-day { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; margin: 4px 0; }
.perf-hour { height: 16px; border-radius: 3px; background: var(--surface-line); }
.perf-hour.is-ok { background: color-mix(in srgb, var(--success-line) 35%, var(--surface)); }
.perf-hour.is-warn { background: var(--warning-line); }
.perf-hour.is-bad { background: var(--danger-line); }
.perf-day-scale { display: flex; justify-content: space-between; margin: 0 0 6px; font-size: 11px; }
.perf-servers { padding: 0; margin-top: var(--space-4); }
.perf-servers > summary { padding: var(--space-3) var(--space-4); cursor: pointer; }
.perf-servers-body { padding: 0 var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.perf-peer-form, .perf-token-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0; }
.perf-peer-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.perf-token-value { word-break: break-all; user-select: all; }

/* V128.6: Policy > Exceptions */
.exc-order { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; margin: 0 0 var(--space-3);
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 10px; font-size: 12.5px; }
.exc-step { display: inline-block; padding: 0 8px; border-radius: 9px; font-size: 11.5px; font-weight: 700; line-height: 18px;
  background: var(--neutral-bg); color: var(--ink-muted); }
.exc-step.is-threat { background: var(--danger-bg); color: var(--danger-ink); }
.exc-step.is-exc { background: var(--success-bg); color: var(--success-ink); }
.exc-step.is-rules { background: var(--info-bg); color: var(--info-ink); }
.exc-step a { color: inherit; }
.exc-suggest { margin: 0 0 var(--space-3); }
.exc-table td.exc-soon { color: var(--warning-ink); }
.exc-form { display: flex; flex-direction: column; gap: 6px; }
.exc-form label { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.exc-form textarea, .exc-form input[type=text], .exc-form select { width: 100%; box-sizing: border-box; }
.exc-pair { display: grid; grid-template-columns: auto 160px minmax(0, 1fr); gap: 8px; align-items: center; }
@media (max-width: 640px) { .exc-pair { grid-template-columns: 1fr; } }
/* V128.6: request page, Who gets it */
.decide-who { border: 0; padding: 0; margin: 0 0 var(--space-3); display: flex; flex-direction: column; gap: 6px; }
.decide-who legend { margin-bottom: 4px; font-weight: 700; }
.decide-who .seg { width: max-content; max-width: 100%; flex-wrap: wrap; }
.decide-exception { display: flex; align-items: center; gap: 8px; }
.decide-exception label { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
/* V128.6: URL lookup - one list for every scan, details on the right */
.cu-bar .fl-line { flex-wrap: wrap; row-gap: 6px; }
.cu-bar .lookup-in { width: 380px !important; }
.cu-scan-buttons { display: inline-flex; gap: 6px; flex: none; }
.cu-scanline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 6px 10px; margin: 0 0 var(--space-3);
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 10px; font-size: 12.5px; }
.cu-scan { display: inline-flex; align-items: center; gap: 4px; }
.cu-scan-warn { color: var(--warning-ink); max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-note { margin: -6px 0 var(--space-3); }
.cu-pill { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 17px; margin-right: 3px;
  background: var(--neutral-bg); color: var(--ink-muted); }
.cu-pill.is-scan { background: var(--info-bg); color: var(--info-ink); }
.cu-pill.is-deep { background: var(--success-bg); color: var(--success-ink); }
.cu-pill.is-interactive { background: color-mix(in srgb, #7a6a8c 18%, var(--surface)); color: color-mix(in srgb, #5a4475 80%, var(--ink)); }
.cu-pill.is-new { background: var(--success-line); color: var(--surface); }
.cu-sites { margin-bottom: var(--space-4); }
.cu-sites-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border-bottom: 1px solid var(--surface-line); }
.cu-title { margin: 0; font-size: 14px; font-weight: 700; }
.cu-search { width: min(240px, 100%); height: 28px; }
.cu-chip { padding: 2px 9px; border-radius: 20px; border: 1px solid var(--surface-line); background: var(--surface); font: inherit; font-size: 12px;
  font-weight: 700; color: var(--ink); cursor: pointer; }
.cu-chip[aria-pressed="true"] { background: var(--heading); border-color: var(--heading); color: var(--surface); }
.cu-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-table .cu-col-site { width: 30%; }
.cu-table .cu-col-status { width: 22%; }
.cu-table tr.cu-new > td { background: color-mix(in srgb, var(--success-line) 8%, var(--surface)); }
.cu-table tbody tr { cursor: pointer; }
.cu-addbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border-top: 1px solid var(--surface-line);
  background: var(--neutral-bg); }
.cu-add-fields { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cu-add-fields[hidden] { display: none; }
.cu-who-name { width: 130px; }
.cu-reason { width: 200px; }
.cu-addbar .confirm-panel { margin: 0; }
.cu-addnote { margin: 0; padding: 6px 10px 8px; font-size: 12px; }
/* V128.6: User lookup */
.lk-person, .lk-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 7px 10px; margin: 0 0 var(--space-3);
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 10px; font-size: 12.5px; }
.lk-warn { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning-ink); }
.lk-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--heading); color: var(--surface); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 11px; }
.lk-disabled { color: var(--danger-ink); font-weight: 700; }
.lk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border-bottom: 1px solid var(--surface-line); }
.lk-title { margin: 0; font-size: 14px; font-weight: 700; }
.lk-search { width: min(260px, 100%); height: 28px; }
.lk-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-table tbody tr { cursor: pointer; }
.lk-exc { margin-bottom: var(--space-3); }
