/* Stand 17:50 */
/* Grundfarben
#292621 (schwarz)
#49535C (blaugrau)
#4E88C2 (blau hell)
#212529 (Anthrazit)
#695F4E (taupe)
#56728F (blau dunkler)
#A88954 (cappucchino)
#E8A73A (orange)
*/ 


/* Grundfarbe für Text */
body {
    background-color:#f0f0f0;
    color: #292621 !important; 
}

.card {
    background-color: #56728F !important;
    color: #F0F0F0 !important;
}

.app-modal {
    background-color: #49535C;
    color:#F0F0F0;
}

.table-dark {
    --bs-table-hover-bg: #A88954 !important;
}

.status-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    font-weight: bold;
    color: #000;
    border-radius: 4px;
}

.status-box-c {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    font-weight: bold;
    color: #000;
    border-radius: 4px;
    background-color: magenta; color:white;
}

/* Statusfarben */
.status-1 { background-color: #90ee90; } /* hellgrün */
.status-2 { background-color: #006400; color: #fff; } /* dunkelgrün */
.status-3 { background-color: #1e90ff; color: #fff; } /* blau */
.status-4 { background-color: #ffd700; color: #000; } /*gelb*/
.status-6 { background-color: #ff4c4c; color: #fff; } /* rot */
.status-7 { background-color: #a9a9a9; } /* grau */

/* ------------------------------------------------------------
   Status 4 – projektweit schwarze Schrift auf Gelb
   ------------------------------------------------------------ */

.status-4,
.fz-status.status-4,
.fz-status-fr.status-4,
.fahrzeug-status-btn.status-4 {
    background-color: #ffd700;
    color: #000;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – Statusbuttons
   Statusfarbe bleibt auch bei Hover unverändert
   ------------------------------------------------------------ */

.fz-status-buttons .fahrzeug-status-btn {
    min-width: 42px;
    font-weight: 600;

    border: 2px solid transparent;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/* Aktueller Status */

.fz-status-buttons .fahrzeug-status-btn.is-current {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}


/* Hover:
   nur Rahmen hervorheben, Hintergrund NICHT verändern */

.fz-status-buttons .fahrzeug-status-btn:hover {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}


/* Bootstrap-Hoverfarben gezielt überschreiben */

.fz-status-buttons .fahrzeug-status-btn.status-1:hover,
.fz-status-buttons .fahrzeug-status-btn.status-1:focus {
    background-color: #90ee90;
    color: #000;
}

.fz-status-buttons .fahrzeug-status-btn.status-2:hover,
.fz-status-buttons .fahrzeug-status-btn.status-2:focus {
    background-color: #006400;
    color: #fff;
}

.fz-status-buttons .fahrzeug-status-btn.status-3:hover,
.fz-status-buttons .fahrzeug-status-btn.status-3:focus {
    background-color: #1e90ff;
    color: #fff;
}

.fz-status-buttons .fahrzeug-status-btn.status-4:hover,
.fz-status-buttons .fahrzeug-status-btn.status-4:focus {
    background-color: #ffd700;
    color: #000;
}

.fz-status-buttons .fahrzeug-status-btn.status-7:hover,
.fz-status-buttons .fahrzeug-status-btn.status-7:focus {
    background-color: #a9a9a9;
    color: #000;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – Primär- und Folgeeinsätze
   ------------------------------------------------------------ */

.fz-einsatz-gruppe {
    min-width: 0;
}

.fz-einsatz-gruppe-title {
    margin-bottom: 6px;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: #bbb;
}


/* Primäreinsatz */

.fz-primaereinsatz {
    margin-bottom: 10px;
}

.fz-einsatz-card-primary {
    border-left-width: 5px;
}


/* Folgeeinsätze */

.fz-folgeeinsaetze {
    padding-top: 8px;

    border-top: 1px solid #444;
}

.fz-einsatz-card-follow {
    opacity: 0.92;
}


/* Keine Folgeeinsätze */

.fz-keine-folgeeinsaetze {
    padding: 8px 10px;

    border-radius: 4px;

    background: #252525;

    color: #aaa;

    font-size: 12px;
}

/* =========================================================
 * Fahrzeugmodul – Einsatz-Aktionsmenü
 * ========================================================= */

.fz-einsatz-menu-btn {
    width: 32px;
    height: 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    padding: 0;
    margin: 0;

    /* Auf dunklen Einsatzkarten klar sichtbar */
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;

    font-size: 22px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.fz-einsatz-menu-btn:hover,
.fz-einsatz-menu-btn:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.55);
}

.fz-einsatz-menu-btn:active {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(0.94);
}


/* ---------------------------------------------------------
 * Touch-Geräte / Tablet
 * Größere Trefferfläche
 * --------------------------------------------------------- */

@media (pointer: coarse) {

    .fz-einsatz-menu-btn {
        width: 42px;
        height: 42px;

        font-size: 26px;
    }
}


.span-eliste-ort {
    font-size: smaller;
}

/* Einsatzliste Button ausgegraut */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#einsatzTable {
    background-color: #56728F;
}

.einsatzliste-Container {
    padding:10px;
    background-color: #56728F;
    color: #ffffff;
    border-radius:10px;
}
/* Fernmeldestelle */
/* === GRUNDLAYOUT === */
.fernmelde-container {
    display: grid;
    grid-template-columns: 0.6fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
        "einsaetze fahrzeuge"
        "einsaetze meldungen";
    gap: 10px;
    height: calc(100vh - 70px);
}

.fm-einsaetze {
    grid-area: einsaetze;
}

.fm-fahrzeuge {
    grid-area: fahrzeuge;
}

.fm-meldungen {
    grid-area: meldungen;
}

/* Fahrzeuge zweigeteilt */
.fm-fahrzeuge-body.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 100%;
    background-color: #2A2A2A;
    border-radius: 10px;
}

/* Jede Spalte */
.fahrzeug-section {
    display: flex;
    flex-direction: column;
    min-height: 0; /* wichtig für Scroll */
}

/* Scrollbare Listen */
.fahrzeug-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}



/* === PANEL === */
.fm-panel {
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
    color: #ffffff;
}

/* === PANEL HEADER === */
.fm-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
    color:#F0F0F0;
}

.fm-panel-header h5 {
    margin: 0;
    font-size: 1rem;
}

/* === PANEL BODY === */
.fm-panel-body {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}

/* === FAHRZEUGE === */
.fm-fahrzeuge-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fahrzeug-section h6 {
    margin-bottom: 6px;
    font-weight: bold;
    color: #ccc;
}

/* === FAHRZEUG CARD (Platzhalter) === */
.fahrzeug-card {
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    align-items: center;
    padding: 6px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 4px;
}

.fahrzeug-card.fahrzeug-bereitschaft {
    border: 2px solid #ff0000;
}

/* Fernmeldestelle */
/* === GRUNDLAYOUT === */
.fuehrungsraum-container {
    display: grid;
    grid-template-columns: 0.6fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-areas:
        "lagekarte einsaetze"
        "lagekarte ea"
        "lagekarte meldungen";
    gap: 10px;
    height: calc(100vh - 70px);
}

.fr-lagekarte {
    grid-area: lagekarte;
}

.fr-einsaetze {
    grid-area: einsaetze;
}

.fr-ea {
    grid-area: ea;
}

.fr-fahrzeuge {
    grid-area: fahrzeuge;
}

.fr-meldungen {
    grid-area: meldungen;
}

/* Fahrzeuge zweigeteilt */
.fr-fahrzeuge-body.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 100%;
    background-color: #2A2A2A;
    border-radius: 10px;
}

/* Jede Spalte */
.fr-fahrzeug-section {
    display: flex;
    flex-direction: column;
    min-height: 0; /* wichtig für Scroll */
}

/* Scrollbare Listen */
.fr-fahrzeug-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* EA dreigeteilt */
.fr-ea-body.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    height: 100%;
    background-color: #2A2A2A;
    border-radius: 10px;
}

/* Jede Spalte */
.ea-section {
    display: flex;
    flex-direction: column;
    min-height: 0; /* wichtig für Scroll */
}

/* Scrollbare Listen */
.ea-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}


/* === PANEL === */
.fr-panel {
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
    color: #ffffff;
}

/* === PANEL HEADER === */
.fr-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
    color:#F0F0F0;
}
.fr-ea-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
    color:#F0F0F0;
}

.fr-panel-header h5 {
    margin: 0;
    font-size: 1rem;
}

/* === PANEL BODY === */
.fr-panel-body {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}

/* === FAHRZEUGE === */
.fr-fahrzeuge-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fr-fahrzeug-section h6 {
    margin-bottom: 6px;
    font-weight: bold;
    color: #ccc;
}

/* === FAHRZEUG CARD (Platzhalter) === */
.fr-fahrzeug-card {
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    align-items: center;
    padding: 6px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 4px;
}

#frLagekarte {
    width: 100%;
    height: 85vh;   /* Hochformat */
    min-height: 600px;
}

/* Führungsraum – Fahrzeugstatus-Overlay auf Lagekarte */
.fr-map-vehicle-overlay {
    background: rgba(30, 30, 30, 0.92);
    border-radius: 8px;
    padding: 5px;
    min-width: fit-content;
    box-shadow: 0 0 8px rgba(0,0,0,0.35);
}

.fr-map-vehicle-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fr-map-vehicle-item {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 28px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    color: #000;
    white-space: nowrap;
}

.fr-map-vehicle-item-bereitschaft {
    box-shadow:
        0 0 0 2px #ff0000;
}

/* Führungsraum Karten-Overlay:
   Fahrzeuge mit Status C wechseln zwischen Statusfarbe und C-Farbe */
.fr-map-vehicle-item.fr-map-vehicle-item-c-blink {
    animation: frVehicleCFlashDefault 2.2s infinite;
}

/* Je Status eigene Wechsel-Animation */
.fr-map-vehicle-item.status-1.fr-map-vehicle-item-c-blink {
    animation-name: frVehicleCFlash1;
    color: #000;
}

.fr-map-vehicle-item.status-2.fr-map-vehicle-item-c-blink {
    animation-name: frVehicleCFlash2;
    color: #fff;
}

.fr-map-vehicle-item.status-3.fr-map-vehicle-item-c-blink {
    animation-name: frVehicleCFlash3;
    color: #fff;
}

