/* ============================================================================
   AIHall-Administration · v4-Shell
   Die Arbeitsfläche, Fenster, Taskleiste, Startmenü und Palette kommen aus
   tokens.css / app.css / rigs.css / v4.css. Diese Datei ergänzt nur, was die
   Administration zusätzlich braucht: Anmeldung, Tabellen, Formulare, Dialoge,
   Detailansichten und ein eigenes dunkles Erscheinungsbild.
   ========================================================================== */

/* ---------- Fehlende Rollen der Vorlage ---------------------------------- */
:root {
  --brand-mark-bg: var(--surface-brand);
  --brand-mark-ink: var(--surface-brand-ink);
  --brand-mark-ring: var(--accent-tint);
  --accent-strong: var(--accent-2);
  --pill-bg: var(--panel);
  --rail-bg: var(--panel);
  --rail-line: var(--line);
  --classic-bg: var(--surface-classic);
  --dock-bg: var(--surface-dock);
  --bubble: var(--panel-2);
  --bubble-ink: var(--ink);
  --bubble-line: var(--line);
  --bubble-user: var(--accent);
  --bubble-user-ink: var(--accent-ink);
  --composer-bg: var(--panel-2);
  --composer-line: var(--line-2);
  --status-ruhig: var(--line-strong);
  --status-arbeitet: var(--accent);
  --status-wartet: var(--warn);
  --status-fertig: var(--ok);
}

/* ---------- Dunkles Erscheinungsbild ------------------------------------- */
html[data-look='dark'] {
  --bg: var(--p-dark-50);
  --bg-2: var(--p-dark-0);
  --panel: var(--p-dark-100);
  --panel-2: var(--p-dark-200);
  --panel-3: var(--p-dark-300);
  --line: var(--p-dark-line);
  --line-2: var(--p-dark-line-2);
  --line-strong: rgba(154, 169, 200, 0.42);

  --ink: var(--p-dark-ink);
  --ink-2: var(--p-dark-ink-2);
  --muted: var(--p-dark-muted);

  --accent: #4fd1a5;
  --accent-2: #7fbfa2;
  --accent-ink: #062019;
  --accent-tint: rgba(79, 209, 165, 0.11);
  --accent-line: rgba(79, 209, 165, 0.38);
  --accent-strong: #6ee7b7;

  --ok: #63e6a4;
  --ok-tint: rgba(99, 230, 164, 0.12);
  --warn: #ffb454;
  --warn-tint: rgba(255, 180, 84, 0.13);
  --risk: #ff6b6b;
  --risk-tint: rgba(255, 107, 107, 0.13);
  --info: #8fb0ff;
  --info-tint: rgba(143, 176, 255, 0.12);

  --grid-dot: rgba(154, 169, 200, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 22px 54px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);

  --surface-top: var(--p-dark-50);
  --surface-desk: #07090e;
  --surface-bar: var(--p-dark-50);
  --surface-classic: var(--p-dark-0);
  --surface-window: var(--p-dark-100);
  --surface-window-head: var(--p-dark-200);
  --surface-window-head-2: var(--p-dark-300);
  --surface-window-line: var(--p-dark-line);
  --surface-window-line-2: var(--p-dark-line-2);
  --surface-window-focus: rgba(79, 209, 165, 0.5);
  --surface-window-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  --surface-window-shadow-focus: 0 26px 64px rgba(0, 0, 0, 0.66), 0 0 0 1px rgba(79, 209, 165, 0.12);
  --surface-avatar-bg: var(--accent);
  --surface-avatar-ink: var(--accent-ink);
  --surface-pill: var(--panel);
  --surface-status-ruhig: var(--line-strong);
  --native-bg: var(--panel);
  --native-head: var(--panel-2);
  --native-line: var(--line);
}

html[data-look='dark'] .login-gate {
  background:
    radial-gradient(900px 520px at 18% 8%, rgba(79, 209, 165, 0.09), transparent 62%),
    radial-gradient(700px 420px at 88% 90%, rgba(143, 176, 255, 0.07), transparent 60%),
    var(--p-dark-0);
}

