/* ------------------------------------------------------------------
   Farb-Tokens. Hell ist der Standard, Dunkel folgt dem System oder
   der manuellen Wahl. Diagramm-Farben stammen aus der dataviz-
   Palette (Blau, Orange, Aqua), die für beide Modi validiert ist.
   ------------------------------------------------------------------ */
:root {
  color-scheme: light;
  --page: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --surface-hover: #eef2f8;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --ink: #0f1420;
  --ink-2: #4b5568;
  --muted: #6b7385;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(42, 120, 214, 0.12);
  --glow: rgba(42, 120, 214, 0.08);
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --stopped: #9aa3b5;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --grid: #e7eaf1;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px -14px rgba(15, 23, 42, 0.14);
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0b0e14;
    --surface: #131821;
    --surface-2: #181e29;
    --surface-hover: #1d2431;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.14);
    --ink: #eef1f6;
    --ink-2: #b3bccb;
    --muted: #8b94a6;
    --accent: #3987e5;
    --accent-ink: #0b0e14;
    --accent-soft: rgba(57, 135, 229, 0.16);
    --glow: rgba(57, 135, 229, 0.1);
    --stopped: #6b7385;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --grid: #232a37;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 30px -16px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0b0e14;
  --surface: #131821;
  --surface-2: #181e29;
  --surface-hover: #1d2431;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --ink: #eef1f6;
  --ink-2: #b3bccb;
  --muted: #8b94a6;
  --accent: #3987e5;
  --accent-ink: #0b0e14;
  --accent-soft: rgba(57, 135, 229, 0.16);
  --glow: rgba(57, 135, 229, 0.1);
  --stopped: #6b7385;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --grid: #232a37;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 30px -16px rgba(0, 0, 0, 0.6);
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 380px;
  background: radial-gradient(70% 100% at 50% 0%, var(--glow), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
  margin-bottom: 4px;
}

h2 {
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.005em;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.mono,
code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  flex: none;
}

/* ------------------------------------------------------------------
   Anmeldung
   ------------------------------------------------------------------ */
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 21px;
  margin: 4px 0 0;
}

.login-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
}

/* ------------------------------------------------------------------
   Seitengerüst
   ------------------------------------------------------------------ */
.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 15px;
}