.fr-map-vehicle-item.status-4.fr-map-vehicle-item-c-blink {
    animation-name: frVehicleCFlash4;
    color: #000;
}

.fr-map-vehicle-item.status-6.fr-map-vehicle-item-c-blink {
    animation-name: frVehicleCFlash6;
    color: #fff;
}

.fr-map-vehicle-item.status-7.fr-map-vehicle-item-c-blink {
    animation-name: frVehicleCFlash7;
    color: #000;
}

/* Fallback */
@keyframes frVehicleCFlashDefault {
    0%, 49%   { background-color: inherit; color: inherit; }
    50%, 100% { background-color: magenta; color: #fff; }
}

@keyframes frVehicleCFlash1 {
    0%, 49%   { background-color: #90ee90; color: #000; }
    50%, 100% { background-color: magenta; color: #fff; }
}

@keyframes frVehicleCFlash2 {
    0%, 49%   { background-color: #006400; color: #fff; }
    50%, 100% { background-color: magenta; color: #fff; }
}

@keyframes frVehicleCFlash3 {
    0%, 49%   { background-color: #1e90ff; color: #fff; }
    50%, 100% { background-color: magenta; color: #fff; }
}

@keyframes frVehicleCFlash4 {
    0%, 49%   { background-color: #ffd700; color: #000; }
    50%, 100% { background-color: magenta; color: #fff; }
}

@keyframes frVehicleCFlash6 {
    0%, 49%   { background-color: #ff4c4c; color: #fff; }
    50%, 100% { background-color: magenta; color: #fff; }
}

@keyframes frVehicleCFlash7 {
    0%, 49%   { background-color: #a9a9a9; color: #000; }
    50%, 100% { background-color: magenta; color: #fff; }
}

.fr-map-vehicle-item.status-2,
.fr-map-vehicle-item.status-3,
.fr-map-vehicle-item.status-6 {
    color: #fff;
}

.fr-map-vehicle-empty {
    color: #ccc;
    font-size: 0.85rem;
    text-align: center;
    padding: 6px 8px;
}

/* === DASHBOARD === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dash-box {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    font-size: 0.9rem;
    color:#F0F0F0;
}

.dash-box b {
    font-size: 1.6rem;
    display: block;
    margin-top: 5px;
}

/* === FAHRZEUG CARD === */
.fahrzeug-card {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    background: #555555;
    margin-bottom: 5px;
    gap: 5px;
}

.fz-name {
    flex: 1;
    font-weight: bold;
    color:#F0F0F0;
}
.fz-c, .fz-status, .fz-status-fr {
    flex: 0 0 50px;
}

.fz-status {
    display:flex; 
    justify-content:center; 
    align-items:center;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    padding: 6px 0;
    font-weight: bold;
}

.fz-status-fr {
    display:flex; 
    justify-content:center; 
    align-items:center;
    text-align: center;
    border-radius: 4px;
    padding: 6px 0;
    font-weight: bold;
}

.fz-c {
    text-align: center;
    border-radius: 4px;
    padding: 6px 0;
    font-weight: bold;
    background-color: magenta; color:white;
    display:flex; 
    justify-content:center; 
    align-items:center;
}

.fz-einsatz {
    font-size: 0.75rem;
    font-weight:normal;
    color:#F0F0F0;
}

/* Gemeinde-Gruppierung */
.gemeinde-block {
    margin-bottom: 12px;
}

.gemeinde-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: #aaa;
    margin: 6px 0 4px;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
}


/* === STATUS MODAL – Fernmeldestelle / Desktop === */
.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.status-btn {
    text-align: center;
    padding: 15px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.7rem;
    font-weight: bold;
}

#fahrzeugStatusModal .modal-dialog {
    max-width: 560px;
}

.fm-status-hold-hint {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    padding: 9px 11px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 7px;
    background: rgba(0,0,0,.18);
    color: #e7edf3;
    font-size: .82rem;
}

.fm-status-grid {
    gap: 12px;
}

.fm-status-grid .fm-status-btn {
    --hold-duration: 800ms;
    position: relative;
    overflow: hidden;
    min-height: 105px;
    padding: 10px 8px 12px;
    border: 2px solid rgba(255,255,255,.22);
    border-radius: 9px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    font: inherit;
    line-height: 1.15;
    transition: transform .08s ease, border-color .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.fm-status-grid .fm-status-btn:hover:not(:disabled) {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,.25);
}

.fm-status-grid .fm-status-btn:active:not(:disabled),
.fm-status-grid .fm-status-btn.is-holding {
    transform: translateY(1px);
}

.fm-status-grid .fm-status-btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 7px;
    background: rgba(255,255,255,.88);
    pointer-events: none;
}

.fm-status-grid .fm-status-btn.is-holding::after {
    animation: fm-status-hold-progress var(--hold-duration) linear forwards;
}

@keyframes fm-status-hold-progress {
    from { width: 0; }
    to { width: 100%; }
}

.fm-status-grid .fm-status-btn.is-current,
.fm-status-grid .fm-status-btn:disabled.is-current {
    opacity: .58;
    cursor: default;
    border-color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}

.fm-status-grid .fm-status-btn.is-sending {
    opacity: .9;
    border-color: #fff;
}

.fm-status-number,
.fm-status-label,
.fm-status-action {
    position: relative;
    z-index: 1;
    display: block;
}

.fm-status-number {
    font-size: 1.55rem;
    font-weight: 800;
}

.fm-status-label {
    min-height: 30px;
    margin-top: 4px;
    font-size: .72rem;
    font-weight: 700;
}

.fm-status-action {
    margin-top: 7px;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .07em;
    opacity: .72;
}

/* Einsatzübersicht */
.einsatz-prio {
    margin-bottom: 12px;
    border-radius: 6px;
    background: #1c1c1c;
    padding: 6px;
}

.prio-ohne-priorität {
    border-left: 4px dashed #888;
    background: #1a1a1a;
}

/* Beendete Einsätze */
.prio-beendet {
    margin-top: 14px;
    border-left: 4px solid #218700;
}

/* Administrativ abgeschlossene Einsätze */
.prio-abgeschlossen {
    margin-top: 14px;
    border-left: 4px solid #6c757d;
    opacity: 0.7;
}

.status-beendet,
.status-abgeschlossen {
    background: #1f1f1f;
    color: #aaa;
}

.prio-title {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 6px;
}

/* Prioritätsfarben */
.prio-zeitkritisch {
    border-left: 4px solid #ff0000;
    background-color: #cd5c5c;
}
.prio-hoch         { border-left: 4px solid #dc3545; }
.prio-mittel       { border-left: 4px solid #ffc107; }
.prio-niedrig      { border-left: 4px solid #6c757d; }

.einsatz-status {
    margin-bottom: 6px;
}

.status-title {
    font-size: 0.8rem;
    color: #aaa;
    margin: 4px 0;
}

.einsatz-item {
    display: flex;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 4px;
    background: #555555;
    margin-bottom: 3px;
    font-size: 0.75rem;
}

.einsatz-nr {
    font-weight: bold;
    min-width: 55px;
}

.einsatz-ort {
    color: #aaa;
    font-size: 0.7rem;
}

@keyframes blinkWarn {
    0%   { background-color: #e0cc1a; }
    50%  { background-color: #fff3a0; }
    100% { background-color: #e0cc1a; }
}

/* 🔴 Neu – blinkt */
.fm-alert> td {
    animation: blinkWarn 1s infinite;
    color: #000 !important;
}

/* 🟡 Quittiert – bleibt gelb */
.fm-acknowledged> td {
    background-color: #e0cc1a !important;
    color: #000 !important;
}

/* 🔴 Neu – blinkt */
.fr-alert> td {
    animation: blinkWarn 1s infinite;
    color: #000 !important;
}

/* 🟡 Quittiert – bleibt gelb */
.fr-acknowledged> td {
    background-color: #e0cc1a !important;
    color: #000 !important;
}

/* ===========================
   PRIORITÄTSMELDUNGEN
   =========================== */

.table-dark.table-striped > tbody > tr.meldung-prio-sofort {
    --bs-table-bg: #ffb347 !important;
    --bs-table-accent-bg: #ffb347 !important;
    --bs-table-striped-bg: #ffb347 !important;
    --bs-table-hover-bg: #ffb347 !important;
    --bs-table-color: #000 !important;
    --bs-table-striped-color: #000 !important;
    --bs-table-hover-color: #000 !important;
}

.table-dark.table-striped > tbody > tr.meldung-prio-blitz {
    --bs-table-bg: #ff4d4d !important;
    --bs-table-accent-bg: #ff4d4d !important;
    --bs-table-striped-bg: #ff4d4d !important;
    --bs-table-hover-bg: #ff4d4d !important;
    --bs-table-color: #fff !important;
    --bs-table-striped-color: #fff !important;
    --bs-table-hover-color: #fff !important;
}

.table-dark.table-striped > tbody > tr.meldung-prio-sofort > *,
.table-dark.table-striped > tbody > tr.meldung-prio-blitz > * {
    font-weight: 700 !important;
}

.table-dark.table-striped > tbody > tr.meldung-prio-sofort:hover > * {
    color: #000 !important;
}

.table-dark.table-striped > tbody > tr.meldung-prio-blitz:hover > * {
    color: #fff !important;
}

.meldung-prio-badge {
    display: inline-block;
    min-width: 80px;
    text-align: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.meldung-prio-badge-sofort {
    background-color: #ff9800;
    color: #000;
}

.meldung-prio-badge-blitz {
    background-color: #d90429;
    color: #fff;
}

.meldungen-offen-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 26px;
    min-height: 22px;

    padding: 2px 8px;

    border-radius: 999px;

    background: #dc3545;
    color: #fff;

    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;
}

/* =========================================================
   Führungsraum – Status-Badges Einsatzabschnitte
   ========================================================= */

.fr-ea-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
	padding-right: 20px;
}

.fr-ea-badges {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    margin-left: auto;
    flex: 0 0 auto;
}

.fr-ea-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 25px;
    height: 18px;
    padding: 0 5px;

    border-radius: 999px;

    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;
}

/* EA-Überschrift soll auch in schmaleren Spalten stabil bleiben. */
.fuehrungsraum-container .fr-ea-heading > span:first-child {
    min-width: 0;
    white-space: nowrap;
}

/* Offen */
.fr-ea-badge-offen {
    background: #dc3545;
    color: #fff;
}

/* In Bearbeitung */
.fr-ea-badge-arbeit {
    background: #ffc107;
    color: #212529;
}

/* Beendet */
.fr-ea-badge-beendet {
    background: #198754;
    color: #fff;
}

/*Abgeschlossen */
.fr-ea-badge-abgeschlossen {
    background: #6c757d;
    color: #ffffff;
}

/* Fernmeldestelle / Führungsraum – ungelesen */
.fm-alert.prio-sofort > td,
.fr-alert.prio-sofort > td {
    animation: blinkPrioSofort 1s infinite !important;
    color: #000 !important;
    font-weight: 700;
}

.fm-alert.prio-blitz > td,
.fr-alert.prio-blitz > td {
    animation: blinkPrioBlitz 0.8s infinite !important;
    color: #fff !important;
    font-weight: 700;
}

/* Fernmeldestelle / Führungsraum – gelesen, aber noch nicht erledigt */
.fm-acknowledged.prio-sofort-ack > td,
.fr-acknowledged.prio-sofort-ack > td {
    background-color: #ffb347 !important;
    color: #000 !important;
    font-weight: 700;
}

.fm-acknowledged.prio-blitz-ack > td,
.fr-acknowledged.prio-blitz-ack > td {
    background-color: #ff4d4d !important;
    color: #fff !important;
    font-weight: 700;
}

@keyframes blinkPrioSofort {
    0%   { background-color: #ff9800; }
    50%  { background-color: #ffd699; }
    100% { background-color: #ff9800; }
}

@keyframes blinkPrioBlitz {
    0%   { background-color: #c1121f; }
    50%  { background-color: #ff6b6b; }
    100% { background-color: #c1121f; }
}

/* Popup */
.prio-popup-wrap {
    text-align: left;
    font-size: 0.95rem;
}

.prio-popup-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.prio-popup-sofort .prio-popup-badge {
    background-color: #ff9800;
    color: #000;
}

.prio-popup-blitz .prio-popup-badge {
    background-color: #d90429;
    color: #fff;
}

.prio-popup-sofort {
    border-left: 6px solid #ff9800;
    padding-left: 10px;
}

.prio-popup-blitz {
    border-left: 6px solid #d90429;
    padding-left: 10px;
}

.btn-xs {
    padding: 2px 6px;
    font-size: 0.7rem;
    line-height: 1.2;
    opacity: 0.85;
}

.btn-xs:hover {
    opacity: 1;
}

.einsatz-aktuell .btn-storno {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.einsatz-folge .btn-storno {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.einsatz-aktuell:hover .btn-storno {
    opacity: 1;
}
.einsatz-folge:hover .btn-storno {
    opacity: 1;
}

.dnd-hover { outline: 2px dashed #666; border-radius: 6px; }

#eaI.dnd-hover, #eaII.dnd-hover, #Bauhof.dnd-hover, #EinsatzeOhneEA.dnd-hover {
    border: 3px dashed #ff9800;
    background: rgba(255,152,0,0.08); 
}
.fr-fahrzeug { cursor: grab; }
.fr-einsatz-drag { cursor: grab; }
.fr-selected { outline: 2px solid #333; border-radius: 6px; }

#eaI.dnd-hover, #eaII.dnd-hover, #Bauhof.dnd-hover {
  outline: 2px dashed #666;
  border-radius: 6px;
}
/* Container-Highlight (nur Einsatz verschieben) */
.fr-drop-container-hover{
  border: 3px dashed #ff9800;
  background: rgba(255,152,0,0.08);
  border-radius: 8px;
}

/* Item-Highlight (Fahrzeug zuweisen) */
.fr-drop-item-hover{
  border: 3px solid #2d6cdf;
  box-shadow: 0 0 10px rgba(45,108,223,0.4);
  border-radius: 8px;
}

/* Klickmodus: ausgewähltes Fahrzeug */
.fr-fahrzeug.fr-selected{
  outline: none;
  box-shadow:
    inset 0 0 0 4px #00a86b,          /* grüner Rahmen innen */
    0 0 0 6px rgba(0,168,107,0.18);   /* optional: weicher Glow außen */
  border-radius: 10px;
}

/* Klickmodus: mögliche Ziele hervorheben */
.fr-einsatz-drop.fr-click-target{
  outline: 3px solid #00a86b;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(0,168,107,0.12); 
  border-radius: 10px;
}

.fr-einsatz-drop.fr-click-target-disabled{
  outline: 3px solid #ff4d4d;
  outline-offset: 2px;
  opacity: 0.5;
  border-radius: 10px;
}

/*Kontextmenü */
#frContextMenu { min-width: 200px; }

.fr-menu-btn{
  display: none;   /* Default: unsichtbar */
  position:absolute;
  top:6px;
  right:6px;
  border:0;
  border-radius:50%;
  background: rgba(255,255,255,0.15);
  font-size:22px;
  line-height:1;
  padding:8px 10px;  /* große Touch-Fläche */
  z-index:10;
  color: #d32f2f;
}

@media (hover: none) and (pointer: coarse) {
    .fr-menu-btn {
        display: block;
    }
}

#frEinsatzDetailsContent td { word-break: break-word; }

.fr-map-overlay {
    background: rgba(255, 255, 255, 0.82);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
    font-family: Arial, sans-serif;
    min-width: 170px;
}

.fr-map-overlay .fr-overlay-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fr-map-overlay button {
    display: block;
    width: 100%;
    margin: 3px 0;
    padding: 6px 8px;
    border: 1px solid #999;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

.fr-map-overlay button:hover {
    background: #f2f2f2;
}

.fr-radius-buttons {
    display: none;
    min-width: 70px;
}

.fr-radius-buttons.active {
    display: block;
}

.fr-main-buttons {
    min-width: 120px;
}

.fr-evac-divicon {
    background: transparent !important;
    border: none !important;
}

.fr-evac-pin {
    width: 10px;
    height: 10px;
    background: #d00;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

#frToggleRadiusBtns {
    width: 36px;
    height: 36px;
    text-align: center;
    font-size: 18px;
}

.fr-toolbar {
    background: rgba(255,255,255,0.88);
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fr-tool-block {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.fr-tool-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #aaa;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.fr-tool-btn:hover {
    background: #f1f1f1;
}

.fr-tool-btn.active {
    background: #1976d2;
    color: #fff;
    border-color: #0d47a1;
}

.fr-tool-btn.fr-toggle-active {
    background: #8e24aa;
    color: #fff;
    border-color: #6a1b9a;
}

.fr-subpanel {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #ccc;
    border-radius: 8px;
    min-width: 72px;
}

.fr-subpanel.active {
    display: flex;
}

.fr-sub-btn {
    border: 1px solid #aaa;
    background: #fff;
    border-radius: 4px;
    height: 28px;
    cursor: pointer;
    font-size: 12px;
    padding: 0 6px;
}

.fr-sub-btn.active {
    background: #1976d2;
    color: #fff;
    border-color: #0d47a1;
}

.fr-sub-title {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    margin-top: 4px;
}

.fr-radius-select {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: rgba(255,255,255,0.9);
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.fr-radius-select.active {
    display: flex;
}

.fr-radius-btn {
    min-width: 56px;
    height: 28px;
    border: 1px solid #aaa;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.fr-radius-btn.active {
    background: #1976d2;
    color: #fff;
}

.fr-tactical-wrapper,
.fr-radius-label-wrapper {
    background: transparent !important;
    border: none !important;
}

.fr-tactical-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.fr-radius-label {
    display: inline-block;
    min-width: 160px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #999;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);

    color: #222;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.fr-wind-wrapper,
.fr-wind-handle-wrapper {
    background: transparent !important;
    border: none !important;
}

.fr-wind-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #37474f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(0,0,0,0.35);
    font-size: 15px;
}

.fr-wind-handle {
    width: 14px;
    height: 14px;
    background: #263238;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
}

.fr-draw-hint {
    background: rgba(255,255,255,0.95);
    border: 1px solid #999;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.fr-abfahrten-label {
    background: transparent;
    border: none;
}

.fr-abfahrten-label div {
    background: rgba(255, 255, 255, 0.0);
    border: none;
    box-shadow: none;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff,
         0px  0px 3px #fff;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-container {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "einsaetze uhr"
        "einsaetze fahrzeuge";
    gap: 10px;
    height: calc(100vh - 70px);
    overflow: hidden;
    padding: 10px;
    background: #0f1418;
    color: #F0F0F0;
}

.dashboard-panel {
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0,0,0,0.35);
    min-height: 0;
}

.dashboard-panel-header {
    padding: 8px 12px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
    font-weight: bold;
    font-size: 0.95rem;
    color: #F0F0F0;
    flex: 0 0 auto;
}

.dashboard-panel-body {
    flex: 1;
    padding: 10px;
    overflow: hidden;
    min-height: 0;
}

.dashboard-einsaetze-panel {
    grid-area: einsaetze;
    min-height: 0;
}

.dashboard-uhr {
    grid-area: uhr;
    min-height: 120px;
}

.dashboard-fahrzeuge-panel {
    grid-area: fahrzeuge;
    min-height: 0;
}

/* Headline im Einsatz-Container */
.dashboard-einsaetze-headerline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-header-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.82rem;
    font-weight: normal;
    color: #cfd6dd;
}

.dashboard-header-stat strong {
    color: #ffffff;
    font-weight: 700;
}

/* Uhr */
.dashboard-clock-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 110px;
}

#dashboard-clock-time {
    font-size: 5rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 1px;
}

#dashboard-clock-date {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #cfd6dd;
    text-transform: capitalize;
    text-align: center;
}

/* Einsätze */
#dashboard-einsaetze {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.dashboard-einsaetze-scroll {
    display: flex;
    flex-direction: column;
    gap: 6px;
    will-change: transform;
}

.dashboard-einsatz-item {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 6px 8px;
    flex: 0 0 auto;
    border-left: 4px solid transparent;
}

/* Dashboard – Prioritätsfarben analog Fernmeldestelle / Führungsraum */
.dashboard-einsatz-item.prio-zeitkritisch {
    border-left: 4px solid #ff0000;
    background-color: #cd5c5c;
    color: #fff;
}

.dashboard-einsatz-item.prio-hoch {
    border-left: 4px solid #dc3545;
    background-color: #3a2024;
}

.dashboard-einsatz-item.prio-mittel {
    border-left: 4px solid #ffc107;
    background-color: #3a3320;
}

.dashboard-einsatz-item.prio-niedrig {
    border-left: 4px solid #6c757d;
    background-color: #2a2f35;
}

.dashboard-einsatz-item.prio-ohne-priorität {
    border-left: 4px dashed #888;
    background: #1a1a1a;
}

.dashboard-einsatz-item.status-beendet,
.dashboard-einsatz-item.status-abgeschlossen {
    background: #1f1f1f !important;
    color: #aaa !important;
    border-left-color: #218700 !important;
    opacity: 0.75;
}

.dashboard-einsatz-item .dashboard-einsatz-adresse {
    color: #d3d8de;
}

.dashboard-einsatz-item .dashboard-einsatz-meta {
    color: #b8c0c8;
}

.dashboard-einsatz-item.prio-zeitkritisch .dashboard-einsatz-adresse,
.dashboard-einsatz-item.prio-zeitkritisch .dashboard-einsatz-meta,
.dashboard-einsatz-item.prio-hoch .dashboard-einsatz-adresse,
.dashboard-einsatz-item.prio-hoch .dashboard-einsatz-meta {
    color: rgba(255,255,255,0.9);
}

.dashboard-einsatz-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.dashboard-einsatz-nr {
    font-size: 1rem;
    font-weight: bold;
}

.dashboard-einsatz-status {
    font-size: 0.75rem;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
}

.dashboard-fahrzeug-statuswrap {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.dashboard-einsatz-meldebild {
    font-size: 0.95rem;
    font-weight: bold;
    margin-top: 4px;
}

.dashboard-einsatz-adresse {
    margin-top: 3px;
    color: #d3d8de;
    font-size: 0.82rem;
}

.dashboard-einsatz-meta {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.72rem;
    color: #b8c0c8;
}

/* Fahrzeuge */
#dashboard-fahrzeuge {
    height: 100%;
    overflow: hidden;
}

.dashboard-fahrzeuge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dashboard-fahrzeug-card {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 7px;
    min-height: 0;
}

.dashboard-fahrzeug-card.fahrzeug-bereitschaft {
    border: 2px solid #ff0000;
}

.dashboard-fahrzeug-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.dashboard-fahrzeug-name {
    font-size: 0.95rem;
    font-weight: bold;
    color: #F0F0F0;
}

.dashboard-fahrzeug-typ {
    font-size: 0.72rem;
    color: #c1c8cf;
}

.dashboard-fahrzeug-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-fahrzeug-einsatz {
    display: flex;
    gap: 6px;
    font-size: 0.72rem;
    background: #1a1f24;
    border-radius: 5px;
    padding: 4px 6px;
    align-items: flex-start;
}

.dashboard-fahrzeug-einsatz .einsatz-nr {
    font-weight: bold;
    white-space: nowrap;
}

.dashboard-fahrzeug-einsatz .einsatz-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-fahrzeug-frei {
    color: #9fb38f;
    font-size: 0.78rem;
    font-weight: bold;
}

.dashboard-empty {
    color: #b9c2cb;
    font-style: italic;
}

@media (max-width: 1350px) {
    .dashboard-container {
        grid-template-columns: 1.2fr 1fr;
    }

    .dashboard-fahrzeuge-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "uhr"
            "einsaetze"
            "fahrzeuge";
    }

    .dashboard-fahrzeuge-grid {
        grid-template-columns: 1fr;
    }

    #dashboard-clock-time {
        font-size: 2rem;
    }
}

.fahrzeug-container {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    grid-template-rows:
        auto
        minmax(0, 1fr)
        minmax(0, 1fr);

    grid-template-areas:
        "status status"
        "einsaetze einsatzdetails"
        "bilder meldung";

    gap: 10px;

    height: calc(100vh - 70px);
    min-height: 0;
}

.fz-status {
    grid-area: status;
}

.fz-einsaetze {
    grid-area: einsaetze;
}

.fz-einsatzdetails {
    grid-area: einsatzdetails;
}

.fz-meldung {
    grid-area: meldung;
}

.fz-bilder {
    grid-area: bilder;
}


.fz-status {
    grid-area: status;
}

.fz-einsaetze {
    grid-area: einsaetze;
}

.fz-meldung {
    grid-area: meldung;
}

.fz-bilder {
    grid-area: bilder;
}

.fz-panel {
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
    color: #ffffff;
}

.fz-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
    color: #F0F0F0;
}

.fz-panel-body {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    background: #1e1e1e;
}

.fz-status {
    min-height: 0;
}

.fz-status-body {
    flex: none;
    overflow: visible;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 6px 12px;
}

.fz-status-compact {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}

.fz-status-info {
    display: flex;
    align-items: center;
    gap: 8px;

    white-space: nowrap;
}

.fz-status-separator {
    color: #777;
}

.fz-status-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fz-status-buttons .btn {
    min-width: 42px;
}

.fz-einsatz-card {
    background: #2a2a2a;

    border-radius: 6px;
    border-left: 4px solid #4E88C2;

    padding: 8px 10px;
    margin-bottom: 6px;

    cursor: pointer;
}

.fz-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    align-items: start;
}

.fz-image-card {
    position: relative;

    background: #2a2a2a;
    border-radius: 6px;
    padding: 7px;

    color: #f0f0f0;

    border: 1px solid #3d3d3d;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);

    min-width: 0;
}

.fz-image-thumb-wrap {
    width: 100%;
    height: 145px;

    overflow: hidden;

    border-radius: 4px;
    background: #111;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 6px;
}

.fz-image-thumb {
    width: 100%;
    height: 100%;

    object-fit: contain;

    cursor: pointer;
}

.fz-image-meta {
    font-size: 0.75rem;
    line-height: 1.3;

    word-break: break-word;
}

.fz-image-card .btn-danger {
    padding: 2px 6px;
    font-size: 0.7rem;
}

.fz-image-card {
    position: relative;
}

.fz-image-delete {
    position: absolute;

    top: 10px;
    right: 10px;

    z-index: 2;

    padding: 2px 6px;

    line-height: 1.2;

    opacity: 0.9;
}

.fz-image-description {
    margin-bottom: 4px;

    font-size: 0.8rem;
    font-weight: 600;

    line-height: 1.25;
}

.fz-image-info {
    display: flex;
    justify-content: space-between;

    gap: 8px;

    color: #bbb;

    font-size: 0.68rem;

    white-space: nowrap;
}

.fz-image-filename {
    margin-top: 3px;

    color: #888;

    font-size: 0.62rem;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – Einsatzdetails 50 / 50
   ------------------------------------------------------------ */

.fz-einsatz-detail-columns {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 18px;

    min-height: 0;
}


/* Einsatzdaten links */

.fz-einsatz-detail-data {
    min-width: 0;

    padding-right: 16px;

    border-right: 1px solid #444;
}


/* Fahrzeugübersicht rechts */

.fz-einsatz-detail-vehicles {
    min-width: 0;
}


.fz-einsatz-detail-vehicles
.fz-detail-section-title {
    margin-bottom: 7px;

    font-weight: 700;
}


/* Fahrzeugliste vertikal */

.fz-detail-fahrzeuge {
    display: flex;
    flex-direction: column;
    gap: 4px;

    width: 100%;
    min-width: 0;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – zugeordnete Fahrzeuge
   ------------------------------------------------------------ */

.fz-detail-fahrzeuge {
    display: flex;
    flex-direction: column;

    gap: 4px;

    width: 100%;
    min-width: 0;
}


.fz-detail-fahrzeug {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    width: 100%;
    min-width: 0;
    min-height: 32px;

    padding: 5px 8px;

    border: 1px solid #3d3d3d;
    border-radius: 4px;

    background: #292929;

    font-size: 12px;

    box-sizing: border-box;
}

.fz-detail-fahrzeug-name {
    min-width: 0;
	color: #f0f0f0;
}


.fz-detail-fahrzeug-status {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.fz-detail-fahrzeug-name strong {
    color: #f0f0f0;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – Einsatzkarten
   ------------------------------------------------------------ */

.fz-einsatz-card {
    background: #2a2a2a;

    border-radius: 6px;
    border-left: 4px solid #4E88C2;

    padding: 8px 10px;
    margin-bottom: 6px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.fz-einsatz-card:hover {
    background: #333;
}

.fz-einsatz-card.is-selected {
    background: #343b42;
    border-left-color: #0d6efd;
}

.fz-einsatz-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.fz-einsatz-resource-status {
    font-size: 11px;

    padding: 2px 6px;

    border-radius: 4px;

    background: #444;
}

.fz-einsatz-meldebild {
    font-weight: 600;
    margin-top: 3px;
}

.fz-einsatz-adresse {
    margin-top: 2px;
}


/* ------------------------------------------------------------
   Einsatzdetails
   ------------------------------------------------------------ */

.fz-einsatz-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 10px;
}

.fz-einsatz-detail-title {
    font-size: 18px;
    font-weight: 700;
}

.fz-einsatz-detail-meldebild {
    margin-top: 2px;

    font-size: 16px;
    font-weight: 600;
}

.fz-einsatz-detail-status {
    padding: 4px 8px;

    border-radius: 4px;

    background: #444;

    font-size: 12px;
    font-weight: 600;
}


/* Details zweispaltig */

.fz-detail-grid {
    display: grid;

    grid-template-columns:
        minmax(120px, auto)
        1fr;

    gap: 4px 12px;

    font-size: 13px;
}

.fz-detail-label {
    color: #bbb;
    font-weight: 600;
}


/* Fahrzeuge */

.fz-detail-section {
    margin-top: 12px;

    padding-top: 8px;

    border-top: 1px solid #444;
}

.fz-detail-section-title {
    margin-bottom: 6px;

    font-weight: 700;
}


.fz-detail-fahrzeug-status {
    display: flex;
    align-items: center;

    gap: 5px;

    white-space: nowrap;
}

.fz-detail-fahrzeug-status span {
    color: #bbb;
    font-size: 10px;
}

.fz-eigenes-fahrzeug {
    display: inline-block;

    margin-left: 5px;

    padding: 1px 4px;

    border-radius: 3px;

    background: #444;

    font-size: 9px;
    font-weight: normal;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – Meldungschronik
   ------------------------------------------------------------ */

#fahrzeugMeldungenChronik {
    height: 100%;
    min-height: 0;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – Meldungschronik
   Darstellung analog Fernmeldestelle
   ------------------------------------------------------------ */

#fahrzeugMeldungenChronik {
    height: 100%;
    min-height: 0;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – Meldungen analog Fernmeldestelle
   ------------------------------------------------------------ */

#fahrzeugMeldungenChronik {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.fz-meldungen-table-wrap {
    height: 100%;
    overflow-y: auto;
}

.fz-meldungen-table {
    margin-bottom: 0;
    width: 100%;
}

.fz-meldungen-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.fz-meldungen-table thead th {
    background-color: #212529;

    border-bottom: 1px solid #495057;

    white-space: nowrap;

    padding: 6px 8px;
}

.fz-meldungen-table tbody td {
    padding: 6px 8px;

    border-bottom: 1px solid #495057;

    vertical-align: middle;
}

.fz-meldungen-table tbody tr:last-child td {
    border-bottom: none;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – kompakter Bild-Upload
   ------------------------------------------------------------ */

#fahrzeugBildUploadContainer {
    max-width: 100%;
}

#fahrzeugBildUploadContainer .form-label {
    margin-bottom: 3px;

    font-size: 0.75rem;
    font-weight: 600;
}

#fahrzeugBildUploadContainer .form-control {
    font-size: 0.8rem;
}

#fahrzeugBildUploadContainer textarea {
    min-height: 58px;
    resize: vertical;
}

#fahrzeugBildUploadContainer .form-text {
    margin-top: 3px;

    font-size: 0.68rem;
}

#fahrzeugBildUploadContainer .btn {
    padding: 4px 9px;

    font-size: 0.75rem;
}

/* ------------------------------------------------------------
   Fahrzeugmodul – beendete Einsätze
   ------------------------------------------------------------ */

.fz-beendete-einsaetze {
    margin-top: 10px;
    padding-top: 8px;

    border-top: 1px solid #444;
}

.fz-einsatz-card-ended {
    opacity: 0.72;
}

.fz-einsatz-card-ended:hover {
    opacity: 0.9;
}

.fz-einsatz-card-ended.is-selected {
    opacity: 1;
}

/* =========================================================
 * Fahrzeugmodul – Einsatzhistorie
 * ========================================================= */

.fz-einsatzhistorie {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #555;
}


/* Beendeter Fahrzeugauftrag */
.fz-einsatz-card-ended {
    border-left: 4px solid #218700;
}


/* Stornierter Fahrzeugauftrag */
.fz-einsatz-card-cancelled {
    border-left: 4px solid #777;
    opacity: 0.8;
}


/* Abgebrochener Fahrzeugauftrag */
.fz-einsatz-card-aborted {
    border-left: 4px solid #d88900;
}

/* ============================================================
 * APP-DIALOGE
 * Semantische Farben für Info / Erfolg / Warnung / Fehler
 * ============================================================ */


/* ------------------------------------------------------------
 * Gemeinsame Darstellung
 * ------------------------------------------------------------ */

#appDialogModal .modal-content {
    border-width: 2px;
    border-style: solid;

    border-radius: 8px;

    overflow: hidden;

    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.45);
}


/* ------------------------------------------------------------
 * INFO
 * ------------------------------------------------------------ */

#appDialogModal.app-modal-info .modal-content {
    border-color: #0d6efd;
}

#appDialogModal.app-modal-info .modal-header {
    background: #0d6efd;
    color: #ffffff;
}

#appDialogModal.app-modal-info .modal-header .btn-close {
    filter:
        invert(1)
        grayscale(100%)
        brightness(200%);
}


/* ------------------------------------------------------------
 * ERFOLG
 * ------------------------------------------------------------ */

#appDialogModal.app-modal-success .modal-content {
    border-color: #198754;
}

#appDialogModal.app-modal-success .modal-header {
    background: #198754;
    color: #ffffff;
}

#appDialogModal.app-modal-success .modal-header .btn-close {
    filter:
        invert(1)
        grayscale(100%)
        brightness(200%);
}


/* ------------------------------------------------------------
 * WARNUNG / BESTÄTIGUNG
 * ------------------------------------------------------------ */

#appDialogModal.app-modal-warning .modal-content {
    border-color: #ffc107;
}

#appDialogModal.app-modal-warning .modal-header {
    background: #ffc107;
    color: #212529;
}


/* ------------------------------------------------------------
 * FEHLER
 * ------------------------------------------------------------ */

#appDialogModal.app-modal-error .modal-content {
    border-color: #dc3545;
}

#appDialogModal.app-modal-error .modal-header {
    background: #dc3545;
    color: #ffffff;
}

#appDialogModal.app-modal-error .modal-header .btn-close {
    filter:
        invert(1)
        grayscale(100%)
        brightness(200%);
}

/* =========================================================
   App-Dialog – Warteschlangenanzeige
   ========================================================= */

#appDialogModal .modal-header {
    display: flex;
    align-items: center;
}

