/* Kraeftiges Blau/Gelb fuer die "Ausweis"-Badge-Optik (Foto/QR-Bereich, Bottom-Nav) -- #2a5cb8 ist
   dasselbe kraeftige Blau, das im restlichen System bereits verwendet wird (Gelaende-Umriss/-Label
   in der Minimap und der Gelaendeuebersicht auf p2.rwsronin.de), nicht neu erfunden.
   Der HEADER dagegen nutzt bewusst --m2-header-blau (#1a3763) -- exakt dasselbe Navy wie der Header
   auf p2.rwsronin.de (.p2-header) und p2-terminal.rwsronin.de, damit die Kopfleiste ueberall gleich
   aussieht (kein eigener Blauton nur fuer myP2).
   Der Login-Bildschirm behaelt das bisherige Navy/Gold (nicht Teil dieses Umbaus). */
:root{ --m2-blau:#2a5cb8; --m2-header-blau:#1a3763; --m2-gelb:#f5d800; }

body{ margin:0; background:#f4f6f9; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; color:#1a3763; }

/* ── App-Rahmen (eingeloggt): Header oben fix, Inhalt scrollt dazwischen, Bottom-Nav fix unten --
   angelehnt an das ELD-Layout (Kopfleiste + Bottom-Nav). ─────────────────────────────────────── */
.m2-app{ min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }

.m2-header{
    flex:0 0 auto; background:var(--m2-header-blau); border-bottom:none;
    display:flex; align-items:baseline; justify-content:space-between; gap:10px;
    padding: calc(env(safe-area-inset-top, 0px) + 0.9rem) 1.2rem 0.9rem;
}
.m2-header-titel{ font-size:22.4px; font-weight:800; color:var(--m2-gelb); flex-shrink:0; }
/* Gleiche Zeile/Hoehe wie der Titel, rechtsbuendig -- selbe Gelb-Akzentfarbe statt Weiss, damit
   beide Header-Texte gleichwertig wirken. */
.m2-header-name{
    font-size:22.4px; font-weight:700; color:var(--m2-gelb); text-align:right;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;
}
.m2-header-rechts{ display:flex; align-items:center; gap:10px; min-width:0; flex:1 1 auto; justify-content:flex-end; }
/* Notfall-Button im Header bewusst kraeftig Rot -- immer sichtbar, unabhaengig vom aktiven Reiter. */
.m2-header-notfall{
    flex:0 0 auto; width:34px; height:34px; border-radius:50%; border:none; cursor:pointer;
    background:#a3372c; color:#fff; display:flex; align-items:center; justify-content:center;
}
.m2-header-notfall:active{ background:#832920; }
/* iRON-Rueckweg (USP-Kopplung) -- eigener, neutraler Farbton wie am Terminal (.topbar-btn-eld). */
.m2-header-iron{
    flex:0 0 auto; width:34px; height:34px; border-radius:50%; border:none; cursor:pointer;
    background:#2f4858; color:#fff; display:flex; align-items:center; justify-content:center;
}
.m2-header-iron:active{ background:#233742; }

.m2-content{ flex:1 1 auto; overflow-y:auto; max-width:460px; margin:0 auto; width:100%; box-sizing:border-box; padding:1.2rem 1.2rem calc(env(safe-area-inset-bottom, 0px) + 5.5rem); }

.m2-box{
    background:#fff; border-radius:12px; box-shadow:0 1px 3px rgba(26,55,99,.08);
    padding:1.3rem 1.4rem; margin-bottom:1rem;
}
.hint{ margin:0; color:#5b6b82; font-size:0.85rem; }
.m2-h2{ margin:0 0 0.8rem; font-size:0.95rem; color:#1a3763; }

/* ── Login-Screen: eigenstaendiges Vollbild-Layout (Handy-first), getrennt vom .m2-app-Layout
   der eingeloggten App-Ansicht -- Titel oben, Formular mittig, Button unten im Daumenbereich. */
.m2-login-screen{
    min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; box-sizing:border-box;
    padding:
        calc(env(safe-area-inset-top, 0px) + 2rem)
        calc(env(safe-area-inset-right, 0px) + 1.5rem)
        calc(env(safe-area-inset-bottom, 0px) + 1.5rem)
        calc(env(safe-area-inset-left, 0px) + 1.5rem);
}

.m2-login-top{ flex:1.1 1 0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.m2-login-titel{ margin:0; font-size:22.4px; font-weight:700; color:#1a3763; }

.m2-login-mitte{ flex:0 0 auto; width:100%; max-width:420px; margin:0 auto; }
.m2-login-mitte .m2-msg{ margin:0 0 1rem; }

.m2-login-form{ display:flex; flex-direction:column; gap:1.1rem; }
/* #m2SchrittLogin (Kennung+Passwort, von Anfang an sichtbar) und #m2SchrittRegistrierung (erscheint
   erst nach REGISTRIERUNG_NOETIG) sind direkte, per [hidden] ein-/ausgeblendete Kinder von
   .m2-login-form -- brauchen ihr eigenes Flex-Layout, damit die darin liegenden .m2-feld-Labels
   denselben Abstand bekommen. */
#m2SchrittLogin, #m2SchrittRegistrierung{ display:flex; flex-direction:column; gap:1.1rem; }
/* [hidden] MUSS hier explizit auf display:none gesetzt werden -- sonst gewinnt die eigene
   display:flex-Regel oben gegenueber dem User-Agent-Standard fuer [hidden] (bekanntes Muster in
   diesem Projekt, siehe z.B. .m2-msg/.m2-overlay an anderer Stelle). */
#m2SchrittLogin[hidden], #m2SchrittRegistrierung[hidden]{ display:none; }
.m2-registrierung-hint{ margin:0; font-size:0.85rem; color:#5b6b82; }
.m2-reg-name{
    text-align:center; font-size:1.2rem; font-weight:800; color:#1a3763;
    padding:0.6rem; background:#eef2f8; border-radius:10px;
}
.m2-reg-name[hidden]{ display:none; }

.m2-feld{ display:flex; flex-direction:column; gap:0.4rem; }
.m2-feld-label{ font-size:0.85rem; font-weight:600; color:#5b6b82; }
.m2-feld input{
    width:100%; box-sizing:border-box; min-height:48px; font-size:16px; font-family:inherit;
    color:#1a3763; border:1px solid #d5dce6; border-radius:8px; padding:0 0.9rem;
}
.m2-feld input:focus{ outline:none; border-color:#1a3763; }

.m2-passwort-wrap{ position:relative; display:block; }
.m2-passwort-wrap input{ padding-right:2.75rem; }
.m2-passwort-toggle{
    position:absolute; top:0; right:0; width:48px; height:48px;
    display:flex; align-items:center; justify-content:center;
    background:none; border:none; padding:0; color:#5b6b82; cursor:pointer;
}
.m2-passwort-toggle:focus-visible{ outline:2px solid #1a3763; outline-offset:-2px; border-radius:8px; }

.m2-checkbox{ display:flex; align-items:center; gap:0.6rem; font-size:0.88rem; color:#5b6b82; padding:0.4rem 0; }
.m2-checkbox input{ width:20px; height:20px; accent-color:#1a3763; }

.m2-login-unten{ flex:1 1 0; display:flex; align-items:flex-end; width:100%; max-width:420px; margin:0 auto; }

.m2-login-button{
    width:100%; min-height:52px; background:#1a3763; color:#f5d800; border:none;
    border-radius:999px; font-weight:700; font-size:1.05rem; cursor:pointer;
}
.m2-login-button:active{ opacity:0.9; }

.m2-msg{ font-size:0.85rem; padding:8px 12px; border-radius:8px; background:#fdeceb; color:#a3372c; margin:0.8rem 0; }
.m2-msg.ok{ background:#e8f7ee; color:#1c8a4f; }


.m2-panel[hidden]{ display:none; }

/* ── Kopf-Reihe: Foto links, QR+Kennung rechts -- beide Bloecke bewusst gleich gross/gleichgewichtig
   nebeneinander (nach Skizze), kein umrahmender Kasten mehr um den QR-Code. ────────────────────── */
.m2-kopf-row{ display:flex; gap:14px; margin-bottom:1rem; align-items:flex-start; }
.m2-foto-wrap{ position:relative; flex:1 1 0; min-width:0; aspect-ratio:1/1; }
.m2-foto[hidden], .m2-foto-platzhalter[hidden]{ display:none; }
.m2-foto, .m2-foto-platzhalter{
    width:100%; height:100%; border-radius:12px; object-fit:cover; display:flex;
    align-items:center; justify-content:center; background:var(--m2-blau); color:var(--m2-gelb);
    font-weight:800; font-size:2.6rem;
}
.m2-foto-upload-btn{
    position:absolute; bottom:-2px; right:-2px; width:32px; height:32px; border-radius:50%;
    background:var(--m2-gelb); display:flex; align-items:center; justify-content:center;
    font-size:1rem; cursor:pointer; border:2px solid #fff;
}
.m2-qr-wrap{
    flex:1 1 0; min-width:0; display:flex; flex-direction:column;
    align-items:center; justify-content:center; gap:6px;
}
/* QR-Code selbst etwas schmaler als die Spalte (statt 100%) -- QR + Kennung-Zahl darunter sollen
   ZUSAMMEN genauso hoch sein wie die Foto-Box daneben, nicht der QR allein schon so hoch wie das
   Foto plus die Zahl obendrauf. */
.m2-badge-qr{ line-height:0; width:82%; }
.m2-badge-qr img, .m2-badge-qr canvas{ width:100%; height:auto; max-width:100%; aspect-ratio:1/1; }
.m2-kennung-gross{ font-size:1.2rem; font-weight:800; color:var(--m2-blau); }

/* ── Info-Zeilen: Typ/Notiz/Status als Zeilen mit GLEICH BREITEM Label (feste Breite), damit die
   Werte rechts daneben alle an derselben Stelle linksbuendig beginnen. ─────────────────────────── */
.m2-info-liste{ display:flex; flex-direction:column; gap:6px; margin:0 0 1rem; }
.m2-info-zeile{ margin:0; display:flex; font-size:0.92rem; color:#1a3763; }
.m2-info-label{ flex:0 0 4.6rem; font-weight:700; }
.m2-info-wert{ flex:1 1 auto; text-align:left; }
.m2-info-wert .status-da{ color:#1c8a4f; font-weight:700; }
.m2-info-wert .status-pause_aktiv{ color:#8a6d00; font-weight:700; }
.m2-info-wert .status-gegangen{ color:#5b6b82; font-weight:700; }

/* ── Meine Besucher (Gastgeber-Ansicht, siehe m2-besucher.js) ────────────────────────────────────── */
.m2-besucher-liste{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.m2-besucher-liste li{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:0.5rem 0.6rem; background:#f7f9fc; border-radius:8px; font-size:0.82rem; }
.m2-besucher-name{ font-weight:700; color:#1a3763; }
.m2-besucher-zeit{ color:#a3372c; font-weight:600; }
.m2-besucher-liste .btn-secondary{ margin-left:auto; padding:0.4rem 0.8rem; font-size:0.78rem; }
.m2-besucher-feld{ display:block; font-size:0.85rem; color:#5b6b82; font-weight:600; margin-bottom:0.9rem; }
.m2-besucher-feld input{ width:100%; box-sizing:border-box; margin-top:6px; border:1px solid #d5dce6; border-radius:8px; padding:0.55rem 0.7rem; font-family:inherit; font-size:0.9rem; }

/* ── Minimap (jetzt frei zoom-/schwenkbar, siehe ladeMinimap() in myp2.js) ───────────────────── */
.m2-map-titel{ margin:0 0 0.6rem; font-weight:700; font-size:0.88rem; color:#1a3763; }
.m2-map-wrap{ position:relative; }
.m2-map{ height:240px; border-radius:8px; overflow:hidden; }
/* Kompass -- Leaflet dreht die Karte nie (immer Norden = oben), daher genuegt ein fest stehendes
   Symbol statt einer an die Kartenausrichtung gekoppelten Berechnung. */
.m2-kompass{
    position:absolute; top:10px; right:10px; z-index:401; width:34px; height:34px; border-radius:50%;
    background:rgba(255,255,255,.92); box-shadow:0 1px 4px rgba(0,0,0,.25);
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    font-size:0.6rem; font-weight:800; color:var(--m2-blau); line-height:1; pointer-events:none;
}
.m2-kompass span{ font-size:1rem; line-height:1; }

/* ── Tagesaktivitaeten ──────────────────────────────────────────────────── */
.m2-historie{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.m2-historie li{ display:flex; justify-content:space-between; font-size:0.85rem; border-bottom:1px solid #eef1f6; padding-bottom:6px; }
.m2-historie .h-aktion{ font-weight:700; color:#1a3763; }
.m2-historie .h-info{ color:#5b6b82; }

/* ── Bottom-Nav (Uebersicht/Tagesaktivitaeten/Scannen/Abmelden) ──────────────────────────────── */
.m2-bottom-nav{
    position:fixed; left:0; right:0; bottom:0; z-index:400;
    display:flex; background:#fff; border-top:1px solid #e2e7ee;
    padding: 0.5rem 0.4rem calc(env(safe-area-inset-bottom, 0px) + 0.5rem);
    box-shadow:0 -2px 10px rgba(26,55,99,.06);
}
.m2-nav-btn{
    flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
    background:none; border:none; color:#5b6b82; font-size:0.68rem; font-weight:600; padding:0.3rem 0; cursor:pointer;
}
.m2-nav-btn svg{ display:block; }
.m2-nav-btn.active{ color:var(--m2-blau); }
.m2-nav-btn-logout{ color:#a3372c; }

/* ── Scan-Overlay ───────────────────────────────────────────────────────── */
.m2-overlay{
    position:fixed; inset:0; background:rgba(26,55,99,.5); z-index:500;
    display:flex; align-items:flex-start; justify-content:center; padding:1.2rem; overflow-y:auto;
}
.m2-overlay[hidden]{ display:none; }
.m2-overlay-box{
    background:#fff; border-radius:12px; padding:1.3rem 1.4rem; max-width:460px; width:100%;
    box-shadow:0 10px 30px rgba(0,0,0,.25); margin-top:1.5rem;
}
#m2Reader, #m2FsReader{ width:100%; border-radius:10px; overflow:hidden; margin-bottom:0.8rem; }

/* ── Alarm-Banner (Notfall-Ton laeuft) -- absichtlich ueber ALLEM, pulsierend rot statt der ueblichen
   navy-Overlays, analog zum Terminal-Kiosk (siehe dortige index.css). Siehe starteAlarm()/
   stoppeAlarm() in myp2.js. ──────────────────────────────────────────────────────────────────── */
.m2-alarm-banner{
    position:fixed; inset:0; z-index:9999; background:#a3372c;
    display:flex; align-items:center; justify-content:center; padding:20px;
    animation:m2-alarm-banner-puls 1s ease-in-out infinite;
}
.m2-alarm-banner[hidden]{ display:none; }
@keyframes m2-alarm-banner-puls{ 0%, 100% { background:#a3372c; } 50% { background:#7a2820; } }
.m2-alarm-banner-inhalt{ text-align:center; }
.m2-alarm-banner-titel{ margin:0 0 20px; color:#fff; font-size:clamp(26px, 8vw, 40px); font-weight:800; }
.m2-alarm-banner-fehler{ margin:0 0 20px; color:#ffe8b0; font-size:15px; font-weight:600; max-width:420px; }
.m2-alarm-beenden-btn{
    border:none; border-radius:999px; padding:16px 36px; font-weight:800; font-size:18px; cursor:pointer;
    background:#ffffff; color:#a3372c;
}

/* Einsatzleiter/Vertreter: Alarm beenden -- bewusst ein kleiner FESTER BANNER statt Vollbild-Overlay
   (anders als .m2-alarm-banner oben), damit die App waehrenddessen normal nutzbar bleibt (Absprache
   mit dem User, analog zur Office-Vorgabe "es darf im office also nur ein popup sein"). */
.m2-evak-beenden-banner{
    position:fixed; left:0; right:0; bottom:0; z-index:900; background:#a3372c; color:#fff;
    padding:12px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px;
    flex-wrap:wrap; box-shadow:0 -4px 16px rgba(0,0,0,.25);
}
.m2-evak-beenden-banner[hidden]{ display:none; }
.m2-evak-beenden-titel{ margin:0; font-weight:800; font-size:0.95rem; }
.m2-evak-beenden-banner .hint{ margin:2px 0 0; color:#ffd9d4; font-size:0.8rem; }
.m2-evak-beenden-btn{
    border:none; border-radius:999px; padding:10px 20px; font-weight:800; font-size:0.9rem; cursor:pointer;
    background:#fff; color:#a3372c; flex-shrink:0;
}

.m2-gehen-box{ background:#fff7e6; border:1px solid #f0d999; border-radius:8px; padding:12px; margin:0.8rem 0; }
.m2-gehen-box p{ margin:0 0 10px; font-weight:700; }
.m2-gehen-row{ display:flex; gap:10px; }
.m2-gehen-row button{ flex:1; }

/* ── Fremdscan: QR/Ausweis scannen vs. Person suchen (Absprache mit dem User: "der Besucher kann
   auch nur seine Kennung wissen oder Namen") -- Tab-Optik 1:1 wie .m2-info-tabs. ─────────────────── */
.m2-fs-tabs{ display:flex; gap:6px; margin-bottom:0.9rem; }
.m2-fs-tab{
    flex:1; border:1px solid #d5dce6; background:#f0f3f8; color:#5b6b82;
    border-radius:8px; padding:8px 10px; font-weight:700; font-size:0.85rem; cursor:pointer;
}
.m2-fs-tab.active{ background:var(--m2-blau); color:var(--m2-gelb); border-color:var(--m2-blau); }
.m2-fs-suche-input{
    width:100%; box-sizing:border-box; border:1px solid #d5dce6; border-radius:8px;
    padding:0.65rem 0.8rem; font-size:0.95rem; font-family:inherit; color:#1a3763; margin-bottom:0.6rem;
}
.m2-fs-suche-liste{ list-style:none; margin:0; padding:0; max-height:280px; overflow-y:auto; }
.m2-fs-suche-treffer{
    display:flex; justify-content:space-between; align-items:center; gap:10px;
    padding:10px 8px; border-bottom:1px solid #eef1f6; cursor:pointer;
}
.m2-fs-suche-treffer:active{ background:rgba(26,55,99,.08); }
.m2-fs-suche-name{ font-weight:700; color:#1a3763; }
.m2-fs-suche-kennung{ font-size:0.78rem; color:#8a97ab; white-space:nowrap; }
.m2-fs-suche-leer{ text-align:center; color:#8a97ab; font-style:italic; padding:1rem 0; }

.btn-primary, .btn-secondary{
    border:none; border-radius:999px; padding:0.65rem 1.3rem; font-weight:700; cursor:pointer; font-size:0.92rem; width:100%;
}
.btn-primary{ background:var(--m2-blau); color:var(--m2-gelb); }
.btn-secondary{ background:#eef1f6; color:var(--m2-blau); }

/* ── Nav-Badge (Anzahl unbestaetigter DN auf dem Info-Button) ────────────────────────────────── */
.m2-nav-badge{
    position:absolute; top:2px; right:calc(50% - 20px); min-width:16px; height:16px; padding:0 4px;
    border-radius:999px; background:#a3372c; color:#fff; font-size:0.62rem; font-weight:800;
    line-height:16px; text-align:center;
}
.m2-nav-badge[hidden]{ display:none; }
.m2-nav-btn{ position:relative; }

/* ── Info-Reiter: normaler .m2-panel wie Uebersicht/Tagesaktivitaeten (gemeinsamer App-Header +
   Bottom-Nav bleiben sichtbar, kein eigenes Vollbild-Overlay) -- Layout/Padding kommt daher von
   .m2-content, hier nur noch die Sub-Reiter "Nachrichten/Infos/Profil" darunter. ────────────────── */
.m2-info-tabs{ display:flex; gap:6px; margin-bottom:1rem; }
.m2-info-tab{
    flex:1; border:1px solid #d5dce6; background:#f0f3f8; color:#5b6b82;
    border-radius:8px; padding:8px 10px; font-weight:700; font-size:0.85rem; cursor:pointer;
}
.m2-info-tab.active{ background:var(--m2-blau); color:var(--m2-gelb); border-color:var(--m2-blau); }
.m2-info-panel[hidden]{ display:none; }

/* ── Profil-Tab ───────────────────────────────────────────────────────────────────────────────── */
.m2-profil-kopf{ display:flex; align-items:center; gap:14px; margin-bottom:1.2rem; }
.m2-profil-foto-wrap{ position:relative; width:72px; height:72px; flex:0 0 auto; }
.m2-profil-foto, .m2-profil-foto-platzhalter{
    width:72px; height:72px; border-radius:50%; object-fit:cover; display:flex;
    align-items:center; justify-content:center; background:var(--m2-blau); color:var(--m2-gelb);
    font-weight:800; font-size:1.6rem;
}
.m2-profil-foto[hidden], .m2-profil-foto-platzhalter[hidden]{ display:none; }
.m2-profil-foto-upload-btn{
    position:absolute; bottom:-2px; right:-2px; width:28px; height:28px; border-radius:50%;
    background:var(--m2-gelb); display:flex; align-items:center; justify-content:center;
    font-size:0.9rem; cursor:pointer; border:2px solid #fff;
}
.m2-profil-name{ font-size:1.1rem; font-weight:800; color:#1a3763; }

.m2-profil-feld{ display:flex; flex-direction:column; gap:0.4rem; margin-bottom:1rem; }
.m2-profil-feld span{ font-size:0.85rem; font-weight:600; color:#5b6b82; }
.m2-profil-feld input{
    width:100%; box-sizing:border-box; min-height:44px; font-size:16px; font-family:inherit;
    color:#1a3763; border:1px solid #d5dce6; border-radius:8px; padding:0 0.9rem;
}
.m2-profil-feld input:focus{ outline:none; border-color:#1a3763; }
.m2-profil-feld select{
    width:100%; box-sizing:border-box; min-height:44px; font-size:16px; font-family:inherit;
    color:#1a3763; border:1px solid #d5dce6; border-radius:8px; padding:0 0.9rem; background:#fff;
}
.m2-profil-feld select:focus{ outline:none; border-color:#1a3763; }

.m2-msg-inline{ font-size:0.85rem; padding:8px 12px; border-radius:8px; margin:0 0 0.8rem; }
.m2-msg-inline.ok{ background:#e8f7ee; color:#1c8a4f; }
.m2-msg-inline.error{ background:#fdeceb; color:#a3372c; }

/* ── Notfall melden (Overlay) ─────────────────────────────────────────────────────────────────── */
.m2-notfall-kategorie-row{ display:flex; flex-direction:column; gap:10px; margin:0.4rem 0 1rem; }
.m2-btn-notfall-kategorie{
    border:none; border-radius:999px; padding:0.85rem 1.2rem; font-weight:800; cursor:pointer; font-size:1rem;
    background:#a3372c; color:#fff; width:100%;
}
.m2-btn-notfall-kategorie:active{ background:#832920; }
.m2-btn-notfall-kategorie:disabled{ opacity:.5; cursor:not-allowed; }

/* ── Evakuierung ────────────────────────────────────────────────────────────────────────────────── */
.m2-evak-sektion{ margin-top:1rem; padding-top:1rem; border-top:1px solid #eef1f6; }
.m2-evak-halten-btn{
    position:relative; overflow:hidden; width:100%; border:none; border-radius:999px;
    background:#a3372c; color:#fff; font-weight:800; font-size:1rem; padding:0.9rem 1.2rem; cursor:pointer;
    -webkit-user-select:none; user-select:none; touch-action:none;
}
.m2-evak-halten-btn.haelt{ background:#7a2620; }
.m2-evak-halten-fuellung{ position:absolute; inset:0; width:0%; background:rgba(255,255,255,.28); pointer-events:none; }
.m2-evak-halten-label{ position:relative; }

.m2-evak-alarm-overlay{
    position:fixed; inset:0; z-index:10000; background:#a3372c; color:#fff;
    display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
    padding:24px; animation:m2-evak-alarm-puls 1.4s ease-in-out infinite;
}
.m2-evak-alarm-overlay[hidden]{ display:none; }
@keyframes m2-evak-alarm-puls{ 0%,100%{ background:#a3372c; } 50%{ background:#7a2620; } }
.m2-evak-alarm-badge{ font-size:0.95rem; font-weight:800; letter-spacing:.1em; margin:0 0 10px; }
.m2-evak-alarm-overlay h1{ font-size:clamp(1.4rem, 7vw, 2.2rem); font-weight:800; margin:0 0 16px; }
.m2-evak-alarm-ziel{ font-size:clamp(1rem, 4.5vw, 1.3rem); font-weight:700; max-width:90vw; }
.m2-evak-alarm-karte{ width:min(90vw, 420px); height:260px; border-radius:12px; overflow:hidden; margin-top:1.2rem; }
.m2-evak-alarm-karte[hidden]{ display:none; }

.m2-profil-liste{ margin-top:1.4rem; padding-top:1rem; border-top:1px solid #eef1f6; display:flex; flex-direction:column; gap:6px; }

.m2-speedy-bereich{ margin-top:1.4rem; padding-top:1rem; border-top:1px solid #eef1f6; display:flex; flex-direction:column; gap:6px; }
.m2-speedy-label{ font-size:0.78rem; font-weight:700; color:#5b6b82; text-transform:uppercase; letter-spacing:.03em; }
.m2-speedy-wert{ font-size:1.3rem; font-weight:700; color:var(--m2-blau); letter-spacing:.04em; font-family:ui-monospace, "Courier New", monospace; }
.m2-speedy-bereich .btn-secondary{ align-self:flex-start; margin-top:4px; }

.m2-dn-liste{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; max-height:50vh; overflow-y:auto; }
.m2-dn-eintrag{ border-left:4px solid var(--m2-blau); background:#f7f9fc; border-radius:6px; padding:0.6rem 0.7rem; }
.m2-dn-eintrag.m2-dn-prio-dringend{ border-left-color:#d4a017; }
.m2-dn-eintrag.m2-dn-prio-notfall{ border-left-color:#a3372c; }
.m2-dn-eintrag-kopf{ font-weight:700; font-size:0.85rem; color:#1a3763; margin-bottom:3px; }
.m2-dn-eintrag-text{ font-size:0.85rem; color:#5b6b82; white-space:pre-wrap; }

/* ── Aufgaben-Tab -- gleiche Karten-Optik wie DN oben, aber ZWEIWEG: erledigte Eintraege werden
   gedimmt statt entfernt (Historie bleibt sichtbar), ueberfaellige offene rot markiert. ───────────── */
.m2-aufgaben-liste{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; max-height:60vh; overflow-y:auto; }
.m2-aufgabe-eintrag{ border-left:4px solid var(--m2-blau); background:#f7f9fc; border-radius:6px; padding:0.6rem 0.7rem; }
.m2-aufgabe-eintrag.m2-aufgabe-erledigt{ border-left-color:#1c8a4f; opacity:0.75; }
.m2-aufgabe-eintrag.m2-aufgabe-ueberfaellig{ border-left-color:#a3372c; }
.m2-aufgabe-kopf{ font-weight:700; font-size:0.85rem; color:#1a3763; margin-bottom:3px; }
.m2-aufgabe-text{ font-size:0.85rem; color:#5b6b82; white-space:pre-wrap; margin-bottom:4px; }
.m2-aufgabe-von{ margin-bottom:4px; }
.m2-aufgabe-rueckmeldung-anzeige{ font-size:0.82rem; color:#1a3763; background:#eef1f6; border-radius:6px; padding:0.4rem 0.6rem; margin-bottom:4px; }
.m2-aufgabe-anhang-btn{
    display:block; border:none; background:none; color:#2a5cb8; font-size:0.8rem; font-weight:700;
    cursor:pointer; padding:2px 0; margin-bottom:4px;
}
.m2-aufgabe-anhang-liste{ font-size:0.8rem; margin-bottom:6px; }
.m2-aufgabe-anhang-link{ color:#1a3763; font-weight:600; }
.m2-aufgabe-erledigt-btn{
    border:none; border-radius:999px; padding:6px 14px; font-weight:700; font-size:0.8rem; cursor:pointer;
    background:var(--m2-blau); color:var(--m2-gelb);
}
.m2-aufgabe-erledigt-form{ margin-top:6px; display:flex; flex-direction:column; gap:6px; }
.m2-aufgabe-rueckmeldung{
    border:1px solid #d5dce6; border-radius:6px; padding:0.5rem 0.6rem; font-family:inherit; font-size:0.85rem; resize:vertical;
}
.m2-aufgabe-erledigt-row{ display:flex; gap:8px; }
.m2-aufgabe-erledigt-row button{ flex:1; border:none; border-radius:999px; padding:0.5rem 0.8rem; font-weight:700; font-size:0.8rem; cursor:pointer; }
.m2-aufgabe-erledigt-msg{ color:#a3372c; }

.m2-regeln-text{ margin:0; font-size:0.88rem; color:#1a3763; white-space:pre-wrap; line-height:1.5; }

/* ── Notfallrufnummern (Infos-Tab) -- direkt antippbar (tel:), da im Ernstfall aus myP2 angerufen
   werden koennen muss (Terminal zeigt dieselbe Liste nur an, ohne Link). ───────────────────────── */
.m2-rufnummern-liste{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.m2-rufnummern-liste li{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    background:#f0f3f8; border-radius:8px; padding:0.5rem 0.8rem;
}
.m2-rn-bezeichnung{ font-size:0.88rem; font-weight:700; color:#1a3763; }
.m2-rn-nummer{ font-size:0.9rem; font-weight:800; color:#1a3763; text-decoration:none; }
.m2-rn-nummer:active{ opacity:0.7; }

/* ── PWA-Tipp: bewusst zurueckhaltender als die Regel-Karten darueber (Sicherheit/Evakuierung
   sind die inhaltlich wichtigen Karten, der Tipp ist nur ein kleiner Hinweis am Ende). ─────────── */
.m2-tip{
    display:flex; align-items:flex-start; gap:8px; background:none; border:none;
    border-top:1px solid #e2e7ee; border-radius:0; padding:1rem 0 0; margin-top:0.4rem;
    font-size:0.78rem; color:#8a97ab;
}

/* ── Blockierendes DN-Modal (unbestaetigte Nachricht -- muss aktiv bestaetigt werden) ────────── */
.m2-dn-modal-overlay{
    position:fixed; inset:0; background:rgba(26,32,44,.6); z-index:600;
    display:flex; align-items:center; justify-content:center; padding:1.2rem;
}
.m2-dn-modal-overlay[hidden]{ display:none; }
.m2-dn-modal-box{
    background:#fff; border-radius:12px; padding:1.3rem 1.4rem; max-width:420px; width:100%;
    box-shadow:0 10px 30px rgba(0,0,0,.3);
}
.m2-dn-modal-head{ display:flex; align-items:center; gap:10px; margin-bottom:0.6rem; }
.m2-dn-prio{ display:inline-block; padding:3px 10px; border-radius:4px; font-size:0.65rem; font-weight:800; letter-spacing:.08em; background:#eef1f6; color:var(--m2-blau); }
.m2-dn-prio-dringend{ background:#fbf0d9; color:#8a6300; }
.m2-dn-prio-notfall{ background:#fdeceb; color:#a3372c; animation:m2DnPulse 1s ease-in-out infinite; }
@keyframes m2DnPulse{ 0%,100%{ opacity:1; } 50%{ opacity:0.55; } }
.m2-dn-modal-ts{ margin-left:auto; font-size:0.72rem; color:#8a97ab; }
.m2-dn-modal-from{ font-size:0.72rem; font-weight:700; color:#8a97ab; text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
.m2-dn-modal-titel{ font-size:1.15rem; font-weight:800; color:#1a3763; margin-bottom:0.7rem; }

/* ── Wegpunkt-Karte im NM-Alarmierungs-Modal (nur wenn beide Standorte bekannt sind) ─────────── */
.m2-nm-karte{ width:100%; height:180px; border-radius:8px; margin-bottom:1rem; overflow:hidden; }
.m2-nm-karte[hidden]{ display:none; }
.m2-dn-modal-text{ font-size:0.9rem; color:#5b6b82; line-height:1.6; white-space:pre-wrap; max-height:35vh; overflow-y:auto; margin-bottom:1rem; }
