/* ===========================================================================
   NMOS Dark Glass + Bento design system
   Loaded last on the dashboard and auth pages. Dark-only.
   Layers on top of sentinel.css / dashboard-sentinel.css: it re-tokens the
   dark theme, then restyles shell, surfaces and layout. No markup contracts
   change: every selector below targets an existing class or id.

   Rules of the system
   - Glass (translucent + blur): navigation, cards, popovers, modals.
   - Solid (#111827): tables, logs, code, inputs. Data stays readable.
   - Cyan is the only accent. Green / amber / red mean status, nothing else.
   =========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
html[data-theme="dark"] body.dashboard-body,
body.sentinel-body.auth-body,
body.sentinel-body.sentinel-flow,
body.sentinel-body.sentinel-home {
  color-scheme: dark;

  /* surfaces */
  --surface: #090D16;
  --surface-dim: #060910;
  --surface-bright: #0D1320;
  --surface-container-lowest: #111827;
  --surface-container-low: #162032;
  --surface-container: #1D293B;
  --surface-container-high: #243347;
  --surface-container-highest: #2B3B52;
  --surface-variant: #1D293B;
  --surface-glass: rgba(9, 13, 22, 0.72);
  --surface-inset: #0C121E;

  /* text and lines */
  --on-surface: #E6EDF7;
  --on-surface-variant: #94A3B8;
  --inverse-surface: #E6EDF7;
  --inverse-on-surface: #111827;
  --outline: #64748B;
  --outline-variant: #2A3A52;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);

  /* accent */
  --primary: #38BDF8;
  --primary-action: #38BDF8;
  --primary-hover: #7DD3FC;
  --primary-container: #0C3A52;
  --on-primary: #04121C;
  --on-primary-container: #BAE6FD;
  --primary-fixed: #0E2A3D;
  --primary-fixed-dim: #155E82;
  --inverse-primary: #0EA5E9;
  --sentinel-blue: #38BDF8;
  --accent-soft: rgba(56, 189, 248, 0.10);
  --accent-ring: rgba(56, 189, 248, 0.28);

  --secondary: #94A3B8;
  --on-secondary: #111827;
  --secondary-container: #1D293B;
  --on-secondary-container: #CBD5E1;
  --navy-deep: #E6EDF7;
  --sand-light: #0D1320;
  --dune-shadow: #E6EDF7;

  /* status: the only place green / amber / red appear */
  --ok: #34D399;
  --ok-soft: rgba(52, 211, 153, 0.13);
  --ok-line: rgba(52, 211, 153, 0.32);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --warn-line: rgba(251, 191, 36, 0.32);
  --risk: #F87171;
  --risk-soft: rgba(248, 113, 113, 0.13);
  --risk-line: rgba(248, 113, 113, 0.34);
  --error: #F87171;
  --error-container: rgba(248, 113, 113, 0.13);
  --on-error: #1B0707;
  --on-error-container: #FECACA;
  --success-green: #34D399;
  --warning-orange: #FBBF24;
  --error-red: #F87171;
  --data-accent-orange: #FBBF24;
  --data-accent-purple: #818CF8;

  /* categorical chart palette: cool hues only */
  --chart-1: #38BDF8;
  --chart-2: #818CF8;
  --chart-3: #94A3B8;
  --chart-4: #22D3EE;
  --chart-5: #A78BFA;
  --chart-6: #7DD3FC;
  --chart-7: #64748B;
  --chart-8: #C4B5FD;

  /* glass */
  --glass-bg: rgba(17, 24, 39, 0.62);
  --glass-bg-strong: rgba(17, 24, 39, 0.86);
  --glass-border: rgba(148, 163, 184, 0.16);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --glass-blur: blur(16px) saturate(140%);
  --glow-accent: 0 0 0 1px rgba(56, 189, 248, 0.30), 0 0 24px -8px rgba(56, 189, 248, 0.55);

  /* shape, depth, motion */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 14px 34px -18px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 28px 70px -24px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 120ms;
  --t-base: 200ms;

  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-label: "JetBrains Mono", ui-monospace, monospace;
}

html[data-theme="dark"] body.dashboard-body {
  /* legacy scale used by dashboard.css / components */
  --gray-50: var(--surface);
  --gray-100: var(--surface-container-low);
  --gray-200: var(--border-subtle);
  --gray-300: var(--outline-variant);
  --gray-400: var(--outline);
  --gray-500: var(--on-surface-variant);
  --gray-600: var(--on-surface-variant);
  --gray-700: var(--on-surface);
  --gray-800: var(--on-surface);
  --gray-900: var(--on-surface);
  --white: var(--surface-container-lowest);
  --black: var(--on-surface);
  --primary-blue: var(--primary);
  --secondary-blue: var(--primary-hover);
  --light-blue: var(--accent-soft);
  --blue-50: var(--accent-soft);
  --dark-blue: var(--on-surface);
  --accent-purple: var(--on-surface);
  --accent-pink: var(--chart-2);
  --info-blue: var(--primary);
  --sidebar-width: 256px;
  --sidebar-width-collapsed: 72px;

  background:
    radial-gradient(60rem 38rem at 88% -12%, rgba(56, 189, 248, 0.10), transparent 62%),
    radial-gradient(48rem 34rem at -8% 108%, rgba(99, 102, 241, 0.07), transparent 60%),
    #090D16 !important;
  background-attachment: fixed !important;
  color: var(--on-surface);
  font-family: var(--font-body);
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -0.003em;
}

html[data-theme="dark"] body.dashboard-body ::selection {
  background: rgba(56, 189, 248, 0.30);
  color: #fff;
}

html[data-theme="dark"] body.dashboard-body * {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

html[data-theme="dark"] body.dashboard-body :focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] body.dashboard-body h1,
html[data-theme="dark"] body.dashboard-body h2,
html[data-theme="dark"] body.dashboard-body h3,
html[data-theme="dark"] body.dashboard-body h4 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

html[data-theme="dark"] body.dashboard-body a:where(:not([class])) {
  color: var(--primary);
}

html[data-theme="dark"] body.dashboard-body a:where(:not([class])):hover {
  color: var(--primary-hover);
}

/* ---------- 2. Shell ----------------------------------------------------- */
html[data-theme="dark"] body.dashboard-body .dashboard-main,
html[data-theme="dark"] body.dashboard-body .dashboard-content,
html[data-theme="dark"] body.dashboard-body .main-content {
  background: transparent !important;
}

html[data-theme="dark"] body.dashboard-body .dashboard-content {
  padding: 1.25rem 1.75rem 3rem;
}

html[data-theme="dark"] body.dashboard-body .dashboard-sidebar {
  background: rgba(9, 13, 22, 0.74) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-subtle) !important;
  box-shadow: none;
}

html[data-theme="dark"] body.dashboard-body .sidebar-header {
  padding: 1.1rem 1rem 0.6rem;
}

html[data-theme="dark"] body.dashboard-body .sidebar-logo h2 {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--on-surface);
}

html[data-theme="dark"] body.dashboard-body .beta-badge {
  background: var(--accent-soft);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  box-shadow: inset 0 0 0 1px var(--accent-ring);
  font-family: var(--font-label);
  font-weight: 500;
}

html[data-theme="dark"] body.dashboard-body .sidebar-rail-toggle,
html[data-theme="dark"] body.dashboard-body .sidebar-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--on-surface-variant);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .sidebar-rail-toggle:hover,
html[data-theme="dark"] body.dashboard-body .sidebar-toggle:hover {
  color: var(--on-surface);
  border-color: var(--border-strong);
  background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] body.dashboard-body .sidebar-profile-trigger {
  border-radius: var(--radius-md);
  transition: background var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .sidebar-profile-trigger:hover,
html[data-theme="dark"] body.dashboard-body .sidebar-profile.is-open .sidebar-profile-trigger {
  background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] body.dashboard-body .sidebar-profile-avatar {
  background: var(--accent-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--accent-ring);
  border-radius: 10px;
}

html[data-theme="dark"] body.dashboard-body .sidebar-profile-warn,
html[data-theme="dark"] body.dashboard-body .sidebar-nav .nav-link .nav-warning-icon,
html[data-theme="dark"] body.dashboard-body .nav-warning-icon {
  color: var(--warn);
}

html[data-theme="dark"] body.dashboard-body .sidebar-projects-label {
  font-family: var(--font-label);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--outline);
}

