/* AED-Check – Gestaltung nach Microsoft Fluent 2 in Rot und Weiß
   - Tokens nach Fluent 2: neutrale Flächen/Schrift/Konturen, Markenrampe aus der Hauptfarbe (theme.css: --red),
     Statusfarben (Erfolg, Warnung, Gefahr) nur für Zustände, Typo-Rampe (Caption … Title), Radien 2/4/6/8 px,
     Schatten 2/4/8/16/28/64 (Umgebungs- + Schlagschatten), Bewegung 100–200 ms mit Fluent-Kurven.
   - Symbole: Fluent UI System Icons (MIT, Microsoft) als SVG-Sprite (assets/img/icons.svg).
   - Hell/Dunkel: folgt dem Gerät; per Schalter überschreibbar (html[data-theme], assets/js/theme.js).
   - Status nie nur über Farbe: immer Symbol + Text. */

/* ---------------- Schrift: Segoe UI (Windows), System-Schrift (Apple), Roboto lokal (SIL OFL 1.1) als Rückfall ---------------- */
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/roboto-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/roboto-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/roboto-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/roboto-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/roboto-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/roboto-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------------- Design-Tokens (hell) ---------------- */
:root {
  /* Grundfarben (überschrieben durch theme.css aus den Einstellungen) */
  --red: #C8102E; --aed: #00A651;

  /* Marke (Rot) */
  --brand: var(--red);
  --brand-hover: color-mix(in srgb, var(--red) 86%, #000);
  --brand-pressed: color-mix(in srgb, var(--red) 68%, #000);
  --brand-fg: color-mix(in srgb, var(--red) 92%, #000);
  --brand-fg-hover: color-mix(in srgb, var(--red) 75%, #000);
  --brand-tint: color-mix(in srgb, var(--red) 7%, #fff);
  --brand-tint-2: color-mix(in srgb, var(--red) 14%, #fff);
  --on-brand: #FFFFFF;

  /* Neutral */
  --bg1: #FFFFFF; --bg2: #FAFAFA; --bg3: #F5F5F5; --bg4: #F0F0F0; --bg5: #EBEBEB; --bg6: #E6E6E6;
  --canvas: var(--bg2);
  --subtle-hover: #F5F5F5; --subtle-pressed: #E0E0E0; --subtle-selected: #EBEBEB;
  --fg1: #242424; --fg2: #424242; --fg3: #616161; --fg4: #707070; --fg-disabled: #BDBDBD;
  --stroke1: #D1D1D1; --stroke1-hover: #C7C7C7; --stroke2: #E0E0E0; --stroke3: #F0F0F0;
  --stroke-acc: #616161; --stroke-acc-hover: #575757;
  --focus1: #FFFFFF; --focus2: #000000;
  --inverted-bg: #292929; --inverted-fg: #FFFFFF;

  /* Status (nur für Zustände) */
  --ok-fg: #0E700E; --ok-bg: #F1FAF1; --ok-border: #9FD89F; --ok-strong: #107C10;
  --warn-fg: #BC4B09; --warn-bg: #FFF9F5; --warn-border: #FDCFB4; --warn-strong: #F7630C; --on-warn: #242424;
  --danger-fg: #B10E1C; --danger-bg: #FDF3F4; --danger-border: #EEACB2; --danger-strong: #C50F1F;
  --map-due: #DA3B01;

  /* Schatten */
  --sh2: 0 0 2px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.14);
  --sh4: 0 0 2px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.14);
  --sh8: 0 0 2px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.14);
  --sh16: 0 0 2px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.14);
  --sh28: 0 0 8px rgba(0,0,0,.12), 0 14px 28px rgba(0,0,0,.14);

  /* Form, Bewegung, Schrift */
  --r-s: 2px; --r-m: 4px; --r-l: 6px; --r-xl: 8px; --r-circ: 9999px;
  --dur-fast: 100ms; --dur: 150ms; --dur-slow: 200ms;
  --ease: cubic-bezier(.33, 0, .67, 1); --ease-decel: cubic-bezier(.1, .9, .2, 1);
  --font: 'Segoe UI Variable Text', 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
  --mono: Consolas, 'Cascadia Mono', ui-monospace, Menlo, 'Roboto Mono', monospace;
  --i-chev: var(--i-chev-l);
  color-scheme: light;
  /* Fluent-Symbole für Masken (MIT, Microsoft) */
  --i-info: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cpath d=%22M18 10a8 8 0 1 0-16 0 8 8 0 0 0 16 0M9.5 8.91a.5.5 0 0 1 1 0v4.69a.5.5 0 0 1-1 0V8.9m-.25-2.16a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0%22/%3E%3C/svg%3E");
  --i-ok: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cpath d=%22M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16m3.36 5.65a.5.5 0 0 0-.64-.06l-.07.06L9 11.3 7.35 9.65l-.07-.06a.5.5 0 0 0-.7.7l.07.07 2 2 .07.06c.17.11.4.11.56 0l.07-.06 4-4 .07-.08a.5.5 0 0 0-.06-.63%22/%3E%3C/svg%3E");
  --i-err: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cpath d=%22M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16m0 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5M10 6a.5.5 0 0 0-.5.41v4.68a.5.5 0 0 0 1 0V6.41A.5.5 0 0 0 10 6%22/%3E%3C/svg%3E");
  --i-warn: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cpath d=%22M7.37 3.56a3 3 0 0 1 5.26 0l5.5 10A3 3 0 0 1 15.5 18h-11a3 3 0 0 1-2.63-4.44zM10 12.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5m0-6.25a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 1 0V7a.5.5 0 0 0-.5-.5%22/%3E%3C/svg%3E");
  --i-ok16: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22%3E%3Cpath d=%22M1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8m9.85-1.15a.5.5 0 0 0-.7-.7l-2.9 2.9-1.4-1.4a.5.5 0 1 0-.7.7L6.9 10.1c.2.2.5.2.7 0z%22/%3E%3C/svg%3E");
  --i-warn16: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22%3E%3Cpath d=%22M5.82 2.28a2.5 2.5 0 0 1 4.36 0l4.5 8A2.5 2.5 0 0 1 12.5 14h-9a2.5 2.5 0 0 1-2.18-3.72zM8 9.5A.75.75 0 1 0 8 11a.75.75 0 0 0 0-1.5M8 5a.5.5 0 0 0-.5.5V8a.5.5 0 0 0 1 0V5.5A.5.5 0 0 0 8 5%22/%3E%3C/svg%3E");
  --i-err16: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22%3E%3Cpath d=%22M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1m0 9a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5m0-5.5a.5.5 0 0 0-.5.5v3.59a.5.5 0 0 0 1-.09V4.91A.5.5 0 0 0 8 4.5%22/%3E%3C/svg%3E");
  --i-out16: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22%3E%3Cpath d=%22M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M6.35 5.65 8 7.29l1.65-1.64a.5.5 0 0 1 .7.7L8.71 8l1.64 1.65a.5.5 0 0 1-.7.7L8 8.71l-1.65 1.64a.5.5 0 0 1-.7-.7L7.29 8 5.65 6.35a.5.5 0 1 1 .7-.7%22/%3E%3C/svg%3E");
  --i-heart16: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22%3E%3Cpath d=%22M7.54 3.95a3.25 3.25 0 0 0-4.6-.01 3.25 3.25 0 0 0 .02 4.6l4.7 4.7c.2.2.52.2.71 0l4.69-4.68a3.25 3.25 0 0 0-4.61-4.6l-.46.44z%22/%3E%3C/svg%3E");
  --i-dot16: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22%3E%3Cpath d=%22M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1%22/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cpath d=%22M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0%22/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22%3E%3Cpath d=%22M9.76 3.2c.3.29.32.76.04 1.06l-4.25 4.5a.75.75 0 0 1-1.08.02L2.22 6.53a.75.75 0 0 1 1.06-1.06l1.7 1.7L8.7 3.24a.75.75 0 0 1 1.06-.04%22/%3E%3C/svg%3E");
  --i-chevr: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cpath d=%22M7.65 4.15c.2-.2.5-.2.7 0l5.49 5.46c.21.22.21.57 0 .78l-5.49 5.47a.5.5 0 0 1-.7-.71L12.8 10 7.65 4.85a.5.5 0 0 1 0-.7%22/%3E%3C/svg%3E");
  --i-dismiss: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cpath d=%22m4.09 4.22.06-.07a.5.5 0 0 1 .63-.06l.07.06L10 9.29l5.15-5.14a.5.5 0 0 1 .63-.06l.07.06c.18.17.2.44.06.63l-.06.07L10.71 10l5.14 5.15c.18.17.2.44.06.63l-.06.07a.5.5 0 0 1-.63.06l-.07-.06L10 10.71l-5.15 5.14a.5.5 0 0 1-.63.06l-.07-.06a.5.5 0 0 1-.06-.63l.06-.07L9.29 10 4.15 4.85a.5.5 0 0 1-.06-.63l.06-.07z%22/%3E%3C/svg%3E");
  --i-chev-l: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Cpath fill=%22%23616161%22 d=%22M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0%22/%3E%3C/svg%3E");
  --i-chev-d: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Cpath fill=%22%23ADADAD%22 d=%22M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0%22/%3E%3C/svg%3E");
  --i-check-w: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22%3E%3Cpath fill=%22%23FFFFFF%22 d=%22M9.76 3.2c.3.29.32.76.04 1.06l-4.25 4.5a.75.75 0 0 1-1.08.02L2.22 6.53a.75.75 0 0 1 1.06-1.06l1.7 1.7L8.7 3.24a.75.75 0 0 1 1.06-.04%22/%3E%3C/svg%3E");
}

/* ---------------- Design-Tokens (dunkel) – Gerät oder Schalter ---------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-hover: color-mix(in srgb, var(--red) 82%, #fff);
    --brand-pressed: color-mix(in srgb, var(--red) 75%, #000);
    --brand-fg: color-mix(in srgb, var(--red) 42%, #fff);
    --brand-fg-hover: color-mix(in srgb, var(--red) 30%, #fff);
    --brand-tint: color-mix(in srgb, var(--red) 22%, #292929);
    --brand-tint-2: color-mix(in srgb, var(--red) 34%, #292929);
    --bg1: #292929; --bg2: #1F1F1F; --bg3: #141414; --bg4: #0A0A0A; --bg5: #000000; --bg6: #333333;
    --canvas: #1F1F1F;
    --subtle-hover: #383838; --subtle-pressed: #2E2E2E; --subtle-selected: #333333;
    --fg1: #FFFFFF; --fg2: #D6D6D6; --fg3: #ADADAD; --fg4: #999999; --fg-disabled: #5C5C5C;
    --stroke1: #666666; --stroke1-hover: #757575; --stroke2: #525252; --stroke3: #3D3D3D;
    --stroke-acc: #ADADAD; --stroke-acc-hover: #BDBDBD;
    --focus1: #000000; --focus2: #FFFFFF;
    --inverted-bg: #FFFFFF; --inverted-fg: #242424;
    --ok-fg: #54B054; --ok-bg: #052505; --ok-border: #107C10; --ok-strong: #107C10;
    --warn-fg: #FAA06B; --warn-bg: #4A1E04; --warn-border: #A33D07; --warn-strong: #F7630C;
    --danger-fg: #E37D80; --danger-bg: #3B0509; --danger-border: #8F1A24; --danger-strong: #C50F1F;
    --sh2: 0 0 2px rgba(0,0,0,.24), 0 1px 2px rgba(0,0,0,.28);
    --sh4: 0 0 2px rgba(0,0,0,.24), 0 2px 4px rgba(0,0,0,.28);
    --sh8: 0 0 2px rgba(0,0,0,.24), 0 4px 8px rgba(0,0,0,.28);
    --sh16: 0 0 2px rgba(0,0,0,.24), 0 8px 16px rgba(0,0,0,.28);
    --sh28: 0 0 8px rgba(0,0,0,.24), 0 14px 28px rgba(0,0,0,.28);
    --i-chev: var(--i-chev-d);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand-hover: color-mix(in srgb, var(--red) 82%, #fff);
  --brand-pressed: color-mix(in srgb, var(--red) 75%, #000);
  --brand-fg: color-mix(in srgb, var(--red) 42%, #fff);
  --brand-fg-hover: color-mix(in srgb, var(--red) 30%, #fff);
  --brand-tint: color-mix(in srgb, var(--red) 22%, #292929);
  --brand-tint-2: color-mix(in srgb, var(--red) 34%, #292929);
  --bg1: #292929; --bg2: #1F1F1F; --bg3: #141414; --bg4: #0A0A0A; --bg5: #000000; --bg6: #333333;
  --canvas: #1F1F1F;
  --subtle-hover: #383838; --subtle-pressed: #2E2E2E; --subtle-selected: #333333;
  --fg1: #FFFFFF; --fg2: #D6D6D6; --fg3: #ADADAD; --fg4: #999999; --fg-disabled: #5C5C5C;
  --stroke1: #666666; --stroke1-hover: #757575; --stroke2: #525252; --stroke3: #3D3D3D;
  --stroke-acc: #ADADAD; --stroke-acc-hover: #BDBDBD;
  --focus1: #000000; --focus2: #FFFFFF;
  --inverted-bg: #FFFFFF; --inverted-fg: #242424;
  --ok-fg: #54B054; --ok-bg: #052505; --ok-border: #107C10; --ok-strong: #107C10;
  --warn-fg: #FAA06B; --warn-bg: #4A1E04; --warn-border: #A33D07; --warn-strong: #F7630C;
  --danger-fg: #E37D80; --danger-bg: #3B0509; --danger-border: #8F1A24; --danger-strong: #C50F1F;
  --sh2: 0 0 2px rgba(0,0,0,.24), 0 1px 2px rgba(0,0,0,.28);
  --sh4: 0 0 2px rgba(0,0,0,.24), 0 2px 4px rgba(0,0,0,.28);
  --sh8: 0 0 2px rgba(0,0,0,.24), 0 4px 8px rgba(0,0,0,.28);
  --sh16: 0 0 2px rgba(0,0,0,.24), 0 8px 16px rgba(0,0,0,.28);
  --sh28: 0 0 8px rgba(0,0,0,.24), 0 14px 28px rgba(0,0,0,.28);
  --i-chev: var(--i-chev-d);
  color-scheme: dark;
}

/* ---------------- Grundlagen & Typo-Rampe ---------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 20px; background: var(--canvas); color: var(--fg1); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-fg); text-decoration: none; }
a:hover { color: var(--brand-fg-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1 { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0 0 12px; }            /* Title 3 */
h2 { font-size: 20px; line-height: 26px; font-weight: 600; margin: 24px 0 12px; }          /* Subtitle 1 */
h3 { font-size: 16px; line-height: 22px; font-weight: 600; margin: 20px 0 8px; }           /* Subtitle 2 */
.card > h2, .card h2.mt0, .card form > h2 { font-size: 16px; line-height: 22px; }           /* Kartenkopf: Subtitle 2 */
@media (max-width: 600px) { h1 { font-size: 20px; line-height: 26px; } }
p { margin: 0 0 12px; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus2); outline-offset: 1px; box-shadow: 0 0 0 1px var(--focus1); border-radius: var(--r-m); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus { position: fixed; left: 8px; top: 8px; width: auto; height: auto; clip: auto; z-index: 3000; background: var(--bg1); color: var(--fg1); padding: 8px 12px; box-shadow: var(--sh16); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--fg3); }
.small { font-size: 12px; line-height: 16px; }                                               /* Caption 1 */
td.small, .kv .small, .list-item .small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 12px; } .mt2 { margin-top: 24px; } .mb0 { margin-bottom: 0; }
.hidden { display: none !important; }
svg.ic { width: 20px; height: 20px; flex: none; fill: currentColor; vertical-align: middle; }
svg.ic.s16 { width: 16px; height: 16px; } svg.ic.s24 { width: 24px; height: 24px; }