#appDialogModal .modal-title {
    flex: 1 1 auto;
}

#appDialogModal .app-dialog-queue-info {
    flex: 0 0 auto;

    margin-left: 1rem;
    margin-right: 1rem;

    padding: 0.2rem 0.55rem;

    border: 1px solid currentColor;
    border-radius: 0.35rem;

    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;

    white-space: nowrap;

    opacity: 0.85;
}

/* =========================================================
 * Führungsraum – Einsatz-Reihenfolge
 * ========================================================= */

#frReihenfolgeListe {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.fr-reihenfolge-item {
    display: grid;
    grid-template-columns: 42px 42px 1fr;
    align-items: center;

    padding: 10px;

    border: 1px solid #ccc;
    border-radius: 6px;

    background: #f7f7f7;
}


.fr-reihenfolge-position {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
}


.fr-reihenfolge-status {
    font-size: 1.2rem;
    text-align: center;
}


.fr-reihenfolge-inhalt {
    min-width: 0;
}


.fr-reihenfolge-inhalt small {
    display: block;
    margin-top: 2px;
    color: #666;
}


.fr-reihenfolge-item.is-locked {
    background: #e9ecef;
    border-color: #999;
}

.fr-reihenfolge-rolle {
    margin-left: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

/* Dragbare Einsatz-Zuordnung */

.fr-reihenfolge-item:not(.is-locked) {
    cursor: grab;
}


.fr-reihenfolge-item:not(.is-locked):active {
    cursor: grabbing;
}


/* Während des Ziehens */

.fr-reihenfolge-item.is-dragging {
    opacity: 0.45;
    border-style: dashed;
}


/* Drag-Symbol */

.fr-reihenfolge-status {
    user-select: none;
}


/* Gesperrter Primäreinsatz */

.fr-reihenfolge-item.is-locked {
    cursor: not-allowed;
}

/* =========================================================
   FAHRZEUGPOOL – GEMEINDESEKTIONEN
   ========================================================= */

.fahrzeugpool-gemeinde {
    margin-bottom: 18px;
    border: 1px solid #495057;
    border-radius: 6px;
    overflow: hidden;
    background: #24282b;
}


/* ---------------------------------------------------------
   Kopfzeile einer Gemeinde
   --------------------------------------------------------- */

.fahrzeugpool-gemeinde-header {
    width: 100%;
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 8px 12px;

    border: 0;
    border-bottom: 1px solid #495057;

    background: #343a40;
    color: #ffffff;

    text-align: left;
    cursor: pointer;
}

.fahrzeugpool-gemeinde-header:hover {
    background: #3d444a;
}

.fahrzeugpool-gemeinde-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.fahrzeugpool-gemeinde-meta {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 0.78rem;
    color: #adb5bd;
}

.fahrzeugpool-gemeinde-chevron {
    display: inline-block;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}


/* Pfeil bei eingeklappter Sektion drehen */

.fahrzeugpool-gemeinde-header[aria-expanded="false"]
    .fahrzeugpool-gemeinde-chevron {
    transform: rotate(-90deg);
}


/* ---------------------------------------------------------
   Tabelle
   --------------------------------------------------------- */

.fahrzeugpool-table {
    width: 100%;
    table-layout: fixed;
    margin-bottom: 0;
}


/*
   FESTE SPALTENAUFTEILUNG

   1 = Funkrufname
   2 = Typ
   3 = Status
   4 = Aktueller Einsatz
   5 = Aktionen
*/

.fahrzeugpool-table th:nth-child(1),
.fahrzeugpool-table td:nth-child(1) {
    width: 20%;
}

.fahrzeugpool-table th:nth-child(2),
.fahrzeugpool-table td:nth-child(2) {
    width: 10%;
}

.fahrzeugpool-table th:nth-child(3),
.fahrzeugpool-table td:nth-child(3) {
    width: 10%;
}

.fahrzeugpool-table th:nth-child(4),
.fahrzeugpool-table td:nth-child(4) {
    width: 40%;
}

.fahrzeugpool-table th:nth-child(5),
.fahrzeugpool-table td:nth-child(5) {
    width: 20%;
}


/* ---------------------------------------------------------
   Tabellenkopf
   --------------------------------------------------------- */

.fahrzeugpool-table thead th {
    padding: 8px 10px;

    background: #1f2428;
    color: #ffffff;

    font-size: 0.82rem;
    font-weight: 700;

    border-bottom: 1px solid #495057;
}


/* ---------------------------------------------------------
   Fahrzeugzeilen
   --------------------------------------------------------- */

.fahrzeugpool-table tbody td {
    padding: 8px 10px;
    vertical-align: middle;
}

.fahrzeugpool-funkrufname {
    font-weight: 600;
}

.fahrzeugpool-einsatz {
    white-space: normal;
    overflow-wrap: anywhere;
}


/* ---------------------------------------------------------
   Aktionsspalte
   --------------------------------------------------------- */

.fahrzeugpool-aktionen {
    white-space: nowrap;
}

.fahrzeugpool-aktionen .btn {
    margin-right: 4px;
}


/* letzten Button nicht zusätzlich einrücken */

.fahrzeugpool-aktionen .btn:last-child {
    margin-right: 0;
}

/* =========================================================
   FAHRZEUGMODUL – ANFAHRT / SONDER- UND WEGERECHTE
   ========================================================= */

.fz-anfahrt-hinweis {
    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 78px;

    margin: 12px 0 16px;
    padding: 10px 14px;

    border: 2px solid;
    border-radius: 8px;

    box-sizing: border-box;
}


/* ---------------------------------------------------------
   MIT Sonder- und Wegerechten
   --------------------------------------------------------- */

.fz-anfahrt-mit {
    border-color: #1687ff;
    background: rgba(13, 110, 253, 0.14);
}


/* ---------------------------------------------------------
   OHNE Sonder- und Wegerechte
   --------------------------------------------------------- */

.fz-anfahrt-ohne {
    border-color: #6c757d;
    background: rgba(108, 117, 125, 0.14);
}


/* ---------------------------------------------------------
   Blaulicht
   --------------------------------------------------------- */

.fz-anfahrt-icon-wrap {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 58px;

    flex: 0 0 64px;
}

.fz-anfahrt-icon {
    display: block;

    max-width: 58px;
    max-height: 58px;

    object-fit: contain;
}


/* ---------------------------------------------------------
   Ohne Sondersignal → Symbol deaktivieren
   --------------------------------------------------------- */

.fz-anfahrt-icon-inaktiv .fz-anfahrt-icon {
    filter: grayscale(1);
    opacity: 0.55;
}


/* roter diagonaler Sperrstrich */

.fz-anfahrt-sperrstrich {
    position: absolute;

    left: 4px;
    top: 27px;

    width: 56px;
    height: 5px;

    border-radius: 5px;

    background: #dc3545;

    transform: rotate(-42deg);

    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.9);
}