html[data-theme="dark"] body.dashboard-body .sidebar-project-select {
  background-color: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--on-surface);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .sidebar-project-select:hover {
  border-color: var(--border-strong);
}

html[data-theme="dark"] body.dashboard-body .sidebar-project-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
  outline: none;
}

html[data-theme="dark"] body.dashboard-body .sidebar-setup-link {
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--on-surface-variant);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .sidebar-setup-link:hover {
  color: var(--primary);
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav {
  padding: 0.5rem 0.6rem 1rem;
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav .nav-link {
  position: relative;
  margin: 0;
  padding: 0.55rem 0.7rem;
  min-height: 2.4rem;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--on-surface-variant);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav .nav-link .lucide-icon {
  opacity: 0.85;
  transition: color var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav .nav-link:hover:not(.active) {
  background: rgba(148, 163, 184, 0.08);
  color: var(--on-surface);
  transform: none;
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav .nav-link.active {
  background: var(--accent-soft);
  color: var(--on-surface);
  font-weight: 600;
  border: 0;
  box-shadow: var(--glow-accent);
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav .nav-link.active .lucide-icon:not(.nav-lock-icon):not(.nav-warning-icon) {
  color: var(--primary);
  opacity: 1;
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav .nav-link.is-plan-locked {
  opacity: 0.6;
}

html[data-theme="dark"] body.dashboard-body .sidebar-nav .nav-link .nav-lock-icon {
  color: var(--outline);
}

html[data-theme="dark"] body.dashboard-body .sidebar-overlay {
  background: rgba(4, 7, 13, 0.66);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

html[data-theme="dark"] body.dashboard-body .mobile-menu-toggle {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--on-surface);
  box-shadow: var(--shadow-md);
}

/* popovers: profile menu, notifications, column picker */
html[data-theme="dark"] body.dashboard-body .sidebar-profile-menu,
html[data-theme="dark"] body.dashboard-body .notif-panel,
html[data-theme="dark"] body.dashboard-body .bots-col-picker-menu {
  background: var(--glass-bg-strong) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight), var(--shadow-lg);
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .sidebar-profile-item {
  border-radius: var(--radius-sm);
  color: var(--on-surface-variant);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .sidebar-profile-item:hover {
  background: rgba(148, 163, 184, 0.10);
  color: var(--on-surface);
}

html[data-theme="dark"] body.dashboard-body .sidebar-profile-item.is-danger,
html[data-theme="dark"] body.dashboard-body .sidebar-profile-item.is-danger:hover {
  color: var(--risk);
}

html[data-theme="dark"] body.dashboard-body .sidebar-profile-item.is-danger:hover {
  background: var(--risk-soft);
}

/* page header */
html[data-theme="dark"] body.dashboard-body .page-header {
  margin: 0 -0.75rem 1.25rem;
  padding: 0.7rem 0.75rem;
  background: rgba(9, 13, 22, 0.62);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
}

html[data-theme="dark"] body.dashboard-body .page-header h1 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}

html[data-theme="dark"] body.dashboard-body .page-header #page-subtitle,
html[data-theme="dark"] body.dashboard-body .page-header .user-info {
  color: var(--on-surface-variant);
}

html[data-theme="dark"] body.dashboard-body .notif-bell-btn {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--on-surface-variant);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .notif-bell-btn:hover {
  color: var(--on-surface);
  border-color: var(--border-strong);
}

html[data-theme="dark"] body.dashboard-body .notif-bell.is-open .notif-bell-btn {
  color: var(--primary);
  border-color: transparent;
  box-shadow: var(--glow-accent);
}

html[data-theme="dark"] body.dashboard-body .notif-badge {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 0 0 2px #090D16;
  font-family: var(--font-label);
}

html[data-theme="dark"] body.dashboard-body .notif-panel-head {
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
}

html[data-theme="dark"] body.dashboard-body .notif-mark-all {
  color: var(--primary);
}

/* ---------- 3. Surfaces -------------------------------------------------- */

/* 3a. Glass cards */
html[data-theme="dark"] body.dashboard-body .metric-card,
html[data-theme="dark"] body.dashboard-body .period-compare-card,
html[data-theme="dark"] body.dashboard-body .overview-hero-banner,
html[data-theme="dark"] body.dashboard-body .overview-insights-card,
html[data-theme="dark"] body.dashboard-body .overview-priorities-card,
html[data-theme="dark"] body.dashboard-body .overview-changes-card,
html[data-theme="dark"] body.dashboard-body .overview-status-card,
html[data-theme="dark"] body.dashboard-body .overview-checklist,
html[data-theme="dark"] body.dashboard-body .overview-robots-change,
html[data-theme="dark"] body.dashboard-body .overview-card,
html[data-theme="dark"] body.dashboard-body .crawl-live-strip,
html[data-theme="dark"] body.dashboard-body .analytics-card,
html[data-theme="dark"] body.dashboard-body .analytics-card.metric-card,
html[data-theme="dark"] body.dashboard-body .chart-container,
html[data-theme="dark"] body.dashboard-body .sentinel-chart-card,
html[data-theme="dark"] body.dashboard-body .chart-container.sentinel-chart-card,
html[data-theme="dark"] body.dashboard-body #traffic-section .chart-container,
html[data-theme="dark"] body.dashboard-body #traffic-section .sentinel-chart-card,
html[data-theme="dark"] body.dashboard-body .settings-card,
html[data-theme="dark"] body.dashboard-body #billing-section .billing-card,
html[data-theme="dark"] body.dashboard-body #billing-section .billing-history,
html[data-theme="dark"] body.dashboard-body .site-card,
html[data-theme="dark"] body.dashboard-body .integrations-card,
html[data-theme="dark"] body.dashboard-body .integrations-empty,
html[data-theme="dark"] body.dashboard-body .card-empty,
html[data-theme="dark"] body.dashboard-body .realtime-card,
html[data-theme="dark"] body.dashboard-body .referrers-panel,
html[data-theme="dark"] body.dashboard-body .plan-gate-panel,
html[data-theme="dark"] body.dashboard-body .sitemap-status-card,
html[data-theme="dark"] body.dashboard-body .bot-auth-stat,
html[data-theme="dark"] body.dashboard-body .sites-header,
html[data-theme="dark"] body.dashboard-body .bots-header,
html[data-theme="dark"] body.dashboard-body .analytics-header,
html[data-theme="dark"] body.dashboard-body .section-error-state {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 42%),
    var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--glass-highlight), var(--shadow-md) !important;
  color: var(--on-surface) !important;
}

/* Real blur only where something sits behind the card (ambient glow, sticky
   chrome). Keeps scrolling smooth on long data pages. */
html[data-theme="dark"] body.dashboard-body #overview-section .metric-card,
html[data-theme="dark"] body.dashboard-body #overview-section .period-compare-card,
html[data-theme="dark"] body.dashboard-body #overview-section .overview-hero-banner,
html[data-theme="dark"] body.dashboard-body #overview-section .overview-insights-card,
html[data-theme="dark"] body.dashboard-body #overview-section .overview-status-card,
html[data-theme="dark"] body.dashboard-body #overview-section .overview-checklist,
html[data-theme="dark"] body.dashboard-body #overview-section .crawl-live-strip,
html[data-theme="dark"] body.dashboard-body .plan-gate-panel {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* interactive tiles */
html[data-theme="dark"] body.dashboard-body .metric-card,
html[data-theme="dark"] body.dashboard-body .analytics-card,
html[data-theme="dark"] body.dashboard-body .site-card,
html[data-theme="dark"] body.dashboard-body .integrations-card,
html[data-theme="dark"] body.dashboard-body .bot-auth-stat,
html[data-theme="dark"] body.dashboard-body .period-compare-item {
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .metric-card:hover,
html[data-theme="dark"] body.dashboard-body .analytics-card:hover,
html[data-theme="dark"] body.dashboard-body .site-card:hover,
html[data-theme="dark"] body.dashboard-body .integrations-card:hover,
html[data-theme="dark"] body.dashboard-body .overview-card:hover,
html[data-theme="dark"] body.dashboard-body .card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong) !important;
  box-shadow: var(--glass-highlight), 0 20px 44px -22px rgba(0, 0, 0, 0.9) !important;
}

/* nested tiles inside a glass card: one step lighter, no blur */
html[data-theme="dark"] body.dashboard-body .period-compare-item,
html[data-theme="dark"] body.dashboard-body .overview-priority-item,
html[data-theme="dark"] body.dashboard-body .overview-change-item,
html[data-theme="dark"] body.dashboard-body .overview-check-item,
html[data-theme="dark"] body.dashboard-body .ai-insights-metric,
html[data-theme="dark"] body.dashboard-body .ai-insights-rec-item,
html[data-theme="dark"] body.dashboard-body .readiness-history,
html[data-theme="dark"] body.dashboard-body .readiness-missing-item,
html[data-theme="dark"] body.dashboard-body .sitemap-gap-stat,
html[data-theme="dark"] body.dashboard-body #llms-section .sitemap-gap-stat,
html[data-theme="dark"] body.dashboard-body #sitemap-section .sitemap-gap-stat,
html[data-theme="dark"] body.dashboard-body .settings-card .email-pref-item,
html[data-theme="dark"] body.dashboard-body .bots-filters-advanced,
html[data-theme="dark"] body.dashboard-body .robots-history-item {
  background: rgba(148, 163, 184, 0.06) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  color: var(--on-surface) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dashboard-body .overview-check-item:hover,
html[data-theme="dark"] body.dashboard-body .overview-priority-item:hover,
html[data-theme="dark"] body.dashboard-body .robots-history-item:hover {
  background: rgba(148, 163, 184, 0.10) !important;
  border-color: var(--border-strong) !important;
}

html[data-theme="dark"] body.dashboard-body .robots-history-item.is-active {
  background: var(--accent-soft) !important;
  border-color: var(--accent-ring) !important;
}

html[data-theme="dark"] body.dashboard-body .site-card .card-header,
html[data-theme="dark"] body.dashboard-body .site-card .card-footer {
  background: transparent !important;
  border-color: var(--border-subtle) !important;
}

html[data-theme="dark"] body.dashboard-body .settings-card h3,
html[data-theme="dark"] body.dashboard-body #billing-section .billing-card h3,
html[data-theme="dark"] body.dashboard-body #billing-section .billing-history h3,
html[data-theme="dark"] body.dashboard-body .chart-container h3,
html[data-theme="dark"] body.dashboard-body .sentinel-chart-card h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--on-surface) !important;
}

/* 3b. Solid data surfaces: tables, logs, code */
html[data-theme="dark"] body.dashboard-body .bots-table-container,
html[data-theme="dark"] body.dashboard-body .traffic-table-container,
html[data-theme="dark"] body.dashboard-body .table-container,
html[data-theme="dark"] body.dashboard-body .billing-table-container {
  background: var(--surface-container-lowest) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md);
}

html[data-theme="dark"] body.dashboard-body .bots-table,
html[data-theme="dark"] body.dashboard-body .data-table,
html[data-theme="dark"] body.dashboard-body table {
  background: transparent !important;
  border-color: var(--border-subtle) !important;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] body.dashboard-body .bots-table th,
html[data-theme="dark"] body.dashboard-body .data-table th,
html[data-theme="dark"] body.dashboard-body table th {
  background: #0D1422 !important;
  color: var(--on-surface-variant) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

html[data-theme="dark"] body.dashboard-body .bots-table td,
html[data-theme="dark"] body.dashboard-body .data-table td,
html[data-theme="dark"] body.dashboard-body table td {
  background: transparent !important;
  color: var(--on-surface) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08) !important;
}

html[data-theme="dark"] body.dashboard-body .bots-table tbody tr,
html[data-theme="dark"] body.dashboard-body .data-table tbody tr,
html[data-theme="dark"] body.dashboard-body table tbody tr {
  transition: background var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .bots-table tbody tr:hover,
html[data-theme="dark"] body.dashboard-body .data-table tbody tr:hover,
html[data-theme="dark"] body.dashboard-body table tbody tr:hover {
  background: rgba(56, 189, 248, 0.045) !important;
}

html[data-theme="dark"] body.dashboard-body .bots-table tbody tr:last-child td,
html[data-theme="dark"] body.dashboard-body .data-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

html[data-theme="dark"] body.dashboard-body pre,
html[data-theme="dark"] body.dashboard-body code,
html[data-theme="dark"] body.dashboard-body .robots-suggestion-pre,
html[data-theme="dark"] body.dashboard-body .robots-diff-pane,
html[data-theme="dark"] body.dashboard-body .bot-detail-snippet,
html[data-theme="dark"] body.dashboard-body .bot-detail-ua,
html[data-theme="dark"] body.dashboard-body .site-card code,
html[data-theme="dark"] body.dashboard-body .site-card .site-meta-code {
  background: var(--surface-inset) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm);
  color: #CFE3F5 !important;
  font-family: var(--font-label);
}

html[data-theme="dark"] body.dashboard-body pre code,
html[data-theme="dark"] body.dashboard-body td code {
  border: 0 !important;
  background: transparent !important;
}

html[data-theme="dark"] body.dashboard-body .mono,
html[data-theme="dark"] body.dashboard-body .mono-ts {
  font-family: var(--font-label);
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
}

/* 3c. Buttons */
html[data-theme="dark"] body.dashboard-body .btn {
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

html[data-theme="dark"] body.dashboard-body .btn:disabled,
html[data-theme="dark"] body.dashboard-body .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

html[data-theme="dark"] body.dashboard-body .btn-primary,
html[data-theme="dark"] body.dashboard-body .settings-card .btn-primary,
html[data-theme="dark"] body.dashboard-body .nmos-tour-card .btn-primary {
  background: var(--primary) !important;
  border: 1px solid transparent !important;
  color: var(--on-primary) !important;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 8px 22px -12px rgba(56, 189, 248, 0.7);
}

html[data-theme="dark"] body.dashboard-body .btn-primary:hover:not(:disabled),
html[data-theme="dark"] body.dashboard-body .settings-card .btn-primary:hover:not(:disabled) {
  background: var(--primary-hover) !important;
  transform: none;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.4), 0 10px 28px -12px rgba(56, 189, 248, 0.85);
}

html[data-theme="dark"] body.dashboard-body .btn-primary .lucide-icon {
  color: inherit;
}

html[data-theme="dark"] body.dashboard-body .btn-secondary,
html[data-theme="dark"] body.dashboard-body .btn-outline,
html[data-theme="dark"] body.dashboard-body .settings-card .btn-secondary,
html[data-theme="dark"] body.dashboard-body .site-card .btn-secondary,
html[data-theme="dark"] body.dashboard-body #llms-section .btn-secondary,
html[data-theme="dark"] body.dashboard-body #sitemap-section .btn-secondary,
html[data-theme="dark"] body.dashboard-body #robots-section .btn-secondary,
html[data-theme="dark"] body.dashboard-body .nmos-tour-card .btn-secondary {
  background: rgba(148, 163, 184, 0.07) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--on-surface) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dashboard-body .btn-secondary:hover:not(:disabled),
html[data-theme="dark"] body.dashboard-body .btn-outline:hover:not(:disabled),
html[data-theme="dark"] body.dashboard-body .settings-card .btn-secondary:hover:not(:disabled),
html[data-theme="dark"] body.dashboard-body .site-card .btn-secondary:hover:not(:disabled),
html[data-theme="dark"] body.dashboard-body #llms-section .btn-secondary:hover:not(:disabled),
html[data-theme="dark"] body.dashboard-body #sitemap-section .btn-secondary:hover:not(:disabled),
html[data-theme="dark"] body.dashboard-body #robots-section .btn-secondary:hover:not(:disabled) {
  background: var(--accent-soft) !important;
  border-color: var(--accent-ring) !important;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .btn-danger,
html[data-theme="dark"] body.dashboard-body .btn-error {
  background: var(--risk-soft) !important;
  border: 1px solid var(--risk-line) !important;
  color: #FCA5A5 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dashboard-body .btn-danger:hover:not(:disabled),
html[data-theme="dark"] body.dashboard-body .btn-error:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.22) !important;
  color: #FECACA !important;
}

/* 3d. Forms */
html[data-theme="dark"] body.dashboard-body .form-input,
html[data-theme="dark"] body.dashboard-body .form-select,
html[data-theme="dark"] body.dashboard-body .form-textarea,
html[data-theme="dark"] body.dashboard-body .filter-select,
html[data-theme="dark"] body.dashboard-body input[type="text"],
html[data-theme="dark"] body.dashboard-body input[type="email"],
html[data-theme="dark"] body.dashboard-body input[type="password"],
html[data-theme="dark"] body.dashboard-body input[type="url"],
html[data-theme="dark"] body.dashboard-body input[type="number"],
html[data-theme="dark"] body.dashboard-body input[type="search"],
html[data-theme="dark"] body.dashboard-body input[type="date"],
html[data-theme="dark"] body.dashboard-body select,
html[data-theme="dark"] body.dashboard-body textarea,
html[data-theme="dark"] body.dashboard-body .settings-card .form-input,
html[data-theme="dark"] body.dashboard-body .settings-card input[type="text"],
html[data-theme="dark"] body.dashboard-body .settings-card input[type="email"],
html[data-theme="dark"] body.dashboard-body .settings-card input[type="password"],
html[data-theme="dark"] body.dashboard-body .settings-card input[type="url"],
html[data-theme="dark"] body.dashboard-body .settings-card select {
  background-color: var(--surface-inset) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  color: var(--on-surface) !important;
  -webkit-text-fill-color: var(--on-surface) !important;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body input::placeholder,
html[data-theme="dark"] body.dashboard-body textarea::placeholder {
  color: var(--outline);
  -webkit-text-fill-color: var(--outline);
}

html[data-theme="dark"] body.dashboard-body .form-input:focus,
html[data-theme="dark"] body.dashboard-body .filter-select:focus,
html[data-theme="dark"] body.dashboard-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
html[data-theme="dark"] body.dashboard-body select:focus,
html[data-theme="dark"] body.dashboard-body textarea:focus,
html[data-theme="dark"] body.dashboard-body .settings-card .form-input:focus,
html[data-theme="dark"] body.dashboard-body .settings-card input:focus,
html[data-theme="dark"] body.dashboard-body .settings-card select:focus {
  background-color: #0E1626 !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16) !important;
  outline: none;
}

html[data-theme="dark"] body.dashboard-body .form-label,
html[data-theme="dark"] body.dashboard-body .settings-card .form-label,
html[data-theme="dark"] body.dashboard-body .settings-card label:not(.checkbox-label),
html[data-theme="dark"] body.dashboard-body .bots-filter-label {
  color: var(--on-surface-variant) !important;
  font-size: 0.78rem;
  font-weight: 500;
}

html[data-theme="dark"] body.dashboard-body .form-help {
  color: var(--outline) !important;
}

html[data-theme="dark"] body.dashboard-body input[type="checkbox"],
html[data-theme="dark"] body.dashboard-body input[type="radio"] {
  accent-color: var(--primary);
}

/* 3e. Tabs, chips, segmented controls */
html[data-theme="dark"] body.dashboard-body .settings-tabs,
html[data-theme="dark"] body.dashboard-body .bots-view-tabs,
html[data-theme="dark"] body.dashboard-body .sentinel-type-tabs {
  background: rgba(148, 163, 184, 0.06) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  padding: 0.25rem;
  gap: 0.2rem;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dashboard-body .settings-tab,
html[data-theme="dark"] body.dashboard-body .bots-view-tab,
html[data-theme="dark"] body.dashboard-body .analytics-type-btn,
html[data-theme="dark"] body.dashboard-body .robots-filter-btn,
html[data-theme="dark"] body.dashboard-body .bots-filter-chip,
html[data-theme="dark"] body.dashboard-body .bots-col-picker > summary,
html[data-theme="dark"] body.dashboard-body .sitemap-gap-scope-btn,
html[data-theme="dark"] body.dashboard-body #llms-section .sitemap-gap-scope-btn,
html[data-theme="dark"] body.dashboard-body #sitemap-section .sitemap-gap-scope-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: var(--radius-sm) !important;
  color: var(--on-surface-variant) !important;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .robots-filter-btn,
html[data-theme="dark"] body.dashboard-body .bots-filter-chip,
html[data-theme="dark"] body.dashboard-body .bots-col-picker > summary,
html[data-theme="dark"] body.dashboard-body .sitemap-gap-scope-btn,
html[data-theme="dark"] body.dashboard-body #llms-section .sitemap-gap-scope-btn,
html[data-theme="dark"] body.dashboard-body #sitemap-section .sitemap-gap-scope-btn {
  border-color: var(--border-subtle) !important;
  background: rgba(148, 163, 184, 0.05) !important;
}

html[data-theme="dark"] body.dashboard-body .settings-tab:hover,
html[data-theme="dark"] body.dashboard-body .bots-view-tab:hover,
html[data-theme="dark"] body.dashboard-body .analytics-type-btn:hover,
html[data-theme="dark"] body.dashboard-body .robots-filter-btn:hover,
html[data-theme="dark"] body.dashboard-body .bots-filter-chip:hover,
html[data-theme="dark"] body.dashboard-body .bots-col-picker > summary:hover,
html[data-theme="dark"] body.dashboard-body .sitemap-gap-scope-btn:hover {
  background: rgba(148, 163, 184, 0.10) !important;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .settings-tab.is-active,
html[data-theme="dark"] body.dashboard-body .bots-view-tab.is-active,
html[data-theme="dark"] body.dashboard-body .analytics-type-btn.active,
html[data-theme="dark"] body.dashboard-body .robots-filter-btn.is-active,
html[data-theme="dark"] body.dashboard-body .bots-filter-chip.is-active,
html[data-theme="dark"] body.dashboard-body .sitemap-gap-scope-btn.is-active,
html[data-theme="dark"] body.dashboard-body #llms-section .sitemap-gap-scope-btn.is-active,
html[data-theme="dark"] body.dashboard-body #sitemap-section .sitemap-gap-scope-btn.is-active {
  background: var(--accent-soft) !important;
  border-color: var(--accent-ring) !important;
  color: var(--primary) !important;
  box-shadow: 0 0 18px -8px rgba(56, 189, 248, 0.6);
}

/* 3f. Status and risk: green / amber / red only */
html[data-theme="dark"] body.dashboard-body .status-badge,
html[data-theme="dark"] body.dashboard-body .safety-badge,
html[data-theme="dark"] body.dashboard-body .security-badge,
html[data-theme="dark"] body.dashboard-body .llms-status-badge,
html[data-theme="dark"] body.dashboard-body .visitor-type-badge,
html[data-theme="dark"] body.dashboard-body .integrations-card-badge,
html[data-theme="dark"] body.dashboard-body .integrations-card-status,
html[data-theme="dark"] body.dashboard-body .plan-gate-badge,
html[data-theme="dark"] body.dashboard-body .referrer-badge,
html[data-theme="dark"] body.dashboard-body .robots-visited-badge,
html[data-theme="dark"] body.dashboard-body .site-tracking-stale-badge,
html[data-theme="dark"] body.dashboard-body .overview-level {
  border-radius: 999px !important;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* neutral / informational */
html[data-theme="dark"] body.dashboard-body .safety-badge.safety-unknown,
html[data-theme="dark"] body.dashboard-body .integrations-card-badge--muted,
html[data-theme="dark"] body.dashboard-body .visitor-type-badge.direct,
html[data-theme="dark"] body.dashboard-body .visitor-type-badge.user,
html[data-theme="dark"] body.dashboard-body .robots-visited-badge,
html[data-theme="dark"] body.dashboard-body .llms-status-badge,
html[data-theme="dark"] body.dashboard-body #llms-section .llms-status-badge,
html[data-theme="dark"] body.dashboard-body #sitemap-section .llms-status-badge,
html[data-theme="dark"] body.dashboard-body #crawl-bot-section .llms-status-badge {
  background: rgba(148, 163, 184, 0.10) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--on-surface-variant) !important;
}

html[data-theme="dark"] body.dashboard-body .integrations-card-badge,
html[data-theme="dark"] body.dashboard-body .integrations-card-status.is-info,
html[data-theme="dark"] body.dashboard-body .plan-gate-badge,
html[data-theme="dark"] body.dashboard-body .overview-level,
html[data-theme="dark"] body.dashboard-body .referrer-badge.is-new,
html[data-theme="dark"] body.dashboard-body .bots-timeline-signal.is-new,
html[data-theme="dark"] body.dashboard-body .visitor-type-badge.bot,
html[data-theme="dark"] body.dashboard-body .visitor-type-badge.organic,
html[data-theme="dark"] body.dashboard-body .visitor-type-badge.referrer-organic,
html[data-theme="dark"] body.dashboard-body .visitor-type-badge.referrer-referral,
html[data-theme="dark"] body.dashboard-body .visitor-type-badge.referrer-social,
html[data-theme="dark"] body.dashboard-body .security-badge.safe,
html[data-theme="dark"] body.dashboard-body .badge-safe {
  background: var(--accent-soft) !important;
  border: 1px solid var(--accent-ring) !important;
  color: var(--primary) !important;
}

/* ok */
html[data-theme="dark"] body.dashboard-body .status-badge.status-success,
html[data-theme="dark"] body.dashboard-body .safety-badge.safety-safe,
html[data-theme="dark"] body.dashboard-body .integrations-card-status.is-ok,
html[data-theme="dark"] body.dashboard-body .llms-status-ok,
html[data-theme="dark"] body.dashboard-body #llms-section .llms-status-ok,
html[data-theme="dark"] body.dashboard-body #sitemap-section .llms-status-ok,
html[data-theme="dark"] body.dashboard-body #crawl-bot-section .llms-status-ok,
html[data-theme="dark"] body.dashboard-body .robots-alert-ok,
html[data-theme="dark"] body.dashboard-body .settings-card .totp-disable-email-status.is-success {
  background: var(--ok-soft) !important;
  border: 1px solid var(--ok-line) !important;
  color: var(--ok) !important;
}

/* warn */
html[data-theme="dark"] body.dashboard-body .status-badge.status-warning,
html[data-theme="dark"] body.dashboard-body .safety-badge.safety-caution,
html[data-theme="dark"] body.dashboard-body .security-badge.caution,
html[data-theme="dark"] body.dashboard-body .badge-caution,
html[data-theme="dark"] body.dashboard-body .llms-status-warn,
html[data-theme="dark"] body.dashboard-body #llms-section .llms-status-warn,
html[data-theme="dark"] body.dashboard-body #sitemap-section .llms-status-warn,
html[data-theme="dark"] body.dashboard-body #crawl-bot-section .llms-status-warn,
html[data-theme="dark"] body.dashboard-body .robots-alert-warn,
html[data-theme="dark"] body.dashboard-body .site-tracking-stale-badge,
html[data-theme="dark"] body.dashboard-body .bot-auth-rising,
html[data-theme="dark"] body.dashboard-body .plan-quota-banner--warn,
html[data-theme="dark"] body.dashboard-body .bot-auth-stat.is-warn {
  background: var(--warn-soft) !important;
  border: 1px solid var(--warn-line) !important;
  color: var(--warn) !important;
}

/* risk */
html[data-theme="dark"] body.dashboard-body .status-badge.status-error,
html[data-theme="dark"] body.dashboard-body .safety-badge.safety-danger,
html[data-theme="dark"] body.dashboard-body .security-badge.danger,
html[data-theme="dark"] body.dashboard-body .badge-danger,
html[data-theme="dark"] body.dashboard-body .plan-quota-banner--danger,
html[data-theme="dark"] body.dashboard-body .bot-auth-stat.is-danger,
html[data-theme="dark"] body.dashboard-body .settings-card .totp-disable-email-status.is-error {
  background: var(--risk-soft) !important;
  border: 1px solid var(--risk-line) !important;
  color: var(--risk) !important;
}

html[data-theme="dark"] body.dashboard-body .robots-alert,
html[data-theme="dark"] body.dashboard-body .robots-alert-info,
html[data-theme="dark"] body.dashboard-body .site-health-banner,
html[data-theme="dark"] body.dashboard-body .sites-privacy-note,
html[data-theme="dark"] body.dashboard-body .plan-quota-banner,
html[data-theme="dark"] body.dashboard-body .plan-quota-banner--upgrade,
html[data-theme="dark"] body.dashboard-body .plan-gate-invite,
html[data-theme="dark"] body.dashboard-body .plan-gate-collect-note,
html[data-theme="dark"] body.dashboard-body .settings-card .totp-disable-email-status.is-info {
  background: var(--accent-soft) !important;
  border: 1px solid var(--accent-ring) !important;
  border-radius: var(--radius-md) !important;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .plan-quota-banner--warn,
html[data-theme="dark"] body.dashboard-body .robots-alert-warn {
  background: var(--warn-soft) !important;
  border-color: var(--warn-line) !important;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .plan-quota-banner--danger {
  background: var(--risk-soft) !important;
  border-color: var(--risk-line) !important;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .robots-alert-ok,
html[data-theme="dark"] body.dashboard-body .bot-auth-stat.is-warn,
html[data-theme="dark"] body.dashboard-body .bot-auth-stat.is-danger {
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .bots-sort-btn.is-active {
  color: var(--primary);
}

html[data-theme="dark"] body.dashboard-body tr.is-bot-selected > td {
  background: var(--accent-soft) !important;
}

html[data-theme="dark"] body.dashboard-body .plan-quota-banner__copy strong,
html[data-theme="dark"] body.dashboard-body .site-health-banner strong,
html[data-theme="dark"] body.dashboard-body .sites-privacy-note strong {
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .plan-quota-banner__copy p,
html[data-theme="dark"] body.dashboard-body .plan-quota-banner--warn .plan-quota-banner__copy p,
html[data-theme="dark"] body.dashboard-body .plan-quota-banner--danger .plan-quota-banner__copy p,
html[data-theme="dark"] body.dashboard-body .plan-quota-banner--upgrade .plan-quota-banner__copy p,
html[data-theme="dark"] body.dashboard-body .site-health-banner__body {
  color: var(--on-surface-variant) !important;
}

html[data-theme="dark"] body.dashboard-body .metric-trend.is-up,
html[data-theme="dark"] body.dashboard-body .traffic-metric-delta.is-up,
html[data-theme="dark"] body.dashboard-body .readiness-score-delta.is-up,
html[data-theme="dark"] body.dashboard-body .readiness-score-value.is-high,
html[data-theme="dark"] body.dashboard-body .readiness-check-item.is-ok button,
html[data-theme="dark"] body.dashboard-body .site-health-ssl {
  color: var(--ok) !important;
}

html[data-theme="dark"] body.dashboard-body .metric-trend.is-down,
html[data-theme="dark"] body.dashboard-body .traffic-metric-delta.is-down,
html[data-theme="dark"] body.dashboard-body .readiness-score-delta.is-down,
html[data-theme="dark"] body.dashboard-body .readiness-score-value.is-low,
html[data-theme="dark"] body.dashboard-body .bot-auth-overview-card.is-warn .bot-auth-overview-pct,
html[data-theme="dark"] body.dashboard-body .ai-insights-card.is-warn .ai-insights-metric-value[data-ai="risky"] {
  color: var(--risk) !important;
}

html[data-theme="dark"] body.dashboard-body .readiness-score-value.is-mid,
html[data-theme="dark"] body.dashboard-body .readiness-check-item.is-miss button,
html[data-theme="dark"] body.dashboard-body .site-tracking-score.is-stale,
html[data-theme="dark"] body.dashboard-body .site-tracking-stale-hint,
html[data-theme="dark"] body.dashboard-body .robots-last-scanned.is-stale {
  color: var(--warn) !important;
}

html[data-theme="dark"] body.dashboard-body .overview-live-dot,
html[data-theme="dark"] body.dashboard-body .metric-live-dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14), 0 0 12px rgba(52, 211, 153, 0.6);
}

html[data-theme="dark"] body.dashboard-body .metric-card-live {
  background:
    linear-gradient(180deg, rgba(52, 211, 153, 0.07), rgba(52, 211, 153, 0) 55%),
    var(--glass-bg) !important;
  border-color: var(--ok-line) !important;
}

/* 3g. Modals, toasts, tour */
html[data-theme="dark"] body.dashboard-body .modal,
html[data-theme="dark"] body.dashboard-body .modal-overlay {
  background: rgba(4, 7, 13, 0.68) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

html[data-theme="dark"] body.dashboard-body .modal-content,
html[data-theme="dark"] body.dashboard-body #botDetailModal .modal-content,
html[data-theme="dark"] body.dashboard-body #addSiteModal .modal-content,
html[data-theme="dark"] body.dashboard-body .nmos-tour-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 30%),
    var(--glass-bg-strong) !important;
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--glass-highlight), var(--shadow-lg) !important;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .modal-content {
  transform: scale(0.97) translateY(10px);
  transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .modal.active .modal-content {
  transform: none;
}

html[data-theme="dark"] body.dashboard-body .modal-header,
html[data-theme="dark"] body.dashboard-body .modal-footer {
  background: transparent !important;
  border-color: var(--border-subtle) !important;
}

html[data-theme="dark"] body.dashboard-body .modal-title,
html[data-theme="dark"] body.dashboard-body .modal-header h3,
html[data-theme="dark"] body.dashboard-body .modal-content h3 {
  font-family: var(--font-display);
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .modal-close,
html[data-theme="dark"] body.dashboard-body .modal-header button.close {
  color: var(--on-surface-variant);
  border-radius: var(--radius-sm);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .modal-close:hover,
html[data-theme="dark"] body.dashboard-body .modal-header button.close:hover {
  background: rgba(148, 163, 184, 0.12) !important;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .toast,
html[data-theme="dark"] body.dashboard-body .toast-container .toast-success,
html[data-theme="dark"] body.dashboard-body .toast-container .toast-error,
html[data-theme="dark"] body.dashboard-body .toast-container .toast-warning,
html[data-theme="dark"] body.dashboard-body .toast-container .toast-info {
  background: var(--glass-bg-strong) !important;
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border) !important;
  border-left: 3px solid var(--primary) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .toast-container .toast-success { border-left-color: var(--ok) !important; }
html[data-theme="dark"] body.dashboard-body .toast-container .toast-warning { border-left-color: var(--warn) !important; }
html[data-theme="dark"] body.dashboard-body .toast-container .toast-error { border-left-color: var(--risk) !important; }

html[data-theme="dark"] body.dashboard-body .toast-container .toast-message {
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .nmos-tour-backdrop {
  background: rgba(4, 7, 13, 0.6) !important;
}

html[data-theme="dark"] body.dashboard-body .nmos-tour-highlight {
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 9999px rgba(4, 7, 13, 0.55), 0 0 30px rgba(56, 189, 248, 0.45) !important;
  border-radius: var(--radius-md);
}

/* skeletons */
html[data-theme="dark"] body.dashboard-body .dash-skel-bone {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.08) 25%, rgba(148, 163, 184, 0.16) 37%, rgba(148, 163, 184, 0.08) 63%) !important;
  background-size: 400% 100% !important;
  border-radius: 6px;
}

/* ---------- 4. Metrics typography ---------------------------------------- */
html[data-theme="dark"] body.dashboard-body .metric-label,
html[data-theme="dark"] body.dashboard-body .ai-insights-metric-label,
html[data-theme="dark"] body.dashboard-body .traffic-metric-period,
html[data-theme="dark"] body.dashboard-body .overview-metrics-hint,
html[data-theme="dark"] body.dashboard-body .period-compare-hint {
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-surface-variant) !important;
}

html[data-theme="dark"] body.dashboard-body .period-compare-hint,
html[data-theme="dark"] body.dashboard-body .overview-metrics-hint {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
}

html[data-theme="dark"] body.dashboard-body .metric-value,
html[data-theme="dark"] body.dashboard-body .stat-number,
html[data-theme="dark"] body.dashboard-body .ai-insights-metric-value,
html[data-theme="dark"] body.dashboard-body .readiness-score-value,
html[data-theme="dark"] body.dashboard-body .bot-auth-overview-pct {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface);
}

html[data-theme="dark"] body.dashboard-body .metric-sub,
html[data-theme="dark"] body.dashboard-body .metric-more {
  color: var(--outline) !important;
}

html[data-theme="dark"] body.dashboard-body .metric-card .lucide-icon.metric-icon,
html[data-theme="dark"] body.dashboard-body .metric-card-head > .lucide-icon,
html[data-theme="dark"] body.dashboard-body .overview-insights-icon,
html[data-theme="dark"] body.dashboard-body .overview-status-icon,
html[data-theme="dark"] body.dashboard-body .card-icon {
  color: var(--primary);
}

html[data-theme="dark"] body.dashboard-body .overview-insights-icon,
html[data-theme="dark"] body.dashboard-body .overview-status-icon,
html[data-theme="dark"] body.dashboard-body .card-icon {
  background: var(--accent-soft) !important;
  box-shadow: inset 0 0 0 1px var(--accent-ring);
  border-radius: 12px;
}

html[data-theme="dark"] body.dashboard-body .metric-progress-track,
html[data-theme="dark"] body.dashboard-body .bot-path-heat-bar-track,
html[data-theme="dark"] body.dashboard-body .usage-bar,
html[data-theme="dark"] body.dashboard-body .progress-bar {
  background: rgba(148, 163, 184, 0.12) !important;
  border-radius: 999px;
  overflow: hidden;
}

html[data-theme="dark"] body.dashboard-body .metric-progress-fill,
html[data-theme="dark"] body.dashboard-body .metric-timeline-fill {
  border-radius: 999px;
}

html[data-theme="dark"] body.dashboard-body .metric-progress-fill.primary,
html[data-theme="dark"] body.dashboard-body .metric-timeline-fill {
  background: var(--primary) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

html[data-theme="dark"] body.dashboard-body .metric-progress-fill.orange {
  background: var(--chart-2) !important;
}

html[data-theme="dark"] body.dashboard-body .metric-timeline-track {
  background: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] body.dashboard-body .metric-timeline-knob {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18), 0 0 14px rgba(56, 189, 248, 0.7);
}

/* ---------- 5. Bento grids ----------------------------------------------- */

/* Overview: main + aside dissolve into one 12-column bento. */
html[data-theme="dark"] body.dashboard-body .overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

html[data-theme="dark"] body.dashboard-body .overview-layout > .overview-main,
html[data-theme="dark"] body.dashboard-body .overview-layout > .overview-aside {
  display: contents;
}

html[data-theme="dark"] body.dashboard-body .overview-layout > .overview-main > *,
html[data-theme="dark"] body.dashboard-body .overview-layout > .overview-aside > * {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  width: auto;
  max-width: none;
}

html[data-theme="dark"] body.dashboard-body .overview-hero-banner { order: 1; }
html[data-theme="dark"] body.dashboard-body .overview-status-card { order: 2; }
html[data-theme="dark"] body.dashboard-body .crawl-live-strip { order: 3; }
html[data-theme="dark"] body.dashboard-body .overview-priorities-card,
html[data-theme="dark"] body.dashboard-body .overview-changes-card { order: 4; }
html[data-theme="dark"] body.dashboard-body .readiness-score-card { order: 5; }
html[data-theme="dark"] body.dashboard-body .period-compare-card[data-period-compare] { order: 6; }
html[data-theme="dark"] body.dashboard-body .overview-insights-card { order: 7; }
html[data-theme="dark"] body.dashboard-body .bot-auth-overview-card { order: 8; }
html[data-theme="dark"] body.dashboard-body .ai-insights-card { order: 9; }
html[data-theme="dark"] body.dashboard-body .overview-metrics-block { order: 10; }
html[data-theme="dark"] body.dashboard-body .overview-checklist { order: 11; }
html[data-theme="dark"] body.dashboard-body .overview-robots-change { order: 12; }

@media (min-width: 1180px) {
  html[data-theme="dark"] body.dashboard-body .overview-layout {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: row dense;
  }

  html[data-theme="dark"] body.dashboard-body .overview-layout .overview-hero-banner { grid-column: span 8; }
  html[data-theme="dark"] body.dashboard-body .overview-layout .overview-status-card { grid-column: span 4; }
  html[data-theme="dark"] body.dashboard-body .overview-layout:has(.overview-hero-banner[hidden]) .overview-status-card { grid-column: 1 / -1; }

  html[data-theme="dark"] body.dashboard-body .overview-layout #overviewPrioritiesCard:not([hidden]) ~ #overviewCoverageCard:not([hidden]),
  html[data-theme="dark"] body.dashboard-body .overview-layout #overviewPrioritiesCard:not([hidden]):has(~ #overviewCoverageCard:not([hidden])) {
    grid-column: span 6;
  }

  html[data-theme="dark"] body.dashboard-body .overview-layout .readiness-score-card {
    grid-column: span 5;
    grid-row: span 2;
  }
  html[data-theme="dark"] body.dashboard-body .overview-layout .period-compare-card[data-period-compare],
  html[data-theme="dark"] body.dashboard-body .overview-layout .overview-insights-card {
    grid-column: span 7;
  }

  html[data-theme="dark"] body.dashboard-body .overview-layout .bot-auth-overview-card:not([hidden]):has(+ .ai-insights-card:not([hidden])) { grid-column: span 5; }
  html[data-theme="dark"] body.dashboard-body .overview-layout .bot-auth-overview-card:not([hidden]) + .ai-insights-card:not([hidden]) { grid-column: span 7; }
}

html[data-theme="dark"] body.dashboard-body .overview-status-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

html[data-theme="dark"] body.dashboard-body .overview-hero-banner {
  background:
    radial-gradient(34rem 16rem at 100% 0%, rgba(56, 189, 248, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 42%),
    var(--glass-bg) !important;
}

html[data-theme="dark"] body.dashboard-body .overview-hero-copy h2 {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--on-surface) !important;
}

html[data-theme="dark"] body.dashboard-body .overview-hero-copy p,
html[data-theme="dark"] body.dashboard-body .overview-hero-meta,
html[data-theme="dark"] body.dashboard-body .overview-insights-copy p {
  color: var(--on-surface-variant) !important;
}

html[data-theme="dark"] body.dashboard-body .overview-hero-dismiss {
  color: var(--on-surface-variant);
  border-radius: var(--radius-sm);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

html[data-theme="dark"] body.dashboard-body .overview-hero-dismiss:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--on-surface);
}

html[data-theme="dark"] body.dashboard-body .overview-checklist-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.6rem;
}

html[data-theme="dark"] body.dashboard-body .overview-check-num {
  background: var(--accent-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--accent-ring);
  font-family: var(--font-label);
}

html[data-theme="dark"] body.dashboard-body .overview-check-item.is-done .overview-check-num,
html[data-theme="dark"] body.dashboard-body .overview-check-item.done .overview-check-num {
  background: var(--ok-soft);
  color: var(--ok);
  box-shadow: inset 0 0 0 1px var(--ok-line);
}

/* Metric tiles: first tile is the feature tile. */
html[data-theme="dark"] body.dashboard-body .overview-metric-grid {
  gap: 1rem;
}

@media (min-width: 1100px) {
  html[data-theme="dark"] body.dashboard-body .overview-metric-grid:not(.overview-metric-grid-secondary) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  html[data-theme="dark"] body.dashboard-body .overview-metric-grid:not(.overview-metric-grid-secondary) > .metric-card:first-child {
    grid-column: span 2;
  }
  html[data-theme="dark"] body.dashboard-body .overview-metric-grid:not(.overview-metric-grid-secondary) > .metric-card:first-child .metric-value {
    font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem);
    line-height: 1;
  }
  html[data-theme="dark"] body.dashboard-body .overview-metric-grid-secondary {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }
}

