/* ================================================================
   V9.0 (BETA) — neues Erscheinungsbild des Dashboards
   ================================================================
   Liegt bewusst ÜBER style.css (wird danach geladen): style.css bleibt
   unverändert und regelt weiter alle Details; hier steht nur, was sich
   für V9 ändert — Farben, Kopfzeile statt Seitenleiste, Spalten, Kacheln.
   Zurück zum alten Aussehen = die eine <link>-Zeile in Dashboard.html
   entfernen (Aufbau der Seite und alle IDs sind gleich geblieben).

   Farben: dieselben --adm-* Werte wie das Admin-Panel (style.css), hell
   und dunkel. Hintergrundbild (Adler) wie vorher, Kacheln als leicht
   durchscheinendes Glas darüber (Block „Hintergrundbild“ am Ende). Rot nur für
   Wichtiges (Hauptknöpfe, Übergabe, Markierungen).
   ================================================================ */

:root {
  --bg: var(--adm-bg);
  --fg: var(--adm-text);
  --muted: var(--adm-muted);
  --card: var(--adm-surface);
  --card-solid: var(--adm-surface);
  --stroke: var(--adm-line);
  --shadow: none;
  --corner: 14px;
  --glow: transparent;
  --accent: var(--adm-accent);
  --ring: rgba(217, 45, 32, .28);
  --chat-tile-height: clamp(460px, 64vh, 680px);
  --ok-line: #9FD3B4;
}
html.dark {
  --bg: var(--adm-bg);
  --fg: var(--adm-text);
  --muted: var(--adm-muted);
  --card: var(--adm-surface);
  --card-solid: var(--adm-surface);
  --stroke: var(--adm-line);
  --shadow: none;
  --glow: transparent;
  --accent: #E5483B;
  --ring: rgba(229, 72, 59, .35);
  --ok-line: #2F6B47;
}

/* ── Grund (Hintergrundbild siehe Block „Hintergrundbild“ am Ende) ── */
body { background: var(--adm-bg); color: var(--adm-text); font-size: 14px; }
.ico { flex: none; }

/* ── Kopfzeile ── */
.topbar {
  position: sticky; top: 0; inset: auto; width: auto; z-index: 50;
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 12px 24px; overflow: visible;
  background: var(--adm-surface); border: none; border-bottom: 1px solid var(--adm-line); box-shadow: none;
}
html.dark .topbar { border-right: none; box-shadow: none; }
.brand-logo-row {
  flex-direction: row; align-items: center; gap: 11px; width: auto;
  padding: 0; margin: 0; border: none;
}
.topbar-logo { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand { font-size: 16px; font-weight: 700; letter-spacing: 0; text-align: left; width: auto; }
.brand-sub-line { font-size: 12px; color: var(--adm-muted); }

.search-row { flex: 1 1 200px; min-width: 0; }
.search-wrapper { position: relative; max-width: none; margin: 0; display: flex; align-items: center; font-size: 14px; }
.search-wrapper .search-ico { position: absolute; left: 14px; color: var(--adm-muted); pointer-events: none; z-index: 11; }
#menu-search, html.dark #menu-search {
  height: 42px; padding: 0 14px 0 40px; border-radius: 11px; font-size: 14px;
  background: var(--adm-surface2); border: 1px solid var(--adm-line); color: var(--adm-text); box-shadow: none;
}
#menu-search:focus, html.dark #menu-search:focus { background: var(--adm-surface); border-color: var(--adm-text); box-shadow: none; }
#search-results, html.dark #search-results {
  top: calc(100% + 6px); border-radius: 12px; background: var(--adm-surface);
  border: 1px solid var(--adm-line); box-shadow: 0 16px 40px rgba(0,0,0,.16);
}
.search-result-item.is-active { box-shadow: none; background: var(--adm-accent-soft); }

.sidebar-datetime, html.dark .sidebar-datetime {
  width: auto; padding: 0; margin: 0; border: none; text-align: right; line-height: 1.15;
}
#time { font-size: 24px; font-weight: 700; letter-spacing: .01em; }
#date { font-size: 12px; font-weight: 500; margin-top: 1px; }

/* Aktionen rechts — app.js setzt beim Anmelden display:flex;flex-direction:column */
#topbar-user { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 8px; }

.btn, html.dark .btn {
  border: 1px solid var(--adm-line-strong); background: var(--adm-surface); color: var(--adm-text);
  border-radius: 10px; box-shadow: none; font-weight: 500;
}
.btn:hover, html.dark .btn:hover { transform: none; box-shadow: none; background: var(--adm-surface2); border-color: var(--adm-line-strong); }
.btn[aria-pressed="true"] { box-shadow: none; }
.btn-sm { border-radius: 10px !important; }

.head-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px;
  padding: 0 12px !important; font-size: 13px !important;
}
.head-btn-icon { width: 40px; justify-content: center; padding: 0 !important; }
#admin-panel-btn { color: var(--adm-accent-text); }

/* Bildschirm aktiv: Schalter im Knopf */
.wake-switch {
  width: 28px; height: 16px; border-radius: 999px; background: var(--adm-line-strong);
  position: relative; display: inline-block; transition: background-color .15s;
}
.wake-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--adm-surface); transition: transform .15s;
}
#wake-btn[aria-pressed="true"] {
  border: 1px solid var(--ok-line) !important; background: var(--adm-ok-bg) !important;
  color: var(--adm-ok) !important; font-weight: 600;
}
#wake-btn[aria-pressed="true"] .wake-switch { background: var(--adm-ok); }
#wake-btn[aria-pressed="true"] .wake-switch::after { transform: translateX(12px); }

.theme-segment {
  width: auto; height: 40px; border: 1px solid var(--adm-line-strong); border-radius: 10px;
  background: var(--adm-surface); overflow: hidden;
}
.theme-seg-btn { padding: 0 10px; opacity: .55; color: var(--adm-text); display: flex; align-items: center; }
.theme-seg-btn:hover { background: var(--adm-surface2); opacity: .85; }
.theme-seg-btn.active, html.dark .theme-seg-btn.active { background: var(--adm-accent-soft); color: var(--adm-accent-text); opacity: 1; }

/* Personen-Menü */
.user-menu-wrap { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px; height: 44px; box-sizing: border-box;
  padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--adm-line);
  background: var(--adm-surface); color: var(--adm-text); font: inherit; cursor: pointer;
}
.user-chip:hover { background: var(--adm-surface2); }
.user-chip:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.user-chip-caret { color: var(--adm-muted); }
.sidebar-profile-block {
  display: flex; align-items: center; gap: 9px; padding: 0; margin: 0;
  background: none; border: none !important; border-radius: 0;
}
.sidebar-avatar { width: 34px; height: 34px; font-size: 13px; }
.sidebar-profile-info { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.2; }
.sidebar-username { font-size: 14px; font-weight: 600; max-width: 160px; }
#topbar-role-badge { font-size: 11px; padding: 1px 7px; font-weight: 600; letter-spacing: 0; }
#ghost-badge { font-size: 11px; color: var(--adm-muted); font-weight: 600; }
.sync-status { width: auto; padding: 0; margin: 0; border: none; background: none; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 240px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.user-menu[hidden] { display: none; }
.user-menu .sidebar-actions-primary { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: 0; }
.user-menu-item, html.dark .user-menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px; justify-content: flex-start;
  height: 40px; padding: 0 10px !important; font-size: 14px !important;
  border: none; background: none; border-radius: 8px !important;
}
.user-menu-item:hover, html.dark .user-menu-item:hover { background: var(--adm-surface2); }
.user-menu .btn-logout { background: none !important; border: none !important; color: var(--adm-danger) !important; }
.user-menu .btn-logout:hover { background: var(--adm-danger-bg) !important; }
#role-switch-dropdown { position: static; padding: 2px 2px 6px 26px; max-height: 50vh; overflow-y: auto; }
#role-switch-list { display: flex; flex-direction: column; gap: 1px; }
.role-sw-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px;
  border: none; border-radius: 8px; background: none; color: var(--adm-text);
  font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.role-sw-btn:hover { background: var(--adm-surface2); }
