/* Hub - Admin-Bereich (DESIGN.md Abschnitt 8): System, Bots, Sicherheit.
   Nur seitenbezogene Regeln; Bausteine (.h-panel, .h-head, .h-title, .h-ring, .h-meter, .h-chip,
   .h-badge, .h-dot, .h-btn, .h-empty, .h-skel, .h-grid) kommen aus theme.css.
   iOS 12: kein gap in Flexbox (Abstaende per margin), Grid-gap immer auch als grid-gap,
   keine min()/max()/clamp(); alle Animationen stoppt theme.css bei prefers-reduced-motion. */

/* =========================================================== Gemeinsam === */
.ad-row { margin-top: 18px; }
.ad-page .h-head { flex-wrap: wrap; }
.ad-sec-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 30px 0 14px; }
.ad-sec-head.first { margin-top: 4px; }
.page .ad-sec-head h2 { margin: 4px 16px 4px 0; }
.ad-sec-head .h-chips { margin: 0 -4px; }
.ad-head-n { display: inline-flex; margin-left: 10px; }
.ad-head-sub { margin-left: 12px; font-size: 12.5px; color: var(--t3); font-variant-numeric: tabular-nums; }
.ad-head-chips { display: flex; flex-wrap: wrap; align-items: center; margin-left: auto; }
.ad-head-chips .h-chip { height: 28px; margin: 2px 0 2px 8px; padding: 0 10px; font-size: 12.5px; }
.ad-head-chips .h-chip > svg { width: 14px; height: 14px; margin-right: 5px; }
.ad-head-btn { margin-left: auto; min-height: 44px; padding: 8px 14px; font-size: 14px; }
.ad-head-btn > svg { width: 18px; height: 18px; margin-right: 8px; }
.ad-span-all { grid-column: 1 / -1; }
.ad-sk-ico { display: block; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; }
.ad-page .h-skel.line + .h-skel.line { width: 82%; }
.ad-page .h-skel.line + .h-skel.line + .h-skel.line { width: 64%; }
.ad-text { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--t2); }
.ad-btns { display: flex; flex-wrap: wrap; align-items: center; margin: -4px; }
.ad-btns > .h-btn { max-width: 100%; margin: 4px; white-space: normal; text-align: left; }
.ad-btns > .h-btn > svg { width: 18px; height: 18px; }
.ad-good { color: #a7f3d0; background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.42); }

/* ============================================================== System === */
/* KPI-Karten: Ring links, Texte rechts */
.ad-kpi { display: flex; align-items: center; min-height: 136px; padding: 18px 20px; }
.ad-kpi::before { left: 18%; right: 18%; }
.ad-ring { width: 92px; height: 92px; margin-right: 16px; }
.ad-kv { display: flex; align-items: baseline; justify-content: center; }
.ad-kv b { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.ad-kv small { margin-left: 2px; font-size: 13px; font-weight: 650; color: var(--t3); }
.ad-kcap { display: block; margin-top: 4px; font-size: 9.5px; font-weight: 700; line-height: 1; letter-spacing: .12em; text-transform: uppercase; color: var(--t3); }
.ad-ktxt { flex: 1 1 auto; min-width: 0; }
.ad-klab { display: flex; align-items: center; min-width: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t2); }
.ad-klab svg { flex: 0 0 auto; width: 15px; height: 15px; margin-right: 7px; color: #5eead4; }
.ad-klab > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ad-kmain { margin-top: 9px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--t1); font-variant-numeric: tabular-nums; }
.ad-ksub { margin-top: 4px; font-size: 13px; color: var(--t3); font-variant-numeric: tabular-nums; }

/* Hinweise */
.ad-hint {
  display: flex; align-items: flex-start; padding: 11px 12px; border-radius: 14px;
  background: rgba(255,255,255,.03); border: 1px solid var(--edge);
}
.ad-hint + .ad-hint { margin-top: 8px; }
.ad-hint.crit { background: rgba(251,113,133,.07); background: linear-gradient(90deg, rgba(251,113,133,.13), rgba(251,113,133,.025)); border-color: rgba(251,113,133,.3); }
.ad-hint.warn { background: rgba(251,191,36,.06); background: linear-gradient(90deg, rgba(251,191,36,.11), rgba(251,191,36,.02)); border-color: rgba(251,191,36,.26); }
.ad-hint-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; margin-right: 12px; border-radius: 10px;
}
.ad-hint.crit .ad-hint-ico { color: #fb7185; background: rgba(251,113,133,.15); box-shadow: 0 0 16px -4px rgba(251,113,133,.6); }
.ad-hint.warn .ad-hint-ico { color: #fbbf24; background: rgba(251,191,36,.14); box-shadow: 0 0 16px -4px rgba(251,191,36,.55); }
.ad-hint-body { flex: 1 1 auto; min-width: 0; padding-top: 1px; }
.ad-hint-t { font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--t1); overflow-wrap: break-word; word-wrap: break-word; }
.ad-hint-d { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--t2); word-break: break-word; overflow-wrap: break-word; }
.ad-hint-src { flex: 0 0 auto; margin: 3px 0 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
.ad-more { margin-top: 10px; font-size: 13px; color: var(--t3); text-align: center; }
.ad-allgood { display: flex; align-items: center; padding: 14px 4px; }
.ad-allgood-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 58px; height: 58px; margin-right: 16px; border-radius: 50%; color: #34d399;
  background: radial-gradient(circle, rgba(52,211,153,.24), rgba(52,211,153,.04) 70%);
  box-shadow: inset 0 0 0 1px rgba(52,211,153,.35), 0 0 32px -6px rgba(52,211,153,.6);
}
.ad-allgood-ico svg { filter: drop-shadow(0 0 6px rgba(52,211,153,.7)); }
.ad-allgood-t { font-size: 17px; font-weight: 650; }
.ad-allgood-d { margin-top: 2px; font-size: 13px; color: var(--t3); }
.ad-notes { margin-top: 12px; }
.ad-note-row { display: flex; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--t3); }
.ad-note-row svg { flex: 0 0 auto; width: 15px; height: 15px; margin-right: 8px; }

