/* static/css/screen.css */

/* === Reset & Basis === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --border: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;

    --blue: #1f6feb;
    --red: #b62324;
    --red-light: #f85149;
    --green: #238636;
    --orange: #ffa500;
    --yellow: #ffd93d;

    --el-red: #ff6b6b;
    --ats-orange: #ffa500;
    --c-yellow: #ffd93d;

    --font-text: 'Barlow', sans-serif;
    --font-headline: 'Barlow Condensed', sans-serif;
}

html, body {
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.4;
    overflow: hidden;
}

/* === Screen-Modus: Kein Cursor === */
.screen-page {
    cursor: none;
}

/* === Login === */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    cursor: auto;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-header h1 {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue);
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-text);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #388bfd;
}

.flash {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.flash-error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid var(--red-light);
    color: var(--red-light);
}

/* === Screen === */
.screen-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    /* Einbrennschutz: langsamer Pixel-Shift gegen Burn-in im Dauerbetrieb.
       ~wenige Pixel über 15 min – fürs Auge unsichtbar, dunkles Theme
       kaschiert den minimalen Rand. */
    animation: burn-in-shift 900s linear infinite;
}

@keyframes burn-in-shift {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(6px, 4px); }
    50%  { transform: translate(3px, 8px); }
    75%  { transform: translate(-5px, 3px); }
    100% { transform: translate(0, 0); }
}

.block-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.placeholder-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.placeholder-message h1 {
    font-family: var(--font-headline);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.placeholder-message p {
    font-size: 20px;
    color: var(--text-secondary);
}

.placeholder-message .subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === Offline-Banner === */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--red);
    color: #fff;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-headline);
    z-index: 9999;
}

/* === Einsatz-Modus === */

.einsatz-liste {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
}

.einsatz-liste-label {
    color: var(--text-muted);
    font-size: 14px;
    white-space: nowrap;
    margin-right: 4px;
}