/* ---------------- Kopfleiste (rot) ---------------- */
.topbar { background: var(--brand); color: var(--on-brand); position: sticky; top: 0; z-index: 1000; }
.topbar-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 16px; min-height: 48px; }
.admin-body .topbar-inner { max-width: none; padding: 0 12px 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-brand); text-decoration: none; font-size: 16px; line-height: 22px; font-weight: 600; min-width: 0; }
.brand:hover { color: var(--on-brand); text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .small { font-size: 14px; font-weight: 400; opacity: .9; margin-left: 4px; }
.topnav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.topnav a, .topnav button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--r-m); color: var(--on-brand); text-decoration: none; font: 400 14px/20px var(--font); background: transparent; border: 0; cursor: pointer; transition: background-color var(--dur) var(--ease); }
.topnav a:hover, .topnav button:hover { background: rgba(255,255,255,.14); color: var(--on-brand); text-decoration: none; }
.topnav a:active, .topnav button:active { background: rgba(255,255,255,.22); }
.topbar :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 1px #000; }
.topnav a[aria-current="page"] { font-weight: 600; box-shadow: inset 0 -2px 0 #FFFFFF; border-radius: 0; }
.topnav .cta { background: #FFFFFF; color: var(--red); font-weight: 600; }
.topnav .cta:hover { background: color-mix(in srgb, var(--red) 8%, #FFFFFF); color: var(--red); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-m); background: transparent; color: inherit; cursor: pointer; flex: none; transition: background-color var(--dur) var(--ease); }
.icon-btn:hover { background: var(--subtle-hover); }
.topbar .icon-btn { color: var(--on-brand); }
.topbar .icon-btn:hover { background: rgba(255,255,255,.14); }
.topbar .icon-btn:active { background: rgba(255,255,255,.22); }
.menu-toggle { display: none; margin-left: auto; }
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .topnav { display: none; position: absolute; top: 52px; left: 8px; right: 8px; background: var(--bg1); border-radius: var(--r-xl); box-shadow: var(--sh16); flex-direction: column; align-items: stretch; padding: 4px; }
  .topnav.open { display: flex; }
  .topnav a, .topnav button { color: var(--fg1); height: 40px; justify-content: flex-start; padding: 0 12px; }
  .topnav a:hover, .topnav button:hover { background: var(--subtle-hover); color: var(--fg1); }
  .topnav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); border-radius: var(--r-m); }
  .topnav .cta { background: var(--brand); color: var(--on-brand); justify-content: center; }
  .topnav .cta:hover { background: var(--brand-hover); color: var(--on-brand); }
  .topnav form { display: block; }
  .topnav form button { width: 100%; }
}
.emergency { background: var(--bg1); color: var(--fg2); border-bottom: 1px solid var(--stroke2); text-align: center; font-size: 12px; line-height: 16px; padding: 6px 12px; }
.emergency strong { color: var(--danger-strong); font-weight: 700; }

/* Backend-Kopfleiste: Konto-Bereich immer sichtbar, Navigationsschalter nur schmal */
.topnav.topnav-fixed { display: flex; position: static; flex-direction: row; background: transparent; box-shadow: none; padding: 0; margin-left: auto; flex-wrap: nowrap; }
.topnav.topnav-fixed a, .topnav.topnav-fixed button { color: var(--on-brand); height: 32px; padding: 0 8px; }
.topnav.topnav-fixed a:hover, .topnav.topnav-fixed button:hover { background: rgba(255,255,255,.14); color: var(--on-brand); }
.menu-toggle-admin { display: none; margin-left: -4px; }
@media (max-width: 900px) { .menu-toggle-admin { display: inline-flex; } }
@media (max-width: 640px) { .hide-sm { display: none; } }
.topnav .icon-btn { padding: 0; }

/* ---------------- Layout & Karten ---------------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.card { background: var(--bg1); border-radius: var(--r-xl); padding: 20px; margin-bottom: 16px; box-shadow: var(--sh4); }
@media (max-width: 600px) { .card { padding: 16px; } }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer { text-align: center; color: var(--fg3); font-size: 12px; line-height: 16px; padding: 24px 16px 48px; }
.footer a { color: var(--fg3); margin: 0 8px; }
.footer a:hover { color: var(--fg1); }

/* ---------------- Eingabefelder (Fluent Input/Select/Textarea) ---------------- */
label, .label { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--fg1); margin: 14px 0 4px; }
.field-hint { color: var(--fg3); font-size: 12px; line-height: 16px; margin: 4px 0 0; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=color]):not([type=range]), select, textarea {
  width: 100%; min-height: 32px; padding: 5px 10px; border: 1px solid var(--stroke1); border-bottom-color: var(--stroke-acc); border-radius: var(--r-m);
  font: 400 14px/20px var(--font); background: var(--bg1); color: var(--fg1);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease-decel);
}
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=color]):not([type=range]):hover, select:hover, textarea:hover { border-color: var(--stroke1-hover); border-bottom-color: var(--stroke-acc-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--brand) !important; box-shadow: inset 0 -1px 0 var(--brand); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
input:disabled, select:disabled, textarea:disabled { background: transparent; border-color: var(--stroke2); color: var(--fg-disabled); }
input::placeholder, textarea::placeholder { color: var(--fg4); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: var(--i-chev); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px 16px; cursor: pointer; }
select option { background: var(--bg1); color: var(--fg1); }
textarea { min-height: 88px; resize: vertical; padding-top: 6px; }
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=color]):not([type=range]), select, textarea { font-size: 16px; line-height: 22px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
}
input[type=file] { display: block; width: 100%; padding: 8px; border: 1px dashed var(--stroke1); border-radius: var(--r-m); background: var(--bg1); color: var(--fg3); font: 400 14px/20px var(--font); }
input[type=file]::file-selector-button { margin-right: 12px; height: 32px; padding: 0 12px; border: 1px solid var(--stroke1); border-radius: var(--r-m); background: var(--bg1); color: var(--fg1); font: 600 14px/20px var(--font); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--subtle-hover); border-color: var(--stroke1-hover); }
input[type=color] { width: 64px; height: 32px; padding: 2px; border: 1px solid var(--stroke1); border-radius: var(--r-m); background: var(--bg1); cursor: pointer; }
input[type=checkbox], input[type=radio] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 2px 0 0; flex: none; border: 1px solid var(--stroke-acc); background: transparent; cursor: pointer; display: inline-grid; place-content: center; vertical-align: -3px; transition: background-color var(--dur-fast) var(--ease); }
input[type=checkbox] { border-radius: var(--r-s); }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: var(--stroke-acc-hover); }
input[type=checkbox]:checked { background: var(--brand) var(--i-check-w) center / 12px 12px no-repeat; border-color: var(--brand); }
input[type=radio] { border-radius: 50%; }
input[type=radio]:checked { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 4px, transparent 4.5px); }
input[type=checkbox]:disabled, input[type=radio]:disabled { border-color: var(--fg-disabled); cursor: default; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--fg1); margin: 6px 0; padding: 6px 0; cursor: pointer; }
.check input { margin-top: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--stroke2); border-radius: var(--r-xl); padding: 8px 16px 16px; margin: 20px 0; }
legend { font-size: 14px; line-height: 20px; font-weight: 600; padding: 0 6px; color: var(--fg1); }
.req::after { content: " *"; color: var(--danger-fg); }