/* Balkenlisten (Speicher, System) */
.ad-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 16px 26px; gap: 16px 26px; }
.ad-meters.one { grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.ad-meters.one:first-child { margin-top: 0; }
.ad-meters .h-meter { height: 8px; }
.ad-mtop { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.ad-mname { min-width: 0; margin-right: 10px; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--t1); word-break: break-word; overflow-wrap: break-word; }
.ad-mval { flex: 0 0 auto; font-size: 13.5px; font-weight: 650; color: var(--t1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-mval.warn { color: #fcd34d; }
.ad-mval.crit { color: #fda4af; }
.ad-mdet { margin-top: 6px; font-size: 12.5px; color: var(--t3); font-variant-numeric: tabular-nums; overflow-wrap: break-word; word-wrap: break-word; }

/* Zeilen mit Statussymbol (Speicher-Hinweise, Wartung, System) */
.ad-irows { margin-top: 16px; }
.ad-irows:first-child { margin-top: 0; }
.ad-irow { display: flex; align-items: flex-start; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); }
.ad-irow:first-child { padding-top: 0; border-top: 0; }
.ad-irow-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 30px; height: 30px; margin-right: 12px; border-radius: 9px; color: var(--t3); background: rgba(255,255,255,.05);
}
.ad-irow.ok .ad-irow-ico { color: #34d399; background: rgba(52,211,153,.12); }
.ad-irow.warn .ad-irow-ico { color: #fbbf24; background: rgba(251,191,36,.13); }
.ad-irow.crit .ad-irow-ico { color: #fb7185; background: rgba(251,113,133,.13); }
.ad-irow.info .ad-irow-ico { color: #60a5fa; background: rgba(96,165,250,.13); }
.ad-irow-body { flex: 1 1 auto; min-width: 0; padding-top: 4px; }
.ad-irow-t { font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: break-word; word-wrap: break-word; }
.ad-irow-d { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--t2); word-break: break-word; overflow-wrap: break-word; }
.ad-irow.warn .ad-irow-d { color: #fde68a; }
.ad-irow.crit .ad-irow-d { color: #fecdd3; }

/* Datentraeger */
.ad-disk { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.06); }
.ad-disk:first-child { padding-top: 0; border-top: 0; }
.ad-disk-top { display: flex; align-items: center; }
.ad-disk-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 30px; height: 30px; margin-right: 12px; border-radius: 9px; color: #93c5fd; background: rgba(96,165,250,.13);
}
.ad-disk-name { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.35; word-break: break-word; overflow-wrap: break-word; }
.ad-disk-dev {
  display: inline-block; margin-right: 7px; padding: 0 6px; border-radius: 6px;
  background: rgba(96,165,250,.14); color: #bfdbfe; font-size: 11.5px; font-weight: 700;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ad-disk-top .h-dot { margin-left: 10px; }
.ad-life { margin: 10px 0 0 42px; }
.ad-disk-d { margin: 6px 0 0 42px; font-size: 12.5px; color: var(--t3); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; }

/* Proxmox-Host und Dienst-Chips */
.ad-host-id { display: flex; align-items: center; flex-wrap: wrap; }
.ad-host-id .h-dot { margin-right: 10px; }
.ad-host-name { margin-right: 10px; font-size: 15px; font-weight: 650; }
.ad-host-ip, .ad-dev-ip { min-width: 0; max-width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--t3); word-break: break-all; }
.ad-chips { display: flex; flex-wrap: wrap; margin: 10px -3px 0; }
.ad-chip {
  display: inline-flex; align-items: center; max-width: 100%; height: 28px; margin: 3px; padding: 0 10px;
  border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--edge);
  color: var(--t2); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color .16s, background-color .16s, color .16s;
}
.ad-chip > .h-dot { width: 6px; height: 6px; margin-right: 7px; }
.ad-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ad-chip > svg { flex: 0 0 auto; width: 13px; height: 13px; margin-left: 5px; }
.ad-chip.link { color: #a5f3fc; background: rgba(34,211,238,.07); border-color: rgba(34,211,238,.3); }
.ad-chip.crit { color: #fda4af; background: rgba(251,113,133,.08); border-color: rgba(251,113,133,.35); }
a.ad-chip:active { background: rgba(34,211,238,.16); }

/* Container & VMs */
.ad-guests { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 14px; gap: 14px; }
.ad-guest {
  position: relative; min-width: 0; padding: 15px 16px 14px; border-radius: 18px;
  background: rgba(255,255,255,.045); background: var(--panel);
  border: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--edge-hi);
}
.ad-guest::before {
  content: ""; position: absolute; top: -1px; left: 16%; right: 16%; height: 1px; pointer-events: none; opacity: .6;
  background: linear-gradient(90deg, rgba(94,234,212,0), rgba(94,234,212,.5), rgba(167,139,250,.5), rgba(167,139,250,0));
}
.ad-guest.stopped { background: rgba(255,255,255,.02); border-style: dashed; }
.ad-guest.stopped::before { display: none; }
.ad-guest.stopped .ad-g-name { color: var(--t2); }
.ad-g-head { display: flex; align-items: center; min-width: 0; }
.ad-g-head > .h-dot { margin-right: 9px; }
.ad-g-id {
  flex: 0 0 auto; margin-right: 8px; padding: 1px 7px; border-radius: 7px;
  background: rgba(255,255,255,.07); color: var(--t2); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ad-g-name { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; font-weight: 650; }
.ad-g-head > .h-badge { flex: 0 0 auto; margin-left: 8px; }
.ad-g-sub { margin-top: 5px; font-size: 12.5px; color: var(--t3); font-variant-numeric: tabular-nums; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; }
.ad-grow { margin-top: 10px; }
.ad-gtop { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; color: var(--t3); }
.ad-gv { color: var(--t2); font-variant-numeric: tabular-nums; }
.ad-guest .h-meter { height: 5px; }
.ad-guest .ad-chips { margin: 12px -3px -3px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.06); }
.ad-gskel { min-height: 150px; }

.ad-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.06); font-size: 12.5px; color: var(--t3); }
.ad-foot > span { margin: 4px 16px 4px 0; }
.ad-foot .h-link { margin-left: 0; }

/* ================================================================ Bots === */
.ad-svcs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 16px; gap: 16px; }
.ad-svc {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 18px;
  border-radius: var(--r); background: rgba(255,255,255,.045); background: var(--panel);
  border: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--edge-hi), var(--shadow);
}
.ad-svc.on::before {
  content: ""; position: absolute; top: -1px; left: 14%; right: 14%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(52,211,153,0), rgba(52,211,153,.6), rgba(94,234,212,.5), rgba(94,234,212,0));
}
.ad-svc-top { display: flex; align-items: flex-start; }
.ad-svc-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 46px; height: 46px; margin-right: 14px; border-radius: 14px;
  color: var(--t2); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--edge);
}
.ad-svc-ico.on {
  color: #fff; background: #7c3aed; background: linear-gradient(140deg, #8b5cf6 0%, #4c1d95 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 24px -10px rgba(124,58,237,.8);
}
.ad-svc-head { flex: 1 1 auto; min-width: 0; padding-top: 1px; }
.ad-svc-name { font-size: 15.5px; font-weight: 650; line-height: 1.3; }
.ad-svc-state { display: flex; align-items: center; flex-wrap: wrap; margin-top: 5px; font-size: 13px; color: var(--t2); }
.ad-svc-state > .h-dot { margin-right: 8px; }
.ad-svc-state > .h-badge { flex: 0 0 auto; height: 18px; margin-left: 10px; padding: 0 6px; font-size: 10px; }
.ad-svc-desc { margin: 8px 0 0 60px; font-size: 13px; line-height: 1.45; color: var(--t3); }
.ad-svc-act { display: flex; margin-top: auto; padding: 14px 0 0 60px; }
.ad-svc-act .h-btn { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.ad-svc-act .h-btn > svg { width: 18px; height: 18px; margin-right: 8px; }
.ad-sskel { min-height: 150px; }
.ad-sskel .ad-sk-ico { margin-bottom: 12px; }

/* Twitch-Keyword-Waechter: zwei Spalten */
.ad-cols { display: flex; align-items: stretch; }
.ad-col { flex: 1 1 0; min-width: 0; }
.ad-col:first-child { padding-right: 24px; }
.ad-col + .ad-col { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.07); }
.ad-colhead { margin-bottom: 14px; font-size: 14px; font-weight: 650; color: var(--t1); }
.ad-field + .ad-field { margin-top: 18px; }
.ad-flabel { display: flex; align-items: center; margin-bottom: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t2); }
.ad-flabel svg { flex: 0 0 auto; width: 16px; height: 16px; margin-right: 8px; color: #a78bfa; }
.ad-tags { display: flex; flex-wrap: wrap; margin: -3px -3px 7px; }
.ad-tag {
  display: inline-flex; align-items: center; max-width: 100%; height: 36px; margin: 3px; padding: 0 3px 0 13px;
  border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--edge);
  font-size: 14px; color: var(--t1);
}
.ad-tag-t { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ad-tag-x {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 30px; height: 30px; margin-left: 4px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--t3); cursor: pointer;
  transition: color .16s, background-color .16s;
}
.ad-tag-x:active { color: #fb7185; background: rgba(251,113,133,.16); }
.ad-none { padding: 6px 3px; font-size: 13.5px; color: var(--t3); }
.ad-add { display: flex; align-items: center; }
.ad-add .input { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.ad-add .h-btn { flex: 0 0 auto; margin-left: 8px; }
.ad-add .h-btn > svg { width: 18px; height: 18px; margin-right: 8px; }
.ad-hintline { display: flex; align-items: flex-start; margin: 18px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--t3); }
.ad-hintline svg { flex: 0 0 auto; width: 15px; height: 15px; margin: 2px 8px 0 0; }

/* Clips: ueberwachte Kanaele */
.ad-clips { display: flex; flex-direction: column; }
.ad-streamers { margin-bottom: 10px; }
.ad-st {
  display: flex; align-items: center; min-height: 54px; padding: 6px 6px 6px 14px; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px solid var(--edge);
}
.ad-st + .ad-st { margin-top: 8px; }
.ad-st > .h-dot { margin-right: 11px; }
.ad-st-main { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.ad-st-name { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14.5px; font-weight: 600; }
.ad-st-main > .h-badge { flex: 0 0 auto; margin-left: 8px; }
.ad-st.paused .ad-st-name { color: var(--t3); }
.ad-st.rec { border-color: rgba(251,113,133,.42); background: rgba(251,113,133,.07); background: linear-gradient(90deg, rgba(251,113,133,.14), rgba(251,113,133,.02)); box-shadow: 0 0 24px -12px rgba(251,113,133,.7); }
.ad-st.live { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.06); background: linear-gradient(90deg, rgba(52,211,153,.12), rgba(52,211,153,.02)); }
.ad-st-act { display: flex; flex: 0 0 auto; margin-left: 8px; }
.ad-ibtn {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--edge); border-radius: 12px; background: rgba(255,255,255,.05); color: var(--t2); cursor: pointer;
  transition: color .16s, background-color .16s, border-color .16s;
}
.ad-ibtn + .ad-ibtn { margin-left: 6px; }
.ad-ibtn:disabled { opacity: .45; cursor: default; }
.ad-ibtn:active { background: rgba(255,255,255,.12); }
.ad-ibtn.danger:active { color: #fb7185; background: rgba(251,113,133,.16); }
.ad-review-box { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.07); }
.ad-review { width: 100%; }
.ad-review > span { flex: 1 1 auto; text-align: left; }
.ad-review-hint { display: flex; align-items: center; justify-content: center; margin-top: 8px; font-size: 12.5px; color: var(--t3); }
.ad-review-hint svg { flex: 0 0 auto; width: 15px; height: 15px; margin-right: 6px; }
.ad-clips .ad-hintline { margin-top: auto; padding-top: 18px; }

