* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(160deg, #0f172a 0%, #164e63 100%);
    color: #e2e8f0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.wrap {
    max-width: 28rem;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    letter-spacing: 0.02em;
}

.sub {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0 0 1.25rem 0;
}

.card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
}

.card.card--edit-focus {
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    margin-top: 0.5rem;
}

.btn-start {
    background: linear-gradient(135deg, #059669, #0d9488);
}

.btn-secondary {
    background: rgba(71, 85, 105, 0.8);
    color: #e2e8f0;
    font-size: 0.95rem;
    padding: 0.65rem;
}

.form-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.35rem;
}

.form-actions-row .btn {
    margin-top: 0;
    width: auto;
}

a.btn-ghost {
    text-decoration: none;
}

.btn-ghost {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.list-entry-actions {
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.9rem;
}

.form-inline-delete {
    display: inline;
    margin: 0;
}

.btn-delete-entry {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fca5a5;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.btn-delete-entry:hover {
    text-decoration: underline;
}

.form-delete-eintrag {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.btn-delete-eintrag {
    font-size: 0.85rem;
    color: #fca5a5;
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.45);
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-delete-eintrag:hover {
    background: rgba(248, 113, 113, 0.12);
}

.btn-edit-entry {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7dd3fc;
    text-decoration: none;
}

.btn-edit-entry:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 0.75rem;
}

label {
    display: block;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 0.35rem;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.5rem;
    background: rgba(30, 41, 59, 0.8);
    color: #f1f5f9;
    font-size: 1rem;
}

textarea {
    min-height: 3.5rem;
    resize: vertical;
}

.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.messages li {
    padding: 0.65rem 0.85rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
}

.messages .error {
    background: rgba(127, 29, 29, 0.5);
    color: #fecaca;
}

.messages .success {
    background: rgba(20, 83, 45, 0.45);
    color: #bbf7d0;
}

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

.list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 0.9rem;
}

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

.list .muted {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.topbar {
    margin-bottom: 0.5rem;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    position: relative;
    z-index: 20;
}

.topbar-inner .app-title {
    flex: 1 1 auto;
    min-width: 0;
}

/* Burger-Menü (wie Rechnungs-App), nur schmale Ansichten */
.header-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.5rem;
    touch-action: manipulation;
    flex-shrink: 0;
    transition: background 0.2s;
}

.header-burger:hover {
    background: rgba(51, 65, 85, 0.65);
}

.header-burger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.25s;
}

.topbar .header-nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar a {
    color: #7dd3fc;
    font-size: 0.9rem;
}

.topbar .header-nav a {
    text-decoration: none;
}