.role-sw-btn.active { background: var(--adm-accent-soft); color: var(--adm-accent-text); font-weight: 600; }
.role-switch-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--adm-muted); padding: 4px 6px 6px; }

.ticker-banner { display: flex; flex-direction: column; align-items: stretch; padding: 0 24px; }
.ticker-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; }
.meldung-top { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px; border-radius: 8px; border: 1px solid var(--adm-line-strong, var(--stroke)); background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.meldung-top.info { border-color: var(--adm-blue); background: var(--adm-blue-bg); color: var(--adm-blue); }
.meldung-top.warn { border-color: var(--adm-danger-line); background: var(--adm-danger-bg); color: var(--adm-danger); }

/* ── Hauptbereich: breite Spalte + Seitenspalte ── */
main { min-height: 0; display: block; padding: 18px 24px 24px; }
.grid-wrap { max-width: 1680px; margin: 0 auto; }
.dashboard-layout {
  display: grid; gap: 18px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}
/* Gemeinsames Raster über beide Spalten, damit die Zeilen bündig sind:
   Zeile 1 = Dienstende/Wecker/Notiz | Schnellzugriff (gleich hoch)
   Zeile 2 = Chat/Online + Menüs     | Eigene Dokumente + Pausen (gleicher Start)
   Die Spalten-Container bleiben im HTML (app.js nutzt .right-column), sind
   für das Layout aber „durchsichtig“ (display: contents). */
.right-column, .left-column { display: contents; }
.top-row         { grid-column: 1; grid-row: 1; }
.quick-links-bar { grid-column: 2; grid-row: 1; align-self: stretch; }
.main-stack      { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.side-stack      { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dashboard-layout { align-items: stretch; }
.main-stack, .side-stack { align-self: start; }
.top-row > .tile { align-self: stretch !important; margin: 0; }
/* #id statt Klasse: Dashboard.html hat im <head> eine eigene .quick-links-bar-Regel (margin-bottom) */
#quick-links-bar { display: flex; flex-wrap: wrap; align-items: center; align-content: center; margin: 0 !important; }
#quick-links-bar .quick-icon-btn:hover { transform: none; }
.top-row { align-content: stretch; }
@media (max-width: 1000px) {
  .dashboard-layout { grid-template-columns: minmax(0, 1fr); }
  .top-row         { grid-column: 1; grid-row: 1; }
  .quick-links-bar { grid-column: 1; grid-row: 2; }
  .main-stack      { grid-column: 1; grid-row: 3; }
  .side-stack      { grid-column: 1; grid-row: 4; }
}

/* ── Kacheln allgemein: deckend, ruhig, ohne Hüpf-Effekt ── */
.tile, html.dark .tile {
  background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 14px;
  box-shadow: none; color: var(--adm-text);
}
.tile:hover, .tile:focus-visible { transform: none; box-shadow: none; }
.tile::after, .tile:hover::after, .tile:focus-visible::after { box-shadow: none; }
.tile:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.tile-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.tile-title .ico { color: var(--adm-muted); }

/* Kacheln mit Inhalt (nicht die Link-Kacheln): linksbündig statt zentriert */
.top-row .tile, .tile-chat, .tile-online { text-align: left; place-items: initial; }
.tile-notiz-header { justify-content: space-between !important; width: 100%; font-weight: 600; }

/* Obere Reihe: Dienstende + Wecker als schmale Kärtchen, Notiz nimmt den Rest.
   Flex statt Grid — die von layoutTopRow() gesetzten Spalten-Spans greifen
   dann nicht; ausgeblendete Kacheln machen einfach Platz. */
.top-row { display: flex !important; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.top-row[style*="display: none"] { display: none !important; }   /* alle drei ausgeblendet */
.top-row > .tile-countdown, .top-row > .tile-wecker { flex: 0 1 210px; min-width: 170px; }
.top-row > .tile-notiz { flex: 1 1 320px; }
.top-row .tile { padding: 9px 12px !important; gap: 4px !important; }
.tile-head-btn {
  width: 26px; height: 26px; margin: -3px -4px -3px 0; border-radius: 7px; border: none;
  background: transparent; color: var(--adm-muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.tile-head-btn:hover, .tile-head-btn[aria-expanded="true"] { background: var(--adm-surface2); color: var(--adm-text); }
.wecker-empty { font-size: 12.5px; color: var(--adm-muted); }
.wecker-add-row[hidden] { display: none; }
.wecker-add-row { flex-wrap: nowrap; gap: 4px; }
.wecker-add-row input { min-width: 0; height: 30px; font-size: 12.5px; }
.wecker-time-input { flex: 0 0 76px; }
.wecker-label-input { flex: 1 1 auto; }
.wecker-add-btn { height: 30px; min-width: 30px; }
/* Dienstende: Auswahl neben die Überschrift, Platzhaltertext weg (steht schon in der Auswahl) */
.countdown-header { flex-direction: row !important; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px !important; }
.countdown-header > div { flex: 1 1 120px; min-width: 0; }
#countdown-dienst { height: 28px; font-size: 12.5px; }
#countdown-placeholder { display: none !important; }
.countdown-segment-label { font-size: 11.5px; }
#countdown-seg-wrap span { font-size: 11px !important; }
#notiz-text { min-height: 40px; height: 46px; padding: 6px 10px; }
.tile-notiz .notiz-saved-hint:empty { display: none; }
/* Laufender Dienst: Restzeit, schmaler Balken und darüber eine schlanke Zeile mit Beschriftung + Prozentangabe
   (die Zeile war im V9-Umbau ausgeblendet — Daniel wollte die % wieder sehen, 16.10.2026) */
#countdown-seg-wrap > div:first-child, #countdown-total-wrap > div:first-child { margin-bottom: 1px !important; line-height: 1.05; }
#countdown-seg-bar-label, #countdown-total-wrap > div:first-child > span:first-child { font-size: 10px !important; letter-spacing: .04em; }
#countdown-pct-text, #countdown-total-pct-text { font-size: 12px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown-bar-wrap { height: 5px; }
#countdown-total-wrap { margin-top: 4px !important; }
.countdown-title { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
.tile-countdown { justify-content: flex-start; }
.top-row .tile { padding: 10px 14px; min-height: 0; text-align: left; font-size: 14px; font-weight: 400; }
.top-row .tile-notiz-header, .countdown-header { font-size: 12.5px; color: var(--adm-muted); }
.top-row .tile-title { font-size: 12.5px; color: var(--adm-muted); }
.countdown-display { font-size: 20px !important; font-weight: 700; color: var(--adm-text); line-height: 1.2; }
#notiz-text {
  background: var(--adm-surface2); border: 1px solid var(--adm-line); border-radius: 9px;
  color: var(--adm-text); font-size: 14px;
}

/* Chat + Online nebeneinander (vorher zusätzlich SharePoint) */
.tile-chat, .tile-online { font-size: 14px; font-weight: 400; letter-spacing: 0; }
#online-list { padding: 4px 12px 10px !important; }
#online-list .online-user {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 2px; border-bottom: 1px solid var(--adm-line); font-size: 14px; font-weight: 600;
}
#online-list .online-user:last-child { border-bottom: none; }
#online-list .online-user > span { min-width: 0; }
#online-list .online-user-away { color: var(--adm-muted); font-weight: 500; }
#online-list .online-away-label { font-size: 12px; font-weight: 500; color: var(--adm-muted); flex-basis: 100%; }
#online-list .pm-btn { flex: none; }
#online-search { margin: 0; }
.tile-online {
  display: flex; flex-direction: column; align-items: stretch; padding: 0;
  height: var(--chat-tile-height); overflow: hidden;
}
.tile-chat > .tile-notiz-header, .tile-online > .tile-notiz-header {
  padding: 14px 16px; border-bottom: 1px solid var(--adm-line); font-size: 15px;
}
.chat-row { grid-template-columns: minmax(0, 1fr) clamp(220px, 17vw, 270px); gap: 18px; }  /* Online schmal (Daniel 2026-10-08: „zu groß“) */
.chat-row .tile-chat { grid-column: auto; }
@media (max-width: 760px) { .chat-row { grid-template-columns: minmax(0, 1fr); } }
.tile-notiz-header { font-size: 15px; }

/* Menüs: kompakte Kacheln mit Symbol */
.section-head h2 { margin: 2px 0 -6px; font-size: 17px; font-weight: 600; }
.category-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.category-grid > .tile { min-height: 0; }
.tile-link {
  display: flex; align-items: center; gap: 11px; justify-content: flex-start; text-align: left;
  padding: 12px 14px; font-size: 15px; font-weight: 600;
}
.tile-link:hover, details.tile:hover:not([open]) { background: var(--adm-surface2); transform: none; }
details.tile { padding: 12px 14px; }
#category-grid > details.tile { display: block; place-items: initial; text-align: left; }
#category-grid > details.tile > summary { width: 100%; min-height: 34px; }
#category-grid > .tile-link { min-height: 60px; box-sizing: border-box; }
.tile-icon { filter: none; }
details.tile > summary { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 600; }
details.tile[open], html.dark details.tile[open] {
  background: var(--adm-surface); box-shadow: 0 0 0 2px var(--ring);
}
.tile-icon {
  width: 34px; height: 34px; flex: none; border-radius: 9px; font-size: 18px; line-height: 1;
  background: var(--adm-surface2); color: var(--adm-muted);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Seitenspalte: Schnellzugriff, Dokumente, Pausen ── */
.quick-links-bar {
  background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 14px;
  padding: 8px 10px; box-shadow: none;
}
.quick-icon-btn { box-shadow: none; opacity: .8; border: 1px solid transparent; }
.quick-icon-btn:hover { opacity: 1; transform: none; box-shadow: none; background: var(--adm-surface2); border-color: var(--adm-line); }

.doc-panel, .pause-panel {
  background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 14px;
  box-shadow: none; padding: 14px 16px; margin: 0;
}
.doc-panel h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.pause-panel { font-size: 13px; gap: 6px; }
.pause-panel h2 { font-size: 15px; font-weight: 600; }
.pause-meta { font-size: 12px; margin: 0; }
.pause-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--adm-muted); }
.pause-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pause-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.pause-legend .lg-window { border: 1.5px solid var(--adm-ok); }
.pause-legend .lg-marked { background: #D97706; }
.pause-legend .lg-fe { border: 1.5px solid var(--adm-accent); }

/* Umschalter „Nur Pausenfenster“ — beschriftet (Schieber rechts neben dem Text) */
.pause-switch { display: inline-flex; align-items: center; width: auto; height: 22px; padding-right: 48px; cursor: pointer; }
.pause-switch .pause-switch-track { inset: 0 0 0 auto; width: 40px; }
.pause-switch .pause-switch-thumb { left: auto; right: 21px; }
.pause-switch-text { font-size: 12px; color: var(--adm-muted); white-space: nowrap; }

.pause-section h3 { font-size: 11px; margin: 6px 0 4px; }
.pause-list { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.pause-list li, html.dark .pause-list li {
  padding: 6px 8px; border-radius: 8px; font-size: 12.5px;
  background: var(--adm-surface2); border: 1.5px solid transparent;
}
.pause-list li .pause-id { font-size: 12.5px; }
.pause-list li .pause-duration, html.dark .pause-list li .pause-duration { font-size: 11px; color: inherit; opacity: .8; }
.pause-list li span.pause-time { font-size: 11px; }
.pause-list li:hover, html.dark .pause-list li:hover { background: var(--adm-surface2); border-color: var(--adm-line-strong); }
/* im Pausenfenster */
.pause-list li.pause-active, html.dark .pause-list li.pause-active { background: var(--adm-surface); border-color: var(--ok-line); }
.pause-list li.pause-active .pause-id, html.dark .pause-list li.pause-active .pause-id { color: var(--adm-ok); }
/* in Pause (markiert) */
.pause-list li.marked-in-pause, html.dark .pause-list li.marked-in-pause {
  background: var(--adm-warn-bg); border-color: #D97706;
}
.pause-list li.marked-in-pause .pause-id { text-decoration: none; opacity: 1; color: var(--adm-warn); }
/* Schichtende in < 10 Min. */
.pause-list li.shift-ending-soon, html.dark .pause-list li.shift-ending-soon,
.pause-list li.marked-in-pause.shift-ending-soon, html.dark .pause-list li.marked-in-pause.shift-ending-soon {
  background: var(--adm-accent-soft); border-color: var(--adm-accent); animation: v9-fe-pulse 2s ease-in-out infinite;
}
@keyframes v9-fe-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,45,32,0); }
  50%      { box-shadow: 0 0 0 3px rgba(217,45,32,.22); }
}
.shift-end-badge { background: var(--adm-accent) !important; }

/* ── Kleine Dialoge (Passwort ändern, Rollenwechsel bestätigen) ──
   app.js öffnet sie über die Klasse .active; dafür gab es bisher gar keine
   Stile — die Fenster lagen unsichtbar unter der alten festen Seitenleiste. */
.admin-overlay {
  position: fixed; inset: 0; z-index: 9100; box-sizing: border-box; padding: 16px;
  background: rgba(15,17,21,.55); display: none; align-items: center; justify-content: center;
}
.admin-overlay.active { display: flex; }
.admin-modal {
  width: 100%; max-height: 90vh; overflow: auto; box-sizing: border-box;
  background: var(--adm-surface); color: var(--adm-text);
  border: 1px solid var(--adm-line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.admin-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--adm-line); font-size: 16px; font-weight: 600;
}
.admin-close {
  width: 34px; height: 34px; flex: none; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--adm-line); background: var(--adm-surface); color: var(--adm-text);
}
.admin-close:hover { background: var(--adm-surface2); }

/* ── Fußzeile ── */
.dashboard-footer {
  position: static; padding: 4px 24px 20px; text-align: center;
  color: var(--adm-muted); font-size: 12px; background: none; border: none; box-shadow: none;
}

/* ── Schmale Bildschirme ── */
@media (max-width: 760px) {
  .topbar { padding: 10px 14px; }
  .brand-sub-line, .head-btn span:not(.wake-switch) { display: none; }
  .head-btn { width: 40px; justify-content: center; padding: 0 !important; }
  .wake-btn .wake-switch { display: none; }
  main { padding: 14px; }
  .ticker-banner { padding: 0 14px; }
}

/* Daniel 2026-10-08: Hinweistexte ausblenden (Dokumente-Hinweis, Leer-Hinweis,
   Pausen-Kopfzeile mit Tag/Uhrzeit/Gruppe) */
#doc-scope-note, #doc-list .doc-list-empty, .pause-panel .pause-meta { display: none !important; }

/* ================================================================
   Hintergrundbild (Daniel 2026-10-08: „war wichtig“)
   Das bekannte Adler-Bild aus style.css (bg_light/bg_dark.webp) über die
   ganze Fläche — die alte Seitenleiste gibt es nicht mehr, daher ab 0.
   Kacheln und Kopfzeile als Glas: fast deckend (Lesbarkeit), das Bild
   schimmert durch und bleibt in den Zwischenräumen sichtbar.
   ================================================================ */
:root {
  --v9-glass: rgba(255, 255, 255, .84);
  --v9-glass-head: rgba(255, 255, 255, .78);
  --v9-glass-line: rgba(17, 24, 39, .08);
  --bg-filter: none;                     /* Adler scharf statt verwaschen */
  --overlay-from: rgba(255, 255, 255, .10);
  --overlay-to: rgba(255, 255, 255, .25);
}
html.dark {
  --v9-glass: rgba(23, 26, 32, .86);
  --v9-glass-head: rgba(14, 16, 20, .80);
  --v9-glass-line: rgba(255, 255, 255, .08);
  --bg-filter: saturate(.95) brightness(.68);
  --overlay-from: rgba(10, 12, 14, .15);
  --overlay-to: rgba(10, 12, 14, .45);
}
body::before, body::after { display: block; left: 0; }
/* bg_v9_*: wie bg_light/bg_dark, aber ohne Schriftzug oben links (der lag
   sonst angeschnitten hinter den Kacheln; Logo steht ja in der Kopfzeile) */
body::before { background-image: var(--v9-bg-light); background-size: cover; background-position: center; }
html.dark body::before { background-image: var(--v9-bg-dark); }
.topbar, html.dark .topbar {
  background: var(--v9-glass-head);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--v9-glass-line);
}
.tile, html.dark .tile,
.quick-links-bar, html.dark .quick-links-bar,
.doc-panel, html.dark .doc-panel,
.pause-panel, html.dark .pause-panel {
  background: var(--v9-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border-color: var(--v9-glass-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
}
html.dark .tile, html.dark .quick-links-bar, html.dark .doc-panel, html.dark .pause-panel {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
/* Überschrift „Menüs“ und Fußzeile stehen direkt auf dem Bild */
html.dark .section-head, html.dark .dashboard-footer { color: rgba(255, 255, 255, .85); }

/* ================================================================
   Admin-Panel: ältere Reiter (Pausenplan, Dienste, Dienstgruppen, Rollen,
   Menü-Links, Quicklinks, RTH, Protokoll, Statistiken, Testmodus)
   Deren Inhalte bauen app.js-Funktionen mit Inline-Stilen. Statt alles neu
   zu schreiben, gleicht diese Schicht Felder, Knöpfe, Karten und Schrift an
   den V9-Look an (deshalb !important — Inline-Stile gewinnen sonst).
   Gilt nur innerhalb #admin-content.adm-legacy (Klasse setzt loadAdminTab).
   Farbregel: Rot nur für Hinzufügen/Speichern (primär) und Löschen (zart);
   blaue/lila/grüne Nebenknöpfe werden neutral.
   ================================================================ */
.adm-legacy { font-size: 13.5px; color: var(--adm-text); }
.adm-legacy, .adm-legacy * { font-family: inherit !important; }

/* Felder */
.adm-legacy input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]),
.adm-legacy select, .adm-legacy textarea {
  font-size: 13px !important; color: var(--adm-text) !important;
  background: var(--adm-surface) !important; border: 1px solid var(--adm-line-strong) !important;
  border-radius: 8px !important; padding: 7px 10px !important; min-height: 34px;
  box-sizing: border-box !important; box-shadow: none !important; outline: none;
}
.adm-legacy input:focus, .adm-legacy select:focus, .adm-legacy textarea:focus {
  border-color: var(--adm-text) !important; box-shadow: 0 0 0 3px var(--ring) !important;
}
.adm-legacy input::placeholder, .adm-legacy textarea::placeholder { color: var(--adm-muted); opacity: .8; }
.adm-legacy input[type=checkbox], .adm-legacy input[type=radio] { accent-color: var(--adm-accent); width: 15px; height: 15px; }
.adm-legacy input[type=color] {
  border: 1px solid var(--adm-line-strong) !important; border-radius: 8px !important;
  padding: 2px !important; background: var(--adm-surface) !important; height: 34px !important;
}

/* Felder in Raster-Zeilen (Pausenplan, Dienste …) füllen ihre Zelle */
.adm-legacy :is([style*="display:grid"], [style*="display: grid"]) > div > input:not([type=checkbox]):not([type=radio]):not([type=color]),
.adm-legacy :is([style*="display:grid"], [style*="display: grid"]) > div > select,
.adm-legacy :is([style*="display:grid"], [style*="display: grid"]) > input:not([type=checkbox]):not([type=radio]):not([type=color]) { width: 100% !important; }

/* Knöpfe: neutral als Grundform (:where hält die Gewichtung niedrig,
   damit die Varianten unten greifen) */
.adm-legacy button:where(:not(.adm-btn):not(.adm-chip)) {
  font-size: 12.5px !important; font-weight: 600 !important; line-height: 1.2 !important;
  border-radius: 8px !important; padding: 7px 12px !important; min-height: 32px;
  border: 1px solid var(--adm-line-strong) !important; background: var(--adm-surface) !important;
  color: var(--adm-text) !important; box-shadow: none !important; text-shadow: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; transition: background-color .12s, border-color .12s;
}
.adm-legacy button:where(:not(.adm-btn):not(.adm-chip)):hover { background: var(--adm-surface2) !important; transform: none !important; }
.adm-legacy button:disabled { opacity: .5 !important; cursor: not-allowed !important; }
/* Primär (Hinzufügen / Erstellen / Speichern) */
.adm-legacy button[style*="background:var(--accent)"], .adm-legacy button[style*="background: var(--accent)"],
.adm-legacy button[style*="background:#22c55e"], .adm-legacy button[style*="background:#16a34a"],
.adm-legacy button[style*="background:#10b981"], .adm-legacy button[style*="background: #16a34a"] {
  background: var(--adm-accent) !important; border-color: var(--adm-accent) !important; color: #fff !important;
}
.adm-legacy button[style*="background:var(--accent)"]:hover, .adm-legacy button[style*="background:#22c55e"]:hover,
.adm-legacy button[style*="background:#16a34a"]:hover, .adm-legacy button[style*="background:#10b981"]:hover {
  background: var(--adm-accent-hover) !important;
}
/* Löschen */
.adm-legacy button[style*="#dc2626"], .adm-legacy button[style*="#ef4444"], .adm-legacy button[style*="239,68,68"],
.adm-legacy button[title*="öschen"], .adm-legacy button[title*="ntfernen"] {
  background: var(--adm-danger-bg) !important; border-color: transparent !important; color: var(--adm-danger) !important;
}
.adm-legacy button[style*="#dc2626"]:hover, .adm-legacy button[title*="öschen"]:hover { filter: brightness(.96); }
/* Reine Text-/Symbolknöpfe (background:none) bleiben schlicht */
.adm-legacy button[style*="background:none"], .adm-legacy button[style*="background: none"] {
  background: transparent !important; border-color: transparent !important; min-height: 0;
  padding: 4px 6px !important; color: var(--adm-muted) !important;
}
.adm-legacy button[style*="background:none"]:hover { background: var(--adm-surface2) !important; color: var(--adm-text) !important; }

/* Karten / Abschnitte */
.adm-legacy div[style*="border:1px solid var(--stroke)"], .adm-legacy div[style*="border: 1px solid var(--stroke)"],
.adm-legacy div[style*="border:1.5px solid var(--stroke)"], .adm-legacy details[style*="border"] {
  background: var(--adm-surface) !important; border: 1px solid var(--adm-line) !important;
  border-radius: 12px !important; box-shadow: none !important;
}
.adm-legacy div[style*="background:var(--bg)"], .adm-legacy div[style*="background:rgba(0,0,0,.15)"],
.adm-legacy div[style*="background:rgba(0,0,0,.05)"], .adm-legacy div[style*="background:rgba(0,0,0,.06)"] {
  background: var(--adm-surface2) !important;
}
/* Hinweis-Kästen: einheitlich zart */
.adm-legacy div[style*="rgba(239,68,68,.06)"] { background: var(--adm-danger-bg) !important; border-color: var(--adm-danger-line) !important; border-radius: 12px !important; }
.adm-legacy div[style*="rgba(34,197,94,.06)"], .adm-legacy div[style*="rgba(16,185,129,.06)"] { background: var(--adm-surface) !important; border: 1px dashed var(--adm-line-strong) !important; border-radius: 12px !important; }
.adm-legacy div[style*="rgba(59,130,246,.08)"], .adm-legacy div[style*="rgba(59,130,246,.1)"] { background: var(--adm-blue-bg) !important; color: var(--adm-blue) !important; border-color: transparent !important; }
.adm-legacy div[style*="rgba(245,158,11,.08)"] { background: var(--adm-warn-bg) !important; border-color: var(--adm-warn-line) !important; }

/* Namens-Chips (Dienstgruppen): neutral statt knallrot */
.adm-legacy span[style*="background:var(--accent)"] {
  background: var(--adm-surface2) !important; color: var(--adm-text) !important;
  border: 1px solid var(--adm-line) !important; font-weight: 500;
}
.adm-legacy span[style*="background:var(--accent)"] button { color: var(--adm-muted) !important; padding: 0 2px !important; min-height: 0 !important; }

/* Schrift: kleine Beschriftungen lesbar, fette Titel ruhiger */
.adm-legacy [style*="font-size:0.58rem"], .adm-legacy [style*="font-size:0.6rem"],
.adm-legacy [style*="font-size:0.62rem"], .adm-legacy [style*="font-size:0.65rem"] {
  font-size: 11.5px !important; color: var(--adm-muted) !important; font-weight: 500 !important; letter-spacing: 0 !important;
}
.adm-legacy [style*="font-weight:800"], .adm-legacy [style*="font-weight: 800"],
.adm-legacy [style*="font-weight:900"] { font-weight: 650 !important; }
.adm-legacy [style*="text-transform:uppercase"] { letter-spacing: .06em !important; }

/* Protokoll- und Statistik-Zeilen */
.adm-legacy .admin-log-row { border-color: var(--adm-line) !important; }

/* ── Menü-Kacheln: Linkliste schwebt über dem Inhalt (statt das Raster
   aufzuschieben); Richtung/Höhe setzt setDropdownHeight() in app.js ── */
#category-grid > details.tile { position: relative; overflow: visible; }
#category-grid > details.tile[open] { z-index: 45; }
#category-grid > details.tile > .dropdown {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 6px);
  min-width: 260px; margin: 0; padding: 0 6px; gap: 1px;
  background: var(--adm-surface); border: 1px solid transparent; border-radius: 12px;
  overflow-y: auto; overscroll-behavior: contain; pointer-events: none;
  transition: opacity .15s ease;
}
#category-grid > details.tile[open] > .dropdown {
  padding: 6px; border-color: var(--adm-line); pointer-events: auto;
  box-shadow: 0 18px 44px rgba(15, 17, 21, .18), 0 2px 6px rgba(15, 17, 21, .06);
}
html.dark #category-grid > details.tile[open] > .dropdown { box-shadow: 0 18px 44px rgba(0, 0, 0, .5); }
#category-grid > details.tile.dd-up > .dropdown { top: auto; bottom: calc(100% + 6px); }
#category-grid .dropdown a {
  font-size: 13.5px; font-weight: 500; color: var(--adm-text);
  padding: 8px 10px; border-radius: 8px; border-left: 0; line-height: 1.3;
}
#category-grid .dropdown a::before { content: none; }
#category-grid .dropdown a:hover, html.dark #category-grid .dropdown a:hover {
  background: var(--adm-surface2); padding-left: 10px; color: var(--adm-text);
}
#category-grid .dropdown a:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: -2px; }
/* Tastatur-Fokus auf einer Menü-Kachel (summary sitzt im <details>-Kasten) */
#category-grid > details.tile > summary:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 4px; border-radius: 10px; }