html[data-theme="dark"] body.dashboard-body .metric-card {
  min-height: 9.5rem;
  padding: 1.1rem 1.15rem;
}

html[data-theme="dark"] body.dashboard-body .overview-metrics-title-wrap h4,
html[data-theme="dark"] body.dashboard-body .overview-active-title,
html[data-theme="dark"] body.dashboard-body .period-compare-head h4,
html[data-theme="dark"] body.dashboard-body .overview-priorities-head h3,
html[data-theme="dark"] body.dashboard-body .overview-insights-copy h3,
html[data-theme="dark"] body.dashboard-body .overview-status-head h3,
html[data-theme="dark"] body.dashboard-body .overview-checklist-head h3 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--on-surface) !important;
}

/* Other section grids pick up the same tile rhythm. */
html[data-theme="dark"] body.dashboard-body .analytics-grid,
html[data-theme="dark"] body.dashboard-body .period-compare-grid,
html[data-theme="dark"] body.dashboard-body .bot-auth-stats,
html[data-theme="dark"] body.dashboard-body .sites-grid,
html[data-theme="dark"] body.dashboard-body .integrations-grid,
html[data-theme="dark"] body.dashboard-body .traffic-charts,
html[data-theme="dark"] body.dashboard-body .settings-tab-panel.is-active {
  gap: 1rem;
}