/* ========================================================== Sicherheit === */
.ad-hero { display: flex; align-items: center; padding: 26px 28px; overflow: hidden; }
.ad-hero::after {            /* Lichthof hinter dem Schild */
  content: ""; position: absolute; top: 50%; left: -70px; width: 340px; height: 340px; margin-top: -170px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(94,234,212,.16), rgba(94,234,212,0));
}
.ad-hero.warn::after { background: radial-gradient(closest-side, rgba(251,191,36,.15), rgba(251,191,36,0)); }
.ad-hero.crit::after { background: radial-gradient(closest-side, rgba(251,113,133,.17), rgba(251,113,133,0)); }
.ad-hero.wait::after { background: radial-gradient(closest-side, rgba(255,255,255,.05), rgba(255,255,255,0)); }
.ad-shield {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 92px; height: 92px; margin-right: 24px; border-radius: 50%; color: #5eead4;
  background: radial-gradient(circle at 50% 40%, rgba(94,234,212,.24), rgba(94,234,212,.05) 70%);
  box-shadow: inset 0 0 0 1px rgba(94,234,212,.38), 0 0 44px -6px rgba(94,234,212,.55);
}
.ad-shield svg { width: 46px; height: 46px; filter: drop-shadow(0 0 10px rgba(94,234,212,.8)); }
.ad-shield::before, .ad-shield::after {      /* Funkwellen */
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%;
  border: 1px solid currentColor; opacity: 0;
  animation: h-wave 3.6s var(--ease) infinite;
}
.ad-shield::after { animation-delay: 1.8s; }
.ad-hero.warn .ad-shield { color: #fbbf24; background: radial-gradient(circle at 50% 40%, rgba(251,191,36,.22), rgba(251,191,36,.05) 70%);
  box-shadow: inset 0 0 0 1px rgba(251,191,36,.4), 0 0 44px -6px rgba(251,191,36,.5); }
