﻿/* =========================================================
   Dienstplan â€“ Haupt-Stylesheet
   Inter Font lokal eingebunden
   ========================================================= */

/* ---------- Font-Face ---------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-400.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-500.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-600.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-700.ttf') format('truetype');
}

/* ---------- Reset & Basis ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #f7f8fa;
    --color-surface: #ffffff;
    --color-border: #e2e6ea;
    --color-border-light: #eef0f3;
    --color-text: #1a1d23;
    --color-text-muted: #6b7280;
    --color-primary: #2563eb;
    --color-primary-h: #1d4ed8;
    --color-accent: #0ea5e9;
    --color-open-day: #eff6ff;
    --color-open-border: #bfdbfe;
    --color-extra-day: #e5f59f;
    --color-extra-border: #fde047;
    --color-success: #16a34a;
    --color-danger: #dc2626;
    --color-warning-bg: #fff7ed;
    --color-nav-bg: #1e293b;
    --color-nav-text: #f1f5f9;
    --color-nav-hover: #334155;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .14);
    --transition: .18s ease;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    line-height: 1.6;
}

/* ---------- Topbar / Navigation ---------- */
.topbar {
    background: var(--color-nav-bg);
    color: var(--color-nav-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 58px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar .brand {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--color-nav-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.topbar .brand svg {
    width: 22px;
    height: 22px;
}

/* Logo-Bild im Header */
.topbar .brand .brand-logo {
    height: 40px;
    max-height: 80px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 6px;
}

.topbar .brand .brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.topbar nav {
    display: flex;
    gap: .25rem;
    align-items: center;
}

.topbar nav a {
    color: var(--color-nav-text);
    text-decoration: none;
    padding: .45rem .9rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    transition: background .18s ease;
    opacity: .85;
}

.topbar nav a:hover,
.topbar nav a.active {
    background: var(--color-nav-hover);
    opacity: 1;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: #94a3b8;
}

.topbar .user-info strong {
    color: var(--color-nav-text);
}

/* ---------- Hamburger-Button ---------- */
.nav-toggle {
    display: none;
    /* Desktop: versteckt */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: .45rem;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    order: 3;
    /* Nach user-info */
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-nav-text);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
    transform-origin: center;
}

/* X-Animation wenn geÃ¶ffnet */
.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Haupt-Layout ---------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---------- Seiten-Header ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: .75rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--color-text);
}

.page-header .subtitle {
    font-size: .875rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-top: .15rem;
}

/* ---------- Monatsnavigation ---------- */
.month-nav {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.month-nav .month-title {
    font-size: 1.05rem;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-h);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: .3rem .7rem;
    font-size: .8rem;
}

.btn-icon {
    padding: .45rem;
}

/* ---------- Kalender-Tabelle ---------- */
.calendar-wrapper {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--color-border);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.calendar-table thead th {
    background: #f1f5f9;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.calendar-table tbody tr {
    transition: background .18s ease;
    border: 1px solid #121c2b;
}

.calendar-table tbody tr:last-child {
    border-bottom: none;
}


.calendar-table tbody td {
    padding: .8rem 1rem;
    vertical-align: top;
}

/* Tag-Spalte */
.date-cell {
    white-space: nowrap;
    min-width: 110px;
}

.date-cell .day-number {
    display: none;
}

.date-cell .day-name {
    font-size: .9rem;
    color: var(--color-text);
    font-weight: 600;
}

/* Tagesabstand: stÃ¤rkere untere Linie pro Tag */
.calendar-table tbody tr:last-child td {
    border-bottom: none;
}

.row-open-day td,
.row-extra-day td,
.row-closed td {
    border-bottom: 1px solid var(--color-border);
}

/* Extra-Schicht-Zeilen teilen die Tagesgrenze nicht â€“ nur die letzte Zeile des Tages bekommt sie */
.row-extra-shift td {
    border-bottom: none;
    background: var(--color-extra-day);
}

/* Letzte Zeile eines Tages (Extra-Shift oder Standard) erhÃ¤lt die stÃ¤rkere Linie */
.calendar-table tbody tr:not(:has(+ tr.row-extra-shift)) td {
    border-bottom: 2px solid var(--color-border);
}

.row-open-day {
    background: var(--color-open-day);
}


.row-extra-day {
    background: var(--color-extra-day);
}


/* Geschlossener Tag */
.row-closed {
    opacity: .45;
}


/* Wochenenden (Sa + So) – dezent violetter Hintergrund */
.row-weekend {
    background: #f8e6e0;
}


/* Badge */
.badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 99px;
    vertical-align: middle;
    margin-left: .35rem;
}

.badge-open {
    background: #dbeafe;
    color: var(--color-primary);
}

.badge-extra {
    background: #fef9c3;
    color: #92400e;
}

/* Feld-Inhalt */
.field-content {
    font-size: .875rem;
    color: var(--color-text);
    line-height: 1.5;
}

