/*
 * NetzCloud Status — Design-System
 * ================================
 * Eine Datei, kein Build-Schritt. Aufbau:
 *   1. Tokens (hell / dunkel)       5. Statusseite
 *   2. Basis & Typografie           6. Admin-Shell
 *   3. Status-Töne                  7. Admin-Komponenten
 *   4. Komponenten                  8. Bewegung & Responsive
 */

/* ---------------------------------------------------------------------- */
/* 1. Tokens                                                                */
/* ---------------------------------------------------------------------- */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --glass: rgba(251, 251, 253, 0.78);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.07);
  --fill-3: rgba(118, 118, 128, 0.18);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --sep: rgba(60, 60, 67, 0.1);
  --sep-2: rgba(60, 60, 67, 0.18);

  --accent: #0071e3;
  --accent-ink: #0066cc;
  --on-accent: #ffffff;

  --ok: #34c759;      --ok-ink: #1f8a3b;
  --warn: #ffc300;    --warn-ink: #9a6a00;
  --partial: #ff9500; --partial-ink: #c24e00;
  --down: #ff3b30;    --down-ink: #d70015;
  --maint: #007aff;   --maint-ink: #0060df;
  --none: #c7c7cc;    --none-ink: #8e8e93;

  --shadow-1: 0 0 0 0.5px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 0 0 0.5px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03), 0 12px 32px -12px rgba(0, 0, 0, 0.1);
  --shadow-3: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 24px 64px -16px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.06);

  --r-xs: 8px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  color-scheme: light;
}

.dark {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #232325;
  --glass: rgba(22, 22, 24, 0.72);
  --fill: rgba(118, 118, 128, 0.24);
  --fill-2: rgba(118, 118, 128, 0.14);
  --fill-3: rgba(118, 118, 128, 0.32);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --sep: rgba(255, 255, 255, 0.08);
  --sep-2: rgba(255, 255, 255, 0.14);

  --accent: #0a84ff;
  --accent-ink: #409cff;

  --ok: #30d158;      --ok-ink: #30d158;
  --warn: #ffd60a;    --warn-ink: #ffd60a;
  --partial: #ff9f0a; --partial-ink: #ff9f0a;
  --down: #ff453a;    --down-ink: #ff6961;
  --maint: #0a84ff;   --maint-ink: #409cff;
  --none: #48484a;    --none-ink: #8e8e93;

  --shadow-1: 0 0 0 0.5px rgba(255, 255, 255, 0.07);
  --shadow-2: 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-3: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 24px 64px -12px rgba(0, 0, 0, 0.8);

  color-scheme: dark;
}

/* ---------------------------------------------------------------------- */
/* 2. Basis & Typografie                                                    */
/* ---------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.022em; line-height: 1.12; font-weight: 700; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------------- */
/* 3. Status-Töne                                                           */
/* ---------------------------------------------------------------------- */

.t-ok      { --tone: var(--ok);      --tone-ink: var(--ok-ink); }
.t-warn    { --tone: var(--warn);    --tone-ink: var(--warn-ink); }
.t-partial { --tone: var(--partial); --tone-ink: var(--partial-ink); }
.t-down    { --tone: var(--down);    --tone-ink: var(--down-ink); }
.t-maint   { --tone: var(--maint);   --tone-ink: var(--maint-ink); }
.t-none    { --tone: var(--none);    --tone-ink: var(--none-ink); }

.tone-ink { color: var(--tone-ink); }

.dot {
  position: relative;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--tone, var(--none));
  flex: none;
  transition: background-color .4s var(--ease);
}
.dot-sm { width: 8px; height: 8px; }
.dot-lg { width: 12px; height: 12px; }
/* Sanfter Puls: signalisiert „lebt / wird überwacht“ bzw. dringliche Störungen. */
.dot.pulse::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: dot-pulse 2.4s var(--ease) infinite;
}
.t-down .dot.pulse::after, .dot.pulse.t-down::after { animation-duration: 1.2s; }
@keyframes dot-pulse {
  0% { transform: scale(1); opacity: .55; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--tone-ink, var(--text-2));
  background: color-mix(in srgb, var(--tone, var(--none)) 14%, transparent);
  white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; }