.brand-text span {
  font-size: 12.5px;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 550;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.nav-item {
  position: relative;
}

.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-group {
  margin: 14px 12px 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-group:first-child {
  margin-top: 0;
}

.nav-count {
  margin-left: auto;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.sidebar-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-2);
}

.summary-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.summary-row strong.is-alert {
  color: var(--critical);
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 8px 0;
  border-top: 1px solid var(--border);
}

.host {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.host strong {
  color: var(--ink);
  font-size: 13.5px;
}

.sidebar-buttons {
  display: flex;
  gap: 6px;
}

.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 32px;
  background: color-mix(in srgb, var(--page) 84%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-title {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand--mini {
  display: none;
  padding: 0;
}

.main {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

.banner {
  margin: 18px 32px 0;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  border-radius: 12px;
  font-size: 13.5px;
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent);
}

.view {
  animation: viewIn 0.24s ease-out both;
}

.tabbar {
  display: none;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.live .dot {
  background: var(--stopped);
}

.live.is-live .dot {
  background: var(--good);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}

.live.is-off .dot {
  background: var(--critical);
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--good) 8%, transparent);
  }
}

/* ------------------------------------------------------------------
   Kopfbereich einer Seite, Werkzeugleisten, Formulare
   ------------------------------------------------------------------ */
.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.page-head p {
  max-width: 62ch;
}

.section {
  margin-bottom: 28px;
}

.section-title {
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar--sub {
  margin-bottom: 16px;
  color: var(--ink-2);
  font-size: 13px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  max-width: 420px;
}

.search > svg {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}

.search input::placeholder {
  color: var(--muted);
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.segmented button {
  height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}

.select select {
  height: 34px;
  padding: 0 30px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

.switch input {
  appearance: none;
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition: background 0.2s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.switch input:checked {
  background: var(--accent);
}

.switch input:checked::after {
  transform: translateX(14px);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 880px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.field small {
  font-size: 12px;
  color: var(--muted);
}

.field--wide {
  grid-column: 1 / -1;
}

.field input,
.field select {
  height: 38px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.hint {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.hint summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-2);
}

.hint p {
  margin: 8px 0;
}

.code {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------------------
   Buttons, Chips, Pillen
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.btn:hover {
  background: var(--surface-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
}

.btn--soft-danger {
  background: transparent;
  border-color: color-mix(in srgb, var(--critical) 40%, transparent);
  color: var(--critical);
}

.btn--soft-danger:hover {
  background: color-mix(in srgb, var(--critical) 10%, transparent);
}

.btn--danger {
  background: var(--critical);
  border-color: transparent;
  color: #ffffff;
}

.btn--sm {
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12.5px;
}

.btn--block {
  width: 100%;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.icon-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.icon-btn--success {
  color: var(--good);
}

.icon-btn--danger {
  color: var(--critical);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--stopped);
}

.pill--good .dot {
  background: var(--good);
}

.pill--warning .dot {
  background: var(--warning);
}

.pill--serious .dot {
  background: var(--serious);
}

.pill--critical .dot {
  background: var(--critical);
}

.chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

a.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.chip--local {
  opacity: 0.75;
}

.chip--more {
  color: var(--muted);
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  vertical-align: 2px;
}

.fav-badge {
  display: inline-grid;
  place-items: center;
  margin-left: 6px;
  color: var(--warning);
  vertical-align: -2px;
}

.is-alert {
  color: var(--critical);
}

/* ------------------------------------------------------------------
   Karten, Kennzahlen, Diagramme
   ------------------------------------------------------------------ */
.card {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head p {
  margin-top: 3px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
}

.stat-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-value {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.stat-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.meter {
  display: block;
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
}

.kpi-label {
  font-size: 12.5px;
  color: var(--muted);
}

.kpi-value {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.kpi-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.chart {
  position: relative;
  min-width: 0;
}

.chart-plot {
  position: relative;
  width: 100%;
}

.chart-plot canvas {
  display: block;
  touch-action: pan-y;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-item i {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.legend-item strong {
  margin-left: 2px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13.5px;
}

/* Listen und Balken */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item > svg {
  color: var(--muted);
}

.list-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.list-text span {
  overflow-wrap: anywhere;
}

.event-dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--stopped);
}

.event-dot--good {
  background: var(--good);
}

.event-dot--warning {
  background: var(--warning);
}

.event-dot--critical {
  background: var(--critical);
}

.ok-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--good) 12%, transparent);
}

.ok-state svg {
  color: var(--good);
}

.bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.bar-label strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--series-1);
}

/* ------------------------------------------------------------------
   Container-Tabelle
   ------------------------------------------------------------------ */
.table-card {
  padding: 0;
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  padding: 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.table tr:last-child td {
  border-bottom: 0;
}

.table--compact td {
  padding: 8px 10px;
}

.table--compact th {
  padding: 8px 10px;
}

.row td:first-child {
  padding-left: 16px;
}

.row--critical td:first-child {
  box-shadow: inset 3px 0 0 var(--critical);
}

.row--warning td:first-child {
  box-shadow: inset 3px 0 0 var(--warning);
}

.row.is-off .cell-name,
.row.is-off .status-text {
  opacity: 0.8;
}

.table tbody tr.row:hover td {
  background: var(--surface-hover);
}

.group-row th {
  padding: 10px 16px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
}

.group-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 12px;
  font-weight: 620;
  color: var(--ink);
}

.cell-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cell-text {
  min-width: 0;
  max-width: 168px;
}

.name-link {
  font-weight: 600;
  text-decoration: none;
}

.name-link:hover {
  color: var(--accent);
}

.status-text {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.metric-cell strong {
  font-weight: 600;
}

.spark {
  display: block;
}

.spark--empty {
  width: 72px;
  height: 26px;
}

.actions {
  text-align: right;
  white-space: nowrap;
}

.actions-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.group-row + .row td {
  border-top: 0;
}

/* Avatare und Logos */
.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.avatar--sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 11.5px;
}

.avatar--lg {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 15px;
}

.avatar--xl {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 22px;
}

/* Logos werden als Maske in der Textfarbe gezeigt. So sind sie im hellen und dunklen Modus lesbar. */
.avatar--logo {
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.avatar--logo::after {
  content: "";
  width: 58%;
  height: 58%;
  background-color: var(--ink);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.avatar--emoji {
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 15px;
}

.avatar--sm.avatar--emoji {
  font-size: 14px;
}

.avatar--lg.avatar--emoji {
  font-size: 22px;
}

.avatar--xl.avatar--emoji {
  font-size: 30px;
}

/* ------------------------------------------------------------------
   Apps (Kacheln)
   ------------------------------------------------------------------ */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.tile.is-off {
  opacity: 0.72;
}

.tile.is-off .avatar--logo::after {
  opacity: 0.5;
}

.tile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tile-title {
  font-size: 15.5px;
  font-weight: 620;
}

.tile-title a {
  text-decoration: none;
}

.tile-title a:hover {
  color: var(--accent);
}

.tile-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.tile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tile-open {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tile-addr {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.star {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.star:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.star.is-on {
  color: var(--warning);
}

/* ------------------------------------------------------------------
   Detailseite
   ------------------------------------------------------------------ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 24px;
  margin-bottom: 18px;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.detail-title h1 {
  font-size: 26px;
}

.detail-text {
  min-width: 0;
}

.detail-text > p {
  margin: 2px 0 10px;
}

.detail-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-links {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--border);
}

.tab {
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.facts {
  margin: 0;
}

.fact {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.fact:last-child {
  border-bottom: 0;
}

.fact dt {
  color: var(--muted);
}

.fact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.masked {
  letter-spacing: 0.2em;
  color: var(--muted);
}

.env-value {
  max-width: 520px;
  overflow-wrap: anywhere;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px;
  text-align: center;
  color: var(--ink-2);
}

.empty strong {
  color: var(--ink);
}

.empty.small {
  padding: 20px;
}

/* Logs */
.log {
  padding: 10px 0;
  max-height: 62vh;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
}

.log-line {
  display: grid;
  grid-template-columns: 74px 58px minmax(0, 1fr);
  gap: 10px;
  padding: 0 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-line:hover {
  background: var(--surface-hover);
}

.log time,
.log-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.log-tag {
  align-self: start;
  margin-top: 3px;
  height: 16px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid var(--critical);
  color: var(--critical);
  font-size: 10.5px;
  line-height: 14px;
}

.log-text {
  color: var(--ink);
}

/* ------------------------------------------------------------------
   Benachrichtigungen und Dialog
   ------------------------------------------------------------------ */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.35);
  font-size: 13.5px;
  animation: toastIn 0.25s ease-out both;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--stopped);
}

.toast--success .toast-dot {
  background: var(--good);
}

.toast--error .toast-dot {
  background: var(--critical);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.dialog {
  max-width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.dialog::backdrop {
  background: rgba(6, 9, 14, 0.55);
  backdrop-filter: blur(3px);
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}

.dialog h2 {
  font-size: 17px;
}

.dialog p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.dialog-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.dialog-icon--danger {
  background: color-mix(in srgb, var(--critical) 14%, transparent);
  color: var(--critical);
}

.dialog-icon--info {
  background: var(--accent-soft);
  color: var(--accent);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* ------------------------------------------------------------------
   Responsives Layout: Tablet und Smartphone
   ------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 12px;
  }

  .main {
    padding: 24px 24px 64px;
  }
}

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .topbar {
    min-height: 58px;
    padding: 0 16px;
  }

  .brand--mini {
    display: inline-flex;
  }

  .banner {
    margin: 14px 16px 0;
  }

  .main {
    padding: 20px 16px 110px;
  }

  .tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }

  .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 0;
    border-radius: 12px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
  }

  .tab-item.is-active {
    color: var(--accent);
  }

  .tab-item .nav-count {
    display: none;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .toasts {
    right: 12px;
    bottom: 92px;
    left: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .table thead {
    display: none;
  }

  .table,
  .table tbody {
    display: block;
  }

  .table tr {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

  .table tr:last-child {
    border-bottom: 0;
  }

  .table td {
    display: block;
    flex: 1 1 40%;
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }

  .table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 11.5px;
    color: var(--muted);
  }

  .table td[data-label="Container"],
  .table td.actions {
    flex-basis: 100%;
  }

  .table td.actions::before,
  .table td[data-label="Container"]::before {
    display: none;
  }

  .table td.actions {
    text-align: left;
  }

  .table .cell-text .truncate {
    max-width: 100%;
  }

  .table td.num {
    text-align: left;
  }

  .table td:first-child {
    box-shadow: none;
  }

  .row--critical,
  .row--warning {
    box-shadow: inset 3px 0 0 var(--critical);
  }

  .row--warning {
    box-shadow: inset 3px 0 0 var(--warning);
  }

  .table tbody tr.row:hover td {
    background: transparent;
  }

  .group-row {
    display: block;
  }

  .group-row th {
    display: block;
    padding: 10px 16px;
  }

  .metric-cell {
    align-items: flex-start;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-value {
    font-size: 20px;
  }

  .detail-title h1 {
    font-size: 21px;
  }

  .fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .log-line {
    grid-template-columns: 62px 50px minmax(0, 1fr);
    padding: 0 12px;
  }

  .tiles {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }

  .search {
    max-width: none;
  }
}

/* ------------------------------------------------------------------
   Überarbeitung: Marke, Login, Kacheln, Log-Konsole, Einstellungen
   ------------------------------------------------------------------ */
.brand-mark {
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.38), transparent 52%),
    linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ffffff));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 20px -10px var(--accent);
}

.brand-text strong {
  letter-spacing: -0.01em;
}

.btn--primary {
  box-shadow: 0 8px 18px -12px var(--accent);
}

.login {
  position: relative;
  overflow: hidden;
  background: radial-gradient(60% 50% at 50% 0%, var(--glow), transparent 70%);
}

/* Canvas-Hintergrund der Anmeldung, liegt hinter der Karte */
.ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.9;
}

.login-card {
  position: relative;
  z-index: 1;
  padding: 32px 30px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
}

/* Statistikkarten mit Ring-Anzeige */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gauge {
  flex: none;
  display: block;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.38), transparent 52%),
    linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ffffff));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 12px 26px -12px var(--accent);
}

/* Kacheln mit farbigem Statusstreifen oben */
.tile {
  position: relative;
  overflow: hidden;
}

.tile::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--stopped);
}