.field-content.empty {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Zweite Person â€“ gleich gestylt wie erste */
.field-content-2nd {
    font-size: .875rem;
    color: var(--color-text);
    line-height: 1.5;
    margin-top: .15rem;
}

/* Zeit-Zelle */
.time-cell {
    white-space: nowrap;
    color: var(--color-text-muted);
    font-weight: 500;
}

.time-cell .time-range {
    font-size: .875rem;
}

/* Aktions-Zelle */
.action-cell {
    width: 80px;
    text-align: right;
}

/* Fehlende Besetzung Markierung */
.manager-missing {
    background-color: #d8d6d6 !important;
    /* Grauer Hintergrund */
    position: relative;
}


.manager-missing::after {
    content: '⚠️';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.85rem;
    opacity: 0.9;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}

.manager-missing .field-content.empty {
    color: #b91c1c;
    font-weight: 700;
}

/* ---------- Modal ---------- */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 200;
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn .2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

/* ---------- Formular ---------- */
.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: .35rem;
}

.form-control {
    width: 100%;
    padding: .55rem .9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .9rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.5;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

textarea.form-control {
    resize: vertical;
    min-height: 72px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ---------- Alert / Flash ---------- */
.alert {
    padding: .85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ---------- Karten ---------- */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--color-border-light);
}

/* ---------- Legende ---------- */
.legend {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    font-size: .8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-dot-open {
    background: var(--color-open-day);
    border: 2px solid var(--color-open-border);
}

.legend-dot-extra {
    background: var(--color-extra-day);
    border: 2px solid var(--color-extra-border);
}

.legend-dot-closed {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    opacity: .5;
}

/* ---------- Benutzer-Tabelle ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.data-table th {
    background: #f8fafc;
    text-align: left;
    padding: .65rem 1rem;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}


/* ---------- Login-Seite ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #f7f8fa 100%);
}

.login-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-card .logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: .5rem;
}

.login-card .logo p {
    font-size: .85rem;
    color: var(--color-text-muted);
}

/* ---------- Toast-Notification ---------- */
#toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--color-text);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s, transform .25s;
    z-index: 9999;
    pointer-events: none;
    max-width: 320px;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}

#toast.success {
    background: var(--color-success);
}

#toast.error {
    background: var(--color-danger);
}

/* ---------- Spinner ---------- */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Klickbare Kalender-Zeilen (Admin) ---------- */
.row-clickable {
    cursor: pointer;
}


/* Geschlossene Tage: per Klick als Zusatztag hinzufÃ¼gen */
.row-addable {
    cursor: cell;
    opacity: .45;
}


/* Buttons in klickbaren Zeilen: Klick-Events nicht an Zeile weitergeben */
.row-clickable .btn,
.row-addable .btn {
    position: relative;
    z-index: 1;
}

/* ---------- Filter: Schichten ausblenden ---------- */
.hide-closed .row-closed {
    display: none;
}

/* Alle Zeilen verstecken, die bereits besetzt sind, wenn der Filter aktiv ist */
.hide-filled .calendar-table tbody tr.is-filled {
    display: none;
}

/* Spezieller Fall: Wenn alle Schichten eines Tages besetzt sind, soll der ganze Block weg. */
/* Da wir rowspan nutzen, ist das CSS-technisch ohne :has schwierig für den Datum-Zellen-Block. */
/* Aber die Zeilen selbst auszublenden ist der erste Schritt zur Kompatibilität. */

/* Aktiver Filter-Button (Öffnungstage-Modus) */
.btn-active {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
}

/* ---------- Extra-Schicht-Zeilen ---------- */
.row-extra-shift {
    background: rgba(14, 165, 233, .045);
    border-top: 1px dashed #bae6fd !important;
}

.row-extra-shift td.extra-shift-cell {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

/* Extra-Shift Badge in der Zeit-Zelle */
.extra-shift-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    padding: .1rem .4rem;
    border-radius: 99px;
    background: #bae6fd;
    color: #0369a1;
    margin-left: .4rem;
    vertical-align: middle;
    white-space: nowrap;
}