/* ================================================================
   Dialoge im V9-Look: Anmeldung, Telefonliste, RTH-Alarmierung,
   Wecker-Alarm, PDF, Suchergebnisse. Viele davon haben Inline-Stile oder
   Regeln im <head> von Dashboard.html (nach v9.css) → per #id + !important.
   ================================================================ */
/* gemeinsamer Abdunkler */
#chat-login-overlay, #tel-modal-overlay, #rth-modal-overlay, #pdf-modal-overlay, #wecker-alarm-overlay {
  background: rgba(15, 17, 21, .5) !important;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}

/* ── Anmeldung ── */
#chat-login-overlay .chat-login-box {
  width: min(400px, 92vw); padding: 30px 28px 22px; gap: 14px;
  background: var(--adm-surface); color: var(--adm-text);
  border: 1px solid var(--adm-line); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15, 17, 21, .28);
}
#chat-login-overlay .login-logo-img { width: 76px; height: auto; filter: none; }
#chat-login-overlay .chat-login-title { font-size: 22px; font-weight: 700; letter-spacing: 0; color: var(--adm-text); }
#chat-login-overlay .chat-login-sub { font-size: 13px; color: var(--adm-muted); }
#chat-login-overlay .chat-login-input,
#chat-login-overlay .login-role-dropdown-toggle {
  height: 44px; padding: 0 14px; border-radius: 10px; text-align: left;
  font-size: 14px; font-weight: 500; color: var(--adm-text);
  background: var(--adm-surface); border: 1px solid var(--adm-line-strong); box-shadow: none;
}
#chat-login-overlay .chat-login-input:focus,
#chat-login-overlay .login-role-dropdown.open .login-role-dropdown-toggle {
  border-color: var(--adm-text); box-shadow: 0 0 0 3px var(--ring); outline: none;
}
#chat-login-overlay .chat-login-input::placeholder { color: var(--adm-muted); opacity: .8; }
#chat-login-overlay .login-role-label {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--adm-muted); margin: 4px 0 -4px;
}
#chat-login-overlay .login-role-dropdown-list {
  background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 17, 21, .18); padding: 6px;
}
#chat-login-overlay .login-role-btn {
  border-radius: 8px; border: 0; background: transparent; color: var(--adm-text);
  font-size: 14px; font-weight: 500; box-shadow: none;
}
#chat-login-overlay .login-role-btn:hover, #chat-login-overlay .login-role-btn.active,
#chat-login-overlay .login-role-btn.selected { background: var(--adm-surface2); transform: none; }
#chat-login-overlay .chat-login-btn {
  height: 46px; border-radius: 10px; border: 0; background: var(--adm-accent); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: 0; box-shadow: none; transition: background-color .12s;
}
#chat-login-overlay .chat-login-btn:hover { background: var(--adm-accent-hover); opacity: 1; transform: none; }
#chat-login-overlay .login-error { font-size: 13px; color: var(--adm-danger); }
#chat-login-overlay #forgot-password-link { color: var(--adm-muted) !important; font-size: 12.5px !important; }