/* ---------------------------------------------------------
   Text
   --------------------------------------------------------- */

.fz-anfahrt-text {
    min-width: 0;
}

.fz-anfahrt-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;

    color: #ffffff;
}

.fz-anfahrt-subtitle {
    margin-top: 3px;

    font-size: 0.8rem;
    font-weight: 600;

    color: #c9c9c9;
}

/* =========================================================
   SONDER-/WEGERECHTE – MINI-SYMBOL
   Führungsraum + Fernmeldestelle
   ========================================================= */

.fz-sonderrechte-mini-icon {
    width: 22px;
    height: 22px;

    object-fit: contain;

    margin-left: 5px;
	margin-right: 0;

    vertical-align: middle;

    filter:
        drop-shadow(
            0 0 3px rgba(0, 140, 255, 0.75)
        );
}

/* =========================================================
   FAHRZEUGMODUL – TABLET-OPTIMIERUNG
   Zielgerät: Samsung Galaxy Tab S8 5G / Android
   Querformat = primärer Einsatzmodus
   ========================================================= */

/* Moderne Viewport-Höhe verwenden, wo vom Browser unterstützt. */
@supports (height: 100dvh) {
    .fahrzeug-container {
        height: calc(100dvh - 70px);
    }
}

/* ---------------------------------------------------------
   Touch-Geräte allgemein
   --------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {

    .fz-panel-header {
        min-height: 48px;
        padding: 8px 12px;
    }

    .fz-panel-header h5 {
        font-size: 1rem;
    }

    .fz-panel-header .btn,
    .fz-panel-body .btn:not(.fahrzeug-status-btn) {
        min-height: 44px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .fz-status-buttons {
        gap: 8px;
    }

    .fz-status-buttons .fahrzeug-status-btn {
        min-width: 58px;
        min-height: 48px;
        padding: 8px 12px;
        font-size: 1.05rem;
        border-radius: 7px;
    }

    .fz-einsatz-card {
        min-height: 64px;
        padding: 11px 12px;
        margin-bottom: 8px;
    }

    .fz-einsatz-menu-btn {
        width: 44px;
        height: 44px;
        font-size: 26px;
    }

    .fz-detail-grid {
        gap: 7px 12px;
        font-size: 0.9rem;
    }

    .fz-detail-fahrzeug {
        min-height: 42px;
        padding: 7px 9px;
        font-size: 0.85rem;
    }

    .fz-meldungen-table thead th,
    .fz-meldungen-table tbody td {
        padding: 9px 10px;
    }

    #fahrzeugMeldungForm .form-control,
    #fahrzeugMeldungForm .form-select,
    #fahrzeugBildUploadForm .form-control,
    #fahrzeugBildUploadForm .form-select {
        min-height: 46px;
        font-size: 1rem;
    }

    #fahrzeugMeldungText,
    #fahrzeugBildBeschreibung {
        min-height: 96px;
    }
}

/* ---------------------------------------------------------
   Tablet Querformat
   Galaxy Tab S8 liegt im Browser typischerweise in diesem
   Bereich. Linke Spalte bewusst etwas schmaler, damit die
   Einsatzdetails mehr Platz erhalten.
   --------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) and (min-width: 901px) {

    .fahrzeug-container {
        grid-template-columns:
            minmax(320px, 0.82fr)
            minmax(0, 1.18fr);

        grid-template-rows:
            auto
            minmax(0, 1.08fr)
            minmax(0, 0.92fr);

        gap: 8px;
    }

    .fz-status-body {
        padding: 8px 12px;
    }

    .fz-status-compact {
        gap: 12px;
    }

    .fz-status-info {
        min-width: 0;
        overflow: hidden;
    }

    .fz-status-info > span,
    .fz-status-info > strong {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fz-einsatz-detail-columns {
        gap: 12px;
    }

    .fz-einsatz-detail-data {
        padding-right: 12px;
    }

    .fz-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .fz-image-thumb-wrap {
        height: 125px;
    }
}

/* ---------------------------------------------------------
   Tablet Hochformat / schmalere Touch-Ansicht
   Keine gequetschten 2x2-Panels: kontrollierte Einspalten-
   Ansicht mit normalem Seiten-Scrollen.
   --------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) and (max-width: 900px) {

    .fahrzeug-container {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: calc(100dvh - 70px);
        gap: 10px;
        padding-bottom: 10px;
    }

    .fz-status {
        order: 1;
    }

    .fz-einsaetze {
        order: 2;
    }

    .fz-einsatzdetails {
        order: 3;
    }

    .fz-meldung {
        order: 4;
    }

    .fz-bilder {
        order: 5;
    }

    .fz-panel {
        overflow: visible;
        flex: 0 0 auto;
    }

    .fz-panel-body {
        overflow: visible;
    }

    .fz-status-compact {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .fz-status-info {
        justify-content: center;
        flex-wrap: wrap;
        white-space: normal;
        text-align: center;
    }

    .fz-status-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .fz-status-buttons .fahrzeug-status-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .fz-einsatz-detail-columns {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .fz-einsatz-detail-data {
        padding-right: 0;
        padding-bottom: 12px;
        border-right: 0;
        border-bottom: 1px solid #444;
    }

    .fz-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #fahrzeugMeldungenChronik,
    .fz-meldungen-table-wrap {
        height: auto;
        max-height: none;
        overflow: visible;
    }
}

/* Sehr schmale Ansicht: Bilder nicht unnötig zusammendrücken. */
@media (hover: none) and (pointer: coarse) and (max-width: 600px) {
    .fz-image-grid {
        grid-template-columns: 1fr;
    }

    .fz-detail-grid {
        grid-template-columns: 1fr;
    }

    .fz-detail-label {
        margin-top: 6px;
    }
}

