/* ===================================================
   Mechmeister - Plattform-Admin (plattform.html)

   Eine eigene Seite mit eigenem Stylesheet: Die rund 35 Stylesheets der
   App laden hier nicht, Kollisionen gibt es also keine. Praefix pf-.

   Farben: Datenfarbe und Statusfarben aus der geprueften Palette
   (Kontrast >= 3:1 auf beiden Kartenflaechen). Text traegt nie die
   Datenfarbe; Status steht immer mit Symbol und Wort.
   =================================================== */

:root {
    color-scheme: light;
    --pf-seite: #f4f6f9;
    --pf-flaeche: #ffffff;
    --pf-flaeche-2: #f8fafc;
    --pf-flaeche-hover: #f1f5f9;
    --pf-linie: #e2e8f0;
    --pf-raster: #edf1f6;
    --pf-achse: #cbd5e1;
    --pf-text: #0f172a;
    --pf-text-2: #475569;
    --pf-text-3: #64748b;
    --pf-akzent: #0284c7;
    --pf-akzent-hover: #0369a1;
    --pf-akzent-text: #ffffff;
    --pf-akzent-weich: #e0f2fe;
    --pf-fokus: #0284c7;
    --pf-serie: #2a78d6;
    --pf-serie-aktiv: #184f95;
    --pf-serie-spur: #cde2fb;
    --pf-gut: #0ca30c;
    --pf-warnung: #fab219;
    --pf-ernst: #ec835a;
    --pf-kritisch: #d03b3b;
    --pf-gut-text: #006300;
    --pf-warnung-text: #8a5a00;
    --pf-kritisch-text: #b42318;
    --pf-gut-weich: #ecfdf3;
    --pf-warnung-weich: #fff7e6;
    --pf-kritisch-weich: #fef2f2;
    --pf-schatten: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px -6px rgba(15, 23, 42, .08);
    --pf-radius: 12px;
    --pf-schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --pf-seite: #0f141c;
        --pf-flaeche: #171d27;
        --pf-flaeche-2: #1b2230;
        --pf-flaeche-hover: #212a38;
        --pf-linie: #2b3442;
        --pf-raster: #232b37;
        --pf-achse: #3a4556;
        --pf-text: #f5f7fa;
        --pf-text-2: #c5ccd6;
        --pf-text-3: #95a0b0;
        --pf-akzent: #38bdf8;
        --pf-akzent-hover: #7dd3fc;
        --pf-akzent-text: #0b1220;
        --pf-akzent-weich: rgba(56, 189, 248, .14);
        --pf-fokus: #7dd3fc;
        --pf-serie: #3987e5;
        --pf-serie-aktiv: #86b6ef;
        --pf-serie-spur: #0d366b;
        --pf-gut-text: #4ade80;
        --pf-warnung-text: #fbbf24;
        --pf-kritisch-text: #f87171;
        --pf-gut-weich: rgba(12, 163, 12, .14);
        --pf-warnung-weich: rgba(250, 178, 25, .12);
        --pf-kritisch-weich: rgba(208, 59, 59, .16);
        --pf-schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px -8px rgba(0, 0, 0, .5);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --pf-seite: #0f141c;
    --pf-flaeche: #171d27;
    --pf-flaeche-2: #1b2230;
    --pf-flaeche-hover: #212a38;
    --pf-linie: #2b3442;
    --pf-raster: #232b37;
    --pf-achse: #3a4556;
    --pf-text: #f5f7fa;
    --pf-text-2: #c5ccd6;
    --pf-text-3: #95a0b0;
    --pf-akzent: #38bdf8;
    --pf-akzent-hover: #7dd3fc;
    --pf-akzent-text: #0b1220;
    --pf-akzent-weich: rgba(56, 189, 248, .14);
    --pf-fokus: #7dd3fc;
    --pf-serie: #3987e5;
    --pf-serie-aktiv: #86b6ef;
    --pf-serie-spur: #0d366b;
    --pf-gut-text: #4ade80;
    --pf-warnung-text: #fbbf24;
    --pf-kritisch-text: #f87171;
    --pf-gut-weich: rgba(12, 163, 12, .14);
    --pf-warnung-weich: rgba(250, 178, 25, .12);
    --pf-kritisch-weich: rgba(208, 59, 59, .16);
    --pf-schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px -8px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--pf-seite);
    color: var(--pf-text);
    font: 15px/1.5 var(--pf-schrift);
    overflow-x: hidden;
}

