/* Startseite — Maße und Farben aus dem Entwurf 5a-1. */

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--flaeche);
    color: var(--text);
    font-family: var(--schrift);
    -webkit-font-smoothing: antialiased;
}

/* ── Kopfleiste ───────────────────────────────────────────────────────── */

.kopf {
    display: flex;
    align-items: center;
    /* Reichlich Abstand zur Marke — die Reiter sollen nicht am Logo kleben. */
    gap: 44px;
    width: 100%;
    max-width: var(--inhalt-breite);
    margin: 0 auto;
    padding: 18px 44px;
    padding-top: calc(16px + var(--rand-oben));
}

/* Zeichen des Hauses und Name des Werkzeugs, durch einen Strich getrennt:
   erst wessen Anwendung, dann welche. */
.marke {
    display: flex;
    align-items: center;
    gap: 17px;
    flex-shrink: 0;
    text-decoration: none;
}

.marke__logo {
    height: 40px;
    width: auto;
    display: block;
}

.marke__strich {
    width: 1px;
    height: 28px;
    background: var(--linie-kraeftig);
}

/* Kennzeichen der Anwendung. Das Logo des Hauses bleibt unverändert —
   welches Werkzeug man vor sich hat, sagt die Farbe dieses Quadrats.
   Status grün, andere Werkzeuge bekommen einen eigenen Ton. */
.marke__kennung {
    width: 12px;
    height: 12px;
    margin-right: -5px;
    border-radius: 2px;
    background: var(--akzent);
}

.marke__name {
    font-family: var(--schrift-titel);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.reiter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
}

.reiter__punkt {
    padding: 8px 15px;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
    border-radius: var(--r-pille);
    font-size: 14px;
    color: var(--text-tertiaer);
}

a.reiter__punkt:hover { background: var(--flaeche-tief); }

.reiter__punkt--aktiv, a.reiter__punkt--aktiv:hover {
    background: var(--dunkel);
    color: var(--text-auf-farbe);
    font-weight: 500;
}

/* Noch nicht gebaut — sichtbar, aber erkennbar nicht anklickbar. */
.reiter__punkt--kommt { opacity: .45; cursor: default; }

.kopf__rechts { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* Archiv steht am Schreibtisch in den Reitern — am Telefon oben rechts. */
.kopf__archiv { display: none; }

.kopf__anmelden {
    padding: 8px 16px;
    border: 1.5px solid var(--linie-kraeftig);
    border-radius: var(--r-pille);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sekundaer);
    text-decoration: none;
}

.kopf__anmelden:hover { border-color: var(--akzent); color: var(--akzent); }

/* Angemeldet: Kürzel, Name und der Weg hinaus */
.nutzer { display: flex; align-items: center; gap: 9px; }

.nutzer__kuerzel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--r-pille);
    background: var(--akzent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-auf-farbe);
}

.nutzer__text { display: flex; flex-direction: column; line-height: 1.25; }
.nutzer__name { font-size: 14px; font-weight: 600; color: var(--text); }
.nutzer__gewerk { font-size: 12.5px; color: var(--text-schwach); }

.nutzer__aus { margin: 0 0 0 4px; }

.nutzer__knopf {
    padding: 8px 15px;
    border: 1.5px solid var(--linie-kraeftig);
    border-radius: var(--r-pille);
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sekundaer);
    cursor: pointer;
}

.nutzer__knopf:hover { border-color: var(--akzent); color: var(--akzent); }

/* ── Inhalt ───────────────────────────────────────────────────────────── */

.inhalt {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: var(--inhalt-breite);
    margin: 0 auto;
    padding: 26px 44px 44px;
}

/* ── Ampel: die Gesamtlage ────────────────────────────────────────────── */

.ampel {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 30px 34px;
    border-radius: 24px;
    color: var(--text-auf-farbe);
}

.ampel--stoerung { background: var(--stoerung-ampel); }
.ampel--ruhig          { background: var(--behoben); }

.ampel__kreis {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: var(--r-pille);
    background: rgba(255, 255, 255, .22);
}