/* =========================================================
   FAHRZEUGMODUL – TABLET APP UI / STEP 2
   Eigenständige Bedienoberfläche für Fahrzeug-Tablets.
   Backend- und Datenlogik bleiben unverändert.
   ========================================================= */

body.fahrzeug-app-mode {
    overflow: hidden;
    background: #111820;
}

body.fahrzeug-app-mode > .navbar {
    display: none !important;
}

body.fahrzeug-app-mode > .container-fluid {
    margin-top: 0 !important;
    padding: 0 !important;
}

body.fahrzeug-app-mode #main-content {
    height: 100dvh;
    min-height: 100dvh;
}

.fz-app-shell {
    --fz-rail-width: 82px;
    --fz-header-height: 76px;
    --fz-tabs-height: 58px;
    --fz-status-height: 112px;
    --fz-surface: #18212a;
    --fz-surface-2: #202a34;
    --fz-surface-3: #27333f;
    --fz-border: rgba(255,255,255,0.11);
    --fz-text: #f4f7fa;
    --fz-muted: #aebbc8;
    --fz-accent: #4e88c2;

    position: relative;
    display: grid;
    grid-template-columns: var(--fz-rail-width) minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: #111820;
    color: var(--fz-text);
}

/* Linke App-Rail */
.fz-app-rail {
    position: relative;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 10px 7px;
    background: #0d141b;
    border-right: 1px solid var(--fz-border);
    box-shadow: 6px 0 20px rgba(0,0,0,0.18);
}