/* ---------- Konto in der Kopfleiste -------------------------------------- */
.ws-role {
  margin-left: 1px;
  font-size: 9.8px;
  color: var(--muted);
  white-space: nowrap;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  line-height: 1.5;
}
.ws-menu [data-user] {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}
.ws-menu [data-user]:hover { background: var(--panel-3); }
.ws-menu [data-user] .ws-logo { width: 26px; height: 26px; font-size: 10px; }
.ws-menu [data-user] span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ws-menu [data-user] b { font-size: 11.8px; font-weight: 500; color: var(--ink); }
.ws-menu [data-user] small { font-size: 10px; color: var(--muted); }
.ws-menu > button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 9px;
  border: 0; border-radius: 7px; background: transparent;
  font-size: 11.5px; color: var(--ink-2); text-align: left;
}
.ws-menu > button:hover { background: var(--panel-3); color: var(--ink); }
.ws-menu > button .ico { color: var(--muted); }
.ws-menu .menu-sep { height: 1px; background: var(--line); margin: 5px 2px; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--ink-2);
  font-size: 11px;
}
.status-chip:hover { border-color: var(--accent-line); background: var(--accent-tint); color: var(--ink); }
.status-chip .chip-sub { color: var(--muted); font-size: 10px; }
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-tint); }
.status-chip[data-state='offline'] .dot { background: var(--risk); box-shadow: 0 0 0 3px var(--risk-tint); }

/* ---------- Anmeldung ---------------------------------------------------- */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 30px 24px;
  background:
    radial-gradient(900px 520px at 18% 8%, rgba(27, 138, 104, 0.12), transparent 62%),
    radial-gradient(700px 420px at 88% 90%, rgba(47, 98, 201, 0.08), transparent 60%),
    var(--bg);
}
.login-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
}
.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 408px);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  width: min(1080px, 100%);
  margin: auto;
}
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 34px; }
.login-brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.login-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.login-brand b { font-size: 19px; font-weight: 600; letter-spacing: -0.03em; }
.login-brand small { font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.login-eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.login-intro h1 {
  font-size: clamp(30px, 3.4vw, 43px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
}
.login-lede {
  max-width: 50ch;
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.login-points { display: grid; gap: 13px; margin-top: 26px; max-width: 460px; }
.login-points li { display: flex; align-items: flex-start; gap: 11px; }
.login-point-ico {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
}
.login-points b { display: block; font-size: 12px; font-weight: 500; color: var(--ink); }
.login-points small { display: block; margin-top: 1px; font-size: 11px; line-height: 1.45; color: var(--muted); }
.login-note {
  margin-top: 26px;
  font-size: 10.8px;
  color: var(--muted);
  border-left: 2px solid var(--accent-line);
  padding-left: 10px;
  max-width: 46ch;
}
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  padding: 22px;
  position: relative;
}
.login-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--accent), transparent 78%);
}
.login-card-head { display: flex; gap: 11px; align-items: center; margin-bottom: 20px; }
.login-card-mark {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  color: var(--accent);
}
.login-card-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.login-card-head p { font-size: 10.8px; color: var(--muted); margin-top: 2px; }
.login-form { display: grid; gap: 12px; }
.login-field { display: flex; flex-direction: column; gap: 5px; }
.login-field span { font-size: 10.5px; font-weight: 500; color: var(--ink-2); }
.login-field input {
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 12.5px;
  outline: none;
  transition: border-color var(--p-fast), box-shadow var(--p-fast), background var(--p-fast);
}
.login-field input:focus {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.login-submit { height: 38px; margin-top: 4px; justify-content: center; font-size: 12.5px; }
.login-error {
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--risk);
  border-radius: 8px;
  background: var(--risk-tint);
  color: var(--risk);
  font-size: 11.5px;
  line-height: 1.45;
}
.login-card-foot {
  display: flex; align-items: center; gap: 7px;
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10px; color: var(--muted);
}
.login-card-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.login-legal { margin-top: 8px; font-size: 9.6px; color: var(--muted); line-height: 1.5; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; gap: 26px; max-width: 460px; }
  .login-intro { text-align: left; }
  .login-brand { margin-bottom: 20px; }
  .login-intro h1 { font-size: clamp(26px, 7vw, 34px); }
  .login-points, .login-note { display: none; }
  .login-lede { margin-top: 10px; font-size: 12.5px; }
}