/* ── Telefonliste ── */
#tel-modal-box {
  border-radius: 16px !important; border: 1px solid var(--adm-line);
  box-shadow: 0 30px 80px rgba(15, 17, 21, .3) !important; background: var(--adm-bg);
}
#tel-modal-header-bar { background: var(--adm-surface) !important; border-bottom-color: var(--adm-line) !important; padding: 14px 20px !important; }
#tel-modal-header-bar > span { font-size: 17px !important; font-weight: 650 !important; color: var(--adm-text) !important; }
#tel-modal-header-bar > button, #rth-modal-overlay button[onclick*="none"] {
  background: var(--adm-surface) !important; border: 1px solid var(--adm-line-strong) !important;
  color: var(--adm-text) !important; border-radius: 8px !important; font-size: 13px !important; font-weight: 600 !important;
  padding: 7px 14px !important;
}
#tel-modal-header-bar > button:hover, #rth-modal-overlay button[onclick*="none"]:hover { background: var(--adm-surface2) !important; }
#tel-modal-box > div:last-child { background: var(--adm-bg) !important; }
#tel-modal-box .phone-grid { gap: 16px; }
#tel-modal-box .phone-card {
  background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 14px;
  box-shadow: none; padding: 18px 20px;
}
#tel-modal-box .phone-card-title {
  font-size: 16px; font-weight: 650; color: var(--adm-text) !important;
  border-bottom: 1px solid var(--adm-line) !important; padding-bottom: 10px; margin-bottom: 8px;
}
#tel-modal-box .phone-card-title.fw::after, #tel-modal-box .phone-card-title.rd::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; margin-left: auto; background: var(--adm-accent);
}
#tel-modal-box .phone-card-title.rd::after { background: #1D4FB0; }
#tel-modal-box .phone-entry { border-radius: 10px; padding: 8px 10px; gap: 12px; }
#tel-modal-box .phone-entry:hover { background: var(--adm-surface2); }
#tel-modal-box .phone-entry-icon {
  width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--adm-surface2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; filter: grayscale(1); opacity: .75;
}
#tel-modal-box .phone-entry-label {
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--adm-muted); font-family: inherit;
}
#tel-modal-box .phone-entry-value { font-size: 15px; font-weight: 600; color: var(--adm-text); font-family: inherit; }
#tel-modal-box .phone-entry-value.number { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* ── RTH-Alarmierung ── */
#rth-modal-overlay > div {
  border-radius: 16px !important; border: 1px solid var(--adm-line);
  box-shadow: 0 30px 80px rgba(15, 17, 21, .3) !important;
}
#rth-modal-overlay > div > div:first-child { background: var(--adm-surface) !important; border-bottom-color: var(--adm-line) !important; }
#rth-modal-overlay > div > div:first-child > span { font-size: 17px !important; font-weight: 650 !important; color: var(--adm-text); }
#rth-modal-overlay > div > div:last-child { background: var(--adm-surface) !important; }
#rth-tool-container input:not([type=checkbox]) {
  height: 42px; border-radius: 10px; border: 1px solid var(--adm-line-strong); background: var(--adm-surface);
  color: var(--adm-text); font-size: 14px; padding: 0 14px; box-shadow: none;
}
#rth-tool-container input:focus { border-color: var(--adm-text); box-shadow: 0 0 0 3px var(--ring); outline: none; }

