/* MRHO DNS / HolzmannHilft identity system.
   A signal-led visual language built for this product: ink, clear blue,
   routing marks and readable operational data. No interaction is defined here. */

:is(.dashboard-ui, .auth-page) {
  --brand-ink: #111b30;
  --brand-blue: #397cf6;
  --brand-blue-deep: #245cc6;
  --brand-blue-pale: #eaf1ff;
  --brand-line: #cbd7ea;
  --brand-paper: #ffffff;
  --brand-soft: #f5f7fb;
  --brand-text: #142039;
  --brand-muted: #53627b;
  --product-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --product-radius-sm: 5px;
  --product-radius-md: 10px;
  --product-radius-lg: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: var(--product-font);
  font-size: 14px;
  line-height: 1.55;
}

/* The console reads like a resolver desk, not a generic card dashboard. */
.dashboard-ui {
  --ui-bg: #fff;
  --ui-surface: #fff;
  --ui-surface-soft: #f5f7fb;
  --ui-input: #fff;
  --ui-border: #cfdaeb;
  --ui-text: var(--brand-ink);
  --ui-muted: #53627b;
  --ui-accent: var(--brand-blue);
  --ui-accent-strong: var(--brand-blue-deep);
  --ui-selected: var(--brand-blue-pale);
  --ui-good: #18754e;
  --ui-danger: #b33145;
  --ui-warning: #896118;
  color-scheme: light;
  color: var(--ui-text);
  background: #fff !important;
  background-image: none !important;
  font-family: var(--product-font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}
html:has(body.dashboard-ui) { background: #fff !important; }
.dashboard-ui main {
  margin-left: 220px;
  max-width: none;
  padding: 28px 32px 48px;
  color: var(--ui-text);
  background: var(--ui-bg) !important;
}
.dashboard-ui header {
  position: relative;
  min-height: 58px;
  gap: 18px;
  margin-bottom: 22px;
  padding: 0 0 17px;
  border: 0;
  border-bottom: 1px solid var(--ui-border);
  flex-wrap: wrap;
}
.dashboard-ui header::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 74px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue) 0 68%, transparent 68% 76%, var(--brand-blue) 76% 100%);
}
.dashboard-ui .header-title { gap: 13px; }
.dashboard-ui .header-actions { gap: 8px; flex-wrap: wrap; }
.dashboard-ui :is(h1, h2, h3, h4) {
  color: var(--ui-text);
  font-family: var(--product-font);
  letter-spacing: -.025em;
  line-height: 1.28;
  text-transform: none;
}
.dashboard-ui h1 { margin: 0; font-size: 25px; font-weight: 690; letter-spacing: -.04em; }
.dashboard-ui h2, .dashboard-ui .panel h2 { font-size: 16px; font-weight: 680; }
.dashboard-ui h3 { font-size: 14px; font-weight: 660; }
.dashboard-ui :is(p, label, li, td, .hint, .notice) { line-height: 1.5; }
.dashboard-ui header p,
.dashboard-ui #subtitle,
.dashboard-ui .section-intro p,
.dashboard-ui .form-panel > p,
.dashboard-ui .panel-head p { color: var(--ui-muted); font-size: 13px; }
.dashboard-ui .header-title::before { content: none; }

/* Sidebar color treatment follows the active dashboard theme. Rail geometry and animation stay intact. */
.dashboard-ui .sidebar {
  padding: 26px 14px 18px;
  color: var(--ui-text);
  background: var(--ui-surface);
  border-right: 1px solid var(--ui-border);
  box-shadow: 1px 0 8px rgb(17 27 48 / 6%);
}
.dashboard-ui .sidebar::before { display: none; }
.dashboard-ui .sidebar .logo-mark { display: none; }
.dashboard-ui .sidebar .logo { gap: 0; }
.dashboard-ui .sidebar .logo strong { color: var(--ui-text); font: 680 14px/1.3 var(--product-font); letter-spacing: .015em; }
.dashboard-ui .sidebar .logo small,
.dashboard-ui .sidebar .nav-title,
.dashboard-ui .sidebar-version { color: var(--ui-muted); }
.dashboard-ui .sidebar .nav {
  color: var(--ui-muted);
  background: transparent;
  border-color: transparent;
  border-left: 2px solid transparent;
  border-radius: 6px;
  font-family: var(--product-font);
  font-weight: 530;
  letter-spacing: .005em;
  text-transform: none;
}
.dashboard-ui .sidebar .nav .sidebar-icon,
.dashboard-ui .sidebar .nav .sidebar-icon svg { color: inherit; }
.dashboard-ui .sidebar .nav:hover,
.dashboard-ui .sidebar .nav:focus-visible {
  color: var(--ui-text);
  background: var(--ui-surface-soft);
  border-color: var(--ui-border);
  border-left-color: var(--ui-accent);
}
.dashboard-ui .sidebar .nav.active {
  color: var(--ui-accent);
  background: var(--ui-selected);
  border-color: var(--ui-selected);
  border-left-color: var(--ui-accent);
  box-shadow: none;
}
.dashboard-ui .sidebar .nav.active::after { content: none; }
.dashboard-ui .sidebar .nav:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.dashboard-ui .sidebar .nav-title { letter-spacing: .13em; }
.dashboard-ui .sidebar-version { font-variant-numeric: tabular-nums; }