/* ---------------- Schaltflächen (Primary, Secondary, Subtle) ---------------- */
.btn {
  --c: var(--brand); --on: var(--on-brand); --hover: var(--brand-hover); --press: var(--brand-pressed); --b: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; min-width: 96px; padding: 5px 12px; border-radius: var(--r-m); border: 1px solid var(--b);
  background: var(--c); color: var(--on); font: 600 14px/20px var(--font);
  text-decoration: none; cursor: pointer; text-align: center; position: relative;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { background: var(--hover); color: var(--on); text-decoration: none; }
.btn:active { background: var(--press); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg3); border-color: var(--stroke2); color: var(--fg-disabled); cursor: default; }
.btn-green { --c: var(--ok-strong); --hover: color-mix(in srgb, var(--ok-strong) 86%, #000); --press: color-mix(in srgb, var(--ok-strong) 70%, #000); --on: #FFFFFF; }
.btn-secondary, .btn-dark { --c: var(--bg1); --on: var(--fg1); --hover: var(--subtle-hover); --press: var(--subtle-pressed); --b: var(--stroke1); }
.btn-secondary:hover, .btn-dark:hover { border-color: var(--stroke1-hover); }
.btn-ghost { --c: transparent; --on: var(--fg2); --hover: var(--subtle-hover); --press: var(--subtle-pressed); min-width: 0; padding: 5px 8px; font-weight: 400; }
.btn-ghost:hover { color: var(--fg1); }
.btn-small { min-height: 24px; min-width: 64px; padding: 1px 8px; font-size: 12px; line-height: 16px; border-radius: var(--r-s); }
.btn-ghost.btn-small { min-width: 0; padding: 2px 6px; font-size: 14px; line-height: 20px; }
.btn-block { width: 100%; min-height: 40px; font-size: 14px; padding: 8px 16px; }
.app-body .btn-block { min-height: 48px; font-size: 16px; line-height: 22px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.linklike { background: none; border: 0; color: var(--brand-fg); cursor: pointer; padding: 0; font: inherit; }
.linklike:hover { text-decoration: underline; color: var(--brand-fg-hover); }

/* ---------------- Hinweise (Fluent MessageBar) ---------------- */
.alert { --ic: var(--i-info); --icc: var(--fg3); display: flex; gap: 8px; align-items: flex-start; border-radius: var(--r-m); padding: 9px 12px; margin: 0 0 16px; background: var(--bg3); border: 1px solid var(--stroke2); color: var(--fg1); font-size: 14px; line-height: 20px; }
.alert::before { content: ""; flex: none; width: 20px; height: 20px; background: var(--icc); -webkit-mask: var(--ic) center / 20px 20px no-repeat; mask: var(--ic) center / 20px 20px no-repeat; }
.alert-success { --ic: var(--i-ok); --icc: var(--ok-fg); background: var(--ok-bg); border-color: var(--ok-border); }
.alert-error { --ic: var(--i-err); --icc: var(--danger-fg); background: var(--danger-bg); border-color: var(--danger-border); }
.alert-warn { --ic: var(--i-warn); --icc: var(--warn-fg); background: var(--warn-bg); border-color: var(--warn-border); }
.alert-info { --ic: var(--i-info); --icc: var(--fg3); background: var(--bg3); border-color: var(--stroke2); }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.card.alert-warn, .card.alert-info, .card.alert-error, .card.alert-success { display: block; box-shadow: none; padding: 16px 20px; border-radius: var(--r-xl); }
.card.alert-warn::before, .card.alert-info::before, .card.alert-error::before, .card.alert-success::before { display: none; }

/* ---------------- Status (Fluent Badge, getönt, mit Symbol) ---------------- */
.status { --ic: var(--i-dot16); display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 1px 8px 1px 5px; border-radius: var(--r-m); font: 600 12px/16px var(--font); white-space: nowrap; border: 1px solid var(--stroke2); background: var(--bg3); color: var(--fg2); vertical-align: middle; }
.status::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: var(--ic) center / 14px 14px no-repeat; mask: var(--ic) center / 14px 14px no-repeat; }
.st-ok { --ic: var(--i-ok16); background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-border); }
.st-due { --ic: var(--i-warn16); background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-border); }
.st-overdue { --ic: var(--i-warn16); background: var(--warn-strong); color: var(--on-warn); border-color: var(--warn-strong); }
.st-out { --ic: var(--i-out16); color: #FFFFFF; border-color: #424242; background: repeating-linear-gradient(45deg, #242424, #242424 6px, #424242 6px, #424242 12px); }
.st-defect { --ic: var(--i-err16); background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-border); }
.st-neutral { --ic: var(--i-dot16); background: var(--bg1); color: var(--fg2); border-color: var(--stroke1); }
.st-neutral::before { -webkit-mask-size: 8px 8px; mask-size: 8px 8px; }
.st-sponsor { --ic: var(--i-heart16); background: var(--brand-tint); color: var(--brand-fg); border-color: var(--brand-tint-2); }
.sev-critical { color: var(--danger-fg); font-weight: 600; }
.sev-limited { color: var(--warn-fg); font-weight: 600; }
.sev-minor { color: var(--fg3); font-weight: 600; }