.topbar .header-nav a:hover {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.header-nav-theme-slot {
    display: contents;
}

.header-nav-theme {
    display: none;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.28rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: inherit;
    color: #94a3b8;
    background: rgba(51, 65, 85, 0.28);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.4rem;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.header-nav-theme:hover {
    background: rgba(71, 85, 105, 0.5);
    color: #bae6fd;
    border-color: rgba(148, 163, 184, 0.35);
}

@media (min-width: 769px) {
    .header-nav-theme {
        display: inline-flex;
    }
}

.card-title {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: #cbd5e1;
}

.label-block {
    display: block;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
}

.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Fünf Arten: Raster nutzt volle Kartenbreite, gleichmäßige Zellen */
.segmented.segmented-einsatz-all {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.segmented-einsatz-all .seg-opt {
    flex: unset;
    min-width: 0;
    width: 100%;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
}

@media (max-width: 399px) {
    .segmented.segmented-einsatz-all {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .segmented-einsatz-all .seg-opt:nth-child(5) {
        grid-column: 1 / -1;
    }
}

/* Nur Büro / Außendienst / Homeoffice (Zeiterfassung, neue Einträge) */
.segmented.segmented-einsatz-arbeitszeit {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.segmented-einsatz-arbeitszeit .seg-opt {
    flex: unset;
    min-width: 0;
    width: 100%;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
}

@media (max-width: 399px) {
    .segmented.segmented-einsatz-arbeitszeit {
        grid-template-columns: 1fr;
    }
}

.abw-panel {
    margin-top: 0.25rem;
}

/* [hidden] zuverlässig ausblenden (Grid/Flex kann sonst Restfläche zeigen) */
.page-abwesenheit [hidden] {
    display: none !important;
}

.abw-ganztag-label {
    font-size: 0.88rem;
}

.segmented.segmented-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.segmented-2 .seg-opt {
    flex: unset;
    min-width: 0;
    width: 100%;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
}

.seg-opt-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    width: auto;
    flex: none;
    padding: 0.5rem 0.65rem;
}

.seg-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.seg-opt:has(input:checked) {
    border-color: #2dd4bf;
    background: rgba(13, 148, 136, 0.25);
}

.seg-opt input {
    margin: 0;
}

.form-row-datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 360px) {
    .form-row-datetime {
        grid-template-columns: 1fr;
    }
}

input[type="datetime-local"],
input[type="date"],
input[type="time"],
select {
    width: 100%;
    padding: 0.65rem 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.5rem;
    background: rgba(30, 41, 59, 0.8);
    color: #f1f5f9;
    font-size: 0.95rem;
}

.form-row-date-time {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Kompakte Datum/Uhrzeit-Zeile: immer zwei Spalten (auch schmale Handys) */
@media (max-width: 768px) {
    #manual-zeit-card .manual-zeit-intro {
        display: none;
    }

    .form-row-date-time--compact {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.45rem;
        margin-bottom: 0.35rem;
    }

    .form-row-date-time--compact .form-label-datetime {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    .form-row-date-time--compact .form-group {
        min-width: 0;
    }

    .form-row-date-time--compact input[type="date"],
    .form-row-date-time--compact input[type="time"] {
        min-width: 0;
        font-size: 0.85rem;
        padding: 0.5rem 0.35rem;
    }
}

.manual-block {
    margin-bottom: 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.manual-block:last-of-type {
    border-bottom: none;
}

.time-quick {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
}

.time-chip {
    flex-shrink: 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(45, 212, 191, 0.45);
    border-radius: 0.35rem;
    background: rgba(13, 148, 136, 0.2);
    color: #99f6e4;
    cursor: pointer;
}

.time-chip:active {
    background: rgba(13, 148, 136, 0.45);
}

.badge-einsatz {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.badge-einsatz-buero {
    background: rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}

.badge-einsatz-aussendienst {
    background: rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

.badge-einsatz-homeoffice {
    background: rgba(139, 92, 246, 0.35);
    color: #ddd6fe;
}

.badge-einsatz-urlaub {
    background: rgba(14, 165, 233, 0.35);
    color: #bae6fd;
}

.badge-einsatz-krankenstand {
    background: rgba(244, 63, 94, 0.32);
    color: #fecdd3;
}

.list li .badge-einsatz {
    margin-bottom: 0.35rem;
}

/* Zeit-App: breitere Browser-Ansicht (nicht nur Smartphone-Spalte) */
.page-zeit .app-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
}

.page-zeit h1.app-title {
    margin: 0;
}

.page-zeit .sub-user {
    margin-bottom: 1rem;
}

@media (min-width: 900px) {
    .page-zeit .wrap {
        max-width: 72rem;
        margin: 0 auto;
        padding: 1.25rem 1.5rem 2.5rem;
    }

    .page-zeit .app-title {
        font-size: 1.5rem;
    }

    .page-zeit .topbar {
        margin-bottom: 0.35rem;
    }

    .desk-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
        gap: 1.25rem 1.5rem;
        align-items: start;
    }

    .desk-main {
        min-width: 0;
    }

    .page-zeit .desk-layout.desk-layout--edit {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .page-zeit .desk-layout.desk-layout--edit .desk-main {
        width: 100%;
        max-width: 36rem;
    }

    .desk-side {
        position: sticky;
        top: 1rem;
        align-self: start;
    }

    .card-entries {
        max-height: calc(100vh - 2.5rem);
        max-height: calc(100dvh - 2.5rem);
        overflow-y: auto;
        margin-bottom: 0;
    }

    .card-entries-title {
        position: sticky;
        top: 0;
        z-index: 1;
        margin: -0.25rem -0.35rem 0.5rem;
        padding: 0.35rem 0.35rem 0.5rem;
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 70%, transparent);
    }

    .manual-start-end-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.25rem;
        margin-bottom: 0.35rem;
    }

    .manual-start-end-grid .manual-block {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .page-zeit .desk-main .btn {
        width: auto;
        min-width: 11rem;
    }
}

@media (min-width: 1200px) {
    .page-zeit .wrap {
        max-width: 80rem;
    }

    .desk-layout {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
        gap: 1.5rem 2rem;
    }

    .page-zeit .desk-layout.desk-layout--edit {
        grid-template-columns: 1fr;
    }
}

/* Admin-Auswertung */
.form-row-auswertung {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .form-row-auswertung {
        grid-template-columns: 1fr 1fr 1.25fr;
    }
}

.form-actions-auswertung {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.page-auswertung .btn-fit {
    margin-top: 0;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.15rem;
    padding: 0 0.15rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.5rem 0.45rem;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
}

.admin-table-total td {
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.admin-table-note {
    max-width: 18rem;
    word-break: break-word;
}

.admin-table-weekhead td {
    background: rgba(71, 85, 105, 0.45);
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.55rem 0.45rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.admin-table-week tr:not(.admin-table-weekhead) td.muted-cell {
    border-bottom-color: rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.35);
}

.diff-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.diff-cell--plus {
    color: #6ee7b7;
}

.diff-cell--minus {
    color: #fca5a5;
}

.auswertung-details {
    padding: 1.25rem;
}

.auswertung-details-summary {
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 700;
    color: #e2e8f0;
    list-style: none;
    margin: 0;
}

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

.auswertung-details-summary::before {
    content: '';
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    margin-right: 0.45em;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(-45deg) translateY(-0.1em);
    transition: transform 0.15s ease;
    vertical-align: middle;
}

.auswertung-details[open] .auswertung-details-summary::before {
    transform: rotate(45deg) translateY(-0.05em);
}

@media (min-width: 900px) {
    .page-auswertung .btn-fit {
        width: auto;
        min-width: 10rem;
    }
}

/* Admin: Benutzerverwaltung */
.topbar .header-nav a.nav-active {
    font-weight: 700;
    color: #bae6fd;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

@media (max-width: 768px) {
    .page-zeit {
        overflow-x: hidden;
    }

    /* Mehr Breite für Formulare: kein zusätzlicher Außenabstand zur Viewport-Kante (Karten haben eigenes padding) */
    .page-zeit .wrap {
        padding-left: 0;
        padding-right: 0;
    }

    .page-zeit .topbar-inner,
    .page-zeit .sub-user,
    .page-zeit .messages {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .page-zeit .topbar-inner .app-title {
        font-size: 1.1rem;
        line-height: 1.25;
    }

    .page-zeit .topbar-inner #header-app-title {
        -webkit-user-select: none;
        user-select: none;
    }

    .header-burger {
        display: flex;
        order: 2;
        z-index: 12;
    }

    .header-nav-theme-slot {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        margin-top: 0.35rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
        box-sizing: border-box;
    }

    .topbar .header-nav .header-nav-theme {
        display: inline-flex;
    }

    .topbar .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.28);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        padding: 0.75rem;
        gap: 0.25rem;
        z-index: 30;
        margin-top: 0.35rem;
        border-radius: 0.5rem;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }

    .topbar .header-nav a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 0.45rem;
        font-size: 1rem;
        white-space: nowrap;
    }

    .topbar .header-nav a:hover {
        background: rgba(51, 65, 85, 0.75);
        text-decoration: none;
    }

    body.nav-open .topbar .header-nav {
        display: flex;
    }

    /* Benutzerliste: Karten auf Mobile (wie Rechnungs-App, dunkles Theme) */
    .list-table-scroll-wrap .user-list-table {
        min-width: 0;
        display: block;
    }

    .list-table-scroll-wrap .user-list-table colgroup,
    .list-table-scroll-wrap .user-list-table thead {
        display: none;
    }

    .list-table-scroll-wrap .user-list-table tbody,
    .list-table-scroll-wrap .user-list-table tr,
    .list-table-scroll-wrap .user-list-table td {
        display: block;
        width: 100%;
    }

    .list-table-scroll-wrap .user-list-table tbody tr {
        border: 1px solid rgba(148, 163, 184, 0.28);
        border-radius: 0.75rem;
        margin-bottom: 0.75rem;
        padding: 1rem;
        background: rgba(30, 41, 59, 0.65);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    }

    .list-table-scroll-wrap .user-list-table td {
        padding: 0.35rem 0;
        border: none;
        font-size: 0.9rem;
    }

    .list-table-scroll-wrap .user-list-table td.col-name {
        font-weight: 700;
        font-size: 1.05rem;
        padding-bottom: 0.35rem;
        color: #f1f5f9;
    }

    .list-table-scroll-wrap .user-list-table td.col-email {
        color: #cbd5e1;
    }

    .list-table-scroll-wrap .user-list-table td.col-email::before {
        content: 'E-Mail';
        display: block;
        font-size: 0.68rem;
        font-weight: 600;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.15rem;
    }

    .list-table-scroll-wrap .user-list-table td.col-role::before {
        content: 'Rolle';
        display: block;
        font-size: 0.68rem;
        font-weight: 600;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.15rem;
    }

    .list-table-scroll-wrap .user-list-table td.col-role {
        padding-top: 0.5rem;
    }

    .list-table-scroll-wrap .user-list-table td.col-zeit-soll {
        width: 100%;
        padding-top: 0.45rem;
    }

    .list-table-scroll-wrap .user-list-table td.col-zeit-soll::before {
        content: 'Sollarbeitszeit (h/Woche)';
        display: block;
        font-size: 0.68rem;
        font-weight: 600;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.15rem;
    }

    .list-table-scroll-wrap .user-list-table td.col-created {
        font-size: 0.85rem;
        color: #94a3b8;
        width: 100%;
        padding-top: 0.35rem;
    }

    .list-table-scroll-wrap .user-list-table td.col-created::before {
        content: 'Angelegt';
        display: block;
        font-size: 0.68rem;
        font-weight: 600;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.15rem;
    }

    .list-table-scroll-wrap .user-list-table td.col-aktion {
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        border-top: 1px dashed rgba(148, 163, 184, 0.35);
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
        width: 100%;
    }

    .list-table-scroll-wrap .user-list-table td.col-aktion .btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

.sub-user a {
    color: #7dd3fc;
    font-size: inherit;
}

.th-sub-klein {
    display: block;
    font-weight: 400;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.2rem;
    white-space: normal;
}

.form-section-title-zeit {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: #e2e8f0;
}

.admin-user-toolbar {
    margin-bottom: 0.75rem;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.btn-small {
    padding: 0.45rem 0.55rem;
    font-size: 0.8rem;
    margin-top: 0;
    width: auto;
    min-width: 0;
}

.page-admin .admin-table th {
    white-space: normal;
}

/* Benutzerliste: Desktop-Spalten (wie Rechnungs-App) */
.list-table-scroll-wrap .user-list-table {
    table-layout: fixed;
    min-width: 52rem;
}

.list-table-scroll-wrap .user-list-table .col-name {
    width: 14%;
}

.list-table-scroll-wrap .user-list-table .col-email {
    width: 20%;
}

.list-table-scroll-wrap .user-list-table .col-role {
    width: 10%;
}

.list-table-scroll-wrap .user-list-table .col-zeit-soll {
    width: 14%;
}

.list-table-scroll-wrap .user-list-table .col-created {
    width: 12%;
}

.list-table-scroll-wrap .user-list-table .col-aktion {
    width: 30%;
}

.user-list-table thead .th-sub-klein {
    display: block;
    margin-top: 0.15rem;
}

/* Urlaubsübersicht: Kalender */
.urlaub-kal-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 1rem 0 0;
}

.urlaub-kal-view-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.urlaub-kal-view-switch a.btn {
    margin-top: 0;
    text-decoration: none;
}

.urlaub-kal-view-switch a.btn.is-active {
    border-color: rgba(56, 189, 248, 0.65);
    background: rgba(14, 165, 233, 0.22);
    color: #e0f2fe;
}

.urlaub-kal-step-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.urlaub-kal-step-nav .btn {
    margin-top: 0;
    min-width: 2.25rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    text-decoration: none;
    text-align: center;
}

.urlaub-kal-step-nav .btn[aria-disabled="true"] {
    opacity: 0.4;
    pointer-events: none;
}

.urlaub-kal-period-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.02em;
    flex: 1;
    min-width: 10rem;
}

@media (min-width: 720px) {
    .page-urlaub .wrap {
        max-width: 72rem;
        margin: 0 auto;
        padding: 1.25rem 1.5rem 2.5rem;
    }
}

.urlaub-kal-monate {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

@media (min-width: 640px) {
    .urlaub-kal-monate {
        grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
    }
}

.urlaub-kal-titel {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.65rem;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

.urlaub-kal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.urlaub-kal-wd {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0;
}

.urlaub-kal-zelle {
    min-height: 4rem;
    padding: 0.28rem 0.32rem 0.35rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.urlaub-kal-zelle--leer {
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    pointer-events: none;
}

.urlaub-kal-zelle--ausserhalb {
    opacity: 0.42;
}

.urlaub-kal-zelle--wochenende:not(.urlaub-kal-zelle--urlaub) {
    background: rgba(30, 41, 59, 0.55);
}

.urlaub-kal-zelle--feiertag {
    border-color: rgba(251, 191, 36, 0.65);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15);
}

.urlaub-kal-zelle--feiertag:not(.urlaub-kal-zelle--urlaub) {
    background: linear-gradient(165deg, rgba(180, 83, 9, 0.2) 0%, rgba(15, 23, 42, 0.55) 100%);
}

.urlaub-kal-zelle--feiertag.urlaub-kal-zelle--urlaub {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow:
        0 0 0 1px rgba(251, 191, 36, 0.35),
        0 0 0 2px rgba(14, 165, 233, 0.2);
    background: linear-gradient(160deg, rgba(14, 165, 233, 0.2) 0%, rgba(180, 83, 9, 0.12) 45%, rgba(15, 23, 42, 0.65) 100%);
}

.urlaub-kal-zelle--urlaub:not(.urlaub-kal-zelle--feiertag) {
    border-color: rgba(56, 189, 248, 0.55);
    background: linear-gradient(160deg, rgba(14, 165, 233, 0.22) 0%, rgba(15, 23, 42, 0.65) 100%);
    box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.12);
}

.urlaub-kal-feiertag {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fde68a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 900px) {
    .urlaub-kal-feiertag {
        font-size: 0.62rem;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

.urlaub-kal-tag-nr {
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #e2e8f0;
    line-height: 1.1;
}

.urlaub-kal-zelle--ausserhalb .urlaub-kal-tag-nr {
    color: #94a3b8;
}

.urlaub-kal-namen {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.urlaub-kal-name {
    font-size: 0.62rem;
    line-height: 1.25;
    color: #bae6fd;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 900px) {
    .urlaub-kal-zelle {
        min-height: 4.5rem;
    }

    .urlaub-kal-name {
        font-size: 0.68rem;
    }
}

/* —— Hellmodus (umschalten: Burger-Button schmal, „Modus“ in der Nav-Leiste breit) —— */
html.theme-light body {
    background: linear-gradient(160deg, #f1f5f9 0%, #e2e8f0 45%, #cbd5e1 100%);
    color: #0f172a;
}

html.theme-light .sub,
html.theme-light .list .muted {
    color: #475569;
}

html.theme-light .card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(71, 85, 105, 0.22);
}

html.theme-light .card-title,
html.theme-light .label-block,
html.theme-light label {
    color: #334155;
}

html.theme-light input[type="text"],
html.theme-light input[type="password"],
html.theme-light input[type="email"],
html.theme-light input[type="date"],
html.theme-light input[type="time"],
html.theme-light input[type="number"],
html.theme-light select,
html.theme-light textarea {
    background: #fff;
    border-color: rgba(71, 85, 105, 0.32);
    color: #0f172a;
}

html.theme-light .btn-secondary {
    background: rgba(226, 232, 240, 0.95);
    color: #1e293b;
}

html.theme-light .btn-ghost {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(71, 85, 105, 0.35);
    color: #1e293b;
}

html.theme-light .btn-start {
    background: linear-gradient(135deg, #0d9488, #059669);
    color: #fff;
}

html.theme-light .topbar a {
    color: #0369a1;
}

html.theme-light .topbar .header-nav a.nav-active {
    color: #0c4a6e;
}

html.theme-light .header-burger:hover {
    background: rgba(226, 232, 240, 0.85);
}

html.theme-light .header-burger-bar {
    background: #334155;
}

html.theme-light .header-nav-theme {
    color: #64748b;
    background: rgba(241, 245, 249, 0.75);
    border-color: rgba(71, 85, 105, 0.2);
}

html.theme-light .header-nav-theme:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: rgba(71, 85, 105, 0.28);
}

@media (max-width: 768px) {
    html.theme-light .topbar .header-nav {
        background: rgba(248, 250, 252, 0.98);
        border-color: rgba(71, 85, 105, 0.22);
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    }

    html.theme-light .topbar .header-nav .header-nav-theme-slot {
        border-top-color: rgba(71, 85, 105, 0.14);
    }

    html.theme-light .topbar .header-nav a:hover {
        background: rgba(226, 232, 240, 0.9);
    }
}

html.theme-light .time-chip {
    border-color: rgba(13, 148, 136, 0.45);
    background: rgba(240, 253, 250, 0.9);
    color: #0f766e;
}

html.theme-light .seg-opt {
    border-color: rgba(71, 85, 105, 0.28);
    background: rgba(248, 250, 252, 0.95);
    color: #1e293b;
}

html.theme-light .seg-opt:has(input:checked) {
    border-color: #0d9488;
    background: rgba(204, 251, 241, 0.65);
}

html.theme-light .card-entries-title {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 70%, transparent);
}

html.theme-light .btn-delete-eintrag {
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.45);
}

html.theme-light .btn-delete-eintrag:hover {
    background: rgba(254, 226, 226, 0.5);
}

html.theme-light .btn-delete-entry {
    color: #b91c1c;
}

html.theme-light .btn-edit-entry {
    color: #0369a1;
}

html.theme-light .admin-table {
    color: #0f172a;
}

html.theme-light .admin-table th,
html.theme-light .admin-table td {
    border-color: rgba(71, 85, 105, 0.2);
}

html.theme-light .list-table-scroll-wrap .user-list-table tbody tr {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(71, 85, 105, 0.2);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

html.theme-light .urlaub-kal-zelle {
    background: linear-gradient(160deg, rgba(241, 245, 249, 0.95) 0%, rgba(226, 232, 240, 0.85) 100%);
    border-color: rgba(71, 85, 105, 0.18);
}

html.theme-light .urlaub-kal-zelle--heute {
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.45);
}

html.theme-light .urlaub-kal-tag-nr {
    color: #0f172a;
}

html.theme-light .urlaub-kal-zelle--ausserhalb .urlaub-kal-tag-nr {
    color: #94a3b8;
}

html.theme-light .urlaub-kal-name {
    color: #0369a1;
}

html.theme-light .urlaub-kal-feiertag {
    color: #b45309;
}

html.theme-light .login-theme-fab {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(71, 85, 105, 0.28);
    color: #334155;
}

html.theme-light .login-theme-fab:hover {
    background: #f1f5f9;
}

.login-theme-fab {
    position: fixed;
    top: max(0.55rem, env(safe-area-inset-top));
    right: max(0.55rem, env(safe-area-inset-right));
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}