/* ── Wecker-Alarm: helle/dunkle Karte, Akzent statt Türkis ── */
#wecker-alarm-overlay .wecker-alarm-box {
  background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(15, 17, 21, .35); padding: 34px 44px 30px; min-width: 300px;
}
#wecker-alarm-overlay .wecker-alarm-ring {
  width: 72px; height: 72px; font-size: 30px; border: 0; background: var(--adm-accent-soft);
  animation: v9-ring 1.2s ease infinite;
}
@keyframes v9-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, .35); }
  50% { box-shadow: 0 0 0 14px rgba(217, 45, 32, 0); }
}
#wecker-alarm-overlay .wecker-alarm-title { color: var(--adm-text); font-size: 22px; font-weight: 700; }
#wecker-alarm-overlay .wecker-alarm-time { color: var(--adm-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; }
#wecker-alarm-overlay .wecker-alarm-ok {
  background: var(--adm-accent); border: 0; color: #fff; border-radius: 10px;
  padding: 12px 40px; font-size: 15px; font-weight: 600; letter-spacing: 0;
}
#wecker-alarm-overlay .wecker-alarm-ok:hover { background: var(--adm-accent-hover); color: #fff; }

/* ── PDF-Ansicht ── */
#pdf-modal-overlay .pdf-modal { border-radius: 16px; border: 1px solid var(--adm-line); background: var(--adm-surface); box-shadow: 0 30px 80px rgba(15, 17, 21, .3); }
#pdf-modal-overlay .pdf-modal-header { background: var(--adm-surface); border-bottom: 1px solid var(--adm-line); }
#pdf-modal-overlay .pdf-modal-title { font-size: 15px; font-weight: 650; color: var(--adm-text); }
#pdf-modal-overlay .pdf-modal-close {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--adm-line-strong);
  background: var(--adm-surface); color: var(--adm-text);
}