/* ---------------- Tabellen & Listen (Fluent DataGrid) ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--stroke2); vertical-align: middle; }
th { font-weight: 600; color: var(--fg1); white-space: nowrap; }
tbody tr { transition: background-color var(--dur) var(--ease); }
tbody tr:hover td { background: var(--subtle-hover); }
td a strong { font-weight: 600; }
dl.kv { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 8px 16px; margin: 0; font-size: 14px; line-height: 20px; }
dl.kv dt { color: var(--fg3); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; color: var(--fg1); }
@media (max-width: 480px) { dl.kv { grid-template-columns: 1fr; gap: 2px 0; } dl.kv dd { margin-bottom: 8px; } }

/* ---------------- Karten (Leaflet) ---------------- */
.map { height: 62vh; min-height: 360px; border-radius: var(--r-xl); z-index: 1; background: var(--bg4); overflow: hidden; box-shadow: var(--sh4); }
.map-small { height: 300px; min-height: 240px; }
.map-legend { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 12px; line-height: 16px; color: var(--fg3); margin: 12px 0; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.aed-pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--aed); border: 3px solid #fff; box-shadow: var(--sh8); display: flex; align-items: center; justify-content: center; }
.aed-pin span { transform: rotate(45deg); color: #fff; font-weight: 700; font-size: 15px; line-height: 1; }
.aed-pin.out { background: repeating-linear-gradient(45deg, #242424, #242424 4px, #616161 4px, #616161 8px); }
.aed-pin.due { background: var(--map-due); }
.aed-pin.overdue { background: var(--map-due); border-color: #FDCFB4; }
.aed-pin.defect { background: var(--danger-strong); }
.aed-pin.sponsor { box-shadow: 0 0 0 3px var(--red), var(--sh8); }
.legend-pin { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--stroke1); }
.legend-ok { background: var(--aed); }
.legend-out { background: repeating-linear-gradient(45deg, #242424, #242424 3px, #616161 3px, #616161 6px); }
.legend-sponsor { background: var(--aed); box-shadow: 0 0 0 2px var(--red); }
.legend-due { background: var(--map-due); }
.legend-defect { background: var(--danger-strong); }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content-wrapper { border-radius: var(--r-xl); background: var(--bg1); color: var(--fg1); box-shadow: var(--sh16); }
.leaflet-popup-tip { background: var(--bg1); }
.leaflet-popup-content { font-size: 14px; line-height: 20px; margin: 12px 16px; }
.leaflet-popup-content strong { font-size: 16px; line-height: 22px; }
.leaflet-container a.btn { color: var(--on); }
.leaflet-control-attribution { font-size: 11px; }
.leaflet-bar { border-radius: var(--r-m) !important; overflow: hidden; box-shadow: var(--sh8) !important; border: 0 !important; }

/* ---------------- Startseite (öffentlich) ---------------- */
.hero { display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr; align-items: start; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.tile { display: flex; flex-direction: column; gap: 2px; background: var(--bg1); border-radius: var(--r-xl); box-shadow: var(--sh4); padding: 16px 16px 16px 60px; text-decoration: none; color: var(--fg3); margin-bottom: 12px; position: relative; font-size: 14px; line-height: 20px; transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.tile::before { content: "!"; position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: var(--r-m); display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--brand-tint); color: var(--brand-fg); }
.tile.green::before { content: "+"; background: var(--ok-bg); color: var(--ok-fg); }
.tile.dark::before { content: "♥"; background: var(--brand-tint); color: var(--brand-fg); }
.tile:hover { box-shadow: var(--sh8); color: var(--fg3); text-decoration: none; }
.tile strong { display: block; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--fg1); }

/* ---------------- Fotos ---------------- */
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos a, .photos .ph { display: block; width: 112px; height: 112px; border-radius: var(--r-xl); overflow: hidden; background: var(--bg4); position: relative; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph button { position: absolute; top: 4px; right: 4px; background: var(--inverted-bg); color: var(--inverted-fg); border: 0; border-radius: var(--r-m); width: 28px; height: 28px; font-size: 16px; cursor: pointer; box-shadow: var(--sh4); }

/* ---------------- Verlauf ---------------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 6px 0 12px 20px; border-left: 2px solid var(--stroke2); position: relative; margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--bg1); }
.timeline li.internal::before { background: var(--stroke-acc); }
.timeline .meta { font-size: 12px; line-height: 16px; color: var(--fg3); }
.timeline .body { white-space: pre-wrap; margin-top: 4px; font-size: 14px; line-height: 20px; }

/* ---------------- Backend: Navigation (Fluent Nav) ---------------- */
.admin-shell { display: grid; grid-template-columns: 264px 1fr; min-height: calc(100vh - 48px); }
.sidebar { background: var(--bg1); padding: 8px 8px 24px; border-right: 1px solid var(--stroke2); position: sticky; top: 48px; height: calc(100vh - 48px); overflow-y: auto; }
.sidebar a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: var(--r-m); color: var(--fg2); text-decoration: none; font: 400 14px/20px var(--font); position: relative; transition: background-color var(--dur) var(--ease); }
.sidebar a svg.ic { color: var(--fg2); }
.sidebar a svg.ic.f { display: none; }
.sidebar a:hover { background: var(--subtle-hover); color: var(--fg1); text-decoration: none; }
.sidebar a:active { background: var(--subtle-pressed); }
.sidebar a[aria-current="page"] { background: var(--subtle-selected); color: var(--fg1); font-weight: 600; }
.sidebar a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 18px; margin-top: -9px; border-radius: var(--r-circ); background: var(--brand); }
.sidebar a[aria-current="page"] svg.ic { color: var(--brand-fg); }
.sidebar a[aria-current="page"] svg.ic.r { display: none; }
.sidebar a[aria-current="page"] svg.ic.f { display: inline-block; }
.sidebar .sec { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--fg3); padding: 16px 10px 6px; }
.sidebar .sep { height: 1px; background: var(--stroke2); margin: 8px 4px; }
.badge { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-circ); background: var(--fg1); color: var(--bg1); font: 600 12px/16px var(--font); }
.badge.danger { background: var(--danger-strong); color: #FFFFFF; }
.badge.warn { background: var(--warn-strong); color: var(--on-warn); }
.badge.info { background: var(--bg5); color: var(--fg2); }
.badge.ok { background: var(--ok-strong); color: #FFFFFF; }
.admin-main { padding: 24px 32px 48px; min-width: 0; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--stroke2); box-shadow: var(--sh8); }
  .sidebar.open { display: block; }
  .admin-main { padding: 16px; }
}
.page-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 14px; line-height: 20px; color: var(--fg3); margin: -8px 0 8px; }
.breadcrumb a { color: var(--fg3); padding: 2px 4px; border-radius: var(--r-m); }
.breadcrumb a:hover { color: var(--fg1); background: var(--subtle-hover); text-decoration: none; }
.breadcrumb .sepc { width: 16px; height: 16px; background: var(--fg3); -webkit-mask: var(--i-chevr) center / 12px 12px no-repeat; mask: var(--i-chevr) center / 12px 12px no-repeat; }
.kpi { background: var(--bg1); color: var(--fg1); border-radius: var(--r-xl); padding: 16px 20px; box-shadow: var(--sh4); }
.kpi .v { font-size: 32px; line-height: 40px; font-weight: 600; color: var(--danger-fg); }   /* Title 1 */
.kpi .l { font-size: 14px; line-height: 20px; color: var(--fg2); }
.kpi.green .v { color: var(--ok-fg); }
.kpi.amber .v { color: var(--warn-fg); }
.kpi.dark .v { color: var(--fg1); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters > div { min-width: 170px; flex: 1; max-width: 280px; }
.filters label { margin-top: 0; }
.filters .check { margin: 0; padding: 6px 0; }
.filters.card { padding: 16px 20px; }
.tabs { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 1px solid var(--stroke2); margin-bottom: 20px; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 12px; text-decoration: none; color: var(--fg2); font: 400 14px/20px var(--font); position: relative; border-radius: var(--r-m) var(--r-m) 0 0; transition: color var(--dur) var(--ease); }
.tabs a:hover { color: var(--fg1); text-decoration: none; }
.tabs a:hover::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: var(--r-circ); background: var(--stroke1); }
.tabs a[aria-current="page"] { color: var(--fg1); font-weight: 600; }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: var(--r-circ); background: var(--brand); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(120px, 30%) 1fr 56px; gap: 12px; align-items: center; font-size: 14px; line-height: 20px; }
.bar .track { background: var(--bg5); border-radius: var(--r-circ); height: 8px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--brand); border-radius: var(--r-circ); }
.bar .fill.green { background: var(--ok-strong); } .bar .fill.amber { background: var(--warn-strong); } .bar .fill.dark { background: var(--fg3); }
.chart svg { width: 100%; height: auto; }
.chart .axis { stroke: var(--stroke2); } .chart text { fill: var(--fg3); font-size: 11px; font-family: var(--font); }
.chart .c1 { fill: var(--danger-strong); } .chart .c2 { fill: var(--ok-strong); }
.inline-form { display: inline; }
.qrbox svg { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: var(--r-xl); }
.code { font-family: var(--mono); background: var(--bg4); padding: 1px 6px; border-radius: var(--r-m); overflow-wrap: anywhere; font-size: .92em; }
.recovery { columns: 2; font-family: var(--mono); font-size: 16px; }
.pin-reveal { font-family: var(--mono); font-size: 28px; line-height: 36px; letter-spacing: .2em; font-weight: 600; }
.danger-zone { box-shadow: none; border: 1px solid var(--danger-border); background: var(--bg1); }
.legal h2 { font-size: 16px; line-height: 22px; }
.checklist-admin td input:not([type=checkbox]) { min-height: 32px; }
.checklist-admin td input + label + input, .checklist-admin td label + input + label + input { margin-top: 6px; }
.small-num { max-width: 90px; }