.punkt {
    width: 18px;
    height: 18px;
    border-radius: var(--r-pille);
    background: #FFFFFF;
    animation: pulsieren 1.8s infinite;
}

@keyframes pulsieren {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
    .punkt { animation: none; }
}

.ampel__text { flex-grow: 1; min-width: 0; }

.ampel__titel {
    margin: 0;
    font-family: var(--schrift-titel);
    font-size: 29px;
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.15;
    text-wrap: pretty;
}

.ampel__zusatz {
    margin: 4px 0 0;
    font-size: 16.5px;
    color: rgba(255, 255, 255, .9);
}

.ampel__marke {
    flex-shrink: 0;
    padding: 9px 18px;
    border-radius: var(--r-pille);
    background: rgba(0, 0, 0, .14);
    font-size: 14.5px;
    color: rgba(255, 255, 255, .85);
}

/* ── Meldungskarten ───────────────────────────────────────────────────── */

.karte {
    padding: 24px 28px;
    background: var(--grund);
    border-radius: 22px;
    box-shadow: 0 2px 14px rgba(20, 32, 30, .06);
}

.karte--gross { padding: 28px 32px; }

.karte__kopf { display: flex; align-items: center; gap: 10px; }

.pille {
    padding: 6px 14px;
    border-radius: var(--r-pille);
    font-size: 13.5px;
    font-weight: 600;
}

.pille--kritisch { background: var(--kritisch);        color: var(--text-auf-farbe); }
.pille--stoerung { background: var(--geplant-flaeche); color: var(--geplant-text); }
.pille--hinweis  { background: var(--linie);           color: var(--text-tertiaer); }

.pille--gewerk {
    background: #F1EDE6;
    color: #6B6357;
    font-weight: 500;
}

.karte__wann {
    margin-left: auto;
    font-size: 14.5px;
    color: var(--text-schwach);
    text-align: right;
}

.karte__titel {
    margin: 16px 0 0;
    font-family: var(--schrift-titel);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.25;
    color: var(--text);
    text-wrap: pretty;
}

.karte__titel--klein {
    margin-top: 14px;
    font-size: 20px;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.karte__text {
    margin: 10px 0 0;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--text-sekundaer);
    text-wrap: pretty;
}

.karte__text--klein { margin-top: 8px; font-size: 15.5px; line-height: 1.55; }

.merkmale { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.merkmal {
    padding: 9px 16px;
    border-radius: var(--r-pille);
    background: var(--flaeche-kraeftig);
    font-size: 14.5px;
    color: var(--text-sekundaer);
}

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

/* Bleibt in der letzten Zeile ein Platz frei, nimmt die letzte Karte beide
   Spalten. Sonst steht bei einer einzelnen Meldung eine halbe Karte da und
   rechts daneben nichts — das sieht aus wie ein Fehler, nicht wie ein
   ruhiger Tag. Greift bei 1, 3, 5 … Karten. */
.raster > .karte:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Dasselbe, wenn liste.js die hinteren Karten eingeklappt hat — die Regel
   oben zählt Geschwister im Dokument und sieht nicht, dass welche
   versteckt sind. */
.raster > .karte--breit { grid-column: 1 / -1; }

/* „weitere 6 anzeigen" — steht unter dem Raster und wird erst von
   liste.js eingesetzt. Ohne Skript ist ohnehin alles sichtbar. */
.mehr {
    display: block;
    width: 100%;
    min-height: var(--touchziel);
    margin-top: 14px;
    padding: 0 20px;
    border: 1.5px dashed var(--linie-kraeftig);
    border-radius: var(--r-karte);
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-sekundaer);
    cursor: pointer;
    transition: border-color .12s ease, color .12s ease;
}

.mehr:hover { border-color: var(--akzent); color: var(--akzent); }
.mehr:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

/* ── Demnächst geplant ────────────────────────────────────────────────── */

.karte--liste { padding: 24px 32px; }