.tile--good::before {
  background: var(--good);
}

.tile--warning::before {
  background: var(--warning);
}

.tile--critical::before {
  background: var(--critical);
}

/* Log-Konsole: immer dunkel, unabhängig vom Farbschema */
.console {
  overflow: hidden;
  padding: 0;
  background: #0c1018;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.6);
  color: #d7dee9;
}

.console-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #111722;
}

.console-dots {
  display: flex;
  gap: 6px;
}

.console-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a3344;
}

.console-dots i:nth-child(1) {
  background: #ff5f57;
}

.console-dots i:nth-child(2) {
  background: #febc2e;
}

.console-dots i:nth-child(3) {
  background: #28c840;
}

.console-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: #eef1f6;
}

.console-day {
  font-family: var(--mono);
  font-size: 12px;
  color: #7f8aa0;
}

.console-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-left: auto;
}

.console .segmented {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.console .segmented button {
  color: #8b96ab;
}

.console .segmented button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: none;
}

.console .switch {
  color: #8b96ab;
}

.console-body {
  height: min(62vh, 620px);
  overflow: auto;
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
}

.console-line {
  display: grid;
  grid-template-columns: 74px 84px 92px minmax(0, 1fr);
  gap: 12px;
  padding: 1px 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

.console-line:hover {
  background: rgba(255, 255, 255, 0.03);
}

.console-line time {
  color: #7f8aa0;
  font-variant-numeric: tabular-nums;
}

.console-level {
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.console-line.is-info .console-level {
  color: #8fb8ff;
}

.console-line.is-warn .console-level {
  color: #fab219;
}

.console-line.is-error .console-level {
  color: #ff7b72;
}

.console-source {
  color: #a7b4c8;
}

.console-line.is-error .console-msg {
  color: #ffd6d3;
}

.console-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 16px;
  color: #7f8aa0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13.5px;
}

.console-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #111722;
  font-family: var(--mono);
  font-size: 12px;
  color: #7f8aa0;
}