/* ---------------- Aufgaben (Backend-Start) ---------------- */
.taskstate { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--r-xl); margin-bottom: 16px; border: 1px solid; }
.taskstate .big { width: 40px; height: 40px; flex: none; background: currentColor; -webkit-mask: var(--ic) center / 40px 40px no-repeat; mask: var(--ic) center / 40px 40px no-repeat; }
.taskstate h2 { margin: 0; font-size: 20px; line-height: 26px; color: var(--fg1); }
.taskstate p { margin: 2px 0 0; color: var(--fg2); }
.taskstate.ok { --ic: var(--i-ok); background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-fg); }
.taskstate.todo { --ic: var(--i-warn); background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-fg); }
.taskstate.urgent { --ic: var(--i-err); background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-fg); }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li + li { border-top: 1px solid var(--stroke3); }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r-m); color: var(--fg1); text-decoration: none; transition: background-color var(--dur) var(--ease); }
.task:hover { background: var(--subtle-hover); color: var(--fg1); text-decoration: none; }
.task .tic { width: 36px; height: 36px; flex: none; border-radius: var(--r-l); display: inline-flex; align-items: center; justify-content: center; background: var(--bg3); color: var(--fg2); }
.task.urgent .tic { background: var(--danger-bg); color: var(--danger-fg); }
.task.todo .tic { background: var(--warn-bg); color: var(--warn-fg); }
.task .tt { flex: 1; min-width: 0; }
.task .tt strong { display: block; font-weight: 600; }
.task .tt span { display: block; font-size: 12px; line-height: 16px; color: var(--fg3); }
.task .badge { margin-left: 0; }
.task .chev { color: var(--fg3); }
.tasks-head { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.tasks-head h2 { margin: 0; }
.done-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.done-list li { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--fg3); padding: 2px 8px 2px 5px; border: 1px solid var(--stroke2); border-radius: var(--r-circ); }
.done-list li::before { content: ""; width: 14px; height: 14px; background: var(--ok-fg); -webkit-mask: var(--i-ok16) center / 14px 14px no-repeat; mask: var(--i-ok16) center / 14px 14px no-repeat; }

