/* Leitstand Calliope Media (L3, 19.09.2026): hell und dunkel, handytauglich */
:root {
    --hintergrund: #f4f5f8;
    --flaeche: #ffffff;
    --flaeche-2: #eef0f4;
    --text: #1d2230;
    --grau: #555d6b;
    --rand: #dde0e7;
    --akzent: #1f5fbf;
    --gruen: #1d7a3a;
    --gruen-flaeche: #dff3e5;
    --gelb: #8a5a00;
    --gelb-flaeche: #fdf0cf;
    --rot: #b3261e;
    --rot-flaeche: #fbe0dd;
    --grau-flaeche: #e6e8ec;
    --leer: #eceef2;
}
@media (prefers-color-scheme: dark) {
    :root {
        --hintergrund: #12151c;
        --flaeche: #1b1f28;
        --flaeche-2: #232834;
        --text: #e7e9ee;
        --grau: #a4abb8;
        --rand: #2f3542;
        --akzent: #7fb0ff;
        --gruen: #6fd08c;
        --gruen-flaeche: #173323;
        --gelb: #f2c14e;
        --gelb-flaeche: #3a2e10;
        --rot: #ff8a80;
        --rot-flaeche: #3d1a18;
        --grau-flaeche: #2a2f3a;
        --leer: #20242d;
    }
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--hintergrund); color: var(--text); line-height: 1.45; }
a { color: var(--akzent); }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 16px;
    background: var(--flaeche); border-bottom: 1px solid var(--rand); }
.kopf .marke { font-weight: 700; text-decoration: none; color: var(--text); }
.kopf nav { display: flex; flex-wrap: wrap; gap: 4px 14px; flex: 1; }
.kopf nav a { text-decoration: none; }
.kopf nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
.kopf form { margin: 0; }
.kopf .wer { color: var(--grau); font-size: .85rem; }
button, .knopf { font: inherit; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text);
    border-radius: 8px; padding: 6px 12px; cursor: pointer; }
button.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
@media (prefers-color-scheme: dark) { button.haupt { color: #0c1220; } }

main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.4rem; margin: 4px 0 12px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; padding: 14px 16px;
    margin-bottom: 16px; }
.hinweis { color: var(--grau); font-size: .88rem; }
.meldung { background: var(--gruen-flaeche); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.fehler { background: var(--rot-flaeche); color: var(--rot); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }

/* Gesamtampel */
.gesamt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 1.15rem; font-weight: 600;
    border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--rand); }
.gesamt.gruen { background: var(--gruen-flaeche); color: var(--gruen); }
.gesamt.gelb { background: var(--gelb-flaeche); color: var(--gelb); }
.gesamt.rot { background: var(--rot-flaeche); color: var(--rot); }
.gesamt .stand { font-size: .85rem; font-weight: 400; color: var(--grau); margin-left: auto; }

/* Ampel-Marken: Farbe plus Zeichen */
.ampel { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em;
    padding: 0 .35em; border-radius: 999px; font-weight: 700; font-size: .85rem; line-height: 1; }
.ampel.gruen { background: var(--gruen-flaeche); color: var(--gruen); }
.ampel.gelb { background: var(--gelb-flaeche); color: var(--gelb); }
.ampel.rot { background: var(--rot-flaeche); color: var(--rot); }
.ampel.grau { background: var(--grau-flaeche); color: var(--grau); }
.ampel.gruen::before { content: "✓"; }
.ampel.gelb::before { content: "!"; }
.ampel.rot::before { content: "✕"; }
.ampel.grau::before { content: "–"; }

/* Tabellen */
.tabelle-rahmen { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--rand); vertical-align: top; }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--grau); font-weight: 600; }
tbody th { font-weight: 400; }
td.mitte, th.mitte { text-align: center; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
.portal a { font-weight: 600; }
.portal .host { display: block; font-size: .8rem; color: var(--grau); }
.portal .kurz { display: none; }

/* Liste auffälliger Punkte */
ul.punkte { list-style: none; margin: 0; padding: 0; }
ul.punkte li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 7px 0;
    border-bottom: 1px solid var(--rand); }
ul.punkte li:last-child { border-bottom: 0; }
ul.punkte .wo { font-weight: 600; }
ul.punkte .grund { grid-column: 2; color: var(--grau); font-size: .88rem; }

/* Balken */
.balken { margin: 8px 0; }
.balken .zeile { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.balken .spur { height: 10px; background: var(--leer); border-radius: 999px; overflow: hidden; margin-top: 3px; }
.balken .fuell { height: 100%; border-radius: 999px; }
.balken .fuell.gruen { background: var(--gruen); }
.balken .fuell.gelb { background: var(--gelb); }
.balken .fuell.rot { background: var(--rot); }
.w0 { width: 0 } .w5 { width: 5% } .w10 { width: 10% } .w15 { width: 15% } .w20 { width: 20% } .w25 { width: 25% }
.w30 { width: 30% } .w35 { width: 35% } .w40 { width: 40% } .w45 { width: 45% } .w50 { width: 50% } .w55 { width: 55% }
.w60 { width: 60% } .w65 { width: 65% } .w70 { width: 70% } .w75 { width: 75% } .w80 { width: 80% } .w85 { width: 85% }
.w90 { width: 90% } .w95 { width: 95% } .w100 { width: 100% }

.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.spalten > .karte { margin-bottom: 0; }
.abstand { margin-top: 16px; }

/* Verlauf: 168 Stundenzellen */
.streifen { display: grid; grid-template-columns: repeat(168, 1fr); gap: 1px; height: 14px; margin-top: 4px;
    min-width: 336px; }
.streifen span { background: var(--leer); border-radius: 1px; }
.streifen span.gruen { background: var(--gruen); opacity: .55; }
.streifen span.gelb { background: var(--gelb); }
.streifen span.rot { background: var(--rot); }
.streifen span.grau { background: var(--grau); opacity: .4; }
.streifen-achse { display: flex; justify-content: space-between; font-size: .72rem; color: var(--grau); }
.punkt-zeile { padding: 10px 0; border-bottom: 1px solid var(--rand); }
.punkt-zeile:last-child { border-bottom: 0; }
.punkt-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.punkt-kopf .titel { font-weight: 600; }
.punkt-kopf .wert { color: var(--grau); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--grau); }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.legende i.gruen { background: var(--gruen); opacity: .55; } .legende i.gelb { background: var(--gelb); }
.legende i.rot { background: var(--rot); } .legende i.leer { background: var(--leer); border: 1px solid var(--rand); }

/* Formulare */
form.stapel { display: grid; gap: 10px; max-width: 360px; }
label { display: grid; gap: 4px; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=date] { font: inherit; padding: 8px 10px;
    border: 1px solid var(--rand); border-radius: 8px; background: var(--flaeche); color: var(--text); }
form.reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.anmelden { max-width: 420px; margin: 8vh auto; }

@media (max-width: 640px) {
    main { padding: 12px; }
    .gesamt .stand { margin-left: 0; width: 100%; }
    th, td { padding: 6px 5px; }
    .nur-breit, .portal .host { display: none; }
    .portal thead th { font-size: .68rem; letter-spacing: 0; }
    .portal th, .portal td { padding: 6px 3px; }
    .portal .ampel { font-size: .75rem; }
    .portal .lang { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .portal .kurz { display: inline; }
}
.sla-unter { color: var(--rot); font-weight: 700; }