[hidden] { display: none !important; }

a { color: var(--pf-akzent); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--pf-fokus); outline-offset: 2px; }

/* Die Symbolsammlung am Anfang von plattform.html: unsichtbar, aber nicht
   display:none - sonst zeigen manche Browser die <use>-Verweise leer. */
.pf-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.pf-symbol { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pf-symbol-klein { width: 14px; height: 14px; }

.pf-nur-leser {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Kopf --------------------------------------------------------------- */

.pf-kopf {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: var(--pf-flaeche);
    border-bottom: 1px solid var(--pf-linie);
}

.pf-marke { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--pf-text); text-decoration: none; }
.pf-marke img { width: 30px; height: 30px; flex: none; }
/* Das Logo ist links marineblau - auf dunklem Grund unsichtbar. Im
   Dunkelmodus steht es deshalb auf einer hellen Kachel. */
:root[data-theme="dark"] .pf-marke img { padding: 3px; border-radius: 8px; background: #f5f7fa; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pf-marke img { padding: 3px; border-radius: 8px; background: #f5f7fa; }
}
.pf-sperre-marke { margin-bottom: 18px; }
.pf-marke strong { font-size: 16px; letter-spacing: .01em; white-space: nowrap; }
.pf-marke small { display: block; color: var(--pf-text-3); font-size: 12px; font-weight: 500; white-space: nowrap; }

.pf-kopf-rechts { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.pf-ich { color: var(--pf-text-2); font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Knoepfe ------------------------------------------------------------ */

.pf-knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid var(--pf-linie);
    border-radius: 9px;
    background: var(--pf-flaeche);
    color: var(--pf-text);
    font-size: 14px;
    font-weight: 550;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.pf-knopf:hover { background: var(--pf-flaeche-hover); }
.pf-knopf:disabled { opacity: .55; cursor: default; }
.pf-knopf-haupt { background: var(--pf-akzent); border-color: var(--pf-akzent); color: var(--pf-akzent-text); }
.pf-knopf-haupt:hover { background: var(--pf-akzent-hover); border-color: var(--pf-akzent-hover); }
.pf-knopf-gefahr { color: var(--pf-kritisch-text); border-color: color-mix(in srgb, var(--pf-kritisch) 45%, var(--pf-linie)); }
.pf-knopf-gefahr:hover { background: var(--pf-kritisch-weich); }
.pf-knopf-gefahr.pf-knopf-haupt { background: var(--pf-kritisch); border-color: var(--pf-kritisch); color: #ffffff; }
.pf-knopf-klein { min-height: 32px; padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.pf-knopf-text { border-color: transparent; background: transparent; color: var(--pf-akzent); padding-left: 6px; padding-right: 6px; }
.pf-knopf-text:hover { background: var(--pf-akzent-weich); }

.pf-umschalter { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--pf-linie); border-radius: 10px; background: var(--pf-flaeche-2); flex-wrap: wrap; }
.pf-umschalter button {
    min-height: 32px;
    padding: 4px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--pf-text-2);
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
}
.pf-umschalter button:hover { color: var(--pf-text); background: var(--pf-flaeche-hover); }
.pf-umschalter button[aria-pressed="true"] { background: var(--pf-flaeche); color: var(--pf-text); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }

/* --- Rahmen: Navigation und Inhalt -------------------------------------- */

.pf-rahmen {
    display: grid;
    grid-template-columns: 216px minmax(0, 1fr);
    gap: 24px;
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px;
}

.pf-nav { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.pf-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 9px;
    color: var(--pf-text-2);
    font-size: 14px;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
}
.pf-nav a:hover { background: var(--pf-flaeche-hover); color: var(--pf-text); }
.pf-nav a[aria-current="page"] { background: var(--pf-akzent-weich); color: var(--pf-text); }
.pf-nav a[aria-current="page"] .pf-symbol { color: var(--pf-akzent); }
.pf-nav-zahl { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--pf-warnung-weich); color: var(--pf-warnung-text); font-size: 12px; text-align: center; }

.pf-inhalt { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pf-inhalt.pf-laedt { opacity: .55; transition: opacity .15s; }

.pf-seitenkopf { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pf-seitenkopf h1 { margin: 0; font-size: 22px; line-height: 1.25; }
.pf-seitenkopf p { margin: 2px 0 0; color: var(--pf-text-3); font-size: 14px; }
.pf-seitenkopf .pf-aktionen { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pf-zurueck { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 13px; font-weight: 550; text-decoration: none; }

.pf-filterleiste { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pf-filterleiste .pf-zeitraum-text { color: var(--pf-text-3); font-size: 13px; }
.pf-stand { margin-left: auto; color: var(--pf-text-3); font-size: 12px; display: inline-flex; align-items: center; gap: 8px; }

/* --- Karten und Kacheln -------------------------------------------------- */

.pf-karte {
    min-width: 0;
    background: var(--pf-flaeche);
    border: 1px solid var(--pf-linie);
    border-radius: var(--pf-radius);
    box-shadow: var(--pf-schatten);
    padding: 16px 18px;
}
.pf-karte-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pf-karte-kopf h2 { margin: 0; font-size: 16px; }
.pf-karte-kopf p { margin: 0; color: var(--pf-text-3); font-size: 13px; flex-basis: 100%; }
.pf-karte-kopf .pf-rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.pf-zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.pf-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pf-kachel {
    min-width: 0;
    padding: 14px 16px;
    background: var(--pf-flaeche);
    border: 1px solid var(--pf-linie);
    border-radius: var(--pf-radius);
    box-shadow: var(--pf-schatten);
}
.pf-kachel-name { color: var(--pf-text-2); font-size: 13px; font-weight: 550; }
.pf-kachel-wert { margin-top: 4px; font-size: 28px; font-weight: 650; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pf-kachel-unter { margin-top: 4px; color: var(--pf-text-3); font-size: 13px; }

/* --- Hinweise ------------------------------------------------------------ */

.pf-hinweis {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--pf-linie);
    border-left: 4px solid var(--pf-akzent);
    border-radius: 10px;
    background: var(--pf-flaeche);
    font-size: 14px;
}
.pf-hinweis .pf-symbol { margin-top: 1px; }
.pf-hinweis-warnung { border-left-color: var(--pf-warnung); background: var(--pf-warnung-weich); }
.pf-hinweis-warnung .pf-symbol { color: var(--pf-warnung-text); }
.pf-hinweis-kritisch { border-left-color: var(--pf-kritisch); background: var(--pf-kritisch-weich); }
.pf-hinweis-kritisch .pf-symbol { color: var(--pf-kritisch-text); }
.pf-hinweis p { margin: 0; }
.pf-hinweis .pf-knopf { margin-left: auto; }

.pf-leer { padding: 22px 8px; color: var(--pf-text-3); font-size: 14px; text-align: center; }
.pf-klein { color: var(--pf-text-3); font-size: 13px; }

/* --- Chips (Abo-Stand, Status) ------------------------------------------ */

.pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px 2px 7px;
    border: 1px solid var(--pf-linie);
    border-radius: 99px;
    background: var(--pf-flaeche-2);
    color: var(--pf-text);
    font-size: 12.5px;
    font-weight: 550;
    white-space: nowrap;
}
.pf-chip .pf-symbol { width: 14px; height: 14px; color: var(--pf-text-3); }
.pf-chip-gut .pf-symbol { color: var(--pf-gut); }
.pf-chip-warnung .pf-symbol { color: var(--pf-warnung-text); }
.pf-chip-kritisch .pf-symbol { color: var(--pf-kritisch); }
.pf-chip-gut { background: var(--pf-gut-weich); }
.pf-chip-warnung { background: var(--pf-warnung-weich); }
.pf-chip-kritisch { background: var(--pf-kritisch-weich); }
.pf-chip-detail { display: block; margin-top: 2px; color: var(--pf-text-3); font-size: 12px; white-space: nowrap; }

.pf-stufen { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-stufe { flex: 1 1 140px; padding: 10px 12px; border: 1px solid var(--pf-linie); border-radius: 10px; background: var(--pf-flaeche-2); }
.pf-stufe strong { display: block; font-size: 22px; line-height: 1.2; }

/* --- Tabellen ------------------------------------------------------------ */

.pf-tabelle-rahmen { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pf-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.pf-tabelle th, .pf-tabelle td { padding: 9px 10px; border-bottom: 1px solid var(--pf-linie); text-align: left; vertical-align: middle; }
.pf-tabelle th { color: var(--pf-text-3); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.pf-tabelle tbody tr:last-child td { border-bottom: 0; }
.pf-tabelle .pf-zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-tabelle .pf-name { font-weight: 600; }
.pf-tabelle .pf-unter { display: block; color: var(--pf-text-3); font-size: 12.5px; font-weight: 400; overflow-wrap: anywhere; }
.pf-tabelle tr.pf-klickbar { cursor: pointer; }
.pf-tabelle tr.pf-klickbar:hover td { background: var(--pf-flaeche-hover); }
.pf-tabelle tr.pf-abgeschaltet td { color: var(--pf-text-3); }
.pf-tabelle th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.pf-tabelle th button:focus-visible { outline: 2px solid var(--pf-fokus); outline-offset: 2px; border-radius: 4px; }
.pf-tabelle th[aria-sort] button { color: var(--pf-text); }
.pf-tabelle td.pf-aktion { width: 1%; text-align: right; white-space: nowrap; }
.pf-tabelle input.pf-feld { max-width: 110px; }
.pf-tabelle input.pf-feld[name="modell"] { min-width: 220px; max-width: none; }

.pf-suche { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pf-suche input[type="search"] { flex: 1 1 240px; max-width: 420px; }

/* --- Formulare ----------------------------------------------------------- */

.pf-feld {
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid var(--pf-achse);
    border-radius: 9px;
    background: var(--pf-flaeche);
    color: var(--pf-text);
    font-size: 15px;
}
.pf-feld:focus { outline: 2px solid var(--pf-fokus); outline-offset: 0; border-color: var(--pf-fokus); }
select.pf-feld[size] { min-height: 0; padding: 4px; }
.pf-form { display: flex; flex-direction: column; gap: 14px; }
.pf-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.pf-karte h3 { margin: 18px 0 6px; font-size: 13px; font-weight: 600; }
.pf-karte code, .pf-tabelle code { font: 12.5px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
.pf-form label, .pf-form .pf-label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--pf-text-2); }
.pf-form .pf-hilfe { font-weight: 400; color: var(--pf-text-3); font-size: 12.5px; }
.pf-reihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pf-wahl { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-wahl label {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--pf-linie);
    border-radius: 9px;
    background: var(--pf-flaeche-2);
    color: var(--pf-text);
    font-weight: 550;
    cursor: pointer;
}
.pf-wahl input { accent-color: var(--pf-akzent); width: 16px; height: 16px; margin: 0; }
.pf-fehlertext { color: var(--pf-kritisch-text); font-size: 13.5px; font-weight: 550; min-height: 1em; }

/* --- Dialoge ------------------------------------------------------------- */

.pf-dialog {
    width: min(580px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 1px solid var(--pf-linie);
    border-radius: 14px;
    background: var(--pf-flaeche);
    color: var(--pf-text);
    box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .35);
}
.pf-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.pf-dialog-kopf { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--pf-linie); }
.pf-dialog-kopf h2 { margin: 0; font-size: 17px; }
.pf-dialog-kopf .pf-knopf { margin-left: auto; }
.pf-dialog-rumpf { padding: 18px 20px; overflow-y: auto; max-height: calc(100dvh - 180px); }
.pf-dialog-fuss { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--pf-linie); background: var(--pf-flaeche-2); border-radius: 0 0 14px 14px; }

.pf-geheim {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px dashed var(--pf-achse);
    border-radius: 10px;
    background: var(--pf-flaeche-2);
    font: 600 20px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace;
    letter-spacing: .04em;
    overflow-wrap: anywhere;
}
.pf-geheim .pf-knopf { margin-left: auto; font-family: var(--pf-schrift); letter-spacing: 0; }
.pf-daten { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 14px; }
.pf-daten dt { color: var(--pf-text-3); }
.pf-daten dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

/* --- Zeilenmenue ----------------------------------------------------------- */

.pf-menue { position: relative; display: inline-block; }
.pf-menue > summary { list-style: none; }
.pf-menue > summary::-webkit-details-marker { display: none; }
.pf-menue-liste {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 15;
    min-width: 230px;
    padding: 6px;
    border: 1px solid var(--pf-linie);
    border-radius: 11px;
    background: var(--pf-flaeche);
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .35);
    display: flex;
    flex-direction: column;
}
.pf-menue-liste button {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.pf-menue-liste button:hover { background: var(--pf-flaeche-hover); }
.pf-menue-liste button.pf-gefahr { color: var(--pf-kritisch-text); }
.pf-menue-liste hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--pf-linie); }

/* --- Diagramme ----------------------------------------------------------- */

.pf-diagramm { position: relative; width: 100%; }
.pf-diagramm svg { display: block; width: 100%; height: auto; overflow: visible; }
.pf-diagramm svg:focus-visible { outline: 2px solid var(--pf-fokus); outline-offset: 4px; border-radius: 6px; }
.pf-raster { stroke: var(--pf-raster); stroke-width: 1; shape-rendering: crispEdges; }
.pf-grundlinie { stroke: var(--pf-achse); stroke-width: 1; shape-rendering: crispEdges; }
.pf-achse-text { fill: var(--pf-text-3); font-size: 11px; font-family: var(--pf-schrift); font-variant-numeric: tabular-nums; }
.pf-saeule { fill: var(--pf-serie); }
.pf-saeule.pf-aktiv { fill: var(--pf-serie-aktiv); }
.pf-trefferflaeche { fill: transparent; }
.pf-markierung { stroke: var(--pf-achse); stroke-width: 1; }

.pf-tipp {
    position: absolute;
    z-index: 5;
    min-width: 150px;
    padding: 9px 11px;
    border: 1px solid var(--pf-linie);
    border-radius: 9px;
    background: var(--pf-flaeche);
    box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .35);
    font-size: 12.5px;
    line-height: 1.45;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 10px));
    white-space: nowrap;
}
.pf-tipp strong { display: block; font-size: 15px; }
.pf-tipp span { color: var(--pf-text-3); }
.pf-tipp .pf-tipp-zeile { display: flex; align-items: center; gap: 6px; color: var(--pf-text-2); }
.pf-tipp .pf-strich { width: 12px; height: 2px; background: var(--pf-serie); border-radius: 1px; }

.pf-balken { display: flex; flex-direction: column; gap: 10px; }
.pf-balken-zeile { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13.5px; }
.pf-balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pf-text-2); }
.pf-balken-name a { color: inherit; text-decoration: none; }
.pf-balken-name a:hover { color: var(--pf-akzent); text-decoration: underline; }
.pf-balken-spur { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* Der laengste Balken laesst 9,5em fuer seinen Wert frei - so passt die
   Beschriftung immer an die Spitze, ohne ueber die Karte zu ragen. */
.pf-balken-fuellung { width: calc((100% - 9.5em) * var(--pf-anteil, 0)); height: 12px; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--pf-serie); flex: none; }
.pf-balken-wert { color: var(--pf-text); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 550; }