/* Überschrift links, Weg zum Kalender rechts — wie in der Behoben-Zeile. */
.liste__kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.liste__titel {
    margin: 0;
    font-family: var(--schrift-titel);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.liste { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }

.liste__zeile { display: flex; align-items: baseline; gap: 18px; }

.liste__wann {
    flex-shrink: 0;
    width: 200px;
    font-size: 15px;
    font-weight: 600;
    color: var(--info);
}

.liste__was { font-size: 15.5px; color: var(--text-sekundaer); text-wrap: pretty; }

/* ── Behoben ──────────────────────────────────────────────────────────── */

.behoben {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 32px;
    background: var(--behoben-flaeche);
    border-radius: 22px;
}

.behoben__zeichen {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: var(--r-pille);
    background: var(--behoben);
    color: var(--text-auf-farbe);
}

.behoben__text { margin: 0; font-size: 15.5px; color: var(--behoben-dunkel); }
.behoben__text strong { font-weight: 600; }

/* Der Weg aus einer Kachel heraus — „Zum Kalender", „Zum Archiv".
   Eine gemeinsame Breite, damit die beiden untereinander nicht
   unterschiedlich breit wirken. Der Archiv-Knopf war bis zum 31.08.2026
   ein <span> ohne Ziel: sah aus wie ein Verweis, tat aber nichts. */
.kachelknopf {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    flex-shrink: 0;
    min-width: 148px;
    min-height: 38px;
    padding: 0 18px;
    border-radius: var(--r-pille);
    background: var(--akzent);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-auf-farbe);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .12s ease;
}

.kachelknopf:hover { background: #0C4A45; }
.kachelknopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

/* In der grünen Behoben-Zeile trägt er deren Farbe. */
.kachelknopf--behoben { background: var(--behoben-dunkel); }
.kachelknopf--behoben:hover { background: #1B3D2D; }
.kachelknopf--behoben:focus-visible { outline-color: var(--behoben-dunkel); }

/* ── Fußzeile ─────────────────────────────────────────────────────────── */

.fuss {
    max-width: var(--inhalt-breite);
    margin: -30px auto 0;
    padding: 20px 44px calc(40px + var(--rand-unten));
}

.fuss__text { margin: 0; font-size: 14.5px; color: var(--text-schwach); }

.fuss__verweis { color: var(--akzent); font-weight: 500; text-decoration: none; }
.fuss__verweis:hover { text-decoration: underline; }

/* ── Kontoseite ───────────────────────────────────────────────────────── */

.konto { display: flex; flex-direction: column; align-items: flex-start; }

.konto__kuerzel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--r-pille);
    background: var(--akzent);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-auf-farbe);
}

.konto__name {
    margin: 18px 0 0;
    font-family: var(--schrift-titel);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -.015em;
}

.konto__gewerk { margin: 4px 0 0; font-size: 16px; color: var(--text-tertiaer); }

.konto__liste {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 22px;
    width: 100%;
    margin: 22px 0 26px;
    padding-top: 20px;
    border-top: 1px solid var(--linie);
    font-size: 15.5px;
}

.konto__liste dt { color: var(--text-schwach); }
.konto__liste dd { margin: 0; color: var(--text-sekundaer); }

.konto__knopf {
    padding: 13px 26px;
    border: 1.5px solid var(--linie-kraeftig);
    border-radius: var(--r-pille);
    background: none;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text-sekundaer);
    cursor: pointer;
}

.konto__knopf:hover { border-color: var(--kritisch); color: var(--kritisch); }

/* ── Untere Leiste (nur am Telefon) ───────────────────────────────────── */

.tableiste { display: none; }

/* ── Handy ────────────────────────────────────────────────────────────── */