/* ---------------- Einstellungen: Übersicht (Hub) ---------------- */
.hub { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 24px; }
.hub-item { display: flex; gap: 12px; align-items: flex-start; background: var(--bg1); border-radius: var(--r-xl); box-shadow: var(--sh4); padding: 14px 16px; color: var(--fg1); text-decoration: none; transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.hub-item:hover { box-shadow: var(--sh8); background: var(--bg1); color: var(--fg1); text-decoration: none; }
.hub-item .tic { width: 36px; height: 36px; flex: none; border-radius: var(--r-l); display: inline-flex; align-items: center; justify-content: center; background: var(--brand-tint); color: var(--brand-fg); }
.hub-item strong { display: block; font-weight: 600; }
.hub-item .d { display: block; font-size: 12px; line-height: 16px; color: var(--fg3); margin-top: 2px; }
.hub-item .s { display: block; margin-top: 6px; }
.hub h2 { grid-column: 1 / -1; margin: 12px 0 0; font-size: 16px; line-height: 22px; }

/* ---------------- Darstellung hell/dunkel ---------------- */
.theme-switch { display: inline-flex; border: 1px solid var(--stroke1); border-radius: var(--r-m); overflow: hidden; }
.theme-switch label { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; font-weight: 400; cursor: pointer; border-right: 1px solid var(--stroke1); color: var(--fg1); background: var(--bg1); }
.theme-switch label:last-child { border-right: 0; }
.theme-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-switch label:hover { background: var(--subtle-hover); }
.theme-switch input:checked + span { font-weight: 600; }
.theme-switch label:has(input:checked) { background: var(--brand-tint); color: var(--brand-fg); }
.theme-switch label:has(input:focus-visible) { outline: 2px solid var(--focus2); outline-offset: -2px; }

/* ---------------- App (Prüfer) ---------------- */
.app-body { padding-bottom: 88px; font-size: 16px; line-height: 22px; }
.app-view { max-width: 720px; margin: 0 auto; padding: 16px 16px 24px; }
/* Tab-Leiste unten */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg1); border-top: 1px solid var(--stroke2); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 1100; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 60px; text-decoration: none; color: var(--fg3); font: 400 12px/16px var(--font); position: relative; transition: color var(--dur) var(--ease); }
.bottom-nav a svg.ic { width: 24px; height: 24px; }
.bottom-nav a svg.ic.f { display: none; }
.bottom-nav a:hover { color: var(--fg1); text-decoration: none; }
.bottom-nav a.active { color: var(--brand-fg); font-weight: 600; }
.bottom-nav a.active svg.ic.r { display: none; }
.bottom-nav a.active svg.ic.f { display: inline-block; }
.bottom-nav .dot { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--danger-strong); color: #fff; border-radius: var(--r-circ); font: 600 10px/16px var(--font); padding: 0 4px; min-width: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg1); }
/* Listen */
.list { list-style: none; padding: 0; margin: 0; }
.list-item { display: flex; gap: 12px; align-items: center; background: var(--bg1); border-radius: var(--r-xl); padding: 12px 16px; margin-bottom: 8px; text-decoration: none; color: var(--fg1); min-height: 68px; width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; box-shadow: var(--sh4); transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease); }
a.list-item:hover, button.list-item:hover { box-shadow: var(--sh8); color: var(--fg1); text-decoration: none; }
a.list-item:active, button.list-item:active { background: var(--subtle-hover); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-size: 16px; line-height: 22px; font-weight: 600; display: block; overflow-wrap: anywhere; }
.list-item .sub { color: var(--fg3); font-size: 14px; line-height: 20px; display: block; }
.list-item .chev { color: var(--fg3); font-size: 22px; }
ul.list > li.small { padding: 8px 0; border-bottom: 1px solid var(--stroke2); }
/* Umschaltgruppe */
.seg { display: flex; border: 1px solid var(--stroke1); border-radius: var(--r-m); overflow: hidden; margin-bottom: 16px; background: var(--bg1); }
.seg button { flex: 1; border: 0; border-right: 1px solid var(--stroke1); background: transparent; min-height: 40px; padding: 4px 8px; font: 400 14px/18px var(--font); color: var(--fg1); cursor: pointer; transition: background-color var(--dur) var(--ease); }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--subtle-hover); }
.seg button.on { background: var(--brand-tint); color: var(--brand-fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
@media (max-width: 400px) { .seg button { font-size: 13px; padding: 4px; } }
.sticky-actions { position: sticky; bottom: 76px; background: linear-gradient(transparent, var(--canvas) 35%); padding-top: 20px; margin-top: 12px; z-index: 5; }
/* Prüfpunkte */
.check-item { background: var(--bg1); border-radius: var(--r-xl); padding: 16px; margin-bottom: 12px; border: 1px solid transparent; box-shadow: var(--sh4); transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.check-item.ok { border-color: var(--ok-border); box-shadow: inset 4px 0 0 var(--ok-strong), var(--sh4); }
.check-item.nok { border-color: var(--danger-border); background: var(--danger-bg); box-shadow: inset 4px 0 0 var(--danger-strong), var(--sh4); }
.check-item .q { font-size: 16px; line-height: 22px; font-weight: 600; }
.check-item .help { color: var(--fg3); font-size: 14px; line-height: 20px; margin: 4px 0 12px; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yn button { min-height: 44px; border-radius: var(--r-m); border: 1px solid var(--stroke1); background: var(--bg1); font: 600 14px/20px var(--font); color: var(--fg1); cursor: pointer; transition: background-color var(--dur) var(--ease); }
.yn button:hover { background: var(--subtle-hover); border-color: var(--stroke1-hover); }
.yn button.sel-ok { background: var(--ok-strong); border-color: var(--ok-strong); color: #FFFFFF; }
.yn button.sel-nok { background: var(--danger-strong); border-color: var(--danger-strong); color: #FFFFFF; }
.defect-box { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--stroke2); }
.banner { --ic: var(--i-info); border-radius: var(--r-m); padding: 9px 12px; margin-bottom: 12px; font-size: 14px; line-height: 20px; font-weight: 600; display: flex; gap: 8px; align-items: center; border: 1px solid var(--stroke2); background: var(--bg3); color: var(--fg1); }
.banner::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--ic) center / 20px 20px no-repeat; mask: var(--ic) center / 20px 20px no-repeat; }
.banner.offline { background: var(--inverted-bg); color: var(--inverted-fg); border-color: var(--inverted-bg); }
.banner.queue { --ic: var(--i-warn); background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-border); }
.banner.ok { --ic: var(--i-ok); background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-border); }
.empty { text-align: center; color: var(--fg3); padding: 32px 16px; }
.big-icon { width: 64px; height: 64px; border-radius: var(--r-xl); display: flex; align-items: center; justify-content: center; font-size: 32px; line-height: 1; background: var(--ok-bg); color: var(--ok-fg); margin-bottom: 16px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
/* Hinweis unten (Fluent Toast) */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; background: var(--bg1); color: var(--fg1); padding: 12px 16px; border-radius: var(--r-m); z-index: 2000; box-shadow: var(--sh16); border: 1px solid var(--stroke2); max-width: min(560px, calc(100vw - 32px)); font-size: 14px; line-height: 20px; font-weight: 600; }
/* Fortschritt (Fluent Spinner) */
.spinner { width: 32px; height: 32px; border: 3px solid var(--bg5); border-top-color: var(--brand); border-radius: 50%; animation: spin 1.5s cubic-bezier(.53, .21, .29, .67) infinite; margin: 32px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } * { transition: none !important; } }
.app-header { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.app-header h1 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 600; }
.back { width: 40px; height: 40px; border-radius: var(--r-m); background: transparent; border: 0; font-size: 22px; color: var(--fg1); cursor: pointer; margin-left: -8px; transition: background-color var(--dur) var(--ease); }
.back:hover { background: var(--subtle-hover); }