/* ---------- Staff-Picker ---------- */
.staff-picker {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.staff-picker select.form-control {
    cursor: pointer;
}

/* Zweiter optionaler Staff-Picker â€“ kein optischer Unterschied mehr */
.staff-picker-2nd {
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px dashed var(--color-border);
}

/* Zweite Person in der Tabellenspalte â€“ gleich gestylt wie erste */
.field-content-2nd {
    font-size: .875rem;
    color: var(--color-text);
    line-height: 1.5;
    margin-top: .15rem;
}


/* --- Tablet (â‰¤ 960px) --- */
@media (max-width: 960px) {
    .topbar {
        padding: 0 1rem;
    }

    .container {
        padding: 1.25rem 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .month-nav .month-title {
        min-width: 120px;
        font-size: .9rem;
    }
}

/* --- Mobile: Card-Stacking-Layout (â‰¤ 700px) --- */
@media (max-width: 700px) {

    /* Tabellen-Kopfzeile ausblenden */
    .calendar-table thead {
        display: none;
    }

    /* Kalender-Wrapper ohne overflow-hidden damit Karten voll sichtbar */
    .calendar-wrapper {
        border-radius: var(--radius-md);
        overflow: visible;
        background: transparent;
        box-shadow: none;
        border: none;
    }

    /* Tabelle in Block-Layout umwandeln */
    .calendar-table,
    .calendar-table tbody,
    .calendar-table tr {
        display: block;
        width: 100%;
    }

    /* Jede Zeile = eigene Karte */
    .calendar-table tbody tr {
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        margin-bottom: .75rem;
        padding: .75rem;
        box-shadow: var(--shadow-sm);
        /* Farbmarkierung links via box-shadow inset */
    }

    .calendar-table tbody tr.row-open-day {
        border-left: 4px solid var(--color-primary);
    }

    .calendar-table tbody tr.row-extra-day {
        border-left: 4px solid #b45309;
    }

    .calendar-table tbody tr.row-closed {
        border-left: 4px solid var(--color-border);
        opacity: .5;
    }


    /* Datum-Zelle: volle Breite als Karten-Kopf */
    .calendar-table td.date-cell {
        display: block;
        width: calc(100% + 1.5rem);
        margin: -0.75rem -0.75rem 0.75rem -0.75rem;
        padding: 0.6rem 0.75rem;
        border-bottom: 1px solid var(--color-border-light);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    /* Hintergründe für den Karten-Kopf gemäß Schichtart */
    .row-open-day .date-cell {
        background: var(--color-open-day);
    }

    .row-extra-day .date-cell {
        background: var(--color-extra-day);
    }

    .row-weekend .date-cell {
        background: #eab2a0;
    }

    .row-closed .date-cell {
        background: #f1f5f9;
    }


    /* Alle anderen td: Label links, Wert rechts */
    .calendar-table td[data-label] {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: .75rem;
        padding: .35rem 0;
        border: none;
        min-height: 1.6rem;
    }

    /* Label aus data-label-Attribut */
    .calendar-table td[data-label]::before {
        content: attr(data-label);
        font-size: .72rem;
        font-weight: 700;
        color: var(--color-text-muted);
        text-transform: uppercase;
        letter-spacing: .05em;
        white-space: nowrap;
        flex-shrink: 0;
        /* Label darf nicht schrumpfen */
        padding-top: .15rem;
    }

    /* Inhalt rechtsbÃ¼ndig */
    .calendar-table td[data-label]>*,
    .calendar-table td[data-label]>.field-content,
    .calendar-table td[data-label]>.time-range,
    .calendar-table td[data-label]>.time-cell {
        text-align: right;
        flex: 1;
    }

    /* Aktions-Zelle: Label ausblenden, Buttons nebeneinander */
    .calendar-table td.action-cell {
        display: flex;
        gap: .5rem;
        padding-top: .6rem;
        margin-top: .3rem;
        border-top: 1px solid var(--color-border-light);
    }

    .calendar-table td.action-cell::before {
        display: none;
    }

    .calendar-table td.action-cell .btn {
        flex: 1;
        justify-content: center;
    }

    /* Ãœbergreifend */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }

    .page-header>button {
        align-self: stretch;
        justify-content: center;
    }

    .month-nav {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .legend {
        gap: .75rem;
    }

    .modal {
        max-width: 98vw;
        margin: .5rem;
    }

    /* ---------- Hamburger-MenÃ¼ ---------- */
    .nav-toggle {
        display: flex;
    }

    .topbar {
        height: 56px;
        padding: 0 1rem;
        flex-wrap: nowrap;
    }

    .topbar nav {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--color-nav-bg);
        box-shadow: var(--shadow-md);
        z-index: 99;
        padding: .5rem 0;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    .topbar nav.open {
        display: flex;
    }

    .topbar nav a {
        padding: .85rem 1.5rem;
        font-size: 1rem;
        border-radius: 0;
        opacity: 1;
        border-bottom: 1px solid rgba(255, 255, 255, .06);
    }

    .topbar nav a:last-child {
        border-bottom: none;
    }

    .topbar nav a.active {
        background: var(--color-nav-hover);
    }

    .topbar .user-info strong {
        display: none;
    }

    /* ---------- Users-Tabelle: Card-Stacking ---------- */
    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        margin-bottom: .75rem;
        padding: .75rem;
        box-shadow: var(--shadow-sm);
    }


    .data-table td[data-label] {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: .75rem;
        padding: .3rem 0;
        border: none;
    }

    .data-table td[data-label]::before {
        content: attr(data-label);
        font-size: .72rem;
        font-weight: 700;
        color: var(--color-text-muted);
        text-transform: uppercase;
        letter-spacing: .05em;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .data-table td[data-label]>* {
        text-align: right;
    }

    .data-table td.user-action-cell {
        display: flex;
        gap: .5rem;
        padding-top: .6rem;
        margin-top: .3rem;
        border-top: 1px solid var(--color-border-light);
    }

    .data-table td.user-action-cell::before {
        display: none;
    }

    .data-table td.user-action-cell .btn {
        flex: 1;
        justify-content: center;
    }

    .card {
        margin-bottom: 1rem;
    }
}