/* ── Suchergebnisse: breiter, ruhiger ── */
#search-results, html.dark #search-results { min-width: min(460px, 92vw); padding: 6px; max-height: min(70vh, 560px); }
#search-results .search-result-item {
  border-radius: 9px; padding: 9px 12px; font-size: 13.5px; color: var(--adm-text);
  border: 0; background: transparent; line-height: 1.45;
}
#search-results .search-result-item:hover { background: var(--adm-surface2); }
/* Ausgewählte Zeile (Pfeiltasten): muss NACH :hover stehen und die ID-Regel oben übertrumpfen,
   sonst bleibt die Auswahl unsichtbar (so war es nach dem V9-Umbau) */
#search-results .search-result-item.is-active,
#search-results .search-result-item.is-active:hover {
  background: var(--adm-accent-soft); box-shadow: inset 3px 0 0 var(--adm-accent);
}
#search-results .search-result-item.is-active .primary { color: var(--adm-accent-text); }
#search-results .search-result-item .primary { font-size: 14px; font-weight: 600; color: var(--adm-text); }
#search-results .search-result-item .secondary { font-size: 12.5px; color: var(--adm-muted); }

/* ── Notbetrieb: Hinweis unten, wenn der Server nicht erreichbar ist ── */
#offline-banner {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9500;
  display: flex; align-items: flex-start; gap: 10px; width: min(760px, calc(100vw - 32px)); box-sizing: border-box;
  padding: 12px 16px; border-radius: 12px; font-size: 13.5px; line-height: 1.45;
  background: var(--adm-warn-bg); color: var(--adm-warn); border: 1px solid var(--adm-warn-line);
  box-shadow: 0 16px 40px rgba(15, 17, 21, .18);
}
#offline-banner .ob-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #D97706; animation: ob-pulse 1.6s ease infinite; }
@keyframes ob-pulse { 50% { opacity: .35; } }
#chat-login-overlay .login-offline-btn {
  display: block; width: 100%; margin-top: 8px; height: 40px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--adm-warn-line); background: var(--adm-warn-bg); color: var(--adm-warn); font: inherit; font-weight: 600;
}
body.has-offline-banner { padding-bottom: 96px; }
/* Notbetrieb ohne Anmeldung: Chat nur lesen, Online-Spalte weg */
body.notstart .chat-input-row, body.notstart .chat-recipient-row, body.notstart #tile-online { display: none !important; }
body.notstart .chat-row { grid-template-columns: minmax(0, 1fr); }