/* ---------------- Balkenbreiten (Statistik, ohne Inline-Styles) ---------------- */
.fill.w0 { width: 0%; } .fill.w5 { width: 5%; } .fill.w10 { width: 10%; } .fill.w15 { width: 15%; } .fill.w20 { width: 20%; } .fill.w25 { width: 25%; } .fill.w30 { width: 30%; }
.fill.w35 { width: 35%; } .fill.w40 { width: 40%; } .fill.w45 { width: 45%; } .fill.w50 { width: 50%; } .fill.w55 { width: 55%; } .fill.w60 { width: 60%; } .fill.w65 { width: 65%; }
.fill.w70 { width: 70%; } .fill.w75 { width: 75%; } .fill.w80 { width: 80%; } .fill.w85 { width: 85%; } .fill.w90 { width: 90%; } .fill.w95 { width: 95%; } .fill.w100 { width: 100%; }

/* Automatische Vorprüfung (Betreiber-Meldungen) */
.precheck h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.checks { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.checks li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: var(--r-m); background: var(--bg3); border: 1px solid var(--stroke3); }
.checks .ico { flex: 0 0 20px; height: 20px; font-size: 0; background: var(--ok-fg); -webkit-mask: var(--i-ok) center / 20px 20px no-repeat; mask: var(--i-ok) center / 20px 20px no-repeat; }
.checks li.fail { background: var(--warn-bg); border-color: var(--warn-border); }
.checks li.fail .ico { background: var(--warn-fg); -webkit-mask-image: var(--i-err); mask-image: var(--i-err); }
.checks li.fail .muted { color: var(--fg2); }

