* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: top;
    justify-content: center;
    padding: 24px;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background-color: #f0f2f5;
    background-image: url("hintergrund.png");
    background-position: top center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #222;
}

body:has(.login-box) {
    align-items: center;
    justify-content: center;
}



.login-box,
.profil-box,
.inhalt-box,
.navigation,
.box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.login-box,
.profil-box,
.inhalt-box {
    width: 100%;
    padding: 32px;
}

.login-box {
    max-width: 360px;
}

.login-box h1,
.profil-box h1 {
    margin: 0 0 24px;
    font-size: 1.5rem;
    text-align: center;
}

.login-box h2,
.profil-box h2,
.inhalt-box h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.login-box form + form {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e2e2;
}

/* Seitenaufbau mit Navigation links */
.seite {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    max-width: 1400px;
}

.navigation {
    flex-shrink: 0;
    width: 200px;
    padding: 16px 12px;
}

.navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.navigation li + li {
    margin-top: 4px;
}

.navigation a {
    display: block;
    padding: 10px 14px;
    color: #222;
    text-decoration: none;
    border-radius: 6px;
}

.navigation a:hover {
    background: #f0f2f5;
}

.navigation a.aktiv {
    color: #fff;
    background: #2b6cb0;
}

.navigation a.aktiv-eltern {
    font-weight: 600;
    background: #e6eef7;
}

/* Unterpunkte */
.navigation ul.unterpunkte {
    margin-top: 4px;
    padding-left: 14px;
}

.navigation ul.unterpunkte a {
    padding: 8px 14px;
    font-size: 0.9rem;
}

.inhalt {
    flex: 1;
    min-width: 0;
}

.inhalt > .fehler,
.inhalt > .erfolg {
    margin-bottom: 16px;
}

/* Schnellsuche */
.schnellsuche {
    margin-bottom: 24px;
}