/* Give every desktop sidebar choice a brief hover-intent window. This avoids
   flicker when the pointer crosses between adjacent rows; activation and
   keyboard focus remain immediate. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .dashboard-ui .sidebar .nav:hover:not(.active):not(:focus-visible) {
    transition-delay: 120ms;
  }
  .dashboard-ui .sidebar .nav.active,
  .dashboard-ui .sidebar .nav:focus-visible {
    transition-delay: 0ms;
  }
}

/* A blue routing trace anchors the operational cards without competing with data. */
.dashboard-ui .metrics { gap: 12px; margin-bottom: 18px; }
.dashboard-ui .metrics article,
.dashboard-ui .panel,
.dashboard-ui .cards > article {
  position: relative;
  color: var(--ui-text);
  background: var(--ui-surface);
  background-image: none;
  border: 1px solid var(--ui-border);
  border-radius: var(--product-radius-md);
  box-shadow: 0 2px 7px rgb(17 35 69 / 4%);
}
.dashboard-ui .metrics article::before,
.dashboard-ui .panel::before,
.dashboard-ui .cards > article::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 16px;
  width: 42px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue) 0 72%, transparent 72% 82%, var(--brand-blue) 82% 100%);
}
.dashboard-ui .metrics article { min-height: 0; padding: 16px; border-top: 1px solid var(--ui-border); }
.dashboard-ui .metrics article:first-child { border-top-color: var(--ui-border); }
.dashboard-ui .metrics article > span,
.dashboard-ui .metrics article > small,
.dashboard-ui .panel-head small { color: var(--ui-muted); font-family: var(--product-font); font-size: 12px; letter-spacing: .015em; text-transform: none; }
.dashboard-ui .metrics article > span { font-weight: 590; }
.dashboard-ui .metrics strong {
  display: block;
  margin: 7px 0 3px;
  color: var(--ui-text);
  font-family: var(--product-font);
  font-size: 29px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  text-shadow: none;
}
.dashboard-ui .metrics strong.metric-total { color: var(--ui-good); }
.dashboard-ui .metrics strong.metric-cached { color: var(--ui-accent-strong); }
.dashboard-ui .metrics .danger strong { color: var(--ui-danger); }
.dashboard-ui .metrics .warning strong { color: var(--ui-warning); }
.dashboard-ui .metric-chart { border-top: 1px solid var(--ui-border); }
.dashboard-ui .metric-chart > span { color: var(--ui-muted); }
.dashboard-ui .panel,
.dashboard-ui .cards > article { padding: 18px; }
.dashboard-ui .panel { margin-bottom: 14px; }
.dashboard-ui .panel-head {
  gap: 12px;
  margin-bottom: 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--ui-border);
}
.dashboard-ui .panel-head p { margin-top: 3px; }
.dashboard-ui .rank-row { border-color: var(--ui-border); }
.dashboard-ui .bar { background: #e5ebf4; border-radius: 2px; }
.dashboard-ui .bar i { border-radius: 2px; box-shadow: none; }

/* Tables use engineering-register spacing: legible labels, strong row rhythm. */
.dashboard-ui .table-wrap { border: 1px solid var(--ui-border); border-radius: 7px; }
.dashboard-ui table { color: var(--ui-text); font-family: var(--product-font); }
.dashboard-ui th {
  color: #455775;
  background: #f1f5fb;
  border-color: var(--ui-border);
  font-family: var(--product-font);
  font-size: 12px;
  font-weight: 690;
  letter-spacing: .015em;
  text-transform: none;
}
.dashboard-ui td { border-color: var(--ui-border); font-size: 13px; line-height: 1.48; }
.dashboard-ui tbody tr:nth-child(even) { background: #f8faff; }
.dashboard-ui tbody tr:hover { background: #edf3ff; }
.dashboard-ui textarea,
.dashboard-ui code,
.dashboard-ui pre,
.dashboard-ui .mono,
.dashboard-ui .query-domain { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dashboard-ui label { color: var(--ui-text); font-size: 13px; font-weight: 610; }
.dashboard-ui label small,
.dashboard-ui .form-panel small { color: var(--ui-muted); font-size: 12px; font-weight: 400; }

/* Controls have a recognizable blue route-marker focus state. */
.dashboard-ui input,
.dashboard-ui select,
.dashboard-ui textarea {
  color: var(--ui-text);
  background: var(--ui-input);
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  box-shadow: none;
  font-family: var(--product-font);
}
.dashboard-ui :is(input, select, textarea):focus-visible {
  outline: 3px solid rgb(57 124 246 / 18%);
  outline-offset: 1px;
  border-color: var(--ui-accent);
}
.dashboard-ui .button,
.dashboard-ui .icon-button {
  color: var(--ui-text);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  box-shadow: none;
  font-family: var(--product-font);
  font-weight: 620;
  letter-spacing: 0;
  text-transform: none;
}
.dashboard-ui .button:hover,
.dashboard-ui .icon-button:hover { color: var(--brand-blue-deep); background: var(--brand-blue-pale); border-color: #a9c2f3; }
.dashboard-ui .button.primary,
.dashboard-ui .button.primary:hover {
  color: #fff;
  background: var(--brand-blue-deep);
  border-color: var(--brand-blue-deep);
}
.dashboard-ui .button.primary:hover { filter: brightness(1.08); }
.dashboard-ui .danger-button { color: var(--ui-danger); }
.dashboard-ui .badge {
  color: var(--ui-text);
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  box-shadow: none;
  font-family: var(--product-font);
  letter-spacing: 0;
  text-transform: none;
}
.dashboard-ui .badge.good { color: #176345; background: #edf8f2; border-color: #b6dcc8; }
.dashboard-ui .badge.blocked,
.dashboard-ui .badge.error { color: #a22e42; background: #fff0f2; border-color: #edc5cc; }
.dashboard-ui .badge.servfail,
.dashboard-ui .badge.warning { color: #765512; background: #fff8e8; border-color: #e9d8aa; }
.dashboard-ui .badge.cached { color: #1d5fa8; background: #edf4ff; border-color: #bfd1f3; }
.dashboard-ui .badge.category { color: #a64a00 !important; background: #fff4eb; border-color: #f4bb8e; }
.dashboard-ui .badge.no-fsk18 { color: #805313; background: #fff6e8; border-color: #e8cfaa; }
.dashboard-ui .badge.safesearch { color: #17556b; background: #eef8fa; border-color: #c1dfe5; }
.dashboard-ui .hint,
.dashboard-ui .notice,
.dashboard-ui .actionbar {
  color: var(--ui-muted);
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-left: 3px solid var(--brand-blue);
  border-radius: 6px;
  box-shadow: none;
}
.dashboard-ui .notice.error { color: var(--ui-danger); border-left-color: var(--ui-danger); }
.dashboard-ui .warning-hint { border-left-color: var(--ui-warning); }
.dashboard-ui .actionbar { background: var(--ui-surface); }
.dashboard-ui .client-meta { color: var(--ui-muted); overflow-wrap: anywhere; }
.dashboard-ui dt,
.dashboard-ui dd { border-bottom: 1px solid var(--ui-border); }
.dashboard-ui dt { color: var(--ui-muted); }
.dashboard-ui dd { color: var(--ui-text); }
.dashboard-ui dialog { color: var(--ui-text); background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 12px; box-shadow: 0 18px 54px rgb(17 27 48 / 22%); }
.dashboard-ui dialog::backdrop { background: rgb(9 18 34 / 52%); }
.dashboard-ui #user-role { animation: none; background: var(--ui-surface-soft); border: 1px solid var(--ui-border); }
.dashboard-ui .metric-chart svg { filter: none; }
.dashboard-ui td { border-color: var(--ui-border); font-size: 13px; line-height: 1.48; }

/* Shared account and first-run setup language. */
.auth-page {
  --auth-bg: #fff;
  --auth-surface: #fff;
  --auth-input: #fff;
  --auth-border: #cfdaeb;
  --auth-text: var(--brand-ink);
  --auth-muted: #53627b;
  --auth-accent: var(--brand-blue);
  --auth-selected: var(--brand-blue-pale);
  --auth-soft: var(--brand-soft);
  color-scheme: light;
  color: var(--auth-text);
  background: #fff !important;
  background-image: none !important;
  font-family: var(--product-font);
  font-size: 14px;
  line-height: 1.55;
}
html:has(body.auth-page.setup-page),
html:has(body.login-page) { background: #fff !important; }
.auth-page::before { display: none; }
.auth-page .auth-card {
  position: relative;
  overflow: hidden;
  color: var(--auth-text);
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-top: 3px solid var(--brand-blue);
  border-radius: 8px 18px 8px 18px;
  box-shadow: 0 18px 48px rgb(17 27 48 / 8%);
}
.auth-page .auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 52px;
  height: 3px;
  background: var(--brand-ink);
}
.auth-page .auth-card::after { display: none; }
.auth-page .logo-mark { display: none; }
.auth-page .logo { gap: 0; }
.auth-page .logo strong { color: var(--auth-text); font: 680 14px/1.4 var(--product-font); letter-spacing: .025em; }
.auth-page .logo small { color: var(--auth-muted); }
.auth-page :is(h1, h2, h3) { color: var(--auth-text); font-family: var(--product-font); letter-spacing: -.025em; }
.auth-page h1 { font-size: 29px; font-weight: 700; line-height: 1.18; }
.auth-page h2 { font-size: 18px; font-weight: 680; }
.auth-page p,
.auth-page .step-content small { color: var(--auth-muted); }
.auth-page label { color: var(--auth-text); font-size: 13px; font-weight: 620; }
.auth-page input,
.auth-page select,
.auth-page textarea {
  color: var(--auth-text);
  background: var(--auth-input);
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  box-shadow: none;
  font-family: var(--product-font);
}
.auth-page :is(input, select, textarea):focus-visible { outline: 3px solid rgb(57 124 246 / 18%); outline-offset: 1px; border-color: var(--auth-accent); }
.auth-page .button {
  color: var(--auth-text);
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  box-shadow: none;
  font-family: var(--product-font);
  font-weight: 640;
  letter-spacing: 0;
  text-transform: none;
}
.auth-page .button:hover { color: var(--brand-blue-deep); background: var(--auth-selected); border-color: #a9c2f3; }
.auth-page .button.primary,
.auth-page .button.primary:hover { color: #fff; background: var(--brand-blue-deep); border-color: var(--brand-blue-deep); }
.auth-page .setup-section { border-top: 1px solid var(--auth-border); }
.auth-page .step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--brand-ink);
  border: 2px solid var(--brand-blue);
  border-radius: 7px 14px 7px 14px;
  box-shadow: 3px 3px 0 var(--brand-blue-pale);
  font-family: var(--product-font);
  font-size: 13px;
  font-weight: 720;
}
.auth-page .optional { color: var(--auth-muted); background: var(--auth-soft); border-color: var(--auth-border); border-radius: 4px; }
.auth-page .security-note { color: var(--auth-muted); background: var(--auth-soft); border: 1px solid var(--auth-border); border-left: 3px solid var(--brand-blue); border-radius: 6px; font-size: 13px; }
.auth-page .network-emblem { display: none; }
.auth-page .auth-intro h2 span,
.auth-page .auth-eyebrow { color: var(--brand-blue-deep); }

/* Setup: a three-stage route from credentials to a ready resolver. */
.setup-page {
  display: grid;
  grid-template-columns: minmax(220px, .68fr) minmax(0, 1.6fr);
  align-items: start;
  justify-items: stretch;
  gap: clamp(32px, 5vw, 72px);
  width: 100%;
  max-width: 1320px;
  min-height: 100vh;
  margin-inline: auto;
  padding: clamp(48px, 7vh, 84px) clamp(28px, 5vw, 72px);
  background: var(--auth-bg) !important;
}
.setup-page .auth-intro { position: sticky; top: 54px; align-self: start; padding: 8px 0 8px 20px; border-left: 3px solid var(--brand-blue); }
.setup-page .auth-intro h2 { max-width: 340px; margin: 20px 0 14px; color: var(--auth-text); font-size: clamp(30px, 3.7vw, 46px); font-weight: 700; letter-spacing: -.05em; line-height: 1.04; }
.setup-page .auth-intro p { max-width: 38ch; line-height: 1.7; }
.setup-page .auth-caption { display: block; margin-top: 30px; color: var(--auth-muted); font-size: 11px; font-weight: 690; letter-spacing: .1em; }
.setup-page .auth-eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .12em; }
.setup-page .setup-card { width: 100%; padding: 30px clamp(22px, 3.2vw, 40px); }
.setup-page .setup-card > .logo { padding: 0 0 18px; border-bottom: 1px solid var(--auth-border); }
.setup-page .setup-card > h1 { margin: 22px 0 7px; }
.setup-page .setup-card > p { max-width: 68ch; margin: 0 0 22px; }
.setup-page .setup-section { grid-template-columns: 38px minmax(0, 1fr); gap: 15px; padding: 22px 0; }
.setup-page .step-content h2 { margin: 0 0 5px; }
.setup-page .step-content > p { max-width: 70ch; margin: 0 0 15px; }
.setup-page .grid.two { gap: 16px; }
.setup-page .button.primary { min-height: 46px; margin-top: 12px; }
.setup-page :is(input, textarea, select) { color: var(--auth-text); background: var(--auth-input); border-color: var(--auth-border); border-radius: 6px; }
.setup-page label small { color: var(--auth-muted); font-size: 12px; }

/* Login preserves the supplied HolzmannHilft artwork and its fixed placement. */
.login-page {
  --login-bg: var(--auth-bg);
  --login-surface: var(--auth-surface);
  --login-input: var(--auth-input);
  --login-border: var(--auth-border);
  --login-text: var(--auth-text);
  --login-muted: var(--auth-muted);
  --login-accent: var(--brand-blue-deep);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: calc(126px + env(safe-area-inset-top)) 24px 42px;
  background: var(--login-bg) !important;
  background-image: linear-gradient(116deg, transparent 0 49.92%, rgb(57 124 246 / 6%) 50%, transparent 50.08%), radial-gradient(circle at 50% 45%, rgb(57 124 246 / 4%), transparent 36%) !important;
}
.login-page::after { content: none; }
.login-page main.auth-card {
  width: min(430px, 100%);
  padding: 30px 32px;
  overflow: visible;
  background: var(--login-surface);
  border-color: var(--login-border);
  border-left: 3px solid var(--brand-blue);
  border-radius: 8px 18px 8px 18px;
  box-shadow: 0 22px 55px rgb(17 27 48 / 10%);
}
.login-page .login-holzmannhilft-logo { position: fixed; z-index: 2; top: 42px; left: 50%; width: min(300px, calc(100dvw - 48px)); aspect-ratio: 1101 / 78; transform: translateX(-50%); filter: none; pointer-events: none; }
.login-page .login-holzmannhilft-logo > img:first-child { display: block; width: 100%; height: 100%; }
.login-page .auth-card .logo { padding: 0 0 17px; border-bottom: 1px solid var(--login-border); }
.login-page .logo strong { color: var(--login-text); }
.login-page h1 { margin: 21px 0 20px; color: var(--login-text); font-size: 29px; font-weight: 700; line-height: 1.18; }
.login-page #login-form { gap: 15px; }
.login-page #login-form label { color: var(--login-muted); font-size: 13px; font-weight: 640; letter-spacing: 0; }
.login-page #login-form input:not(.otp-digit),
.login-page .otp-code .otp-digit { color: var(--login-text); background: var(--login-input); border: 1px solid var(--login-border); border-radius: 6px; box-shadow: none; }
.login-page #login-form input:not(.otp-digit) { min-height: 48px; font-size: 16px; }
.login-page .otp-code .otp-digit { min-height: 46px; font-size: 18px; }
.login-page #login-form input:not(.otp-digit):focus,
.login-page .otp-code .otp-digit:focus { background: var(--login-input); border-color: var(--login-accent); }
.login-page .login-second-factor > span:first-child { color: var(--login-text); font-size: 13px; }
.login-page .button { min-height: 46px; }
.login-page .button.primary,
.login-page .button.primary:hover { color: #fff; background: var(--login-accent); border-color: var(--login-accent); }
.login-page #login-passkey { color: var(--login-text); background: transparent; border-color: var(--login-border); }
.login-page #login-message { margin: 14px 0 0; color: var(--login-muted); text-align: center; }
.login-page .login-check { color: var(--login-muted); background: var(--auth-soft); border-color: var(--login-border); }
.login-page :is(.auth-card > p, #login-form label) { line-height: 1.5; }

/* True-black night shift with blue signal accents. */
@media (prefers-color-scheme: dark) {
  :is(.dashboard-ui, .auth-page) {
    --brand-blue: #78a5ff;
    --brand-blue-deep: #79a5ff;
    --brand-blue-pale: #14223d;
    --brand-line: #263651;
    --brand-paper: #11151d;
    --brand-soft: #171d28;
    --brand-text: #f2f5fc;
    --brand-muted: #a8b5ca;
  }
  .dashboard-ui {
    --ui-bg: #000;
    --ui-surface: #11151d;
    --ui-surface-soft: #171d28;
    --ui-input: #0b0e13;
    --ui-border: #29344a;
    --ui-text: #f2f5fc;
    --ui-muted: #a8b5ca;
    --ui-accent: #78a5ff;
    --ui-accent-strong: #8db4ff;
    --ui-selected: #14223d;
    --ui-good: #83cfaa;
    --ui-danger: #ff929e;
    --ui-warning: #e6c47e;
    color-scheme: dark;
    background: #000 !important;
  }
  html:has(body.dashboard-ui),
  .dashboard-ui main { background: #000 !important; }
  .dashboard-ui .sidebar { box-shadow: 1px 0 8px #0005; }
  .dashboard-ui th { color: #b6c4dd; background: #171e2b; }
  .dashboard-ui tbody tr:nth-child(even) { background: #0d121a; }
  .dashboard-ui tbody tr:hover { background: #15213a; }
  .dashboard-ui .bar { background: #263246; }
  .dashboard-ui .metrics strong.metric-total { color: #83cfaa; }
  .dashboard-ui .metrics strong.metric-cached { color: #8db4ff; }
  .dashboard-ui .metrics .danger strong { color: #ff929e; }
  .dashboard-ui .metrics .warning strong { color: #e6c47e; }
  .dashboard-ui .button.primary,
  .dashboard-ui .button.primary:hover { color: #101a2a; }
  .dashboard-ui .badge.good { color: #9de1bd; background: #14251d; border-color: #315844; }
  .dashboard-ui .badge.blocked,
  .dashboard-ui .badge.error { color: #ffa6b0; background: #30181e; border-color: #64303b; }
  .dashboard-ui .badge.servfail,
  .dashboard-ui .badge.warning { color: #e6c47e; background: #2b2518; border-color: #594a2c; }
  .dashboard-ui .badge.cached,
  .dashboard-ui .badge.safesearch { color: #a8c6ff; background: #17243d; border-color: #354b74; }
  .dashboard-ui .badge.category { color: #ffc18f !important; background: #302116; border-color: #70431f; }
  .dashboard-ui .badge.no-fsk18 { color: #e6c47e; background: #292318; border-color: #55482b; }
  .dashboard-ui .notice.error { color: var(--ui-danger); }
  .dashboard-ui dialog::backdrop { background: rgb(0 0 0 / 74%); }
  .auth-page {
    --auth-bg: #000;
    --auth-surface: #11151d;
    --auth-input: #0b0e13;
    --auth-border: #29344a;
    --auth-text: #f2f5fc;
    --auth-muted: #a8b5ca;
    --auth-accent: #78a5ff;
    --auth-selected: #14223d;
    --auth-soft: #171d28;
    color-scheme: dark;
    color: var(--auth-text);
    background: #000 !important;
  }
  html:has(body.auth-page.setup-page),
  html:has(body.login-page),
  .auth-page.auth-page.setup-page { background: #000 !important; }
  .auth-page .auth-card { background: var(--auth-surface); border-color: var(--auth-border); border-top-color: var(--brand-blue); }
  .auth-page .auth-card::before { background: #f2f5fc; }
  .auth-page :is(h1, h2, h3, label, .logo strong) { color: var(--auth-text); }
  .auth-page :is(p, .step-content small, .optional) { color: var(--auth-muted); }
  .auth-page :is(input, select, textarea) { color: var(--auth-text); background: var(--auth-input); border-color: var(--auth-border); }
  .auth-page .button { color: var(--auth-text); background: var(--auth-surface); border-color: var(--auth-border); }
  .auth-page .button:hover { color: var(--auth-text); background: var(--auth-selected); border-color: var(--auth-accent); }
  .auth-page .button.primary,
  .auth-page .button.primary:hover { color: #101a2a; background: var(--auth-accent); border-color: var(--auth-accent); }
  .auth-page .setup-section { border-top-color: var(--auth-border); }
  .auth-page .step { color: var(--auth-accent); background: #17243d; border-color: var(--auth-accent); box-shadow: 3px 3px 0 #0c1422; }
  .auth-page .security-note { color: var(--auth-muted); background: var(--auth-soft); border-color: var(--auth-border); border-left-color: var(--auth-accent); }
  .setup-page .auth-intro { border-left-color: var(--auth-accent); }
  .login-page { --login-bg: #000; --login-surface: #11151d; }
  .login-page main.auth-card { background: var(--login-surface); border-color: var(--login-border); border-left-color: var(--brand-blue); }
  .login-page .login-check { color: var(--login-muted); background: var(--auth-soft); border-color: var(--login-border); }
}

/* Responsive compositions; desktop rail geometry remains in console.css. */
@media (max-width: 1200px) {
  .dashboard-ui .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .dashboard-ui .sidebar { width: min(290px, 88vw); }
  .dashboard-ui main { width: 100%; margin-left: 0; padding: 18px 18px 40px; }
  .dashboard-ui header { gap: 14px; }
  .dashboard-ui .header-actions { justify-content: flex-start; }
  .setup-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 760px;
    min-height: 100vh;
    margin-inline: auto;
    gap: 22px;
    padding: 42px 28px;
  }
  .setup-page .auth-intro { position: static; padding: 0 0 0 18px; }
  .setup-page .auth-intro h2 { margin: 12px 0 9px; font-size: clamp(27px, 5vw, 36px); }
  .setup-page .auth-caption { margin-top: 16px; }
}
@media (max-width: 620px) {
  .dashboard-ui main { padding: 14px 11px 30px; }
  .dashboard-ui header { align-items: flex-start; gap: 10px; }
  .dashboard-ui header p { max-width: 45vw; font-size: 12px; }
  .dashboard-ui .header-actions { gap: 6px; }
  .dashboard-ui .header-actions .badge { display: none; }
  .dashboard-ui .header-actions .button { padding-inline: 10px; }
  .dashboard-ui .metrics { grid-template-columns: 1fr; gap: 10px; }
  .dashboard-ui .metrics article { padding: 14px; }
  .dashboard-ui .metrics strong { font-size: clamp(25px, 8vw, 32px); }
  .dashboard-ui .panel { padding: 13px; margin-bottom: 10px; }
  .dashboard-ui .panel-head { align-items: flex-start; flex-direction: column; gap: 9px; }
  .dashboard-ui .panel-live-actions,
  .dashboard-ui .toolbar { width: 100%; }
  .dashboard-ui .toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .dashboard-ui .toolbar input { grid-column: 1 / -1; min-width: 0; }
  .dashboard-ui .toolbar select { width: 100%; min-width: 0; }
  .dashboard-ui .toolbar .danger-button { width: 100%; }
  .dashboard-ui :is(input, textarea, select) { min-height: 44px; font-size: 16px; }
  .dashboard-ui .button,
  .dashboard-ui .icon-button { min-height: 44px; }
  .dashboard-ui .table-wrap { width: 100%; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .dashboard-ui table { min-width: 760px; }
  .dashboard-ui .cards { grid-template-columns: 1fr; }
  .dashboard-ui dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); margin: 8px; }
  .dashboard-ui dialog .grid.two { grid-template-columns: 1fr; }
  .setup-page { min-height: 100dvh; padding: 32px 16px 24px; gap: 20px; }
  .setup-page .auth-intro { padding-left: 15px; }
  .setup-page .auth-intro h2 { font-size: 30px; }
  .setup-page .setup-card { padding: 22px 18px; }
  .setup-page .setup-section { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-block: 18px; }
  .setup-page .step { width: 28px; height: 28px; }
  .setup-page .grid.two { grid-template-columns: 1fr; }
  .login-page { min-height: 100dvh; padding: calc(126px + env(safe-area-inset-top)) 18px 28px; }
  .login-page .login-holzmannhilft-logo { top: calc(42px + env(safe-area-inset-top)); width: min(252px, calc(100dvw - 48px)); }
  .login-page main.auth-card { padding: 24px 22px; }
  .login-page .otp-code { gap: 6px; }
}
@media (max-width: 390px) {
  .dashboard-ui main { padding-inline: 8px; }
  .dashboard-ui .toolbar { grid-template-columns: 1fr; }
  .dashboard-ui .toolbar input { grid-column: auto; }
  .setup-page { padding-inline: 12px; }
  .setup-page .setup-card { padding-inline: 14px; }
  .login-page { padding-inline: 12px; }
  .login-page main.auth-card { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page .auth-intro h2 span,
  .login-page .auth-card { animation: none !important; }
}

/* Desktop pin control sits centered near the bottom edge of the sidebar. */
.sidebar-pin { display: none; }
.dashboard-ui .sidebar-pin[hidden] { display: none; }
@media (min-width: 901px) {
  .dashboard-ui .sidebar-pin {
    position: fixed; z-index: 35; top: auto; bottom: 44px; left: 32px; display: grid;
    width: 32px; height: 38px; place-items: center; padding: 0;
    color: var(--ui-muted); background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: 9px; box-shadow: 2px 2px 8px rgb(18 32 42 / 10%);
    transform: translateX(-50%); cursor: pointer;
    transition: left .36s cubic-bezier(.22, 1, .36, 1), color .18s ease, background-color .18s ease, border-color .18s ease;
  }
  .dashboard-ui .sidebar-pin svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transition: transform .22s ease; }
  .dashboard-ui .sidebar-pin:hover,
  .dashboard-ui .sidebar-pin:focus-visible,
  .dashboard-ui .sidebar-pin[aria-pressed="true"] { color: var(--ui-accent); background: var(--ui-selected); border-color: var(--ui-accent); }
  .dashboard-ui .sidebar-pin:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
  .dashboard-ui .sidebar-pin[aria-pressed="true"] svg { transform: rotate(-28deg); }
  .dashboard-ui:has(.sidebar:hover) .sidebar-pin,
  .dashboard-ui:has(.sidebar:focus-within) .sidebar-pin,
  .dashboard-ui:has(.sidebar.sidebar-pointer-grace) .sidebar-pin,
  .dashboard-ui.sidebar-pinned .sidebar-pin { left: 104px; }
  .dashboard-ui.sidebar-pin-hover .sidebar { width: var(--sidebar-pin-hover-width) !important; }
  .dashboard-ui.sidebar-pin-hover .sidebar-pin {
    left: var(--sidebar-pin-hover-left) !important;
    transition: none !important;
  }
  .dashboard-ui.sidebar-pinned .sidebar { width: 208px !important; }
  .dashboard-ui.sidebar-pinned main { width: calc(100% - 224px) !important; max-width: none !important; margin-left: 224px !important; }
  .dashboard-ui.sidebar-pinned .sidebar .nav-title { height: 34px; max-height: 34px; margin: 0; padding: 18px 12px 5px; opacity: 1; visibility: visible; transform: translateX(0); }
  .dashboard-ui.sidebar-pinned .sidebar .sidebar-version { padding-inline: 10px; text-align: left; opacity: 1; visibility: visible; transform: translateX(0); }
  .dashboard-ui.sidebar-pinned .sidebar:not(:hover):not(:focus-within) .nav { justify-content: flex-start; gap: 10px; padding-inline: 10px; font-size: 12px; }
  .dashboard-ui.sidebar-pinned .sidebar .nav.active::after { display: block; }
  .dashboard-ui.sidebar-pinned .sidebar .nav:hover .sidebar-icon svg,
  .dashboard-ui.sidebar-pinned .sidebar .nav:focus-visible .sidebar-icon svg { animation: none !important; transform: none !important; }
  .dashboard-ui:not(.sidebar-pinned) .sidebar:not(:hover):not(:focus-within) .nav:not(.active) .sidebar-icon,
  .dashboard-ui:not(.sidebar-pinned) .sidebar:not(:hover):not(:focus-within) .nav:not(.active) .sidebar-icon svg { color: var(--ui-muted); }
  .dashboard-ui:not(.sidebar-pinned) .sidebar:not(:hover):not(:focus-within) .nav.active .sidebar-icon,
  .dashboard-ui:not(.sidebar-pinned) .sidebar:not(:hover):not(:focus-within) .nav.active .sidebar-icon svg { color: var(--ui-accent); }
}
@media (prefers-reduced-motion: reduce) and (min-width: 901px) {
  .dashboard-ui .sidebar-pin,
  .dashboard-ui .sidebar-pin svg { transition: none; }
}

/* Mobile density: fit more useful content without changing desktop geometry. */
@media (max-width: 900px) {
  .dashboard-ui main { padding-top: 12px; }
  .dashboard-ui header { min-height: 0; margin-bottom: 12px; padding-bottom: 10px; }
  .dashboard-ui .header-title { gap: 9px; }
  .dashboard-ui h1 { font-size: 22px; }
  .dashboard-ui .metrics { gap: 8px; margin-bottom: 12px; }
  .dashboard-ui .panel,
  .dashboard-ui .cards > article { padding: 14px; }
  .dashboard-ui .panel { margin-bottom: 10px; }
  .dashboard-ui .panel-head { margin-bottom: 10px; padding-bottom: 8px; }
  .dashboard-ui .section-intro { margin-bottom: 10px; }
  .dashboard-ui .grid { gap: 10px; }
  .dashboard-ui .table-wrap { margin-block: 6px; }
  .dashboard-ui th,
  .dashboard-ui td { padding: 8px 9px; }
  .setup-page { gap: 16px; }
  .setup-page .setup-card { padding-block: 20px; }
  .setup-page .setup-card > h1 { margin-top: 16px; }
  .setup-page .setup-card > p { margin-bottom: 14px; }
  .setup-page .setup-section { padding-block: 14px; }
  .setup-page .auth-caption { margin-top: 12px; }
}

@media (max-width: 620px) {
  .dashboard-ui main {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 8px 8px calc(78px + env(safe-area-inset-bottom));
  }
  .dashboard-ui header { gap: 6px; margin-bottom: 7px; padding-bottom: 7px; }
  .dashboard-ui .header-title { min-width: 0; }
  .dashboard-ui h1 { font-size: 20px; }
  .dashboard-ui header p,
  .dashboard-ui #subtitle { font-size: 11px; line-height: 1.35; }
  .dashboard-ui .header-actions { gap: 5px; }
  .dashboard-ui .header-actions .button { min-height: 40px; padding: 6px 8px; font-size: 12px; }
  .dashboard-ui .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 7px; }
  .dashboard-ui .metrics article { min-width: 0; min-height: 94px; padding: 8px; border-radius: 8px; }
  .dashboard-ui .metrics article::before,
  .dashboard-ui .panel::before,
  .dashboard-ui .cards > article::before { left: 10px; width: 30px; height: 2px; }
  .dashboard-ui .metrics article > span,
  .dashboard-ui .metrics article > small,
  .dashboard-ui .panel-head small { font-size: 10px; line-height: 1.25; }
  .dashboard-ui .metrics strong { margin: 3px 0 1px; font-size: clamp(19px, 6vw, 24px); line-height: 1.1; }
  .dashboard-ui .metric-chart { height: 40px; min-height: 40px; flex: 0 0 40px; margin-top: auto; padding-bottom: 10px; }
  .dashboard-ui .metric-chart svg { height: 25px; max-height: 25px; }
  .dashboard-ui .panel,
  .dashboard-ui .cards > article { padding: 9px; border-radius: 8px; }
  .dashboard-ui .panel { margin-bottom: 7px; }
  .dashboard-ui h2,
  .dashboard-ui .panel h2 { font-size: 14px; }
  .dashboard-ui h3 { font-size: 13px; }
  .dashboard-ui .panel-head { gap: 5px; margin-bottom: 6px; padding-bottom: 6px; }
  .dashboard-ui .panel-head p,
  .dashboard-ui .section-intro p,
  .dashboard-ui .form-panel > p { font-size: 12px; line-height: 1.4; }
  .dashboard-ui .grid,
  .dashboard-ui .cards { gap: 6px; }
  .dashboard-ui .form-grid { gap: 9px; }
  .dashboard-ui th,
  .dashboard-ui td { padding: 6px 7px; font-size: 12px; }
  .dashboard-ui th { font-size: 11px; }
  .dashboard-ui :is(input, textarea, select) { min-height: 42px; }
  .dashboard-ui textarea { min-height: 88px; }
  .dashboard-ui .button,
  .dashboard-ui .icon-button { min-height: 42px; }
  .dashboard-ui .hint,
  .dashboard-ui .notice { margin-block: 8px; font-size: 12px; }
  .setup-page { gap: 12px; padding-top: 24px; padding-bottom: 18px; }
  .setup-page .auth-intro { padding-left: 11px; }
  .setup-page .auth-intro h2 { margin: 8px 0 6px; font-size: 25px; }
  .setup-page .auth-intro p { font-size: 13px; line-height: 1.45; }
  .setup-page .setup-card { padding: 16px 14px; }
  .setup-page .setup-card > .logo { padding-bottom: 12px; }
  .setup-page .setup-card > h1 { margin: 13px 0 5px; font-size: 23px; }
  .setup-page .setup-card > p { margin-bottom: 10px; font-size: 13px; }
  .setup-page .setup-section { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding-block: 11px; }
  .setup-page .step-content p { margin-block: 4px; font-size: 13px; line-height: 1.4; }
  .setup-page .step-content small,
  .setup-page .optional { font-size: 11px; line-height: 1.4; }
  .setup-page :is(input, select, textarea) { min-height: 42px; }
  .setup-page textarea { min-height: 76px; }
  .login-page { padding-top: calc(94px + env(safe-area-inset-top)); padding-bottom: 12px; }
  .login-page .login-holzmannhilft-logo { top: calc(28px + env(safe-area-inset-top)); }
  .login-page main.auth-card { box-sizing: border-box; width: 100%; max-width: 450px; padding: 16px 14px; }
  .login-page .auth-card .logo { padding-bottom: 10px; }
  .login-page .auth-card > h1 { margin-block: 10px 6px; font-size: 22px; }
  .login-page #login-form { gap: 12px; }
  .login-page .button { min-height: 44px; }
  .login-page .otp-code { gap: 5px; }
}

@media (max-width: 390px) {
  .dashboard-ui main { padding-inline: 6px; }
  .dashboard-ui .metrics { gap: 5px; }
  .dashboard-ui .metrics article { min-height: 90px; padding: 7px; }
  .dashboard-ui .metrics strong { font-size: clamp(18px, 5.7vw, 22px); }
  .dashboard-ui .header-actions .button { padding-inline: 6px; font-size: 11px; }
  .setup-page { padding-inline: 10px; }
  .setup-page .setup-card { padding-inline: 12px; }
  .login-page { padding-inline: 10px; }
  .login-page main.auth-card { padding-inline: 12px; }
}

/* Login only: keep the existing dark/light surfaces and remove decorative color accents. */
.login-page {
  --login-accent: var(--login-muted);
  background-image: none !important;
}
.login-page main.auth-card {
  border: 1px solid var(--login-border);
  border-radius: 8px;
  box-shadow: none;
  background-image: none;
}
.login-page main.auth-card::before { display: none; }
.login-page #login-form input:not(.otp-digit):focus-visible,
.login-page .otp-code .otp-digit:focus-visible {
  outline: 2px solid var(--login-muted);
  outline-offset: 2px;
}
.login-page .button.primary,
.login-page .button.primary:hover {
  color: var(--login-text);
  background: var(--login-surface);
  border-color: var(--login-border);
  box-shadow: none;
  filter: none;
}
.login-page .button:hover,
.login-page #login-passkey:hover {
  color: var(--login-text);
  background: var(--auth-soft);
  border-color: var(--login-border);
  box-shadow: none;
  filter: none;
}

/* On mobile the panel header is stacked vertically. Keep the old horizontal
   flex basis from turning into a tall, empty title block. */
@media (max-width: 900px) {
  .dashboard-ui .panel-head h2 { flex: 0 1 auto; }
}

/* Shown only after the server has accepted every login factor. */
.login-success-loading[hidden] { display: none !important; }
.login-success-loading {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  color: var(--login-text, var(--auth-text));
  background: var(--login-bg, var(--auth-bg));
  opacity: 0;
  transition: opacity 160ms ease-out;
}
.login-success-loading.is-visible { opacity: 1; }
.login-success-loading-content {
  display: grid;
  justify-items: center;
  width: min(320px, 100%);
  text-align: center;
}
.login-success-loading-logo {
  display: block;
  width: min(190px, 65vw);
  height: auto;
  margin-bottom: 30px;
  object-fit: contain;
}
.login-success-loading-title { margin: 0; color: var(--login-text, var(--auth-text)); font-size: 18px; font-weight: 650; }
.login-success-loading-message { margin: 8px 0 20px; color: var(--login-muted, var(--auth-muted)); font-size: 14px; }
.login-success-progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--login-border, var(--auth-border));
  border-radius: 99px;
  background: var(--login-input, var(--auth-input));
}
.login-success-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #3280ff;
}
.login-success-loading.is-visible .login-success-progress > span { animation: login-success-progress-fill 2s linear forwards; }
@keyframes login-success-progress-fill { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .login-success-loading { transition: none; }
  .login-success-loading.is-visible .login-success-progress > span { animation: none; width: 100%; }
}
/* Keep the successful-login screen in front while the dashboard document and
   its first paint load; the shared timestamp keeps its bar on the same clock. */
.dashboard-ui .dashboard-login-transition {
  display: none;
  --login-bg: var(--ui-bg);
  --login-text: var(--ui-text);
  --login-muted: var(--ui-muted);
  --login-border: var(--ui-border);
  --login-input: var(--ui-surface);
}
html[data-login-transition="active"] body.dashboard-ui > :not(#dashboard-login-transition) { visibility: hidden !important; }
html[data-login-transition="active"] #dashboard-login-transition {
  display: grid;
  opacity: 1;
  transition: none;
}
html[data-login-transition="active"] #dashboard-login-transition .login-success-progress > span {
  animation: login-success-progress-fill 2s linear forwards;
  animation-delay: var(--login-transition-animation-delay, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  html[data-login-transition="active"] #dashboard-login-transition .login-success-progress > span { animation: none; width: 100%; }
}