.console-state.is-live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #28c840;
  vertical-align: 1px;
}

/* Einstellungen: Auswahlkarten und Tabellen */
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.settings-grid > .card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.choice:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.choice--compact {
  justify-content: center;
  text-align: center;
  padding: 16px 10px;
}

.choice--compact .choice-body {
  align-items: center;
}

.choice--compact strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.settings-grid .fact dd {
  text-align: right;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.sort-btn:hover,
.sort-btn.is-active {
  color: var(--ink);
}

.sort-btn svg {
  opacity: 0.45;
}

.sort-btn.is-active svg {
  opacity: 1;
  color: var(--accent);
}

.table--files th[aria-sort="ascending"] .sort-btn svg,
.table--files th[aria-sort="descending"] .sort-btn svg {
  opacity: 1;
}

@media (max-width: 1100px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .choice-grid,
  .choice-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console-line {
    grid-template-columns: 62px 66px minmax(0, 1fr);
    padding: 1px 12px;
  }

  .console-line .console-source {
    display: none;
  }

  .console-tools {
    margin-left: 0;
  }

  .tab-item {
    font-size: 11px;
  }
}

/* Belebung: Wellen-Kopfbereich, Lichtreflex und pulsierende Statuspunkte */
.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 26px 28px 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: var(--shadow);
}