/* ---------- Arbeitsfläche & Fenster -------------------------------------- */
.win:focus { outline: none; }
.win-body.adm-body { background: var(--bg-2); }
.adm { flex: 1; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.adm-page {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 18px 20px 28px;
}
.adm-page.narrow { width: min(100%, 820px); }

.desk-welcome { width: min(100%, 700px); }
.desk-welcome h1 { font-size: clamp(23px, 2.5vw, 30px); font-weight: 600; letter-spacing: -0.025em; }
.desk-welcome > p { margin-top: 8px; max-width: 58ch; color: var(--ink-2); font-size: 12.8px; line-height: 1.6; }
.desk-welcome-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.desk-welcome small { display: block; margin-top: 12px; color: var(--muted); font-size: 10.5px; }

/* ---------- Kopf der Seite ----------------------------------------------- */
.a-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.a-eyebrow {
  font-size: 9.6px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.a-head h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.18; }
.a-lede { margin-top: 5px; max-width: 74ch; font-size: 11.6px; line-height: 1.55; color: var(--muted); }
.a-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: none; }

.a-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 9px;
}
.a-sec-head h2 { font-size: 12px; font-weight: 600; letter-spacing: -0.005em; }
.a-sec-head .a-hint { font-size: 10px; color: var(--muted); }
.a-sec-head .a-spacer { flex: 1; }
.a-linklike {
  border: 0; background: transparent; padding: 0;
  color: var(--accent); font-size: 10.5px; cursor: pointer;
}
.a-linklike:hover { text-decoration: underline; }

/* ---------- KPI ---------------------------------------------------------- */
.a-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.a-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.a-kpi {
  position: relative;
  padding: 11px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.a-kpi::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.7;
}
.a-kpi.warn::after { background: var(--warn); }
.a-kpi.bad::after { background: var(--risk); }
.a-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.a-kpi-label { font-size: 9.8px; color: var(--muted); }
.a-kpi-top .ico { color: var(--muted); }
.a-kpi.warn .a-kpi-top .ico { color: var(--warn); }
.a-kpi-num { display: block; margin-top: 5px; font-size: 23px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.a-kpi-num.text { font-size: 15px; letter-spacing: -0.01em; }
.a-kpi-sub { display: block; margin-top: 5px; font-size: 9.9px; color: var(--muted); line-height: 1.4; }

/* ---------- Panels & Tabellen ------------------------------------------- */
.a-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.a-grid.wide-left { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.a-stack { display: grid; gap: 12px; }
.a-panel { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.a-panel-head {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 11px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 10.6px;
  font-weight: 500;
  color: var(--ink-2);
}
.a-panel-head .ico { color: var(--muted); }
.a-panel-head .a-spacer { flex: 1; }
.a-panel-body { padding: 11px; }
.a-panel-body.tight { padding: 0; }
.a-panel-foot { padding: 8px 11px; border-top: 1px solid var(--line); background: var(--panel-2); display: flex; gap: 6px; }

.a-table-scroll { overflow: auto; max-width: 100%; }
.a-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.a-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 7px 10px;
  text-align: left;
  font-size: 9.2px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.a-table td { padding: 7px 10px; border-top: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.a-table tbody tr:first-child td { border-top: 0; }
.a-table tbody tr:hover td { background: var(--panel-2); }
.a-table td strong { color: var(--ink); font-weight: 500; }
.a-table .right { text-align: right; }
.a-table .nowrap { white-space: nowrap; }
.a-table .mono { font-family: var(--mono); font-size: 10px; }
.a-table .tiny { font-size: 9.6px; }
.a-table tr[hidden] { display: none; }

.a-entity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.a-mark {
  width: 25px; height: 25px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
}
.a-entity > div { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.a-entity b { font-size: 11px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-entity small { font-size: 9.6px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 10.3px; }
.tiny { font-size: 9.4px; }
.block { display: block; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34ch; }

/* ---------- Pillen, Chips, Suche ---------------------------------------- */
.a-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9.3px;
  line-height: 1.6;
  white-space: nowrap;
  color: var(--ink-2);
  background: var(--panel-2);
}
.a-pill::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.a-pill.ok { color: var(--ok); border-color: var(--ok); background: var(--ok-tint); }
.a-pill.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-tint); }
.a-pill.bad { color: var(--risk); border-color: var(--risk); background: var(--risk-tint); }
.a-pill.info { color: var(--info); border-color: var(--info); background: var(--info-tint); }
.a-pill.plain::before { display: none; }

.a-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.a-chip {
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 10px;
  white-space: nowrap;
}
.a-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.a-chip.active { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent); font-weight: 500; }
.a-bar .a-spacer { flex: 1; }
.a-search {
  display: inline-flex; align-items: center; gap: 6px;
  height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  min-width: 190px;
}
.a-search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 2px var(--accent-tint); }
.a-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 10.6px; }
.a-count { font-size: 9.8px; color: var(--muted); white-space: nowrap; }