.suche-zeile {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.suche-zeile input {
    flex: 1;
    min-width: 0;
}

.suche-zeile button {
    width: auto;
    margin-top: 0;
    padding: 10px 28px;
}

/* Zentrale Suche (Startseite) */
.inhalt-box h2.zentralsuche-titel {
    margin-top: 24px;
}

.suche-status {
    min-height: 1.2em;
    margin: 12px 0 0;
    font-size: 0.85rem;
    color: #777;
}

.suche-status.fehler-text {
    color: #9b1c1c;
}

.inhalt-box + .karten-raster {
    margin-top:24px;
}

/* Hilfe-Karte (Antwort auf Systemfragen) */
.karten-raster .hilfe {
    grid-column: 1 / -1;
}

.hilfe .karte-feld {
    overflow: visible;
    white-space: normal;
}

.hilfe-link {
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2b6cb0;
}

/* Schnellsuche-Ergebnis: Visitenkarten */
.karten-raster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.karten-raster[hidden] {
    display: none;
}

.visitenkarte {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 16px 20px;
}

a.visitenkarte {
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s, transform 0.15s;
}

a.visitenkarte:hover,
a.visitenkarte:focus-visible {
    outline: none;
    box-shadow: 0 6px 24px rgba(43, 108, 176, 0.25);
    transform: translateY(-1px);
}

.avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    color: #2b6cb0;
    background: #e6eef7;
    border-radius: 50%;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar.gross {
    width: 150px;
    height: 150px;
    font-size: 3rem;
}

.avatar.klein {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
}

/* Profilbild-Upload (Klick auf das Bild) */
.bild-upload {
    margin: 0;
}

.avatar-upload {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.avatar-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.avatar-hinweis {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.15s;
}

.avatar-upload:hover .avatar-hinweis,
.avatar-upload:focus-within .avatar-hinweis {
    opacity: 1;
}

.avatar-upload:focus-within {
    outline: 3px solid rgba(43, 108, 176, 0.4);
}

.karte-text {
    min-width: 0;
}

.karte-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.karte-feld {
    margin-top: 2px;
    font-size: 0.85rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.karten-raster mark {
    color: inherit;
    background: #fff3bf;
    border-radius: 2px;
}

.keine-treffer {
    grid-column: 1 / -1;
    margin: 0;
    padding: 16px 20px;
    font-size: 0.9rem;
    color: #888;
}

/* Kontakt-Detailseite */
.kontakt-kopf {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
}

.kontakt-kopf h2 {
    font-size: 1.4rem;
}

.kontakt-daten {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 48px;
    padding: 24px;
    min-height: 0;
}

.feld {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.feld-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kontakt-daten a {
    color: #2b6cb0;
    text-decoration: none;
}

/* WhatsApp-Icon hinter der Mobilnummer */
.kontakt-daten a.whatsapp {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 8px;
}

.whatsapp svg {
    width: 22px;
    height: 22px;
    fill: #25d366;
}

.whatsapp:hover svg,
.whatsapp:focus-visible svg {
    fill: #1ebe5b;
}

/* Übersichtsboxen (Kopfzeile + Inhaltsbereich) */
.box-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    align-items: start;
}

.box-kopf {
    padding: 14px 20px;
    border-bottom: 1px solid #e2e2e2;
}

.box-kopf h2 {
    margin: 0;
    font-size: 1.05rem;
}

.box-inhalt {
    padding: 16px 20px 20px;
    min-height: 140px;
}

.box-inhalt ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.box-inhalt li {
    padding: 8px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
}

.box-inhalt li:last-child {
    border-bottom: none;
}

/* Eintrag mit Profilbild */
.eintrag {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.eintrag-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.eintrag-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eintrag:hover .eintrag-name,
.eintrag:focus-visible .eintrag-name {
    color: #2b6cb0;
}

.box-inhalt .info {
    margin-top: 2px;
    font-size: 0.85rem;
    color: #777;
}

.box-inhalt .leer {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
}

/* Profil: zwei Spalten nebeneinander (Querformat 16:10) */
.profil-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.profil-grid form + form {
    padding-left: 48px;
    border-left: 1px solid #e2e2e2;
}

.zeile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Protokoll */
.protokoll {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e2e2e2;
}

.protokoll table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.protokoll th,
.protokoll td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.protokoll th {
    font-weight: 600;
    background: #f7f8fa;
}

       .protokoll details > summary {
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            list-style: none;
        }
        .protokoll details > summary::-webkit-details-marker {
            display: none;
        }
        .protokoll details > summary::marker {
            content: "";
        }
        .protokoll-pfeil {
            flex: 0 0 auto;
            width: 0;
            height: 0;
            border-top: 7px solid transparent;
            border-bottom: 7px solid transparent;
            border-left: 10px solid currentColor;
            transition: transform 0.15s ease;
        }
        .protokoll details[open] > summary .protokoll-pfeil {
            transform: rotate(90deg);
        }
        .protokoll details > summary h2 {
            margin: 0;
        }

.blaettern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 0.9rem;
}

.blaettern a {
    color: #2b6cb0;
    text-decoration: none;
}

.blaettern .deaktiviert {
    color: #aaa;
}

label {
    display: block;
    margin: 16px 0 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

input:disabled {
    background: #f3f3f3;
    color: #777;
}

.profil-box select {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.profil-box select:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

.profil-box textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
}

.profil-box textarea:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

button {
    width: 100%;
    margin-top: 24px;
    padding: 11px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #2b6cb0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background: #245a96;
}

button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.fehler {
    margin: 0 0 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #9b1c1c;
    background: #fde8e8;
    border-radius: 6px;
}

.erfolg {
    margin: 0 0 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #1c5b2a;
    background: #e4f6e8;
    border-radius: 6px;
}

/* Mittlere Bildschirme: Visitenkarten zweispaltig */
@media (max-width: 1000px) {
    .karten-raster {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Schmale Bildschirme: alles untereinander */
@media (max-width: 800px) {
    .seite {
        flex-direction: column;
    }

    .navigation {
        width: 100%;
    }

    .karten-raster,
    .box-raster,
    .kontakt-daten {
        grid-template-columns: 1fr;
    }

    .profil-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .profil-grid form + form {
        padding-left: 0;
        padding-top: 24px;
        border-left: none;
        border-top: 1px solid #e2e2e2;
    }

    .zeile {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .protokoll {
        overflow-x: auto;
    }
}

/* Inline-Bearbeitung der Kontaktfelder (Stift-Symbol) */
.kontakt-kopf h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
}

.feld-paar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.kontakt-detail .edit {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    max-width: 100%;
}

.kontakt-detail .edit-anzeige {
    min-width: 0;
}

.kontakt-detail .edit-stift {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 3px;
    font-size: inherit;
    color: #9aa5b1;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.kontakt-detail .edit-stift:hover,
.kontakt-detail .edit-stift:focus-visible {
    color: #2b6cb0;
    background: #e6eef7;
}

.kontakt-detail .edit-stift svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kontakt-detail .edit.bearbeiten .edit-anzeige,
.kontakt-detail .edit.bearbeiten .edit-stift {
    display: none;
}

.kontakt-detail .edit-input {
    flex: 1 1 12rem;
    width: auto;
    min-width: 0;
    padding: 4px 8px;
    font: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid #2b6cb0;
    border-radius: 6px;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
    outline: none;
}

.kontakt-detail .edit[data-feld="plz"] .edit-input {
    flex-basis: 6rem;
}

.kontakt-detail .edit-fehler {
    flex-basis: 100%;
    font-size: 0.8rem;
    color: #9b1c1c;
}

.kontakt-detail .edit.gespeichert .edit-anzeige {
    animation: edit-gespeichert 1.2s ease-out;
}

@keyframes edit-gespeichert {
    from { background: #e4f6e8; }
    to   { background: transparent; }
}


/* Aktions-Icons unter dem Namen */
.kontakt-kopf-text {
    min-width: 0;
}

.kontakt-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.kontakt-aktionen .aktion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #2b6cb0;
    background: #e6eef7;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.kontakt-aktionen .aktion:hover,
.kontakt-aktionen .aktion:focus-visible {
    color: #fff;
    background: #2b6cb0;
}

.kontakt-aktionen .aktion svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kontakt-aktionen .aktion.whatsapp {
    background: #e3f7ea;
}

.kontakt-aktionen .aktion.whatsapp:hover,
.kontakt-aktionen .aktion.whatsapp:focus-visible {
    background: #25d366;
}

.kontakt-aktionen .aktion.whatsapp svg {
    fill: #25d366;
    stroke: none;
}

.kontakt-aktionen .aktion.whatsapp:hover svg,
.kontakt-aktionen .aktion.whatsapp:focus-visible svg {
    fill: #fff;
}


/* Seitenleiste: Navigation + Zurück-Button */
.seitenleiste {
    flex-shrink: 0;
    width: 200px;
}

.seitenleiste .navigation {
    width: 100%;
    margin-bottom: 4px;
}

.zurueck-button {
    margin: 0 0 40px;
}

/* Restzeit der Sitzung zwischen Navigation und Zurück-Button, darunter die Version */
.sitzung-countdown,
.version-anzeige {
    margin: 14px 0 10px;
    font-size: 0.75rem;
    color: #888;
    font-variant-numeric: tabular-nums;
}

.sitzung-countdown + .version-anzeige {
    margin-top: -6px;
}

/* Update-Log (Systemeinstellungen) */
.updatelog-version {
    margin-left: 8px;
    font-size: 0.8rem;
    font-weight: normal;
    color: #888;
}

/* Gruppen nach Hauptversion (2.2, 2.1 …), die jüngste aufgeklappt */
.updatelog-gruppe {
    margin: 0 0 12px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
}

.updatelog-gruppe-kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
}

.updatelog-gruppe-kopf::-webkit-details-marker {
    display: none;
}

/* Pfeil: zu ▸, auf ▾ */
.updatelog-gruppe-kopf::before {
    content: "";
    align-self: center;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid currentColor;
    transition: transform 0.15s ease;
}

.updatelog-gruppe[open] > .updatelog-gruppe-kopf::before {
    transform: rotate(90deg);
}

.updatelog-gruppe-titel {
    font-weight: bold;
}

.updatelog-gruppe-info {
    font-size: 0.85rem;
    color: #888;
}

.updatelog-gruppe[open] > .updatelog-gruppe-kopf {
    border-bottom: 1px solid #e6e6e6;
}

.updatelog-gruppe .tabelle-scroll {
    padding: 0 6px 6px;
}

.updatelog-tabelle {
    width: 100%;
    border-collapse: collapse;
}

.updatelog-tabelle th,
.updatelog-tabelle td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e6e6e6;
}

.updatelog-tabelle td:nth-child(1),
.updatelog-tabelle td:nth-child(2),
.updatelog-tabelle td:nth-child(3) {
    white-space: nowrap;
}

.updatelog-nummer {
    font-weight: bold;
    font-variant-numeric: tabular-nums;
}

.updatelog-marke {
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 0.75rem;
    font-weight: normal;
    color: #fff;
    background: #2b6cb0;
    border-radius: 10px;
}

.updatelog-art {
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 10px;
    background: #edf2f7;
}

.updatelog-art-funktion {
    background: #e6f4ea;
    color: #1a7f37;
}

.updatelog-art-fix {
    background: #fff4e5;
    color: #9a5b00;
}

@media (max-width: 800px) {
    .seitenleiste {
        width: 100%;
    }
}


/* Profil: Hinweistext unter Feldern */
.feld-hinweis {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: #777;
}

/* Wetter-Kachel */
.wetter-ort {
    font-size: 0.85rem;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wetter-jetzt {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 6px;
}

.wetter-icon {
    font-size: 2.4rem;
    line-height: 1;
}

.wetter-temp {
    font-size: 2rem;
    font-weight: 600;
}

.wetter-text {
    color: #555;
}

.wetter-details {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #777;
}

.wetter-tage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.wetter-tag {
    text-align: center;
    font-size: 0.85rem;
}

.wetter-tag-name {
    font-weight: 600;
}

.wetter-tag-icon {
    margin: 2px 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.wetter-tag-regen {
    font-size: 0.8rem;
    color: #777;
}

.wetter-hinweis {
    margin: 14px 0 0;
    font-size: 0.8rem;
    color: #888;
}

/* Wetterseite (wetter_vorhersage.php) */
.wettervorhersage-jetzt {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 8px 0 24px;
}

.wettervorhersage-jetzt-icon {
    font-size: 3.2rem;
    line-height: 1;
}

.wettervorhersage-jetzt-temp {
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1;
}

.wettervorhersage-jetzt-text {
    font-size: 1.05rem;
    font-weight: 600;
}

.wettervorhersage-jetzt-details {
    font-size: 0.9rem;
    color: #666;
}

.wettervorhersage-tage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.wettervorhersage-tag {
    padding: 14px 12px;
    text-align: center;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
}

.wettervorhersage-tag-heute {
    border-color: #2b6cb0;
}

.wettervorhersage-tag-name {
    font-weight: 600;
}

.wettervorhersage-tag-datum {
    font-size: 0.8rem;
    color: #777;
}

.wettervorhersage-tag-icon {
    margin: 6px 0 2px;
    font-size: 2.2rem;
    line-height: 1.2;
}

.wettervorhersage-tag-text {
    min-height: 2.4em;
    font-size: 0.85rem;
}

.wettervorhersage-tag-temp {
    margin: 6px 0;
    font-size: 1.1rem;
}

.wettervorhersage-tag-temp .min {
    color: #777;
}

.wettervorhersage-tag-details {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #666;
}

.wettervorhersage-hinweis {
    margin: 18px 0 0;
    font-size: 0.8rem;
    color: #888;
}
        .system-daten {
            margin: 0;
        }

        .system-zeile {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            padding: 10px 0;
            border-bottom: 1px solid #e5e5e5;
        }

        .system-zeile:last-child {
            border-bottom: 0;
        }

        .system-zeile dt {
            font-weight: 500;
        }

        .system-zeile dd {
            margin: 0;
            text-align: right;
            overflow-wrap: anywhere;
        }

        .system-status {
            opacity: .7;
        }
               /* System-Kachel */
        .system-kachel {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .system-block {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 14px 16px;
            border-radius: 12px;
            background: #f6f8fb;
            border: 1px solid #e6ebf2;
        }

        .system-ring {
            position: relative;
            flex: 0 0 auto;
            width: 88px;
            height: 88px;
        }

        .system-ring svg {
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }

        .system-ring .spur {
            fill: none;
            stroke: #e1e7ef;
            stroke-width: 9;
        }

        .system-ring .fuellung {
            fill: none;
            stroke: #2b6cb0;
            stroke-width: 9;
            stroke-linecap: round;
            stroke-dasharray: 263.89;
            stroke-dashoffset: 263.89;
            transition: stroke-dashoffset .6s ease, stroke .3s ease;
        }

        .system-ring .fuellung.warn { stroke: #dd8b1a; }
        .system-ring .fuellung.kritisch { stroke: #c53030; }

        .system-ring-wert {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.15rem;
            font-weight: 700;
            color: #1f3a5f;
        }

        .system-text {
            min-width: 0;
            flex: 1 1 auto;
        }

        .system-label {
            margin: 0 0 2px;
            font-size: .75rem;
            font-weight: 600;
            letter-spacing: .06em;
            text-transform: uppercase;
            color: #6b7a90;
        }

        .system-gross {
            margin: 0;
            font-size: 1.15rem;
            font-weight: 700;
            color: #1f2d3d;
            overflow-wrap: anywhere;
        }

        .system-klein {
            margin: 2px 0 0;
            font-size: .85rem;
            color: #6b7a90;
            overflow-wrap: anywhere;
        }

        .system-paar {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
        }

        .system-paar .system-block {
            flex-direction: column;
            align-items: stretch;
            gap: 10px;
        }

        .system-balken {
            height: 8px;
            border-radius: 999px;
            background: #e1e7ef;
            overflow: hidden;
        }

        .system-balken span {
            display: block;
            height: 100%;
            width: 0;
            border-radius: 999px;
            background: #2f9e5b;
            transition: width .6s ease, background .3s ease;
        }

        .system-balken span.warn { background: #dd8b1a; }
        .system-balken span.kritisch { background: #c53030; }

        .system-status {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 0;
            font-size: .8rem;
            color: #6b7a90;
        }

        .system-punkt {
            flex: 0 0 auto;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #9aa7b8;
        }

        .system-punkt.ok {
            background: #2f9e5b;
            box-shadow: 0 0 0 0 rgba(47, 158, 91, .5);
            animation: system-puls 2s infinite;
        }

        .system-punkt.fehler {
            background: #c53030;
        }

        @keyframes system-puls {
            0%   { box-shadow: 0 0 0 0 rgba(47, 158, 91, .5); }
            70%  { box-shadow: 0 0 0 7px rgba(47, 158, 91, 0); }
            100% { box-shadow: 0 0 0 0 rgba(47, 158, 91, 0); }
        }

        @media (max-width: 420px) {
            .system-paar { grid-template-columns: 1fr; }
        }
     /* Kalender */
        .kal-kopf {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 16px;
        }

        .kal-steuerung {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .kal-steuerung h2 {
            margin: 0 8px;
            min-width: 10.5em;
            text-align: center;
            font-size: 1.3rem;
        }

        .kal-nav {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 38px;
            height: 38px;
            padding: 0 12px;
            font-size: 1rem;
            font-weight: 600;
            color: #2b6cb0;
            text-decoration: none;
            background: #fff;
            border: 1px solid #ccc;
            border-radius: 6px;
        }

        .kal-nav:hover {
            background: #f0f5fa;
            border-color: #2b6cb0;
        }

        .kal-nav:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.3);
        }

        .kal-update-form {
            margin: 0;
        }

        .kal-update-form button {
            width: auto;
            margin: 0;
            padding: 9px 16px;
            font-size: 0.95rem;
        }

        .kal-raster {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            border-top: 1px solid #e2e2e2;
            border-left: 1px solid #e2e2e2;
        }

        .kal-wt {
            padding: 8px 6px;
            font-size: 0.8rem;
            font-weight: 600;
            text-align: center;
            color: #666;
            background: #f7f8fa;
            border-right: 1px solid #e2e2e2;
            border-bottom: 1px solid #e2e2e2;
        }

        .kal-tag {
            min-height: 112px;
            min-width: 0;
            padding: 4px;
            background: #fff;
            border-right: 1px solid #e2e2e2;
            border-bottom: 1px solid #e2e2e2;
        }

        .kal-tag.mit-eintraegen {
            cursor: pointer;
        }

        .kal-tag.mit-eintraegen:hover {
            background: #fafcfe;
        }

        .kal-tag.anderer-monat {
            background: #f7f8fa;
        }

        .kal-tag.anderer-monat .kal-nr,
        .kal-tag.anderer-monat .kal-chip {
            opacity: 0.55;
        }

        .kal-nr {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 26px;
            height: 26px;
            margin-bottom: 2px;
            padding: 0 6px;
            font-size: 0.85rem;
            font-weight: 600;
            color: #444;
            border-radius: 13px;
        }

        .kal-tag.wochenende .kal-nr {
            color: #888;
        }

        .kal-tag.heute .kal-nr {
            color: #fff;
            background: #2b6cb0;
        }

        .kal-chip {
            display: block;
            width: 100%;
            margin: 0 0 2px;
            padding: 2px 6px;
            overflow: hidden;
            font-size: 0.78rem;
            font-weight: 500;
            line-height: 1.4;
            text-align: left;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: #222;
            background: color-mix(in srgb, var(--farbe) 14%, #fff);
            border: none;
            border-left: 3px solid var(--farbe);
            border-radius: 4px;
            cursor: pointer;
        }

        .kal-chip:hover {
            background: color-mix(in srgb, var(--farbe) 26%, #fff);
        }

        .kal-chip:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.35);
        }

        .kal-chip.ganz {
            color: #fff;
            background: var(--farbe);
        }

        .kal-chip.ganz:hover {
            background: color-mix(in srgb, var(--farbe) 85%, #000);
        }

        .kal-zeit {
            margin-right: 4px;
            font-weight: 600;
            color: #555;
        }

        /* Wochenansicht: Uhrzeit in eigener Zeile über dem Titel */
        .kal-raster.woche .kal-zeit {
            display: block;
            margin-right: 0;
            font-size: 0.72rem;
            line-height: 1.2;
        }

        /* Seriensymbol vor dem Titel */
        .kal-serie {
            margin-right: 3px;
            font-weight: 700;
            opacity: 0.75;
        }

        .kal-mehr {
            display: block;
            padding: 1px 6px;
            font-size: 0.75rem;
            color: #2b6cb0;
        }

        .kal-fuss {
            margin: 14px 0 0;
            font-size: 0.8rem;
            color: #777;
        }

        /* Lightbox */
        dialog.kal-dialog {
            width: calc(100% - 32px);
            max-width: 560px;
            max-height: 85vh;
            padding: 0;
            overflow: hidden;
            color: #222;
            background: #fff;
            border: none;
            border-radius: 10px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
        }

        dialog.kal-dialog::backdrop {
            background: rgba(0, 0, 0, 0.45);
        }

        .kal-dialog-rahmen {
            display: flex;
            flex-direction: column;
            max-height: 85vh;
        }

        .kal-dialog-kopf {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            padding: 20px 20px 14px 24px;
            border-left: 6px solid var(--farbe, #2b6cb0);
            border-bottom: 1px solid #eee;
        }

        .kal-dialog-kopf h3 {
            margin: 0;
            font-size: 1.15rem;
            line-height: 1.3;
            overflow-wrap: anywhere;
        }

        .kal-dialog-kalender {
            margin-top: 4px;
            font-size: 0.82rem;
            color: #777;
        }

        .kal-x {
            flex: none;
            width: 34px;
            height: 34px;
            margin: -4px -6px 0 0;
            padding: 0;
            font-size: 1.4rem;
            line-height: 1;
            color: #666;
            background: transparent;
            border-radius: 17px;
        }

        .kal-x:hover {
            color: #222;
            background: #eee;
        }

        .kal-dialog-inhalt {
            padding: 6px 24px 24px;
            overflow-y: auto;
        }

        .kal-zeile {
            margin-top: 16px;
        }

        .kal-zeile-label {
            margin-bottom: 3px;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            color: #777;
        }

        .kal-zeile-wert {
            white-space: pre-wrap;
            overflow-wrap: anywhere;
            line-height: 1.5;
        }

        .kal-zeile-wert a {
            color: #2b6cb0;
        }

        .kal-teilnehmer {
            margin: 0;
            padding-left: 18px;
        }

        .kal-teilnehmer li {
            white-space: normal;
        }

        .kal-liste {
            margin: 12px 0 0;
            padding: 0;
            list-style: none;
        }

        .kal-liste li + li {
            margin-top: 6px;
        }

        .kal-liste .kal-chip {
            padding: 8px 10px;
            font-size: 0.92rem;
        }

        .kal-zurueck {
            width: auto;
            margin: 14px 0 0;
            padding: 0;
            font-size: 0.88rem;
            font-weight: 500;
            color: #2b6cb0;
            background: none;
        }

        .kal-zurueck:hover {
            background: none;
            text-decoration: underline;
        }

        @media (max-width: 800px) {
            .kal-tag {
                min-height: 64px;
                padding: 2px;
            }

            .kal-nr {
                min-width: 22px;
                height: 22px;
                font-size: 0.78rem;
            }

            /* Schmale Bildschirme: Termine als farbige Punkte, Tipp auf den Tag öffnet die Liste */
            .kal-tag .kal-chip {
                display: inline-block;
                width: 8px;
                height: 8px;
                margin: 0 2px 2px 0;
                padding: 0;
                font-size: 0;
                background: var(--farbe);
                border: none;
                border-radius: 4px;
            }

            .kal-tag .kal-mehr {
                display: none;
            }

            .kal-steuerung h2 {
                min-width: 0;
                font-size: 1.1rem;
            }
        }

        /* Kalender: aktive Ansicht und Wochenraster (vorher inline in kalender.php) */
        .kal-nav.aktiv {
            font-weight: 700;
        }

        .kal-raster.woche .kal-tag {
            min-height: 22rem;
        }

        @media (max-width: 800px) {
            .kal-raster.woche .kal-tag {
                min-height: 0;
            }
        }

        /* Wochenansicht: Terminhöhe nach Dauer (Grundhöhe = 1 Stunde oder weniger) */
        .kal-raster.woche .kal-chip.dauer {
            --kal-stunde-hoehe: 2.3rem;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            min-height: calc(var(--stunden, 1) * var(--kal-stunde-hoehe));
        }

        .kal-raster.woche .kal-chip.dauer .kal-titel {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Wochenansicht: sich überschneidende Termine versetzt übereinander
           (erster volle Breite, jeder weitere 10 % schmaler und rechtsbündig) */
        .kal-parallel {
            display: grid;
            grid-template-columns: 100%;
            margin: 0 0 2px;
        }

        .kal-parallel .kal-chip {
            grid-area: 1 / 1;
            justify-self: end;
            width: calc(100% - min(var(--ebene, 0), 5) * 10%);
            min-width: 0;
            margin: 0;
            z-index: calc(var(--ebene, 0) + 1);
        }

        /* Später beginnende Termine der Gruppe entsprechend tiefer setzen */
        .kal-parallel .kal-chip.dauer {
            margin-top: calc(var(--versatz, 0) * var(--kal-stunde-hoehe));
        }

        @media (max-width: 800px) {
            .kal-raster.woche .kal-tag .kal-chip.dauer {
                display: inline-block;
                min-height: 0;
            }

            .kal-parallel {
                display: contents;
            }

            .kal-tag .kal-parallel .kal-chip,
            .kal-tag .kal-parallel .kal-chip.dauer {
                width: 8px;
                margin: 0 2px 2px 0;
            }
        }

        /* Kalender: neuen Termin anlegen */
        .kal-aktionen {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
        }

        .kal-neu-knopf {
            width: auto;
            margin: 0;
            padding: 9px 16px;
            font-size: 0.95rem;
        }

        .kal-form {
            margin: 0;
        }

        .kal-form-zeile {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .kal-form input[type="date"],
        .kal-form input[type="time"] {
            width: 100%;
            padding: 10px 12px;
            font-size: 1rem;
            background: #fff;
            border: 1px solid #ccc;
            border-radius: 6px;
        }

        .kal-form input[type="date"]:focus,
        .kal-form input[type="time"]:focus {
            outline: none;
            border-color: #2b6cb0;
            box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
        }

        @media (max-width: 420px) {
            .kal-form-zeile {
                grid-template-columns: 1fr;
            }
        }

        /* Startseite: alle Widgets gleich hoch, Inhalt scrollt bei Überlänge */
        .box-raster .box {
            position: relative;
            display: flex;
            flex-direction: column;
            height: 325px;
            overflow: hidden;
        }
        .box-raster .box-kopf {
            flex: 0 0 auto;
        }
        .box-raster .box-inhalt {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
        }

        /* Nachrichten: über die ganze Breite des Rasters (bei drei Spalten = drei Widgets plus Zwischenräume); Höhe wie die anderen Widgets, Inhalt scrollt */
        .box-raster #nachrichten-widget {
            grid-column: 1 / -1;
        }

        /* Klickbares Widget: der Titel-Link deckt die ganze Kachel ab */
        .box-link {
            color: inherit;
            text-decoration: none;
        }
        .box-link::after {
            content: "";
            position: absolute;
            inset: 0;
        }
        .box-link:focus-visible::after {
            outline: 3px solid rgba(43, 108, 176, 0.5);
            outline-offset: -3px;
            border-radius: 10px;
        }

        /* CRM: Statistik-Widgets (Kreis- und Liniendiagramme) */
        .stat-kreis {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .stat-kreis svg {
            flex: 0 0 auto;
            width: 120px;
            height: 120px;
        }

        .stat-kreis path,
        .stat-kreis circle {
            fill: var(--farbe);
        }

        .box-inhalt .stat-legende {
            flex: 1 1 auto;
            min-width: 0;
        }

        .box-inhalt .stat-legende li {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 2px 0;
            font-size: 0.8rem;
            border-bottom: none;
        }

        .stat-punkt {
            flex: 0 0 auto;
            width: 10px;
            height: 10px;
            border-radius: 2px;
            background: var(--farbe);
        }

        .stat-name {
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .stat-zahl {
            flex: 0 0 auto;
            font-weight: 600;
        }

        .stat-farbe-0 { --farbe: #2b6cb0; }
        .stat-farbe-1 { --farbe: #dd8b1a; }
        .stat-farbe-2 { --farbe: #2f9e5b; }
        .stat-farbe-3 { --farbe: #c53030; }
        .stat-farbe-4 { --farbe: #7c5cbf; }
        .stat-farbe-5 { --farbe: #14a3a8; }
        .stat-farbe-6 { --farbe: #d9528f; }
        .stat-farbe-7 { --farbe: #8a9a2b; }
        .stat-farbe-8 { --farbe: #6b4f3a; }
        .stat-farbe-sonstige { --farbe: #9aa7b8; }

        .stat-linie svg {
            display: block;
            width: 100%;
            height: auto;
        }

        .stat-linie text {
            fill: currentColor;
            font-size: 10px;
        }

        .stat-linie .stat-achse {
            opacity: 0.7;
        }

        .stat-linie .stat-wert {
            font-weight: 600;
        }

        .stat-gitter {
            stroke-opacity: 0.15;
        }

        .stat-verlauf {
            fill: none;
            stroke: #2b6cb0;
            stroke-width: 2;
            stroke-linejoin: round;
            stroke-linecap: round;
        }

        .stat-marker {
            fill: #2b6cb0;
        }

        /* CRM: Kontaktkarte (volle Breite, gleiche Höhe wie die anderen Widgets) */
        .box-raster .box-karte {
            grid-column: 1 / -1;
        }

        .box-inhalt.karte-inhalt {
            position: relative;
            padding: 0;
            overflow: hidden;
        }

        #kontakte-karte {
            position: absolute;
            inset: 0;
        }

        /* Kartenseite: volle Breite des Inhaltsbereichs, Höhe bis zum unteren Bildschirmrand */
        .inhalt-box.karte-gross {
            position: relative;
            height: calc(100vh - 48px);
            margin-bottom: 0;
            padding: 0;
            overflow: hidden;
        }

        @media (max-width: 800px) {
            .inhalt-box.karte-gross {
                height: 70vh;
            }
        }

        /* Kontaktsuche: Einzelfelder */
        .detailsuche-felder {
            margin-top: 16px;
        }

        .detailsuche-felder > summary {
            cursor: pointer;
            font-weight: 600;
        }

        .detailsuche-raster {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0 24px;
        }

        .detailsuche-aktionen {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-top: 8px;
        }

        .detailsuche-aktionen button {
            width: auto;
            min-width: 160px;
            padding: 11px 28px;
        }

        .detailsuche-aktionen a {
            color: #2b6cb0;
        }

        @media (max-width: 800px) {
            .detailsuche-raster {
                grid-template-columns: 1fr;
            }
        }

/* Telefon-Widget (Startseite) */
.telefon .telefon-nummer,
.telefon .telefon-nummer:focus {
    display: block;
    width: 100%;
    height: 32px;
    margin: 0 0 6px;
    padding: 0 6px;
    font-size: 1.2rem;
    text-align: center;
    color: inherit;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    cursor: text;
}

.telefon-tasten {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px 10px;
    max-width: 300px;
    margin: 0 auto;
}

.telefon-tasten button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    color: #2b6cb0;
    background: #e6eef7;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.telefon-tasten button:hover,
.telefon-tasten button:focus-visible {
    color: #fff;
    background: #2b6cb0;
}

.telefon-tasten button svg {
    width: 45%;
    height: 45%;
    fill: currentColor;
}

.telefon-tasten .telefon-abheben {
    color: #25d366;
    background: #e3f7ea;
}

.telefon-tasten .telefon-abheben:hover,
.telefon-tasten .telefon-abheben:focus-visible {
    color: #fff;
    background: #25d366;
}

.telefon-tasten .telefon-auflegen {
    color: #d03a3a;
    background: #fbe7e7;
}

.telefon-tasten .telefon-auflegen:hover,
.telefon-tasten .telefon-auflegen:focus-visible {
    color: #fff;
    background: #d03a3a;
}

.telefon-tasten .telefon-auflegen svg {
    transform: rotate(135deg);
}

   .firma-avatar { border-radius: 14px; background: #fff; border: 1px solid #e2e2e2; }
        .firma-avatar img { object-fit: contain; }
        .unternehmen-suche { display: flex; flex-wrap: wrap; gap: 24px; }
        .unternehmen-suche > section { flex: 1 1 320px; min-width: 0; }
        .unternehmen-suche h2 { margin-top: 0; }
        .kontakt-notiz .edit { display: inline-flex; align-items: flex-start; gap: 6px; max-width: 100%; }
        .kontakt-notiz .edit-anzeige { white-space: pre-wrap; overflow-wrap: anywhere; }
        .kontakt-notiz .edit.bearbeiten .edit-anzeige,
        .kontakt-notiz .edit.bearbeiten .edit-stift { display: none; }
        .kontakt-notiz .edit-stift {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            width: 24px;
            height: 24px;
            margin: 0;
            padding: 4px;
            color: #666;
            background: transparent;
            border: 0;
            border-radius: 4px;
            cursor: pointer;
        }
        .kontakt-notiz .edit-stift:hover { background: #eee; }
        .kontakt-notiz .edit-stift svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
        .kontakt-notiz .edit-input { box-sizing: border-box; width: 100%; min-height: 8rem; resize: vertical; font: inherit; }
        .rolle-info { color: #777; font-size: 0.85rem; }
        .kontakte-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; margin: 0; padding: 0; }
        .kontakte-raster > li { min-width: 0; list-style: none; }

        .box > details > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
}

.box > details > summary::-webkit-details-marker {
    display: none;
}

.box > details > summary h2 {
    margin: 0;
}

.box > details[open] > summary .protokoll-pfeil {
    transform: rotate(90deg);
}

.box > details:not([open]) > .box-inhalt {
    display: none;
}
.kontakt-notiz details > summary,
.dokumente-einklappbar > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
}

.kontakt-notiz details > summary::-webkit-details-marker,
.dokumente-einklappbar > summary::-webkit-details-marker {
    display: none;
}

.kontakt-notiz details > summary h2,
.dokumente-einklappbar > summary h2 {
    margin: 0;
}

.kontakt-notiz details[open] > summary .protokoll-pfeil,
.dokumente-einklappbar[open] > summary .protokoll-pfeil {
    transform: rotate(90deg);
}

.kontakt-notiz .protokoll-pfeil,
.dokumente-einklappbar .protokoll-pfeil {
    transition: transform 0.2s ease;
}


.server-monitor {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #d9d9d9;
}

.server-monitor h3 {
    margin: 0 0 12px;
    font-size: 1.2rem;
}

.server-monitor-info {
    margin: 0 0 18px;
    color: #666;
    font-size: 0.9rem;
}

.server-liste {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.server-karte {
    min-width: 0;
    padding: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #fff;
}

.server-kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
}

.server-name {
    margin: 0;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.server-ip {
    color: #666;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.server-dienste {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.server-dienst {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.server-dienst:last-child {
    border-bottom: none;
}

.server-dienst-name {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}

.server-dienst-status {
    flex-shrink: 0;
    display: inline-block;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.server-dienst-status.online {
    color: #176534;
    background: #e2f5e8;
}

.server-dienst-status.offline {
    color: #a51d24;
    background: #fde8e8;
}

/* Status noch nicht geprüft (Karte wird nachgeladen) */
.server-dienst-status.pruefe {
    color: #666;
    background: #eef0f3;
}

@media (max-width: 600px) {
    .server-liste {
        grid-template-columns: minmax(0, 1fr);
    }

    .server-karte {
        padding: 12px;
    }
}

.einstellungen-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.einstellungen-form input[type="number"] {
    width: 160px;
    margin-bottom: 8px;
}

.einstellungen-hinweis {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 16px;
}

.meldung-ok {
    color: #1a7f37;
    margin-bottom: 12px;
}
       .kontakt-formular { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
        .kontakt-formular .voll { grid-column: 1 / -1; }
        .kontakt-formular select {
            width: 100%;
            padding: 10px 12px;
            font-size: 1rem;
            background: #fff;
            border: 1px solid #ccc;
            border-radius: 6px;
        }
        .kontakt-formular select:focus {
            outline: none;
            border-color: #2b6cb0;
            box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
        }
        .vcard-import {
            padding: 16px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 6px;
        }
        .vcard-import label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
        }
        .vcard-import input[type="file"] {
            display: block;
            width: 100%;
            margin-bottom: 10px;
        }
        #vcard-status {
            margin: 8px 0 0;
        }
        @media (max-width: 600px) {
            .kontakt-formular { grid-template-columns: 1fr; }
        }
        
/* Karten-Lightbox auf der Kontaktseite */
.karten-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.75);
}

.karten-lightbox[hidden] {
    display: none !important;
}

.karten-lightbox-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    height: 85vh;
    max-height: 900px;
    margin: auto;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

#karten-rahmen {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
}

.karten-zu {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    color: #222;
    font-size: 30px;
    line-height: 1;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.karten-zu:hover {
    color: #fff;
    background: #2b6cb0;
}

.karten-lightbox-fuss {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 12px 16px;
    font-size: 0.85rem;
    background: #fff;
    border-top: 1px solid #e2e2e2;
}

.karten-lightbox-fuss a {
    color: #2b6cb0;
    text-decoration: none;
}

.karten-lightbox-fuss a:hover {
    text-decoration: underline;
}

@media (max-width: 800px) {
    .karten-lightbox {
        padding: 10px;
    }

    .karten-lightbox-box {
        height: 90vh;
        max-height: none;
        border-radius: 8px;
    }

    .karten-lightbox-fuss {
        font-size: 0.75rem;
    }
}

.notizen-bereich {
    margin-top: 32px;
}
.notizen-formular {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 24px;
}
.notizen-formular .voll {
    grid-column: 1 / -1;
}
.notizen-formular label {
    display: block;
    margin-bottom: 6px;
}
.notizen-formular input[type="text"],
.notizen-formular textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.notizen-formular textarea {
    min-height: 150px;
    resize: vertical;
}
.notizen-formular button {
    max-width: 240px;
}
.notizen-formular-aktionen {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}
.notizen-formular-aktionen a {
    display: inline-block;
}
.notizen-raster {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.notizzettel {
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    min-width: 0;
    padding: 22px;
    overflow: hidden;
    border: 1px solid #e3d9a7;
    border-radius: 8px;
    background: #fffbe6;
    color: #252525;
    box-shadow: 0 3px 9px rgb(0 0 0 / 6%);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.notizzettel:hover,
.notizzettel:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgb(0 0 0 / 14%);
    outline: none;
}
.notizzettel h3 {
    flex: 0 0 auto;
    margin: 0 0 12px;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.notizzettel-inhalt {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-height: 1.6;
}
.notizzettel-inhalt::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    background: linear-gradient(to bottom, rgb(255 251 230 / 0%), #fffbe6);
    pointer-events: none;
}
.notizzettel-datum {
    flex: 0 0 auto;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgb(128 128 128 / 25%);
    color: #666;
    font-size: 12px;
}
.notiz-dialog {
    width: 85vw;
    height: 85vh;
    max-width: none;
    max-height: none;
    padding: 0;
    border: 1px solid #e3d9a7;
    border-radius: 10px;
    background: #fffbe6;
    color: #252525;
    box-shadow: 0 12px 40px rgb(0 0 0 / 35%);
}
.notiz-dialog[open] {
    display: flex;
    flex-direction: column;
}
.notiz-dialog::backdrop {
    background: rgb(0 0 0 / 55%);
}
body:has(.notiz-dialog[open]) {
    overflow: hidden;
}
.notiz-dialog-kopf {
    flex: 0 0 auto;
    padding: 20px 28px 14px;
    border-bottom: 1px solid rgb(128 128 128 / 25%);
}
.notiz-dialog-kopf h3 {
    margin: 0;
    font-size: 1.4rem;
    overflow-wrap: anywhere;
}
.notiz-dialog-inhalt {
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px 28px;
    overflow-y: auto;
    overflow-wrap: anywhere;
    line-height: 1.7;
    font-size: 1.05rem;
}
.notiz-dialog-fuss {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 28px;
    border-top: 1px solid rgb(128 128 128 / 25%);
}
.notiz-dialog-fuss .notizzettel-datum {
    margin: 0 auto 0 0;
    padding: 0;
    border: 0;
}
.notizzettel-aktionen {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.notizzettel-aktionen form {
    display: inline-flex;
    margin: 0;
}
.notizzettel-aktionen button,
.notizzettel-aktionen a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 11px 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    background: #2b6cb0;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
}
.notizzettel-aktionen button:hover,
.notizzettel-aktionen a:hover {
    background: #245a96;
}
.notiz-dialog:focus {
    outline: none;
}
@media (max-width: 700px) {
    .notizen-formular {
        grid-template-columns: 1fr;
    }
    .notizen-formular .voll {
        grid-column: 1;
    }
    .notizzettel {
        padding: 14px;
    }
    .notiz-dialog-kopf,
    .notiz-dialog-inhalt,
    .notiz-dialog-fuss {
        padding-left: 16px;
        padding-right: 16px;
    }
}
@media (max-width: 480px) {
    .notizen-raster {
        grid-template-columns: 1fr;
    }
}
/* ===== Organigramm ===== */
.diagramm-hinweis {
    margin: 12px 0 20px;
    color: var(--textfarbe-sekundaer, #64748b);
    font-size: 0.9rem;
}

.diagramm-leer {
    padding: 32px;
    text-align: center;
    color: var(--textfarbe, #64748b);
}

.org-diagramm {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
}

.org-ebene {
    position: relative;
    padding: 16px 20px 20px;
    border-radius: 14px;
    border: 1px solid var(--rahmenfarbe, #e2e8f0);
    text-align: center;
}

/* Pfeil zur nächsten Ebene (nur "höher → niedriger", keine Zuordnung) */
.org-ebene:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -18px;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #94a3b8;
}

.org-ebene-titel {
    margin: 0 0 14px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
}

.org-ebene-anzahl {
    display: inline-block;
    min-width: 22px;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    font-size: 0.75rem;
    letter-spacing: 0;
}

/* Farbverlauf von oben (dunkel) nach unten (hell) */
.org-stufe-0 { background: #dbeafe; border-color: #93c5fd; }
.org-stufe-1 { background: #e0ecfd; border-color: #a9cbfa; }
.org-stufe-2 { background: #e8f1fd; border-color: #bfd6f7; }
.org-stufe-3 { background: #eef4fb; border-color: #cfdef3; }
.org-stufe-4 { background: #f3f7fb; border-color: #dbe5f0; }
.org-stufe-5 { background: #f8fafc; border-color: #e2e8f0; }

.org-karten {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.org-karte {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
    padding: 16px 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.org-karte:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.org-bild {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 1.1rem;
}

.org-bild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.org-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.org-karte:hover .org-name {
    color: #2563eb;
}

.org-rolle {
    margin-top: 2px;
    font-size: 0.8rem;
    color: #64748b;
}

@media (max-width: 600px) {
    .org-ebene { padding: 14px 10px 16px; }
    .org-karte { width: calc(50% - 7px); min-width: 140px; }
}
/* Chatbot */
.chat-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.chat-kopf h2 {
    margin: 0;
}

.chat-kopf .chat-neu {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: auto;
    height: 38px;
    margin: 0;
    padding: 0 0.9rem;
    border: 1px solid #c8ccd4;
    border-radius: 6px;
    background: #fff;
    color: #2b6cb0;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.chat-kopf .chat-neu:hover {
    background: #f1f3f6;
}

.chat-kopf .chat-neu svg {
    width: 16px;
    height: 16px;
}

/* Chat: Sprachausgabe an/aus */
.chat-kopf .chat-stimme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid #c8ccd4;
    border-radius: 6px;
    background: #fff;
    color: #2b6cb0;
    cursor: pointer;
}

.chat-kopf .chat-stimme:hover {
    background: #f1f3f6;
}

.chat-stimme svg {
    width: 22px;
    height: 22px;
}

.chat-stimme .chat-stimme-aus,
.chat-stimme[aria-pressed="false"] .chat-stimme-an {
    display: none;
}

.chat-stimme[aria-pressed="false"] .chat-stimme-aus {
    display: block;
}

.chat-stimme[aria-pressed="false"] {
    color: #8a929e;
}

/* während Jarvis spricht */
.chat-stimme.chat-stimme-spricht {
    animation: chat-stimme-puls 1.2s ease-in-out infinite;
}

@keyframes chat-stimme-puls {
    50% {
        box-shadow: 0 0 0 4px rgba(43, 108, 176, 0.25);
    }
}

.chat {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 14rem);
    min-height: 360px;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    background: #f7f8fa;
    overflow: hidden;
}

.chat-verlauf {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    overflow-y: auto;
}

.chat-nachricht-nutzer {
    justify-content: flex-end;
}

.chat-nachricht-bot {
    justify-content: flex-start;
}

.chat-nachricht-nutzer .chat-blase {
    border-bottom-right-radius: 4px;
}

.chat-nachricht-bot .chat-blase {
    border: 1px solid #d9dde3;
    border-bottom-left-radius: 4px;
}

.chat-nachricht-bot .chat-blase-fehler {
    border-color: #f0b4b4;
}

.chat-tippen {
    padding: 0.8rem 1rem;
}

.chat-tippen span {
    animation: chat-punkt 1.2s infinite ease-in-out;
}

.chat-tippen span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-tippen span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chat-punkt {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
    40%           { opacity: 1;   transform: translateY(-3px); }
}

.chat-eingabe {
    gap: 0.6rem;
    padding: 0.75rem;
    border-top: 1px solid #d9dde3;
    background: #fff;
}

.chat-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.chat-eingabe textarea {
    flex: 1;
    min-height: 2.5rem;
    max-height: 160px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #c8ccd4;
    border-radius: 8px;
    font: inherit;
    resize: none;
}

.chat-eingabe textarea:focus {
    outline: 2px solid #2563eb;
    outline-offset: 0;
    border-color: transparent;
}

.chat-senden {
    padding: 0.55rem 1.2rem;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.chat-senden:hover:not(:disabled) {
    background: #1d4fd0;
}

/* Chat: Mikrofon neben "senden" */
.chat-knoepfe {
    display: flex;
    gap: 0.6rem;
}

.chat-knoepfe .chat-senden {
    flex: 1;
}

.chat-knoepfe .chat-mikro {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3rem;
    margin: 0;
    padding: 0;
    border: 1px solid #c8ccd4;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    cursor: pointer;
}

.chat-knoepfe .chat-mikro:hover:not(:disabled):not(.chat-mikro-hoert) {
    background: #f1f3f6;
}

.chat-knoepfe .chat-mikro:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-mikro svg {
    width: 22px;
    height: 22px;
}

/* hört zu: rot pulsierend */
.chat-knoepfe .chat-mikro.chat-mikro-hoert {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
    animation: chat-mikro-puls 1.2s ease-in-out infinite;
}

@keyframes chat-mikro-puls {
    50% {
        box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.25);
    }
}

/* an, wartet auf Antwort oder Sprachausgabe */
.chat-knoepfe .chat-mikro.chat-mikro-bereit {
    border-color: #dc2626;
    color: #dc2626;
}

/* Chat-Sprachmodus: Kopf statt Textverlauf, solange das Mikrofon an ist */
.chat-gesicht {
    display: none;
}

.chat.chat-sprachmodus .chat-verlauf,
.chat.chat-sprachmodus .chat-eingabe textarea,
.chat.chat-sprachmodus .chat-senden {
    display: none;
}

.chat.chat-sprachmodus .chat-gesicht {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 0;
    padding: 1rem;
    --gesicht-akzent: #7cc3f2;
    --gesicht-licht: #f0f9ff;
    --gesicht-schein: rgba(124, 195, 242, 0.45);
    --gesicht-augen: #0f2a44;
    --gesicht-wangen: #fb7185;
    --gesicht-lippen: #db5a8a;
    --gesicht-mund-innen: #6b1d3a;
}

/* im Sprachmodus wird immer gesprochen: Lautsprecher-Schalter ausblenden */
.chat-kopf .chat-stimme.chat-stimme-versteckt {
    display: none;
}

.chat.chat-sprachmodus .chat-knoepfe {
    justify-content: center;
}

.chat.chat-sprachmodus .chat-knoepfe .chat-mikro {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
}

/* Gesicht und Sprechblase nebeneinander */
.chat-gesicht-buehne {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
    min-height: 0;
}

.chat-gesicht-kopf {
    flex: 0 1 320px;
    width: min(320px, 45%);
    max-height: 100%;
    overflow: visible;
}

/* Beim Sprechen kommt der Kopf kurz näher (wird größer), danach wieder zurück */
.chat-gesicht-kopf {
    transform-origin: 50% 60%;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-gesicht[data-zustand="spricht"] .chat-gesicht-kopf {
    transform: scale(1.18);
}

/* Körper: weiche, leuchtende Form, die sich langsam verändert */
.chat-gesicht-licht {
    stop-color: var(--gesicht-licht);
}

.chat-gesicht-tiefe {
    stop-color: var(--gesicht-akzent);
}

.chat-gesicht-koerper {
    filter: drop-shadow(0 10px 26px var(--gesicht-schein));
    transform-box: view-box;
    transform-origin: 120px 120px;
    animation: gesicht-schweben 6s ease-in-out infinite;
}

.chat-gesicht-mimik {
    transform-box: view-box;
    transform-origin: 120px 120px;
    animation: gesicht-schweben 6s ease-in-out infinite;
}

/* Wellen: nur beim Zuhören sichtbar */
.chat-gesicht-wellen circle {
    fill: none;
    stroke: var(--gesicht-akzent);
    stroke-width: 2;
    opacity: 0;
    transform-box: view-box;
    transform-origin: 120px 120px;
}

/* Augen mit Wimpern und Glanzpunkt */
.chat-gesicht-augen {
    transform-box: view-box;
    transform-origin: 120px 112px;
    transition: transform 0.6s ease;
    animation: gesicht-umschauen 12s ease-in-out infinite;
}

.chat-gesicht-auge {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.12s ease-in-out;
}

.chat-gesicht-auge ellipse {
    fill: var(--gesicht-augen);
}

.chat-gesicht-wimpern {
    fill: none;
    stroke: var(--gesicht-augen);
    stroke-width: 2.4;
    stroke-linecap: round;
}

.chat-gesicht-glanz {
    fill: #ffffff;
    opacity: 0.9;
}

.chat-gesicht-wangen ellipse {
    fill: var(--gesicht-wangen);
    opacity: 0.45;
    transition: opacity 0.6s ease;
}

.chat-gesicht-braue {
    fill: none;
    stroke: var(--gesicht-augen);
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 0.5;
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Mund: drei Formen, je nach Ausdruck eingeblendet */
.chat-gesicht-mund {
    fill: var(--gesicht-lippen);
    stroke: var(--gesicht-lippen);
    stroke-width: 1.5;
    stroke-linejoin: round;
    transition: opacity 0.35s ease;
}

.chat-gesicht-mund-ueberlegen,
.chat-gesicht-mund-offen {
    opacity: 0;
}

.chat-gesicht-mund-offen {
    fill: var(--gesicht-mund-innen);
    stroke: var(--gesicht-lippen);
    stroke-width: 3;
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 0.2s ease;
}

/* Sprechblasen im Sprachmodus: Kontakte, Termine bzw. erzeugtes Bild zur letzten Antwort */
.chat-gesicht-blasen {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 1 auto;
    max-width: min(420px, 50%);
    padding-left: 10px;
}

.chat-gesicht-blasen[hidden] {
    display: none;
}

.chat-gesicht-blase {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(15, 42, 68, 0.18);
    animation: gesicht-blase-ein 0.35s ease-out;
}

/* Spitze links zum Gesicht (nur an der ersten Blase) */
.chat-gesicht-blase:first-child::after {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    width: 18px;
    height: 18px;
    background: inherit;
    transform: translateY(-50%) rotate(45deg);
    border-radius: 3px;
}

.chat-gesicht-blase-kontakt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 96px;
    color: inherit;
    text-decoration: none;
}

.chat-gesicht-blase-kontakt img,
.chat-gesicht-blase-initialen {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px var(--gesicht-akzent);
}

.chat-gesicht-blase-initialen {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    background: var(--gesicht-akzent);
}

.chat-gesicht-blase-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.chat-gesicht-blase-kontakt:hover .chat-gesicht-blase-name {
    text-decoration: underline;
}

.chat-gesicht-blase-bild {
    display: block;
    max-width: 100%;
    max-height: 30vh;
    border-radius: 10px;
    cursor: zoom-in;
}

.chat-gesicht-blase-termin {
    flex-direction: column;
    gap: 3px;
    justify-content: flex-start;
    color: inherit;
    text-decoration: none;
    border-left: 4px solid var(--gesicht-akzent);
}

.chat-gesicht-blase-termin-titel {
    font-weight: 600;
    line-height: 1.3;
}

.chat-gesicht-blase-termin-zeit {
    font-size: 0.85rem;
    color: #64748b;
}

.chat-gesicht-blase-termin:hover .chat-gesicht-blase-termin-titel {
    text-decoration: underline;
}

.chat-gesicht-blase-status {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

@keyframes gesicht-blase-ein {
    from { opacity: 0; transform: translateX(-10px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

/* schmale Bildschirme: Sprechblase unter dem Gesicht, Spitze nach oben */
@media (max-width: 600px) {
    .chat-gesicht-buehne {
        flex-direction: column;
        gap: 18px;
    }

    .chat-gesicht-kopf {
        flex: 0 1 auto;
        width: min(260px, 70%);
    }

    .chat-gesicht-blasen {
        max-width: 92%;
        padding: 10px 0 0;
    }

    .chat-gesicht-blase:first-child::after {
        left: 50%;
        top: -8px;
        transform: translateX(-50%) rotate(45deg);
    }
}

/* Blinzeln (Zeitpunkt per JavaScript unregelmäßig alle 3–4 Sekunden) */
.chat-gesicht.chat-gesicht-blinzeln .chat-gesicht-auge {
    transform: scaleY(0.1);
}

.chat-gesicht-status {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
    min-height: 1.5em;
}

/* ---------------------------------------------------------------------------
   Ausdrücke: Warten (bereit, hört zu, aufmerksam), Überlegen (denkt), Sprechen (spricht)
   --------------------------------------------------------------------------- */

/* Warten: ruhiges Lächeln, langsames Schweben, Blick wandert gelegentlich */
.chat-gesicht[data-zustand="bereit"] .chat-gesicht-koerper {
    animation-duration: 7s;
}

/* Zuhören: Wellen gehen sanft nach außen, Brauen leicht gehoben */
.chat-gesicht[data-zustand="hoert"] .chat-gesicht-wellen circle,
.chat-gesicht[data-zustand="aufmerksam"] .chat-gesicht-wellen circle {
    animation: gesicht-welle 2.6s ease-out infinite;
}

.chat-gesicht[data-zustand="hoert"] .chat-gesicht-wellen circle:nth-child(2),
.chat-gesicht[data-zustand="aufmerksam"] .chat-gesicht-wellen circle:nth-child(2) {
    animation-delay: 1.3s;
}

.chat-gesicht[data-zustand="hoert"] .chat-gesicht-braue,
.chat-gesicht[data-zustand="aufmerksam"] .chat-gesicht-braue {
    transform: translateY(-2px);
}

/* aufmerksam (nach dem Aktivierungswort oder bei einer Folgefrage): Blick geradeaus, Augen etwas größer */
.chat-gesicht[data-zustand="aufmerksam"] .chat-gesicht-augen {
    animation: none;
    transform: scale(1.08);
}

.chat-gesicht[data-zustand="aufmerksam"] .chat-gesicht-braue {
    transform: translateY(-4px);
    opacity: 0.7;
}

/* Überlegen: Blick nach oben zur Seite, eine Braue gehoben, schmaler schiefer Mund, Form bewegt sich schneller */
.chat-gesicht[data-zustand="denkt"] .chat-gesicht-augen {
    animation: gesicht-nachdenken 3.2s ease-in-out infinite;
}

.chat-gesicht[data-zustand="denkt"] .chat-gesicht-braue-links {
    transform: translateY(-5px) rotate(-8deg);
    opacity: 0.75;
}

.chat-gesicht[data-zustand="denkt"] .chat-gesicht-braue-rechts {
    transform: translateY(1px) rotate(6deg);
}

.chat-gesicht[data-zustand="denkt"] .chat-gesicht-mund-laecheln {
    opacity: 0;
}

.chat-gesicht[data-zustand="denkt"] .chat-gesicht-mund-ueberlegen {
    opacity: 1;
}

.chat-gesicht[data-zustand="denkt"] .chat-gesicht-koerper {
    animation: gesicht-pulsieren 1.8s ease-in-out infinite;
}

.chat-gesicht[data-zustand="denkt"] .chat-gesicht-wangen ellipse {
    opacity: 0.25;
}

/* Sprechen: Mund bewegt sich unregelmäßig, Augen freundlich, Form pulsiert leicht */
.chat-gesicht[data-zustand="spricht"] .chat-gesicht-mund-laecheln {
    opacity: 0;
}

.chat-gesicht[data-zustand="spricht"] .chat-gesicht-mund-offen {
    opacity: 1;
    animation: gesicht-sprechen 1.3s linear infinite;
}

.chat-gesicht[data-zustand="spricht"] .chat-gesicht-augen {
    animation: none;
    transform: translateY(1px) scaleY(0.9);
}

.chat-gesicht[data-zustand="spricht"] .chat-gesicht-braue {
    transform: translateY(-2px);
    opacity: 0.6;
}

.chat-gesicht[data-zustand="spricht"] .chat-gesicht-koerper {
    animation: gesicht-pulsieren 0.9s ease-in-out infinite;
}

.chat-gesicht[data-zustand="spricht"] .chat-gesicht-wangen ellipse {
    opacity: 0.6;
}

/* Wiedergabe vom Browser blockiert: sanftes Pulsieren, Antippen spielt ab */
.chat-gesicht[data-zustand="tippen"] {
    cursor: pointer;
}

.chat-gesicht[data-zustand="tippen"] .chat-gesicht-koerper {
    animation: gesicht-pulsieren 1.2s ease-in-out infinite;
}

@keyframes gesicht-schweben {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

@keyframes gesicht-pulsieren {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.035); }
}

@keyframes gesicht-welle {
    0%   { opacity: 0.55; transform: scale(1); }
    100% { opacity: 0;    transform: scale(1.32); }
}

@keyframes gesicht-umschauen {
    0%, 30%, 100% { transform: translate(0, 0); }
    38%, 48%      { transform: translate(-4px, 1px); }
    58%, 68%      { transform: translate(4px, -1px); }
    76%           { transform: translate(0, 0); }
}

@keyframes gesicht-nachdenken {
    0%, 100% { transform: translate(5px, -6px); }
    50%      { transform: translate(2px, -7px); }
}

/* unregelmäßige Mundbewegung, wirkt wie Silben */
/* Dauert das Nachdenken länger: einmal kurz verlegen (Lächeln, zusammengekniffene Augen zur Seite,
   gehobene Brauen, rötere Wangen), danach wieder das normale nachdenkliche Gesicht */
.chat-gesicht-mund-verlegen {
    opacity: 0;
}

.chat-gesicht.chat-gesicht-kratzen .chat-gesicht-mund-laecheln,
.chat-gesicht.chat-gesicht-kratzen[data-zustand="denkt"] .chat-gesicht-mund-ueberlegen {
    opacity: 0;
}

.chat-gesicht.chat-gesicht-kratzen .chat-gesicht-mund-verlegen {
    opacity: 1;
}

.chat-gesicht.chat-gesicht-kratzen[data-zustand="denkt"] .chat-gesicht-augen {
    animation: none;
    transform: translate(-5px, 1px) scaleY(0.7);
}

.chat-gesicht.chat-gesicht-kratzen[data-zustand="denkt"] .chat-gesicht-braue-links {
    transform: translateY(-4px) rotate(10deg);
    opacity: 0.75;
}

.chat-gesicht.chat-gesicht-kratzen[data-zustand="denkt"] .chat-gesicht-braue-rechts {
    transform: translateY(-4px) rotate(-10deg);
    opacity: 0.75;
}

.chat-gesicht.chat-gesicht-kratzen[data-zustand="denkt"] .chat-gesicht-wangen ellipse {
    opacity: 0.8;
}

.chat-gesicht.chat-gesicht-kratzen[data-zustand="denkt"] .chat-gesicht-koerper {
    animation: gesicht-schweben 6s ease-in-out infinite;
}

@keyframes gesicht-sprechen {
    0%   { transform: scaleY(0.25) scaleX(1); }
    12%  { transform: scaleY(0.9)  scaleX(0.95); }
    22%  { transform: scaleY(0.45) scaleX(1.05); }
    34%  { transform: scaleY(1.1)  scaleX(0.9); }
    46%  { transform: scaleY(0.3)  scaleX(1.05); }
    55%  { transform: scaleY(0.75) scaleX(1); }
    66%  { transform: scaleY(0.2)  scaleX(1.08); }
    78%  { transform: scaleY(1)    scaleX(0.92); }
    90%  { transform: scaleY(0.5)  scaleX(1); }
    100% { transform: scaleY(0.25) scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .chat-gesicht-kopf,
    .chat-gesicht-blasen {
        transition: none !important;
    }

    .chat-gesicht-koerper,
    .chat-gesicht-mimik,
    .chat-gesicht-augen,
    .chat-gesicht-wellen circle {
        animation: none !important;
    }
}

/* Sprachbildschirm (sprachassistent.php): nur der Kopf, weiße Linien auf Schwarz, ganzer Bildschirm */
body.sprachbildschirm {
    display: block;
    padding: 0;
    background: #000;
    overflow: hidden;
}

body.sprachbildschirm .seite,
body.sprachbildschirm .inhalt,
body.sprachbildschirm .inhalt-box {
    display: block;
    max-width: none;
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #000;
    box-shadow: none;
}

body.sprachbildschirm .chat {
    height: 100vh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: #000;
}

body.sprachbildschirm .chat-eingabe {
    display: none;
}

body.sprachbildschirm .chat.chat-sprachmodus .chat-gesicht {
    --gesicht-schein: rgba(124, 195, 242, 0.6);
}

body.sprachbildschirm .chat-gesicht-kopf {
    flex-basis: min(62vh, 50vw);
    width: min(62vh, 50vw);
}

body.sprachbildschirm .chat-gesicht-blase {
    background: #1c1c22;
    color: #f1f5f9;
    box-shadow: 0 0 30px rgba(124, 195, 242, 0.35);
}

body.sprachbildschirm .chat-gesicht-status {
    font-size: 1.4rem;
    color: #a3a3a3;
}

body.sprachbildschirm .chat-gesicht[data-zustand="start"] {
    cursor: pointer;
}

body.sprachbildschirm .chat-gesicht[data-zustand="start"] .chat-gesicht-koerper {
    animation: gesicht-pulsieren 1.2s ease-in-out infinite;
}

/* erkennt: Ladekreis statt Symbol */
.chat-mikro.chat-mikro-erkennt svg {
    visibility: hidden;
}

.chat-mikro.chat-mikro-erkennt::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: piper-drehen 0.8s linear infinite;
}

.chat-senden:disabled,
.chat-eingabe textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .chat {
        height: calc(100vh - 11rem);
    }
}

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

/* Chatbot: Schriftgrößen */
.chat-container {
    font-size: 18px;
}

.chat-container .chat-message {
    font-size: 18px;
    line-height: 1.6;
}

.chat-container .chat-input {
    font-size: 18px;
    line-height: 1.5;
}

/* Eingabebereich über die volle Breite */
.chat-container .chat-input,
.chat-container textarea,
.chat-container input[type="text"] {
    width: 100%;
    max-width: none;
}

/* Eingabezeile über die volle Breite */
.chat-container .chat-input-wrapper {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Buttons behalten ihre natürliche Breite */
.chat-container button {
    font-size: 16px;
}

/* Chatbereich */
.chat {
    width: 100%;
    max-width: none;
}

.chat-verlauf {
    width: 100%;
    max-width: none;
    font-size: 18px;
    line-height: 1.6;
}

/* Nachrichten */
.chat-nachricht {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 0 22px;
}

.chat-nachricht-nutzer {
    align-items: flex-end;
}

.chat-nachricht-bot {
    align-items: flex-start;
}

/* Autor vor den Absätzen */
.chat-autor {
    width: 100%;
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 700;
}

/* Name des Benutzers steht rechts über seiner Nachricht */
.chat-nachricht-nutzer .chat-autor {
    text-align: right;
}

/* Nachrichteninhalt */
.chat-blase {
    width: fit-content;
    max-width: 90%;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: normal;
}

.chat-nachricht-nutzer .chat-blase {
    background: #e5edf7;
    color: #172b43;
}

.chat-nachricht-bot .chat-blase {
    background: #f1f1f1;
    color: #222;
}

/* Aufwand einer Antwort (Token, Zeit) unter der Blase */
.chat-verbrauch {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #888;
    font-variant-numeric: tabular-nums;
    cursor: default;
}

.chat-blase-fehler {
    border: 1px solid #c62828;
    color: #a31616 !important;
}

/* Absätze innerhalb einer Nachricht */
.chat-absatz {
    margin: 0 0 12px;
    white-space: pre-wrap;
}

.chat-absatz:last-child {
    margin-bottom: 0;
}

/* Eingabe über die volle Breite */
.chat-eingabe {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
}

.chat-eingabe textarea,
.chat-eingabe input[type="text"] {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    font-size: 18px;
    line-height: 1.5;
}

.chat-eingabe .chat-label {
    font-size: 16px;
}

.chat-eingabe .chat-senden {
    align-self: flex-end;
    margin-top: 10px;
    font-size: 16px;
}

/* Ladeanzeige */
.chat-tippen {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}

.chat-tippen span {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
}

/* Schmale Bildschirme */
@media (max-width: 600px) {
    .chat-blase {
        max-width: 100%;
    }

    .chat-verlauf,
    .chat-blase,
    .chat-eingabe textarea {
        font-size: 17px;
    }
}
.chat-link {
    font-weight: bold;
    text-decoration: underline;
}
.stat-balken {
    fill: #2f6fdb; /* gleiche Farbe wie .stat-verlauf (stroke) */
}

/* Dokumente: Auswahl von Personen, Unternehmen und Trainings */
.dok-picker-gruppe { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.dok-picker { position: relative; }
.dok-picker-treffer { position: absolute; z-index: 5; left: 0; right: 0; margin: 2px 0 0; padding: 4px 0; list-style: none;
    background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.dok-picker-treffer[hidden] { display: none; }
.dok-picker-treffer button { display: block; width: 100%; text-align: left; padding: 6px 12px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.dok-picker-treffer button:hover, .dok-picker-treffer button:focus-visible { background: #eef3fa; }
.dok-picker-treffer .dok-leer { padding: 6px 12px; color: #888; font-size: .9rem; }

/* Trefferliste der Kontaktsuche in mail.php: gleiche Darstellung wie bei den Dokumenten (dok-picker) */
.mail-suchbereich { position: relative; }
.mail-treffer { position: absolute; z-index: 5; left: 0; right: 0; margin: 2px 0 0; padding: 4px 0; list-style: none;
    background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.mail-treffer[hidden] { display: none; }
.mail-treffer button { display: block; width: 100%; max-width: none; margin: 0; text-align: left; padding: 6px 12px; border: 0; border-radius: 0;
    background: none; font: inherit; font-weight: normal; color: inherit; cursor: pointer; }
.mail-treffer button:hover, .mail-treffer button:focus-visible { background: #eef3fa; }
.mail-treffer .mail-leer { padding: 6px 12px; color: #888; font-size: .9rem; }
.dok-picker-gewaehlt { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.dok-picker-gewaehlt li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; background: #eef3fa; border-radius: 14px; font-size: .9rem; }
.dok-picker-gewaehlt a { color: inherit; text-decoration: none; }
.dok-picker-gewaehlt a:hover { text-decoration: underline; }
.dok-chip-weg { border: 0; background: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: #777; padding: 0 6px; }
.dok-chip-weg:hover { color: #d64545; }
@media (max-width: 900px) { .dok-picker-gruppe { grid-template-columns: 1fr; } }

/* Training */
.training-formular { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.training-formular .voll { grid-column: 1 / -1; }
.training-unternehmen { position: relative; }
.training-formular input[type="date"],
.training-formular input[type="time"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.training-formular input[type="date"]:focus,
.training-formular input[type="time"]:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}
.training-zeitraeume { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.training-zeitraum { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.training-zeitraum-feld { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: center; }
.training-zeitraum-label { grid-column: 1 / -1; font-size: 0.85rem; font-weight: 600; }
.training-zeitraum-weg {
    width: auto;
    margin: 0;
    padding: 8px 14px;
    font-size: 1.1rem;
    color: #777;
    background: none;
    border: 1px solid #ccc;
}
.training-zeitraum-weg:hover { color: #d64545; background: none; }
.training-klein-knopf { width: auto; margin-top: 12px; padding: 9px 16px; font-size: 0.95rem; }
.training-speichern-knopf { max-width: 240px; }
.training-aktionen { display: flex; gap: 12px; flex-wrap: wrap; }
.training-aktionen button { max-width: 240px; }
.training-tabelle-rahmen { overflow-x: auto; }
.training-klein { display: block; font-size: 0.85rem; color: #777; }
.training-dokumente { margin-bottom: 24px; }
.suche-zeile select {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.profil-box input[type="time"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}
@media (max-width: 700px) {
    .training-formular { grid-template-columns: 1fr; }
    .training-zeitraum { grid-template-columns: 1fr; }
}

/* Dubletten prüfen und zusammenführen */
.dubletten-liste {
    margin: 0 0 16px;
    padding-left: 20px;
}

.dubletten-liste li {
    margin-bottom: 8px;
}

.dubletten-hinweis {
    font-size: 0.9rem;
    opacity: 0.75;
}

.dubletten-tabelle {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
}

.dubletten-tabelle th,
.dubletten-tabelle td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
}

.dubletten-tabelle thead th {
    border-bottom: 2px solid rgba(128, 128, 128, 0.4);
}

.dubletten-tabelle tbody th {
    width: 22%;
    font-weight: 600;
}

.dubletten-tabelle label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    cursor: pointer;
}

.dubletten-tabelle input[type="radio"] {
    width: auto;
    margin: 3px 0 0;
    flex: none;
}

.dubletten-haupt th {
    font-weight: 600;
}

.dubletten-gleich td,
.dubletten-gleich th {
    opacity: 0.7;
}

.dubletten-gewaehlt {
    background: rgba(47, 158, 91, 0.15);
}

.dubletten-bild {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
}

.dubletten-aktionen {
    display: flex;
    gap: 12px;
}

.dubletten-aktionen button {
    width: auto;
    margin-top: 8px;
    padding: 10px 28px;
}

.dubletten-aktionen .dubletten-knopf-neutral {
    background: #6b7685;
}

.dubletten-aktionen .dubletten-knopf-neutral:hover {
    background: #566070;
}

@media (max-width: 700px) {
    .dubletten-tabelle tbody th {
        width: auto;
    }
}
/* Bilder im Chat: 400 × 250 Pixel */
.chat-bild {
    display: block;
    width: 400px;
    height: 250px;
    max-width: 100%;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: 6px;
}

/* ---------------------------------------------------------------------------
   Chat als Sidekick unten rechts (config/chat_ui.php, js/chat.js)
   Zustände (data-zustand): zu = runder Knopf, text = Chatfenster, sprache = nur das Gesicht
   --------------------------------------------------------------------------- */
.chat-sidekick {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9000;
    /* Farben des Gesichts (Knopf, Kopfzeile, Sprachmodus) */
    --gesicht-akzent: #7cc3f2;
    --gesicht-licht: #f0f9ff;
    --gesicht-schein: rgba(124, 195, 242, 0.45);
    --gesicht-augen: #0f2a44;
    --gesicht-wangen: #fb7185;
    --gesicht-lippen: #db5a8a;
    --gesicht-mund-innen: #6b1d3a;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1rem;
    pointer-events: none;
}

.chat-sidekick > * {
    pointer-events: auto;
}

/* eingeklappt: runder Knopf */
.chat-sidekick-knopf {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-sidekick-knopf:hover,
.chat-sidekick-knopf:focus,
html[data-design="dunkel"] .chat-sidekick-knopf,
html[data-design="dunkel"] .chat-sidekick-knopf:hover {
    background: transparent;
    box-shadow: none;
}

.chat-sidekick-knopf:hover {
    transform: translateY(-2px) scale(1.06);
}

/* eingeklappt: das Gesicht im Wartezustand; die Form füllt den Knopf fast ganz aus */
.chat-sidekick-knopf .chat-sidekick-gesicht {
    width: 136%;
    height: 136%;
    margin: -18%;
    overflow: visible;
}

.chat-sidekick-knopf .chat-gesicht-koerper {
    filter: drop-shadow(0 6px 10px rgba(15, 42, 68, 0.28));
}

.chat-sidekick[data-zustand="zu"] .chat-sidekick-knopf {
    display: flex;
}

/* neue Antwort, während eingeklappt */
.chat-sidekick-neu {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #db5a8a;
}

.chat-sidekick-neu[hidden] {
    display: none;
}

/* Fenster */
.chat-sidekick-fenster {
    display: none;
    flex-direction: column;
    width: 390px;
    max-width: calc(100vw - 24px);
    height: min(620px, calc(100vh - 40px));
    border: 1px solid #d9dde3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.chat-sidekick[data-zustand="text"] .chat-sidekick-fenster,
.chat-sidekick[data-zustand="sprache"] .chat-sidekick-fenster {
    display: flex;
}

.chat-sidekick .chat-sidekick-kopf {
    justify-content: flex-start;
    gap: 4px;
    margin: 0;
    padding: 8px 8px 8px 14px;
    border-bottom: 1px solid #e3e6eb;
    background: #fff;
}

.chat-sidekick-name {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 600;
}

.chat-sidekick-name-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* kleines wartendes Gesicht neben dem Namen */
.chat-sidekick-kopf-gesicht {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin: -6px -6px -6px -6px;
    overflow: visible;
}

.chat-sidekick-kopf-gesicht .chat-gesicht-koerper {
    filter: drop-shadow(0 2px 4px rgba(15, 42, 68, 0.2));
}

.chat-sidekick-icon,
.chat-sidekick .chat-kopf .chat-stimme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4a5565;
    cursor: pointer;
    text-decoration: none;
}

.chat-sidekick-icon:hover,
.chat-sidekick .chat-kopf .chat-stimme:hover {
    background: #f1f3f6;
}

.chat-sidekick-icon svg,
.chat-sidekick .chat-kopf .chat-stimme svg {
    width: 19px;
    height: 19px;
}

/* Chat im Fenster: kompakter als auf der eigenen Seite */
.chat-sidekick .chat {
    flex: 1;
    height: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
}

.chat-sidekick .chat-verlauf {
    padding: 0.85rem;
}

.chat-sidekick .chat-nachricht {
    margin: 0 0 12px;
}

.chat-sidekick .chat-autor {
    margin-bottom: 3px;
    font-size: 13px;
}

.chat-sidekick .chat-blase {
    max-width: 92%;
    padding: 9px 12px;
    font-size: 15px;
    line-height: 1.5;
}

.chat-sidekick .chat-bild {
    max-width: 100%;
}

.chat-sidekick .chat-eingabe {
    padding: 0.6rem;
}

.chat-sidekick .chat-knoepfe .chat-senden {
    padding: 0.5rem 0.9rem;
}

/* Sprachmodus im Sidekick: nur das Gesicht mit Sprechblasen links davon */
.chat-sidekick-sprachleiste {
    display: none;
}

.chat-sidekick[data-zustand="sprache"] .chat-sidekick-fenster {
    width: auto;
    max-width: calc(100vw - 24px);
    height: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.chat-sidekick[data-zustand="sprache"] .chat-sidekick-kopf,
.chat-sidekick[data-zustand="sprache"] .chat-eingabe {
    display: none;
}

.chat-sidekick[data-zustand="sprache"] .chat {
    flex: 0 0 auto;
    background: transparent;
    overflow: visible;
}

.chat-sidekick .chat.chat-sprachmodus .chat-gesicht {
    align-items: flex-end;
    gap: 6px;
    padding: 0;
}

.chat-sidekick .chat-gesicht-buehne {
    flex-direction: row-reverse;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 16px;
    width: auto;
}

.chat-sidekick .chat-gesicht-kopf {
    flex: 0 0 170px;
    width: 170px;
}

.chat-sidekick .chat-gesicht-kopf {
    transform-origin: 100% 100%;
}

.chat-sidekick .chat-gesicht[data-zustand="spricht"] .chat-gesicht-kopf {
    transform: scale(1.25);
}

.chat-sidekick .chat-gesicht-blasen {
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-sidekick .chat-gesicht[data-zustand="spricht"] .chat-gesicht-blasen {
    transform: translateX(-44px);
}

.chat-sidekick .chat-gesicht-blasen {
    max-width: min(300px, calc(100vw - 230px));
    margin-bottom: 30px;
    padding: 0 10px 0 0;
}

.chat-sidekick .chat-gesicht-blase {
    box-shadow: 0 6px 22px rgba(15, 42, 68, 0.22);
}

/* Spitze rechts zum Gesicht */
.chat-sidekick .chat-gesicht-blase:first-child::after {
    left: auto;
    right: -8px;
}

.chat-sidekick .chat-gesicht-status {
    margin: 0;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.chat-sidekick[data-zustand="sprache"] .chat-sidekick-sprachleiste {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}

.chat-sidekick-zum-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    margin: 0;
    padding: 6px 14px;
    border: 1px solid #c4e1f7;
    border-radius: 18px;
    background: #fff;
    color: #0f2a44;
    font: inherit;
    font-size: 0.85rem;
    box-shadow: 0 3px 10px rgba(15, 42, 68, 0.15);
    cursor: pointer;
}

.chat-sidekick-zum-text:hover {
    background: #eef7fe;
}

.chat-sidekick-zum-text svg {
    width: 17px;
    height: 17px;
}

.chat-sidekick-sprachleiste .chat-sidekick-icon {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(15, 42, 68, 0.15);
}

/* Mikrofon-Symbol an gesprochenen Nachrichten */
.chat-gesprochen {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    color: #8a94a6;
    vertical-align: -2px;
}

.chat-gesprochen svg {
    width: 14px;
    height: 14px;
}

/* Smartphone: Chatfenster über den ganzen Bildschirm */
@media (max-width: 600px) {
    .chat-sidekick {
        right: 14px;
        bottom: 14px;
    }

    .chat-sidekick[data-zustand="text"] {
        inset: 0;
    }

    .chat-sidekick[data-zustand="text"] .chat-sidekick-fenster {
        width: 100%;
        max-width: none;
        height: 100%;
        border: 0;
        border-radius: 0;
    }

    .chat-sidekick .chat-gesicht-kopf {
        flex-basis: 130px;
        width: 130px;
    }

    .chat-sidekick .chat-gesicht-blasen {
        max-width: calc(100vw - 180px);
    }
}

@media print {
    .chat-sidekick {
        display: none !important;
    }
}

/* Hintergrund der Lightbox */
.chat-bild-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Box in Bildbreite: Symbolleiste rechtsbündig über dem Bild */
.chat-bild-lightbox-box {
    display: flex;
    flex-direction: column;
    width: min(800px, 100%, calc((100vh - 110px) * 1.6));
}

.chat-bild-lightbox-leiste {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

/* Geöffnete Lightbox */
.chat-bild-lightbox.chat-bild-lightbox-offen {
    display: flex;
}

/* Originalbild: 800 × 500 Pixel, soweit der Bildschirm es zulässt */
.chat-bild-lightbox-original {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 5;
    object-fit: contain;
    cursor: zoom-out;
    border-radius: 4px;
}

/* Schließen-Schaltfläche */
.chat-bild-lightbox-schliessen {
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bild-lightbox-schliessen:hover {
    opacity: 0.7;
}

/* Herunterladen-Schaltfläche links neben dem Schließen-Symbol */
.chat-bild-lightbox-download {
    width: 44px;
    height: 44px;
    padding: 0;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bild-lightbox-download:hover {
    opacity: 0.7;
}

.chat-bild-lightbox-schliessen svg,
.chat-bild-lightbox-download svg {
    display: block;
    width: 28px;
    height: 28px;
}

/* Hintergrundscrollen bei geöffneter Lightbox verhindern */
body.chat-bild-lightbox-aktiv {
    overflow: hidden;
}

/* Darstellung auf kleinen Bildschirmen */
@media (max-width: 600px) {
    .chat-bild {
        width: 100%;
        height: auto;
        aspect-ratio: 8 / 5;
    }

    .chat-bild-lightbox {
        padding: 10px;
    }
}
.kalender-eintrag {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.kalender-icon {
    flex: 0 0 44px;
    width: 44px;
    border: 1px solid rgba(128, 128, 128, 0.35);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    line-height: 1.1;
}

.kalender-wochentag {
    display: block;
    padding: 2px 0;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--akzent, #c0392b);
}

.kalender-tag {
    display: block;
    padding: 3px 0 4px;
    font-size: 1.15rem;
    font-weight: 600;
}

.kalender-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kalender-zeit {
    font-size: 0.75rem;
    opacity: 0.65;
}

.kalender-titel {
    overflow-wrap: anywhere;
}

.kalender-link,
.kalender-link:hover,
.kalender-link:visited {
    color: inherit;
    text-decoration: none;
}
.kalender-termine {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.kalender-text + .kalender-text {
    margin-top: 11px;
}

.kalender-geburtstag + .kalender-geburtstag {
    margin-top: 0;
}
/* Kundenbereich im Unternehmensprofil */
.ist-kunde-form {
    margin: 0;
}

.ist-kunde-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.kunde-form .kunde-abschnitt {
    grid-column: 1 / -1;
    margin: 0;
}

.kunde-form h3.kunde-abschnitt {
    margin-top: 8px;
    padding-bottom: 6px;
    font-size: 1rem;
    border-bottom: 1px solid #e2e2e2;
}

.kunde-form h3.kunde-abschnitt:first-of-type {
    margin-top: 0;
}

.kunde-form select,
.kunde-form input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.kunde-form select:focus,
.kunde-form input[type="number"]:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

/* Systemeinstellungen: Eigene Firma, Standardtexte, Leistungskatalog */
.einstellungen-raster .einstellungen-voll {
    grid-column: 1 / -1;
}

.einstellungen-texte {
    padding: 24px;
}

.einstellungen-texte textarea {
    width: 100%;
    margin-bottom: 16px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
}

/* Textbausteine E-Mail */
.einstellungen-baustein {
    margin: 0 0 16px;
    padding: 14px 16px 4px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
}

.einstellungen-baustein-neu {
    border-style: dashed;
}

.einstellungen-baustein legend {
    padding: 0 6px;
    font-weight: bold;
}

.einstellungen-baustein input[type="text"] {
    margin-bottom: 12px;
}

.einstellungen-baustein textarea {
    margin-bottom: 10px;
}

.einstellungen-form .einstellungen-baustein-loeschen {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: normal;
    color: #b42318;
}

.box-inhalt > .einstellungen-hinweis {
    margin: 16px 24px 8px;
}

.tabelle-scroll {
    overflow-x: auto;
    padding: 0 24px 24px;
}

.leistungen-tabelle {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.leistungen-tabelle th,
.leistungen-tabelle td {
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.leistungen-tabelle th {
    font-weight: 600;
    background: #f7f8fa;
}

.leistungen-tabelle td.mitte {
    text-align: center;
}

.leistungen-tabelle input[type="text"],
.leistungen-tabelle select {
    width: 100%;
    padding: 7px 8px;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.leistungen-tabelle input.zahl {
    min-width: 70px;
    text-align: right;
}

.leistungen-tabelle button {
    width: auto;
    margin: 0;
    padding: 7px 14px;
    font-size: 0.9rem;
}

.leistungen-tabelle tr.inaktiv td {
    opacity: 0.55;
}

/* Aufträge: Abrechnung am Training, Bestellungen, Auftragsübersicht */
.abrechnung-form select,
.training-formular select {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.abrechnung-form select:focus,
.training-formular select:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

.auftrag-warnung {
    color: #b45309;
    font-weight: 600;
}

.leistungen-tabelle input[type="date"] {
    padding: 7px 8px;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.leistungen-tabelle td.zahl {
    text-align: right;
    white-space: nowrap;
}

.bestellungen-aktionen form {
    display: flex;
    gap: 6px;
}

.bestellungen-ohne {
    margin: 0 24px 24px;
    padding-left: 20px;
}

.auftraege-tabelle td {
    vertical-align: top;
}

.auftraege-tabelle tfoot td {
    border-top: 2px solid #ccc;
    border-bottom: none;
}

.auftrag-status {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
    border-radius: 12px;
    background: #e8eef5;
}

.auftrag-status-geplant,
.auftrag-status-laufend {
    background: #dcebff;
}

.auftrag-status-durchgefuehrt {
    background: #dff3e4;
}

.auftrag-status-angefragt {
    background: #fff1cf;
}

.auftrag-status-storniert {
    background: #eee;
    text-decoration: line-through;
}

.auftrag-storniert td {
    opacity: 0.6;
}

.auftrag-problem {
    background: #fff8ec;
}

.auftrag-hinweise {
    margin: 0;
    padding-left: 16px;
    font-size: 0.85rem;
    color: #b45309;
}

/* Filterzeile und Werkzeugleiste von Aufträge und Bestellungen */
.auftraege-filter {
    flex-wrap: wrap;
    align-items: stretch;
}

.auftraege-filter select {
    flex: 1 1 180px;
}

.auftraege-filter button {
    flex: 0 0 auto;
}

.auftraege-werkzeug {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.auftraege-werkzeug button {
    margin-top: 8px;
}

/* Bestellungen: Umschalter „Beträge anzeigen/ausblenden“ als Link im Aussehen eines Knopfs */
.auftraege-werkzeug a.training-klein-knopf {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: #2b6cb0;
    border-radius: 6px;
}

.auftraege-werkzeug a.training-klein-knopf:hover {
    background: #245a96;
}

/* Bestellungen: Spalte Dokumente */
.bestellungen-dokumente {
    font-size: 0.85rem;
    line-height: 1.5;
}

.bestellungen-dok-neu {
    color: #777;
    white-space: nowrap;
}

/* Rechnungen */
.rechnung-pruefliste {
    margin: 0;
    padding: 0 24px 8px;
    list-style: none;
}

.rechnung-pruefliste li {
    padding: 4px 0;
}

.rechnung-pruefliste .pruef-zeichen {
    display: inline-block;
    width: 1.4em;
    font-weight: 700;
    text-align: center;
}

.rechnung-pruefliste .pruef-ok .pruef-zeichen {
    color: #2f855a;
}

.rechnung-pruefliste .pruef-fehler {
    color: #c53030;
}

.rechnung-pruefliste .pruef-hinweis {
    color: #666;
}

.rechnung-summen {
    margin: 0 24px 24px auto;
    min-width: 320px;
    border-collapse: collapse;
}

.rechnung-summen td {
    padding: 4px 8px;
}

.rechnung-summen td.zahl {
    text-align: right;
    white-space: nowrap;
}

.rechnung-summen .rechnung-summe-zeile td {
    border-top: 1px solid #ddd;
}

.rechnung-summen .rechnung-summe-gesamt td {
    padding-top: 8px;
    font-weight: 700;
    border-top: 2px solid #999;
}

/* Rechnung stellen, Dokumente */
.rechnung-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 0 24px 16px;
}

.rechnung-aktionen form {
    margin: 0;
}

.rechnung-aktionen .training-klein-knopf {
    margin-top: 0;
}

.knopf-link {
    display: inline-block;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: #3d6aad;
    border-radius: 6px;
}

.knopf-link:hover {
    background: #335a94;
}

.rechnung-dokumente {
    margin: 0 24px 16px;
    padding-left: 20px;
}

.rechnung-dokumente li {
    padding: 3px 0;
}

.rechnung-aktionen button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Rechnungsstatus „fällig“ */
.auftrag-status-faellig {
    background: #fde2e2;
}

/* SMTP-Testmail */
.smtp-protokoll {
    max-height: 360px;
    margin: 0 24px 24px;
    padding: 12px 14px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-all;
    background: #f4f5f7;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.smtp-hinweis {
    margin: 0 24px 16px;
    padding: 10px 14px;
    background: #fff8ec;
    border-left: 4px solid #d69e2e;
    border-radius: 4px;
}

/* Statistik */
.stat-kennzahlen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 16px 24px 24px;
}

.stat-karte {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #f4f6fa;
    border: 1px solid #e2e6ee;
    border-radius: 8px;
}

.stat-wert {
    font-size: 1.35rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.stat-legende {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 8px 24px;
    padding: 0;
    font-size: 0.85rem;
    list-style: none;
}

.stat-punkt {
    display: inline-block;
    margin-right: 4px;
}

.stat-punkt-durch,
.stat-durch {
    background: #38a169;
    fill: #38a169;
}

.stat-punkt-ohne,
.stat-ohne {
    background: #e05252;
    fill: #e05252;
}

.stat-punkt-geplant,
.stat-geplant {
    background: #63a4e8;
    fill: #63a4e8;
}

.stat-diagramm-rahmen {
    padding: 0 24px 16px;
}

.stat-diagramm {
    display: block;
    width: 100%;
    height: auto;
}

.stat-gitter {
    stroke: #e2e2e2;
    stroke-width: 1;
}

.stat-achse {
    font-size: 11px;
    fill: #666;
}

.stat-fortschritt {
    width: 100%;
    min-width: 90px;
    height: 10px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 5px;
}

.stat-fortschritt::-webkit-progress-bar {
    background: #e8ebf1;
    border-radius: 5px;
}

.stat-fortschritt::-webkit-progress-value {
    background: #3d6aad;
    border-radius: 5px;
}

.stat-fortschritt::-moz-progress-bar {
    background: #3d6aad;
    border-radius: 5px;
}

.stat-fortschritt-tage::-webkit-progress-value {
    background: #38a169;
}

.stat-fortschritt-tage::-moz-progress-bar {
    background: #38a169;
}
   .brief-formular {
            display: flex;
            flex-direction: column;
            gap: 18px;
        }

        .brief-feld {
            display: flex;
            flex-direction: column;
            gap: 7px;
            position: relative;
        }

        .brief-feld label {
            font-weight: 600;
        }

        .brief-feld input,
        .brief-feld textarea {
            width: 100%;
            box-sizing: border-box;
            padding: 10px 12px;
            border: 1px solid var(--randfarbe, #ccc);
            border-radius: 6px;
            font: inherit;
            background: var(--hintergrund, #fff);
            color: inherit;
        }

        .brief-feld textarea {
            min-height: 300px;
            resize: vertical;
            line-height: 1.5;
        }

        .kontakt-vorschlaege {
            display: none;
            position: absolute;
            z-index: 100;
            top: 100%;
            left: 0;
            right: 0;
            max-height: 260px;
            overflow-y: auto;
            background: var(--box-hintergrund, #fff);
            border: 1px solid #aaa;
            border-radius: 6px;
            box-shadow: 0 5px 15px rgba(0,0,0,.15);
        }

        .kontakt-vorschlag {
            display: block;
            width: 100%;
            padding: 10px 12px;
            border: 0;
            border-bottom: 1px solid rgba(128,128,128,.2);
            background: transparent;
            color: inherit;
            text-align: left;
            cursor: pointer;
        }

        .kontakt-vorschlag:hover,
        .kontakt-vorschlag:focus {
            background: rgba(128,128,128,.12);
        }

        .kontakt-vorschlag small {
            display: block;
            opacity: .7;
            margin-top: 2px;
        }

        .brief-hinweis {
            margin: 0;
            opacity: .7;
            font-size: .9em;
        }

        .brief-fehler {
            padding: 10px 12px;
            border-radius: 6px;
            background: rgba(190, 40, 40, .1);
            color: #b3261e;
        }

        .brief-button {
            align-self: flex-start;
        }

 #mail-nachricht {
    width: 100%;
    min-height: 350px;
    resize: vertical;
    box-sizing: border-box;
    font-size: inherit;
}

.mail-textbaustein {
    display: inline-block;
    width: auto;
    min-width: 0;
    margin: 0 6px 6px 0;
    white-space: nowrap;
}
/* Teilnehmende (teilnehmende.php) */
.teilnehmende-werkzeuge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 12px 0;
}

.teilnehmende-bestaetigung {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin: 0 0 12px;
}

.teilnehmende-bestaetigung .erfolg,
.teilnehmende-bestaetigung .feld-hinweis {
    margin: 0;
}

.teilnehmende-bestaetigung form {
    margin: 0;
}

.teilnehmende-bestaetigung .training-klein-knopf {
    margin-top: 0;
}

.teilnehmende-tabelle input[type="text"],
.teilnehmende-tabelle input[type="email"] {
    width: 100%;
    min-width: 90px;
    padding: 4px 6px;
    box-sizing: border-box;
}

.teilnehmende-aktion {
    white-space: nowrap;
}

.teilnehmende-aktion form {
    display: flex;
    gap: 6px;
    margin: 0;
}

.teilnehmende-aktion .training-klein-knopf {
    margin-top: 0;
    padding: 5px 10px;
}

.teilnehmende-ohne {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}


/* ---------------------------------------------------------------------------
   Zusatzfelder (Kontakt- und Unternehmensansicht)
   --------------------------------------------------------------------------- */
.zusatzfeld-zeile {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.zusatzfeld-wert {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.zusatzfeld-loeschen {
    display: inline-flex;
    margin: 0;
}

.zusatzfeld-loeschen .edit-stift {
    width: 22px;
    margin-top: 0;
}

.zusatzfeld-neu {
    grid-column: 1 / -1;
}

.zusatzfeld-neu summary {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2b6cb0;
}

.zusatzfeld-formular {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 2fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 12px;
}

.zusatzfeld-formular label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #777;
}

.zusatzfeld-formular textarea {
    resize: vertical;
    font: inherit;
}

.zusatzfeld-formular button {
    width: auto;
    margin-top: 0;
    padding: 10px 20px;
}

@media (max-width: 700px) {
    .zusatzfeld-formular {
        grid-template-columns: 1fr;
    }
}


/* ---------------------------------------------------------------------------
   PDF-Lightbox (js/pdf_lightbox.js)
   --------------------------------------------------------------------------- */
body.pdf-lightbox-offen {
    overflow: hidden;
}

.pdf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.6);
}

.pdf-lightbox[hidden] {
    display: none;
}

.pdf-lightbox-fenster {
    display: flex;
    flex-direction: column;
    width: min(1100px, 100%);
    height: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.pdf-lightbox-kopf {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.pdf-lightbox-titel {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.pdf-lightbox-tab {
    font-size: 0.9rem;
    color: #2b6cb0;
    text-decoration: none;
    white-space: nowrap;
}

.pdf-lightbox-tab:hover {
    text-decoration: underline;
}

.pdf-lightbox-zu {
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    font-size: 1.4rem;
    line-height: 1;
    color: #555;
    background: transparent;
    border-radius: 4px;
}

.pdf-lightbox-zu:hover {
    color: #222;
    background: #edf2f7;
}

.pdf-lightbox-rahmen {
    flex: 1;
    width: 100%;
    border: 0;
    background: #525659;
}

@media (max-width: 700px) {
    .pdf-lightbox {
        padding: 0;
    }

    .pdf-lightbox-fenster {
        border-radius: 0;
    }
}



/* ---------------------------------------------------------------------------
   Anruf-Lightbox (js/anruf_lightbox.js): eingehender Anruf mit Visitenkarte
   --------------------------------------------------------------------------- */
.anruf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.45);
}

.anruf-fenster {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.anruf-kopf {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.anruf-titel {
    flex: 1;
    font-weight: 600;
}

.anruf-signal {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #38a169;
    animation: anruf-puls 1.2s ease-in-out infinite;
}

@keyframes anruf-puls {
    0%, 100% { box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.6); }
    50%      { box-shadow: 0 0 0 6px rgba(56, 161, 105, 0); }
}

.anruf-zu {
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    font-size: 1.4rem;
    line-height: 1;
    color: #555;
    background: transparent;
    border-radius: 4px;
}

.anruf-zu:hover {
    color: #222;
    background: #edf2f7;
}

.anruf-karte {
    gap: 18px;
    padding: 20px;
}

.avatar.anruf-avatar {
    width: 96px;
    height: 96px;
    font-size: 2rem;
}

.anruf-nummer {
    font-weight: 600;
}

.anruf-fuss {
    display: flex;
    justify-content: flex-end;
    padding: 0 20px 18px;
}

@media (max-width: 700px) {
    .anruf-lightbox {
        padding: 8px;
    }

    .anruf-karte {
        flex-direction: column;
        text-align: center;
    }
}

/* Kennzeichen "Kontaktperson zum Unternehmen" unter dem Arbeitgeber (kontakt.php) */
.kundenkontakt-form {
    margin: 4px 0 0;
}

.kundenkontakt-form[hidden] {
    display: none;
}

.kundenkontakt-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}


/* ---------------------------------------------------------------------------
   Benutzerverwaltung (benutzerverwaltung.php)
   --------------------------------------------------------------------------- */
.benutzer-tabelle-rahmen {
    overflow-x: auto;
}

.benutzer-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.benutzer-tabelle th,
.benutzer-tabelle td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.benutzer-tabelle th {
    font-weight: 600;
    background: #f7f8fa;
}

.benutzer-tabelle tr.benutzer-inaktiv td {
    color: #999;
}

.benutzer-tabelle tr.benutzer-gewaehlt td {
    background: #eef4fb;
}

.benutzer-selbst {
    font-size: 0.8rem;
    color: #777;
}

.benutzer-aktionen {
    white-space: nowrap;
}

.benutzer-aktionen a,
.benutzer-aktionen form {
    display: inline;
    margin: 0 0 0 12px;
}

.benutzer-aktionen a:first-child {
    margin-left: 0;
}

.benutzer-aktionen a {
    color: #2b6cb0;
    text-decoration: none;
}

.benutzer-aktionen .link-knopf {
    width: auto;
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: normal;
    color: #2b6cb0;
    background: none;
    border: none;
    cursor: pointer;
}

.benutzer-aktionen .link-knopf:hover {
    text-decoration: underline;
    background: none;
}

.benutzer-aktionen .benutzer-loeschen {
    color: #c53030;
}

.benutzer-formular {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e2e2;
}

.benutzer-formular h2,
.benutzer-formular .voll {
    grid-column: 1 / -1;
}

.benutzer-formular .feld-hinweis {
    margin: 0;
}

.benutzer-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.benutzer-formular-aktionen {
    display: flex;
    align-items: center;
    gap: 16px;
}

.benutzer-formular-aktionen button {
    width: auto;
    margin-top: 0;
    padding: 10px 28px;
}

@media (max-width: 700px) {
    .benutzer-formular {
        grid-template-columns: 1fr;
    }
}


/* ---------------------------------------------------------------------------
   Ausgaben (ausgaben.php)
   --------------------------------------------------------------------------- */
.ausgaben-zuordnung {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.ausgaben-zuordnung legend {
    padding: 0 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.ausgaben-zuordnung label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
}

.ausgaben-formular [hidden] {
    display: none;
}

.ausgaben-formular textarea {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    resize: vertical;
}

.ausgaben-formular-aktionen {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ausgaben-summen {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px 24px;
    margin-top: 16px;
}

.ausgaben-summen > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ausgaben-tabelle th.zahl {
    text-align: right;
}

.ausgaben-tabelle tr.ausgabe-gewaehlt td {
    background: #eef4fb;
}

.ausgaben-klein {
    display: block;
    font-size: 0.8rem;
    color: #777;
}

.ausgaben-tabelle td.zahl .ausgaben-klein {
    display: inline;
}

.ausgaben-aktionen {
    white-space: nowrap;
}

.ausgaben-aktionen form {
    display: inline;
    margin: 0 0 0 12px;
}

.ausgaben-aktionen a {
    color: #2b6cb0;
    text-decoration: none;
}

.ausgaben-aktionen .link-knopf {
    width: auto;
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: normal;
    color: #c53030;
    background: none;
    border: none;
    cursor: pointer;
}

.ausgaben-aktionen .link-knopf:hover {
    text-decoration: underline;
    background: none;
}


/* ---------------------------------------------------------------------------
   Angebote (angebote.php)
   --------------------------------------------------------------------------- */
.angebot-links {
    margin: 0 0 16px;
}

.angebot-links a {
    color: #2b6cb0;
    text-decoration: none;
}

.angebot-formular textarea {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    resize: vertical;
}

.angebot-tabelle-rahmen {
    padding: 0;
    margin: 16px 0;
}

.angebot-tabelle th.zahl,
.angebot-tabelle td.zahl {
    text-align: right;
}

.angebot-tabelle td {
    vertical-align: top;
}

.angebot-tabelle textarea {
    min-width: 280px;
}

.angebot-tabelle input.angebot-menge {
    width: 80px;
}

.angebot-tabelle input.angebot-einheit {
    width: 80px;
}

.angebot-tabelle input.angebot-preis {
    width: 110px;
}

.angebot-tabelle td.angebot-pos-nr,
.angebot-tabelle td.angebot-netto {
    padding-top: 12px;
    white-space: nowrap;
}

.angebot-tabelle tfoot td {
    border-bottom: none;
    font-weight: 600;
}

.angebot-tabelle tr.angebot-summe td {
    font-size: 1rem;
}

.angebot-tabelle .angebot-zeile-weg {
    width: auto;
    margin: 6px 0 0;
    padding: 0 6px;
    font-size: 1.3rem;
    line-height: 1;
    color: #c53030;
    background: none;
    border: none;
    cursor: pointer;
}

.angebot-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.angebot-aktionen .training-speichern-knopf {
    max-width: none;
    width: auto;
    padding: 11px 24px;
}

.leistungen-tabelle tr.angebot-gewaehlt td {
    background: #eef4fb;
}

.angebot-liste-aktionen {
    white-space: nowrap;
}

.angebot-liste-aktionen a {
    margin-right: 12px;
    color: #2b6cb0;
    text-decoration: none;
}

.angebot-liste-aktionen form {
    display: inline;
    margin: 0;
}

.angebot-liste-aktionen .link-knopf {
    width: auto;
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: normal;
    color: #c53030;
    background: none;
    border: none;
    cursor: pointer;
}


/* Stornierung von Aufträgen (training_detail.php, Rechnungen) */
#a_storno_feld[hidden] {
    display: none;
}

.auftrag-storno-info {
    font-weight: 600;
    color: #9c4221;
}

.auftrag-storno-markierung {
    display: block;
    font-size: 0.8rem;
    color: #9c4221;
}

/* ---------------------------------------------------------------------------
   Kostenauswertung (statistik.php) und Kosten-Info im Angebot (angebote.php)
   --------------------------------------------------------------------------- */
.kosten-zwischentitel {
    margin: 8px 24px;
    font-size: 1rem;
}

/* Buchhaltung (buchhaltung.php) */
.stat-karte.buchhaltung-warnung {
    background: #fdf1f0;
    border-color: #f1c4bf;
}

.stat-karte.buchhaltung-warnung .stat-wert,
.buchhaltung-tage {
    color: #b42318;
}

.buchhaltung-leer {
    margin: 8px 24px 16px;
    color: #666;
}

.buchhaltung-klein {
    font-size: 0.8rem;
    color: #777;
}

.leistungen-tabelle th.zahl {
    text-align: right;
}

.leistungen-tabelle tr.kosten-summe td {
    font-weight: 700;
    border-top: 2px solid #ccc;
}

.angebot-kosten-info {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #f4f6fa;
    border-left: 4px solid #2b6cb0;
    border-radius: 4px;
    font-size: 0.9rem;
}


/* Dokumentarten (KSU-Klassen): Auswahl und Ablagedatum im DMS, Pflege in den Systemeinstellungen */
.dms-formular select,
.dms-formular input[type="date"],
.brief-feld select {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.dms-formular select:focus,
.dms-formular input[type="date"]:focus,
.brief-feld select:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

.dok-ohne-art {
    color: #b45309;
    font-style: italic;
}

.dok-loeschfaellig {
    color: #c53030;
    font-weight: 600;
}

.leistungen-tabelle.dokumentarten-tabelle {
    min-width: 720px;
}


/* Aufgaben ohne Zuordnung (gelten für alle Benutzer) */
.aufgabe-fuer-alle {
    color: #777;
    font-style: italic;
}


/* ComfyUI-Jobs im Systemstatus (system_status.php) */
/* Systemstatus, Waschmaschine und Trockner: Gerät aus bzw. bereit */
.server-dienst-status.lg-ruhe {
    color: #4b5563;
    background: #eef0f3;
}

.server-dienst-status.comfyui-arbeitet {
    background: #fef3c7;
    color: #92400e;
}

.comfyui-wert {
    font-weight: 600;
    text-align: right;
}

.comfyui-hinweis {
    font-size: 0.85rem;
    color: #777;
}


/* Leitfäden: Trainingsarten mit zeitlichem Ablauf (leitfaeden.php) */
.leitfaden-raster {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 3fr;
    gap: 24px;
    align-items: start;
}

.leitfaden-artenliste {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.leitfaden-artenliste li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    border-radius: 6px;
}

.leitfaden-artenliste li.aktiv {
    background: #ebf4ff;
    font-weight: 600;
}

.leitfaden-anzahl {
    font-size: 0.8rem;
    color: #777;
    white-space: nowrap;
}

.leitfaden-art-neu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leitfaden-art-neu button {
    align-self: flex-start;
}

.leitfaden-art-kopf {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.leitfaden-umbenennen {
    display: flex;
    gap: 8px;
    flex: 1 1 320px;
}

.leistungen-tabelle.leitfaden-tabelle {
    min-width: 520px;
}

.leitfaden-tabelle .leitfaden-spalte-zeit {
    width: 90px;
}

.leitfaden-tabelle input.leitfaden-zeit {
    min-width: 0;
    width: 80px;
    font-variant-numeric: tabular-nums;
}

.leitfaden-tabelle tr.leitfaden-neu td {
    background: #f7f8fa;
}

.leitfaden-aktionen {
    white-space: nowrap;
}

.leitfaden-aktionen form {
    display: inline;
}

button.leitfaden-loeschen {
    background: none;
    border: 1px solid #c53030;
    color: #c53030;
}

.leitfaden-beginn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 8px 0 12px;
}

.leitfaden-beginn label {
    margin: 0;
}

.leitfaden-beginn input[type="time"],
.leitfaden-tabelle input.leitfaden-uhrzeit {
    padding: 7px 8px;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.leitfaden-tabelle input.leitfaden-uhrzeit[readonly] {
    background: #f3f3f3;
}

@media (max-width: 800px) {
    .leitfaden-raster {
        grid-template-columns: 1fr;
    }
}


/* Leitfaden je Trainingstag (training.php, training_detail.php) */
.training-termine select.leitfaden-auswahl {
    min-width: 200px;
}

.training-termine .leitfaden-link {
    margin-left: 6px;
    font-size: 0.85rem;
}


/* Checklisten (checklisten.php) */
.leistungen-tabelle.checkliste-tabelle {
    min-width: 520px;
}

.checkliste-tabelle .checkliste-nr {
    width: 40px;
    color: #777;
}

.checkliste-tabelle tr.checkliste-neu td {
    background: #f7f8fa;
}

.checkliste-aktionen {
    white-space: nowrap;
}

.checkliste-aktionen form {
    display: inline;
}

.leistungen-tabelle button.checkliste-pfeil {
    padding: 4px 8px;
    min-width: 0;
}

.leistungen-tabelle button.checkliste-pfeil:disabled {
    opacity: 0.35;
    cursor: default;
}

.leistungen-tabelle button.checkliste-loeschen {
    background: none;
    border: 1px solid #c53030;
    color: #c53030;
}

/* Checkliste je Trainingstag (training_detail.php) */
.training-checkliste {
    margin-top: 24px;
}

.training-checkliste h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
}

.training-checkliste-stand {
    font-size: 0.85rem;
    font-weight: normal;
    color: #777;
}

.training-checkliste-punkte {
    list-style: none;
    margin: 0;
    padding: 0;
}

.training-checkliste-punkte li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 8px 4px;
    border-bottom: 1px solid #eee;
}

.training-checkliste-punkte form {
    margin: 0;
}

.training-checkliste-punkte label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.training-checkliste-punkte input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.training-checkliste-punkte li.erledigt .training-checkliste-text {
    text-decoration: line-through;
    color: #38a169;
}

.training-checkliste-haken {
    font-size: 1.1rem;
}

.training-checkliste-punkte li.erledigt .training-checkliste-haken {
    color: #38a169;
}

.training-checkliste-vermerk {
    font-size: 0.8rem;
    color: #777;
}


/* Update per ZIP-Upload (system_update.php) */
.update-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.update-upload label {
    margin: 0;
}

.leistungen-tabelle.update-tabelle {
    min-width: 520px;
}

.update-tabelle tr.update-neu td {
    background: #f0fff4;
}

.update-tabelle tr.update-geaendert td {
    background: #fffbea;
}

.update-tabelle tr.update-gleich td {
    color: #999;
}

.update-liste {
    margin: 8px 0 16px;
    padding-left: 20px;
}

.update-fehler {
    color: #c53030;
}

/* Codeprüfung nach Update: Hinweise zu nicht auswertbaren Einbindungen */
.code-pruefung-hinweise {
    font-size: 0.85rem;
    color: #666;
}

.update-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}


/* Kalendertermin löschen (kalender.php) */
.kal-dialog-knoepfe {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex: none;
}

.kal-dialog-knoepfe form {
    margin: 0;
}

.kal-dialog-knoepfe form[hidden] {
    display: none;
}

.kal-loeschen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: -4px 0 0;
    padding: 0;
    color: #c53030;
    background: transparent;
    border-radius: 17px;
}

.kal-loeschen:hover {
    background: #fde8e8;
}

.kal-loeschen:disabled {
    opacity: 0.5;
}


/* Geburtstage im Widget „nächste Ereignisse“ (index.php): nur Profilbilder bzw. Initialen, Name und Alter beim Mouseover */
.kalender-geburtstage {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kalender-geburtstage + .kalender-text {
    margin-top: 11px;
}

.avatar.kalender-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar.kalender-avatar:hover,
.avatar.kalender-avatar:focus-visible {
    transform: scale(1.12);
    box-shadow: 0 0 0 2px var(--akzent, #c0392b);
}


/* Stromversorgung im Systemstatus (system_status.php) */
.system-daten dd.strom-ok {
    color: #2f855a;
}

.system-daten dd.strom-warn {
    color: #b7791f;
    font-weight: 600;
}

.system-daten dd.strom-kritisch {
    color: #c53030;
    font-weight: 700;
}


/* Personen zu Kalenderterminen (kalender.php) */
.kal-personen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.kal-person-box {
    position: relative;
    display: inline-flex;
}

.avatar.kal-person,
.avatar.kal-person-plus {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
    text-decoration: none;
}

.avatar.kal-person:hover,
.avatar.kal-person:focus-visible {
    box-shadow: 0 0 0 2px #2b6cb0;
}

.avatar.kal-person-plus {
    padding: 0;
    font-size: 1.2rem;
    color: #2b6cb0;
    background: transparent;
    border: 1px dashed #2b6cb0;
    cursor: pointer;
}

.kal-person-weg {
    position: absolute;
    top: -6px;
    right: -6px;
    display: none;
    width: 18px;
    height: 18px;
    padding: 0;
    font-size: 0.8rem;
    line-height: 16px;
    color: #fff;
    background: #c53030;
    border: 1px solid #fff;
    border-radius: 50%;
    cursor: pointer;
}

.kal-person-box:hover .kal-person-weg,
.kal-person-box:focus-within .kal-person-weg {
    display: block;
}

.kal-person-suche {
    flex-basis: 100%;
    margin-top: 6px;
}

.kal-person-suche[hidden] {
    display: none;
}

.kal-person-suche input[type="search"] {
    width: 100%;
    padding: 7px 10px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.kal-person-treffer {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
}

.kal-person-treffer button {
    width: 100%;
    padding: 6px 8px;
    text-align: left;
    color: inherit;
    background: transparent;
    border-radius: 4px;
}

.kal-person-treffer button:hover {
    background: #ebf4ff;
}

.kal-person-leer {
    padding: 6px 8px;
    font-size: 0.85rem;
    color: #777;
}


/* Menü-Knopf und Smartphone-Menü nur in der Smartphone-Ansicht */
.menue-knopf,
.mobil-menue {
    display: none;
}

/* ==========================================================
   Smartphone-Ansicht (bis 640 px Breite)
   Nur Darstellung – Aufbau und Funktionen bleiben unverändert.
   ========================================================== */
@media (max-width: 640px) {

    /* Grundabstände */
    body {
        padding: 10px;
        background-size: auto;
    }

    .seite {
        gap: 10px;
    }

    .login-box,
    .profil-box,
    .inhalt-box {
        padding: 16px;
    }

    .login-box,
    .profil-box,
    .inhalt-box,
    .navigation,
    .box {
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .inhalt-box h1,
    .profil-box h1 {
        font-size: 1.3rem;
    }

    /* Desktop-Navigation, Zurück-Knopf und Desktop-Bereiche ausblenden */
    .seitenleiste .navigation,
    .zurueck-button,
    .sitzung-countdown,
    .version-anzeige,
    .nur-desktop {
        display: none !important;
    }

    /* Menü-Knopf (Kreis mit drei Strichen) */
    .seitenleiste {
        width: 100%;
    }

    .menue-knopf {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        min-height: 48px;
        padding: 0;
        color: #2b6cb0;
        background: #fff;
        border: none;
        border-radius: 50%;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        cursor: pointer;
    }

    .menue-knopf svg {
        width: 36px;
        height: 36px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6;
        stroke-linecap: round;
    }

    .seitenleiste.offen .menue-knopf {
        color: #fff;
        background: #2b6cb0;
    }

    /* Aufklappbares Menü */
    .seitenleiste.offen .mobil-menue {
        display: block;
        margin-top: 8px;
        padding: 6px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .mobil-menue ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .mobil-menue li + li {
        border-top: 1px solid #eef0f3;
    }

    .mobil-menue a {
        display: block;
        padding: 14px 16px;
        font-size: 1.05rem;
        color: #222;
        text-decoration: none;
        border-radius: 6px;
    }

    .mobil-menue a.aktiv {
        color: #fff;
        background: #2b6cb0;
    }

    /* Formulare: volle Breite, 16 px Schrift verhindert das Zoomen auf iOS */
    input,
    select,
    textarea {
        max-width: 100%;
        font-size: 16px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    input[type="url"],
    input[type="tel"],
    select,
    textarea {
        width: 100%;
    }

    button {
        min-height: 40px;
    }

    /* Raster einspaltig */
    .karten-raster,
    .box-raster,
    .kontakt-daten,
    .wetter-tage,
    .notizen-raster,
    .notizen-formular,
    .server-liste,
    .stat-kennzahlen,
    .ausgaben-summen,
    .benutzer-formular,
    .kontakt-formular,
    .training-formular,
    .training-zeitraum,
    .dok-picker-gruppe {
        grid-template-columns: 1fr;
    }

    .training-zeitraum-feld {
        grid-template-columns: 1fr 100px;
    }

    /* Tabellen ohne eigenen Scroll-Rahmen horizontal scrollbar machen */
    .inhalt table:not(.tabelle-scroll table):not(.training-tabelle-rahmen table):not(.protokoll table) {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabelle-scroll,
    .training-tabelle-rahmen {
        margin-left: -4px;
        margin-right: -4px;
        -webkit-overflow-scrolling: touch;
    }

    .leistungen-tabelle th,
    .leistungen-tabelle td {
        font-size: 0.85rem;
    }

    /* Bilder und Medien nie breiter als der Bildschirm */
    .inhalt img,
    .inhalt video,
    .inhalt iframe {
        max-width: 100%;
        height: auto;
    }

    .chat-bild {
        width: 100%;
    }

    /* Kalender: Monatsraster kompakt */
    .kal-kopf,
    .kal-steuerung {
        flex-wrap: wrap;
        gap: 8px;
    }

    .kal-steuerung h2 {
        font-size: 1.05rem;
    }

    .kal-wt {
        padding: 6px 2px;
        font-size: 0.7rem;
    }

    .kal-tag {
        min-height: 64px;
        padding: 2px;
    }

    .kal-nr {
        min-width: 22px;
        height: 22px;
        padding: 0 4px;
        font-size: 0.75rem;
    }

    .kal-chip {
        padding: 1px 3px;
        font-size: 0.65rem;
        border-left-width: 2px;
    }

    dialog.kal-dialog {
        width: calc(100% - 16px);
        max-height: 90vh;
    }

    .kal-dialog-rahmen {
        max-height: 90vh;
    }

    /* Dialoge und Lightboxen fast bildschirmfüllend */
    .notiz-dialog {
        width: calc(100vw - 16px);
        height: calc(100vh - 32px);
    }

    .karten-lightbox,
    .pdf-lightbox,
    .chat-bild-lightbox {
        padding: 8px;
    }

    /* Organigramm-Karten einspaltig */
    .org-karte {
        width: 100%;
    }
}


/* ---------------------------------------------------------------------------
   Netzwerk (Box im Kontakt und im Unternehmen, js/netzwerk.js)
   --------------------------------------------------------------------------- */
.netzwerk {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}

.netzwerk-leiste {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

.netzwerk-tiefe {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.netzwerk-tiefe input[type="range"] {
    width: 90px;
}

.netzwerk-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.netzwerk-filter-art {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: normal;
    cursor: pointer;
}

.netzwerk-farbe {
    display: inline-block;
    flex-shrink: 0;
    width: 14px;
    height: 4px;
    border-radius: 2px;
    background: #888;
}

.netzwerk-farbe-unbekannt {
    background: #888;
}

.netzwerk-farbe-unternehmen {
    height: 2px;
    background: #c3c8d0;
}

.netzwerk-weg {
    flex: 1 1 260px;
    max-width: 380px;
}

.netzwerk-weg input[type="search"],
.netzwerk-neu input[type="search"] {
    padding: 6px 10px;
    font-size: 0.9rem;
}

.netzwerk .dok-picker-treffer button {
    margin: 0;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: normal;
}

.netzwerk .dok-picker-treffer .netzwerk-treffer-unternehmen::before {
    content: "▣ ";
    color: #6b7280;
}

.netzwerk-knopf {
    width: 34px;
    height: 34px;
    margin: 0 0 0 auto;
    padding: 6px;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.netzwerk-knopf:hover {
    background: #e5e7eb;
}

.netzwerk-knopf svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.netzwerk-buehne {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfcfd;
    overflow: hidden;
}

.netzwerk-grafik {
    width: 100%;
    height: 480px;
}

.netzwerk-meldung {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    margin: 0;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #4b5563;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    pointer-events: none;
    z-index: 2;
}

.netzwerk-meldung[hidden],
.netzwerk-pfad[hidden] {
    display: none;
}

.netzwerk-pfad {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.netzwerk-knopf-text {
    width: auto;
    margin: 0;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.netzwerk-pfad-eintrag {
    color: #6b7280;
}

.netzwerk-pfad-eintrag::before {
    content: "› ";
}

.netzwerk-pfad-titel {
    font-weight: 600;
}

.netzwerk-hinweis {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Vollbild (Fullscreen-API bzw. Ersatzklasse) */
.netzwerk:fullscreen {
    padding: 16px;
    overflow: auto;
}

.netzwerk:fullscreen .netzwerk-grafik {
    height: calc(100vh - 140px);
}

.netzwerk.netzwerk-gross {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 16px;
    overflow: auto;
}

.netzwerk.netzwerk-gross .netzwerk-grafik {
    height: calc(100vh - 140px);
}

/* Pflege der direkten Verbindungen */
.netzwerk-pflege h3 {
    margin: 8px 0;
    font-size: 1rem;
}

.netzwerk-liste {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.netzwerk-eintrag {
    display: grid;
    grid-template-columns: 40px minmax(140px, 1.2fr) minmax(110px, 0.8fr) minmax(90px, 0.6fr) minmax(120px, 1.4fr) auto 34px;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.netzwerk-eintrag-neu {
    border-color: #2b6cb0;
    background: #f5f9ff;
}

.netzwerk-eintrag .avatar {
    text-decoration: none;
}

.netzwerk-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.netzwerk-eintrag select,
.netzwerk-eintrag input[type="text"] {
    width: 100%;
    padding: 5px 8px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

.netzwerk-eintrag button {
    width: auto;
    margin: 0;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.netzwerk-eintrag .netzwerk-loeschen {
    width: 34px;
    padding: 4px 0;
    font-size: 1.2rem;
    line-height: 1;
    color: #b42318;
    background: transparent;
    border: 1px solid #f1c4c0;
}

.netzwerk-eintrag .netzwerk-loeschen:hover {
    background: #fdecea;
}

/* Nur-Lese-Ansicht der Liste */
.netzwerk-eintrag:not(:has(select)) {
    grid-template-columns: 40px minmax(140px, 1fr) 14px auto minmax(0, 1.5fr);
}

.netzwerk-info {
    font-size: 0.85rem;
    color: #4b5563;
}

.netzwerk-notiz {
    font-size: 0.85rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.netzwerk-neu {
    max-width: 380px;
}

/* Vorschläge "Kennen sich vermutlich" */
.netzwerk-farbe-vorschlag {
    height: 0;
    background: none;
    border-top: 2px dashed #6b7280;
}

.netzwerk-vorschlaege {
    margin-top: 14px;
}

.netzwerk-vorschlaege[hidden] {
    display: none;
}

.netzwerk-vorschlaege .netzwerk-hinweis {
    margin-bottom: 8px;
}

.netzwerk-eintrag.netzwerk-vorschlag {
    grid-template-columns: 40px minmax(140px, 1fr) minmax(0, 2fr) auto auto;
    border-style: dashed;
}

.netzwerk-eintrag .netzwerk-ablehnen {
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.netzwerk-eintrag .netzwerk-ablehnen:hover {
    background: #e5e7eb;
}

/* Systemeinstellungen: Farbwahl der Beziehungsarten */
.beziehungsarten-tabelle input[type="color"] {
    width: 48px;
    height: 32px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

@media (max-width: 800px) {
    .netzwerk-grafik {
        height: 360px;
    }

    .netzwerk-eintrag,
    .netzwerk-eintrag:not(:has(select)),
    .netzwerk-eintrag.netzwerk-vorschlag {
        grid-template-columns: 40px 1fr 34px;
    }

    .netzwerk-eintrag select,
    .netzwerk-eintrag input[type="text"],
    .netzwerk-eintrag button:not(.netzwerk-loeschen),
    .netzwerk-eintrag .netzwerk-info,
    .netzwerk-eintrag .netzwerk-notiz {
        grid-column: 2 / -1;
    }
}


/* ---------------------------------------------------------------------------
   Trainerleitfaden (Infomonitor, trainerleitfaden.php): dunkles Vollbild-Layout
   --------------------------------------------------------------------------- */
html.leitfaden-monitor {
    --lf-bg1: #0f1419;
    --lf-bg2: #1b2430;
    --lf-text: #e8edf2;
    --lf-muted: #8b98a8;
    --lf-accent: #ff4d4d;
    --lf-track: rgba(255, 255, 255, 0.12);
}

html.leitfaden-monitor,
.leitfaden-monitor body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    min-height: 0;
    display: block;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(ellipse at center, var(--lf-bg2) 0%, var(--lf-bg1) 70%);
    background-image: radial-gradient(ellipse at center, var(--lf-bg2) 0%, var(--lf-bg1) 70%);
    color: var(--lf-text);
    overflow: hidden;
}

.leitfaden-monitor .container {
    height: 100%;
    width: 100%;
    position: relative;
}

/* ---- Menü ---- */
.leitfaden-monitor form {
    position: absolute;
    top: 1.5vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1vw;
    opacity: 0.45;
    transition: opacity 0.3s;
}

.leitfaden-monitor form:hover {
    opacity: 1;
}

.leitfaden-monitor select,
.leitfaden-monitor button {
    width: auto;
    margin: 0;
    font-size: 1.6vw;
    font-weight: normal;
    padding: 0.4vw 1vw;
    border-radius: 0.6vw;
    border: 1px solid var(--lf-track);
    background: rgba(255, 255, 255, 0.06);
    color: var(--lf-text);
}

.leitfaden-monitor select option,
.leitfaden-monitor select optgroup {
    color: #222;
    background: #fff;
}

.leitfaden-monitor button {
    cursor: pointer;
}

.leitfaden-monitor button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.leitfaden-monitor form a {
    color: var(--lf-muted);
    text-decoration: none;
    font-size: 1.6vw;
    margin-left: 1vw;
}

/* ---- Rolle ---- */
.leitfaden-monitor .roll-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    text-align: center;
    padding: 0 8vw 0 4vw;
    box-sizing: border-box;
}

.leitfaden-monitor .thema {
    margin: 0.6vw 0;
    line-height: 1.15;
    user-select: none;
    color: var(--lf-muted);
}

.leitfaden-monitor .thema .zeit {
    font-variant-numeric: tabular-nums;
    margin-right: 0.8em;
    opacity: 0.7;
}

.leitfaden-monitor .thema .plan {
    font-size: 0.6em;
    margin-left: 0.8em;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

/* ---- Aktuelles Thema ---- */
.leitfaden-monitor .aktuell-block {
    width: 82%;
    margin: 2vw 0;
    padding: 2.5vw 3vw;
    box-sizing: border-box;
    border-radius: 2vw;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 6vw rgba(255, 77, 77, 0.12);
}

.leitfaden-monitor .aktuell-titel {
    font-size: 5vw;
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
}

.leitfaden-monitor .aktuell-zeit {
    font-size: 1.8vw;
    color: var(--lf-muted);
    margin-top: 0.6vw;
    font-variant-numeric: tabular-nums;
}

.leitfaden-monitor .countdown-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: baseline;
    margin-top: 1.2vw;
}

.leitfaden-monitor .countdown {
    grid-column: 2;
    font-size: 9vw;
    font-weight: 300;
    line-height: 1;
    color: var(--lf-accent);
    font-variant-numeric: tabular-nums;
}

.leitfaden-monitor .countdown-delay {
    grid-column: 3;
    justify-self: start;
    margin-left: 2vw;
    font-size: 9vw;
    font-weight: 300;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.leitfaden-monitor .countdown-label {
    font-size: 1.6vw;
    color: var(--lf-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 0.4vw;
}

.leitfaden-monitor .bar {
    height: 0.8vw;
    margin-top: 1.8vw;
    border-radius: 1vw;
    background: var(--lf-track);
    overflow: hidden;
}

.leitfaden-monitor .bar-fill {
    height: 100%;
    width: 0%;
    background: var(--lf-accent);
    border-radius: 1vw;
    transition: width 1s linear;
}

/* ---- Zeitleiste rechts (senkrecht, proportional zur Themendauer) ---- */
.leitfaden-monitor .timeline {
    position: absolute;
    right: 2vw;
    top: 7vh;
    bottom: 7vh;
    width: 2.4vw;
    z-index: 5;
}

.leitfaden-monitor .tl-seg {
    position: absolute;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    background: var(--lf-track);
    border-radius: 0.3vw;
    overflow: hidden;
}

.leitfaden-monitor .tl-seg.aktuell {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.leitfaden-monitor .tl-fill {
    width: 100%;
    height: 0%;
    background: var(--lf-accent);
    transition: height 1s linear;
}

.leitfaden-monitor .tl-seg.pause .tl-fill {
    background: #5fb88a;
}

.leitfaden-monitor .tl-now {
    position: absolute;
    left: -0.6vw;
    right: -0.6vw;
    height: 2px;
    margin-top: -1px;
    background: #fff;
    box-shadow: 0 0 0.6vw rgba(255, 255, 255, 0.8);
    z-index: 2;
    transition: top 1s linear;
}

.leitfaden-monitor .tl-label {
    position: absolute;
    right: 0;
    font-size: 1.2vw;
    color: var(--lf-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.leitfaden-monitor .tl-label.oben {
    top: -3.2vh;
}

.leitfaden-monitor .tl-label.unten {
    bottom: -3.2vh;
}

/* ---- Fehlermeldung Endpunkt ---- */
.leitfaden-monitor #status {
    position: absolute;
    bottom: 1.5vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6vw;
    color: var(--lf-accent);
    white-space: nowrap;
}

/* ---- Diagnose (?debug=1 oder bei DB-Fehler) ---- */
.leitfaden-monitor .leitfaden-debug {
    position: absolute;
    left: 1vw;
    bottom: 1vh;
    margin: 0;
    z-index: 20;
    font-size: 1vw;
    color: var(--lf-muted);
    max-width: 60vw;
    white-space: pre-wrap;
}


/* ---------------------------------------------------------------------------
   Pausenseite für Teilnehmende (pausenseite.php): nur während einer Pause sichtbar
   --------------------------------------------------------------------------- */
html.pausen-monitor {
    --pm-bg1: #0f1419;
    --pm-bg2: #1b2430;
    --pm-text: #e8edf2;
    --pm-muted: #8b98a8;
    --pm-accent: #ff4d4d;
    --pm-track: rgba(255, 255, 255, 0.12);
}

html.pausen-monitor,
.pausen-monitor body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    min-height: 0;
    display: block;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(ellipse at center, var(--pm-bg2) 0%, var(--pm-bg1) 70%);
    background-image: radial-gradient(ellipse at center, var(--pm-bg2) 0%, var(--pm-bg1) 70%);
    color: var(--pm-text);
    overflow: hidden;
}

.pausen-monitor #pause {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 6vw;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.6s;
}

.pausen-monitor #pause.sichtbar {
    opacity: 1;
}

.pausen-monitor .pause-titel {
    font-size: 8vw;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2vw;
}

.pausen-monitor .pause-zeit {
    font-size: 3.6vw;
    color: var(--pm-muted);
    margin-bottom: 5vw;
}

.pausen-monitor .pause-rest-label {
    font-size: 2.4vw;
    color: var(--pm-muted);
    margin-bottom: 0.5vw;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.pausen-monitor .pause-rest {
    font-size: 14vw;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--pm-accent);
}

.pausen-monitor .pause-bar {
    width: 60vw;
    height: 1.2vw;
    margin-top: 4vw;
    border-radius: 1vw;
    background: var(--pm-track);
    overflow: hidden;
}

.pausen-monitor .pause-bar-fill {
    height: 100%;
    width: 0;
    background: var(--pm-accent);
    transition: width 0.25s linear;
}

.pausen-monitor #debug {
    position: absolute;
    left: 1vw;
    bottom: 1vh;
    margin: 0;
    font-size: 1.1vw;
    color: var(--pm-muted);
    white-space: pre-wrap;
}


/* Systemeinstellungen > KI-Server: Piper-Stimme mit Probe-Knopf */
.piper-stimme-zeile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ki-server-auswahl {
    width: 100%;
}

.piper-stimme-zeile select,
.ki-server-auswahl {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.piper-stimme-zeile select:focus,
.ki-server-auswahl:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

.piper-abspielen {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
}

/* Play-Dreieck */
.piper-abspielen::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -7px 0 0 -4px;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent #fff;
}

/* Stopp-Quadrat während der Wiedergabe */
.piper-abspielen.spielt::before {
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: none;
    background: #fff;
}

/* Ladekreis während der Erzeugung */
.piper-abspielen.laedt::before {
    width: 16px;
    height: 16px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: piper-drehen 0.8s linear infinite;
}

.piper-abspielen:disabled {
    cursor: not-allowed;
}

@keyframes piper-drehen {
    to {
        transform: rotate(360deg);
    }
}

/* === Dunkelmodus ===========================================================
   Aktiv, wenn <html data-design="dunkel"> gesetzt ist (Einstellung im Profil:
   hell, dunkel oder automatisch nach System; gesetzt in config/navigation.php).
   Grundregeln von Hand; darunter die aus den Regeln oben abgeleiteten Farben
   (helle Flächen werden dunkel, dunkle Schrift wird hell, Akzentfarben bleiben).
   Der Block steht bewusst am Ende der Datei, damit er die Regeln oben überschreibt.
   =========================================================================== */
/* --- abgeleitete Farben --- */
html[data-design="dunkel"] body {
    background-color: #272e3a;
    color: #c6cad1;
}

html[data-design="dunkel"] .login-box,
html[data-design="dunkel"] .profil-box,
html[data-design="dunkel"] .inhalt-box,
html[data-design="dunkel"] .navigation,
html[data-design="dunkel"] .box {
    background: #1f2226;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
}

html[data-design="dunkel"] .login-box form + form {
    border-top: 1px solid #33373e;
}

html[data-design="dunkel"] .navigation a {
    color: #c6cad1;
}

html[data-design="dunkel"] .navigation a:hover {
    background: #272e3a;
}

html[data-design="dunkel"] .navigation a.aktiv {
    color: #ffffff;
}

html[data-design="dunkel"] .navigation a.aktiv-eltern {
    background: #1c314a;
}

html[data-design="dunkel"] .suche-status {
    color: #7f8896;
}

html[data-design="dunkel"] .suche-status.fehler-text {
    color: #ea8989;
}

html[data-design="dunkel"] .hilfe-link {
    color: #468bd2;
}

html[data-design="dunkel"] .avatar {
    color: #468bd2;
    background: #1c314a;
}

html[data-design="dunkel"] .avatar-hinweis {
    color: #ffffff;
    background: rgba(227, 229, 232, 0.5);
}

html[data-design="dunkel"] .karte-feld {
    color: #9ba3ae;
}

html[data-design="dunkel"] .karten-raster mark {
    background: #574d21;
}

html[data-design="dunkel"] .keine-treffer {
    color: #717b8a;
}

html[data-design="dunkel"] .feld-label {
    color: #7f8896;
}

html[data-design="dunkel"] .kontakt-daten a {
    color: #468bd2;
}

html[data-design="dunkel"] .box-kopf {
    border-bottom: 1px solid #33373e;
}

html[data-design="dunkel"] .box-inhalt li {
    border-bottom: 1px solid #292d32;
}

html[data-design="dunkel"] .eintrag:hover .eintrag-name,
html[data-design="dunkel"] .eintrag:focus-visible .eintrag-name {
    color: #468bd2;
}

html[data-design="dunkel"] .box-inhalt .info {
    color: #7f8896;
}

html[data-design="dunkel"] .box-inhalt .leer {
    color: #717b8a;
}

html[data-design="dunkel"] .profil-grid form + form {
    border-left: 1px solid #33373e;
}

html[data-design="dunkel"] .protokoll {
    border-top: 1px solid #33373e;
}

html[data-design="dunkel"] .protokoll th,
html[data-design="dunkel"] .protokoll td {
    border-bottom: 1px solid #2b2e34;
}

html[data-design="dunkel"] .protokoll th {
    background: #222937;
}

html[data-design="dunkel"] .blaettern a {
    color: #468bd2;
}

html[data-design="dunkel"] .blaettern .deaktiviert {
    color: #5a616d;
}

html[data-design="dunkel"] input[type="text"],
html[data-design="dunkel"] input[type="email"],
html[data-design="dunkel"] input[type="password"],
html[data-design="dunkel"] input[type="search"] {
    border: 1px solid #424851;
}

html[data-design="dunkel"] input[type="text"]:focus,
html[data-design="dunkel"] input[type="email"]:focus,
html[data-design="dunkel"] input[type="password"]:focus,
html[data-design="dunkel"] input[type="search"]:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] input:disabled {
    background: #272b30;
    color: #7f8896;
}

html[data-design="dunkel"] .profil-box select {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .profil-box select:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] .profil-box textarea {
    background: #1f2226;
    color: inherit;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .profil-box textarea:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] button {
    color: #ffffff;
}

html[data-design="dunkel"] button:hover {
    background: #8eb7e4;
}

html[data-design="dunkel"] .fehler {
    color: #ea8989;
    background: #461b1b;
}

html[data-design="dunkel"] .erfolg {
    color: #a3e3b1;
    background: #1c4b27;
}

@media (max-width: 800px) {
    html[data-design="dunkel"] .profil-grid form + form {
        border-top: 1px solid #33373e;
    }
}

html[data-design="dunkel"] .kontakt-detail .edit-stift {
    color: #5d6571;
}

html[data-design="dunkel"] .kontakt-detail .edit-stift:hover,
html[data-design="dunkel"] .kontakt-detail .edit-stift:focus-visible {
    color: #468bd2;
    background: #1c314a;
}

html[data-design="dunkel"] .kontakt-detail .edit-input {
    background: #1f2226;
    border: 1px solid #468bd2;
}

html[data-design="dunkel"] .kontakt-detail .edit-fehler {
    color: #ea8989;
}

html[data-design="dunkel"] .kontakt-aktionen .aktion {
    color: #468bd2;
    background: #1c314a;
}

html[data-design="dunkel"] .kontakt-aktionen .aktion:hover,
html[data-design="dunkel"] .kontakt-aktionen .aktion:focus-visible {
    color: #ffffff;
}

html[data-design="dunkel"] .kontakt-aktionen .aktion.whatsapp {
    background: #1c4b2d;
}

html[data-design="dunkel"] .kontakt-aktionen .aktion.whatsapp:hover svg,
html[data-design="dunkel"] .kontakt-aktionen .aktion.whatsapp:focus-visible svg {
    fill: #1f2226;
}

html[data-design="dunkel"] .sitzung-countdown,
html[data-design="dunkel"] .version-anzeige,
html[data-design="dunkel"] .updatelog-version {
    color: #717b8a;
}

html[data-design="dunkel"] .updatelog-gruppe,
html[data-design="dunkel"] .updatelog-gruppe[open] > .updatelog-gruppe-kopf {
    border-color: #2b2e34;
}

html[data-design="dunkel"] .updatelog-gruppe-info {
    color: #717b8a;
}

html[data-design="dunkel"] .updatelog-tabelle th,
html[data-design="dunkel"] .updatelog-tabelle td {
    border-bottom: 1px solid #2b2e34;
}

html[data-design="dunkel"] .updatelog-art {
    background: #2a2e35;
}

html[data-design="dunkel"] .updatelog-art-funktion {
    background: #1d3326;
    color: #6fcf8e;
}

html[data-design="dunkel"] .updatelog-art-fix {
    background: #3a2d18;
    color: #f0b45a;
}

html[data-design="dunkel"] .updatelog-marke {
    background: #468bd2;
}

html[data-design="dunkel"] .feld-hinweis {
    color: #7f8896;
}

html[data-design="dunkel"] .wetter-ort {
    color: #7f8896;
}

html[data-design="dunkel"] .wetter-text {
    color: #9ba3ae;
}

html[data-design="dunkel"] .wetter-details {
    color: #7f8896;
}

html[data-design="dunkel"] .wetter-tage {
    border-top: 1px solid #292d32;
}

html[data-design="dunkel"] .wetter-tag-regen {
    color: #7f8896;
}

html[data-design="dunkel"] .wetter-hinweis {
    color: #717b8a;
}

html[data-design="dunkel"] .wettervorhersage-jetzt-details,
html[data-design="dunkel"] .wettervorhersage-tag-details,
html[data-design="dunkel"] .wettervorhersage-tag-datum,
html[data-design="dunkel"] .wettervorhersage-tag-temp .min {
    color: #9aa3b0;
}

html[data-design="dunkel"] .wettervorhersage-tag {
    border-color: #33373e;
}

html[data-design="dunkel"] .wettervorhersage-tag-heute {
    border-color: #468bd2;
}

html[data-design="dunkel"] .wettervorhersage-hinweis {
    color: #717b8a;
}

html[data-design="dunkel"] .system-zeile {
    border-bottom: 1px solid #31353c;
}

html[data-design="dunkel"] .system-block {
    background: #1c293e;
    border: 1px solid #243145;
}

html[data-design="dunkel"] .system-ring .spur {
    stroke: #263447;
}

html[data-design="dunkel"] .system-ring-wert {
    color: #a3bde1;
}

html[data-design="dunkel"] .system-label {
    color: #798392;
}

html[data-design="dunkel"] .system-gross {
    color: #b5c6d9;
}

html[data-design="dunkel"] .system-klein {
    color: #798392;
}

html[data-design="dunkel"] .system-balken {
    background: #263447;
}

html[data-design="dunkel"] .system-status {
    color: #798392;
}

html[data-design="dunkel"] .system-punkt {
    background: #5a626e;
}

html[data-design="dunkel"] .system-punkt.ok {
    box-shadow: 0 0 0 0 rgba(47, 158, 91, 0.5);
}

html[data-design="dunkel"] .kal-nav {
    color: #468bd2;
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .kal-nav:hover {
    background: #1a2f44;
    border-color: #468bd2;
}

html[data-design="dunkel"] .kal-raster {
    border-top: 1px solid #33373e;
    border-left: 1px solid #33373e;
}

html[data-design="dunkel"] .kal-wt {
    color: #8d95a2;
    background: #222937;
    border-right: 1px solid #33373e;
    border-bottom: 1px solid #33373e;
}

html[data-design="dunkel"] .kal-tag {
    background: #1f2226;
    border-right: 1px solid #33373e;
    border-bottom: 1px solid #33373e;
}

html[data-design="dunkel"] .kal-tag.mit-eintraegen:hover {
    background: #172b3e;
}

html[data-design="dunkel"] .kal-tag.anderer-monat {
    background: #222937;
}

html[data-design="dunkel"] .kal-nr {
    color: #aab0b9;
}

html[data-design="dunkel"] .kal-tag.wochenende .kal-nr {
    color: #717b8a;
}

html[data-design="dunkel"] .kal-tag.heute .kal-nr {
    color: #ffffff;
}

html[data-design="dunkel"] .kal-chip {
    color: #c6cad1;
    background: color-mix(in srgb, var(--farbe) 14%, #1f2226);
}

html[data-design="dunkel"] .kal-chip:hover {
    background: color-mix(in srgb, var(--farbe) 26%, #1f2226);
}

html[data-design="dunkel"] .kal-chip.ganz {
    color: #ffffff;
}

html[data-design="dunkel"] .kal-chip.ganz:hover {
    background: color-mix(in srgb, var(--farbe) 85%, #e3e5e8);
}

html[data-design="dunkel"] .kal-zeit {
    color: #9ba3ae;
}

html[data-design="dunkel"] .kal-mehr {
    color: #468bd2;
}

html[data-design="dunkel"] .kal-fuss {
    color: #7f8896;
}

html[data-design="dunkel"] dialog.kal-dialog {
    color: #c6cad1;
    background: #1f2226;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.56);
}

html[data-design="dunkel"] dialog.kal-dialog::backdrop {
    background: rgba(227, 229, 232, 0.45);
}

html[data-design="dunkel"] .kal-dialog-kopf {
    border-left: 6px solid var(--farbe, #468bd2);
    border-bottom: 1px solid #2b2e34;
}

html[data-design="dunkel"] .kal-dialog-kalender {
    color: #7f8896;
}

html[data-design="dunkel"] .kal-x {
    color: #8d95a2;
}

html[data-design="dunkel"] .kal-x:hover {
    color: #c6cad1;
    background: #2b2e34;
}

html[data-design="dunkel"] .kal-zeile-label {
    color: #7f8896;
}

html[data-design="dunkel"] .kal-zeile-wert a {
    color: #468bd2;
}

html[data-design="dunkel"] .kal-zurueck {
    color: #468bd2;
}

html[data-design="dunkel"] .kal-form input[type="date"],
html[data-design="dunkel"] .kal-form input[type="time"] {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .kal-form input[type="date"]:focus,
html[data-design="dunkel"] .kal-form input[type="time"]:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] .stat-farbe-5 {
    --farbe: #81ecf0;
}

html[data-design="dunkel"] .stat-farbe-8 {
    --farbe: #d0b9a8;
}

html[data-design="dunkel"] .stat-farbe-sonstige {
    --farbe: #5a626e;
}

html[data-design="dunkel"] .detailsuche-aktionen a {
    color: #468bd2;
}

html[data-design="dunkel"] .telefon-tasten button {
    color: #468bd2;
    background: #1c314a;
}

html[data-design="dunkel"] .telefon-tasten button:hover,
html[data-design="dunkel"] .telefon-tasten button:focus-visible {
    color: #ffffff;
}

html[data-design="dunkel"] .telefon-tasten .telefon-abheben {
    color: #54e189;
    background: #1c4b2d;
}

html[data-design="dunkel"] .telefon-tasten .telefon-abheben:hover,
html[data-design="dunkel"] .telefon-tasten .telefon-abheben:focus-visible {
    color: #ffffff;
}

html[data-design="dunkel"] .telefon-tasten .telefon-auflegen {
    color: #dc6b6b;
    background: #471b1b;
}

html[data-design="dunkel"] .telefon-tasten .telefon-auflegen:hover,
html[data-design="dunkel"] .telefon-tasten .telefon-auflegen:focus-visible {
    color: #ffffff;
}

html[data-design="dunkel"] .firma-avatar {
    background: #1f2226;
    border: 1px solid #33373e;
}

html[data-design="dunkel"] .kontakt-notiz .edit-stift {
    color: #8d95a2;
}

html[data-design="dunkel"] .kontakt-notiz .edit-stift:hover {
    background: #2b2e34;
}

html[data-design="dunkel"] .rolle-info {
    color: #7f8896;
}

html[data-design="dunkel"] .server-monitor {
    border-top: 1px solid #393e46;
}

html[data-design="dunkel"] .server-monitor-info {
    color: #8d95a2;
}

html[data-design="dunkel"] .server-karte {
    border: 1px solid #393e46;
    background: #1f2226;
}

html[data-design="dunkel"] .server-kopf {
    border-bottom: 1px solid #2f3339;
}

html[data-design="dunkel"] .server-ip {
    color: #8d95a2;
}

html[data-design="dunkel"] .server-dienst {
    border-bottom: 1px solid #2b2e34;
}

html[data-design="dunkel"] .server-dienst-status.online {
    color: #9ce8b8;
    background: #1d4c2c;
}

html[data-design="dunkel"] .server-dienst-status.offline {
    color: #d9262f;
    background: #461b1b;
}

html[data-design="dunkel"] .server-dienst-status.pruefe {
    color: #8d95a2;
    background: #292d32;
}

html[data-design="dunkel"] .einstellungen-hinweis {
    color: #8d95a2;
}

html[data-design="dunkel"] .meldung-ok {
    color: #93e9ab;
}

html[data-design="dunkel"] .kontakt-formular select {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .kontakt-formular select:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] .vcard-import {
    border: 1px solid #424851;
}

html[data-design="dunkel"] .karten-lightbox {
    background: rgba(227, 229, 232, 0.75);
}

html[data-design="dunkel"] .karten-lightbox-box {
    background: #1f2226;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.56);
}

html[data-design="dunkel"] .karten-zu {
    color: #c6cad1;
    background: #1f2226;
    border: 1px solid #363b42;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

html[data-design="dunkel"] .karten-zu:hover {
    color: #ffffff;
}

html[data-design="dunkel"] .karten-lightbox-fuss {
    background: #1f2226;
    border-top: 1px solid #33373e;
}

html[data-design="dunkel"] .karten-lightbox-fuss a {
    color: #468bd2;
}

html[data-design="dunkel"] .notizen-formular input[type="text"],
html[data-design="dunkel"] .notizen-formular textarea {
    border: 1px solid #424851;
}

html[data-design="dunkel"] .notizzettel {
    border: 1px solid #ddd093;
    background: #463f1b;
    color: #c4c8cf;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.096);
}

html[data-design="dunkel"] .notizzettel:hover,
html[data-design="dunkel"] .notizzettel:focus-visible {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.224);
}

html[data-design="dunkel"] .notizzettel-inhalt::after {
    background: linear-gradient(to bottom, rgba(70, 63, 27, 0), #463f1b);
}

html[data-design="dunkel"] .notizzettel-datum {
    border-top: 1px solid rgba(119, 129, 144, 0.25);
    color: #8d95a2;
}

html[data-design="dunkel"] .notiz-dialog {
    border: 1px solid #ddd093;
    background: #463f1b;
    color: #c4c8cf;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.56);
}

html[data-design="dunkel"] .notiz-dialog::backdrop {
    background: rgba(227, 229, 232, 0.55);
}

html[data-design="dunkel"] .notiz-dialog-kopf {
    border-bottom: 1px solid rgba(119, 129, 144, 0.25);
}

html[data-design="dunkel"] .notiz-dialog-fuss {
    border-top: 1px solid rgba(119, 129, 144, 0.25);
}

html[data-design="dunkel"] .notizzettel-aktionen button,
html[data-design="dunkel"] .notizzettel-aktionen a {
    color: #ffffff;
}

html[data-design="dunkel"] .notizzettel-aktionen button:hover,
html[data-design="dunkel"] .notizzettel-aktionen a:hover {
    background: #8eb7e4;
}

html[data-design="dunkel"] .diagramm-hinweis {
    color: var(--textfarbe-sekundaer, #7e8896);
}

html[data-design="dunkel"] .diagramm-leer {
    color: var(--textfarbe, #7e8896);
}

html[data-design="dunkel"] .org-ebene {
    border: 1px solid var(--rahmenfarbe, #253447);
}

html[data-design="dunkel"] .org-ebene:not(:last-child)::after {
    border-top: 10px solid #a9b5c6;
}

html[data-design="dunkel"] .org-ebene-titel {
    color: #adb8c8;
}

html[data-design="dunkel"] .org-ebene-anzahl {
    background: #1f2226;
    border: 1px solid #304053;
}

html[data-design="dunkel"] .org-stufe-0 {
    background: #1d314b;
    border-color: #73b4fc;
}

html[data-design="dunkel"] .org-stufe-1 {
    background: #1c2f4a;
    border-color: #253f63;
}

html[data-design="dunkel"] .org-stufe-2 {
    background: #1b2d46;
    border-color: #22395a;
}

html[data-design="dunkel"] .org-stufe-3 {
    background: #1a2d44;
    border-color: #203655;
}

html[data-design="dunkel"] .org-stufe-4 {
    background: #192e42;
    border-color: #21374f;
}

html[data-design="dunkel"] .org-stufe-5 {
    background: #1a2c3d;
    border-color: #253447;
}

html[data-design="dunkel"] .org-karte {
    border: 1px solid #304053;
    background: #1f2226;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.096);
}

html[data-design="dunkel"] .org-karte:hover {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.192);
}

html[data-design="dunkel"] .org-bild {
    background: #253447;
    color: #adb8c8;
}

html[data-design="dunkel"] .org-name {
    color: #b4c2e4;
}

html[data-design="dunkel"] .org-karte:hover .org-name {
    color: #5d8bf0;
}

html[data-design="dunkel"] .org-rolle {
    color: #7e8896;
}

html[data-design="dunkel"] .chat-neu {
    border: 1px solid #41464f;
    background: #1f2226;
    color: #6ea8e6;
}

html[data-design="dunkel"] .chat-neu:hover {
    background: #252e3a;
}

html[data-design="dunkel"] .chat {
    border: 1px solid #363a42;
    background: #222937;
}

html[data-design="dunkel"] .chat-nachricht-bot .chat-blase {
    border: 1px solid #363a42;
}

html[data-design="dunkel"] .chat-nachricht-bot .chat-blase-fehler {
    border-color: #622525;
}

html[data-design="dunkel"] .chat-eingabe {
    border-top: 1px solid #363a42;
    background: #1f2226;
}

html[data-design="dunkel"] .chat-eingabe textarea {
    border: 1px solid #41464f;
}

html[data-design="dunkel"] .chat-senden {
    color: #ffffff;
}

html[data-design="dunkel"] .chat-nachricht-nutzer .chat-blase {
    background: #1c304a;
    color: #acc5e2;
}

html[data-design="dunkel"] .chat-nachricht-bot .chat-blase {
    background: #292c32;
    color: #c6cad1;
}

html[data-design="dunkel"] .chat-verbrauch {
    color: #717b8a;
}

html[data-design="dunkel"] .chat-sidekick-fenster {
    border: 1px solid #363a42;
    background: #1f2226;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

html[data-design="dunkel"] .chat-sidekick .chat-sidekick-kopf {
    border-bottom: 1px solid #363a42;
    background: #1f2226;
}

html[data-design="dunkel"] .chat-sidekick-icon,
html[data-design="dunkel"] .chat-sidekick .chat-kopf .chat-stimme {
    background: transparent;
    color: #aab2bf;
}

html[data-design="dunkel"] .chat-sidekick-icon:hover,
html[data-design="dunkel"] .chat-sidekick .chat-kopf .chat-stimme:hover {
    background: #2a2e35;
}

html[data-design="dunkel"] .chat-sidekick[data-zustand="sprache"] .chat-sidekick-fenster {
    border: 0;
    background: transparent;
    box-shadow: none;
}

html[data-design="dunkel"] .chat-sidekick[data-zustand="sprache"] .chat {
    border: 0;
    background: transparent;
}

html[data-design="dunkel"] .chat-sidekick .chat-gesicht-status {
    background: rgba(31, 34, 38, 0.92);
    color: #c6cad1;
}

html[data-design="dunkel"] .chat-sidekick-zum-text:hover,
html[data-design="dunkel"] .chat-sidekick-sprachleiste .chat-sidekick-icon:hover {
    background: #333944;
}

html[data-design="dunkel"] .chat-sidekick-zum-text,
html[data-design="dunkel"] .chat-sidekick-sprachleiste .chat-sidekick-icon {
    border-color: #41464f;
    background: #2a2e35;
    color: #cfe6f8;
}

html[data-design="dunkel"] .chat-sidekick .chat {
    border: 0;
}

html[data-design="dunkel"] .chat-sidekick-neu {
    border-color: #1f2226;
}

html[data-design="dunkel"] .chat-gesprochen {
    color: #717b8a;
}

html[data-design="dunkel"] .chat-blase-fehler {
    border: 1px solid #dc5050;
    color: #ee8484 !important;
}

html[data-design="dunkel"] .dok-picker-treffer {
    background: #1f2226;
    border: 1px solid #424851;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.192);
}

html[data-design="dunkel"] .dok-picker-treffer button:hover,
html[data-design="dunkel"] .dok-picker-treffer button:focus-visible {
    background: #1a2c45;
}

html[data-design="dunkel"] .dok-picker-treffer .dok-leer {
    color: #717b8a;
}

html[data-design="dunkel"] .mail-treffer {
    background: #1f2226;
    border: 1px solid #424851;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.192);
}

html[data-design="dunkel"] .mail-treffer button:hover,
html[data-design="dunkel"] .mail-treffer button:focus-visible {
    background: #1a2c45;
}

html[data-design="dunkel"] .mail-treffer .mail-leer {
    color: #717b8a;
}

html[data-design="dunkel"] .dok-picker-gewaehlt li {
    background: #1a2c45;
}

html[data-design="dunkel"] .dok-chip-weg {
    color: #7f8896;
}

html[data-design="dunkel"] .dok-chip-weg:hover {
    color: #e17777;
}

html[data-design="dunkel"] .training-formular input[type="date"],
html[data-design="dunkel"] .training-formular input[type="time"] {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .training-formular input[type="date"]:focus,
html[data-design="dunkel"] .training-formular input[type="time"]:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] .training-zeitraum-weg {
    color: #7f8896;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .training-zeitraum-weg:hover {
    color: #e17777;
}

html[data-design="dunkel"] .training-klein {
    color: #7f8896;
}

html[data-design="dunkel"] .suche-zeile select {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .profil-box input[type="time"] {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .dubletten-tabelle th,
html[data-design="dunkel"] .dubletten-tabelle td {
    border-bottom: 1px solid rgba(119, 129, 144, 0.3);
}

html[data-design="dunkel"] .dubletten-tabelle thead th {
    border-bottom: 2px solid rgba(119, 129, 144, 0.4);
}

html[data-design="dunkel"] .dubletten-aktionen .dubletten-knopf-neutral {
    background: #7e8795;
}

html[data-design="dunkel"] .dubletten-aktionen .dubletten-knopf-neutral:hover {
    background: #9098a4;
}

html[data-design="dunkel"] .chat-bild-lightbox {
    background: rgba(227, 229, 232, 0.92);
}

html[data-design="dunkel"] .kalender-icon {
    border: 1px solid rgba(119, 129, 144, 0.35);
}

html[data-design="dunkel"] .kalender-wochentag {
    color: #ffffff;
}

html[data-design="dunkel"] .kunde-form h3.kunde-abschnitt {
    border-bottom: 1px solid #33373e;
}

html[data-design="dunkel"] .kunde-form select,
html[data-design="dunkel"] .kunde-form input[type="number"] {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .kunde-form select:focus,
html[data-design="dunkel"] .kunde-form input[type="number"]:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] .einstellungen-texte textarea {
    border: 1px solid #424851;
}

html[data-design="dunkel"] .einstellungen-baustein {
    border-color: #3a3f47;
}

html[data-design="dunkel"] .einstellungen-form .einstellungen-baustein-loeschen {
    color: #f0857a;
}

html[data-design="dunkel"] .leistungen-tabelle th,
html[data-design="dunkel"] .leistungen-tabelle td {
    border-bottom: 1px solid #2b2e34;
}

html[data-design="dunkel"] .leistungen-tabelle th {
    background: #222937;
}

html[data-design="dunkel"] .leistungen-tabelle input[type="text"],
html[data-design="dunkel"] .leistungen-tabelle select {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .abrechnung-form select,
html[data-design="dunkel"] .training-formular select {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .abrechnung-form select:focus,
html[data-design="dunkel"] .training-formular select:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] .auftrag-warnung {
    color: #f8b078;
}

html[data-design="dunkel"] .leistungen-tabelle input[type="date"] {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .auftraege-tabelle tfoot td {
    border-top: 2px solid #424851;
}

html[data-design="dunkel"] .auftrag-status {
    background: #1f3147;
}

html[data-design="dunkel"] .auftrag-status-geplant,
html[data-design="dunkel"] .auftrag-status-laufend {
    background: #1c304a;
}

html[data-design="dunkel"] .auftrag-status-durchgefuehrt {
    background: #1e4e2a;
}

html[data-design="dunkel"] .auftrag-status-angefragt {
    background: #50421e;
}

html[data-design="dunkel"] .auftrag-status-storniert {
    background: #2b2e34;
}

html[data-design="dunkel"] .auftrag-problem {
    background: #43341a;
}

html[data-design="dunkel"] .auftrag-hinweise {
    color: #f8b078;
}

html[data-design="dunkel"] .auftraege-werkzeug a.training-klein-knopf {
    color: #ffffff;
}

html[data-design="dunkel"] .auftraege-werkzeug a.training-klein-knopf:hover {
    background: #8eb7e4;
}

html[data-design="dunkel"] .bestellungen-dok-neu {
    color: #7f8896;
}

html[data-design="dunkel"] .rechnung-pruefliste .pruef-ok .pruef-zeichen {
    color: #99dbba;
}

html[data-design="dunkel"] .rechnung-pruefliste .pruef-fehler {
    color: #d75b5b;
}

html[data-design="dunkel"] .rechnung-pruefliste .pruef-hinweis {
    color: #8d95a2;
}

html[data-design="dunkel"] .rechnung-summen .rechnung-summe-zeile td {
    border-top: 1px solid #363b42;
}

html[data-design="dunkel"] .rechnung-summen .rechnung-summe-gesamt td {
    border-top: 2px solid #656e7c;
}

html[data-design="dunkel"] .knopf-link {
    color: #ffffff;
}

html[data-design="dunkel"] .auftrag-status-faellig {
    background: #491c1c;
}

html[data-design="dunkel"] .smtp-protokoll {
    background: #26292e;
    border: 1px solid #363b42;
}

html[data-design="dunkel"] .smtp-hinweis {
    background: #43341a;
    border-left: 4px solid #e0b661;
}

html[data-design="dunkel"] .stat-karte {
    background: #1d283f;
    border: 1px solid #283245;
}

html[data-design="dunkel"] .stat-label {
    color: #8d95a2;
}

html[data-design="dunkel"] .stat-gitter {
    stroke: #33373e;
}

html[data-design="dunkel"] .stat-achse {
    fill: #8d95a2;
}

html[data-design="dunkel"] .stat-fortschritt::-webkit-progress-bar {
    background: #273041;
}

html[data-design="dunkel"] .brief-feld input,
html[data-design="dunkel"] .brief-feld textarea {
    border: 1px solid var(--randfarbe, #424851);
    background: var(--hintergrund, #1f2226);
}

html[data-design="dunkel"] .kontakt-vorschlaege {
    background: var(--box-hintergrund, #1f2226);
    border: 1px solid #5a616d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.24);
}

html[data-design="dunkel"] .kontakt-vorschlag {
    border-bottom: 1px solid rgba(119, 129, 144, 0.2);
}

html[data-design="dunkel"] .kontakt-vorschlag:hover,
html[data-design="dunkel"] .kontakt-vorschlag:focus {
    background: rgba(119, 129, 144, 0.12);
}

html[data-design="dunkel"] .brief-fehler {
    background: rgba(190, 40, 40, 0.1);
    color: #dd3b32;
}

html[data-design="dunkel"] .zusatzfeld-neu summary {
    color: #468bd2;
}

html[data-design="dunkel"] .zusatzfeld-formular label {
    color: #7f8896;
}

html[data-design="dunkel"] .pdf-lightbox {
    background: rgba(227, 229, 232, 0.6);
}

html[data-design="dunkel"] .pdf-lightbox-fenster {
    background: #1f2226;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.56);
}

html[data-design="dunkel"] .pdf-lightbox-kopf {
    border-bottom: 1px solid #253447;
}

html[data-design="dunkel"] .pdf-lightbox-tab {
    color: #468bd2;
}

html[data-design="dunkel"] .pdf-lightbox-zu {
    color: #9ba3ae;
}

html[data-design="dunkel"] .pdf-lightbox-zu:hover {
    color: #c6cad1;
    background: #1e3143;
}

html[data-design="dunkel"] .pdf-lightbox-rahmen {
    background: #9ba2ad;
}

html[data-design="dunkel"] .anruf-lightbox {
    background: rgba(227, 229, 232, 0.45);
}

html[data-design="dunkel"] .anruf-fenster {
    background: #1f2226;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.56);
}

html[data-design="dunkel"] .anruf-kopf {
    border-bottom: 1px solid #253447;
}

html[data-design="dunkel"] .anruf-zu {
    color: #9ba3ae;
}

html[data-design="dunkel"] .anruf-zu:hover {
    color: #c6cad1;
    background: #1e3143;
}

html[data-design="dunkel"] .benutzer-tabelle th,
html[data-design="dunkel"] .benutzer-tabelle td {
    border-bottom: 1px solid #2b2e34;
}

html[data-design="dunkel"] .benutzer-tabelle th {
    background: #222937;
}

html[data-design="dunkel"] .benutzer-tabelle tr.benutzer-inaktiv td {
    color: #656e7c;
}

html[data-design="dunkel"] .benutzer-tabelle tr.benutzer-gewaehlt td {
    background: #1a2d44;
}

html[data-design="dunkel"] .benutzer-selbst {
    color: #7f8896;
}

html[data-design="dunkel"] .benutzer-aktionen a {
    color: #468bd2;
}

html[data-design="dunkel"] .benutzer-aktionen .link-knopf {
    color: #468bd2;
}

html[data-design="dunkel"] .benutzer-aktionen .benutzer-loeschen {
    color: #d75b5b;
}

html[data-design="dunkel"] .benutzer-formular {
    border-top: 1px solid #33373e;
}

html[data-design="dunkel"] .ausgaben-zuordnung {
    border: 1px solid #363b42;
}

html[data-design="dunkel"] .ausgaben-zuordnung legend {
    color: #9ba3ae;
}

html[data-design="dunkel"] .ausgaben-tabelle tr.ausgabe-gewaehlt td {
    background: #1a2d44;
}

html[data-design="dunkel"] .ausgaben-klein {
    color: #7f8896;
}

html[data-design="dunkel"] .ausgaben-aktionen a {
    color: #468bd2;
}

html[data-design="dunkel"] .ausgaben-aktionen .link-knopf {
    color: #d75b5b;
}

html[data-design="dunkel"] .angebot-links a {
    color: #468bd2;
}

html[data-design="dunkel"] .angebot-tabelle .angebot-zeile-weg {
    color: #d75b5b;
}

html[data-design="dunkel"] .leistungen-tabelle tr.angebot-gewaehlt td {
    background: #1a2d44;
}

html[data-design="dunkel"] .angebot-liste-aktionen a {
    color: #468bd2;
}

html[data-design="dunkel"] .angebot-liste-aktionen .link-knopf {
    color: #d75b5b;
}

html[data-design="dunkel"] .auftrag-storno-info {
    color: #e6a38a;
}

html[data-design="dunkel"] .auftrag-storno-markierung {
    color: #e6a38a;
}

html[data-design="dunkel"] .stat-karte.buchhaltung-warnung {
    background: #431c19;
    border-color: #5d2923;
}

html[data-design="dunkel"] .stat-karte.buchhaltung-warnung .stat-wert,
html[data-design="dunkel"] .buchhaltung-tage {
    color: #e23427;
}

html[data-design="dunkel"] .buchhaltung-leer {
    color: #8d95a2;
}

html[data-design="dunkel"] .buchhaltung-klein {
    color: #7f8896;
}

html[data-design="dunkel"] .leistungen-tabelle tr.kosten-summe td {
    border-top: 2px solid #424851;
}

html[data-design="dunkel"] .angebot-kosten-info {
    background: #1d283f;
    border-left: 4px solid #468bd2;
}

html[data-design="dunkel"] .dms-formular select,
html[data-design="dunkel"] .dms-formular input[type="date"],
html[data-design="dunkel"] .brief-feld select {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .dms-formular select:focus,
html[data-design="dunkel"] .dms-formular input[type="date"]:focus,
html[data-design="dunkel"] .brief-feld select:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] .dok-ohne-art {
    color: #f8b078;
}

html[data-design="dunkel"] .dok-loeschfaellig {
    color: #d75b5b;
}

html[data-design="dunkel"] .aufgabe-fuer-alle {
    color: #7f8896;
}

html[data-design="dunkel"] .server-dienst-status.comfyui-arbeitet {
    background: #544a20;
    color: #f3af86;
}

html[data-design="dunkel"] .comfyui-hinweis {
    color: #7f8896;
}

html[data-design="dunkel"] .leitfaden-artenliste li {
    border-bottom: 1px solid #2b2e34;
}

html[data-design="dunkel"] .leitfaden-artenliste li.aktiv {
    background: #1a2d44;
}

html[data-design="dunkel"] .leitfaden-anzahl {
    color: #7f8896;
}

html[data-design="dunkel"] .leitfaden-tabelle tr.leitfaden-neu td {
    background: #222937;
}

html[data-design="dunkel"] button.leitfaden-loeschen {
    border: 1px solid #d75b5b;
    color: #d75b5b;
}

html[data-design="dunkel"] .leitfaden-beginn input[type="time"],
html[data-design="dunkel"] .leitfaden-tabelle input.leitfaden-uhrzeit {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .leitfaden-tabelle input.leitfaden-uhrzeit[readonly] {
    background: #272b30;
}

html[data-design="dunkel"] .checkliste-tabelle .checkliste-nr {
    color: #7f8896;
}

html[data-design="dunkel"] .checkliste-tabelle tr.checkliste-neu td {
    background: #222937;
}

html[data-design="dunkel"] .leistungen-tabelle button.checkliste-loeschen {
    border: 1px solid #d75b5b;
    color: #d75b5b;
}

html[data-design="dunkel"] .training-checkliste-stand {
    color: #7f8896;
}

html[data-design="dunkel"] .training-checkliste-punkte li {
    border-bottom: 1px solid #2b2e34;
}

html[data-design="dunkel"] .training-checkliste-punkte li.erledigt .training-checkliste-text {
    color: #53c387;
}

html[data-design="dunkel"] .training-checkliste-punkte li.erledigt .training-checkliste-haken {
    color: #53c387;
}

html[data-design="dunkel"] .training-checkliste-vermerk {
    color: #7f8896;
}

html[data-design="dunkel"] .update-tabelle tr.update-neu td {
    background: #194224;
}

html[data-design="dunkel"] .update-tabelle tr.update-geaendert td {
    background: #443c1a;
}

html[data-design="dunkel"] .update-tabelle tr.update-gleich td {
    color: #656e7c;
}

html[data-design="dunkel"] .update-fehler {
    color: #d75b5b;
}

html[data-design="dunkel"] .code-pruefung-hinweise {
    color: #8d95a2;
}

html[data-design="dunkel"] .kal-loeschen {
    color: #d75b5b;
}

html[data-design="dunkel"] .kal-loeschen:hover {
    background: #461b1b;
}

html[data-design="dunkel"] .system-daten dd.strom-ok {
    color: #99dbba;
}

html[data-design="dunkel"] .system-daten dd.strom-warn {
    color: #dd9936;
}

html[data-design="dunkel"] .system-daten dd.strom-kritisch {
    color: #d75b5b;
}

html[data-design="dunkel"] .avatar.kal-person-plus {
    color: #468bd2;
    border: 1px dashed #468bd2;
}

html[data-design="dunkel"] .kal-person-weg {
    color: #ffffff;
    border: 1px solid #1f2226;
}

html[data-design="dunkel"] .kal-person-suche input[type="search"] {
    border: 1px solid #424851;
}

html[data-design="dunkel"] .kal-person-treffer button:hover {
    background: #1a2d44;
}

html[data-design="dunkel"] .kal-person-leer {
    color: #7f8896;
}

@media (max-width: 640px) {
    html[data-design="dunkel"] .menue-knopf {
        color: #468bd2;
        background: #1f2226;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
    }

    html[data-design="dunkel"] .seitenleiste.offen .menue-knopf {
        color: #ffffff;
    }

    html[data-design="dunkel"] .seitenleiste.offen .mobil-menue {
        background: #1f2226;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
    }

    html[data-design="dunkel"] .mobil-menue li + li {
        border-top: 1px solid #292d32;
    }

    html[data-design="dunkel"] .mobil-menue a {
        color: #c6cad1;
    }

    html[data-design="dunkel"] .mobil-menue a.aktiv {
        color: #ffffff;
    }
}

html[data-design="dunkel"] .netzwerk {
    background: #1f2226;
}

html[data-design="dunkel"] .netzwerk-farbe {
    background: #717b8a;
}

html[data-design="dunkel"] .netzwerk-farbe-unbekannt {
    background: #717b8a;
}

html[data-design="dunkel"] .netzwerk-farbe-unternehmen {
    background: #444a53;
}

html[data-design="dunkel"] .netzwerk .dok-picker-treffer .netzwerk-treffer-unternehmen::before {
    color: #808997;
}

html[data-design="dunkel"] .netzwerk-knopf {
    color: #b4becc;
    background: #262a2f;
    border: 1px solid #3b4048;
}

html[data-design="dunkel"] .netzwerk-knopf:hover {
    background: #2f3339;
}

html[data-design="dunkel"] .netzwerk-buehne {
    border: 1px solid #253447;
    background: #1c2b39;
}

html[data-design="dunkel"] .netzwerk-meldung {
    color: #9aa1ac;
    background: rgba(31, 34, 38, 0.92);
    border: 1px solid #253447;
}

html[data-design="dunkel"] .netzwerk-pfad {
    border-bottom: 1px solid #253447;
    background: #1f2226;
}

html[data-design="dunkel"] .netzwerk-pfad-eintrag {
    color: #808997;
}

html[data-design="dunkel"] .netzwerk-hinweis {
    color: #808997;
}

html[data-design="dunkel"] .netzwerk-eintrag {
    border: 1px solid #253447;
}

html[data-design="dunkel"] .netzwerk-eintrag-neu {
    border-color: #468bd2;
    background: #182840;
}

html[data-design="dunkel"] .netzwerk-eintrag select,
html[data-design="dunkel"] .netzwerk-eintrag input[type="text"] {
    border: 1px solid #424851;
    background: #1f2226;
}

html[data-design="dunkel"] .netzwerk-eintrag .netzwerk-loeschen {
    color: #e23427;
    border: 1px solid #5d2823;
}

html[data-design="dunkel"] .netzwerk-eintrag .netzwerk-loeschen:hover {
    background: #451f1a;
}

html[data-design="dunkel"] .netzwerk-info {
    color: #9aa1ac;
}

html[data-design="dunkel"] .netzwerk-notiz {
    color: #808997;
}

html[data-design="dunkel"] .netzwerk-farbe-vorschlag {
    border-top: 2px dashed #808997;
}

html[data-design="dunkel"] .netzwerk-eintrag .netzwerk-ablehnen {
    color: #b4becc;
    background: #262a2f;
    border: 1px solid #3b4048;
}

html[data-design="dunkel"] .netzwerk-eintrag .netzwerk-ablehnen:hover {
    background: #2f3339;
}

html[data-design="dunkel"] .beziehungsarten-tabelle input[type="color"] {
    border: 1px solid #424851;
    background: #1f2226;
}


/* --- Grundregeln --- */
html[data-design="dunkel"] {
    color-scheme: dark;
}

html[data-design="dunkel"] body {
    background-color: #0f1216;
    background-image: none;
}

html[data-design="dunkel"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
html[data-design="dunkel"] textarea,
html[data-design="dunkel"] select {
    background-color: #161a20;
    color: #dfe3e8;
    border-color: #3a414b;
}

html[data-design="dunkel"] input::placeholder,
html[data-design="dunkel"] textarea::placeholder {
    color: #7d8794;
}

html[data-design="dunkel"] a:not([class]) {
    color: #7fb0ea;
}

html[data-design="dunkel"] hr {
    border-color: #2e343c;
}


html[data-design="dunkel"] .piper-stimme-zeile select,
html[data-design="dunkel"] .ki-server-auswahl {
    background: #1f2226;
    border: 1px solid #424851;
}

html[data-design="dunkel"] .piper-stimme-zeile select:focus,
html[data-design="dunkel"] .ki-server-auswahl:focus {
    border-color: #468bd2;
}

html[data-design="dunkel"] .chat-stimme {
    border: 1px solid #41464f;
    background: #1f2226;
    color: #6ea8e6;
}

html[data-design="dunkel"] .chat-stimme:hover {
    background: #252e3a;
}

html[data-design="dunkel"] .chat-stimme[aria-pressed="false"] {
    color: #7d8590;
}

html[data-design="dunkel"] .chat-knoepfe .chat-mikro {
    border: 1px solid #41464f;
    background: #1f2226;
    color: #6ea8e6;
}

html[data-design="dunkel"] .chat-knoepfe .chat-mikro:hover:not(:disabled):not(.chat-mikro-hoert) {
    background: #252e3a;
}

html[data-design="dunkel"] .chat-knoepfe .chat-mikro.chat-mikro-bereit {
    border-color: #dc2626;
    color: #f87171;
}

html[data-design="dunkel"] .chat-knoepfe .chat-mikro.chat-mikro-hoert {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

html[data-design="dunkel"] .chat-gesicht-kopf {
    color: #cbd5e1;
}

html[data-design="dunkel"] .chat-gesicht-status {
    color: #94a3b8;
}

html[data-design="dunkel"] .chat-gesicht-blase {
    background: #2a2e35;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

html[data-design="dunkel"] .chat-gesicht-blase-status,
html[data-design="dunkel"] .chat-gesicht-blase-termin-zeit {
    color: #94a3b8;
}

/* === Ende Dunkelmodus === */

/* ---------------------------------------------------------------------------
   Stromverbrauch Büro (Systemstatus) und Stromzähler (Systemeinstellungen)
   --------------------------------------------------------------------------- */
.strom {
    position: relative;
}

.strom-kennzahlen {
    margin-bottom: 16px;
}

.strom-steuerung {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.strom-schalter {
    display: inline-flex;
    border: 1px solid #c9d4e3;
    border-radius: 8px;
    overflow: hidden;
}

.strom-schalter button {
    width: auto;
    margin: 0;
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2b6cb0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.strom-schalter button + button {
    border-left: 1px solid #c9d4e3;
}

.strom-schalter button:hover {
    background: #eef4fb;
}

.strom-schalter button[aria-pressed="true"] {
    color: #fff;
    background: #2b6cb0;
}

.strom-blaettern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.strom-blaettern button {
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
    color: #2b6cb0;
    background: transparent;
    border: 1px solid #c9d4e3;
    border-radius: 50%;
}

.strom-blaettern button:hover:not(:disabled) {
    background: #eef4fb;
}

.strom-blaettern button:disabled {
    opacity: 0.35;
    cursor: default;
}

.strom-diagramm {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: 180px;
    padding: 18px 0 22px;
    border-bottom: 1px solid #d5dbe4;
}

.strom-raster {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    border-top: 1px dashed #e1e6ee;
    font-size: 0.75rem;
    line-height: 1;
    color: #7a8494;
    transform: translateY(-100%);
    padding-bottom: 3px;
    pointer-events: none;
}

.strom-spalte {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    outline: none;
    cursor: default;
}

.strom-spalte:hover,
.strom-spalte:focus-visible {
    background: #f1f5fb;
}

.strom-saeule {
    width: 100%;
    max-width: 38px;
    background: #2b6cb0;
    border-radius: 4px 4px 0 0;
}

.strom-spalte:hover .strom-saeule,
.strom-spalte:focus-visible .strom-saeule {
    background: #245a96;
}

.strom-beschriftung {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: #6b7482;
    white-space: nowrap;
}

.strom-tipp {
    position: absolute;
    z-index: 5;
    padding: 6px 10px;
    font-size: 0.82rem;
    color: #fff;
    background: #1f2937;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
}

#strom-hinweis {
    margin-top: 10px;
}

.strom-stand {
    margin-top: 16px;
}

.strom-loeschen {
    display: flex;
    align-items: center;
    gap: 6px;
}

.strom-loeschen input {
    width: auto;
}

.strom-kunden-tabelle td,
.strom-kunden-tabelle th {
    white-space: nowrap;
}

html[data-design="dunkel"] .strom-schalter,
html[data-design="dunkel"] .strom-schalter button + button,
html[data-design="dunkel"] .strom-blaettern button {
    border-color: #3a414b;
}

html[data-design="dunkel"] .strom-schalter button,
html[data-design="dunkel"] .strom-blaettern button {
    color: #7fb0ea;
}

html[data-design="dunkel"] .strom-schalter button:hover,
html[data-design="dunkel"] .strom-blaettern button:hover:not(:disabled),
html[data-design="dunkel"] .strom-spalte:hover,
html[data-design="dunkel"] .strom-spalte:focus-visible {
    background: #1d283f;
}

html[data-design="dunkel"] .strom-schalter button[aria-pressed="true"] {
    color: #0f1216;
    background: #7fb0ea;
}

html[data-design="dunkel"] .strom-saeule {
    background: #7fb0ea;
}

html[data-design="dunkel"] .strom-spalte:hover .strom-saeule,
html[data-design="dunkel"] .strom-spalte:focus-visible .strom-saeule {
    background: #a7c9f1;
}

html[data-design="dunkel"] .strom-diagramm {
    border-bottom-color: #393e46;
}

html[data-design="dunkel"] .strom-raster {
    border-top-color: #2f3339;
    color: #8d95a2;
}

html[data-design="dunkel"] .strom-beschriftung {
    color: #8d95a2;
}

html[data-design="dunkel"] .strom-tipp {
    color: #0f1216;
    background: #dfe3e8;
}

/* Buchhaltung: Kosten Vorjahr, Vormonat, laufender Monat */
.buchhaltung-kosten th.zahl {
    text-align: right;
}

.buchhaltung-brutto {
    display: block;
    font-size: 0.8rem;
    color: #6b7482;
}

html[data-design="dunkel"] .buchhaltung-brutto {
    color: #8d95a2;
}

/* Stromkosten-Simulation (Buchhaltung) */
.strom-sim-formular {
    align-items: center;
}

.strom-sim-formular label {
    font-weight: 600;
}

.strom-sim-formular input[type="date"] {
    width: auto;
}

.strom-sim-formular button {
    width: auto;
    margin-top: 0;
}

.strom-sim-staende {
    margin: 12px 0 16px;
}

.strom-sim-rechnung th.zahl,
.strom-sim-monate th.zahl {
    text-align: right;
}

.strom-sim-klein {
    display: block;
    font-size: 0.8rem;
    color: #6b7482;
}

.strom-sim-abschlag {
    margin-top: 20px;
}

html[data-design="dunkel"] .strom-sim-klein {
    color: #8d95a2;
}

/* ---------------------------------------------------------------------------
   Video-Overlay für OBS (chat_overlay.php): transparenter Hintergrund, Gesicht unten rechts,
   Sprechblasen links daneben; ein- und ausgeblendet über data-sichtbar
   --------------------------------------------------------------------------- */
html:has(body.overlay-seite) {
    background: transparent;
}

body.overlay-seite {
    display: block;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    background: transparent none;
}

.overlay {
    position: fixed;
    right: 32px;
    bottom: 32px;
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    transform-origin: 100% 100%;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
}

.overlay[data-sichtbar="1"] {
    opacity: 1;
    transform: none;
}

.overlay .overlay-gesicht {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    --gesicht-akzent: #7cc3f2;
    --gesicht-licht: #f0f9ff;
    --gesicht-schein: rgba(124, 195, 242, 0.45);
    --gesicht-augen: #0f2a44;
    --gesicht-wangen: #fb7185;
    --gesicht-lippen: #db5a8a;
    --gesicht-mund-innen: #6b1d3a;
}

.overlay .chat-gesicht-buehne {
    flex-direction: row-reverse;
    align-items: center;
    gap: 20px;
    width: auto;
}

.overlay .chat-gesicht-kopf {
    flex: 0 0 260px;
    width: 260px;
}

.overlay .chat-gesicht-blasen {
    max-width: 460px;
    padding-left: 0;
    padding-right: 10px;
}

/* Spitze der ersten Blase zeigt nach rechts zum Gesicht */
.overlay .chat-gesicht-blase:first-child::after {
    left: auto;
    right: -8px;
}

/* Profil: Video-Overlay in der rechten Spalte unter dem Passwort */
.profil-grid > .profil-spalte {
    padding-left: 48px;
    border-left: 1px solid #e2e2e2;
}

.profil-spalte form + form {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e2e2;
}

.profil-overlay input[readonly] {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
}

.profil-overlay-status {
    margin: 8px 0;
    font-weight: 600;
}

.profil-overlay-schalter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-weight: normal;
}

.profil-overlay-schalter input {
    width: auto;
    margin: 0;
}

.profil-overlay button.profil-overlay-zweit {
    margin-top: 10px;
    color: #2b6cb0;
    background: transparent;
    border: 1px solid #c9d4e3;
}

.profil-overlay button.profil-overlay-zweit:hover {
    background: #eef4fb;
}

@media (max-width: 800px) {
    .profil-grid > .profil-spalte {
        padding-left: 0;
        padding-top: 24px;
        border-left: none;
        border-top: 1px solid #e2e2e2;
    }
}

html[data-design="dunkel"] .profil-grid > .profil-spalte {
    border-left-color: #33373e;
}

html[data-design="dunkel"] .profil-spalte form + form {
    border-top-color: #33373e;
}

html[data-design="dunkel"] .profil-overlay button.profil-overlay-zweit {
    color: #7fb0ea;
    border-color: #3a414b;
}

html[data-design="dunkel"] .profil-overlay button.profil-overlay-zweit:hover {
    background: #1d283f;
}

@media (max-width: 800px) {
    html[data-design="dunkel"] .profil-grid > .profil-spalte {
        border-top-color: #33373e;
    }
}

/* ---------------------------------------------------------------------------
   Domainverwaltung (domains.php, domain.php, domain_kontakte.php)
   --------------------------------------------------------------------------- */
.domain-kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.domain-kopf > span {
    display: inline-flex;
    gap: 16px;
}

.domain-knopf-link {
    font-weight: 600;
    color: #2b6cb0;
    text-decoration: none;
}

.domain-knopf-link:hover {
    text-decoration: underline;
}

.domain-test {
    display: inline-block;
    margin: 4px 0 12px;
    padding: 6px 12px;
    font-weight: 600;
    color: #8a5a00;
    background: #fff4d6;
    border-radius: 6px;
}

.domain-tabelle td {
    vertical-align: middle;
}

.domain-tabelle select {
    width: auto;
    max-width: 100%;
    margin: 0;
}

.domain-klein {
    display: block;
    font-size: 0.8rem;
    color: #6b7482;
}

.domain-bald {
    font-weight: 700;
    color: #b42318;
}

.domain-blaettern {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.domain-uebersicht {
    margin-top: 12px;
}

.domain-form button,
.domain-rr-form button {
    width: auto;
}

.domain-form > button + .domain-knopf-link {
    margin-left: 16px;
}

.domain-bestaetigen,
.domain-schalter {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0;
    font-weight: normal;
}

.domain-bestaetigen {
    padding: 10px 12px;
    color: #8a5a00;
    background: #fff4d6;
    border-radius: 6px;
}

.domain-bestaetigen[hidden] {
    display: none;
}

/* Auswahlfelder und Zahlen wie die übrigen Eingabefelder */
.domain-form select,
.domain-tabelle select,
.domain-rr-form select,
.domain-rr-form input[type="number"] {
    padding: 9px 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

.domain-form select {
    display: block;
    width: 100%;
    margin: 4px 0 8px;
}

html[data-design="dunkel"] .domain-form select,
html[data-design="dunkel"] .domain-tabelle select,
html[data-design="dunkel"] .domain-rr-form select,
html[data-design="dunkel"] .domain-rr-form input[type="number"] {
    color: inherit;
    background: #1b1f25;
    border-color: #3a414b;
}

.domain-bestaetigen input,
.domain-schalter input {
    width: auto;
    margin: 3px 0 0;
}

.domain-ns-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px 12px;
}

.domain-ns-liste input {
    margin: 0;
}

.domain-einstellungen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px 32px;
}

.domain-authcode {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.domain-authcode code {
    padding: 4px 8px;
    background: #f1f5fb;
    border-radius: 4px;
}

.domain-knopf-klein {
    width: auto;
    margin: 0;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.domain-knopf-zweit,
.domain-form button.domain-knopf-zweit {
    color: #2b6cb0;
    background: transparent;
    border: 1px solid #c9d4e3;
}

.domain-knopf-zweit:hover {
    background: #eef4fb;
}

.domain-inline {
    display: inline;
}

.domain-rr-aktionen {
    white-space: nowrap;
}

.domain-rr-aktionen > * + * {
    margin-left: 10px;
}

.domain-rr-wert-zelle code {
    word-break: break-all;
}

.domain-rr-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.domain-rr-form input,
.domain-rr-form select {
    width: auto;
    margin: 0;
}

.domain-rr-form input[name="name"] {
    width: 140px;
}

.domain-rr-form input[name="ttl"] {
    width: 100px;
}

.domain-rr-form .domain-rr-wert {
    flex: 1 1 260px;
    min-width: 200px;
}

.domain-zwischentitel {
    margin: 20px 0 8px;
}

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

.domain-zweitaktionen button {
    width: auto;
}

html[data-design="dunkel"] .domain-knopf-link,
html[data-design="dunkel"] .domain-knopf-zweit,
html[data-design="dunkel"] .domain-form button.domain-knopf-zweit {
    color: #7fb0ea;
}

html[data-design="dunkel"] .domain-knopf-zweit {
    border-color: #3a414b;
}

html[data-design="dunkel"] .domain-knopf-zweit:hover {
    background: #1d283f;
}

html[data-design="dunkel"] .domain-test,
html[data-design="dunkel"] .domain-bestaetigen {
    color: #f3d38b;
    background: #3d3016;
}

html[data-design="dunkel"] .domain-klein {
    color: #8d95a2;
}

html[data-design="dunkel"] .domain-bald {
    color: #f19a90;
}

html[data-design="dunkel"] .domain-authcode code {
    background: #1d283f;
}

/* Domainverwaltung Stufe 2: gefährliche Aktionen, Bestellung, Vorgänge */
.domain-gefahr {
    margin-top: 20px;
    padding: 12px 16px;
    border: 1px solid #f1c3bd;
    border-radius: 8px;
}

.domain-gefahr > summary {
    font-weight: 600;
    color: #b42318;
    cursor: pointer;
}

.domain-gefahr[open] > summary {
    margin-bottom: 12px;
}

.domain-gefahr .domain-einstellungen {
    margin-top: 8px;
}

.domain-knopf-gefahr,
.domain-form button.domain-knopf-gefahr {
    width: auto;
    color: #fff;
    background: #b42318;
    border-color: #b42318;
}

.domain-knopf-gefahr:hover {
    background: #912018;
}

.domain-protokoll-kopf {
    cursor: pointer;
}

.domain-protokoll-kopf h2 {
    display: inline;
    margin: 0;
}

.domain-zurueck-form {
    margin-top: 10px;
}

.domain-form textarea {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-design="dunkel"] .domain-gefahr {
    border-color: #5c2a25;
}

html[data-design="dunkel"] .domain-gefahr > summary {
    color: #f19a90;
}

.domain-inline-klein {
    display: inline;
    margin-left: 8px;
    font-weight: normal;
}

.domain-verifizieren {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

/* ---------------------------------------------------------------------------
   Webserver (Systemeinstellungen > Webserver, Domain-Seite): Weiterleitungen und Websites
   --------------------------------------------------------------------------- */
.webserver-form:has(.webserver-art option[value="weiterleitung"]:checked) .webserver-nur-website,
.webserver-form:has(.webserver-art option[value="website"]:checked) .webserver-nur-weiterleitung {
    display: none;
}

.webserver-form select {
    width: 100%;
}

.webserver-zusatz {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
}

.webserver-script {
    margin: 4px 0 18px;
}

.webserver-neu {
    margin-left: 10px;
    font-weight: 700;
    color: #b42318;
}

.webserver-ziel-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.webserver-ziel-form input {
    flex: 1;
    min-width: 14rem;
}

.webserver-tabelle td {
    vertical-align: middle;
}

.webserver-tabelle code {
    word-break: break-all;
}

/* ---------------------------------------------------------------------------
   FRITZ!Box (Systemeinstellungen): Profile mit Internetsperre je Gerät
   --------------------------------------------------------------------------- */
.fritzbox-profil {
    padding: 12px 0;
    border-bottom: 1px solid #e3e7ee;
}

.fritzbox-profil-kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.fritzbox-status {
    font-size: 0.85rem;
    color: #6b7482;
}

.fritzbox-status.fritzbox-an {
    font-weight: 700;
    color: #b42318;
}

.fritzbox-profil details > summary,
.fritzbox-neu > summary {
    cursor: pointer;
    margin: 6px 0;
    color: #2b6cb0;
}

.fritzbox-neu {
    margin-top: 14px;
}

.fritzbox-geraete {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 6px 14px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}

.fritzbox-geraet {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 6px;
    align-items: start;
    cursor: pointer;
}

.fritzbox-geraet .domain-klein {
    grid-column: 2;
}

.fritzbox-inaktiv {
    opacity: 0.55;
}

.fritzbox-zeitplan {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 6px;
}

.fritzbox-zeitplan label {
    white-space: nowrap;
}

.fritzbox-zeitplan input[type="time"] {
    width: auto;
}

/* FRITZ!Box-Seite (fritzbox.php): Geräteliste mit Umbenennen und Schutz */
.fritzbox-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 8px;
    cursor: pointer;
}

.fritzbox-tabelle.nur-aktiv .fritzbox-inaktiv-zeile {
    display: none;
}

.fritzbox-tabelle .fritzbox-inaktiv-zeile td {
    opacity: 0.6;
}

.fritzbox-tabelle td {
    vertical-align: middle;
}

.fritzbox-tabelle .fritzbox-gesperrt-zeile td {
    background: #fff5f4;
}

.fritzbox-spalte-status {
    width: 18px;
}

.fritzbox-punkt {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c3c9d3;
}

.fritzbox-punkt.fritzbox-punkt-an {
    background: #16a34a;
}

.fritzbox-name {
    width: 100%;
    min-width: 180px;
}

.fritzbox-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    white-space: nowrap;
}

.fritzbox-hinweise {
    font-size: 0.85rem;
}

.fritzbox-rueckmeldung {
    margin-left: 4px;
    color: #166534;
}

.fritzbox-rueckmeldung.fehler-text {
    color: #b42318;
}

.fritzbox-marke {
    display: inline-block;
    margin: 1px 4px 1px 0;
    padding: 0 6px;
    border-radius: 9px;
    font-size: 0.72rem;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: middle;
}

.fritzbox-marke-schutz {
    background: #dcfce7;
    color: #166534;
}

.fritzbox-marke-hier {
    background: #dbeafe;
    color: #1e40af;
}

.fritzbox-marke-gesperrt {
    background: #fee4e2;
    color: #b42318;
    cursor: help;
}

.fritzbox-marke-zufall {
    background: #fef3c7;
    color: #92400e;
    cursor: help;
}

/* Kalender, Wochenansicht: Geburtstage neben dem Datum (Profilbild bzw. Initialen, Name und Alter beim Mouseover) */
.kal-geburtstage {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 2px 6px;
    vertical-align: middle;
}

.avatar.kal-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
    text-decoration: none;
}

/* Visitenkarten-Lightbox (js/visitenkarte_lightbox.js): Telefon und E-Mail als dezente Links */
.visitenkarte-bild + .karte-text a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

/* Handyversion (handy.php): nur der KI-Chat, bildschirmfüllend */
body.handy {
    display: block;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body.handy .seite,
body.handy .inhalt {
    display: block;
    max-width: none;
    width: 100%;
}

body.handy .inhalt-box {
    min-height: 100dvh;
    margin: 0;
    padding: 12px;
    border: 0;
    border-radius: 0;
}

body.handy .chat {
    height: calc(100dvh - 90px);
    min-height: 0;
}

/* LG ThinQ (Systemeinstellungen): Ländercode-Feld */
.lg-land {
    width: 5em;
    text-transform: uppercase;
}

html[data-design="dunkel"] .server-dienst-status.lg-ruhe {
    color: #c3c9d3;
    background: #2a2f37;
}

/* Systemeinstellungen > KI-Aktionen: Liste mit Schiebereglern */
.ki-rechte-liste {
    display: grid;
    gap: 2px;
    margin: 8px 0 14px;
}

.ki-recht {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e3e7ee;
    cursor: pointer;
}

.ki-recht-text {
    display: grid;
    gap: 2px;
}

.ki-recht-name {
    font-weight: 600;
}

.ki-recht .feld-hinweis {
    margin: 0;
}

/* Schieberegler (Checkbox als Schalter) */
.schieberegler {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
}

.schieberegler input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.schieberegler-bahn {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    background: #c3c9d3;
    transition: background 0.15s ease;
}

.schieberegler-bahn::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
}

.schieberegler input:checked + .schieberegler-bahn {
    background: #16a34a;
}

.schieberegler input:checked + .schieberegler-bahn::after {
    transform: translateX(20px);
}

.schieberegler input:focus-visible + .schieberegler-bahn {
    outline: 2px solid #2b6cb0;
    outline-offset: 2px;
}

html[data-design="dunkel"] .ki-recht {
    border-bottom-color: #2a2f37;
}

html[data-design="dunkel"] .schieberegler-bahn {
    background: #4b5563;
}

/* ---------------------------------------------------------------------------
   Vorstellungsrunde (vorstellung.php, öffentlich): Karteikarten als Notizzettel
   --------------------------------------------------------------------------- */
/* Handschrift für Namen und Antworten: Caveat (SIL Open Font License, style/fonts/caveat-OFL.txt), liegt auf dem
   eigenen Server, damit beim Aufruf nichts von fremden Servern nachgeladen wird */
@font-face {
    font-family: "Caveat";
    src: url("fonts/caveat.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

body.vorstellung-seite {
    display: block;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #eef1f5;
    background-image: radial-gradient(#d6dce5 1px, transparent 1px);
    background-size: 22px 22px;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #1f2933;
}

.vorstellung-kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    padding: 20px 28px 8px;
}

.vorstellung-kopf h1 {
    margin: 0;
    font-size: 1.6rem;
}

.vorstellung-training {
    margin: 2px 0 0;
    color: #52606d;
}

/* Moderation: Knöpfe oben rechts */
.vorstellung-kopf-rechts {
    display: grid;
    justify-items: end;
    gap: 6px;
    max-width: 640px;
    text-align: right;
}

.vorstellung-moderation-knoepfe {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.vorstellung-moderation-knoepfe button {
    width: auto;
    margin: 0;
    padding: 8px 14px;
    font-size: 0.9rem;
}

.vorstellung-moderation-meldung {
    margin: 0;
    font-size: 0.85rem;
    color: #3d6aad;
}

.vorstellung-moderation-meldung:empty {
    display: none;
}

.vorstellung-anleitung {
    margin: 0;
    color: #52606d;
    font-size: 0.95rem;
}

.vorstellung-tafel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 26px;
    padding: 18px 28px 40px;
    align-items: start;
}

.vorstellung-karte {
    position: relative;
    min-height: 190px;
    padding: 16px 16px 14px;
    border-radius: 3px;
    box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
    /* Silbentrennung nach der Seitensprache; nur sehr lange Wörter ohne Trennstelle werden hart umbrochen */
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

.vorstellung-karte:hover {
    transform: rotate(0deg) scale(1.03);
    z-index: 1;
}

.vorstellung-name {
    margin: 0 0 8px;
    padding-bottom: 6px;
    font-size: 1.2rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
}

.vorstellung-frage {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.6;
}

.vorstellung-text + .vorstellung-frage,
.vorstellung-text-feld + .vorstellung-frage {
    margin-top: 10px;
}

.vorstellung-text {
    hyphenate-limit-chars: 8 3 3;
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    white-space: pre-line;
}

/* Handschrift auf dem Zettel: Namen und Antworten */
.vorstellung-karte .vorstellung-name,
.vorstellung-karte .vorstellung-name-feld {
    font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
}

.vorstellung-karte .vorstellung-text,
.vorstellung-karte .vorstellung-text-feld {
    font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Moderation: hervorgehobene Karte (Pfeiltasten) – groß in der Bildmitte, gerade, vor den anderen; die übrigen treten zurück */
.vorstellung-karte.vorstellung-fokus,
.vorstellung-karte.vorstellung-fokus:hover {
    z-index: 10;
    /* Mitte des sichtbaren Bereichs, ca. 75 % der Bildschirmfläche (Werte setzt js/vorstellung.js) */
    transform-origin: center;
    transform: translate(var(--fokus-x, 0), var(--fokus-y, 0)) rotate(0deg) scale(var(--fokus-skala, 1.6));
    box-shadow: 0 30px 50px -18px rgba(0, 0, 0, 0.45), 0 6px 14px rgba(0, 0, 0, 0.15);
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.35s ease, opacity 0.35s ease;
}

.vorstellung-karte {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.vorstellung-karte.vorstellung-ohne-uebergang {
    transition: none;
}

.vorstellung-moderation .vorstellung-karte:not(.vorstellung-fokus):not(.vorstellung-plus) {
    opacity: 0.55;
}

/* Farben der Zettel */
.vorstellung-farbe-0 { background: #fff3a3; }
.vorstellung-farbe-1 { background: #ffd1dc; }
.vorstellung-farbe-2 { background: #c9f2c7; }
.vorstellung-farbe-3 { background: #c7e3ff; }
.vorstellung-farbe-4 { background: #ffd8a8; }
.vorstellung-farbe-5 { background: #e3d1ff; }
.vorstellung-farbe-6 { background: #c8f1ea; }

/* leichte Neigung */
.vorstellung-dreh-0 { transform: rotate(-2.5deg); }
.vorstellung-dreh-1 { transform: rotate(-1.5deg); }
.vorstellung-dreh-2 { transform: rotate(-0.5deg); }
.vorstellung-dreh-3 { transform: rotate(0.5deg); }
.vorstellung-dreh-4 { transform: rotate(1.5deg); }
.vorstellung-dreh-5 { transform: rotate(2.5deg); }
.vorstellung-dreh-6 { transform: rotate(1deg); }

/* Plus-Feld: neue Karte */
.vorstellung-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    background: rgba(255, 255, 255, 0.55);
    border: 3px dashed #9aa5b1;
    box-shadow: none;
    color: #7b8794;
    font-size: 4rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.vorstellung-plus:hover,
.vorstellung-plus:focus-visible {
    background: rgba(255, 255, 255, 0.85);
    color: #3d6aad;
    border-color: #3d6aad;
}

.vorstellung-plus[hidden] {
    display: none;
}

/* Karte, die gerade ausgefüllt wird: Felder sehen aus wie die Schrift auf dem Zettel */
.vorstellung-entwurf {
    transform: rotate(0deg) scale(1.03);
    z-index: 2;
    box-shadow: 0 16px 28px -10px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(61, 106, 173, 0.35);
}

.vorstellung-karte .vorstellung-name-feld,
.vorstellung-karte .vorstellung-text-feld {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 2px 0;
    font: inherit;
    color: #1f2933;
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: none;
    resize: none;
}

.vorstellung-karte .vorstellung-name-feld {
    margin-bottom: 8px;
    padding-bottom: 6px;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
}

.vorstellung-karte .vorstellung-text-feld {
    hyphens: auto;
    -webkit-hyphens: auto;
    min-height: 60px;
    font-size: 1rem;
    line-height: 1.4;
}

.vorstellung-name-feld::placeholder,
.vorstellung-text-feld::placeholder {
    color: rgba(31, 41, 51, 0.45);
    font-weight: 400;
}

.vorstellung-karte .vorstellung-name-feld:focus,
.vorstellung-karte .vorstellung-text-feld:focus {
    background: rgba(255, 255, 255, 0.35);
}

.vorstellung-meldung {
    margin: 0;
    color: #b42318;
    font-size: 0.85rem;
}

.vorstellung-meldung:empty {
    display: none;
}

.vorstellung-knoepfe {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.vorstellung-mini {
    width: auto;
    margin: 0;
    padding: 3px 8px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.6);
    color: #1f2933;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    cursor: pointer;
}

.vorstellung-mini:hover {
    background: rgba(255, 255, 255, 0.9);
}

.vorstellung-eigene {
    cursor: pointer;
    outline: 2px solid rgba(31, 41, 51, 0.25);
    outline-offset: 3px;
}

.vorstellung-loeschen {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0 7px;
    font-size: 1rem;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.vorstellung-eigene:hover .vorstellung-loeschen,
.vorstellung-eigene:focus-within .vorstellung-loeschen {
    opacity: 1;
}

@media (hover: none) {
    .vorstellung-loeschen {
        opacity: 1;
    }
}

.vorstellung-fertig {
    font-weight: 700;
}

/* Stimmungs-Aufkleber: pappt wie ein Kühlschrankmagnet auf der oberen linken Ecke des Zettels */
.vorstellung-aufkleber {
    position: absolute;
    top: -18px;
    left: -18px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    font-size: 1.9rem;
    line-height: 1;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f3f6 70%, #dde2e8 100%);
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 -2px 3px rgba(0, 0, 0, 0.08);
    transform: rotate(-12deg);
}

/* Platz für den Magneten, damit er den Namen nicht verdeckt */
.vorstellung-mit-aufkleber .vorstellung-name,
.vorstellung-mit-aufkleber .vorstellung-name-feld {
    padding-left: 30px;
}

button.vorstellung-aufkleber-waehlen {
    margin: 0;
    padding: 0;
    color: #1f2933;
    border: 0;
    cursor: pointer;
}

button.vorstellung-aufkleber-waehlen:hover {
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f3f6 70%, #dde2e8 100%);
    transform: rotate(0deg) scale(1.1);
}

button.vorstellung-aufkleber-leer,
button.vorstellung-aufkleber-leer:hover {
    font-size: 1.5rem;
    color: #7b8794;
    background: rgba(255, 255, 255, 0.75);
    border: 2px dashed rgba(0, 0, 0, 0.3);
    box-shadow: none;
}

.vorstellung-stimmungen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 10px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.vorstellung-stimmungen[hidden] {
    display: none;
}

button.vorstellung-stimmung {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 4px 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: left;
    color: #1f2933;
    background: transparent;
    border-radius: 6px;
}

button.vorstellung-stimmung:hover,
button.vorstellung-stimmung:focus-visible {
    background: #eef2f7;
}

.vorstellung-stimmung-text {
    overflow-wrap: normal;
    hyphens: auto;
}

.vorstellung-stimmung-emoji {
    font-size: 1.3rem;
    line-height: 1;
}

.vorstellung-stimmung-keine {
    grid-column: 1 / -1;
    justify-content: center;
    color: #7b8794;
}

/* Karte, die gerade jemand ausfüllt */
.vorstellung-schreibt {
    margin: 10px 0 0;
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.65;
    animation: vorstellung-schreibt 1.4s ease-in-out infinite;
}

@keyframes vorstellung-schreibt {
    50% {
        opacity: 0.3;
    }
}

.vorstellung-name.vorstellung-leer {
    font-weight: 400;
    font-style: italic;
    opacity: 0.5;
}

.vorstellung-fehlt {
    max-width: 480px;
    margin: 15vh auto;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
}

/* Trainingsseite: Fragen für die Zettel der Vorstellungsrunde */
.vorstellung-fragen-form {
    display: grid;
    gap: 6px;
    max-width: 640px;
    margin: 10px 0 14px;
}

.vorstellung-fragen-form .feld-label {
    margin: 0;
}

.vorstellung-fragen-form .feld-hinweis {
    margin: 0;
}

.vorstellung-fragen-form button {
    width: auto;
    justify-self: start;
    margin-top: 4px;
}

/* Trainingsseite: Link zur Vorstellungsrunde */
.vorstellung-link {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0 6px;
}

.vorstellung-link input {
    flex: 1 1 320px;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------------------
   Quiz: Verwaltung (quiz.php)
   --------------------------------------------------------------------------- */
.quiz-frage-karte {
    margin: 0 0 18px;
    padding: 14px 16px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.quiz-frage-karte.quiz-frage-neu {
    background: #fff;
    border-style: dashed;
}

.quiz-frage-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.quiz-frage-kopf label.quiz-frage-nr {
    margin: 0;
}

.quiz-frage-reihenfolge {
    display: inline-flex;
    gap: 4px;
}

.quiz-frage-karte button.quiz-pfeil {
    width: auto;
    margin: 0;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.quiz-frage-karte button.quiz-pfeil:disabled {
    opacity: 0.35;
    cursor: default;
}

.quiz-frage-karte textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
}

.quiz-antworten-tabelle {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

.quiz-antworten-tabelle th {
    padding: 2px 6px 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #52606d;
    text-align: left;
}

.quiz-antworten-tabelle td {
    padding: 3px 6px;
    vertical-align: middle;
}

.quiz-antworten-tabelle .quiz-richtig-spalte {
    width: 64px;
    text-align: center;
}

.quiz-antworten-tabelle .quiz-richtig-spalte input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #2f855a;
    cursor: pointer;
}

.quiz-antworten-tabelle .quiz-buchstabe-spalte {
    width: 24px;
    font-weight: 700;
    color: #52606d;
}

.quiz-antworten-tabelle input[type="text"] {
    padding: 7px 10px;
}

.quiz-frage-knoepfe {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quiz-frage-knoepfe button {
    width: auto;
    margin: 0;
    padding: 8px 16px;
}

.quiz-frage-knoepfe button.quiz-loeschen {
    background: none;
    border: 1px solid #c53030;
    color: #c53030;
}

.quiz-frage-knoepfe button.quiz-loeschen:hover {
    background: #fde8e8;
}

/* ---------------------------------------------------------------------------
   Quiz live (quizrunde.php) – Grundgerüst wie die Vorstellungsrunde (body.vorstellung-seite)
   --------------------------------------------------------------------------- */
.quiz-seite .vorstellung-moderation-knoepfe select.quiz-auswahl-live {
    max-width: 320px;
    padding: 7px 10px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

.quiz-seite .vorstellung-moderation-knoepfe button.quiz-knopf-zweit {
    color: #2b6cb0;
    background: #fff;
    border: 1px solid #2b6cb0;
}

.quiz-seite .vorstellung-moderation-knoepfe button.quiz-knopf-zweit:hover {
    background: #ebf4ff;
}

.quiz-buehne {
    padding: 12px 28px 48px;
}

.quiz-karte {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 32px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.06);
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

.quiz-karte-mitte {
    text-align: center;
}

.quiz-symbol {
    margin: 0;
    font-size: 3rem;
}

.quiz-fortschritt {
    margin: 0 0 6px;
    font-size: 0.9rem;
    color: #52606d;
}

.quiz-frage-text {
    margin: 0 0 6px;
    font-size: clamp(1.3rem, 2.6vw, 2rem);
    line-height: 1.25;
    white-space: pre-line;
}

.quiz-art {
    margin: 0 0 18px;
    font-size: 0.9rem;
    color: #3d6aad;
}

.quiz-hinweis {
    margin: 14px 0 0;
    color: #52606d;
}

.quiz-countdown {
    font-weight: 600;
    color: #2f855a;
}

.quiz-antworten {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.quiz-seite button.quiz-antwort {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 14px 16px;
    overflow: hidden;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: left;
    color: #1f2933;
    background: #f1f5f9;
    border: 2px solid #d5dde7;
    border-radius: 10px;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.quiz-seite button.quiz-antwort:hover:not(:disabled) {
    background: #e6eef8;
    border-color: #9db7d8;
}

.quiz-seite button.quiz-antwort:active:not(:disabled) {
    transform: scale(0.99);
}

.quiz-seite button.quiz-antwort:disabled {
    opacity: 1;
    cursor: default;
}

/* Balken der Verteilung hinter dem Text */
.quiz-seite button.quiz-antwort.quiz-mit-balken::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--anteil, 0%);
    background: rgba(43, 108, 176, 0.12);
    transition: width 0.4s ease;
}

.quiz-buchstabe {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-weight: 700;
    color: #2b6cb0;
    background: #fff;
    border: 2px solid #2b6cb0;
    border-radius: 50%;
}

.quiz-antwort-text {
    position: relative;
    flex: 1 1 auto;
}

.quiz-zahl {
    position: relative;
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: #52606d;
    white-space: nowrap;
}

.quiz-haken {
    position: relative;
    flex: 0 0 auto;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2f855a;
}

.quiz-seite button.quiz-antwort.quiz-gewaehlt {
    background: #ebf4ff;
    border-color: #2b6cb0;
}

.quiz-seite button.quiz-antwort.quiz-gewaehlt .quiz-buchstabe {
    color: #fff;
    background: #2b6cb0;
}

/* Auflösung: richtige Antworten grün, falsch gewählte rot */
.quiz-seite .quiz-aufgeloest button.quiz-antwort.quiz-richtig {
    background: #f0fff4;
    border-color: #2f855a;
}

.quiz-seite .quiz-aufgeloest button.quiz-antwort.quiz-richtig::before {
    background: rgba(47, 133, 90, 0.16);
}

.quiz-seite .quiz-aufgeloest button.quiz-antwort.quiz-richtig .quiz-buchstabe {
    color: #fff;
    background: #2f855a;
    border-color: #2f855a;
}

.quiz-seite .quiz-aufgeloest button.quiz-antwort.quiz-falsch {
    opacity: 0.75;
}

.quiz-seite .quiz-aufgeloest button.quiz-antwort.quiz-falsch.quiz-gewaehlt {
    opacity: 1;
    background: #fff5f5;
    border-color: #c53030;
}

.quiz-seite .quiz-aufgeloest button.quiz-antwort.quiz-falsch.quiz-gewaehlt .quiz-buchstabe {
    color: #fff;
    background: #c53030;
    border-color: #c53030;
}

/* Ergebnis für die einzelne Person */
.quiz-ergebnis {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 10px;
    animation: quiz-einblenden 0.35s ease;
}

.quiz-ergebnis-richtig {
    background: #f0fff4;
    border: 2px solid #2f855a;
}

.quiz-ergebnis-falsch {
    background: #fff5f5;
    border: 2px solid #c53030;
}

.quiz-ergebnis-keine {
    background: #f8fafc;
    border: 2px solid #a0aec0;
}

.quiz-ergebnis-titel {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.quiz-ergebnis-text {
    margin: 4px 0 0;
}

/* Abschluss */
.quiz-ende-mein {
    margin: 14px 0 0;
    font-size: clamp(1.2rem, 2.4vw, 1.7rem);
    font-weight: 600;
}

.quiz-ende-prozent {
    margin: 4px 0 0;
    font-size: 3rem;
    font-weight: 700;
    color: #2b6cb0;
}

.quiz-auswertung {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.quiz-bereich {
    display: grid;
    gap: 2px;
    padding: 16px 12px;
    border-radius: 10px;
    border: 2px solid;
}

.quiz-bereich-zahl {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.quiz-bereich-text {
    font-size: 0.95rem;
}

.quiz-bereich-voll {
    background: #f0fff4;
    border-color: #2f855a;
    color: #22543d;
}

.quiz-bereich-dreiviertel {
    background: #f0f9ff;
    border-color: #3182ce;
    color: #2a4365;
}

.quiz-bereich-haelfte {
    background: #fffaf0;
    border-color: #dd6b20;
    color: #7b341e;
}

.quiz-bereich-weniger {
    background: #fff5f5;
    border-color: #c53030;
    color: #742a2a;
}

@keyframes quiz-einblenden {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
    .quiz-buehne {
        padding: 8px 10px 32px;
    }

    .quiz-karte {
        padding: 20px 16px 18px;
    }
}

/* Auflösung für Teilnehmende: nicht gewählte richtige Antworten gestrichelt, damit die eigene Wahl erkennbar bleibt */
.quiz-seite .quiz-persoenlich.quiz-aufgeloest button.quiz-antwort.quiz-richtig:not(.quiz-gewaehlt) {
    border-style: dashed;
    background: #fff;
}

.quiz-seite .quiz-persoenlich.quiz-aufgeloest button.quiz-antwort.quiz-richtig:not(.quiz-gewaehlt) .quiz-buchstabe {
    color: #2f855a;
    background: #fff;
}

/* ---------------------------------------------------------------------------
   Prozess-Puzzle: Verwaltung (puzzle.php)
   --------------------------------------------------------------------------- */
/* rechte Spalte darf schmaler werden als ihr Inhalt (sonst hängt die Seite rechts über) */
.leitfaden-raster.puzzle-raster {
    grid-template-columns: minmax(180px, 1fr) minmax(0, 4fr);
}

/* bei normaler Fensterbreite: Liste der Puzzles über den Schritten, damit die Tabelle die volle Breite hat */
@media (max-width: 1600px) {
    .leitfaden-raster.puzzle-raster {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .puzzle-raster .leitfaden-arten {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 8px 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e2e8f0;
    }

    .puzzle-raster .leitfaden-arten h3 {
        flex: 0 0 100%;
        margin: 0;
    }

    .puzzle-raster .leitfaden-artenliste {
        flex: 1 1 320px;
        margin: 0;
    }

    .puzzle-raster .leitfaden-art-neu {
        display: flex;
        flex-direction: row;
        flex: 1 1 360px;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .puzzle-raster .leitfaden-art-neu label {
        margin: 0;
        white-space: nowrap;
    }

    .puzzle-raster .leitfaden-art-neu input,
    .puzzle-raster .leitfaden-art-neu button {
        margin: 0;
    }

    .puzzle-raster .leitfaden-art-neu input {
        flex: 1 1 auto;
        min-width: 0;
        padding: 8px 10px;
    }

    .puzzle-raster .leitfaden-art-neu button {
        align-self: center;
        width: auto;
        padding: 9px 14px;
        white-space: nowrap;
    }
}

.puzzle-haupt-felder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 4px 12px;
}

.puzzle-haupt-felder label {
    font-size: 0.82rem;
}

.puzzle-haupt-felder label {
    margin: 4px 0 0;
}

.puzzle-haupt-felder input[type="text"] {
    margin-top: 3px;
    padding: 6px 8px;
    font-size: 0.9rem;
    font-weight: 400;
}

.puzzle-mit-fest {
    display: flex;
    align-items: center;
    gap: 4px;
}

.puzzle-mit-fest input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
}

label.puzzle-fest {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0;
    margin: 0;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0.85;
}

label.puzzle-fest input {
    margin: 0;
}

.puzzle-unter-tabelle {
    width: 100%;
    min-width: 640px;
    margin-top: 10px;
    border-collapse: collapse;
    table-layout: fixed;
}

.puzzle-unter-tabelle th:nth-child(1) { width: 46px; }
.puzzle-unter-tabelle th:nth-child(2) { width: 19%; }
.puzzle-unter-tabelle th:nth-child(3) { width: 27%; }
.puzzle-unter-tabelle th:nth-child(4) { width: 52px; }
.puzzle-unter-tabelle th:nth-child(6) { width: 19%; }

.puzzle-unter-tabelle th {
    padding: 2px 3px 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #52606d;
    text-align: left;
}

.puzzle-unter-tabelle td {
    padding: 2px 3px;
    vertical-align: middle;
}

.puzzle-unter-tabelle input[type="text"] {
    padding: 4px 6px;
    font-size: 0.85rem;
}

.puzzle-unter-tabelle .puzzle-mitte {
    text-align: center;
}

.puzzle-zeile-pfeile {
    white-space: nowrap;
}

.puzzle-unter-tabelle button.puzzle-zeile-hoch,
.puzzle-unter-tabelle button.puzzle-zeile-runter {
    width: auto;
    margin: 0;
    padding: 1px 4px;
    font-size: 0.65rem;
    color: #52606d;
    background: #edf2f7;
}

.puzzle-unter-tabelle button.puzzle-zeile-hoch:hover,
.puzzle-unter-tabelle button.puzzle-zeile-runter:hover {
    background: #e2e8f0;
}

/* Zuordnung auf der Trainingsseite */
.puzzle-zuordnung-liste {
    margin: 8px 0 10px;
    padding: 0;
    list-style: none;
}

.puzzle-zuordnung-liste li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid #edf2f7;
}

.puzzle-zuordnung-liste label.puzzle-zuordnung-name {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 500;
}

.puzzle-zuordnung-pfeile {
    display: inline-flex;
    gap: 4px;
}

.puzzle-zuordnung-pfeile button {
    width: auto;
    margin: 0;
    padding: 3px 8px;
    font-size: 0.75rem;
}

/* ---------------------------------------------------------------------------
   Prozess-Puzzle live (puzzlerunde.php)
   --------------------------------------------------------------------------- */
.puzzle-hinweis {
    margin: 0 28px 8px;
    color: #52606d;
}

.puzzle-hinweis:empty {
    display: none;
}

.puzzle-hinweis.puzzle-hinweis-ergebnis {
    display: inline-block;
    padding: 8px 14px;
    font-weight: 600;
    color: #1f2933;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.puzzle-buehne {
    padding: 0 28px 40px;
}

.puzzle-flaeche {
    position: relative;
    overflow: hidden;
}

.puzzle-feld {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.puzzle-spielfeld {
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.25);
}

.puzzle-ablage {
    position: absolute;
    background: #f4f6f9;
    border: 2px dashed #c3ccd6;
    border-radius: 10px;
}

.puzzle-ablage-titel {
    position: absolute;
    top: 6px;
    left: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #52606d;
}

.puzzle-fussnoten {
    position: absolute;
    left: 30px;
    right: 30px;
    font-size: 14px;
    color: #3e4c59;
}

.puzzle-fussnoten p {
    margin: 0 0 4px;
}

/* Zielfelder */
.puzzle-slot {
    position: absolute;
    box-sizing: border-box;
}

.puzzle-slot-schritt {
    border: 2px dashed #cbd2d9;
    border-radius: 4px;
    background: #f8fafc;
}

/* Zielfeld einer Rolle: gestrichelte Person statt Rechteck */
.puzzle-slot-rolle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.puzzle-slot .puzzle-slot-figur circle,
.puzzle-slot .puzzle-slot-figur path {
    fill: #f8fafc;
    stroke: #b8c2cc;
    stroke-width: 1.4;
    stroke-dasharray: 3 2.5;
}

.puzzle-slot.puzzle-slot-ziel .puzzle-slot-figur circle,
.puzzle-slot.puzzle-slot-ziel .puzzle-slot-figur path {
    fill: #ebf4ff;
    stroke: #2b6cb0;
}

.puzzle-slot-umriss {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.puzzle-slot-umriss polygon {
    fill: #f8fafc;
    stroke: #cbd2d9;
    stroke-width: 2;
    stroke-dasharray: 8 6;
}

.puzzle-slot-ziel.puzzle-slot-schritt {
    border-color: #2b6cb0;
    background: #ebf4ff;
}

.puzzle-slot-ziel .puzzle-slot-umriss polygon {
    fill: #ebf4ff;
    stroke: #2b6cb0;
}

/* Teile */
.puzzle-teil {
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    transition: transform 0.35s ease, box-shadow 0.15s ease, opacity 0.2s ease;
    /* keine Silbentrennung: Umbruch nur zwischen Wörtern, ein zu langes Wort wird notfalls hart umbrochen */
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: break-word;
}

.puzzle-aktiv .puzzle-teil:not(.puzzle-fest-teil) {
    cursor: grab;
}

.puzzle-teil.puzzle-zieht {
    cursor: grabbing;
    transition: none;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.3));
}

.puzzle-teil.puzzle-ohne-uebergang {
    transition: none;
}

.puzzle-teil.puzzle-gesperrt {
    opacity: 0.7;
    cursor: not-allowed;
}

.puzzle-pfeil {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 370px;
    height: 100px;
    padding: 6px 66px 6px 62px;
    color: #fff;
    background: #2c4a6e;
    clip-path: polygon(0 0, calc(100% - 50px) 0, 100% 50%, calc(100% - 50px) 100%, 0 100%, 50px 50%);
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.25));
}

.puzzle-pfeil .puzzle-teil-text {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.15;
}

.puzzle-anwendungen {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.puzzle-anwendung {
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2933;
    background: #fff;
    border-radius: 2px;
}

.puzzle-schritt {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 230px;
    height: 70px;
    padding: 6px 10px;
    text-align: center;
    background: #fff;
    border: 1px solid #d5dde7;
    box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.18);
}

.puzzle-schritt .puzzle-teil-text {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: #1f2933;
}

.puzzle-schritt.puzzle-optional .puzzle-teil-text {
    color: #9aa5b1;
}

.puzzle-rolle {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    width: 70px;
    height: 70px;
}

/* Bezeichnung links neben der Figur, um 90° gedreht (von unten nach oben zu lesen) */
.puzzle-rolle-name {
    flex: 0 1 auto;
    max-height: 70px;
    overflow: hidden;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    color: #1f2933;
    hyphens: none;
}

.puzzle-figur {
    flex: 0 0 auto;
    width: 46px;
    height: 70px;
}

.puzzle-figur circle,
.puzzle-figur path {
    fill: #6b7785;
    stroke: #3e4c59;
    stroke-width: 1.2;
}

.puzzle-fest-teil.puzzle-schritt {
    border-style: solid;
    border-color: #9aa5b1;
}

/* Bewertung nach dem Beenden */
.puzzle-bewertet .puzzle-teil.puzzle-richtig.puzzle-schritt {
    border: 3px solid #2f855a;
}

.puzzle-bewertet .puzzle-teil.puzzle-falsch.puzzle-schritt {
    border: 3px solid #c53030;
}

.puzzle-bewertet .puzzle-teil.puzzle-richtig.puzzle-pfeil {
    background: #2f855a;
}

.puzzle-bewertet .puzzle-teil.puzzle-falsch.puzzle-pfeil {
    background: #c53030;
}

.puzzle-bewertet .puzzle-teil.puzzle-richtig.puzzle-rolle .puzzle-figur path,
.puzzle-bewertet .puzzle-teil.puzzle-richtig.puzzle-rolle .puzzle-figur circle {
    fill: #2f855a;
}

.puzzle-bewertet .puzzle-teil.puzzle-falsch.puzzle-rolle .puzzle-figur path,
.puzzle-bewertet .puzzle-teil.puzzle-falsch.puzzle-rolle .puzzle-figur circle {
    fill: #c53030;
}

@media (max-width: 600px) {
    .puzzle-buehne {
        padding: 0 8px 24px;
    }

    .puzzle-hinweis {
        margin: 0 10px 8px;
    }
}

/* Logo des Unternehmens oben rechts (Training mit Unternehmen) */
.puzzle-seite .vorstellung-kopf {
    align-items: flex-start;
}

.puzzle-seite .vorstellung-kopf > div:first-child {
    margin-right: auto;
}

.puzzle-logo {
    flex: 0 0 auto;
    max-width: 180px;
    max-height: 64px;
    object-fit: contain;
}

/* ---------------------------------------------------------------------------
   Schalter-Verwaltung (schalter.php)
   --------------------------------------------------------------------------- */
.schalter-formular {
    margin-bottom: 24px;
    padding: 4px 18px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.schalter-formular [hidden] {
    display: none;
}

label.schalter-haken {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0;
    font-weight: 400;
}

.schalter-knoepfe {
    display: flex;
    align-items: center;
    gap: 12px;
}

.schalter-knoepfe button {
    width: auto;
    margin: 0;
}

.schalter-loeschen button.quiz-loeschen {
    width: auto;
    margin: 0;
    padding: 8px 16px;
    background: none;
    border: 1px solid #c53030;
    color: #c53030;
}

.schalter-loeschen button.quiz-loeschen:hover {
    background: #fde8e8;
}

.schalter-tabelle tr.schalter-inaktiv td {
    color: #9aa5b1;
}

.schalter-tabelle td.schalter-doppelt {
    font-weight: 700;
    color: #c05621;
}

.schalter-tabelle td.schalter-ziel {
    max-width: 360px;
    overflow-wrap: anywhere;
    font-size: 0.88rem;
}

.schalter-zustand {
    display: inline-block;
    min-width: 34px;
    padding: 1px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: #52606d;
    background: #edf2f7;
    border-radius: 10px;
}

.schalter-zustand.schalter-an {
    color: #22543d;
    background: #c6f6d5;
}

.schalter-aktionen {
    white-space: nowrap;
}

.schalter-aktionen button.schalter-testen {
    width: auto;
    margin: 0 8px 0 0;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.schalter-aktionen .knopf-link {
    padding: 4px 10px;
    font-size: 0.85rem;
}

/* „Abbrechen“ im Schalter-Formular als zweiter Knopf (weiß mit blauem Rand; .kontakt-daten a färbt Links sonst blau) */
.schalter-knoepfe a.knopf-link {
    color: #2b6cb0;
    background: #fff;
    border: 1px solid #2b6cb0;
}

.schalter-knoepfe a.knopf-link:hover {
    background: #ebf4ff;
}

/* Alexa: Rohausgabe der Smart-Home-Prüfung */
.alexa-roh {
    margin-top: 12px;
}

.alexa-roh summary {
    cursor: pointer;
    font-weight: 600;
}

.alexa-roh-titel {
    margin: 10px 0 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.alexa-roh pre {
    max-height: 260px;
    margin: 0;
    padding: 8px 10px;
    overflow: auto;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-all;
    background: #f4f6f8;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.alexa-roh-klick {
    font-weight: 400;
    font-size: 0.85rem;
    color: #2b6cb0;
}

/* Mitmach-Server: Ergebnis von „Verbindung testen“ (Systemeinstellungen) */
.mitmach-test {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}
.mitmach-test li {
    margin: 0.25rem 0;
}