@media (max-width: 899px) {
    /* Platz für die untere Leiste, damit sie nichts verdeckt */
    body { padding-bottom: calc(98px + var(--rand-unten)); }

    .kopf {
        gap: 12px;
        padding: 14px 20px;
        padding-top: calc(14px + var(--rand-oben));
    }

    /* Die Bereiche stehen unten, nicht mehr oben */
    .reiter { display: none; }

    /* Maße und Anmutung aus dem Entwurf: weiße Fläche, oben abgerundet,
       nach oben abgesetzt durch einen Schatten statt einer Linie. */
    .tableiste {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 12px 0 calc(16px + var(--rand-unten));
        background: var(--grund);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -4px 18px rgba(20, 32, 30, .06);
    }

    .tableiste__punkt {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 2px 4px;
        color: var(--text-schwach);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: color .2s ease;
    }

    /* Fläche hinter dem Zeichen: hebt den aktiven Bereich hervor und gibt
       dem Finger beim Antippen eine sichtbare Antwort. */
    .tableiste__zeichen {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 58px;
        height: 32px;
        border-radius: var(--r-pille);
        background: transparent;
        transition: background-color .22s ease,
                    transform .28s cubic-bezier(.34, 1.4, .64, 1);
    }

    .tableiste__punkt--aktiv { color: var(--akzent); }
    .tableiste__punkt--aktiv .tableiste__text { font-weight: 600; }

    .tableiste__punkt--aktiv .tableiste__zeichen {
        background: rgba(15, 90, 84, .12);
    }

    /* Antippen: das Zeichen federt kurz ein */
    .tableiste__punkt:active .tableiste__zeichen { transform: scale(.88); }

    /* Noch nicht gebaut — sichtbar, aber erkennbar nicht anklickbar. */
    .tableiste__punkt--kommt { opacity: .45; }

    .tableiste__text {
        font-size: 11.5px;
        letter-spacing: .01em;
        transition: font-weight .2s ease;
    }

    @media (prefers-reduced-motion: reduce) {
        .tableiste__zeichen { transition: background-color .2s ease; }
        .tableiste__punkt:active .tableiste__zeichen { transform: none; }
    }

    /* Das Kürzel steht anstelle eines Zeichens */
    .tableiste__kuerzel {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 25px;
        height: 25px;
        border-radius: var(--r-pille);
        background: var(--akzent);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .02em;
        color: var(--text-auf-farbe);
    }

    /* Am Telefon sitzt alles Bedienbare unten — oben bleibt die Marke
       und das Archiv, das unten keinen Platz mehr hat. */
    .nutzer, .kopf__anmelden { display: none; }

    .kopf__archiv {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--r-pille);
        color: var(--text-sekundaer);
        -webkit-tap-highlight-color: transparent;
        transition: background-color .2s ease, transform .2s ease;
    }

    .kopf__archiv:active { background: var(--flaeche-tief); transform: scale(.92); }
    .kopf__archiv--aktiv { background: rgba(15, 90, 84, .12); color: var(--akzent); }

    .marke { gap: 13px; }
    .marke__logo { height: 32px; }
    .marke__name { font-size: 18px; }
    .marke__strich { height: 24px; }


    .kopf__rechts { margin-left: auto; }
    .nutzer__text { display: none; }
    .nutzer__knopf { padding: 8px 13px; }
    .kopf__zeit { display: none; }

    .inhalt { gap: 12px; padding: 16px 20px 24px; }

    .ampel { gap: 14px; padding: 18px 20px; border-radius: var(--r-gross); }
    .ampel__kreis { width: 38px; height: 38px; }
    .punkt { width: 13px; height: 13px; }
    .ampel__titel { font-size: 19px; }
    .ampel__zusatz { margin-top: 2px; font-size: 13.5px; }
    .ampel__marke { display: none; }

    .karte, .karte--gross, .karte--liste { padding: 18px 19px; border-radius: var(--r-gross); }
    .karte__titel { margin-top: 14px; font-size: 19px; }
    .karte__titel--klein { font-size: 18px; }
    .karte__text, .karte__text--klein { font-size: 15.5px; }

    .karte__kopf { flex-wrap: wrap; gap: 8px; }
    .karte__wann { width: 100%; margin-left: 0; text-align: left; font-size: 13.5px; }

    .merkmale { gap: 8px; margin-top: 14px; }
    .merkmal { padding: 7px 13px; font-size: 13.5px; }

    .raster { grid-template-columns: minmax(0, 1fr); gap: 12px; }

    .liste__zeile { flex-direction: column; gap: 2px; }
    .liste__wann { width: auto; }

    .behoben {
        flex-wrap: wrap;
        padding: 16px 19px;
        border-radius: var(--r-gross);
    }
    .behoben__text { font-size: 14.5px; }
    /* Nicht ausblenden: Über die untere Leiste kommt man nicht mehr ins
       Archiv, seit sie beim Melder die eigenen Meldungen trägt. */
    .kachelknopf { margin-left: 0; width: 100%; min-height: var(--touchziel); }

    .fuss { padding: 16px 20px 24px; }
}