/* ---------- Formulare ---------------------------------------------------- */
.a-form { display: grid; gap: 11px; }
.a-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.a-field { display: flex; flex-direction: column; gap: 4px; }
.a-field > span { font-size: 10px; font-weight: 500; color: var(--ink-2); }
.a-field .req { color: var(--risk); }
.a-field input, .a-field select, .a-field textarea {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: var(--panel-2);
  font-size: 11px;
  outline: none;
  transition: border-color var(--p-fast), box-shadow var(--p-fast);
}
.a-field textarea { resize: vertical; line-height: 1.5; }
.a-field input:focus, .a-field select:focus, .a-field textarea:focus {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 2px var(--accent-tint);
}
.a-field input:disabled, .a-field select:disabled, .a-field textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.a-field .a-help { font-size: 9.4px; color: var(--muted); line-height: 1.4; }
.a-check { display: flex; align-items: flex-start; gap: 7px; font-size: 10.7px; color: var(--ink-2); cursor: pointer; }
.a-check input { margin-top: 2px; accent-color: var(--accent); flex: none; }
.a-check span { display: flex; flex-direction: column; gap: 1px; }
.a-check b { font-weight: 500; color: var(--ink); font-size: 10.8px; }
.a-check small { color: var(--muted); font-size: 9.6px; line-height: 1.4; }
.a-hint { font-size: 9.8px; color: var(--muted); line-height: 1.5; }
.a-hint.warn { color: var(--warn); }

.a-select-inline {
  height: 23px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--panel);
  font-size: 10px;
  outline: none;
}
.a-select-inline.allow { color: var(--ok); border-color: var(--ok); }
.a-select-inline.confirm { color: var(--warn); border-color: var(--warn); }
.a-select-inline.deny { color: var(--risk); border-color: var(--risk); }