.pf-meter { display: flex; flex-direction: column; gap: 6px; }
.pf-meter + .pf-meter { margin-top: 16px; }
.pf-meter-kopf { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.pf-meter-kopf strong { font-size: 15px; }
.pf-meter-kopf span { color: var(--pf-text-3); font-size: 13px; }
.pf-meter-kopf .pf-chip { margin-left: auto; }
.pf-meter-spur { height: 10px; border-radius: 99px; background: var(--pf-serie-spur); overflow: hidden; }
.pf-meter-fuellung { height: 100%; min-width: 2px; border-radius: 99px; background: var(--pf-serie); }
.pf-meter-fuellung.pf-warnung { background: var(--pf-warnung); }
.pf-meter-fuellung.pf-kritisch { background: var(--pf-kritisch); }

/* --- Sperrseite und Meldungen -------------------------------------------- */

.pf-sperre { max-width: 560px; margin: 12vh auto 0; padding: 0 16px; }
.pf-sperre .pf-karte { padding: 28px; text-align: left; }
.pf-sperre h1 { margin: 0 0 8px; font-size: 22px; }
.pf-sperre p { margin: 0 0 18px; color: var(--pf-text-2); }

.pf-meldungen { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.pf-meldung {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--pf-linie);
    border-left: 4px solid var(--pf-gut);
    border-radius: 10px;
    background: var(--pf-flaeche);
    box-shadow: 0 16px 40px -14px rgba(15, 23, 42, .4);
    font-size: 14px;
}
.pf-meldung-fehler { border-left-color: var(--pf-kritisch); }
.pf-meldung-warnung { border-left-color: var(--pf-warnung); }

.pf-liste-schlicht { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.pf-liste-schlicht li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--pf-linie); flex-wrap: wrap; }
.pf-liste-schlicht li:last-child { border-bottom: 0; }
.pf-liste-schlicht .pf-rechts { margin-left: auto; display: flex; gap: 6px; }