.ad-hero.warn .ad-shield svg { filter: drop-shadow(0 0 10px rgba(251,191,36,.75)); }
.ad-hero.crit .ad-shield { color: #fb7185; background: radial-gradient(circle at 50% 40%, rgba(251,113,133,.24), rgba(251,113,133,.05) 70%);
  box-shadow: inset 0 0 0 1px rgba(251,113,133,.45), 0 0 44px -6px rgba(251,113,133,.6); }
.ad-hero.crit .ad-shield svg { filter: drop-shadow(0 0 10px rgba(251,113,133,.8)); }
.ad-hero.wait .ad-shield { color: var(--t3); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--edge); }
.ad-hero.wait .ad-shield svg { filter: none; }
.ad-hero.wait .ad-shield::before, .ad-hero.wait .ad-shield::after { animation: none; }
.ad-hero-main { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; margin-right: 28px; }
.ad-hero-t { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; color: var(--t1); }
.ad-hero.ok .ad-hero-t { color: #ccfbf1; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ad-hero.ok .ad-hero-t {
    background: linear-gradient(120deg, #fff 0%, #5eead4 50%, #a78bfa 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  }
}
.ad-hero-d { max-width: 440px; margin: 7px 0 0; font-size: 14px; line-height: 1.5; color: var(--t2); }
.ad-hero-rows { position: relative; z-index: 1; flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, auto); grid-gap: 14px 30px; gap: 14px 30px; }
.ad-hrow { display: flex; align-items: center; min-width: 0; }
.ad-hrow-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 36px; height: 36px; margin-right: 11px; border-radius: 11px; color: var(--t2); background: rgba(255,255,255,.06);
}
.ad-hrow-ico.ok { color: #34d399; background: rgba(52,211,153,.13); }
.ad-hrow-ico.warn { color: #fbbf24; background: rgba(251,191,36,.13); }
.ad-hrow-ico.crit { color: #fb7185; background: rgba(251,113,133,.14); }
.ad-hrow-txt { min-width: 0; }
.ad-hrow-k { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t3); }
.ad-hrow-v { display: block; margin-top: 1px; font-size: 14px; font-weight: 600; color: var(--t1); }
.ad-hrow-v.ok { color: #6ee7b7; }
.ad-hrow-v.warn { color: #fcd34d; }
.ad-hrow-v.crit { color: #fda4af; }

/* Zwei-Faktor und Passwort */
.ad-state { display: flex; align-items: center; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.ad-state > .h-dot { margin-right: 10px; }
.ad-totp .form-error, .ad-pw .form-error { margin: 6px 0 8px; }
.ad-pwform { margin-top: 2px; }
.ad-pw2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 0 14px; gap: 0 14px; }
.ad-pw .field { margin-bottom: 12px; }

.ad-qr-note { margin: 4px 0 16px; text-align: center; line-height: 1.6; }   /* im QR-Dialog (app.js dialog) */

/* Geraete & Sitzungen */
.ad-devs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 14px; gap: 14px; }
.ad-dev {
  display: flex; flex-direction: column; min-width: 0; padding: 16px; border-radius: 18px;
  background: rgba(255,255,255,.035); border: 1px solid var(--edge);
}
.ad-dev.current {
  border-color: rgba(94,234,212,.38);
  background: rgba(94,234,212,.06); background: linear-gradient(160deg, rgba(94,234,212,.11), rgba(94,234,212,.02) 60%);
  box-shadow: 0 0 32px -16px rgba(94,234,212,.7);
}
.ad-dev-main { display: flex; align-items: flex-start; }
.ad-dev-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 46px; height: 46px; margin-right: 14px; border-radius: 14px; color: var(--t2); background: rgba(255,255,255,.06);
}
.ad-dev.current .ad-dev-ico { color: #5eead4; background: rgba(94,234,212,.13); box-shadow: 0 0 18px -6px rgba(94,234,212,.7); }
.ad-dev-body { flex: 1 1 auto; min-width: 0; }
.ad-dev-name { font-size: 15px; font-weight: 650; line-height: 1.3; word-break: break-word; overflow-wrap: break-word; }
.ad-dev-tags { display: flex; flex-wrap: wrap; align-items: center; margin: 5px -3px 0; }
.ad-dev-tags > * { margin: 3px; }
.ad-dev-meta { margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--t3); overflow-wrap: break-word; word-wrap: break-word; }
.ad-dev-btn { align-self: flex-start; margin: auto 0 0 60px; min-height: 44px; padding: 8px 14px; font-size: 14px; }
.ad-dev-main + .ad-dev-btn { margin-top: 14px; }
.ad-dev-btn > svg { width: 18px; height: 18px; margin-right: 8px; }
.ad-dskel { min-height: 130px; }

/* Protokoll als Zeitleiste */
.ad-filters { display: flex; flex-wrap: wrap; align-items: center; margin: -3px 0 12px; }
.ad-filters .chip { min-height: 40px; margin: 3px 8px 3px 0; padding: 5px 8px 5px 15px; border-radius: 999px; cursor: pointer; }
.ad-n {
  display: inline-block; min-width: 22px; height: 22px; margin-left: 8px; padding: 0 6px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--t2); font-size: 12px; font-weight: 700; line-height: 22px;
  text-align: center; font-variant-numeric: tabular-nums;
}
.ad-filters .chip.active .ad-n { background: rgba(94,234,212,.2); color: #ccfbf1; }
.ad-tl { position: relative; }
.ad-day { margin: 16px 0 4px; padding-left: 108px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t2); }
.ad-day:first-child { margin-top: 4px; }
.ad-ev { position: relative; display: flex; align-items: flex-start; padding: 7px 0; }
.ad-ev::before {             /* Linie der Zeitleiste durch die Knoten */
  content: ""; position: absolute; top: 0; bottom: 0; left: 72px; width: 2px; background: rgba(255,255,255,.07);
}
.ad-day + .ad-ev::before, .ad-tl > .ad-ev:first-child::before { top: 23px; }
.ad-ev-time { flex: 0 0 auto; width: 52px; padding-top: 7px; text-align: right; font-size: 12.5px; color: var(--t3); font-variant-numeric: tabular-nums; }
.ad-ev-node {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; margin: 0 19px 0 5px; border-radius: 50%;
  background: #0b111f; border: 1px solid var(--edge-2); color: var(--t2);
}
.ad-ev.ok .ad-ev-node { color: #34d399; border-color: rgba(52,211,153,.55); box-shadow: 0 0 14px -3px rgba(52,211,153,.6); }
.ad-ev.crit .ad-ev-node { color: #fb7185; border-color: rgba(251,113,133,.6); box-shadow: 0 0 14px -3px rgba(251,113,133,.65); }
.ad-ev.warn .ad-ev-node { color: #fbbf24; border-color: rgba(251,191,36,.55); box-shadow: 0 0 14px -3px rgba(251,191,36,.6); }
.ad-ev-body { flex: 1 1 auto; min-width: 0; padding-top: 5px; }
.ad-ev-t { font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--t1); overflow-wrap: break-word; word-wrap: break-word; }
.ad-ev.ok .ad-ev-t { color: #a7f3d0; }
.ad-ev.crit .ad-ev-t { color: #fda4af; }
.ad-ev.warn .ad-ev-t { color: #fcd34d; }
.ad-ev-d { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--t3); word-break: break-word; overflow-wrap: break-word; }
.ad-ev-who {
  display: flex; flex-direction: column; align-items: flex-end; flex: 0 1 auto; min-width: 0; max-width: 40%;
  margin-left: 14px; padding-top: 5px; text-align: right; font-size: 12.5px; line-height: 1.45; color: var(--t3);
  word-break: break-word; overflow-wrap: break-word;
}
.ad-ev-ext { color: #c4b5fd; }
.ad-more-box { display: flex; justify-content: center; margin-top: 10px; }
.ad-more-box .h-btn > svg { width: 18px; height: 18px; margin-right: 8px; }

/* ============================================== Einblenden beim Aufbau === */
/* prefers-reduced-motion: theme.css schaltet ab; "backwards", damit Hover-Effekte danach greifen */
@keyframes ad-rise { 0% { opacity: 0; transform: translate3d(0, 12px, 0); } 100% { opacity: 1; transform: translate3d(0, 0, 0); } }
.ad-kpi, .ad-svc, .ad-guest, .ad-dev, .ad-hero { animation: ad-rise .55s var(--ease) backwards; }
.ad-kpis > :nth-child(2), .ad-svcs > :nth-child(2), .ad-devs > :nth-child(2), .ad-guests > :nth-child(2) { animation-delay: .05s; }
.ad-kpis > :nth-child(3), .ad-svcs > :nth-child(3), .ad-devs > :nth-child(3), .ad-guests > :nth-child(3) { animation-delay: .1s; }
.ad-kpis > :nth-child(4), .ad-svcs > :nth-child(4), .ad-devs > :nth-child(4), .ad-guests > :nth-child(4) { animation-delay: .15s; }
.ad-svcs > :nth-child(n+5), .ad-devs > :nth-child(n+5), .ad-guests > :nth-child(n+5) { animation-delay: .2s; }
.ad-gskel, .ad-sskel, .ad-dskel { animation: none; }

/* ===================================================== Hover (Maus) ===== */
@media (hover: hover) {
  .ad-tag-x:hover { color: #fb7185; background: rgba(251,113,133,.14); }
  .ad-ibtn:hover:not(:disabled) { color: var(--t1); background: rgba(255,255,255,.1); border-color: var(--edge-2); }
  .ad-ibtn.danger:hover:not(:disabled) { color: #fda4af; background: rgba(251,113,133,.14); border-color: rgba(251,113,133,.45); }
  a.ad-chip:hover { color: #ecfeff; background: rgba(34,211,238,.16); border-color: rgba(34,211,238,.55); }
  .ad-good:hover:not(:disabled) { background: rgba(52,211,153,.2); border-color: rgba(52,211,153,.6); }
  .ad-guest:hover { border-color: var(--edge-2); }
}

/* ====================================================== Touch (Handy, Wand-iPad) */
@media (max-width: 699.98px), (pointer: coarse) {
  .ad-chip { height: 34px; }
  a.ad-chip { position: relative; }
  a.ad-chip::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: -3px; right: -3px; }
  .ad-tag { height: 40px; }
  .ad-tag-x { position: relative; width: 34px; height: 34px; }
  .ad-tag-x::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: -5px; right: -5px; }
  .ad-ibtn { width: 44px; height: 44px; }
  .ad-filters .chip { min-height: 44px; }
}

/* Kleine Desktops (1100-1599 px): neben der Seitenleiste sind vier Karten zu schmal fuer Ring und Text nebeneinander
   ("ARBEITSSPEICHER" ragte ueber den Rand, Werte brachen um) - Ring oben, Text darunter in voller Breite */
@media (min-width: 1100px) and (max-width: 1599.98px) {
  .ad-kpi { flex-direction: column; align-items: flex-start; min-height: 0; padding: 16px 18px; }
  .ad-kpi > .ad-ktxt { align-self: stretch; }
  .ad-ring { width: 80px; height: 80px; margin: 0 0 12px; }
  .ad-kv b { font-size: 22px; }
  .ad-kv small { font-size: 12px; }
  .ad-kmain { margin-top: 7px; }
}

/* ============================================================= Tablet === */
@media (max-width: 1099.98px) {
  .ad-guests { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ad-svcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-devs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-hero { flex-wrap: wrap; }
  .ad-hero-main { flex: 1 1 300px; margin-right: 0; }
  .ad-hero-rows { flex: 1 1 100%; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.07); grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 700px) and (max-width: 919.98px) {
  .ad-guests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-meters { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================== Handy === */
@media (max-width: 699.98px) {
  .ad-row { margin-top: 14px; }
  .ad-sec-head { margin: 24px 0 12px; }
  .ad-sec-head .h-chips { margin-top: 4px; }
  .ad-head-chips { flex: 1 0 100%; margin: 8px 0 0 -8px; }
  .ad-head-btn { flex: 1 0 100%; margin: 12px 0 0; }

  /* KPI: 2 x 2, Ring oben */
  .ad-kpis.h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 12px; gap: 12px; }
  .ad-kpi { flex-direction: column; align-items: flex-start; min-height: 0; padding: 14px; }
  .ad-ring { width: 78px; height: 78px; margin: 0 0 10px; }
  .ad-kv b { font-size: 21px; }
  .ad-kv small { font-size: 12px; }
  .ad-klab { font-size: 10.5px; letter-spacing: .1em; }
  .ad-kmain { margin-top: 6px; font-size: 14px; }
  .ad-ksub { font-size: 12px; }

  .ad-meters { grid-template-columns: minmax(0, 1fr); grid-gap: 14px; gap: 14px; }
  .ad-hint-src { display: none; }
  .ad-guests { grid-template-columns: minmax(0, 1fr); grid-gap: 12px; gap: 12px; }
  .ad-foot { display: block; }
  .ad-foot .h-link { margin-top: 8px; padding-left: 0; }

  .ad-svcs { grid-template-columns: minmax(0, 1fr); grid-gap: 12px; gap: 12px; }
  .ad-svc { padding: 16px; }
  .ad-st-main { flex-direction: column; align-items: flex-start; }
  .ad-st-main > .h-badge { margin: 3px 0 0; }
  .ad-st-name { max-width: 100%; }
  .ad-svc-desc { margin-left: 0; }
  .ad-svc-act { padding-left: 0; }
  .ad-svc-act .h-btn { flex: 1 1 auto; }
  .ad-cols { display: block; }
  .ad-col:first-child { padding-right: 0; }
  .ad-col + .ad-col { margin-top: 22px; padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.07); }
  .ad-add .h-btn { padding: 10px 13px; }
  .ad-add .h-btn > span { display: none; }
  .ad-add .h-btn > svg { margin-right: 0; }

  .ad-hero { flex-wrap: wrap; padding: 20px 18px; }
  .ad-hero::after { left: -120px; top: 0; margin-top: -130px; }
  .ad-shield { width: 64px; height: 64px; margin: 0 16px 0 0; }
  .ad-shield svg { width: 32px; height: 32px; }
  .ad-hero-main { flex: 1 1 0; }
  .ad-hero-t { font-size: 21px; }
  .ad-hero-d { font-size: 13.5px; }
  .ad-hero-rows { display: block; flex: 1 0 100%; margin-top: 18px; padding-top: 16px; }
  .ad-hrow + .ad-hrow { margin-top: 12px; }
  .ad-pw2 { grid-template-columns: minmax(0, 1fr); }
  .ad-devs { grid-template-columns: minmax(0, 1fr); grid-gap: 12px; gap: 12px; }
  .ad-dev-btn { margin-left: 0; align-self: stretch; }

  .ad-filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px 10px; padding-left: 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 86%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 86%, rgba(0,0,0,0) 100%); }
  .ad-filters::-webkit-scrollbar { display: none; }
  .ad-filters .chip { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
  .ad-filters .chip:last-child { margin-right: 28px; }
  .ad-day { padding-left: 79px; }
  .ad-ev { flex-wrap: wrap; }
  .ad-ev-body { flex: 1 1 0; }
  .ad-ev::before { left: 55px; }
  .ad-ev-time { width: 38px; font-size: 12px; }
  .ad-ev-node { width: 30px; height: 30px; margin: 0 8px 0 3px; }
  .ad-ev-who { display: block; flex: 1 0 100%; max-width: none; margin: 2px 0 0; padding: 0 0 0 79px; text-align: left; font-size: 12px; }
  .ad-ev-who > span + span::before { content: " · "; }
}

/* Sehr kleine Handys (< 360 px, z. B. iPhone SE mit iOS 12) */
@media (max-width: 359.98px) {
  .ad-kpi { padding: 12px; }
  .ad-klab { font-size: 10px; letter-spacing: .04em; }
  .ad-klab svg { display: none; }
  .ad-kmain { font-size: 13px; }
}