/* ── Reanimations-Hilfe: Schritt für Schritt (Markup #reani-overlay, Logik rea-hilfe.js) ── */
#reani-overlay.rea-overlay {
  position: fixed; inset: 0; z-index: 7000; box-sizing: border-box; padding: 16px;
  background: rgba(15,17,21,.6); align-items: center; justify-content: center;
}
.rea-box {
  width: min(980px, 100%); max-height: 100%; display: flex; flex-direction: column; outline: none;
  background: var(--adm-bg); color: var(--adm-text); border: 1px solid var(--adm-line);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden;
}
.rea-box :focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.rea-head {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; background: var(--adm-surface); border-bottom: 1px solid var(--adm-line);
}
.rea-head-l, .rea-head-r { display: flex; align-items: center; gap: 12px; }
.rea-h1 { font-size: 17px; font-weight: 700; letter-spacing: .01em; line-height: 1.2; }
.rea-sub { font-size: 12px; color: var(--adm-muted); }
.rea-i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rea-i.big { width: 34px; height: 34px; }
.rea-heart { width: 28px; height: 28px; color: var(--adm-accent); }
.rea-body { padding: 14px 18px 16px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
/* Spalte statt Raster: ein Raster drückt Zeilen mit overflow:hidden auf 0 zusammen, sobald das Fenster höher ist als der Bildschirm */
.rea-body > * { flex-shrink: 0; }
.rea-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.rea-row.center { justify-content: center; margin-top: 4px; }
.rea-lbl { font-size: 12px; color: var(--adm-muted); }
.rea-lbl.center { text-align: center; margin-top: 6px; }
.rea-seg { display: inline-flex; border: 1px solid var(--adm-line-strong); border-radius: 10px; overflow: hidden; background: var(--adm-surface); align-self: start; justify-self: start; }
.rea-seg button {
  border: 0; background: transparent; color: var(--adm-text); height: 46px; padding: 0 16px; font: inherit; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.rea-seg.sm button { height: 34px; padding: 0 11px; font-size: 13px; }
.rea-seg button:hover { background: var(--adm-surface2); }
.rea-seg button[aria-pressed="true"] { background: var(--adm-text); color: var(--adm-surface); }
.rea-btn {
  height: 38px; border: 1px solid var(--adm-line-strong); background: var(--adm-surface); color: var(--adm-text); border-radius: 9px;
  padding: 0 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.rea-btn:hover { background: var(--adm-surface2); }
.rea-btn.grow { flex: 1; }
.rea-btn.primary { background: var(--adm-text); color: var(--adm-surface); border-color: transparent; }
.rea-btn.primary:hover { opacity: .9; }
.rea-btn[aria-pressed="true"] { background: var(--adm-blue-bg); color: var(--adm-blue); border-color: var(--adm-blue); }
.rea-btn.hl { border: 2px solid var(--adm-blue); }
.rea-grid { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 14px; align-items: start; }
.rea-card { background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 12px; padding: 12px 14px; }
.rea-side { display: flex; flex-direction: column; gap: 12px; }
.rea-clock { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rea-takt { border-top: 1px solid var(--adm-line); padding-top: 10px; }
.rea-beat {
  width: 104px; height: 104px; border-radius: 50%; margin: 8px auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid var(--adm-danger-line); background: var(--adm-danger-bg); color: var(--adm-danger);
  transition: transform .08s, background .08s, color .08s, border-color .08s;
}
.rea-beat-n { font-size: 32px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rea-beat-t { font-size: 12px; }
.rea-beat.on { transform: scale(1.1); background: var(--adm-accent); border-color: var(--adm-accent); color: #fff; }
.rea-beat.air { border-color: var(--adm-blue); background: var(--adm-blue-bg); color: var(--adm-blue); }
.rea-beat.air.on { background: var(--adm-blue); color: var(--adm-surface); }
.rea-beat.idle { border-color: var(--adm-line-strong); background: var(--adm-surface2); color: var(--adm-muted); }
.rea-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rea-stepno { display: flex; justify-content: space-between; font-size: 12px; color: var(--adm-muted); }
.rea-title { font-size: 27px; font-weight: 700; margin: 0; line-height: 1.2; }
.rea-stage { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 18px; align-items: start; }
.rea-stage.noimg { grid-template-columns: minmax(0, 1fr); }
.rea-say { border-left: 3px solid var(--adm-accent); border-radius: 0; padding: 4px 0 4px 14px; font-size: 20px; line-height: 1.5; font-weight: 500; margin: 2px 0 0; }
.rea-tip {
  background: var(--adm-warn-bg); border: 1px solid var(--adm-warn-line); color: var(--adm-warn); border-radius: 10px;
  padding: 8px 12px; font-size: 14.5px; display: flex; gap: 8px; align-items: flex-start; margin-top: 12px;
}
.rea-tip .rea-i { margin-top: 2px; }
.rea-fig { margin: 0; background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 14px; padding: 8px; text-align: center; }
.rea-fig[hidden] { display: none; }
.rea-fig img { width: 100%; height: auto; display: block; border-radius: 10px; background: #fff; }
.rea-cap { font-size: 12px; color: var(--adm-muted); margin-top: 6px; line-height: 1.35; }
.rea-cap:empty { display: none; }
.rea-tone { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.rea-tone button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--adm-line-strong); padding: 0; cursor: pointer; }
.rea-tone button[aria-pressed="true"] { outline: 2px solid var(--adm-text); outline-offset: 2px; }
@keyframes rea-bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.pushing .rea-img-push { animation: rea-bounce var(--rea-bt, 545ms) ease-in-out infinite; transform-origin: 50% 100%; }
.rea-dots { display: flex; gap: 7px; justify-content: center; align-items: center; margin-top: 4px; }
.rea-dots button { width: 11px; height: 11px; border-radius: 6px; border: 0; padding: 0; background: var(--adm-line-strong); cursor: pointer; }
.rea-dots button[aria-current="true"] { width: 30px; background: var(--adm-accent); }
.rea-nav { margin-top: 2px; }
.rea-nav .rea-btn { height: 52px; font-size: 17px; padding: 0 22px; }
.rea-atem { background: var(--adm-surface); border: 1px solid var(--adm-line); border-radius: 12px; }
.rea-atem { margin-top: 12px; }
.rea-atem[hidden] { display: none; }
.rea-atem-sum { padding: 11px 14px 4px; font-weight: 600; font-size: 14px; }
.rea-atem-in { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 4px 14px 14px; }
.rea-atem-l { display: flex; gap: 14px; align-items: center; }
.rea-atem-btn {
  width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--adm-blue); background: var(--adm-blue-bg); color: var(--adm-blue);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .1s;
}
.rea-atem-btn.tap { background: var(--adm-blue); color: var(--adm-surface); }
.rea-atem-f { font-size: 28px; font-weight: 700; line-height: 1.1; }
.rea-atem-f.ok { color: var(--adm-ok); } .rea-atem-f.warn { color: var(--adm-warn); } .rea-atem-f.danger { color: var(--adm-danger); }
.rea-ref { display: flex; gap: 8px; flex-wrap: wrap; }
.rea-refi { border-left: 3px solid var(--adm-line-strong); padding: 4px 12px; font-size: 12px; color: var(--adm-muted); display: flex; flex-direction: column; border-radius: 0; }
.rea-refi b { font-size: 17px; color: var(--adm-text); }
.rea-refi.ok { border-color: var(--adm-ok); } .rea-refi.warn { border-color: var(--adm-warn); } .rea-refi.danger { border-color: var(--adm-danger); }
.rea-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--adm-muted); }
@media (max-width: 700px) {
  .rea-grid, .rea-stage { grid-template-columns: minmax(0, 1fr); }
  .rea-fig { max-width: 260px; }
}

/* ── Wichtige Meldung (Banner für alle) + Schichtübergabe-Dialog (meldungen.js) ── */
.meldung-banner {
  display: flex; align-items: center; gap: 14px; margin: 12px 24px 0; padding: 12px 16px; border-radius: 12px;
  background: #1d4fb0; color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.meldung-banner[hidden] { display: none; }
.meldung-banner.warn { background: #b42318; animation: meldung-pulse 1.6s ease-in-out infinite; }
.meldung-tag { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 7px; background: rgba(255,255,255,.2); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.meldung-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: meldung-blink 1.2s ease-in-out infinite; }
.meldung-text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; line-height: 1.35; }
.meldung-track { display: inline-block; white-space: nowrap; }
.meldung-text.scroll .meldung-track { padding-left: 100%; padding-right: 4px; animation: meldung-scroll var(--mz-dur, 20s) linear infinite; }
.meldung-text.scroll:hover .meldung-track { animation-play-state: paused; }
.meldung-meta { flex: none; font-size: 12.5px; font-weight: 500; opacity: .9; white-space: nowrap; }
@keyframes meldung-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes meldung-blink { 50% { opacity: .25; } }
@keyframes meldung-pulse { 50% { box-shadow: 0 0 0 4px rgba(180,35,24,.35), 0 2px 10px rgba(0,0,0,.18); } }
@media (prefers-reduced-motion: reduce) {
  .meldung-banner.warn, .meldung-dot, .meldung-text.scroll .meldung-track { animation: none; }
  .meldung-text { white-space: normal; } .meldung-text.scroll .meldung-track { padding-left: 0; white-space: normal; }
}
.meldung-close {
  flex: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid currentColor; background: transparent;
  color: inherit; cursor: pointer; opacity: .8;
}
.meldung-close:hover { opacity: 1; }
.meldung-close:focus-visible, .mz-btn:focus-visible, .mz-seg button:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.meldung-banner.mz-prev { margin: 4px 0 0; font-size: 16px; animation: none; box-shadow: none; }
.meldung-banner.mz-prev .meldung-text { white-space: normal; }
@media (max-width: 760px) { .meldung-banner { margin: 10px 14px 0; font-size: 16px; } .meldung-meta { display: none; } }

.mz-modal { max-width: 520px; max-height: unset; }
.mz-modal.mz-wide { max-width: 680px; max-height: 90vh; }
.mz-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.mz-lbl { font-size: 12.5px; color: var(--adm-muted); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.mz-cnt { font-weight: 400; font-variant-numeric: tabular-nums; }
.mz-input {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 9px; font: inherit; font-size: 15px; resize: vertical;
  border: 1px solid var(--adm-line-strong); background: var(--adm-surface); color: var(--adm-text);
}
.mz-input:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 1px; }
.mz-sel { height: 40px; padding: 0 10px; resize: none; }
.mz-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-top: 4px; }
.mz-row > div { display: flex; flex-direction: column; gap: 4px; }
.mz-seg { display: inline-flex; border: 1px solid var(--adm-line-strong); border-radius: 9px; overflow: hidden; background: var(--adm-surface); }
.mz-seg button { border: 0; background: transparent; color: var(--adm-text); height: 40px; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mz-seg button:hover { background: var(--adm-surface2); }
.mz-seg button[aria-pressed="true"] { background: var(--adm-text); color: var(--adm-surface); }
.mz-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mz-btn {
  height: 40px; padding: 0 16px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--adm-line-strong); background: var(--adm-surface); color: var(--adm-text);
}
.mz-btn:hover { background: var(--adm-surface2); }
.mz-btn.primary { background: var(--adm-text); color: var(--adm-surface); border-color: transparent; }
.mz-btn.primary:hover { opacity: .9; }
.mz-btn.danger { color: var(--adm-danger); border-color: var(--adm-danger-line); }
.mz-btn[disabled] { opacity: .5; cursor: default; }
.mz-err { min-height: 18px; font-size: 13px; color: var(--adm-danger); }
.mz-empty { color: var(--adm-muted); font-size: 13px; padding: 6px 0; }

/* Ton-Schalter im Chat-Kopf, Fokus in der Schnellzugriff-Leiste */
.chat-sound-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--adm-line); background: var(--adm-surface);
  color: var(--adm-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.chat-sound-btn:hover { background: var(--adm-surface2); }
.chat-sound-btn.is-off { color: var(--adm-muted); position: relative; }
.chat-sound-btn.is-off::after { content: ""; position: absolute; width: 20px; height: 2px; background: currentColor; transform: rotate(-45deg); }
.chat-sound-btn:focus-visible, .quick-links-bar .quick-icon-btn:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }

/* ── Zwei-Faktor-Dialog (zweifaktor.js) ── */
.mfa-p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.mfa-p.muted { color: var(--adm-muted); font-size: 13.5px; }
.mfa-ok { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--adm-ok-bg); color: var(--adm-ok); font-weight: 700; font-size: 13px; }
.mfa-secret {
  font: 600 18px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; padding: 10px 12px; border-radius: 9px;
  background: var(--adm-surface2); border: 1px dashed var(--adm-line-strong); overflow-wrap: anywhere; user-select: all;
}
.mfa-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mfa-codes span {
  font: 600 16px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px 10px; border-radius: 8px; text-align: center;
  background: var(--adm-surface2); border: 1px solid var(--adm-line); user-select: all;
}
.mfa-warn { background: var(--adm-warn-bg); border: 1px solid var(--adm-warn-line); color: var(--adm-warn); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.mfa-link { font-size: 13.5px; color: var(--adm-blue); }