.hero-wave {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero .page-head {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.spot {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    240px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    color-mix(in srgb, var(--accent) 16%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.spot:hover::after {
  opacity: 1;
}

.spot > * {
  position: relative;
  z-index: 1;
}

.pill--good .dot {
  animation: dotPulse 2.8s ease-out infinite;
}

@keyframes dotPulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 6px transparent;
  }
}

/* Einführung und Formularmeldungen */
.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--critical);
  background: color-mix(in srgb, var(--critical) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--critical) 35%, transparent);
}

.setup-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(520px, 100%);
  padding: 32px 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.setup-card h1 {
  font-size: 22px;
  margin: 0;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px 12px 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Logo: Container fällt beim Laden auf den Boden, Lichtstreifen wandert darüber, Schatten atmet mit */
.logo {
  display: block;
  flex: none;
  overflow: visible;
  animation: logoLand 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  transition: transform 0.3s ease;
}

.brand:hover .logo {
  transform: translateY(-2px);
}

.logo-sheen {
  animation: logoSheen 5.5s ease-in-out infinite;
}

.logo-shadow {
  transform-box: fill-box;
  transform-origin: center;
  animation: logoShadow 5.5s ease-in-out infinite;
}

.brand:hover .logo-sheen {
  animation-duration: 1.6s;
}

@keyframes logoLand {
  0% {
    opacity: 0;
    transform: translateY(-14px);
  }
  62% {
    opacity: 1;
    transform: translateY(2px);
  }
  78% {
    transform: translateY(-1px);
  }
  100% {
    transform: none;
  }
}

@keyframes logoSheen {
  0%,
  40% {
    transform: translateX(-16px);
  }
  100% {
    transform: translateX(46px);
  }
}

@keyframes logoShadow {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

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