.pill-plain { background: var(--fill-2); color: var(--text-2); }

/* ---------------------------------------------------------------------- */
/* 4. Komponenten                                                           */
/* ---------------------------------------------------------------------- */

/* Buttons ---------------------------------------------------------------- */
.btn {
  --h: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--h); padding: 0 16px;
  border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  background: var(--fill); color: var(--text);
  white-space: nowrap; user-select: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease), opacity .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--fill-3); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn .i { width: 16px; height: 16px; stroke-width: 2; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: transparent; color: var(--accent-ink); }
.btn-ghost:hover { background: var(--fill-2); }
.btn-danger { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down-ink); }
.btn-danger:hover { background: color-mix(in srgb, var(--down) 20%, transparent); }
.btn-danger-solid { background: var(--down); color: #fff; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--down) 88%, #000); }
.btn-sm { --h: 30px; padding: 0 12px; font-size: 13px; }
.btn-lg { --h: 44px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; background: transparent; color: var(--text-2); }
.btn-icon:hover { background: var(--fill); color: var(--text); }
.btn.is-loading { position: relative; pointer-events: none; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 2px solid var(--text-2); border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-primary.is-loading::after, .btn-danger-solid.is-loading::after { border-color: #fff; border-right-color: transparent; }
.btn-danger.is-loading::after { border-color: var(--down-ink); border-right-color: transparent; }

.spinner {
  width: 16px; height: 16px; flex: none;
  border: 2px solid var(--fill-3); border-top-color: var(--text-2);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Karten ----------------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
.card-pad { padding: 20px; }

/* Gruppierte Liste (iOS-Stil) --------------------------------------------- */
.list { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.list-row {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 12px 18px;
  transition: background-color .2s var(--ease);
}
.list-row + .list-row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 18px;
  border-top: 1px solid var(--sep);
}
a.list-row:hover, .list-row.is-link:hover { background: var(--fill-2); }
.list-row .chev { color: var(--text-3); }
.list-title { font-weight: 600; font-size: 15px; }
.list-sub { font-size: 13px; color: var(--text-2); }

/* Formular --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 18px; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 42px;
  padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--fill-2);
  font-size: 15px;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  outline: none;
  -webkit-appearance: none; appearance: none;
}
.textarea { height: auto; min-height: 104px; padding: 11px 14px; resize: vertical; line-height: 1.5; }
.select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.input:hover, .select:hover, .textarea:hover { background-color: var(--fill); }
.input:focus, .select:focus, .textarea:focus {
  background-color: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
input[type="color"].input { padding: 4px; cursor: pointer; }
.input-icon { position: relative; }
.input-icon .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 38px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 .field + .field, .grid-3 .field + .field { margin-top: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Schalter (iOS-Toggle) ---------------------------------------------------- */
.switch { position: relative; display: inline-flex; flex: none; width: 51px; height: 31px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: var(--fill-3);
  transition: background-color .25s var(--ease);
  pointer-events: none;
}
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16);
  transition: transform .3s var(--spring);
}
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.switch-sm { width: 42px; height: 26px; }
.switch-sm span::after { width: 22px; height: 22px; }
.switch-sm input:checked + span::after { transform: translateX(16px); }

.toggle-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.toggle-row + .toggle-row, .field + .toggle-row, .toggle-row + .field { margin-top: 18px; }

/* Segmented Control ------------------------------------------------------ */
.seg {
  position: relative;
  display: inline-flex; gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg > label, .seg > a, .seg > button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 0 14px;
  border: 0; border-radius: 8px;
  background: transparent;
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; cursor: pointer;
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease), color .2s;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg > label:has(input:checked), .seg > .is-active {
  background: var(--surface);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04);
  font-weight: 600;
}
.dark .seg > label:has(input:checked), .dark .seg > .is-active { background: #636366; box-shadow: none; }
.seg > label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.seg-block { display: flex; }
.seg-block > * { flex: 1; }
.seg .count { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Auswahl-Chips (Mehrfachauswahl) ---------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border-radius: 999px;
  background: var(--fill-2);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; user-select: none;
  transition: background-color .2s var(--ease), color .2s, box-shadow .2s;
}
.chip:hover { background: var(--fill); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .i { width: 14px; height: 14px; stroke-width: 2.4; display: none; }
.chip:has(input:checked) { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.chip:has(input:checked) .i { display: block; }
.chip:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }

/* Popover-Menü ----------------------------------------------------------- */
.menu {
  position: fixed; z-index: 80;
  min-width: 220px; padding: 6px;
  border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-3);
  transform-origin: top right;
  animation: menu-in .22s var(--ease);
}
.menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: scale(.94) translateY(-4px); } }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 36px; padding: 0 10px;
  border: 0; border-radius: 9px;
  background: transparent;
  font-size: 14px; text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }
.menu-item:hover .dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.menu-item .check { margin-left: auto; opacity: 0; }
.menu-item.is-current .check { opacity: 1; }
.menu-item.danger { color: var(--down-ink); }
.menu-item.danger:hover { background: var(--down); color: #fff; }
.menu-sep { height: 1px; margin: 5px 10px; background: var(--sep-2); }
.menu-label { padding: 6px 10px 4px; font-size: 12px; font-weight: 600; color: var(--text-3); }

/* Toasts ----------------------------------------------------------------- */
.toasts {
  position: fixed; z-index: 100;
  left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  display: inline-flex; align-items: center; gap: 10px;
  max-width: min(92vw, 440px);
  padding: 11px 18px 11px 14px;
  border-radius: 999px;
  background: rgba(30, 30, 32, .9);
  color: #f5f5f7;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .4);
  font-size: 14px; font-weight: 500;
  pointer-events: auto;
  animation: toast-in .45s var(--spring);
}
.dark .toast { background: rgba(58, 58, 60, .92); }
.toast .dot { --tone: var(--ok); }
.toast.is-error .dot { --tone: var(--down); }
.toast.is-leaving { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Dialog ----------------------------------------------------------------- */
dialog.sheet {
  width: min(92vw, 380px);
  padding: 0; border: 0;
  border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  color: var(--text);
  box-shadow: var(--shadow-3);
  text-align: center;
}
dialog.sheet[open] { animation: sheet-in .35s var(--spring); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade-in .25s var(--ease); }
.sheet-body { padding: 26px 24px 20px; }
.sheet-icon { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down-ink); }
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-text { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 20px 20px; }
@keyframes sheet-in { from { opacity: 0; transform: scale(.92); } }
@keyframes fade-in { from { opacity: 0; } }

/* Tooltip ---------------------------------------------------------------- */
.tip {
  position: fixed; z-index: 120;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(28, 28, 30, .92);
  color: #f5f5f7;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(4px);
  transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.tip.is-visible { opacity: 1; transform: none; }
.tip b { font-weight: 700; }

/* Leerzustand ------------------------------------------------------------ */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 24px;
  text-align: center;
}
.empty-icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; margin-bottom: 16px;
  border-radius: 18px;
  background: var(--fill-2);
  color: var(--text-3);
}
.empty-icon .i { width: 28px; height: 28px; stroke-width: 1.6; }
.empty-title { font-size: 17px; font-weight: 600; }
.empty-text { margin-top: 4px; font-size: 14px; color: var(--text-2); max-width: 320px; }
.empty .btn { margin-top: 18px; }

/* Skeleton --------------------------------------------------------------- */
.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--fill-2) 25%, var(--fill) 50%, var(--fill-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Hinweis-/Fehlerbox ------------------------------------------------------ */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--tone, var(--maint)) 11%, transparent);
  color: var(--text);
  font-size: 14px;
}
.notice > .i { color: var(--tone-ink, var(--maint-ink)); margin-top: 1px; }
.notice-title { font-weight: 600; }
.notice-text { color: var(--text-2); }

