/* ==========================================================================
   1. Globale Stile & Variablen (Standardwerte)
   ========================================================================== */
:root {
    --primary-color: #007bff;
    --border-color: #dee2e6;
    --background-color: #f8f9fa;
    --sidebar-bg: #fff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --table-header-color: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

.app-container { display: flex; min-height: 100vh; }
.main-content { flex-grow: 1; padding: 2rem; overflow-x: hidden; }

/* ==========================================================================
   2. Layout-Komponenten (Sidebar, Main Header)
   ========================================================================== */
.sidebar {
    width: 250px;
    background-color: var(--background-color);
    border-right: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-header .logo-img { max-height: 150px; max-width: 100%; display: block; margin: 0 auto 1rem auto; }
.sidebar-header .vereinsname { font-size: 1.5rem; font-weight: bold; display: block; margin: 0; word-wrap: break-word; }

.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.header-actions { display: flex; gap: 1rem; }
.header-actions input[type="search"] { padding: 0.5rem; border: 1px solid var(--border-color); border-radius: 5px; }

/* ==========================================================================
   3. Allgemeine UI-Komponenten (Navigation, Buttons, Formulare, Modals)
   ========================================================================== */
.sidebar-nav .nav-item { display: block; padding: 0.75rem 1rem; color: var(--text-color); text-decoration: none; border-radius: 5px; margin-bottom: 0.5rem; }
.sidebar-nav .nav-item.active { background-color: var(--primary-color); color: #fff; }

.btn { padding: 0.5rem 1rem; border: none; border-radius: 5px; cursor: pointer; }
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-secondary { background-color: #6c757d; color: #fff; }

.form-group { display: flex; flex-direction: column; }
.form-group label { margin-bottom: 0.25rem; font-size: 0.9rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { padding: 0.5rem; border: 1px solid var(--border-color); border-radius: 5px; font-size: 1rem; font-family: inherit; }
.form-group textarea { resize: vertical; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); display: none; justify-content: center; align-items: center; z-index: 1000; }
.modal { background-color: #fff; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,.5); width: 90%; max-width: 800px; display: flex; flex-direction: column; }
.modal-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 1.5rem; max-height: 70vh; overflow-y: auto; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 0.5rem; }
.modal-header h2 { margin: 0; font-size: 1.25rem; }
.modal-close { cursor: pointer; font-size: 1.5rem; font-weight: bold; color: #6c757d; border: none; background: none; }

/* ==========================================================================
   4. Tabellen-Stile (Basis und spezifische Anpassungen)
   ========================================================================== */
.table-container { background-color: #fff; border: 1px solid var(--border-color); border-radius: 5px; }
.table-container table { width: 100%; border-collapse: collapse; }
.table-container th, .table-container td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.table-container tbody tr:hover { background-color: #f1f3f5; }
.table-container td .action-icon { cursor: pointer; margin-right: 0.5rem; }

/* HIER IST DIE KORREKTUR: Die Variable für die Tabellenkopf-Farbe wird hier verwendet */
.table-container thead { background-color: var(--table-header-color); }

.mitglieder-tabelle { overflow-x: auto; }
.listen-vorschau { overflow-x: auto; }

/* ==========================================================================
   5. Seiten-spezifische Stile
   ========================================================================== */
/* --- EINSTELLUNGEN --- */
.sidebar-filter { margin-top: 2rem; }
.sidebar-filter h4 { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); }
.sidebar-filter ul { list-style: none; padding: 0; margin: 0; }
.sidebar-filter ul li a { color: var(--text-color); text-decoration: none; display: block; padding: 0.5rem 0; }
.sidebar-filter ul li a.active-filter { font-weight: bold; color: var(--primary-color); }

.message-box { padding: 1rem; margin-bottom: 1.5rem; border-radius: 5px; background-color: #e2f0d9; color: #385723; border: 1px solid #c3e6cb; }

.form-container { background-color: #fff; padding: 1.5rem; border: 1px solid var(--border-color); border-radius: 5px; margin-bottom: 2rem; }
.form-container h3 { margin-top: 0; margin-bottom: 1.5rem; color: var(--primary-color); }
.form-container form { display: flex; flex-direction: column; gap: 1rem; }
.form-container .form-group small { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.accordion-header { background-color: var(--table-header-color); padding: 1rem 3rem 1rem 1rem; border: 1px solid var(--border-color); cursor: pointer; margin-top: -1px; font-weight: bold; position: relative; }
.accordion-header.active {
    background-color: var(--primary-color); /* HIER IST DIE ÄNDERUNG */
    color: #fff; /* Setzt die Textfarbe auf Weiß für besseren Kontrast */
    border-color: var(--primary-color); /* Optional: Passt auch die Rahmenfarbe an */
}
.accordion-content { display: none; padding: 1.5rem; border: 1px solid var(--border-color); border-top: none; }
.accordion-header::after { content: '▼'; font-size: 0.8em; color: var(--text-muted); position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); transition: transform 0.2s ease-in-out; }
.accordion-header.active::after {
    transform: translateY(-50%) rotate(180deg);
    color: #fff; /* Pfeil wird weiß */
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-section { display: flex; flex-direction: column; gap: 1rem; }
.form-section.full-width { grid-column: 1 / 3; }
.form-section h4 { margin: 0 0 0.5rem 0; font-size: 1rem; color: var(--primary-color); border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.address-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 1rem; }
.vereins-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; align-items: center; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 1.5rem 0; margin: 1rem 0; }
.color-grid .form-group input[type="color"] { width: 100%; height: 40px; padding: 2px; }

/* --- LISTEN-GENERATOR --- */
.listen-bereich { background-color: #fff; padding: 1.5rem; border: 1px solid var(--border-color); border-radius: 5px; margin-bottom: 2rem; }
.content-body h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.checkbox-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: flex-end; }
.input-with-button { display: flex; gap: 0.5rem; }
.input-with-button input, .input-with-button select { flex-grow: 1; }
.input-with-button button { flex-shrink: 0; }
.listen-bereich .form-group select { max-width: 300px; }

/* --- Stile für Drag-and-Drop Sortierung --- */
#sortable-fields tr {
    cursor: move; /* Zeigt das "Verschieben"-Symbol (oft ein Pfeilkreuz) */
}

/* Optional: Visuelles Feedback, während ein Element gezogen wird */
.sortable-ghost {
    opacity: 0.4;
    background-color: #cce5ff; /* Hellblau */
}

/* Verhindert Zeilenumbruch in der Betrags-Spalte */
.betrag-zelle {
    white-space: nowrap;
}

/* --- FINALE Anpassungen für FullCalendar --- */

/* Haupt-Container für einen Termin in der Monatsansicht */
.fc-daygrid-event {
    display: flex; /* Stellt sicher, dass Zeit und Titel nebeneinander sind */
    align-items: baseline; /* Richtet Zeit und Titel an der Grundlinie aus */
    white-space: normal; /* Erlaubt den Umbruch für den gesamten Termin-Block */
}

/* Der Titel-Teil des Termins */
.fc-event-title {
    word-wrap: break-word; /* Bricht lange Wörter um, falls nötig */
    white-space: normal;   /* Stellt explizit sicher, dass der Titel umbrechen darf */
}

/* Die Uhrzeit des Termins */
.fc-event-time {
    font-weight: bold; /* Macht die Uhrzeit fett */
    margin-right: 5px; /* Abstand zwischen Zeit und Titel */
}

/* Verbessert die Lesbarkeit von Hintergrund-Events (für Geburtstage) */
.fc-bg-event .fc-event-title {
    color: #111 !important;
    font-weight: bold;
}

/* --- Stile für den Seiten-Footer --- */
.page-footer {
    width: 100%;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9em;
    box-sizing: border-box; /* Stellt sicher, dass Padding die Breite nicht beeinflusst */
}

.page-footer hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.page-footer p {
    margin: 0.5rem 0;
}

.page-footer a {
    color: var(--text-muted);
    font-weight: bold;
    text-decoration: none;
}

.page-footer a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   6. Mobile Optimierungen (Kalender + Layout)
   ========================================================================== */

#calendar-container,
#calendar {
    width: 100%;
    max-width: 100%;
}

/* Allgemeines Layout für kleine Bildschirme */
@media (max-width: 768px) {

    .app-container {
        flex-direction: column;         /* Sidebar oben, Inhalt darunter */
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.75rem;
    }

    .main-content {
        padding: 1rem;
        overflow-x: visible;           /* Kein Abschneiden des Kalenders */
    }

    #calendar-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 0.5rem;               /* Etwas kompakter */
    }

    /* FullCalendar Typografie kompakter */
    .fc .fc-toolbar-title {
        font-size: 1.1rem;
    }

    .fc .fc-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    .fc .fc-daygrid-day-number {
        font-size: 0.8rem;
    }

    .fc .fc-daygrid-event {
        font-size: 0.75rem;
        padding: 1px 3px;
    }
}

/* Sehr kleine Displays (z.B. iPhone SE) */
@media (max-width: 360px) {

    .main-content {
        padding: 0.75rem;      /* weniger Rand */
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .btn {
        font-size: 0.9rem;
        width: 100%;
        box-sizing: border-box;
    }

    /* Footer kompakter halten */
    .page-footer {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }
}


/* --- Stile für Erweiterten Filter --- */
.filter-rule {
    display: grid;
    grid-template-columns: 2fr 2fr 3fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-remove-rule {
    background: none;
    border: none;
    color: red;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 0.5rem;
}

.permission-row { display: grid; grid-template-columns: 3fr 1fr 1fr; gap: 1rem; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.permission-row:last-child { border-bottom: none; }



/* ==========================================================================
   7. Design-Auffrischung (Stufe 1 + 2)
   Alle Tönungen werden per color-mix() aus den vier Farbeinstellungen
   abgeleitet. Bei sehr alten Browsern greift jeweils der Wert davor.
   ========================================================================== */

/* --- Seitenleiste --- */
.sidebar { border-right-color: #e9ecef; }
.sidebar-header { border-bottom-color: #e9ecef; }
.sidebar-header .vereinsname { letter-spacing: -0.01em; }
.sidebar-nav .nav-item { border-radius: 8px; margin-bottom: 4px; padding: 0.65rem 0.9rem; font-weight: 500; transition: background-color .15s, color .15s; }
.sidebar-nav .nav-item:hover { background-color: rgba(0,0,0,.04); background-color: color-mix(in srgb, var(--primary-color) 10%, transparent); }
.sidebar-nav .nav-item.active { font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.12); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 35%, transparent); }
.sidebar-nav .nav-item.active:hover { background-color: var(--primary-color); }
.sidebar-filter h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; margin-left: 0.9rem; }
.sidebar-filter ul li a { padding: 0.45rem 0.9rem; border-radius: 6px; transition: background-color .15s, color .15s; }
.sidebar-filter ul li a:hover { background-color: rgba(0,0,0,.04); background-color: color-mix(in srgb, var(--primary-color) 8%, transparent); color: var(--primary-color); }
.sidebar-filter ul li a.active-filter { font-weight: 600; background-color: rgba(0,0,0,.05); background-color: color-mix(in srgb, var(--primary-color) 10%, transparent); }
.sidebar-filter hr { border: 0; border-top: 1px solid #e9ecef; margin: 0.75rem 0; }

/* --- Kopfbereich & Suchfeld mit Lupe --- */
.main-header h1 { letter-spacing: -0.02em; }
.header-actions { gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.header-actions input[type="search"] {
    height: 40px; box-sizing: border-box; width: 240px; max-width: 100%;
    padding: 0 12px 0 34px; border-radius: 8px; background-color: #fff; font-size: 14px; color: var(--text-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 11px center;
}
.header-actions input[type="search"]:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0,0,0,.08); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent); }

/* --- Buttons --- */
.btn { border-radius: 8px; font-size: 14px; font-weight: 500; font-family: inherit; line-height: 1.2; min-height: 38px; padding: 0.55rem 1.1rem; transition: transform .15s, box-shadow .15s, filter .15s, background-color .15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.btn:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.btn-primary { font-weight: 600; }
.btn-secondary { background-color: #fff; color: var(--text-color); border: 1px solid #dee2e6; }
.btn-secondary:hover { filter: none; background-color: #f8f9fa; }
.btn:focus-visible { outline: 3px solid rgba(0,0,0,.25); outline: 3px solid color-mix(in srgb, var(--primary-color) 40%, transparent); outline-offset: 2px; }

/* --- Tabellen als Karte --- */
.table-container { border-color: #e9ecef; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 16px rgba(0,0,0,.05); overflow-x: auto; }
.table-container table { font-size: 14px; }
.table-container th { padding: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-color); color: color-mix(in srgb, var(--text-color) 75%, var(--table-header-color)); border-bottom-color: #e9ecef; white-space: nowrap; }
.table-container td { padding: 10px 12px; border-bottom-color: #f1f3f5; vertical-align: middle; }
.table-container th:first-child, .table-container td:first-child { padding-left: 16px; }
.table-container th:last-child, .table-container td:last-child { padding-right: 16px; }
.table-container tbody tr:last-child td { border-bottom: none; }
.table-container tbody tr:nth-child(even) { background-color: #fcfcfd; background-color: color-mix(in srgb, var(--primary-color) 3%, #fff); }
.table-container tbody tr:hover { background-color: #f1f3f5; background-color: color-mix(in srgb, var(--primary-color) 8%, #fff); }
.table-container input[type="checkbox"] { accent-color: var(--primary-color); }

/* --- Mitgliederliste: Spalten --- */
.mitglieder-tabelle .row-number { color: #6c757d; font-variant-numeric: tabular-nums; }
.mitglieder-tabelle td a { color: var(--primary-color); text-decoration: none; }
.mitglieder-tabelle td a:hover { text-decoration: underline; }
.mitglieder-tabelle .th-betrag, .mitglieder-tabelle .betrag-zelle { text-align: right; font-variant-numeric: tabular-nums; }
.mitglieder-tabelle .th-beitrag, .mitglieder-tabelle .beitrag-status-zelle { text-align: center; }
.mitglieder-tabelle .th-aktionen, .mitglieder-tabelle .aktionen-zelle { text-align: right; white-space: nowrap; }
.mitglieder-tabelle .editable-typ { cursor: pointer; white-space: nowrap; }

/* --- Stufe 2: Initialen-Kreis (Text kommt per CSS, damit CSV-Export und Suche unverändert bleiben) --- */
.name-zelle { white-space: nowrap; }
.name-zelle .initialen {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
    width: 32px; height: 32px; margin-right: 10px; border-radius: 50%;
    font-size: 12px; font-weight: 700;
    background-color: #e7f1ff; background-color: color-mix(in srgb, var(--primary-color) 14%, #fff);
    color: var(--primary-color); color: color-mix(in srgb, var(--primary-color) 80%, #000);
}
.name-zelle .initialen::before { content: attr(data-initialen); }
.name-zelle .name-text { font-weight: 600; vertical-align: middle; }

/* --- Stufe 2: Typ als Abzeichen --- */
.typ-badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background-color: #e7f1ff; background-color: color-mix(in srgb, var(--primary-color) 12%, #fff);
    color: var(--primary-color); color: color-mix(in srgb, var(--primary-color) 80%, #000);
}
.typ-badge.typ-leer { background: transparent; border: 1px dashed #ced4da; color: #6c757d; font-weight: 500; }
.editable-typ select { padding: 4px 8px; border: 1px solid #dee2e6; border-radius: 6px; font-family: inherit; font-size: 13px; }

/* --- Beitrags-Checkbox als Schiebeschalter (bleibt technisch eine Checkbox) --- */
.beitrag-status-checkbox {
    -webkit-appearance: none; appearance: none; margin: 0; vertical-align: middle; cursor: pointer;
    width: 38px; height: 22px; border-radius: 999px; background-color: #ced4da; position: relative; transition: background-color .2s;
}
.beitrag-status-checkbox::before {
    content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s;
}
.beitrag-status-checkbox:checked { background-color: var(--primary-color); }
.beitrag-status-checkbox:checked::before { transform: translateX(16px); }
.beitrag-status-checkbox:disabled { opacity: .6; cursor: progress; }
.beitrag-status-checkbox:focus-visible { outline: 3px solid rgba(0,0,0,.25); outline: 3px solid color-mix(in srgb, var(--primary-color) 40%, transparent); outline-offset: 2px; }

/* --- Dezente Aktions-Buttons mit Strichsymbolen --- */
.table-container td .action-icon {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
    width: 32px; height: 32px; margin: 0 0 0 2px; padding: 0; border: none; border-radius: 8px;
    background: transparent; color: #495057; font-family: inherit; opacity: .55;
    transition: opacity .15s, background-color .15s, color .15s;
}
.table-container tbody tr:hover .action-icon, .table-container td .action-icon:focus-visible { opacity: 1; }
.table-container td .action-icon:hover { opacity: 1; background-color: rgba(0,0,0,.06); background-color: color-mix(in srgb, var(--primary-color) 12%, transparent); color: var(--primary-color); }
.table-container td .action-icon.delete-mitglied:hover { background-color: #fdecec; color: #c62828; }
.table-container td .action-icon:focus-visible { outline: 3px solid rgba(0,0,0,.25); outline: 3px solid color-mix(in srgb, var(--primary-color) 40%, transparent); outline-offset: 1px; }
.table-container td .action-icon:disabled { cursor: progress; }

/* --- Änderungsverlauf-Popup --- */
.aenderungslog-overlay .modal { max-height: 90vh; }
.aenderungslog-tabelle { box-shadow: none; }
.aenderungslog-tabelle td { font-size: 13px; vertical-align: top; }
.aenderungslog-tabelle .log-zeit { white-space: nowrap; font-variant-numeric: tabular-nums; color: #5c636a; }
.aenderungslog-tabelle .log-feld { font-weight: 600; }
.aenderungslog-tabelle .log-alt { color: #8a3b3b; }
.aenderungslog-tabelle .log-neu { color: #2d6a3e; }
.aenderungslog-leer { color: #6c757d; margin: 0; }

/* --- Seitenleiste: angemeldeter Benutzer & Abmelden --- */
.sidebar-benutzer { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #e9ecef; display: flex; flex-direction: column; gap: 0.6rem; }
.sidebar-benutzer-info { display: flex; flex-direction: column; padding: 0 0.9rem; line-height: 1.3; }
.sidebar-benutzer-name { font-weight: 600; font-size: 14px; word-break: break-word; }
.sidebar-benutzer-rolle { font-size: 12px; color: var(--text-muted); }
.btn-abmelden { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; width: 100%; box-sizing: border-box; }
.btn-abmelden:hover { color: #c62828; }
@media (max-width: 768px) {
    .sidebar-benutzer { flex-direction: row; align-items: center; justify-content: space-between; }
    .btn-abmelden { width: auto; }
}

/* --- Login --- */
.login-karte { background: #fff; border: 1px solid #e9ecef; border-radius: 16px; padding: 2rem; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.08); }
.login-kopf { text-align: center; margin-bottom: 1.5rem; }
.login-logo { max-height: 96px; max-width: 70%; display: block; margin: 0 auto 1rem auto; }
.login-titel { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.login-untertitel { margin: 0.35rem 0 0 0; color: var(--text-muted); font-size: 14px; }
.login-form { display: flex; flex-direction: column; gap: 1rem; }
.login-form .form-group input { height: 44px; box-sizing: border-box; border-radius: 8px; padding: 0 12px; font-size: 15px; }
.login-form .form-group input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0,0,0,.08); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent); }
.login-button { width: 100%; min-height: 46px; font-size: 15px; margin-top: 0.25rem; }
.login-hinweis { border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 14px; }
.login-hinweis-fehler { background: #fdecec; color: #8a1c1c; border: 1px solid #f5c2c2; }
.login-hinweis-ok { background: #e8f5ec; color: #1e5c33; border: 1px solid #bfe3cb; }

/* Links im Button-Stil gleich hoch wie echte Buttons */
a.btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Datenschutz: Bibliotheken (Einstellungen) */
.bibliotheken-liste { list-style: none; padding: 0; margin: 0 0 1rem; font-size: 14px; }
.bibliotheken-liste li { padding: 4px 0 4px 1.5rem; position: relative; }
.bibliotheken-liste li::before { position: absolute; left: 0; font-weight: 700; }
.bibliotheken-liste li.ok::before { content: "\2713"; color: #1e6b37; }
.bibliotheken-liste li.fehlt::before { content: "\2715"; color: #a12121; }
.bibliotheken-liste li.neutral::before { content: "\2013"; color: #6c757d; }

/* --- Änderungsverlauf (Gesamtübersicht) --- */
.log-filter { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.log-filter-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.log-filter-suche { grid-column: span 2; }
.log-filter .form-group { margin: 0; }
.log-filter .form-group input, .log-filter .form-group select { height: 40px; box-sizing: border-box; border-radius: 8px; }
.log-filter-knoepfe { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.log-anzahl { margin-left: auto; font-size: 14px; color: var(--text-muted); }
.log-leer { margin: 0; color: var(--text-muted); }
.aenderungslog-tabelle tr.log-gruppe-start td { border-top: 1px solid #dee2e6; }
.aenderungslog-tabelle tr.log-gruppe-folge td { border-top: none; }
.aenderungslog-tabelle tbody tr:first-child td { border-top: none; }
.log-aktion { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.log-aktion-angelegt { background: #e3f4e8; color: #1e6b37; }
.log-aktion-geaendert { background: #e7f1ff; color: #1d4f91; }
.log-aktion-geloescht { background: #fdecec; color: #a12121; }
.log-seiten { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; font-size: 14px; }
@media (max-width: 768px) { .log-filter-suche { grid-column: auto; } }

/* --- Eigene Passwörter --- */
.pw-marke { display: inline-flex; align-items: center; margin-left: 6px; color: #1e6b37; vertical-align: middle; }
.pw-fortschritt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); background: #fff; border: 1px solid #e9ecef; border-radius: 999px; padding: 4px 12px; margin-left: 12px; white-space: nowrap; }
.main-header h1 + .pw-fortschritt { margin-right: auto; }
.passwort-status { font-size: 0.9em; margin: 0 0 0.5rem; padding: 0.5rem 0.75rem; border-radius: 8px; background: #f1f3f5; }
.passwort-status.gesetzt { background: #e8f5ec; color: #1e5c33; }
.passwort-status.offen { background: #fff4d6; color: #6b4b00; }
.passwort-status:empty { display: none; }
.passwort-entfernen { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.9em; margin: 0.25rem 0 0.75rem; }
.passwort-entfernen input { margin-top: 3px; }
.sidebar-passwort-link { font-size: 13px; padding: 0 0.9rem; color: var(--text-muted); text-decoration: none; }
.sidebar-passwort-link:hover { color: var(--primary-color); text-decoration: underline; }
.passwort-overlay { width: 100%; max-width: 480px; padding: 1rem; box-sizing: border-box; }
.passwort-symbol { width: 52px; height: 52px; margin: 0 auto 0.75rem; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--primary-color); background: #e7f1ff; background: color-mix(in srgb, var(--primary-color) 12%, #fff); }
.passwort-erklaerung { font-size: 14px; line-height: 1.55; margin-bottom: 1.25rem; }
.passwort-erklaerung p { margin: 0 0 0.6rem; }
.passwort-erklaerung ul { margin: 0; padding-left: 1.2rem; color: var(--text-muted); }
.passwort-erklaerung li { margin-bottom: 0.3rem; }
.passwort-zeigen { display: flex; gap: 0.5rem; align-items: center; font-size: 14px; color: var(--text-muted); }
.passwort-fuss { text-align: center; margin-top: 1rem; font-size: 14px; }
.passwort-fuss a { color: var(--text-muted); }