/* ── Melden ───────────────────────────────────────────────────────────────
   Der Weg zum Melden steht auf jeder Seite, deshalb hier und nicht in
   melden.css: Kopfleiste am Schreibtisch, untere Leiste am Telefon. */

.kopf__melden {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 17px;
    border-radius: var(--r-pille);
    background: var(--akzent);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-auf-farbe);
    text-decoration: none;
    transition: background-color .12s ease;
}

.kopf__melden:hover { background: #0C4A45; }
.kopf__melden:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

@media (max-width: 899px) {
    /* Am Telefon trägt die untere Leiste das Melden — der Knopf oben wäre
       neben dem Logo nur Gedränge. */
    .kopf__melden { display: none; }

    /* Melden ist die einzige Handlung in der Leiste, nicht bloß ein
       weiterer Ort. Deshalb steht es in der Mitte, trägt Farbe und ist
       runder als die übrigen Punkte — auch wenn man gerade woanders ist. */
    .tableiste__punkt--melden .tableiste__zeichen {
        width: 52px;
        height: 40px;
        background: var(--akzent);
        color: var(--text-auf-farbe);
    }

    .tableiste__punkt--melden.tableiste__punkt--aktiv .tableiste__zeichen {
        background: var(--dunkel);
    }

    .tableiste__punkt--melden .tableiste__text { font-weight: 600; }

    /* Die Zahl der offenen eigenen Meldungen sitzt am Zeichen. */
    .tableiste__punkt { position: relative; }

    .tableiste__zahl {
        position: absolute;
        top: -2px;
        left: 50%;
        margin-left: 6px;
        min-width: 18px;
        padding: 1px 5px;
        border-radius: var(--r-pille);
        background: var(--kritisch);
        font-size: 11px;
        font-weight: 700;
        line-height: 1.45;
        text-align: center;
        color: var(--text-auf-farbe);
    }
}

/* ── Einzelne Meldung ─────────────────────────────────────────────────── */

/* Zurück: runder Knopf mit Pfeil, wie die Monatspfeile im Kalender.
   `align-self` ist nötig, weil `.inhalt` ein Flex-Container mit
   Spaltenrichtung ist — darin würde der Knopf sonst über die ganze Breite
   gezogen, `inline-flex` hin oder her. */
.zurueck {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: var(--r-pille);
    background: var(--flaeche-kraeftig);
    color: var(--text-sekundaer);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .16s ease, transform .16s ease;
}

.zurueck:hover { background: var(--linie); color: var(--akzent); }
.zurueck:active { transform: scale(.9); }
.zurueck:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

/* Ein Verweis, der weiterführt — der Pfeil rückt beim Überfahren mit. */
.weiter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--akzent);
    font-weight: 600;
    text-decoration: none;
}

.weiter:hover { text-decoration: underline; }
.pfeil { flex-shrink: 0; transition: transform .12s ease; }
a:hover > .pfeil, a:hover .pfeil { transform: translateX(2px); }

.verlaufsliste {
    margin: 14px 0 0;
    padding: 0 0 0 15px;
    list-style: none;
    border-left: 2px solid var(--linie);
}

.verlaufsliste__punkt { display: flex; gap: 12px; padding: 6px 0; font-size: 15px; }

.verlaufsliste__wann {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    color: var(--text-schwach);
}

.verlaufsliste__text { color: var(--text-sekundaer); line-height: 1.45; }

.pille--behoben { background: var(--behoben-flaeche); color: var(--behoben-dunkel); }