/* ---------- Detail, Hinweise -------------------------------------------- */
.a-hero { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.a-hero-mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}
.a-hero > div { min-width: 0; flex: 1; }
.a-hero h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.a-hero p { margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.a-hero-status { flex: none; align-self: flex-start; margin-top: 2px; }

.a-kv { display: grid; grid-template-columns: minmax(90px, 0.42fr) minmax(0, 1fr); gap: 0; margin: 0; }
.a-kv dt, .a-kv dd { margin: 0; padding: 6px 0; border-top: 1px solid var(--line); font-size: 10.8px; }
.a-kv dt { color: var(--muted); padding-right: 10px; }
.a-kv dd { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.a-kv dt:first-of-type, .a-kv dd:first-of-type { border-top: 0; }

.a-note {
  margin-top: 11px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 7px;
  background: var(--panel-2);
}
.a-note.bad { border-left-color: var(--risk); }
.a-note strong { display: block; font-size: 9.6px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 3px; font-weight: 500; }
.a-note p { font-size: 10.8px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }

.a-notice {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 11px;
  padding: 8px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent-tint);
  color: var(--ink-2);
  font-size: 10.4px;
  line-height: 1.5;
}
.a-notice .ico { color: var(--accent); margin-top: 1px; }
.a-notice strong { color: var(--ink); font-weight: 500; }
.a-notice.bad { border-color: var(--risk); background: var(--risk-tint); }
.a-notice.bad .ico { color: var(--risk); }

.a-danger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid var(--risk);
  border-radius: 9px;
  background: var(--risk-tint);
}
.a-danger strong { display: block; font-size: 11px; font-weight: 500; color: var(--ink); }
.a-danger p { font-size: 9.8px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.a-danger .a-danger-body { min-width: 0; }

.a-hash-box { display: grid; gap: 6px; margin-top: 12px; }
.a-hash-box > div { display: flex; flex-direction: column; gap: 2px; }
.a-hash-box .a-eyebrow { margin: 0; }
.a-hash {
  display: block;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 9.6px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.a-timeline { display: grid; gap: 0; }
.a-timeline li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.a-timeline li:first-child { border-top: 0; }
.a-timeline-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); margin-top: 5px; flex: none; }
.a-timeline-dot.ok { background: var(--ok); }
.a-timeline-dot.bad { background: var(--risk); }
.a-timeline-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.a-timeline-body strong { font-size: 10.6px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.a-timeline-body span { font-size: 9.6px; color: var(--muted); }
.a-timeline > li > .a-pill { flex: none; margin-top: 1px; }

.a-attention { display: grid; gap: 6px; }
.a-attention-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}
.a-attention-ico { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--panel-3); color: var(--muted); }
.a-attention-item.bad .a-attention-ico { background: var(--risk-tint); color: var(--risk); }
.a-attention-item.warn .a-attention-ico { background: var(--warn-tint); color: var(--warn); }
.a-attention-item.info .a-attention-ico { background: var(--info-tint); color: var(--info); }
.a-attention-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.a-attention-body strong { font-size: 10.6px; font-weight: 500; color: var(--ink); }
.a-attention-body span { font-size: 9.6px; color: var(--muted); }
.a-attention-item .btn { flex: none; }

.a-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  padding: 28px 18px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: var(--panel);
}
.a-empty .a-empty-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  margin-bottom: 2px;
}
.a-empty .a-empty-mark.ok { background: var(--ok-tint); border-color: var(--ok); color: var(--ok); }
.a-empty strong { font-size: 11.5px; font-weight: 500; color: var(--ink); }
.a-empty span { max-width: 46ch; font-size: 10.2px; line-height: 1.5; color: var(--muted); }
.a-empty .btn { margin-top: 5px; }
.a-empty.compact { padding: 16px 12px; border-style: solid; }

