/* noty Admin. Keine externen Ressourcen (CSP), Systemschrift, eine Akzentfarbe, Kanalfarben nur als Datenfarben. */
:root {
  color-scheme: dark;
  --bg: #0d0e10;
  --bg-2: #111316;
  --surface: #16181c;
  --surface-2: #1c1f24;
  --surface-3: #23272d;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .13);
  --text: #ececef;
  --muted: #8d929b;
  --faint: #5c616a;
  --accent: #6ea6ff;
  --accent-soft: rgba(110, 166, 255, .14);
  --good: #4fc68a;
  --warn: #e3b25a;
  --critical: #ef7b72;
  --c-stable: #6ea6ff;
  --c-dev: #4cc2b4;
  --c-ai: #d9a55b;
  --c-calendar: #d67c9c;
  --radius: 18px;
  --radius-sm: 11px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, .7);
  --edge: inset 0 1px 0 rgba(255, 255, 255, .045);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
/* Ruhiger Lichtschein, fest und ohne Zeigerereignisse: kostet beim Scrollen nichts. */
.backdrop {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(110, 166, 255, .09), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(76, 194, 180, .05), transparent 60%);
}

h1 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
p { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.tiny { font-size: 12px; }
.error { color: var(--critical); font-size: 14px; }
.mono { font-family: var(--mono); font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button, input, select { font: inherit; color: inherit; }
button {
  min-height: 38px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
button:hover:not(:disabled) { background: var(--surface-3); border-color: rgba(255, 255, 255, .2); }
button:active:not(:disabled), .button-link:active { transform: translateY(1px) scale(.985); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: transparent; color: #0b1220; font-weight: 650; }
button.primary:hover:not(:disabled) { background: #86b5ff; }
button.danger { border-color: rgba(239, 123, 114, .5); color: var(--critical); }
button.danger:hover:not(:disabled) { background: rgba(239, 123, 114, .1); }
button.ghost { background: transparent; }
.icon-button { width: 38px; padding: 0; display: inline-grid; place-items: center; }
.icon-button svg, .button-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.spinning svg { animation: spin .8s linear infinite; }
input, select {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { width: auto; max-width: 260px; min-height: 38px; padding-right: 30px; }

/* Anmeldung: links Marke mit Grafik, rechts Formular. */
.login {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.login-art {
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 40px 48px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent);
}
.login-graph { width: 100%; height: 42vh; max-height: 360px; }
.lg-grid { stroke: var(--line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.lg-area { fill: var(--accent-soft); }
.lg-line { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; animation: rise 1.4s var(--ease) .2s both; }
.lg-dot { fill: var(--accent); transform-origin: 300px 80px; animation: breathe 2.6s ease-in-out infinite; }
.login-claim { max-width: 26ch; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.login-panel { align-self: center; width: min(380px, 100% - 32px); margin: 0 auto; padding: 32px 0; animation: rise .7s var(--ease) both; }
.login-panel h1 { font-size: 24px; letter-spacing: -.02em; }
.login-panel form { display: grid; gap: 16px; margin-top: 24px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; color: var(--muted); }
.login-panel button[type="submit"] { min-height: 44px; margin-top: 4px; }
.remember { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent, currentColor); }
#sessions .chip-soft { margin-left: 8px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.mark { width: 28px; height: 28px; flex: none; }
.mark-bg { fill: var(--surface-3); stroke: var(--line-strong); }
.mark-line { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Nach Apples Vorgabe: schwarz, weißes Logo, Systemschrift; die feine Kante hebt ihn vom dunklen Grund ab. */
.apple-area { display: grid; gap: 14px; margin-top: 18px; }
.divider { display: flex; align-items: center; gap: 10px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.apple-button {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 14px;
  background: #000; color: #fff;
  border: 1px solid #55585e; border-radius: 10px;
  font-size: 17px; font-weight: 500; text-decoration: none;
}
.apple-button:hover { border-color: var(--muted); }
.apple-button img { display: block; width: 15px; height: 18px; margin-top: -2px; }

/* Panel */
.panel { position: relative; max-width: 1400px; margin: 0 auto; padding: 0 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  margin: 0 -24px; padding: 12px 24px;
  background: rgba(13, 14, 16, .78);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; gap: 2px; margin-right: auto; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--edge); }
.nav a {
  padding: 6px 12px; border-radius: 9px;
  color: var(--muted); font-size: 14px; text-decoration: none;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a.current { color: var(--text); background: var(--surface-3); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.live { display: inline-flex; align-items: center; gap: 8px; margin-right: 4px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); position: relative; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good); animation: ping 2.4s var(--ease) infinite; }
.banner { padding: 10px 14px; margin-top: -24px; border: 1px solid rgba(239, 123, 114, .45); background: rgba(239, 123, 114, .07); border-radius: var(--radius-sm); animation: rise .4s var(--ease) both; }

.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 16px; }
.section-head h2 { color: var(--text); font-size: 24px; font-weight: 650; letter-spacing: -.025em; line-height: 1.1; }
.eyebrow { margin-bottom: 4px; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.subhead { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.note { max-width: 860px; margin: 8px 0; }

.tile {
  position: relative;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--edge), var(--shadow);
  min-width: 0;
}
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chip-soft { padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.value { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.value.big { font-size: 40px; line-height: 1; }
.value.good { color: var(--good); }
.value.bad { color: var(--critical); }
.reveal { animation: rise .7s var(--ease) both; }
.bento .reveal:nth-child(2) { animation-delay: .06s; }
.bento .reveal:nth-child(3) { animation-delay: .12s; }
.bento .reveal:nth-child(4) { animation-delay: .18s; }

/* Übersicht als asymmetrisches Raster. */
.bento { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 14px; }
.tile-hero { grid-row: span 2; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.hero-number { font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -.045em; margin: 4px 0 6px; }
.hero-unit { margin-left: 8px; font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.spark-wrap { margin-top: auto; padding-top: 18px; }
.spark { height: 96px; margin: 0 -20px -4px; }
.spark svg { display: block; width: 100%; height: 100%; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--ease) forwards; }
.spark-dot { fill: var(--accent); }
.tile-plan { grid-column: span 2; }
.tile-providers { grid-column: 1 / -1; display: grid; gap: 12px; }
.providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.provider { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.provider .dot { margin-top: 5px; }
.provider-main { display: grid; gap: 2px; min-width: 0; }
.provider-name { font-weight: 600; }
.provider-reason { color: var(--critical); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); position: relative; flex: none; }
.dot.good { background: var(--good); }
.dot.good::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good); animation: ping 2.4s var(--ease) infinite; }
.dot.bad { background: var(--critical); }
.dot.warn { background: var(--warn); }
.activity { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.activity i { width: 3px; height: 4px; border-radius: 2px; background: var(--faint); transition: background .3s; }
.activity.on i { background: var(--accent); animation: eq 1s ease-in-out infinite; }
.activity.on i:nth-child(2) { animation-delay: .15s; }
.activity.on i:nth-child(3) { animation-delay: .3s; }
.activity.on i:nth-child(4) { animation-delay: .45s; }

/* Kontingent als Ringe. */
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.gauge { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 16px; padding: 10px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.gauge svg { width: 92px; height: 92px; }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ring { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; animation: dash-in 1.1s var(--ease) both; }
.gauge.tight .ring { stroke: var(--critical); }
.gauge.mid .ring { stroke: var(--warn); }
.ring-label { fill: var(--text); font-size: 16px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.ring-sub { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.gauge-text { display: grid; gap: 3px; min-width: 0; }
.gauge-text strong { font-size: 15px; font-weight: 600; }
.gauge-empty { padding: 18px 0; }
details.history { margin-top: 14px; }
details > summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .25s var(--ease); }
details[open] > summary::before { transform: rotate(45deg); }
details > summary:hover { color: var(--text); }
details.history .table-wrap { margin-top: 8px; }

/* Produktion */
.timeline-card { margin: 0; padding-bottom: 14px; }
.timeline-card figcaption, .chart figcaption { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.timeline { height: 196px; }
.timeline svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tl-lane { stroke: var(--line); stroke-width: 1; }
.tl-lane-label { fill: var(--muted); font-size: 12px; }
.tl-tick { fill: var(--faint); font-size: 11px; }
.tl-grid { stroke: var(--line); stroke-dasharray: 2 4; }
.tl-now { stroke: var(--accent); stroke-dasharray: 3 3; opacity: .6; }
.tl-point { cursor: pointer; }
.tl-point circle.halo { opacity: 0; transition: opacity .2s; }
.tl-point:hover circle.halo, .tl-point.active circle.halo { opacity: .25; }
.tl-point text { fill: var(--text); font-size: 11px; font-weight: 600; text-anchor: middle; pointer-events: none; }
.tl-point.old circle.core { fill: var(--bg) !important; stroke-width: 2; }
.tl-point.old text { fill: var(--muted); font-weight: 500; }
.k-stable { fill: var(--c-stable); stroke: var(--c-stable); }
.k-dev { fill: var(--c-dev); stroke: var(--c-dev); }
.k-ai { fill: var(--c-ai); stroke: var(--c-ai); }
.k-calendar { fill: var(--c-calendar); stroke: var(--c-calendar); }

.apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.app-card {
  --tone: var(--accent);
  position: relative; display: grid; gap: 12px; align-content: start;
  padding: 18px; min-width: 0; min-height: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--edge), var(--shadow);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
  animation: rise .6s var(--ease) both;
}
.app-card:nth-child(2) { animation-delay: .05s; } .app-card:nth-child(3) { animation-delay: .1s; } .app-card:nth-child(4) { animation-delay: .15s; }
.apps.settled .app-card, .apps.settled .bar-value { animation: none; }
.app-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.app-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--tone); opacity: .85; }
.app-card.tone-stable { --tone: var(--c-stable); } .app-card.tone-dev { --tone: var(--c-dev); }
.app-card.tone-ai { --tone: var(--c-ai); } .app-card.tone-calendar { --tone: var(--c-calendar); }
.app-card.newest { border-color: color-mix(in srgb, var(--tone) 45%, transparent); }
.app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.app-head h3 { margin: 0; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.app-head .muted { display: block; margin-top: 2px; }
.newest-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); white-space: nowrap; }
.build-row { display: flex; align-items: baseline; gap: 8px; }
.build { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.04em; color: var(--text); white-space: nowrap; }
.build-label { color: var(--muted); font-size: 13px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.commit { padding: 1px 6px; border-radius: 6px; background: var(--surface-3); font-family: var(--mono); font-size: 12px; }
.dirty { color: var(--warn); }
.profile { display: grid; gap: 6px; }
.profile-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.bar { display: block; width: 100%; height: 6px; border-radius: 6px; overflow: hidden; }
.bar-track { fill: var(--surface-3); }
.bar-value { fill: var(--accent); transform-box: fill-box; transform-origin: left; animation: grow-x 1s var(--ease) both; }
.meter .bar-value { fill: var(--good); }
.meter.warn .bar-value { fill: var(--warn); } .meter.bad .bar-value { fill: var(--critical); }
.warn-text { color: var(--warn); font-size: 12px; }
.bad-text { color: var(--critical); font-size: 12px; font-weight: 600; }
.app-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
.app-actions .primary-link { grid-column: 1 / -1; }
.app-actions button, .app-actions .button-link { min-height: 36px; font-size: 13px; padding: 0 12px; }
.button-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px;
  color: var(--text); text-decoration: none; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px;
  transition: background .25s var(--ease), transform .15s var(--ease);
}
.button-link:hover { background: var(--surface-3); }
.button-link.primary-link { background: var(--tone, var(--accent)); border-color: transparent; color: #0b1220; font-weight: 650; }
.button-link.primary-link:hover { filter: brightness(1.1); }
.app-card.empty { opacity: .75; }
.app-card.empty .empty-mark { width: 44px; height: 44px; margin-top: 12px; fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-dasharray: 4 4; }

.skeleton-card, .skeleton { position: relative; overflow: hidden; }
.skeleton-card::after, .skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .045) 50%, transparent 80%);
  transform: translateX(-100%); animation: shimmer 1.6s ease-in-out infinite;
}

.ops { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: stretch; }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; align-content: start; }
.service {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--edge);
}
.service.bad { border-color: rgba(239, 123, 114, .45); }
.service-name { font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.service-state { display: block; font-size: 12px; color: var(--muted); }
.service.bad .service-state { color: var(--critical); }
.latency { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.latency i { width: 3px; border-radius: 2px; background: var(--surface-3); }
.latency i:nth-child(1) { height: 5px; } .latency i:nth-child(2) { height: 9px; } .latency i:nth-child(3) { height: 13px; } .latency i:nth-child(4) { height: 16px; }
.latency.l4 i, .latency.l3 i:nth-child(-n+3), .latency.l2 i:nth-child(-n+2), .latency.l1 i:nth-child(1) { background: var(--good); }
.server-box { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 18px; }
.server-box svg { width: 96px; height: 96px; }
.server-box .ring { stroke: var(--c-dev); }
.server-box .ring.bad { stroke: var(--critical); }
.server-lines { display: grid; gap: 6px; font-size: 13px; }
.server-lines strong { display: block; font-size: 22px; letter-spacing: -.02em; }

/* Verbrauch */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.segmented { position: relative; display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--edge); }
.segmented button { position: relative; z-index: 1; min-height: 34px; border: 0; background: transparent; color: var(--muted); border-radius: 9px; }
.segmented button:hover:not(:disabled) { background: transparent; color: var(--text); }
.segmented button { transition: background .35s var(--ease), color .35s var(--ease); }
.segmented button[aria-pressed="true"], .segmented button[aria-pressed="true"]:hover:not(:disabled) { background: var(--accent); color: #0b1220; font-weight: 650; }
.exports { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--edge); animation: rise .5s var(--ease) both; min-width: 0; }
.kpi:nth-child(2) { animation-delay: .04s; } .kpi:nth-child(3) { animation-delay: .08s; } .kpi:nth-child(4) { animation-delay: .12s; }
.kpi h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi strong { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.03em; overflow-wrap: anywhere; }
.kpi .muted { display: block; margin-top: 2px; font-size: 12px; }

.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.charts { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; }
.chart { position: relative; margin: 0; padding: 16px 18px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--edge), var(--shadow); min-width: 0; }
.chart figcaption .muted { font-weight: 400; }
.chart-plot { position: relative; height: 200px; outline: none; touch-action: pan-y; }
.chart-plot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.chart-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-plot .grid line { stroke: var(--line); }
.chart-plot .grid text { fill: var(--faint); font-size: 11px; }
.chart-plot .col { fill: transparent; cursor: crosshair; }
.chart-plot .col.active { fill: rgba(255, 255, 255, .025); }
.chart-plot .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s var(--ease) forwards; }
.chart-plot circle.fill { fill: var(--accent); opacity: 0; }
.chart-plot rect.fill { fill: var(--c-dev); opacity: .85; transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) both; transition: opacity .2s; }
.chart-plot .errbar { fill: var(--critical); opacity: .9; pointer-events: none; transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) both; }
.chart-plot.dense .errbar { animation: none; }
.chart-plot.dense rect.fill { animation: none; }
.chart-plot .cross { stroke: var(--muted); stroke-dasharray: 3 3; opacity: 0; transition: opacity .15s; }
.chart-plot .focus-dot { fill: var(--bg); stroke: var(--accent); stroke-width: 2.5; opacity: 0; transition: opacity .15s; }
.chart-plot.pointing .cross, .chart-plot.pointing .focus-dot { opacity: 1; }
.chart-plot.pointing rect.fill:not(.on) { opacity: .45; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; pointer-events: none; }
.tip { opacity: 0; transition: opacity .15s; pointer-events: none; }
.tip.on { opacity: 1; }
.tip-box { fill: rgba(28, 31, 36, .96); stroke: var(--line-strong); }
.tip-main { fill: var(--text); font-size: 13px; font-weight: 700; }
.tip-sub { fill: var(--muted); font-size: 11px; }
.tip-err { fill: var(--critical); font-size: 11px; }
.chart-axis { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.chart-detail { min-height: 1.4em; margin-top: 2px; }

.mix { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 18px; min-height: 200px; }
.mix svg { width: 150px; height: 150px; }
.seg { fill: none; stroke-width: 18; cursor: pointer; transition: stroke-width .25s var(--ease), opacity .25s; animation: dash-in 1s var(--ease) both; }
.mix.focus .seg { opacity: .3; } .mix.focus .seg.on { opacity: 1; stroke-width: 22; }
.seg.m0 { stroke: var(--accent); } .seg.m1 { stroke: var(--c-dev); } .seg.m2 { stroke: var(--c-ai); } .seg.m3 { stroke: var(--c-calendar); }
.mix-center { fill: var(--text); font-size: 14px; font-weight: 700; text-anchor: middle; }
.mix-sub { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: background .2s; }
.legend li:hover, .legend li.on { background: var(--surface-3); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.sw.m0 { background: var(--accent); } .sw.m1 { background: var(--c-dev); } .sw.m2 { background: var(--c-ai); } .sw.m3 { background: var(--c-calendar); }
.legend .num { color: var(--muted); font-size: 12px; }

.share { display: grid; gap: 10px; }
.share-row { display: grid; grid-template-columns: minmax(80px, 160px) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 13px; }
.share-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-bar { height: 10px; }
.share-value { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }

.stats-details > summary { margin-bottom: 10px; }

/* Tabellen */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--edge); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { position: sticky; top: 0; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); white-space: nowrap; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.cell-name { font-weight: 600; overflow-wrap: anywhere; min-width: 90px; }
.cell-usage { min-width: 112px; }
.cell-seen { min-width: 92px; }
.lines { display: block; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--muted);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.active, .badge.run-completed { color: var(--good); background: rgba(79, 198, 138, .1); }
.badge.pending { color: var(--warn); background: rgba(227, 178, 90, .1); }
.badge.blocked, .badge.run-failed, .badge.run-timeout, .badge.run-restarted { color: var(--critical); background: rgba(239, 123, 114, .1); }
.badge.run-running { color: var(--accent); background: var(--accent-soft); }
.badge.run-running::before { animation: breathe 1.4s ease-in-out infinite; }
.badge.run-interrupted { color: var(--muted); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #0b1220; }
.avatar::before { content: attr(data-initials); }
.av-0 { background: #8fb8ff; } .av-1 { background: #7fd3c8; } .av-2 { background: #e6c08a; } .av-3 { background: #e3a2b9; } .av-4 { background: #b9c3d1; } .av-5 { background: #a8d98f; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 124px; }
.actions button, .limit-form button { min-height: 34px; padding: 0 11px; font-size: 13px; }
.limit-form { display: grid; gap: 6px; min-width: 170px; }
.limit-form label { font-size: 12px; color: var(--muted); }
.limit-buttons { display: flex; gap: 6px; }
.confirm-text { width: 100%; font-size: 13px; color: var(--warn); }
table.data th.num, table.data td.num { text-align: right; }
table.data td { white-space: nowrap; }
table.data td.cell-name, table.data th.cell-name { white-space: normal; }
table.data tr.total th, table.data tr.total td { background: var(--surface-2); font-weight: 650; }
table.data tr.total .muted { font-weight: 400; }
table.data th[scope="row"] { font-size: 14px; color: var(--text); }
.cell-quota { min-width: 160px; }
#runs td.cell-name { min-width: 110px; overflow-wrap: anywhere; }
.more { display: flex; justify-content: center; }
.empty-state { display: grid; gap: 4px; padding: 28px 20px; text-align: left; border: 1px dashed var(--line-strong); border-radius: var(--radius); font-weight: 600; }

/* Animationen */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* Nur Startwert: das Ziel ist der Wert aus dem SVG-Attribut. */
@keyframes dash-in { from { stroke-dasharray: 0 100; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.82); } }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* Breiten */
@media (max-width: 1240px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav a { padding: 6px 9px; }
}

/* iPad in beiden Lagen und schmaler: jedes Konto als Karte statt zehn enger Spalten. */
@media (max-width: 1200px) {
  .table-wrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  #users thead { display: none; }
  #users, #users tbody { display: block; }
  #users tr, table.cards tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 16px;
    margin-bottom: 12px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--edge);
  }
  #users td { display: block; padding: 0; border: 0; min-width: 0; }
  #users td::before, table.cards td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
  }
  #users td.cell-name { grid-column: 1 / -1; font-size: 16px; order: -1; }
  #users td.cell-usage { order: 1; }
  #users td.cell-actions { order: 2; grid-column: 1 / -1; }
  #users td.cell-name::before, #users td.cell-actions::before { content: none; }
  .limit-form { max-width: 320px; }
  table.cards thead { display: none; }
  table.cards, table.cards tbody { display: block; }
  table.cards tr.total { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
  table.data.cards tr.total th, table.data.cards tr.total td { background: none; }
  table.cards td, table.cards th[scope="row"] { display: block; padding: 0; border: 0; min-width: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  table.data.cards td.num { text-align: left; }
  table.cards th[scope="row"] { grid-column: 1 / -1; font-size: 16px; }
  #runs td.cell-name { order: -1; }
  #runs td[data-label="Start"] { order: -2; }
  #runs td.cell-quota { grid-column: span 2; }
  .ops { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-hero { grid-row: auto; grid-column: 1 / -1; }
  .tile-plan { grid-column: 1 / -1; }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .nav { order: 3; width: 100%; min-width: 0; margin-right: 0; overflow-x: auto; scrollbar-width: none; }
  .nav a { flex: 1 0 auto; text-align: center; }
  .top-actions { margin-left: auto; }
  html { scroll-padding-top: 128px; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 24px; gap: 20px; }
  .login-graph { height: 160px; }
  .login-claim { font-size: 20px; }
}

@media (max-width: 640px) {
  .panel { padding: 0 16px 48px; gap: 32px; }
  .topbar { margin: 0 -16px; padding: 10px 16px; gap: 10px; }
  .live { display: none; }
  .apps { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .hero-number { font-size: 46px; }
  .kpis { gap: 10px; }
  .kpi strong { font-size: 21px; }
  .mix { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .legend { width: 100%; }
  .share-row { grid-template-columns: minmax(0, 1fr) auto; }
  .share-bar { grid-column: 1 / -1; grid-row: 2; }
  .server-box { grid-template-columns: 80px minmax(0, 1fr); }
  .server-box svg { width: 80px; height: 80px; }
  .gauge { grid-template-columns: 76px minmax(0, 1fr); }
  .gauge svg { width: 76px; height: 76px; }
  /* Der Kontingentverlauf hat nur sechs Spalten und wird erst hier zur Karte. */
  table.cards-narrow thead { display: none; }
  table.cards-narrow, table.cards-narrow tbody { display: block; }
  table.cards-narrow tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-bottom: 10px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
  table.cards-narrow td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  table.data.cards-narrow td.num { text-align: left; }
  table.cards-narrow td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
  #users tr, table.cards tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { align-items: stretch; }
  .segmented { width: 100%; }
  .segmented button { flex: 1 1 auto; padding: 0 6px; }
  .exports { width: 100%; }
  .exports .button-link { flex: 1 1 0; }
  .login-art { padding: 22px 16px; }
}