/* ---------- 6. Motion and fallbacks -------------------------------------- */
html[data-theme="dark"] body.dashboard-body .animate-fade-in-up {
  animation-duration: 0.42s;
  animation-timing-function: var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] body.dashboard-body *,
  html[data-theme="dark"] body.dashboard-body *::before,
  html[data-theme="dark"] body.dashboard-body *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  html[data-theme="dark"] body.dashboard-body {
    --glass-bg: #111827;
    --glass-bg-strong: #111827;
    --glass-blur: none;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-theme="dark"] body.dashboard-body {
    --glass-bg: #111827;
    --glass-bg-strong: #141C2C;
  }
  html[data-theme="dark"] body.dashboard-body .dashboard-sidebar,
  html[data-theme="dark"] body.dashboard-body .page-header {
    background: #0B101B !important;
  }
}

@media (max-width: 1024px) {
  html[data-theme="dark"] body.dashboard-body .dashboard-content {
    padding: calc(1.25rem + 56px) 1.1rem 2.5rem;
  }
  html[data-theme="dark"] body.dashboard-body .page-header {
    margin-inline: -0.5rem;
    padding-inline: 0.5rem;
  }
}

@media (max-width: 640px) {
  html[data-theme="dark"] body.dashboard-body .dashboard-content {
    padding: calc(0.85rem + 56px) 0.85rem 2rem;
  }
  html[data-theme="dark"] body.dashboard-body .metric-card {
    min-height: 0;
  }
}