.a-skeleton { display: grid; gap: 8px; padding: 4px 0; }
.a-skel { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: adm-skel 1.2s linear infinite; }
@keyframes adm-skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.a-error { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 30px; text-align: center; }
.a-error strong { font-size: 12px; color: var(--ink); }
.a-error p { max-width: 48ch; font-size: 10.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Knöpfe ------------------------------------------------------- */
.btn.red { background: var(--risk); border-color: var(--risk); color: #fff; }
.btn.red:hover { filter: brightness(1.05); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { filter: brightness(1.05); color: #fff; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.quiet:hover { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn-row { display: flex; gap: 5px; flex-wrap: wrap; }
.btn-row.end { justify-content: flex-end; }

/* ---------- Overlays ----------------------------------------------------- */
.a-scrim {
  position: fixed; inset: 0; z-index: 320;
  background: rgba(10, 20, 15, 0.42);
  backdrop-filter: blur(2px);
  animation: adm-fade 0.14s var(--p-ease);
}
html[data-look='dark'] .a-scrim { background: rgba(0, 0, 0, 0.58); }
@keyframes adm-fade { from { opacity: 0; } }

.a-modal {
  position: fixed; inset: 0; z-index: 330;
  display: grid; place-items: center;
  padding: 20px;
  pointer-events: none;
}
.a-modal-card {
  width: min(520px, 100%);
  max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 13px;
  box-shadow: var(--shadow-overlay, 0 32px 80px rgba(0, 0, 0, 0.3));
  overflow: hidden;
  animation: adm-pop 0.16s var(--p-ease);
}
.a-modal-card.wide { width: min(720px, 100%); }
.a-modal-card.danger { border-color: var(--risk); }
@keyframes adm-pop { from { opacity: 0; transform: translateY(6px) scale(0.985); } }
.a-modal-head { display: flex; align-items: center; gap: 9px; padding: 12px 13px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.a-modal-head h3 { flex: 1; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.a-modal-body { padding: 13px; overflow: auto; }
.a-modal-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 13px; border-top: 1px solid var(--line); background: var(--panel-2); }
.a-modal-text { font-size: 11.4px; line-height: 1.55; color: var(--ink-2); }
.a-modal-consequence { margin-top: 7px; padding: 7px 9px; border-radius: 7px; background: var(--warn-tint); color: var(--warn); font-size: 10.3px; line-height: 1.5; }

.a-drawer {
  position: fixed; inset: 0; z-index: 330;
  display: flex; justify-content: flex-end;
  padding: 10px;
  pointer-events: none;
}
.a-drawer-panel {
  width: min(480px, 100%);
  height: 100%;
  display: flex; flex-direction: column;
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-overlay, 0 32px 80px rgba(0, 0, 0, 0.3));
  overflow: hidden;
  animation: adm-slide 0.18s var(--p-ease);
}
.a-drawer-panel.wide { width: min(600px, 100%); }
@keyframes adm-slide { from { transform: translateX(16px); opacity: 0; } }
.a-drawer-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.a-drawer-head h3 { flex: 1; font-size: 12.5px; font-weight: 600; }
.a-drawer-body { flex: 1; min-height: 0; overflow: auto; padding: 13px; }
.a-drawer-foot { padding: 9px 13px; border-top: 1px solid var(--line); background: var(--panel-2); display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.a-drawer-foot .a-spacer { flex: 1; }

.a-secret {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed var(--accent-line);
  border-radius: 8px;
  background: var(--accent-tint);
}
.a-secret code { flex: 1; font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; color: var(--ink); }

/* ---------- Toasts ------------------------------------------------------- */
.a-toast-root {
  position: fixed; right: 14px; bottom: calc(var(--bar-h) + 12px);
  z-index: 400;
  display: flex; flex-direction: column; gap: 7px;
  width: min(330px, calc(100vw - 28px));
  pointer-events: none;
}
.a-toast {
  display: flex; align-items: flex-start; gap: 8px;
  pointer-events: auto;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--ok);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-2);
  animation: adm-toast 0.18s var(--p-ease);
}
.a-toast.warn { border-left-color: var(--warn); }
.a-toast.bad { border-left-color: var(--risk); }
.a-toast .a-toast-ico { color: var(--ok); margin-top: 1px; flex: none; }
.a-toast.warn .a-toast-ico { color: var(--warn); }
.a-toast.bad .a-toast-ico { color: var(--risk); }
.a-toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.a-toast-body b { font-size: 10.8px; font-weight: 500; color: var(--ink); }
.a-toast-body span { font-size: 9.8px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.a-toast-x { border: 0; background: transparent; color: var(--muted); padding: 0; flex: none; }
.a-toast-x:hover { color: var(--ink); }
.a-toast.leaving { opacity: 0; transform: translateY(4px); transition: opacity 0.16s, transform 0.16s; }
@keyframes adm-toast { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Schmale Fenster --------------------------------------------- */
@media (max-width: 1080px) {
  .a-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .adm-page { padding: 14px 13px 22px; }
  .a-head { flex-direction: column; gap: 9px; }
  .a-actions { width: 100%; }
  .a-grid, .a-grid.wide-left { grid-template-columns: 1fr; }
  .a-kpis.three { grid-template-columns: 1fr; }
  .a-form-row { grid-template-columns: 1fr; }
  .a-search { flex: 1; min-width: 140px; }
  .a-hero h3 { font-size: 13.5px; }
  .a-modal { padding: 10px; }
  .a-drawer { padding: 0; }
  .a-drawer-panel { border-radius: 0; }
  .ws-role { display: none; }
  .status-chip .chip-sub { display: none; }
}
@media (max-width: 560px) {
  .a-kpis { grid-template-columns: 1fr; }
  .a-kv { grid-template-columns: 1fr; }
  .a-kv dt { padding-bottom: 0; border-top: 1px solid var(--line); }
  .a-kv dd { padding-top: 2px; border-top: 0; }
}