/* Theme-Schalter --------------------------------------------------------- */
.theme-btn .ic-sun { display: none; }
.dark .theme-btn .ic-sun { display: block; }
.dark .theme-btn .ic-moon { display: none; }

/* ---------------------------------------------------------------------- */
/* 5. Statusseite                                                           */
/* ---------------------------------------------------------------------- */

.p-wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }

.p-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.p-header.is-scrolled { border-bottom-color: var(--sep); }
.p-header-in { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }

/* Hero */
.hero { padding: 64px 0 48px; text-align: center; }
.orb {
  position: relative;
  width: 88px; height: 88px; margin: 0 auto 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--tone) 70%, #fff) 0%, var(--tone) 55%, color-mix(in srgb, var(--tone) 80%, #000) 100%);
  box-shadow: 0 16px 48px -12px color-mix(in srgb, var(--tone) 70%, transparent), inset 0 1px 1px rgba(255, 255, 255, .45);
  transition: background .6s var(--ease), box-shadow .6s var(--ease);
}
.orb .i { width: 40px; height: 40px; stroke-width: 2.6; }
.orb::before, .orb::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--tone);
  opacity: 0;
  animation: orb-ring 3.6s var(--ease) infinite;
}
.orb::after { animation-delay: 1.8s; }
.orb.t-down::before, .orb.t-down::after { animation-duration: 2s; }
.orb.t-down::after { animation-delay: 1s; }
@keyframes orb-ring {
  0% { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.9); opacity: 0; }
}
.hero-title { font-size: clamp(30px, 6vw, 44px); font-weight: 700; letter-spacing: -0.032em; }
.hero-meta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  font-size: 14px; color: var(--text-2);
}
.live-dot { --tone: var(--ok); }
.is-off > .live-dot { --tone: var(--none); }
.is-off > .live-dot::after { display: none; }
[data-live-state].is-off .when-on, [data-live-state]:not(.is-off) .when-off { display: none; }
[data-live-region] { transition: opacity .3s var(--ease); }

.banner {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 auto 28px;
  padding: 14px 18px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--tone) 11%, var(--surface));
  box-shadow: var(--shadow-1);
  font-size: 14px;
}
.banner > .i { color: var(--tone-ink); margin-top: 1px; }
.banner-title { font-weight: 600; }
.banner-text { color: var(--text-2); }

/* Abschnittsüberschrift */
.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 0 4px 12px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }

/* Ereignisse (Vorfälle, Wartungen) */
.events { display: flex; flex-direction: column; gap: 10px; }
.event {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px 16px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.event::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone); }
a.event:hover { transform: translateY(-1px); box-shadow: var(--shadow-3); }
.event-title { font-weight: 600; font-size: 15px; }
.event-meta { margin-top: 2px; font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.event .chev { color: var(--text-3); }

/* Dienste */
.groups { display: flex; flex-direction: column; gap: 14px; }
.group { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.group-head {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 16px 20px;
  border: 0; background: transparent; text-align: left;
  transition: background-color .2s var(--ease);
}
.group-head:hover { background: var(--fill-2); }
.group-name { font-size: 15px; font-weight: 650; }
.group-sum { font-size: 13px; color: var(--text-2); }
.group-head .chev-d { color: var(--text-3); transition: transform .35s var(--ease); }
.group.is-collapsed .chev-d { transform: rotate(-90deg); }
.group-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .4s var(--ease); }
.group.is-collapsed .group-body { grid-template-rows: 0fr; }
.group-body > div { overflow: hidden; }

.svc { position: relative; padding: 14px 20px 16px; }
.svc::before { content: ""; position: absolute; top: 0; left: 20px; right: 0; border-top: 1px solid var(--sep); }
.svc-top { display: flex; align-items: center; gap: 12px; }
.svc-name { font-size: 15px; font-weight: 500; }
.svc-state { font-size: 13px; font-weight: 600; color: var(--tone-ink); white-space: nowrap; }
.svc-up { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }

/* Verlaufsbalken */
.bars { display: flex; gap: 2px; height: 26px; margin-top: 12px; }
.bars > i {
  flex: 1; min-width: 0;
  border-radius: 2px;
  background: var(--tone);
  transition: transform .2s var(--ease), opacity .2s;
  transform-origin: bottom;
}
.bars > i.t-ok { opacity: .9; }
.bars > i.t-none { background: var(--fill); }
.bars:hover > i { opacity: .55; }
.bars > i:hover { opacity: 1; transform: scaleY(1.12); }
.bars-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }

.p-footer { padding: 40px 0 56px; font-size: 13px; color: var(--text-3); }
.p-footer-in { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: center; }
.p-footer a:hover { color: var(--text); }

/* Einzelansicht Vorfall / Verlauf */
.back { display: inline-flex; align-items: center; gap: 4px; margin: 28px 0 20px -4px; font-size: 14px; font-weight: 500; color: var(--accent-ink); }
.back:hover { text-decoration: underline; }
.page-title { font-size: clamp(26px, 5vw, 36px); font-weight: 700; letter-spacing: -0.03em; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--sep-2); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item > .dot { position: absolute; left: -26px; top: 5px; width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--bg); }
.card .tl-item > .dot { box-shadow: 0 0 0 3px var(--surface); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tl-status { font-weight: 600; font-size: 14.5px; }
.tl-time { font-size: 12.5px; color: var(--text-3); }
.tl-text { margin-top: 3px; font-size: 14.5px; color: var(--text-2); white-space: pre-line; }

.month { margin: 32px 4px 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }

/* Auth-Seiten */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; padding: 36px 32px 30px; }
.auth-logo { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 15px; box-shadow: var(--shadow-2); }
.auth-title { font-size: 24px; text-align: center; }
.auth-sub { margin-top: 6px; text-align: center; font-size: 14px; color: var(--text-2); }
.auth form { margin-top: 26px; }

/* ---------------------------------------------------------------------- */
/* 6. Admin-Shell                                                           */
/* ---------------------------------------------------------------------- */

.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-right: 1px solid var(--sep);
  z-index: 60;
}
.sidebar .brand { padding: 4px 10px 20px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { margin: 18px 10px 6px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.nav a {
  display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 10px;
  border-radius: 9px;
  font-size: 14px; font-weight: 500;
  color: var(--text);
  transition: background-color .15s var(--ease);
}
.nav a .i { color: var(--accent); width: 19px; height: 19px; }
.nav a:hover { background: var(--fill-2); }
.nav a.is-active { background: var(--fill); font-weight: 600; }
.nav .badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: var(--down); color: #fff;
  font-size: 11.5px; font-weight: 700;
}
.sidebar-foot { margin-top: auto; padding-top: 12px; }
.me {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: 12px;
  background: transparent; text-align: left;
  transition: background-color .15s var(--ease);
}
.me:hover { background: var(--fill-2); }
.avatar {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent));
  color: #fff;
  font-size: 12.5px; font-weight: 700;
}
.me-name { font-size: 14px; font-weight: 600; }
.me-role { font-size: 12px; color: var(--text-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: none; align-items: center; gap: 10px;
  height: 56px; padding: 0 12px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sep);
}
.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 36px 40px 80px; }
.content-narrow { max-width: 820px; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: 32px; letter-spacing: -0.03em; }
.page-head .sub { margin-top: 4px; font-size: 14.5px; color: var(--text-2); }
.page-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 12px -6px; font-size: 14px; font-weight: 500; color: var(--accent-ink); }
.page-back:hover { text-decoration: underline; }

.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }

/* ---------------------------------------------------------------------- */
/* 7. Admin-Komponenten                                                     */
/* ---------------------------------------------------------------------- */