.fz-rail-btn {
    position: relative;
    min-height: 68px;
    padding: 8px 3px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #c8d2dc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.69rem;
    font-weight: 650;
    line-height: 1;
    touch-action: manipulation;
}

.fz-rail-btn i {
    font-size: 1.32rem;
}

.fz-rail-btn.is-active,
.fz-rail-btn:active {
    color: #fff;
    background: #233343;
    border-color: rgba(78,136,194,0.7);
}

.fz-rail-btn-einsaetze {
    background: #1c2a37;
    border-color: rgba(78,136,194,0.45);
    color: #fff;
}

.fz-rail-divider {
    height: 1px;
    margin: 4px 6px;
    background: var(--fz-border);
}

.fz-rail-spacer { flex: 1 1 auto; }

.fz-rail-badge,
.fz-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dbe9f7;
    color: #112131;
    font-size: 0.7rem;
    font-weight: 800;
}

.fz-rail-badge {
    position: absolute;
    top: 4px;
    right: 4px;
}

/* Drawer */
.fz-drawer,
.fz-system-drawer {
    position: absolute;
    z-index: 70;
    top: 0;
    bottom: 0;
    left: var(--fz-rail-width);
    width: min(390px, calc(100vw - var(--fz-rail-width) - 18px));
    display: flex;
    flex-direction: column;
    transform: translateX(calc(-100% - 14px));
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
    background: #17212b;
    border-right: 1px solid var(--fz-border);
    box-shadow: 18px 0 45px rgba(0,0,0,0.48);
}

.fz-drawer.is-open,
.fz-system-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.fz-drawer-header {
    min-height: 80px;
    padding: 13px 14px 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #121a22;
    border-bottom: 1px solid var(--fz-border);
}