/* ---------- 7. Script-injected dialogs (sites.js) ------------------------ */
html[data-theme="dark"] body.dashboard-body .modal-overlay .modal-content {
  transform: none;
}

html[data-theme="dark"] body.dashboard-body .modal-overlay .step-number {
  background: var(--accent-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--accent-ring);
  font-family: var(--font-label);
}

html[data-theme="dark"] body.dashboard-body .modal-overlay .step-content strong {
  color: var(--on-surface);
}

html[data-theme="dark"] body.dashboard-body .modal-overlay .step-content p {
  color: var(--on-surface-variant);
}

html[data-theme="dark"] body.dashboard-body .modal-overlay .code-item {
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

html[data-theme="dark"] body.dashboard-body .modal-overlay .code-item code {
  background: transparent !important;
  border: 0 !important;
  color: var(--primary) !important;
}

html[data-theme="dark"] body.dashboard-body .modal-overlay .note {
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-md);
  color: var(--on-surface);
}

html[data-theme="dark"] body.dashboard-body .modal-overlay .note strong {
  color: var(--warn);
}

/* ---------- 8. Auth pages ------------------------------------------------ */
body.sentinel-body.auth-body.sentinel-flow {
  background:
    radial-gradient(52rem 30rem at 50% -14%, rgba(56, 189, 248, 0.14), transparent 62%),
    radial-gradient(40rem 28rem at 100% 110%, rgba(99, 102, 241, 0.08), transparent 60%),
    #090D16;
  background-attachment: fixed;
  color: var(--on-surface);
  font-family: var(--font-body);
}