@media print {
  .topbar, .sidebar, .bottom-nav, .btn, .footer, .emergency { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 1px solid #ccc; background: #fff; }
  .admin-shell { display: block; }
}
.topbar-tools { order: 3; display: flex; align-items: center; gap: 2px; margin-left: 4px; }
@media (max-width: 760px) { .topbar-tools { margin-left: auto; } }
.page-head .badge, .tasks-head .badge { margin-left: 0; }
.tasks-head h2 { display: inline-flex; align-items: center; gap: 8px; }
@media (hover: none) {
  .icon-btn:hover, .topbar .icon-btn:hover, .topnav a:hover, .topnav button:hover { background: transparent; }
  .icon-btn:active, .topbar .icon-btn:active { background: rgba(255,255,255,.22); }
}

/* Eigenes Logo (ab 1.4.1) – gleiche Darstellung wie auf der Vereinswebseite: weiße Kachel in der roten Leiste */
.brand-logo { display: grid; place-items: center; height: 40px; padding: 4px 8px; background: #FFFFFF; border-radius: var(--r-xl, 8px); flex: none; }
.brand-logo img { height: 30px; width: auto; display: block; }
.topbar.has-logo .topbar-inner { min-height: 60px; max-width: 1600px; padding: 0 max(3vw, 12px); gap: 12px; }
.admin-body .topbar.has-logo .topbar-inner { min-height: 48px; max-width: none; padding: 0 12px 0 16px; }
.admin-body .brand-logo { height: 34px; padding: 3px 7px; }
.admin-body .brand-logo img { height: 26px; }
.topnav .site-link { margin-right: 8px; }
@media (max-width: 760px) {
  .topbar.has-logo .topnav:not(.topnav-fixed) { top: 64px; }
  .topnav:not(.topnav-fixed) .site-link { margin: 0 0 4px; border-bottom: 1px solid var(--stroke2); border-radius: var(--r-m) var(--r-m) 0 0; }
}
.brand-preview { display: inline-flex; align-items: center; gap: 12px; padding: 8px; background: var(--brand); border-radius: var(--r-m); margin: 4px 0 8px; }
.brand-preview .check { color: var(--on-brand); margin: 0; }