.fz-drawer-eyebrow,
.fz-content-eyebrow {
    margin-bottom: 2px;
    color: #8fa4b8;
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.fz-drawer-header h2,
.fz-content-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 750;
}

.fz-icon-btn {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--fz-border);
    border-radius: 12px;
    background: #283440;
    color: #fff;
    font-size: 1.2rem;
}

.fz-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    overscroll-behavior: contain;
}

.fz-drawer-backdrop {
    position: absolute;
    z-index: 60;
    inset: 0 0 0 var(--fz-rail-width);
    background: rgba(0,0,0,.54);
    backdrop-filter: blur(1px);
}

.fz-system-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 14px;
    overflow-y: auto;
}

.fz-system-links a {
    min-height: 52px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--fz-border);
    border-radius: 10px;
    background: #222e39;
    color: #edf3f8;
    text-decoration: none;
    font-weight: 650;
}

.fz-system-links a.is-current { border-color: #4e88c2; }
.fz-system-links .fz-system-logout { margin-top: 8px; background: #352127; }

/* Hauptfläche */
.fz-app-main {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: var(--fz-header-height) var(--fz-tabs-height) minmax(0, 1fr) var(--fz-status-height);
    background: #111820;
}

.fz-app-header {
    min-width: 0;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #17212b;
    border-bottom: 1px solid var(--fz-border);
}

.fz-app-header-main { min-width: 0; }

.fz-header-vehicle-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fz-header-vehicle-name {
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: .01em;
}

.fz-header-current-status {
    min-width: 45px;
    height: 30px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,.85);
    font-size: .86rem;
    font-weight: 900;
}

.fz-header-assignment {
    margin-top: 3px;
    color: var(--fz-muted);
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fz-connection-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: #c8d4df;
    font-size: .76rem;
    font-weight: 650;
}

.fz-connection-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #5cd67a;
    box-shadow: 0 0 0 3px rgba(92,214,122,.12);
}

.fz-connection-state.is-offline .fz-connection-dot {
    background: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255,107,107,.12);
}

/* Tabs */
.fz-view-tabs {
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 6px 12px 0;
    background: #141d26;
    border-bottom: 1px solid var(--fz-border);
}

.fz-view-tab {
    min-width: 145px;
    padding: 0 18px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 9px 9px 0 0;
    background: transparent;
    color: #aebbc8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
}

.fz-view-tab.is-active {
    color: #fff;
    background: #1d2934;
    border-bottom-color: #4e88c2;
}

/* Arbeitsbereich */
.fz-workspace {
    min-height: 0;
    overflow: hidden;
    padding: 12px;
    background: #111820;
}

.fz-view-panel {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.fz-content-card {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--fz-border);
    border-radius: 14px;
    background: #1a232c;
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
}

.fz-content-header {
    flex: 0 0 auto;
    min-height: 68px;
    padding: 11px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--fz-border);
    background: #202b36;
}

.fz-content-header h2 span {
    color: #aebbc8;
    font-size: .9rem;
    font-weight: 600;
}

.fz-content-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
}

.fz-primary-action,
.fz-form-action {
    min-height: 48px;
    padding-left: 17px;
    padding-right: 17px;
    border-radius: 10px;
    font-weight: 700;
}

.fz-primary-action i { margin-right: 5px; }

.fz-form-surface {
    max-width: 860px;
    margin: 0 auto;
    padding: 17px;
    border: 1px solid var(--fz-border);
    border-radius: 12px;
    background: #202a34;
}

.fz-form-surface .form-control,
.fz-form-surface .form-select {
    min-height: 52px;
    font-size: 1rem;
}

.fz-form-surface textarea.form-control { min-height: 120px; }

/* Einsatzkarten im Drawer */
.fz-drawer .fz-einsatz-card {
    min-height: 94px;
    margin-bottom: 10px;
    padding: 12px 13px;
    border: 1px solid rgba(255,255,255,.08);
    border-left: 5px solid #4e88c2;
    border-radius: 11px;
    background: #222d38;
}

.fz-drawer .fz-einsatz-card.is-selected {
    background: #2b3a48;
    border-color: rgba(78,136,194,.72);
    border-left-color: #65a8eb;
    box-shadow: 0 0 0 1px rgba(78,136,194,.15);
}

.fz-drawer .fz-einsatz-meldebild {
    margin-top: 5px;
    font-size: 1rem;
    font-weight: 750;
}

.fz-drawer .fz-einsatz-adresse {
    margin-top: 6px;
    font-size: .87rem;
    color: #e1e9f0;
}

.fz-drawer .fz-einsatz-menu-btn {
    width: 42px;
    height: 42px;
    border-radius: 9px;
}

/* Einsatzdetails größer und ruhiger */
.fz-detail-card .fz-content-body { padding: 18px 20px; }

.fz-detail-card .fz-einsatz-detail-title {
    font-size: 1.55rem;
}

.fz-detail-card .fz-einsatz-detail-meldebild {
    margin-top: 2px;
    font-size: 1.13rem;
}

.fz-detail-card .fz-einsatz-detail-header {
    margin-bottom: 14px;
}

.fz-detail-card .fz-anfahrt-hinweis {
    min-height: 82px;
    margin-bottom: 18px;
    border-radius: 12px;
}

.fz-detail-card .fz-einsatz-detail-columns {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 24px;
}

.fz-detail-card .fz-detail-grid {
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 11px 16px;
    font-size: .98rem;
}

.fz-detail-card .fz-detail-label {
    color: #9fb0bf;
    font-weight: 650;
}

.fz-detail-card .fz-detail-fahrzeug {
    min-height: 48px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: .9rem;
}

/* Meldungschronik als touchfreundliche Karten */
.fz-message-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fz-message-card {
    overflow: hidden;
    border: 1px solid var(--fz-border);
    border-left: 5px solid #52697e;
    border-radius: 11px;
    background: #222c36;
}