body.sentinel-body.auth-body.sentinel-flow ::selection {
  background: rgba(56, 189, 248, 0.30);
  color: #fff;
}

body.sentinel-body.auth-body.sentinel-flow :focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.sentinel-body.auth-body.sentinel-flow .auth-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 36%),
    var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-highlight), var(--shadow-lg);
}

body.sentinel-body.auth-body.sentinel-flow .auth-card-accent {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.75), transparent);
}

body.sentinel-body.auth-body.sentinel-flow .auth-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--on-surface);
}

body.sentinel-body.auth-body.sentinel-flow .auth-title,
body.sentinel-body.auth-body.sentinel-flow .auth-brand h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--on-surface);
}

body.sentinel-body.auth-body.sentinel-flow .auth-lead,
body.sentinel-body.auth-body.sentinel-flow .auth-footer p,
body.sentinel-body.auth-body.sentinel-flow .auth-form .form-help,
body.sentinel-body.auth-body.sentinel-flow .auth-form .checkbox-label .checkbox-text {
  color: var(--on-surface-variant);
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .form-label {
  color: var(--on-surface-variant);
  font-weight: 500;
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .form-input {
  background: var(--surface-inset) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  color: var(--on-surface) !important;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

body.sentinel-body.auth-body.sentinel-flow .auth-form input:hover,
body.sentinel-body.auth-body.sentinel-flow .auth-form select:hover,
body.sentinel-body.auth-body.sentinel-flow .auth-form .form-input:hover {
  border-color: rgba(148, 163, 184, 0.42) !important;
}

body.sentinel-body.auth-body.sentinel-flow .auth-form input:focus,
body.sentinel-body.auth-body.sentinel-flow .auth-form select:focus,
body.sentinel-body.auth-body.sentinel-flow .auth-form .form-input:focus {
  background: #0E1626 !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16) !important;
  color: var(--on-surface) !important;
  outline: none;
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .form-input::placeholder {
  color: var(--outline) !important;
}

body.sentinel-body.auth-body.sentinel-flow .auth-form input:-webkit-autofill,
body.sentinel-body.auth-body.sentinel-flow .auth-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--on-surface) !important;
  box-shadow: 0 0 0 1000px #0E1626 inset !important;
  caret-color: var(--on-surface);
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .form-input[aria-invalid="true"],
body.sentinel-body.auth-body.sentinel-flow .form-group.error .form-input {
  border-color: var(--risk) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14) !important;
}

body.sentinel-body.auth-body.sentinel-flow .auth-input-wrap .auth-field-icon,
body.sentinel-body.auth-body.sentinel-flow .auth-input-wrap .auth-toggle-password {
  color: var(--outline);
}

body.sentinel-body.auth-body.sentinel-flow .auth-toggle-password:hover {
  color: var(--on-surface);
}

body.sentinel-body.auth-body.sentinel-flow .auth-form input[type="checkbox"] {
  accent-color: var(--primary);
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .auth-submit {
  background: var(--primary) !important;
  color: var(--on-primary) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 10px 26px -12px rgba(56, 189, 248, 0.75) !important;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .auth-submit:hover:not(:disabled) {
  background: var(--primary-hover) !important;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.4), 0 12px 30px -12px rgba(56, 189, 248, 0.9) !important;
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .auth-submit:disabled,
body.sentinel-body.auth-body.sentinel-flow .auth-form[aria-busy="true"] .auth-submit {
  opacity: 0.55;
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .btn-secondary {
  background: rgba(148, 163, 184, 0.07) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  color: var(--on-surface) !important;
}

body.sentinel-body.auth-body.sentinel-flow .auth-form .btn-secondary:hover {
  background: var(--accent-soft) !important;
  border-color: var(--accent-ring) !important;
}

body.sentinel-body.auth-body.sentinel-flow .auth-link,
body.sentinel-body.auth-body.sentinel-flow .auth-label-row .auth-link-muted,
body.sentinel-body.auth-body.sentinel-flow .auth-link-muted {
  color: var(--primary);
}

body.sentinel-body.auth-body.sentinel-flow .auth-link:hover,
body.sentinel-body.auth-body.sentinel-flow .auth-label-row .auth-link-muted:hover,
body.sentinel-body.auth-body.sentinel-flow .auth-link-muted:hover {
  color: var(--primary-hover);
}

body.sentinel-body.auth-body.sentinel-flow .auth-footer {
  background: rgba(148, 163, 184, 0.04);
  border-top: 1px solid var(--border-subtle);
}

body.sentinel-body.auth-body.sentinel-flow .auth-badge {
  color: var(--on-surface-variant);
  font-family: var(--font-label);
}

body.sentinel-body.auth-body.sentinel-flow .auth-badge .lucide-icon {
  color: var(--ok);
}

body.sentinel-body.auth-body.sentinel-flow .auth-message--error,
body.sentinel-body.auth-body.sentinel-flow .login-2fa-email-status.is-error,
body.sentinel-body.auth-body.sentinel-flow .form-error {
  color: var(--risk);
}

body.sentinel-body.auth-body.sentinel-flow .auth-message--error {
  background: var(--risk-soft);
  border: 1px solid var(--risk-line);
  border-radius: var(--radius-md);
}

body.sentinel-body.auth-body.sentinel-flow .auth-message--success {
  background: var(--ok-soft);
  border: 1px solid var(--ok-line);
  border-radius: var(--radius-md);
  color: var(--ok);
}

body.sentinel-body.auth-body.sentinel-flow .login-2fa-email-status.is-success,
body.sentinel-body.auth-body.sentinel-flow .form-success {
  color: var(--ok);
}

body.sentinel-body.auth-body.sentinel-flow .login-2fa-email-status.is-info {
  color: var(--on-surface-variant);
}

body.sentinel-body.auth-body.sentinel-flow .password-strength-bar {
  background: rgba(148, 163, 184, 0.14);
  border-radius: 999px;
}

body.sentinel-body.auth-body.sentinel-flow .password-strength-fill.weak { background: var(--risk); }
body.sentinel-body.auth-body.sentinel-flow .password-strength-fill.fair { background: var(--warn); }
body.sentinel-body.auth-body.sentinel-flow .password-strength-fill.good { background: var(--primary); }
body.sentinel-body.auth-body.sentinel-flow .password-strength-fill.strong { background: var(--ok); }

body.sentinel-body.auth-body.sentinel-flow .toast {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--on-surface);
}

body.sentinel-body.auth-body.sentinel-flow .toast-success { border-left-color: var(--ok); }
body.sentinel-body.auth-body.sentinel-flow .toast-warning { border-left-color: var(--warn); }
body.sentinel-body.auth-body.sentinel-flow .toast-error { border-left-color: var(--risk); }

body.sentinel-body.auth-body.sentinel-flow .loading-overlay {
  background: rgba(4, 7, 13, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

body.sentinel-body.auth-body.sentinel-flow .loading-spinner {
  border-color: rgba(148, 163, 184, 0.2);
  border-top-color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  body.sentinel-body.auth-body.sentinel-flow *,
  body.sentinel-body.auth-body.sentinel-flow *::before,
  body.sentinel-body.auth-body.sentinel-flow *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
