/* Gopalast HR-Tool – Design */
:root {
    /* Markenrot (unverändert) */
    --rot: #c0392b;
    --rot-dunkel: #a93226;
    /* Akzent kommt aus der Palette (Standard: Klassisch/Gold) */
    --accent: #b8860b; --accent-hell: #d4a017; --accent-soft: #f5ecd2; --accent-on: #fff;
    /* Bestehende --gold-Nutzung folgt jetzt dem gewählten Akzent */
    --gold: var(--accent);
    --gold-hell: var(--accent-hell);
    /* Neutrale Flächen (Hell) – wie bisher */
    --dunkel: #2c2c2c; --grau: #6b6b6b;
    --hintergrund: #f5f1e8; --karte: #ffffff; --karte-2: #faf7ef;
    --rand: #e7e0cf; --btn-neutral: #6b6b6b;
    --schatten: 0 2px 10px rgba(0, 0, 0, 0.08);
}
/* ---- Paletten: nur der Akzent ändert sich ---- */
[data-palette="gold"]    { --accent:#b8860b; --accent-hell:#d4a017; --accent-soft:#f5ecd2; }
[data-palette="azur"]    { --accent:#2563eb; --accent-hell:#3b82f6; --accent-soft:#e7eefb; }
[data-palette="indigo"]  { --accent:#5b53e0; --accent-hell:#6f67e8; --accent-soft:#ecebfb; }
[data-palette="graphit"] { --accent:#3f4a5c; --accent-hell:#4b5563; --accent-soft:#eef0f3; }
/* ---- Dark-Mode: Flächen dunkel, Akzente etwas heller ---- */
[data-theme="dark"] {
    --dunkel:#ecebf3; --grau:#a3a1b4;
    --hintergrund:#141320; --karte:#1f1d2b; --karte-2:#2a2838;
    --rand:#322f42; --btn-neutral:#3b3850;
    --schatten: 0 4px 16px rgba(0,0,0,.45);
}
[data-theme="dark"][data-palette="gold"]    { --accent:#d4a017; --accent-hell:#e0b020; --accent-soft:#352b12; }
[data-theme="dark"][data-palette="azur"]    { --accent:#5b8def; --accent-hell:#3b82f6; --accent-soft:#1b2740; }
[data-theme="dark"][data-palette="indigo"]  { --accent:#8b84f0; --accent-hell:#6f67e8; --accent-soft:#272340; }
[data-theme="dark"][data-palette="graphit"] { --accent:#64748b; --accent-hell:#7689a0; --accent-soft:#242a36; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: var(--hintergrund);
    color: var(--dunkel);
    line-height: 1.5;
}

header {
    background: var(--karte);
    color: var(--dunkel);
    padding: 26px 20px 20px;
    text-align: center;
    border-bottom: 3px solid var(--gold);
}
header .logo {
    max-width: 320px;
    width: 70%;
    height: auto;
}
.untertitel {
    color: var(--grau);
    margin-top: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* ----- Navigation (Menüleiste unter dem Logo) ----- */
.hauptnav {
    background: var(--karte);
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-bottom: 1px solid var(--rand);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 500;
}
.nav-btn {
    border: none;
    background: transparent;
    color: var(--grau);
    font-size: 0.98rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-bottom: 3px solid transparent;
}
.nav-btn:hover { background: var(--hintergrund); color: var(--dunkel); }
.nav-btn.aktiv {
    color: var(--gold);
    background: var(--karte-2);
    border-bottom-color: var(--gold);
}

main {
    max-width: 760px;
    margin: 30px auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Jeder Bereich verhält sich wie der bisherige Inhaltsstrom (Karten mit Abstand). */
.view {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.karte {
    background: var(--karte);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.karte h2 { margin-bottom: 6px; font-size: 1.3rem; }
.hinweis { color: var(--grau); font-size: 0.9rem; margin-bottom: 16px; }

form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; font-weight: 600; font-size: 0.9rem; gap: 5px; }

/* Zwei Eingabefelder nebeneinander (z.B. Vorname/Nachname, PLZ/Ort). */
.feld-paar { display: flex; gap: 12px; }
.feld-paar label { flex: 1; min-width: 0; }
@media (max-width: 480px) { .feld-paar { flex-direction: column; } }
input, select {
    padding: 10px 12px;
    border: 1px solid var(--rand);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 400;
}
input:focus, select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.btn {
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.05s, filter 0.15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold); }
.btn-rot { background: var(--rot); margin-top: 14px; }
.btn-blau { background: #2e6da4; }
.btn-grau { background: var(--btn-neutral); }
.btn-gruen { background: #1e7e34; }

/* "Karte erhalten – Anmeldung abschließen" oben im KV-Popup */
.kv-abschluss { width: 100%; margin-bottom: 14px; font-size: 1.02rem; }

/* Aktions-Box nach dem Erstellen eines Vertrags */
.aktion-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--rand);
}
.aktion-box .hinweis { margin-bottom: 10px; word-break: break-all; }
.aktion-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; }

/* Kleine Buttons in der Mitarbeiter-Tabelle */
.btn-mini {
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    margin: 2px 4px 2px 0;
    transition: filter 0.15s;
}
.btn-mini:hover { filter: brightness(1.1); }
/* Kompakter Icon-Button (nur Symbol, z. B. "↑" zum Hochladen) */
.btn-mini-icon {
    padding: 6px 9px;
    font-size: 1rem;
    line-height: 1;
    font-weight: 700;
}
.vertrag-zelle { white-space: nowrap; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rand); font-size: 0.92rem; }
th { color: var(--grau); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }

.status-aktiv { color: #27ae60; font-weight: 600; }
.status-gekuendigt { color: var(--rot); font-weight: 600; }
.status-archiviert { color: var(--grau); font-weight: 600; }

.nachricht {
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 600;
}
.nachricht.erfolg { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.nachricht.fehler { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.versteckt { display: none !important; }

footer {
    text-align: center;
    color: var(--grau);
    font-size: 0.8rem;
    padding: 24px 16px;
}

/* ----- Popup "Dokument versenden?" ----- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}
.modal {
    background: var(--karte);
    border-radius: 12px;
    padding: 26px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    animation: modal-auf 0.15s ease-out;
}
@keyframes modal-auf {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.modal h2 { margin-bottom: 6px; font-size: 1.25rem; }
.modal .hinweis { word-break: break-all; }

.empfaenger-optionen { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 20px; }
.check-zeile {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid var(--rand);
    border-radius: 8px;
}
.check-zeile input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; }
.check-zeile .adresse { color: var(--grau); font-weight: 400; font-size: 0.82rem; }
.check-zeile.deaktiviert { opacity: 0.5; cursor: not-allowed; }

.modal-knoepfe { display: flex; gap: 10px; justify-content: flex-end; }

/* ----- Direkt-E-Mail-Popup (Ersatzkarte / Arztbesuch-Bescheinigung) ----- */
#direkt-modal .modal { max-width: 560px; }
.feld-label { display: block; font-weight: 600; font-size: 0.85rem; margin: 12px 0 4px; }
.direkt-betreff { width: 100%; }
.direkt-text {
    width: 100%;
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.45;
}

/* ----- QR-Code-Popup (digitale Unterschrift) ----- */
.qr-modal { text-align: center; }
.qr-modal .hinweis { word-break: normal; }
.qr-code {
    width: 230px;
    height: 230px;
    margin: 16px auto;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--rand);
    border-radius: 10px;
}
.qr-code svg { width: 100%; height: 100%; display: block; }
.qr-warte { color: var(--gold); font-weight: 600; margin-bottom: 6px; }

/* Großes Hinweis-Icon über dem QR-Code (Ausweis, Foto) */
.qr-icon-gross {
    font-size: 64px;
    line-height: 1;
    text-align: center;
    margin: 14px auto 4px;
}
.qr-icon-text {
    text-align: center;
    font-weight: 600;
    color: var(--dunkel);
    margin: 0 auto 6px;
}

/* Abbruch-Bestätigung liegt über dem jeweiligen QR-Popup */
#qr-abbruch-modal { z-index: 1100; }
.qr-link { color: var(--grau); font-size: 0.8rem; word-break: break-all; margin-bottom: 16px; }
.qr-modal .modal-knoepfe { justify-content: center; }

/* Direkt-Upload-Button im Foto-Schritt */
.foto-direkt-btn {
    display: inline-block;
    cursor: pointer;
    background: var(--grau);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}
.foto-direkt-btn:hover { filter: brightness(1.08); }

/* Farbiger Rollen-Header im QR-Fenster (wer unterschreiben soll) */
.qr-kopf {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    margin: -6px 0 14px;
    line-height: 1.3;
}
.qr-kopf-an { background: linear-gradient(135deg, #2e6da4 0%, #3a86c8 100%); }   /* Arbeitnehmer = blau */
.qr-kopf-ag { background: linear-gradient(135deg, #e08a1e 0%, #f0a83a 100%); }   /* Arbeitgeber = orange */

/* Dokumentname unter dem Rollen-Header (welches Dokument unterschrieben wird) */
.qr-dokument {
    font-size: 1rem;
    font-weight: 700;
    color: #3a3a3a;
    background: var(--karte-2);
    border: 1px solid var(--rand);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 14px;
}

/* Überspringen-Box bei der AOK-Vollmacht */
.qr-ueberspringen-box {
    background: var(--karte-2);
    border: 1px dashed var(--rand);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 4px 0 16px;
}
.qr-ueberspringen-box .hinweis { margin: 0 0 10px; }

/* Infobox im Arbeitsvertrag-Wizard (Erklärungen, z.B. Befristung/Unterkunft) */
.wizard-info {
    background: var(--karte-2);
    border: 1px solid var(--rand);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    padding: 11px 13px;
    font-size: 0.88rem;
    color: var(--dunkel);
    margin: -4px 0 8px;
    line-height: 1.5;
}

/* Animation beim Wechsel zum nächsten QR-Code */
@keyframes qr-einblenden {
    from { transform: translateX(40px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
.qr-wechsel { animation: qr-einblenden 0.45s ease-out; }
@keyframes qr-kopf-puls {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}
.qr-kopf.qr-jetzt { animation: qr-kopf-puls 0.6s ease-in-out 1; }

/* Grüne Erfolgs-/Wechsel-Anzeige zwischen zwei Unterschriften */
.qr-erfolg {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    padding: 28px 18px;
    margin: 8px 0 16px;
    animation: qr-einblenden 0.35s ease-out;
}
.qr-erfolg-haken { font-size: 3.4rem; line-height: 1; }
.qr-erfolg-text { font-size: 1.25rem; font-weight: 800; margin-top: 8px; }
.qr-erfolg-weiter { color: #2e7d44; font-weight: 600; margin-top: 10px; }

#historie-tabelle td:nth-child(3) { word-break: break-all; }
#historie-tabelle td:nth-child(4) { word-break: break-all; font-size: 0.85rem; }

/* ----- "Alle Mitarbeiter anzeigen"-Button ----- */
#btn-alle-ma { margin-top: 14px; width: 100%; }

/* Archiv-Bereich (ehemalige/gekündigte Mitarbeiter, aufklappbar) */
.archiv-bereich { margin-top: 18px; border-top: 1px dashed var(--rand); padding-top: 10px; }
.archiv-toggle {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-weight: 700;
    color: var(--grau);
    cursor: pointer;
    padding: 8px 4px;
    font-size: 0.95rem;
}
.archiv-toggle:hover { color: var(--dunkel); }
#archiv-tabelle { margin-top: 8px; }
#archiv-tabelle .status-gekuendigt,
#archiv-tabelle .status-archiviert { font-weight: 600; }

/* ----- Tabs in der Kündigungs-Karte ----- */
.tabs {
    display: flex;
    gap: 4px;
    margin: 16px 0;
    border-bottom: 2px solid var(--rand);
}
.tab-btn {
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--grau);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--dunkel); }
.tab-btn.aktiv { color: var(--rot); border-bottom-color: var(--rot); }
.tab-inhalt { display: flex; flex-direction: column; gap: 14px; }

/* ----- Arbeitsvertrag-Wizard ----- */
.wizard-modal { position: relative; max-width: 480px; max-height: 92vh; overflow-y: auto; }
.wizard-modal > h2 { text-align: center; margin-bottom: 14px; }
.wizard-schliessen {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--karte-2);
    color: var(--grau);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s;
}
.wizard-schliessen:hover { background: var(--karte-2); color: var(--dunkel); }

/* Fortschrittspunkte */
.wizard-fortschritt { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; }
.wizard-punkt {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--karte-2);
    transition: background 0.2s, transform 0.2s;
}
.wizard-punkt.erledigt { background: var(--gold-hell); }
.wizard-punkt.aktiv { background: var(--gold); transform: scale(1.35); }

.wizard-schritt-titel {
    text-align: center;
    font-weight: 700;
    color: var(--gold);
    font-size: 0.92rem;
    margin-bottom: 18px;
}

.wizard-step { display: flex; flex-direction: column; gap: 14px; min-height: 130px; }

/* Buttons-Leiste */
.wizard-knoepfe {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}
.wizard-knoepfe-rechts { display: flex; gap: 10px; }
.wizard-knoepfe .btn { margin-top: 0; }

/* Zusammenfassung */
.wizard-zusammenfassung {
    display: grid;
    grid-template-columns: 140px 1fr;
    row-gap: 8px;
    column-gap: 12px;
    margin: 4px 0 0;
    font-size: 0.92rem;
}
.wizard-zusammenfassung dt { color: var(--grau); font-weight: 600; }
.wizard-zusammenfassung dd { margin: 0; color: var(--dunkel); word-break: break-word; }
.wizard-zusammenfassung dd.leer { color: #b0a890; font-style: italic; }

/* Logo-Vorschau im Ersteinrichtungs-Wizard */
.setup-logo-vorschau {
    display: block;
    max-width: 220px;
    max-height: 130px;
    margin: 14px auto 0;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--rand);
    border-radius: 10px;
    object-fit: contain;
}

/* Ersteinrichtung als mobile-first: Zusammenfassung einspaltig auf dem Handy */
@media (max-width: 600px) {
    #setup-zusammenfassung { grid-template-columns: 1fr; row-gap: 0; }
    #setup-zusammenfassung dt { margin-top: 10px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; }
    #setup-zusammenfassung dd { font-weight: 700; }
}

/* Aktionsleiste in der Akte */
/* Aktionsleiste als gruppierte, aufklappbare Menüs (Handy-optimiert). */
.akte-aktionen { display: flex; flex-direction: column; gap: 10px; }
.akte-aktionen .btn { margin-top: 0; }
.btn-akte { width: 100%; padding: 15px 16px; font-size: 1.02rem; }
.akte-gruppe { border: 1px solid var(--rand); border-radius: 12px; overflow: hidden; }
.akte-gruppe-kopf {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 15px 16px;
    font-size: 1.04rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--karte-2);
    border: none;
    color: var(--dunkel);
}
.akte-gruppe-kopf:active { background: var(--karte-2); }
.akte-gruppe-pfeil { transition: transform 0.15s ease; flex: none; }
.akte-gruppe-kopf.offen .akte-gruppe-pfeil { transform: rotate(90deg); }
.akte-gruppe-inhalt { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--karte); }

/* Ausweis-Datenzeile in den Persönlichen Daten (Status + Öffnen/Hochladen). */
.ausweis-daten { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ausweis-daten .ausweis-ok { color: #1e8449; font-weight: 600; }
.ausweis-daten .ausweis-teil { color: #856404; font-weight: 600; }
.ausweis-daten .ausweis-fehlt { color: var(--rot); font-weight: 700; }
.ausweis-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--gold);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.ausweis-link:hover { color: #946c08; }
.ausweis-daten .btn-mini { padding: 4px 10px; }

.ausweis-direkt-zeile { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.ausweis-direkt-zeile .foto-direkt-btn { flex: 1 1 auto; }

/* ----- Info-Icon mit Tooltip (Hover Desktop / Klick Handy) ----- */
.info-icon {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    vertical-align: middle;
}
.info-tooltip {
    display: none;
    position: absolute;
    left: 0;
    top: 140%;
    width: max-content;
    max-width: min(300px, 80vw);
    background: #2c2c2c;
    color: #fff;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
    z-index: 200;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}
.info-icon:hover .info-tooltip,
.info-icon:focus .info-tooltip,
.info-icon.offen .info-tooltip { display: block; }

/* ----- Mindestlohn-Feld (gesperrt mit Schloss) ----- */
.mindestlohn-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mindestlohn-zeile .mindestlohn-schloss { font-size: 1.1rem; flex: none; }
.mindestlohn-zeile input { flex: 1 1 140px; min-width: 120px; }
.mindestlohn-zeile input:disabled { background: var(--karte-2); color: var(--grau); cursor: not-allowed; }
.mindestlohn-zeile .btn-mini { flex: none; }
.mindestlohn-aenderung-hinweis {
    margin-top: 8px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.84rem;
    font-weight: 600;
}

/* Textarea wie die übrigen Eingabefelder gestalten */
textarea {
    padding: 10px 12px;
    border: 1px solid var(--rand);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    width: 100%;
}
textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* Nachtrag: Eingabefeld mit "Bisher"-Hinweis */
.nachtrag-feld { display: flex; flex-direction: column; gap: 4px; }
.nachtrag-alt { color: var(--grau); font-size: 0.82rem; margin: 0; }
.nachtrag-alt span { font-weight: 600; color: var(--dunkel); }

/* Rotes Abmahnungs-Badge (in der Akte) */
.kv-badge.kv-abmahnung { background: #f8d7da; color: #721c24; }

/* Roter Warnbanner in der Akte (3+ Abmahnungen) */
.akte-warnbanner {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 18px;
}

/* ----- Banner: offene Unterschrifts-Vorgänge ----- */
.vorgaenge-banner {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.vorgaenge-kopf { font-weight: 700; font-size: 1rem; }
.vorgaenge-zeile {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 0 0;
}
.vorgaenge-zeile + .vorgaenge-zeile { border-top: 1px solid #f0e3b0; margin-top: 4px; }
.vorgaenge-zeile .vz-text { flex: 1; min-width: 0; font-weight: 400; }
.vorgaenge-zeile .vz-text strong { font-weight: 700; }
.vz-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }

/* ----- Krankenversicherung-Popup ----- */
.kv-optionen { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 20px; }
.kv-opt {
    text-align: left;
    border: 1px solid var(--rand);
    border-left: 5px solid var(--grau);
    border-radius: 10px;
    background: #fff;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}
.kv-opt:hover { background: var(--karte-2); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.kv-opt:active { transform: scale(0.99); }
.kv-opt .kv-opt-titel { display: block; font-weight: 700; font-size: 1rem; color: var(--dunkel); }
.kv-opt small { display: block; color: var(--grau); font-weight: 400; font-size: 0.84rem; margin-top: 4px; }
.kv-opt-gruen { border-left-color: #1e7e34; }
.kv-opt-blau { border-left-color: #2e6da4; }
.kv-opt-gelb { border-left-color: #d4a017; }
.kv-opt:disabled { opacity: 0.5; cursor: progress; }

/* ----- Versicherungs-Status-Badge (Mitarbeiterliste) ----- */
.kv-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.kv-badge.kv-aok { background: #d4edda; color: #155724; }
.kv-badge.kv-wechsel { background: #d6e4f0; color: #1c4f7c; }
.kv-badge.kv-ausstehend { background: #fff3cd; color: #856404; }
.kv-badge.kv-keine { background: var(--rand); color: var(--grau); }
.kv-badge.kv-bar { background: #ffe3c2; color: #8a4b00; }

/* ----- Versicherungs-Banner in der Akte ----- */
.akte-kv-banner {
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.akte-kv-banner.kv-ausstehend { background: #fff3cd; color: #856404; border: 1px solid #ffe69c; }
.akte-kv-banner.kv-wechsel { background: #d6e4f0; color: #1c4f7c; border: 1px solid #b6d0e8; }
.akte-kv-banner.kv-aok { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.akte-kv-banner.kv-keine { background: var(--karte-2); color: var(--grau); border: 1px solid var(--rand); }
.akte-kv-banner .kv-banner-text { flex: 1; min-width: 0; }
.akte-kv-banner .btn-mini { flex: none; }

/* ----- Schriftform: Papier-Unterschrift(en) ausstehend (gelber Block) ----- */
.akte-papier-banner {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
}
.papier-banner-titel { margin: 0 0 10px; font-size: 0.9rem; line-height: 1.4; }
.papier-vorgang {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-top: 1px solid #ffe69c;
}
.papier-vorgang-titel { flex: 1; min-width: 140px; font-weight: 700; }

/* ----- Schriftform-Hinweis-Popup ----- */
.schriftform-modal { max-width: 540px; text-align: left; }
.schriftform-modal h2 { margin-top: 0; }
.schriftform-datei-box {
    background: var(--karte-2);
    border: 1px solid var(--rand);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.88rem;
    word-break: break-all;
}
.schriftform-datei-label { color: var(--grau); margin-right: 6px; }
.schriftform-datei { font-weight: 700; }
.schriftform-hinweis {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 14px;
}
.schriftform-schritte { margin: 0 0 16px; padding-left: 22px; line-height: 1.6; font-size: 0.92rem; }
.schriftform-aktionen { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.schriftform-aktionen .btn { flex: 1 1 auto; }
.schriftform-weiter { width: 100%; }
.schriftform-fuss { margin: 12px 0 0; font-size: 0.82rem; }

/* ----- Daten & Sicherung (Einstellungen) ----- */
.sicherung-zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.sicherung-zeile input[type="file"] { flex: 1 1 200px; min-width: 0; }
.sicherung-block { margin-top: 18px; border-top: 1px solid var(--rand); padding-top: 12px; }
.sicherung-block h3 { margin: 0 0 6px; }
.sicherung-gefahr { margin-top: 18px; }
.reset-arm { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 0.9rem; cursor: pointer; }
.reset-arm input { margin-top: 3px; flex: none; }
#reset-aktiv-label, #reset-final label { display: block; margin: 8px 0; font-size: 0.9rem; }
/* Gesetzestext / rechtlicher Hinweis in der Gefahrenzone */
.reset-gesetz {
    background: #fdecea;
    border: 1px solid #f5c2bd;
    border-left: 4px solid #c0392b;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 6px 0 12px;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #5b2320;
}
.reset-gesetz p { margin: 0 0 8px; }
.reset-gesetz p:last-child { margin-bottom: 0; }
.reset-gesetz-titel { font-weight: 700; font-size: 0.95rem; }
.reset-gesetz-backup { font-style: italic; color: #7a4a18; }
/* Letzte Stufe: zweite Firmenname-Eingabe + endgültiger Button */
.reset-final { border-top: 1px dashed #e0b4ae; margin-top: 12px; padding-top: 12px; }

/* ----- Vollständigkeits-Ring (Stamina-Wheel-Stil) ----- */
/* Registrierte Custom-Property, damit sich der Füllstand flüssig animieren lässt. */
@property --vkp { syntax: "<number>"; inherits: true; initial-value: 0; }

.vk-ring {
    display: inline-block; line-height: 0; vertical-align: middle; flex: none;
    --vk: #5bbf3a;            /* sattes Grün (Standard) */
    --track: #e6e3d6;          /* leerer Teil des Rads */
    --vkp: var(--vkbase, 0);   /* Füllstand 0–100 (von JS gesetzt) */
}
.vk-ring svg { width: 100%; height: 100%; display: block; overflow: visible; }
.vk-ring .vk-bg { fill: none; stroke: var(--track); stroke-width: 4.2; }
.vk-ring .vk-fg {
    fill: none; stroke: var(--vk); stroke-width: 4.2; stroke-linecap: round;
    stroke-dasharray: var(--vkp) 100;
    transform: rotate(-90deg); transform-origin: 50% 50%;
}
/* Stufen-Farben */
.vk-ring.vk-niedrig { --vk: #e0a020; }   /* fast leer → Bernstein (Warnung) */
.vk-ring.vk-voll    { --vk: #3fb24f; }   /* 100 % → sattes Grün */

/* Bewegung: füllt sich beim Laden; darunter „strebt" das Rad leicht nach oben
   und fällt zurück – das motiviert, die Akte voll grün zu bekommen. */
.vk-ring.vk-gut, .vk-ring.vk-niedrig {
    animation: vk-fill .7s ease-out both, vk-streben 3s ease-in-out .7s infinite;
}
.vk-ring.vk-voll { animation: vk-fill .7s ease-out both; }
.vk-ring.vk-voll .vk-fg { animation: vk-glow 2.4s ease-in-out .7s infinite; }
@keyframes vk-fill { from { --vkp: 0; } to { --vkp: var(--vkbase); } }
@keyframes vk-streben {
    0%, 100% { --vkp: var(--vkbase); }
    55%      { --vkp: calc(var(--vkbase) + 6); }
}
@keyframes vk-glow {
    0%, 100% { filter: drop-shadow(0 0 1.5px var(--vk)); }
    50%      { filter: drop-shadow(0 0 6px var(--vk)); }
}
/* Dark-Mode-Töne – greifen automatisch, sobald data-theme="dark" gesetzt wird. */
[data-theme="dark"] .vk-ring          { --vk: #7fd957; --track: #34313f; }
[data-theme="dark"] .vk-ring.vk-niedrig { --vk: #ffc24d; }
[data-theme="dark"] .vk-ring.vk-voll    { --vk: #5fe07f; }

@media (prefers-reduced-motion: reduce) {
    .vk-ring, .vk-ring .vk-fg { animation: none !important; }
}

/* ===========================================================================
   Dark-Mode-Feinschliff: Flächen, die eine fest hinterlegte helle Farbe haben,
   im Dunkel-Modus auf die Token-Flächen ziehen. (QR-Code bleibt bewusst weiß.)
   =========================================================================== */
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--karte-2);
    color: var(--dunkel);
    border-color: var(--rand);
}
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] { accent-color: var(--accent); }
[data-theme="dark"] .aktion-box,
[data-theme="dark"] .vertrag-zelle,
[data-theme="dark"] .tabs,
[data-theme="dark"] .setup-logo-vorschau,
[data-theme="dark"] .sicherung-block,
[data-theme="dark"] .kv-opt,
[data-theme="dark"] .akte-kopf-meta span,
[data-theme="dark"] .archiv-jahr h3,
[data-theme="dark"] .btn-stunden-tipp {
    background: var(--karte-2);
    border-color: var(--rand);
    color: var(--dunkel);
}
/* Karten-Schatten im Dunkel-Modus kräftiger */
[data-theme="dark"] .karte,
[data-theme="dark"] .modal { box-shadow: var(--schatten); }

/* Darstellung-Karte: Modus-Umschalter-Zeile */
.darstellung-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.darstellung-zeile > span { font-weight: 600; }
.darstellung-zeile .btn { margin-top: 0; width: auto; }

/* ===========================================================================
   Mitarbeiter-Karten (Etappe 2: Liste & Archiv als Karten, mobil-first)
   =========================================================================== */
.ma-suche-zeile { margin: 4px 0 16px; }
#ma-suche { width: 100%; }

/* Sticky-Sammelversand in der Akte: klebt unten, bleibt beim Scrollen im Blick */
.akte-dok-tipp { font-size: 0.74rem; color: var(--grau); }
.akte-sammelversand {
    position: sticky; bottom: 8px; z-index: 6;
    width: 100%; margin-top: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.ma-liste { display: flex; flex-direction: column; gap: 12px; }
.ma-karte {
    background: var(--karte); border: 1px solid var(--rand); border-radius: 16px;
    box-shadow: var(--schatten); padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.ma-kopf { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 46px; height: 46px; border-radius: 50%; flex: none;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem;
}
.ma-namensblock { flex: 1; min-width: 0; }
.ma-namensblock .ma-name { font-weight: 800; font-size: 1.03rem; }
.ma-namensblock .ma-stelle { color: var(--grau); font-size: 0.85rem; }
.ma-karte-ring { flex: none; margin-left: auto; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill { font-size: 0.74rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.pill-gruen { background: #e4f6ea; color: #15803d; }
.pill-rot { background: #fbe6e3; color: #c0392b; }
.pill-warn { background: #fff3cd; color: #856404; }
.ma-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.8rem; color: var(--grau); }
.ma-meta b { color: var(--dunkel); font-weight: 700; }
.ma-aktionen { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--rand); padding-top: 12px; }
.akt-btn {
    flex: 1 1 64px; border: 1px solid var(--rand); background: var(--karte);
    border-radius: 12px; padding: 10px 6px; font-size: 0.8rem; font-weight: 700;
    color: var(--dunkel); cursor: pointer; min-height: 48px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.akt-btn .ic { font-size: 1.15rem; line-height: 1; }
.akt-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.akt-btn.akt-rot { color: var(--rot); }
.akt-btn.akt-rot:hover { background: #fbe6e3; border-color: var(--rot); }

/* ===========================================================================
   Bottom-Tab-Bar (Etappe 3): mobile Navigation unten; Desktop nutzt die Top-Nav
   =========================================================================== */
.tabbar { display: none; }
.tab {
    flex: 1; border: none; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px; color: var(--grau); font-size: 0.68rem; font-weight: 700;
    min-height: 50px; font-family: inherit;
}
.tab .ic { font-size: 1.4rem; line-height: 1; }
.tab.aktiv { color: var(--accent); }

@media (max-width: 720px) {
    .hauptnav { display: none; }            /* Top-Nav weicht der Tab-Bar */
    .tabbar {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
        background: var(--karte); border-top: 1px solid var(--rand);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.10);
    }
    body { padding-bottom: 76px; }          /* Platz, damit die Bar nichts verdeckt */
    main { margin-top: 18px; }
}

/* ===========================================================================
   Etappe 4: Modale werden auf kleinen Bildschirmen zu Bottom-Sheets
   (schieben von unten hoch, volle Breite, oben abgerundet, mit Greifbalken)
   =========================================================================== */
@keyframes sheet-hoch {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
@media (max-width: 720px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal {
        width: 100%;
        max-width: 100% !important;          /* auch breitere Modale (Akte/Wizard) voll */
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        overflow-y: auto;
        padding-bottom: calc(22px + env(safe-area-inset-bottom));
        animation: sheet-hoch 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    /* Greifbalken oben am Sheet (Wischen-Andeutung) */
    .modal::before {
        content: "";
        display: block;
        width: 42px; height: 5px; border-radius: 3px;
        background: var(--rand);
        margin: 2px auto 14px;
    }
    /* Die randlose Akte: Greifbalken nicht doppelt/abgeschnitten zeigen */
    .akte-modal::before { display: none; }
}

/* ----- "Hier auf diesem Gerät unterschreiben" (QR-Dialog) ----- */
.qr-oder { display: flex; align-items: center; text-align: center; color: var(--grau); font-size: 0.8rem; margin: 16px 0 10px; }
.qr-oder::before, .qr-oder::after { content: ""; flex: 1; height: 1px; background: var(--rand); }
.qr-oder span { padding: 0 12px; }
.qr-hier-hinweis { margin-top: 8px; font-size: 0.78rem; }
.qr-hier-frame {
    width: 100%; height: 62vh; min-height: 380px;
    border: 1px solid var(--rand); border-radius: 12px; background: var(--karte);
}
#qr-hier-bereich .btn { margin-top: 12px; }

/* Direkt-Upload von diesem Gerät (allgemeiner Upload-Dialog) */
.upload-direkt-btn { display: block; width: 100%; text-align: center; }
.upload-direkt-hinweis { margin-top: 8px; font-size: 0.78rem; text-align: center; }
/* Namens-Zelle in der Mitarbeiterliste: Ring + Name nebeneinander */
.ma-zelle { display: flex; align-items: center; gap: 9px; }
.ma-zelle .ma-name { min-width: 0; }
/* Akte: großer Ring + Checkliste „Noch offen" */
.akte-vk {
    display: flex; align-items: center; gap: 14px;
    background: var(--karte-2); border: 1px solid var(--rand); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 14px;
}
.akte-vk:empty { display: none; }
.akte-vk-info { flex: 1; min-width: 0; }
.akte-vk-titel { font-size: 1rem; margin-bottom: 5px; }
.akte-vk-offen { font-size: 0.85rem; color: var(--grau); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.akte-vk-fertig { font-size: 0.92rem; color: #1d7a44; font-weight: 600; }
.vk-chip { background: #fff3cd; border: 1px solid #ffe69c; color: #856404; border-radius: 999px; padding: 2px 9px; font-size: 0.8rem; }

/* ----- Mitarbeiter-Akte (Personalakte) ----- */
.akte-modal {
    max-width: 640px;
    padding: 0;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}
.akte-schliessen {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    z-index: 2;
    transition: background 0.15s;
}
.akte-schliessen:hover { background: rgba(255, 255, 255, 0.45); }

/* Kopfbereich mit Akzentfarbe wie eine echte Akte */
.akte-header {
    background: linear-gradient(135deg, #2c2c2c 0%, #3d3d3d 100%);
    color: #fff;
    padding: 22px 26px;
    border-bottom: 3px solid var(--gold);
}
.akte-kopf-zeile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.akte-kopf-zeile h2 { margin: 0; font-size: 1.5rem; color: #fff; }
.akte-status {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
}
.akte-status.aktiv { background: #1e7e34; color: #fff; }
.akte-status.gekuendigt { background: var(--rot); color: #fff; }
.akte-kopf-meta {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #d8d2c2;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.akte-kopf-meta span { white-space: nowrap; }
.akte-kopf-meta strong { color: #fff; font-weight: 600; }

.akte-body { padding: 20px 26px 26px; overflow-y: auto; }
.akte-block { margin-bottom: 22px; }
.akte-block:last-child { margin-bottom: 0; }
.akte-block h3 {
    font-size: 0.85rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--rand);
    padding-bottom: 6px;
    margin-bottom: 12px;
}

/* Persönliche Daten als sauberes Label/Wert-Raster */
.akte-daten {
    display: grid;
    grid-template-columns: 150px 1fr;
    row-gap: 8px;
    column-gap: 12px;
    margin: 0;
    font-size: 0.92rem;
}
.akte-daten dt { color: var(--grau); font-weight: 600; }
.akte-daten dd { margin: 0; color: var(--dunkel); word-break: break-word; }
.akte-daten dd.leer { color: #b0a890; font-style: italic; }
@media (max-width: 600px) {
    /* Visitenkarten-Stil: kleines Label oben, Wert fett darunter */
    .akte-daten { grid-template-columns: 1fr; row-gap: 0; }
    .akte-daten dt {
        margin-top: 12px;
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--grau);
    }
    .akte-daten dd {
        font-weight: 700;
        font-size: 1rem;
        margin-bottom: 2px;
        overflow-wrap: anywhere;
    }
    .akte-daten dd.leer { font-weight: 400; }
}

/* Dokumentenliste in der Akte */
.akte-dokument {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--karte-2);
}
.akte-dokument:last-child { border-bottom: none; }
.akte-dok-icon { font-size: 1.5rem; flex: none; }
.akte-dok-info { flex: 1; min-width: 0; }
.akte-dok-name {
    font-size: 0.88rem;
    /* Nie buchstabenweise vertikal brechen – max. 2 Zeilen, dann "…" */
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.akte-dok-meta { color: var(--grau); font-size: 0.78rem; }
.dok-unvollstaendig {
    display: inline-block;
    background: #f8d7da;
    color: #721c24;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 4px;
}
.akte-dok-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.akte-dok-chk { width: 18px; height: 18px; flex: none; cursor: pointer; }
.akte-dok-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.akte-dok-kopf h3 { margin: 0; }

/* ----- Wizard-/Daten-Untertitel + "Später einpflegen" ----- */
.wizard-untertitel {
    margin: 18px 0 6px;
    font-size: 0.95rem;
    color: var(--grau);
    border-top: 1px solid var(--rand);
    padding-top: 12px;
}
#wizard-ergaenzbare-felder.ist-spaeter { opacity: 0.5; }
#daten-modal .modal { max-width: 540px; }
/* Kündigungs-Popup: etwas breiter (lange Options-Texte) und auf kleinen
   bzw. niedrigen Screens scrollbar. */
#kuendigung-modal .modal { max-width: 480px; max-height: 90vh; overflow-y: auto; }

/* ----- Mindestlohn-Banner (Jahreswechsel-Erinnerung) ----- */
.mindestlohn-banner {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ----- Archiv (nach Jahr gruppiert) ----- */
.archiv-jahr { margin-bottom: 18px; }
.archiv-jahr:last-child { margin-bottom: 0; }
.archiv-jahr h3 {
    font-size: 1rem;
    color: var(--gold);
    border-bottom: 2px solid var(--rand);
    padding-bottom: 4px;
    margin-bottom: 8px;
}
.archiv-zeile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--karte-2);
    flex-wrap: wrap;
}
.archiv-zeile:last-child { border-bottom: none; }
.archiv-info { flex: 1 1 200px; min-width: 0; }
.archiv-info .archiv-datei {
    font-size: 0.85rem;
    /* Nie buchstabenweise vertikal brechen – max. 2 Zeilen, dann "…" */
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.archiv-info .archiv-meta { color: var(--grau); font-size: 0.78rem; }
.archiv-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }

/* ----- Ausweis-Bereich im Versand-Popup ----- */
.modal-ausweis {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--karte-2);
    border: 1px solid var(--rand);
}
.modal-ausweis .ausweis-titel {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--dunkel);
}
.modal-ausweis .check-zeile { margin: 4px 0; }
.modal-ausweis.ausweis-warnung {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ----- RV-Befreiungs-Popup: gleiche Optik wie Krankenversicherung ----- */
.rv-opt { width: 100%; }

/* ----- Vergütungs-Infobox im Wizard (Mindestlohn-Live-Check) ----- */
.verguetung-info {
    margin: 4px 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}
.verguetung-info.verguetung-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.verguetung-info.verguetung-fehler {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.verguetung-info .verguetung-sperre {
    margin-top: 4px;
    font-weight: 700;
}

/* ----- Pro-Tipp-Button "Max. Stunden berechnen" ----- */
.stunden-zeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stunden-zeile input { flex: 1 1 120px; }
.btn-stunden-tipp {
    flex: none;
    background: transparent;
    border: 1px dashed var(--rand);
    color: var(--grau);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-stunden-tipp:hover { background: var(--karte-2); color: var(--gold); border-color: var(--gold); }
.btn-stunden-tipp:active { transform: scale(0.98); }

/* ===========================================================================
   Mobile-Optimierung (Handy) – Touch-freundlich & kompakt
   =========================================================================== */
@media (max-width: 600px) {
    main { padding: 0 12px; margin: 18px auto; }

    /* Top-Nav ausgeblendet – auf dem Handy übernimmt die Bottom-Tab-Bar. */
    .hauptnav { display: none; }

    /* 2) Mitarbeiterliste: nur Name, Status und Aktions-Buttons anzeigen */
    #mitarbeiter-tabelle th:nth-child(2),  /* Stelle */
    #mitarbeiter-tabelle td:nth-child(2),
    #mitarbeiter-tabelle th:nth-child(3),  /* Start */
    #mitarbeiter-tabelle td:nth-child(3),
    #mitarbeiter-tabelle th:nth-child(5),  /* Versicherung */
    #mitarbeiter-tabelle td:nth-child(5),
    #mitarbeiter-tabelle th:nth-child(6),  /* Ende */
    #mitarbeiter-tabelle td:nth-child(6) {
        display: none;
    }
    /* KV (blau) + Upload ↑ (gold) sind in der Akte erreichbar – in der Liste
       bleiben nur "Akte" (grau) und der Kündigungs-Button 🚫 (rot). */
    #mitarbeiter-tabelle .vertrag-zelle .btn-blau,
    #mitarbeiter-tabelle .vertrag-zelle .btn-gold {
        display: none;
    }
    #mitarbeiter-tabelle th, #mitarbeiter-tabelle td {
        padding: 12px 8px;
        font-size: 0.95rem;
    }
    #mitarbeiter-tabelle .vertrag-zelle .btn-mini {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 0.92rem;
        margin: 0;
    }

    /* Dokumentenliste der Akte: Name oben (max. 2 Zeilen), Buttons darunter
       voll gestapelt – auch "Löschen" bleibt sichtbar, nichts wird abgeschnitten. */
    .akte-dokument { flex-wrap: wrap; align-items: flex-start; }
    .akte-dok-knoepfe {
        flex-basis: 100%;
        width: 100%;
        flex-direction: column;
        gap: 8px;
        margin-top: 8px;
    }
    .akte-dok-knoepfe .btn-mini {
        width: 100%;
        min-height: 44px;
        margin: 0;
    }

    /* 4) Touch-Optimierung: Tap-Flächen mind. 44 px, etwas mehr Luft */
    .karte { padding: 18px 16px; }
    .karte h2 { font-size: 1.18rem; }
    .btn { min-height: 44px; padding: 13px 18px; }
    .btn-mini { min-height: 44px; }
    .tab-btn { min-height: 44px; }
}