/* --- Schmal -------------------------------------------------------------- */

@media (max-width: 960px) {
    .pf-rahmen { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px 16px; }
    .pf-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
        margin: 0 -16px;
        padding: 0 16px 4px;
        scrollbar-width: thin;
    }
    .pf-nav a { flex: none; min-height: 38px; }
    .pf-zwei { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .pf-kopf { padding: 8px 16px; gap: 8px; flex-wrap: wrap; }
    .pf-marke small { display: none; }
    .pf-ich { display: none; }
    .pf-kopf-rechts .pf-knopf { padding: 6px 10px; }
    .pf-kopf-rechts .pf-knopf span { display: none; }
    .pf-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .pf-kachel { padding: 12px; }
    .pf-kachel-wert { font-size: 22px; }
    .pf-karte { padding: 14px; }
    .pf-seitenkopf h1 { font-size: 19px; }
    .pf-seitenkopf .pf-aktionen { margin-left: 0; width: 100%; }
    .pf-reihe { grid-template-columns: minmax(0, 1fr); }
    .pf-stand { margin-left: 0; width: 100%; }
    .pf-balken-zeile { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 380px) {
    .pf-kacheln { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

@media print {
    .pf-kopf, .pf-nav, .pf-aktionen, .pf-filterleiste button, .pf-menue { display: none !important; }
    .pf-rahmen { display: block; padding: 0; }
    .pf-karte, .pf-kachel { box-shadow: none; break-inside: avoid; }
}
