/* Dorffest Ohlstedt — Schichtplan
   Bewusst ein festes, plakatives Schwarz-Rot-Design (wie ein Feuerwehr-
   Einsatzplakat), kein Hell/Dunkel-Umschalten — siehe Design-Entscheidung
   im Chat mit Jonas (Konzept C). */

:root {
    --bg: #f5f1ea;
    --ink: #17140f;
    --muted: #837a72;
    --line: #ddd6cb;
    --red: #d81324;
    --red-ink: #ffffff;
    --green: #3f7d52;
    --green-bg: #e8f1ea;
    --amber: #a06a12;
    --amber-bg: #faf1e2;
    --card-bg: #ffffff;
    --max: 460px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--red); }

.schlank {
    background: #0b0b0c;
    color: #f5f1ea;
    padding: 12px 18px;
    font-size: 0.82rem;
}
.schlank a { color: #f5f1ea; text-decoration: none; opacity: 0.85; }

.seite {
    max-width: var(--max);
    margin: 0 auto;
    padding: 24px 18px 8px;
}
.seite h2 { font-size: 1.3rem; margin-top: 1.6em; }
.seite h2:first-child { margin-top: 0; }
.seite p { color: #2a2521; }
.seite .muted { color: var(--muted); font-size: 0.9rem; }

/* Admin-Bereich: wächst am Rechner mit dem Viewport statt in der
   Handy-Spaltenbreite zu verharren (öffentliche Seiten bleiben bewusst
   schmal, siehe .seite oben). */
.seite-breit { max-width: var(--max); }
@media (min-width: 640px) { .seite-breit { max-width: 720px; } }
@media (min-width: 900px) { .seite-breit { max-width: 1000px; } }
@media (min-width: 1200px) { .seite-breit { max-width: 1240px; } }

/* ===== Masthead (Startseite) ===== */
.mast {
    background: #0b0b0c;
    color: #f5f1ea;
    padding: 22px 18px 18px;
    position: relative;
    overflow: hidden;
}
.mast::after {
    content: "";
    position: absolute;
    right: -30px; top: -30px;
    width: 140px; height: 140px;
    background: var(--red);
    transform: rotate(28deg);
    opacity: 0.9;
}
.mast-inner { max-width: var(--max); margin: 0 auto; position: relative; }
.mast .zeile1 {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #b8b0a8;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.mast h1 {
    font-size: 2.2rem;
    line-height: 0.98;
    margin: 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    text-wrap: balance;
    position: relative;
    z-index: 1;
}
.mast h1 span { color: var(--red); }
.mast .unter {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #d8d2ca;
    max-width: 32ch;
    position: relative;
    z-index: 1;
}
.metarow {
    display: flex;
    border-top: 1px solid #2a2a2c;
    margin-top: 18px;
    position: relative;
    z-index: 1;
    max-width: var(--max);
}
.metarow div { flex: 1; padding: 10px 0 0; border-right: 1px solid #2a2a2c; }
.metarow div:last-child { border-right: none; }
.metarow .k { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8f887f; }
.metarow .v { font-family: ui-monospace, "Consolas", "SFMono-Regular", monospace; font-size: 0.92rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mast-ort { position: relative; z-index: 1; margin-top: 12px; font-size: 0.82rem; color: #d8d2ca; }
.mast-ort strong { color: #f5f1ea; }

/* ===== Banner (Admin-Hinweis) ===== */
.banner {
    background: var(--amber-bg);
    border: 1.5px solid var(--amber);
    color: #4a3208;
    padding: 12px 16px;
    margin: 18px;
    font-size: 0.88rem;
    font-weight: 600;
}

/* ===== Flash-Meldungen ===== */
.flash {
    margin: 18px 18px 0;
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1.5px solid;
}
.flash.ok { background: var(--green-bg); border-color: var(--green); color: #1f4a2c; }
.flash.fehler { background: #fbe9e7; border-color: var(--red); color: #6e0d15; }

/* ===== Abschnitte ===== */
.abschnitt { padding: 22px 18px 0; }
.abschnitt h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    border-bottom: 2px solid var(--ink);
    padding-bottom: 8px;
    margin: 0 0 4px;
}
.abschnitt .sub { color: var(--muted); font-size: 0.85rem; margin: 0 0 12px; }

/* ===== Flex-Box "Teilt mich einfach ein" ===== */
.flex-box {
    margin: 0 18px 20px;
    border: 1.5px solid var(--ink);
    padding: 16px;
}
.flex-box .t { font-weight: 800; text-transform: uppercase; font-size: 0.92rem; letter-spacing: 0.01em; margin-bottom: 4px; }
.flex-box .d { color: var(--muted); font-size: 0.85rem; line-height: 1.5; margin-bottom: 14px; }

.pillrow { display: flex; border: 1px solid var(--ink); margin-bottom: 12px; }
.pillrow label {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-weight: 700;
    font-size: 0.85rem;
    border-right: 1px solid var(--ink);
    cursor: pointer;
    user-select: none;
}
.pillrow label:last-child { border-right: none; }
.pillrow input { position: absolute; opacity: 0; pointer-events: none; }
.pillrow input:checked + label,
.pillrow label.aktiv { background: var(--ink); color: #fff; }
.pillrow input:focus-visible + label { outline: 2px solid var(--red); outline-offset: -2px; }

label.feldlabel { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 12px 0 4px; }
label.feldlabel:first-child { margin-top: 0; }

input[type="text"], input[type="tel"], textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    background: #fff;
    padding: 11px 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink);
    border-radius: 2px;
}
input[type="text"]:focus, input[type="tel"]:focus, textarea:focus {
    outline: none;
    border-color: var(--ink);
}
textarea { resize: vertical; min-height: 60px; }

.btn {
    background: var(--red);
    color: var(--red-ink);
    border: none;
    padding: 13px;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 14px;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: #b60f1e; }
.btn:disabled { background: var(--muted); cursor: not-allowed; }
.btn.sekundaer { background: var(--ink); }
.btn.klein { padding: 8px; font-size: 0.75rem; margin-top: 0; width: auto; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }

/* ===== Bereits eingetragen (Flex-Liste) ===== */
.flex-liste { list-style: none; margin: 0 0 4px; padding: 0; font-size: 0.85rem; }
.flex-liste li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.flex-liste .n { font-weight: 600; }
.flex-liste .c { color: var(--muted); font-size: 0.75rem; text-align: right; }

/* ===== Schicht-Karten (Grillen / Aufbau / Abbau) ===== */
.karte {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin: 0 18px;
    border-bottom: 1px solid var(--line);
}
.karte label.wahl {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    padding: 11px 0;
    cursor: pointer;
}
.karte .stripe { width: 4px; align-self: stretch; background: var(--green); flex-shrink: 0; }
.karte.knapp .stripe { background: var(--amber); }
.karte.voll .stripe, .karte.gesperrt .stripe { background: #c8c0b4; }
.karte input[type="checkbox"] { width: 19px; height: 19px; flex-shrink: 0; accent-color: var(--red); }
.karte .zeit { font-family: ui-monospace, "Consolas", monospace; font-weight: 700; font-size: 0.9rem; min-width: 96px; font-variant-numeric: tabular-nums; }
.karte .wer { color: var(--muted); font-size: 0.78rem; flex: 1; }
.karte .status { font-size: 0.66rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
.karte.knapp .status { color: var(--amber); }
.karte.voll .status, .karte.gesperrt .status { color: var(--muted); }
.karte.gesperrt .wer { font-style: italic; }
.karte .verlaengerung-tag {
    display: block;
    font-size: 0.62rem;
    text-transform: none;
    font-weight: 500;
    color: var(--red);
    margin-top: 1px;
}

.sammel-formular { margin: 18px; padding-top: 4px; }

/* ===== Einfache Anmeldung (Aufbau/Abbau) ===== */
.einfach-formular { margin: 4px 18px 20px; }
.einfach-formular .zeile { display: flex; gap: 8px; }
.einfach-formular .zeile input { flex: 1; }
.einfach-liste { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.85rem; }
.einfach-liste li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.einfach-liste .leer { color: var(--muted); font-style: italic; }

/* ===== Fuß ===== */
.fuss {
    max-width: var(--max);
    margin: 32px auto 0;
    padding: 18px 18px 40px;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
}
.fuss a { color: var(--ink); }
.fuss-hinweis { margin-top: 8px; }
.fuss-version { margin-top: 8px; font-size: 0.75rem; opacity: 0.7; }

/* ===== Admin ===== */
.admin-login { max-width: 360px; margin: 60px auto; padding: 0 18px; }
.admin-tabelle { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 0 0 24px; }
.admin-tabelle th, .admin-tabelle td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-tabelle th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.admin-scroll { overflow-x: auto; margin: 0 18px; }
.admin-box { margin: 0 18px 24px; }
.tag-erledigt { color: var(--green); font-weight: 700; font-size: 0.75rem; }
.tag-offen { color: var(--amber); font-weight: 700; font-size: 0.75rem; }
.inline-form { display: inline; }

@media (min-width: 640px) {
    body { padding: 24px 0; }
}