/* Gesundheits-Übersicht */
.health {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr);
  gap: 14px; margin-bottom: 28px;
}
.health-main { display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.health-orb { width: 56px; height: 56px; margin: 0; flex: none; }
.health-orb .i { width: 26px; height: 26px; }
.health-title { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; }
.health-sub { margin-top: 3px; font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  padding: 18px 18px 16px;
  border: 0; text-align: left;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
button.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
button.stat.is-active { box-shadow: 0 0 0 2px var(--accent), var(--shadow-2); }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.stat-value { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 15px; font-weight: 500; color: var(--text-3); letter-spacing: -0.01em; }

/* Ereignisleiste in der Übersicht */
.alerts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }

/* Werkzeugleiste */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar .input-icon { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .input { height: 36px; border-radius: 999px; font-size: 14px; }
.kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 1px 7px; border-radius: 6px;
  background: var(--fill); color: var(--text-3);
  font-size: 11.5px; font-family: var(--mono);
  pointer-events: none;
}

/* Dienst-Karten */
.sec { margin-bottom: 30px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 12px; }
.sec-title { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.sec-count { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.scard {
  position: relative;
  display: flex; flex-direction: column;
  padding: 18px 18px 14px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .3s;
}
.scard:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.scard.is-hidden-svc { opacity: .62; }
.scard.is-hidden-svc:hover { opacity: 1; }
.scard-head { display: flex; align-items: center; gap: 10px; }
.scard-name { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.scard-head .btn-icon { margin: -6px -8px -6px 0; }
.scard-target { margin-top: 3px; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.scard-target .i { width: 13px; height: 13px; }

.state-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; align-self: flex-start;
  height: 30px; padding: 0 10px 0 11px;
  border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 13%, transparent);
  color: var(--tone-ink);
  font-size: 13px; font-weight: 650;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.state-btn:hover { background: color-mix(in srgb, var(--tone) 22%, transparent); }
.state-btn:active { transform: scale(.96); }
.state-btn .i { width: 14px; height: 14px; stroke-width: 2.2; opacity: .8; }
.state-mode { margin-left: 2px; padding-left: 8px; border-left: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); font-weight: 500; opacity: .85; display: inline-flex; align-items: center; gap: 4px; }
.state-mode .i { width: 12px; height: 12px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.metric-label { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.metric-value { margin-top: 1px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.spark { width: 100%; height: 36px; margin-top: 14px; overflow: visible; }
.spark-line { fill: none; stroke: var(--tone, var(--accent)); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-area { fill: color-mix(in srgb, var(--tone, var(--accent)) 12%, transparent); stroke: none; }
.spark-down circle { fill: var(--down); }
.spark.is-empty line { stroke: var(--sep-2); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }

.scard-foot {
  display: flex; align-items: center; gap: 6px;
  margin: 12px -6px 0; padding-top: 10px;
  border-top: 1px solid var(--sep);
  font-size: 12.5px; color: var(--text-3);
}
.scard-foot .btn { --h: 28px; padding: 0 10px; font-size: 12.5px; background: transparent; color: var(--accent-ink); font-weight: 600; }
.scard-foot .btn:hover { background: var(--fill-2); }
.scard-foot .when { padding-left: 6px; }

.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
.flag .i { width: 14px; height: 14px; }

/* Statusauswahl im Menü */
.menu .dot { width: 9px; height: 9px; }

/* Admin-Liste mit Aktionen */
.item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
}
.item + .item { border-top: 1px solid var(--sep); }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 15px; }
.item-title a:hover { color: var(--accent-ink); }
.item-meta { margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--text-2); }
.item-actions { display: flex; align-items: center; gap: 4px; flex: none; }

/* Status-Stepper (Vorfälle) */
.stepper { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--fill-2); }
.stepper button {
  height: 26px; padding: 0 10px;
  border: 0; border-radius: 999px;
  background: transparent;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  transition: background-color .2s var(--ease), color .2s;
}
.stepper button:hover { color: var(--text); background: var(--fill); }
.stepper button.is-current { background: color-mix(in srgb, var(--tone) 18%, transparent); color: var(--tone-ink); }

/* Formularseiten */
.form-grid { display: flex; flex-direction: column; gap: 22px; }
.fsec-title { margin: 0 4px 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.fsec-body { padding: 22px; }
.form-foot {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  margin: 8px -12px 0; padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.form-foot .spacer { flex: 1; }
details.more > summary {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 600; color: var(--accent-ink);
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .i { transition: transform .3s var(--ease); width: 16px; height: 16px; }
details.more[open] > summary .i { transform: rotate(180deg); }
details.more[open] > summary { margin-bottom: 18px; }

/* Gruppenliste */
.grow-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; transition: background-color .2s, transform .3s var(--ease); }
.grow-row + .grow-row { border-top: 1px solid var(--sep); }
.grow-row .input { height: 38px; background: transparent; font-weight: 600; }
.grow-row .input:hover { background: var(--fill-2); }
.grow-row .input:focus { background: var(--surface); }
.grow-row .count { font-size: 13px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.grow-row.is-moving { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* Aktivität */
.act { display: flex; gap: 14px; padding: 13px 18px; align-items: center; }
.act + .act { border-top: 1px solid var(--sep); }
.act-icon {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--fill-2); color: var(--text-2);
}
.act-icon .i { width: 16px; height: 16px; }
.act-icon.t-ok, .act-icon.t-warn, .act-icon.t-partial, .act-icon.t-down, .act-icon.t-maint { background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone-ink); }
.act-title { font-size: 14.5px; }
.act-title b { font-weight: 600; }
.act-meta { font-size: 12.5px; color: var(--text-3); }
.act-time { margin-left: auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.day { margin: 26px 4px 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.day:first-child { margin-top: 0; }

/* Live-Aktualisierung: kurzes Aufleuchten geänderter Elemente */
.is-updated { animation: updated 1.6s var(--ease); }
@keyframes updated {
  0% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent), var(--shadow-2); }
  100% { box-shadow: var(--shadow-2); }
}
.svc.is-updated, .list-row.is-updated, .item.is-updated, .group-head.is-updated, .act.is-updated { animation: updated-bg 1.6s var(--ease); }
.hero.is-updated, .health-main.is-updated, .stats.is-updated { animation: none; }
.hero.is-updated .orb, .health-main.is-updated .orb { animation: pop .7s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes updated-bg { 0% { background: color-mix(in srgb, var(--accent) 10%, transparent); } 100% { background: transparent; } }
.is-checking .dot::after { animation-duration: .8s !important; }
.shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------------------------------------------------------------------- */
/* 8. Bewegung & Responsive                                                 */
/* ---------------------------------------------------------------------- */

.reveal { animation: reveal .6s var(--ease) both; }
.reveal-2 { animation-delay: .06s; }
.reveal-3 { animation-delay: .12s; }
.reveal-4 { animation-delay: .18s; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1100px) {
  .health { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 280px; max-width: 86vw;
    background: var(--surface);
    transform: translateX(-102%);
    transition: transform .4s var(--ease);
    box-shadow: var(--shadow-3);
  }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { display: flex; }
  .content { padding: 24px 20px 72px; }
  .page-head h1 { font-size: 28px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { padding: 44px 0 36px; }
  .orb { width: 76px; height: 76px; margin-bottom: 22px; }
  .orb .i { width: 34px; height: 34px; }
  .svc { padding: 13px 16px 14px; }
  .svc::before { left: 16px; }
  .group-head { padding: 15px 16px; }
  /* Auf kleinen Displays nur die jüngsten 30 Balken zeigen */
  .bars > i:nth-last-child(n+31) { display: none; }
  .bars { height: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 15px; }
  .stat-value { font-size: 24px; }
  .health-main { padding: 18px; }
  .cards { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-head { margin-bottom: 22px; }
  .page-actions { margin-left: 0; width: 100%; }
  .toolbar .input-icon { max-width: none; flex-basis: 100%; }
  .kbd { display: none; }
  .item { flex-wrap: wrap; }
  .item-actions { width: 100%; justify-content: flex-end; }
  .auth-card { padding: 30px 22px 24px; }
  .fsec-body { padding: 18px; }
  .act-time { display: none; }
}

@media (hover: none) {
  .scard:hover, a.event:hover, button.stat:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .dot.pulse::after, .orb::before, .orb::after { display: none; }
}
