:root {
  color-scheme: dark;
  --bg-page: #0f0f10;
  --bg-sidebar: #111213;
  --bg-header: #121314;
  --surface-1: #18191b;
  --surface-2: #1e2023;
  --surface-hover: #24262a;
  --surface-selected: #272a2f;
  --border: #2b2d31;
  --border-strong: #3a3d42;
  --text-primary: #f2f2f3;
  --text-secondary: #a6a8ad;
  --text-muted: #8a8d93;
  --accent: #347df6;
  --accent-hover: #4b8df8;
  --accent-soft: rgba(52, 125, 246, 0.14);
  --success: #55c469;
  --warning: #e5aa17;
  --danger: #ed5656;
  --info: #5c9cff;
  --focus-ring: #6aa4ff;
  --vrs-ink: var(--text-primary);
  --vrs-muted: var(--text-secondary);
  --vrs-canvas: var(--bg-page);
  --vrs-accent: var(--accent);
  --vrs-focus: var(--focus-ring);
  --vrs-topbar-height: 64px;
  --vrs-sidebar-collapsed: 64px;
  --vrs-sidebar-expanded: 240px;
  --bs-body-color: var(--text-primary);
  --bs-body-bg: var(--bg-page);
  --bs-border-color: var(--border);
  --bs-link-color: #78a9ff;
  --bs-link-hover-color: #a6c7ff;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; }
html { background: var(--bg-page); }
body {
  min-width: 320px;
  color: var(--text-primary);
  background: var(--bg-page);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.admin-authenticated { padding-top: var(--vrs-topbar-height); }
a, button, input, select { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus-ring) !important; outline-offset: 3px; box-shadow: none !important; }
.skip-link { position: fixed; z-index: 2000; left: 1rem; top: -5rem; padding: .75rem 1rem; color: #08090a; background: var(--focus-ring); border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.navigation-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.admin-topbar { position: fixed; z-index: 1030; top: 0; right: 0; left: 0; height: var(--vrs-topbar-height); border-bottom: 1px solid var(--border); background: var(--bg-header); }
.admin-topbar-inner { display: flex; align-items: center; gap: 1rem; width: 100%; height: 100%; padding: 0 1rem; }
.navigation-toggle {
  display: inline-flex;
  flex: 0 0 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: .5rem;
  color: var(--text-secondary);
  background: transparent;
}
.navigation-toggle:hover { color: var(--text-primary); background: var(--surface-hover); }
.navigation-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentcolor; }
.admin-brand { display: inline-flex; flex: 0 0 auto; align-items: center; text-decoration: none; }
.admin-brand img { display: block; width: clamp(150px, 13vw, 165px); height: auto; max-height: 40px; object-fit: contain; }
.auth-brand { display: flex; justify-content: center; width: 100%; padding: 2rem 1rem 0; }
.auth-brand img { display: block; width: min(165px, 52vw); height: auto; }
.admin-account { display: flex; align-items: center; gap: .75rem; min-width: 0; margin-inline-start: auto; }
.admin-username { min-width: 0; max-width: min(32vw, 28rem); overflow: hidden; color: var(--text-secondary); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.admin-username:hover { color: var(--text-primary); text-decoration: underline; }
.admin-account form { flex: 0 0 auto; margin: 0; }
.logout-button { min-height: 36px; }
.admin-sidebar { width: min(100%, var(--vrs-sidebar-expanded)); color: var(--text-secondary); background: var(--bg-sidebar); border-right: 1px solid var(--border); }
.sidebar-nav { padding: .65rem .5rem 1.25rem; }
.sidebar-group { margin: 0 0 .75rem; }
.sidebar-group-title { margin: .7rem .55rem .3rem; color: var(--text-muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-list { display: grid; gap: .15rem; padding: 0; margin: 0; list-style: none; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 44px;
  padding: .55rem .65rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.sidebar-link:hover { color: var(--text-primary); background: var(--surface-hover); }
.sidebar-link.is-active { border-color: var(--border-strong); color: var(--text-primary); background: var(--surface-selected); box-shadow: inset 3px 0 var(--accent); }
.sidebar-icon { flex: 0 0 22px; width: 22px; height: 22px; fill: currentcolor; }
.sidebar-label { min-width: 0; overflow-wrap: anywhere; }
.navigation-backdrop {
  position: fixed;
  z-index: 1010;
  inset: var(--vrs-topbar-height) 0 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: rgb(0 0 0 / 66%);
}
.navigation-backdrop[hidden], .navigation-tooltip[hidden] { display: none; }
.navigation-tooltip {
  position: fixed;
  z-index: 1040;
  max-width: 18rem;
  padding: .45rem .65rem;
  border-radius: .35rem;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: 0 .35rem .85rem rgb(0 0 0 / 28%);
  font-size: .875rem;
  pointer-events: none;
}
.admin-main { min-width: 0; scroll-margin-top: calc(var(--vrs-topbar-height) + 1rem); }
.vrs-nav-ready .admin-sidebar {
  position: fixed;
  z-index: 1020;
  top: var(--vrs-topbar-height);
  bottom: 0;
  left: 0;
  width: var(--vrs-sidebar-collapsed);
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: none;
  transition: none;
}
.vrs-nav-ready.vrs-nav-interactive .admin-sidebar { transition: width 160ms ease, transform 160ms ease; }
.vrs-nav-ready .admin-main { width: calc(100% - var(--vrs-sidebar-collapsed)); margin-left: var(--vrs-sidebar-collapsed); }
.vrs-nav-ready .sidebar-group-title,
.vrs-nav-ready .sidebar-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.vrs-nav-ready .sidebar-link { justify-content: center; padding-inline: .55rem; }
.vrs-nav-ready .sidebar-group { margin-bottom: .4rem; }
.vrs-nav-ready .sidebar-group + .sidebar-group { padding-top: .4rem; border-top: 1px solid var(--border); }
.vrs-nav-ready body.navigation-expanded .admin-sidebar { width: var(--vrs-sidebar-expanded); box-shadow: .4rem 0 1.2rem rgb(0 0 0 / 18%); }
.vrs-nav-ready body.navigation-expanded .admin-main { width: calc(100% - var(--vrs-sidebar-expanded)); margin-left: var(--vrs-sidebar-expanded); }
.vrs-nav-ready body.navigation-expanded .sidebar-group-title,
.vrs-nav-ready body.navigation-expanded .sidebar-label { position: static; width: auto; height: auto; margin: initial; overflow: visible; clip: auto; white-space: normal; }
.vrs-nav-ready body.navigation-expanded .sidebar-group-title { margin: .7rem .55rem .3rem; }
.vrs-nav-ready body.navigation-expanded .sidebar-link { justify-content: flex-start; padding-inline: .65rem; }
.page-shell { max-width: 1440px; padding: 2rem clamp(1rem, 3vw, 3rem) 4rem; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-heading h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin-bottom: .25rem; }
.page-heading p { color: var(--text-secondary); margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.metric-card { min-width: 0; padding: 1.15rem; background: var(--surface-1); border: 1px solid var(--border); border-radius: .6rem; box-shadow: 0 .15rem .4rem rgb(0 0 0 / 12%); }
.metric-card span { display: block; color: var(--text-secondary); font-size: .85rem; }
.metric-card strong { display: block; margin-top: .35rem; font-size: 1.45rem; overflow-wrap: anywhere; }
.metric-reason { display: block; margin-top: .45rem; color: var(--text-muted); line-height: 1.35; }
.card { color: var(--text-primary); background: var(--surface-1); border-color: var(--border); border-radius: .6rem; box-shadow: 0 .15rem .45rem rgb(0 0 0 / 10%); }
.synthetic-banner { position: relative; z-index: 1; margin: 0 0 1.25rem; padding: .65rem 1rem; border: 2px solid var(--warning); border-radius: .55rem; color: #ffe9ad; background: #2b230c; font-weight: 800; }
.synthetic-banner span { display: block; margin-top: .15rem; font-size: .78rem; font-weight: 500; }
.synthetic-card { border: 2px solid var(--warning); }
.auth-card { max-width: 440px; margin: max(4vh, 2rem) auto; }
.form-card { max-width: 980px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.mode-options { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.selection-count { height: 100%; display: flex; align-items: end; gap: .25rem; padding-bottom: .5rem; }
.adapter-result { margin-top: .65rem; padding: .65rem .75rem; border-left: .25rem solid var(--border-strong); background: var(--surface-2); }
.adapter-result.is-success { border-color: var(--success); }.adapter-result.is-warning { border-color: var(--warning); }
.summary-card, .setup-card { max-width: 900px; }
.summary-grid { display: grid; grid-template-columns: minmax(8rem, .38fr) minmax(0, 1fr); gap: .6rem 1rem; margin: 0; }
.summary-grid dt { color: var(--vrs-muted); font-weight: 500; }.summary-grid dd { margin: 0; overflow-wrap: anywhere; }
.summary-grid.compact { grid-template-columns: minmax(7rem, .55fr) minmax(0, 1fr); }
.empty-state { color: var(--vrs-muted); }
.mobile-cards { display: none; }
.mobile-card { display: grid; gap: .4rem; padding: 1rem 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.mobile-card .badge { justify-self: start; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.event-list p { margin: .25rem 0 0; color: var(--vrs-muted); }.event-list time { color: var(--vrs-muted); font-size: .85rem; white-space: nowrap; }
.qr-wrap { max-width: 260px; padding: .75rem; margin-bottom: 1rem; background: #fff; border: 1px solid var(--border-strong); }.qr-wrap img { width: 100%; height: auto; }
.recovery-codes { columns: 2; padding-left: 2rem; }.recovery-codes li { padding: .35rem; break-inside: avoid; }.recovery-codes code { user-select: all; }
.text-break, td, th { overflow-wrap: anywhere; }
.run-tabs { position: relative; flex-wrap: nowrap; overflow-x: auto; padding: 0 0 .45rem; scrollbar-color: var(--accent) var(--surface-2); }
.run-tabs .nav-link { white-space: nowrap; }
.tab-scroll-note { display: none; margin: -.35rem 0 .75rem; color: var(--text-muted); font-size: .78rem; }
.evidence-view { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 28rem; overflow-y: auto; }
.evidence-summary dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence-factor { display: inline-block; padding: .15rem .4rem; margin: .1rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2); }
.technical-panel { padding: .8rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface-2); }
.technical-row > td { padding: 0 .5rem .8rem !important; }
.audit-table { min-width: 72rem; table-layout: fixed; }
.audit-table th:nth-child(1) { width: 10rem; }.audit-table th:nth-child(2) { width: 14rem; }.audit-table th:nth-child(3) { width: 12rem; }.audit-table th:nth-child(4) { width: 10rem; }.audit-table th:nth-child(5) { width: 14rem; }.audit-table th:nth-child(6) { width: 14rem; }.audit-table th:nth-child(7) { width: 8rem; }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.action-kind { display: inline-flex; align-items: center; min-height: 1.8rem; padding: .15rem .55rem; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-secondary); font-size: .75rem; }
[data-action-class="DESTRUCTIVE"] { border-width: 2px; }
[data-action-class="EXTERNAL"] { border-style: dashed; }
.comment-item { border-left: .25rem solid var(--border-strong); padding: .6rem .8rem; margin-bottom: .75rem; background: var(--surface-2); }
.comment-item p { margin-bottom: .25rem; }.comment-item small { color: var(--vrs-muted); }
.evidence-table { min-width: 100rem; }
.duplicate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.duplicate-card { min-width: 0; border: 1px solid var(--border); border-radius: .6rem; background: var(--surface-1); }
.duplicate-card header, .duplicate-card section { padding: .9rem 1rem; }
.duplicate-card header { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.duplicate-card section + section { border-top: 1px solid var(--border); }
.duplicate-card code, .copy-value { overflow-wrap: anywhere; word-break: break-word; }
.review-evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.review-evidence-grid > section { min-width: 0; padding: .8rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface-2); }
.help-sections { display: grid; gap: 1rem; }
.help-section[hidden] { display: none; }
.help-section:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.help-search-status { min-height: 1.5rem; margin: .35rem 0 0; color: var(--text-secondary); }
.help-concepts { display: grid; gap: .7rem; padding: 0; margin: 0; list-style: none; }
.help-concepts li { display: grid; gap: .15rem; padding: .7rem; border-left: .2rem solid var(--border-strong); background: var(--surface-2); }
.help-concepts span, .help-more { display: block; }
.synthetic-source-value, .unsupported-source-value { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; max-width: 100%; }
.safe-source-link, .synthetic-source-value, .unsupported-source-value { overflow-wrap: anywhere; }
.pagination { flex-wrap: wrap; }
.pagination-status { margin: .75rem 0 -.5rem; color: var(--text-secondary); text-align: end; }
.technical-id { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .45rem; color: var(--text-secondary); }
.technical-id code { color: var(--text-primary); overflow-wrap: anywhere; }
.metric-card-link { display: block; color: inherit; text-decoration: none; }
.metric-card-link:hover span { color: var(--text-primary); text-decoration: underline; }
.analytics-kpi-grid { margin-bottom: 1rem; }
.analytics-period-caption { color: var(--text-secondary); }
.metric-comparison { display: block; margin-top: .35rem; color: var(--text-secondary); }
.metric-comparison.is-up, .metric-comparison.is-new { color: var(--success); }
.metric-comparison.is-down { color: var(--danger); }
.analytics-chart-wrap { position: relative; min-height: 23rem; }
.analytics-funnel { display: grid; gap: .75rem; padding: 0; margin: 0; list-style: none; }
.analytics-funnel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; padding: .75rem; border-left: .25rem solid var(--accent); background: var(--surface-2); }
.analytics-funnel strong { font-size: 1.2rem; }
.analytics-funnel small { grid-column: 1 / -1; color: var(--text-secondary); }
.analytics-bars { display: grid; gap: .45rem; padding: 0; margin: 0; list-style: none; }
.analytics-bars li { position: relative; isolation: isolate; display: flex; justify-content: space-between; gap: 1rem; overflow: hidden; padding: .5rem .65rem; border-left: .25rem solid var(--border-strong); background: var(--surface-2); }
.analytics-bars li::before { position: absolute; z-index: -1; inset: 0 auto 0 0; width: var(--bar-share, 0%); background: var(--accent-soft); content: ""; }
.evidence-table th, .evidence-table td { word-break: normal; overflow-wrap: normal; }
.evidence-table .contact-person { min-width: 12rem; }
.evidence-table .contact-role { min-width: 14rem; }
.evidence-table .contact-department { min-width: 12rem; }
.backup-table { min-width: 82rem; }
.audience-preview-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.audience-preview-grid > div { min-width: 0; padding: .8rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface-2); }
.audience-preview-grid dt { color: var(--vrs-muted); font-size: .82rem; font-weight: 500; }
.audience-preview-grid dd { margin: .25rem 0 0; font-size: 1.3rem; font-weight: 700; }
.audience-table { min-width: 76rem; }
.checksum { display: inline-block; max-width: 14rem; overflow-wrap: anywhere; user-select: all; }
.help-wrap { display: inline-flex; align-items: center; margin-inline-start: .3rem; vertical-align: middle; }
.help-trigger {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-secondary);
  background: var(--surface-1);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
}
.help-trigger:hover, .help-trigger[aria-expanded="true"] { color: var(--text-primary); background: var(--surface-selected); border-color: var(--accent); }
.help-popover {
  position: fixed;
  z-index: 2100;
  width: max-content;
  min-width: 14rem;
  padding: .8rem .9rem;
  border: 1px solid var(--border-strong);
  border-radius: .55rem;
  color: var(--vrs-ink);
  background: var(--surface-2);
  box-shadow: 0 .65rem 1.5rem rgb(0 0 0 / 30%);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}
.help-popover[hidden] { display: none; }
.technical-code { display: block; margin-top: .2rem; color: var(--vrs-muted); font-weight: 400; }
.label-with-help { display: inline-flex; align-items: center; gap: .15rem; }

/* Graphite theme overrides for the local Bootstrap component layer. */
a { color: #78a9ff; }
a:hover { color: #a6c7ff; }
hr { color: var(--border-strong); opacity: 1; }
code, pre, kbd, samp { color: #bdc9dc; }
code { overflow-wrap: anywhere; }
.text-secondary, .text-muted, .form-text { color: var(--text-secondary) !important; }
.text-danger { color: #ff7373 !important; }
.text-success { color: #73d985 !important; }
.text-warning { color: #f3c24a !important; }
.card-header, .card-footer { color: var(--text-primary); background: var(--surface-2); border-color: var(--border); }
.list-group-item { color: var(--text-primary); background: transparent; border-color: var(--border); }
.table {
  --bs-table-color: var(--text-primary);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--border);
  --bs-table-striped-color: var(--text-primary);
  --bs-table-striped-bg: rgb(255 255 255 / 2.5%);
  --bs-table-hover-color: var(--text-primary);
  --bs-table-hover-bg: var(--surface-hover);
  margin-bottom: 0;
}
.table > :not(caption) > * > * { border-bottom-color: var(--border); }
.table thead th { color: var(--text-secondary); background: var(--surface-2); font-size: .78rem; letter-spacing: .025em; text-transform: uppercase; }
.form-label, legend { color: var(--text-primary); font-weight: 600; }
.form-control, .form-select {
  min-height: 42px;
  color: var(--text-primary);
  background-color: var(--surface-2);
  border-color: var(--border-strong);
}
.form-control::placeholder { color: var(--text-muted); opacity: 1; }
.form-control:focus, .form-select:focus {
  color: var(--text-primary);
  background-color: var(--surface-2);
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 .2rem rgb(106 164 255 / 18%);
}
.form-control:disabled, .form-select:disabled,
.form-control[readonly] { color: var(--text-muted); background-color: #151618; border-color: var(--border); opacity: 1; }
.form-check-input { background-color: var(--surface-2); border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 .2rem rgb(106 164 255 / 18%); }
.btn { min-height: 40px; border-radius: .5rem; font-weight: 600; }
.btn-sm { min-height: 34px; }
.btn-primary { color: #08090a; background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus-visible { color: #08090a; background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline-primary { color: #8bb5ff; border-color: #477dcc; }
.btn-outline-primary:hover { color: #08090a; background: var(--accent); border-color: var(--accent); }
.btn-outline-secondary { color: var(--text-secondary); border-color: var(--border-strong); }
.btn-outline-secondary:hover { color: var(--text-primary); background: var(--surface-hover); border-color: #50545b; }
.btn-link { color: #78a9ff; }
.btn-danger, .btn-outline-danger:hover { color: #fff; background: #c63f3f; border-color: #c63f3f; }
.btn-outline-danger { color: #ff7777; border-color: #9f4545; }
.btn-success { color: #07180b; background: var(--success); border-color: var(--success); }
.btn-warning { color: #1d1500; background: var(--warning); border-color: var(--warning); }
.btn:disabled, .btn.disabled { color: var(--text-muted); background: #1a1b1d; border-color: var(--border); opacity: 1; cursor: not-allowed; }
.alert { border-radius: .55rem; border-width: 1px; }
.alert-danger { color: #ffc7c7; background: rgb(237 86 86 / 12%); border-color: #6e3434; }
.alert-success { color: #c3f2cc; background: rgb(85 196 105 / 12%); border-color: #315f39; }
.alert-warning { color: #f8df9e; background: rgb(229 170 23 / 12%); border-color: #725d25; }
.alert-info { color: #d2e3ff; background: rgb(92 156 255 / 12%); border-color: #34517e; }
.badge.bg-secondary { color: #d9dade !important; background: #46494f !important; }
.badge.bg-success { color: #07180b !important; background: var(--success) !important; }
.badge.bg-warning { color: #1d1500 !important; background: var(--warning) !important; }
.badge.bg-danger { color: #08090a !important; background: var(--danger) !important; }
.badge.bg-info { color: #081527 !important; background: var(--info) !important; }
.nav-tabs { border-color: var(--border); }
.nav-tabs .nav-link { color: var(--text-secondary); border-color: transparent; }
.nav-tabs .nav-link:hover { color: var(--text-primary); border-color: var(--border) var(--border) transparent; background: var(--surface-hover); }
.nav-tabs .nav-link.active { color: var(--text-primary); background: var(--surface-selected); border-color: var(--border-strong) var(--border-strong) var(--surface-selected); }
.pagination .page-link { color: #78a9ff; background: var(--surface-1); border-color: var(--border); }
.pagination .page-link:hover { color: var(--text-primary); background: var(--surface-hover); }
.dropdown-menu { color: var(--text-primary); background: var(--surface-2); border-color: var(--border); }
.dropdown-item { color: var(--text-secondary); }
.dropdown-item:hover, .dropdown-item:focus { color: var(--text-primary); background: var(--surface-hover); }
.modal-content { color: var(--text-primary); background: var(--surface-1); border-color: var(--border); }
.modal-header, .modal-footer { border-color: var(--border); }
.accordion-item, .accordion-button { color: var(--text-primary); background: var(--surface-1); border-color: var(--border); }
.accordion-button:not(.collapsed) { color: var(--text-primary); background: var(--surface-selected); }
.empty-state { padding: .7rem 0; color: var(--text-muted); }
.page-heading h1, .card h2, .card h3 { color: var(--text-primary); }
.page-heading h1 { letter-spacing: -.025em; }
.selection-count { color: var(--text-secondary); }
details > summary { color: #9bbcf6; cursor: pointer; }

@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight !important; }
  .sidebar-link.is-active { border-left: 3px solid Highlight; }
}

@media (max-width: 1199.98px) { .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
  .audience-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vrs-nav-ready .admin-sidebar {
    width: min(var(--vrs-sidebar-expanded), calc(100vw - 3.25rem));
    transform: translateX(-102%);
    visibility: hidden;
    pointer-events: none;
    transition: none;
  }
  .vrs-nav-ready .admin-main { width: 100%; margin-left: 0; }
  .vrs-nav-ready .sidebar-group-title,
  .vrs-nav-ready .sidebar-label { position: static; width: auto; height: auto; margin: initial; overflow: visible; clip: auto; white-space: normal; }
  .vrs-nav-ready .sidebar-group-title { margin: .7rem .55rem .3rem; }
  .vrs-nav-ready .sidebar-link { justify-content: flex-start; padding-inline: .65rem; }
  .vrs-nav-ready body.navigation-mobile-open .admin-sidebar { transform: translateX(0); visibility: visible; pointer-events: auto; box-shadow: .45rem 0 1.25rem rgb(0 0 0 / 34%); transition-delay: 0s; }
  .vrs-nav-ready.vrs-nav-interactive .admin-sidebar { transition: transform 160ms ease, visibility 0s linear 160ms; }
  .vrs-nav-ready.vrs-nav-interactive body.navigation-mobile-open .admin-sidebar { transition-delay: 0s; }
  body.navigation-mobile-open { overflow: hidden; }
  .navigation-tooltip { display: none; }
  .duplicate-grid { grid-template-columns: 1fr; }
  .review-evidence-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .analytics-chart-wrap { min-height: 18rem; }
  .page-shell { padding: 1.25rem .85rem 3rem; }
  .page-heading { flex-direction: column; }.page-heading .btn { width: 100%; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-table { display: none; }.mobile-cards { display: block; }
  .summary-grid, .summary-grid.compact { grid-template-columns: 1fr; gap: .15rem; }.summary-grid dd { margin-bottom: .65rem; }
  .event-list li { grid-template-columns: 1fr; gap: .25rem; }.event-list time { white-space: normal; }
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-responsive::before { display: block; content: "Прокрутите таблицу по горизонтали ⇆"; padding: .35rem .5rem; color: var(--text-muted); font-size: .78rem; }
  .table-responsive > .table { min-width: 60rem; }
  .table-responsive > .table th, .table-responsive > .table td { overflow-wrap: normal; word-break: normal; }
  .help-popover { min-width: 0; width: calc(100vw - 1.5rem); }
  .help-search .input-group { display: grid; grid-template-columns: 1fr; gap: .5rem; }
  .help-search .input-group > * { width: 100%; border-radius: .375rem !important; }
  .tab-scroll-note { display: block; }
  .audience-table-wrap { overflow: visible; }
  .filter-actions > .btn { flex: 1 1 100%; width: 100%; }
  .table-responsive > .audience-table { display: block; min-width: 0; width: 100%; }
  .audience-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .audience-table tbody, .audience-table tr, .audience-table td { display: block; width: 100%; }
  .audience-table tr { margin-bottom: 1rem; padding: .55rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--surface-1); }
  .audience-table td { display: grid; grid-template-columns: minmax(8rem, .45fr) minmax(0, 1fr); gap: .6rem; padding: .55rem; border: 0; overflow-wrap: anywhere; white-space: normal; }
  .audience-table td::before { content: attr(data-label); color: var(--vrs-muted); font-weight: 600; }
}
@media (max-width: 400px) {
  .admin-topbar-inner { gap: .5rem; padding-inline: .5rem; }
  .admin-username { display: none; }
  .admin-brand img { width: 132px; }
  .metric-grid { grid-template-columns: 1fr; }
  .form-actions > *, .form-actions form, .form-actions form button { width: 100%; }
  .recovery-codes { columns: 1; }
  .audience-preview-grid { grid-template-columns: 1fr; }
  .audience-table td { grid-template-columns: 1fr; gap: .15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .vrs-nav-ready.vrs-nav-interactive .admin-sidebar { transition-duration: .01ms; }
}