.fz-message-card.is-sofort { border-left-color: #e7a33e; }
.fz-message-card.is-blitz { border-left-color: #df5a5a; }

.fz-message-meta {
    min-height: 48px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.025);
}

.fz-message-time {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fz-message-time strong { font-size: 1.02rem; }
.fz-message-time span { color: #9eafbf; font-size: .72rem; }

.fz-message-route {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.fz-message-route strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fz-message-route i { color: #7f95a8; }

.fz-message-priority {
    padding: 5px 9px;
    border-radius: 999px;
    background: #3b2c23;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.fz-message-text {
    padding: 12px 14px 14px;
    font-size: .98rem;
    line-height: 1.42;
}

.fz-empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #aebbc8;
    text-align: center;
}

.fz-empty-state i { font-size: 2.2rem; opacity: .6; }
.fz-empty-state strong { color: #e8eef3; font-size: 1.05rem; }

/* Bilder */
.fz-view-panel[data-fz-panel="bilder"] .fz-image-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fz-view-panel[data-fz-panel="bilder"] .fz-image-card {
    border-radius: 11px;
    padding: 9px;
    background: #222c36;
}

.fz-view-panel[data-fz-panel="bilder"] .fz-image-thumb-wrap {
    height: 180px;
    border-radius: 8px;
}

/* Feststehendes Status-Dock */
.fz-status-dock {
    position: relative;
    z-index: 30;
    min-width: 0;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    background: #0f171f;
    border-top: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 -8px 24px rgba(0,0,0,.22);
}

.fz-status-dock-label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fz-status-dock-caption {
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .07em;
}

.fz-status-dock-hint {
    color: #8497a8;
    font-size: .64rem;
    line-height: 1.2;
}

.fz-status-dock .fz-status-body {
    padding: 0;
    display: block;
}

.fz-status-buttons-app {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.fz-status-buttons-app .fahrzeug-status-btn {
    --hold-duration: 800ms;
    position: relative;
    min-width: 0;
    min-height: 78px;
    overflow: hidden;
    padding: 8px 7px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border: 3px solid transparent;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.16);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    transition: transform .08s ease, border-color .1s ease, filter .1s ease;
}

.fz-status-buttons-app .fahrzeug-status-btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 7px;
    background: rgba(255,255,255,.9);
}

.fz-status-buttons-app .fahrzeug-status-btn.is-holding {
    transform: scale(.985);
    border-color: #fff;
    filter: brightness(1.08);
}

.fz-status-buttons-app .fahrzeug-status-btn.is-holding::after {
    animation: fz-status-hold-progress var(--hold-duration) linear forwards;
}

@keyframes fz-status-hold-progress {
    from { width: 0; }
    to { width: 100%; }
}

.fz-status-buttons-app .fahrzeug-status-btn.is-current,
.fz-status-buttons-app .fahrzeug-status-btn:disabled.is-current {
    border-color: #fff;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.18), 0 0 0 2px rgba(255,255,255,.10);
    opacity: 1;
}

.fz-status-number {
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
}

.fz-status-name {
    max-width: 100%;
    font-size: .67rem;
    font-weight: 700;
    line-height: 1.08;
    text-align: center;
}

.fz-status-hold-text {
    margin-top: 2px;
    font-size: .57rem;
    font-weight: 650;
    opacity: .67;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.fz-status-buttons-app .fahrzeug-status-btn.is-current .fz-status-hold-text {
    visibility: hidden;
}

/* Kleine Tablets / Hochformat: Rail bleibt, Tabs kompakter, Status gut bedienbar. */
@media (max-width: 900px) {
    .fz-app-shell {
        --fz-rail-width: 70px;
        --fz-header-height: 72px;
        --fz-tabs-height: 54px;
        --fz-status-height: 128px;
    }

    .fz-rail-btn { min-height: 61px; font-size: .62rem; }
    .fz-rail-btn i { font-size: 1.18rem; }

    .fz-view-tab {
        min-width: 0;
        flex: 1 1 0;
        padding: 0 8px;
    }

    .fz-connection-state span:last-child { display: none; }

    .fz-status-dock {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 7px 9px 9px;
    }

    .fz-status-dock-label {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .fz-status-buttons-app { gap: 5px; }
    .fz-status-buttons-app .fahrzeug-status-btn { min-height: 84px; }
    .fz-status-name { font-size: .6rem; }

    .fz-detail-card .fz-einsatz-detail-columns {
        grid-template-columns: 1fr;
    }

    .fz-detail-card .fz-einsatz-detail-data {
        padding-right: 0;
        padding-bottom: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--fz-border);
    }

    .fz-view-panel[data-fz-panel="bilder"] .fz-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fz-message-meta {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .fz-message-priority { grid-column: 2; justify-self: start; }
}

@media (max-width: 650px) {
    .fz-app-shell { --fz-rail-width: 62px; }
    .fz-rail-btn span:not(.fz-rail-badge) { font-size: .56rem; }
    .fz-app-header { padding-left: 12px; padding-right: 12px; }
    .fz-header-vehicle-name { font-size: 1.12rem; }
    .fz-header-assignment { font-size: .78rem; }
    .fz-workspace { padding: 7px; }
    .fz-content-body { padding: 11px; }
    .fz-status-number { font-size: 1.05rem; }
    .fz-status-name { display: none; }
    .fz-status-buttons-app .fahrzeug-status-btn { min-height: 75px; }
}

/* =========================================================
   FÜHRUNGSRAUM – LAYOUT V1.0 / Lagekarte ein-/auslagern
   ========================================================= */
.fuehrungsraum-shell {
    height: calc(100vh - 82px);
    min-height: 620px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fr-layout-toolbar {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 10px;
    background: #1b232b;
    border: 1px solid #34414d;
    border-radius: 8px;
    color: #f2f5f7;
    box-shadow: 0 1px 5px rgba(0,0,0,.28);
}

.fr-layout-toolbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: .02em;
}

.fr-layout-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fr-layout-toolbar-actions .btn {
    min-height: 31px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.fuehrungsraum-container {
    flex: 1;
    min-height: 0;
    height: auto;
    display: grid;
    grid-template-columns: minmax(440px, 1.8fr) repeat(4, minmax(180px, 1fr));
    /* Obere Informationszeile ca. 1/3, operative Arbeitsbereiche ca. 2/3 */
    grid-template-rows: minmax(0, 1fr) minmax(0, 2fr);
    grid-template-areas:
        "lagekarte ohne bauhof meldungen meldungen"
        "lagekarte ea1 ea2 fzgn fzextern";
    gap: 8px;
}

.fr-lagekarte { grid-area: lagekarte; }
.fr-ohne-ea { grid-area: ohne; }
.fr-bauhof { grid-area: bauhof; }
.fr-fz-gn { grid-area: fzgn; }
.fr-fz-extern { grid-area: fzextern; }
.fr-ea1 { grid-area: ea1; }
.fr-ea2 { grid-area: ea2; }
.fr-meldungen { grid-area: meldungen; }

/* Lagekarte nicht integriert: Aufteilung entsprechend Führungsraum-Skizze */
.fuehrungsraum-container.fr-map-hidden {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    /* Gleiche 1/3-zu-2/3-Aufteilung auch ohne integrierte Lagekarte */
    grid-template-rows: minmax(0, 1fr) minmax(0, 2fr);
    grid-template-areas:
        "ohne bauhof meldungen meldungen"
        "ea1 ea2 fzgn fzextern";
}

.fuehrungsraum-container.fr-map-hidden .fr-lagekarte {
    display: none;
}

/* Führungsraum-Panels kompakt und vollständig scrollbar */
.fuehrungsraum-container .fr-panel {
    min-width: 0;
    min-height: 0;
}

.fuehrungsraum-container .fr-panel-header {
    min-height: 39px;
    flex: 0 0 auto;
}

.fuehrungsraum-container .fr-panel-header h5,
.fuehrungsraum-container .fr-ea-heading > span:first-child {
    font-size: .95rem;
    font-weight: 700;
}

.fuehrungsraum-container .fr-panel-body {
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

#frLagekarte.fr-map-panel-body,
.fuehrungsraum-container #frLagekarte {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

/* ausgegliederte Lagekarte: echter Vollbild-Arbeitsplatz */
body.fuehrungsraum-map-window {
    margin: 0;
    padding: 0;
    background: #111820;
    overflow: hidden;
}

body.fuehrungsraum-map-window #frLagekarte {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.fr-map-window-badge {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(21, 29, 37, .92);
    color: #fff;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    font-size: .82rem;
    pointer-events: none;
}

.fr-map-window-badge .fr-map-window-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #56d47b;
    box-shadow: 0 0 0 3px rgba(86,212,123,.14);
}

/* Für kleinere Laptop-Auflösungen integrierte Karte nicht zu stark quetschen */
@media (max-width: 1500px) {
    .fuehrungsraum-container:not(.fr-map-hidden) {
        grid-template-columns: minmax(390px, 1.55fr) repeat(4, minmax(155px, 1fr));
    }

    .fuehrungsraum-container .fr-panel-header h5,
    .fuehrungsraum-container .fr-ea-heading > span:first-child {
        font-size: .86rem;
    }
}

/* =========================================================
   Führungsraum – robuste Dropzones + Meldungen-Layout
   ========================================================= */
.fuehrungsraum-container .fr-ohne-ea .fr-panel-body,
.fuehrungsraum-container .fr-bauhof .fr-panel-body,
.fuehrungsraum-container .fr-ea1 .fr-panel-body,
.fuehrungsraum-container .fr-ea2 .fr-panel-body {
    display: flex;
    flex-direction: column;
}

.fuehrungsraum-container .fr-einsatz-dropzone {
    flex: 1 1 auto;
    min-height: 74px;
    position: relative;
}

/* Leere Bereiche bleiben als echte und sichtbare DnD-Ziele erhalten. */
.fuehrungsraum-container .fr-einsatz-dropzone:empty {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px;
    min-height: 64px;
    border: 2px dashed rgba(255, 255, 255, .18);
    border-radius: 7px;
    background: rgba(255, 255, 255, .018);
}

.fuehrungsraum-container .fr-einsatz-dropzone:empty::before {
    content: 'Einsatz hier ablegen';
    color: rgba(220, 228, 235, .48);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .025em;
    text-align: center;
    pointer-events: none;
}

.fuehrungsraum-container .fr-einsatz-dropzone.fr-drop-container-hover {
    border: 3px dashed #ff9800;
    background: rgba(255, 152, 0, .10);
}

.fuehrungsraum-container .fr-einsatz-dropzone:empty.fr-drop-container-hover::before {
    content: 'Hier ablegen';
    color: #ffc266;
}

/* Meldungen müssen ohne horizontales Scrollen vollständig bedienbar bleiben. */
.fr-meldungen .fr-panel-body {
    overflow: auto;
}

.fr-meldungen-table-wrap {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.fr-meldungen-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    vertical-align: middle;
    font-size: .75rem;
    margin-bottom: 0;
}

.fr-meldungen-table .fr-col-time { width: 82px; }
.fr-meldungen-table .fr-col-einsatz { width: 48px; }
.fr-meldungen-table .fr-col-route { width: 25%; }
.fr-meldungen-table .fr-col-actions { width: 82px; }

.fr-meldungen-table th,
.fr-meldungen-table td {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.fr-meldungen-table .fr-meldung-route,
.fr-meldungen-table .fr-meldung-text {
    white-space: normal;
}

.fr-meldungen-table .fr-meldung-actions {
    white-space: nowrap;
    text-align: right;
    padding-left: 4px;
    padding-right: 5px;
}

.fr-meldungen-table .fr-meldung-actions-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.fr-meldungen-table .fr-meldung-actions .btn {
    width: 34px;
    height: 31px;
    padding: 3px 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}



/* =========================================================
   Führungsraum – Fremdfahrzeuge bei integrierter Lagekarte
   Standard: ausgeblendet; EA I / EA II / Fahrzeuge GN je 1/3.
   Die Meldungen behalten oben 50 % der rechten Arbeitsfläche.
   ========================================================= */
.fuehrungsraum-container:not(.fr-map-hidden) {
    grid-template-columns: minmax(440px, 1.8fr) repeat(12, minmax(0, 1fr));
    grid-template-areas: none;
}

.fuehrungsraum-container:not(.fr-map-hidden) .fr-lagekarte {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.fuehrungsraum-container:not(.fr-map-hidden) .fr-ohne-ea {
    grid-column: 2 / span 3;
    grid-row: 1;
}

.fuehrungsraum-container:not(.fr-map-hidden) .fr-bauhof {
    grid-column: 5 / span 3;
    grid-row: 1;
}

.fuehrungsraum-container:not(.fr-map-hidden) .fr-meldungen {
    grid-column: 8 / span 6;
    grid-row: 1;
}

.fuehrungsraum-container:not(.fr-map-hidden) .fr-ea1 {
    grid-column: 2 / span 4;
    grid-row: 2;
}

.fuehrungsraum-container:not(.fr-map-hidden) .fr-ea2 {
    grid-column: 6 / span 4;
    grid-row: 2;
}

.fuehrungsraum-container:not(.fr-map-hidden) .fr-fz-gn {
    grid-column: 10 / span 4;
    grid-row: 2;
}

.fuehrungsraum-container:not(.fr-map-hidden) .fr-fz-extern {
    display: none;
}

/* Fremdfahrzeuge eingeblendet: untere Reihe wieder 4 x 1/4 */
.fuehrungsraum-container:not(.fr-map-hidden).fr-external-visible .fr-ea1 {
    grid-column: 2 / span 3;
}

.fuehrungsraum-container:not(.fr-map-hidden).fr-external-visible .fr-ea2 {
    grid-column: 5 / span 3;
}

.fuehrungsraum-container:not(.fr-map-hidden).fr-external-visible .fr-fz-gn {
    grid-column: 8 / span 3;
}

.fuehrungsraum-container:not(.fr-map-hidden).fr-external-visible .fr-fz-extern {
    display: flex;
    grid-column: 11 / span 3;
    grid-row: 2;
}

.fr-fz-gn-header {
    gap: 8px;
}

.fr-fz-gn-header h5 {
    margin-right: auto;
}

.fr-external-toggle {
    flex: 0 0 auto;
    min-height: 27px;
    padding: 2px 7px;
    font-size: .72rem;
    line-height: 1.1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fuehrungsraum-container.fr-map-hidden .fr-external-toggle {
    display: none;
}

@media (max-width: 1500px) {
    .fuehrungsraum-container:not(.fr-map-hidden) {
        grid-template-columns: minmax(390px, 1.55fr) repeat(12, minmax(0, 1fr));
    }

    .fr-external-toggle span {
        display: none;
    }

    .fr-external-toggle {
        width: 30px;
        justify-content: center;
        padding-inline: 4px;
    }
}