.einsatz-liste-item {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.einsatz-liste-item.active {
    border-color: var(--blue);
    color: var(--text-primary);
    font-weight: 600;
}

.einsatz-liste-item.type-brand.active { border-color: var(--red); }
.einsatz-liste-item.type-sof.active { border-color: var(--orange); }

/* Header */
.einsatz-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.einsatz-type-badge {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 8px;
    white-space: nowrap;
}

.einsatz-type-badge.type-tech { background: var(--blue); }
.einsatz-type-badge.type-brand { background: var(--red); }
.einsatz-type-badge.type-sof { background: var(--orange); color: #000; }

.einsatz-title h1 {
    font-family: var(--font-headline);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.einsatz-time {
    color: var(--text-muted);
    font-size: 16px;
}

/* Adresse */
.einsatz-adresse {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.einsatz-adresse-label,
.einsatz-section-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.einsatz-adresse-text {
    font-size: 22px;
    font-weight: 600;
}

.einsatz-info {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 6px;
}

/* Feuerwehren */
.einsatz-feuerwehren {
    margin-bottom: 12px;
}

.fw-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.fw-chip {
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 15px;
    border-left: 3px solid var(--blue);
}

/* Rückmeldungen */
.einsatz-rueckmeldungen {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.rueck-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.rueck-ja {
    background: var(--green);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 700;
}

.rueck-nein {
    color: var(--red-light);
    font-size: 16px;
}

.fn-chip {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.fn-chip.fn-el { background: var(--red); }
.fn-chip.fn-ats { background: #9e6a03; }
.fn-chip.fn-c { background: #7d6807; }

/* Personenliste – 2-3 Spalten je nach Breite */
.person-list {
    flex: 1;
    overflow: hidden;
    column-count: 2;
    column-gap: 16px;
}

@media (min-width: 1600px) {
    .person-list {
        column-count: 3;
    }
}

.person-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px;
    border-bottom: 1px solid var(--bg-tertiary);
    font-size: 16px;
    break-inside: avoid;
}

.person-bar {
    width: 4px;
    height: 24px;
    background: var(--green);
    border-radius: 2px;
    flex-shrink: 0;
}

.person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.person-name {
    font-size: 18px;
    font-weight: 500;
}

.person-freetext {
    font-size: 14px;
    color: var(--yellow, #e3b341);
    font-style: italic;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-row.has-freetext .person-bar {
    height: auto;
    align-self: stretch;
}

.person-fns {
    display: flex;
    gap: 4px;
}

.fn-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.fn-tag.fn-el { background: var(--red); }
.fn-tag.fn-ats { background: #9e6a03; }
.fn-tag.fn-c { background: #7d6807; }

.person-time {
    color: var(--text-muted);
    font-size: 14px;
    width: 55px;
    text-align: right;
    flex-shrink: 0;
}

/* === Karten === */

.einsatz-header-compact {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.einsatz-header-compact h1 {
    font-size: 24px;
}

.map-container {
    display: flex;
    gap: 12px;
    flex: 1 1 0;
    min-height: 0;
    height: 0; /* Erzwingt gleiche Höhe in flex-column Parent */
}

.map-panel {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    max-width: 50%;
}

.map-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-align: center;
}

.map-view {
    flex: 1 1 0;
    min-height: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.map-info {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.route-distance,
.route-duration {
    font-size: 22px;
    font-weight: 700;
    color: #58a6ff;
    font-family: var(--font-headline);
}

.hydrant-distance {
    font-size: 18px;
    font-weight: 600;
    color: var(--blue);
}

.loeschwasser-distance {
    font-size: 18px;
    font-weight: 600;
    color: var(--green);
}

.no-hydrants {
    color: var(--text-muted);
}

/* Karten-Marker */
.marker-fw {
    width: 36px;
    height: 36px;
    background: var(--green);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.marker-einsatz {
    width: 20px;
    height: 20px;
    background: var(--red-light);
    border: 2px solid #fff;
    border-radius: 50%;
}

.marker-hydrant {
    width: 22px;
    height: 22px;
    background: var(--blue);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.marker-loeschwasser {
    width: 22px;
    height: 22px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.marker-saugstelle {
    width: 22px;
    height: 22px;
    background: #6e40c9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

/* Legende */
.map-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.marker-fw-sm {
    display: inline-flex;
    width: 16px;
    height: 16px;
    background: var(--green);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 700;
    color: #fff;
}

.marker-einsatz-sm {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--red-light);
    border-radius: 50%;
}

.marker-hydrant-sm {
    display: inline-flex;
    width: 14px;
    height: 14px;
    background: var(--blue);
    border-radius: 3px;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
}

.marker-loeschwasser-sm {
    display: inline-flex;
    width: 14px;
    height: 14px;
    background: var(--green);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
}

.route-line-sm {
    display: inline-block;
    width: 20px;
    height: 3px;
    background: #58a6ff;
    border-radius: 2px;
}

/* Alarm-Animation */
@keyframes alarm-blink {
    0%, 100% { background: var(--bg-primary); }
    50% { background: rgba(182, 35, 36, 0.3); }
}

@keyframes alarm-glow {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 30px rgba(248, 81, 73, 0.4); }
}

.alarm-active .einsatz-header {
    animation: alarm-blink 1s ease-in-out 5;
}

.alarm-active .einsatz-type-badge {
    animation: alarm-glow 1s ease-in-out 5;
}

/* === Standby Screen 1 (Grid Layout) === */

.standby-grid {
    display: grid;
    height: 100%;
    gap: 12px;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto 1fr 1fr;
    grid-template-areas:
        "header header"
        "warnung warnung"
        "wetter kalender"
        "einsaetze kalender";
}

/* Wenn keine Warnung: warnung-Zeile auf 0 schrumpfen */
.standby-grid:not(:has(.grid-warnung)) {
    grid-template-rows: auto 1fr 1fr;
    grid-template-areas:
        "header header"
        "wetter kalender"
        "einsaetze kalender";
}

.grid-header { grid-area: header; }
.grid-warnung { grid-area: warnung; display: flex; flex-direction: column; gap: 6px; }
.grid-wetter { grid-area: wetter; min-height: 0; display: flex; }
.grid-kalender { grid-area: kalender; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.grid-einsaetze { grid-area: einsaetze; min-height: 0; display: flex; flex-direction: column; gap: 10px; }

.grid-wetter > .block-card,
.grid-einsaetze > .block-card {
    flex: 1;
    min-height: 0;
}

.grid-kalender > .block-card {
    flex: 0 0 auto;
    min-height: 0;
}

/* Kalender-Card darf wachsen wenn Termine da sind */
.grid-kalender > .block-card:first-child {
    flex: 1 1 auto;
}

/* Altes Layout - bleibt für Kompatibilität */
.standby-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 14px;
}

.standby-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.standby-fw-name { justify-self: start; }
.standby-logo-wrap { justify-self: center; }
.standby-clock { justify-self: end; text-align: right; }

.standby-fw-name h1 {
    font-family: var(--font-headline);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.standby-fw-name p {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* === Block Cards === */
.block-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.block-header {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.block-footer {
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 6px;
    flex-shrink: 0;
}

.block-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 12px 10px;
    font-size: 13px;
}

.standby-fw-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.standby-logo-wrap {
    background: #fff;
    border-radius: 9999px;
    padding: 6px 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
}

.fw-logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    display: block;
}

.standby-fw-logo h1 {
    font-family: var(--font-headline);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.standby-fw-logo p {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 2px;
}

.standby-clock {
    text-align: right;
}

.clock-time {
    font-family: var(--font-headline);
    font-size: 80px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1;
}

.clock-date {
    font-size: 20px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* UWZ Warnung */
.standby-warnung {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.warnung-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 165, 0, 0.12);
    border-left: 4px solid var(--orange);
}

.warnung-box.warnung-level-2 { border-left-color: #ff6600; background: rgba(255, 102, 0, 0.15); }
.warnung-box.warnung-level-3 { border-left-color: var(--red-light); background: rgba(248, 81, 73, 0.15); }

.warnung-icon { font-size: 24px; color: var(--orange); }
.warnung-text strong { display: block; font-size: 15px; font-weight: 700; }
.warnung-text span { display: block; font-size: 12px; color: var(--text-secondary); }

/* Hauptbereich */
.standby-main {
    display: flex;
    gap: 14px;
    flex: 1;
    min-height: 0;
}

/* Wetter */
.standby-wetter {
    flex: 0 0 44%;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.wetter-header, .kalender-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
}

.wetter-aktuell {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.wetter-temp {
    font-family: var(--font-headline);
    font-size: 80px;
    font-weight: 700;
    line-height: 1;
    color: #58a6ff;
}

.wetter-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wetter-info > div {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
}

.wetter-info .label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 14px;
}

.wetter-vorhersage {
    display: flex;
    gap: 5px;
    flex: 1;
    min-height: 0;
}

.wetter-tag {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 8px 3px;
    background: var(--bg-primary);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
}

.tag-detail {
    font-size: 18px;
    color: #58a6ff;
}

.tag-name {
    font-size: 26px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.tag-symbol { font-size: 56px; }

.tag-temp {
    font-size: 30px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.tag-temp .max { color: #f85149; font-weight: 700; }
.tag-temp .min { color: #58a6ff; }

.tag-regen {
    font-size: 18px;
    color: #58a6ff;
}

.wetter-quelle {
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 8px;
}

/* Pegelstände */
.pegel-card {
    flex-shrink: 0;
    margin-top: 10px;
}

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

.pegel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: var(--bg-primary);
    border-radius: 5px;
    border-left: 3px solid var(--green);
    font-size: 16px;
}

.pegel-gelb { border-left-color: var(--yellow); }
.pegel-orange { border-left-color: var(--orange); }
.pegel-rot { border-left-color: var(--red-light); background: rgba(248, 81, 73, 0.08); }

.pegel-left {
    flex: 1;
    min-width: 0;
}

.pegel-station {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pegel-hq {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.pegel-hq-erreicht {
    color: var(--red-light);
    font-weight: 700;
}

.pegel-fluss {
    font-size: 13px;
    color: var(--text-muted);
}

.pegel-wert {
    font-family: var(--font-headline);
    font-size: 20px;
    font-weight: 700;
}

.pegel-rot .pegel-wert { color: var(--red-light); }
.pegel-orange .pegel-wert { color: var(--orange); }

/* Vergangene Einsätze (eigene) */
.own-events-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    overflow: hidden;
}

.own-event-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-primary);
    border-radius: 6px;
    border-left: 3px solid var(--blue);
}

.event-typ {
    font-family: var(--font-headline);
    font-size: 18px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    min-width: 36px;
    text-align: center;
}

.event-typ.typ-brand { background: var(--red); }
.event-typ.typ-sof { background: var(--orange); color: #000; }

.event-info {
    flex: 1;
    min-width: 0;
}

.event-titel {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-fw-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.event-ort {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-zeit {
    text-align: right;
    font-size: 15px;
    white-space: nowrap;
}

.event-zeit .muted {
    color: var(--text-muted);
    font-size: 11px;
}

/* Statistik */
.stat-card {
    flex-shrink: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.stat-item {
    background: var(--bg-primary);
    border-radius: 6px;
    padding: 10px 6px;
    text-align: center;
}

.stat-num {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.stat-num.stat-brand { color: var(--red-light); }
.stat-num.stat-tech { color: #58a6ff; }
.stat-num.stat-sof { color: var(--orange); }

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Geburtstage */
.birthday-card {
    flex-shrink: 0;
}

.birthday-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.birthday-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: var(--bg-primary);
    border-radius: 5px;
}

.bd-date {
    font-family: var(--font-headline);
    font-size: 18px;
    font-weight: 700;
    min-width: 50px;
    color: #f0883e;
}

.bd-info {
    flex: 1;
    min-width: 0;
}

.bd-name {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bd-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.bd-tage {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Countdown */
.countdown-card {
    flex-shrink: 0;
}

.countdown-body {
    text-align: center;
    padding: 8px 0;
}

.countdown-event {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.countdown-tage {
    font-family: var(--font-headline);
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    color: #58a6ff;
}

.countdown-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.wetter-loading {
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

/* Kalender */
.standby-kalender {
    flex: 1;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kalender-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

.kalender-leer {
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
    font-size: 13px;
}

.termin-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-primary);
    border-radius: 6px;
    border-left: 3px solid #58a6ff;
}

.termin-datum {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.termin-datum .wday {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.termin-datum .tag {
    font-family: var(--font-headline);
    font-size: 18px;
    font-weight: 700;
}

.termin-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.termin-titel {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.termin-ort {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.termin-zeit {
    font-size: 16px;
    font-weight: 600;
    color: #58a6ff;
    white-space: nowrap;
}

/* === WASTL === */

.wastl-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.wastl-title {
    font-family: var(--font-headline);
    font-size: 26px;
    font-weight: 700;
}

.wastl-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

.wastl-loading {
    color: var(--text-muted);
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

/* NÖ Tags */
.wastl-noe-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.wastl-tag {
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.wastl-tag-total {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    background: var(--red);
    color: #fff;
    margin-right: 6px;
}

.wastl-tag.tag-ok { border-color: var(--border); color: var(--text-muted); }
.wastl-tag.tag-aktiv { border-color: var(--orange); background: rgba(158, 106, 3, 0.2); color: var(--orange); }
.wastl-tag.tag-alarm { border-color: var(--red); background: rgba(182, 35, 36, 0.2); color: var(--red-light); }

/* === Neues Layout V2: Karten oben, Listen unten === */
.wastl-layout-v2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.wastl-karten-row {
    display: flex;
    gap: 12px;
    flex: 1 1 72%;
    min-height: 0;
}

.wastl-karte-square {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
}

.wastl-karte-square .wastl-section-label {
    text-align: center;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.wastl-map-square {
    flex: 1;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    min-height: 0;
}

/* Hintergrund-Tiles: stark entsättigt und transparent, damit Bezirke dominieren */
.wastl-map-square .leaflet-tile-pane {
    filter: grayscale(0.9) brightness(1.15) contrast(0.7) opacity(0.4);
}

.wastl-listen-row {
    display: flex;
    gap: 10px;
    flex: 1 1 28%;
    min-height: 0;
}

.wastl-listen-row .wastl-liste {
    flex: 1 1 0;
    min-width: 0;
}

/* === Altes Layout (wird nicht mehr genutzt aber zur Sicherheit behalten) === */
.wastl-layout {
    display: flex;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.wastl-col-karte {
    flex: 0 0 32%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wastl-col-listen {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
}

/* Bezirkskarte */
.wastl-bezirk {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wastl-bezirk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.wastl-section-label {
    font-size: 16px;
    font-weight: 700;
}

.wastl-status-ok { color: var(--green); font-size: 14px; }
.wastl-status-aktiv { color: var(--red-light); font-size: 14px; font-weight: 700; }

.wastl-karten-dual {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.wastl-karte-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* NÖ-Karte oben: quadratisch (volle Spaltenbreite, Höhe = Breite) */
.wastl-karte-panel:first-child {
    flex: 0 0 auto;
}

.wastl-karte-panel:first-child .wastl-map-view {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    flex: none;
}

/* Detail-Karte unten: füllt restlichen Platz */
.wastl-karte-panel:last-child {
    flex: 1 1 0;
    min-height: 80px;
}

.wastl-map-view {
    flex: 1;
    min-height: 100px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.wastl-map-label span {
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-headline);
    letter-spacing: 0.5px;
    text-align: center;
    display: block;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    padding: 2px 5px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.wastl-legende {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.wastl-legende span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wastl-dot-bereit, .wastl-dot-einsatz, .wastl-dot-observiert, .wastl-dot-eigen {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.wastl-dot-bereit { background: var(--green); }
.wastl-dot-einsatz { background: var(--orange); }
.wastl-dot-alarm { background: var(--red-light); }
.wastl-dot-eigen { background: var(--green); box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.5); }

/* Einsatzlisten */
.wastl-liste {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 8px;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wastl-liste-aktiv {
    border-left: 3px solid var(--red-light);
}

.wastl-liste-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.wastl-badge-count {
    background: var(--red-light);
    color: #fff;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

.wastl-liste-leer {
    color: var(--text-muted);
    font-size: 15px;
    padding: 8px;
    text-align: center;
}

.wastl-liste-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wastl-liste-fix {
    flex-shrink: 0;
}

.wastl-liste-rotate {
    margin-top: 2px;
    border-top: 1px solid var(--border);
    padding-top: 2px;
    max-height: 60px;
    overflow: hidden;
}

.wastl-einsatz-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    font-size: 14px;
}

.wastl-row-aktiv {
    border-left: 3px solid var(--orange);
}

.wastl-einsatz-typ {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.wastl-einsatz-typ.typ-tech { background: var(--blue); }
.wastl-einsatz-typ.typ-brand { background: var(--red); }
.wastl-einsatz-typ.typ-sof { background: var(--orange); color: #000; }

.wastl-einsatz-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wastl-einsatz-zeit {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.wastl-fw-count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.wastl-filter-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 4px;
    font-style: italic;
}
