:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #ffffff;
    --card: #ffffff;
    --text: #111827;
    --text-light: #6b7280;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* Header */
.header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top));
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transform: translateZ(0);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    will-change: transform;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.card-title {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Timer Display */
.timer-display {
    text-align: center;
    padding: 2rem 0;
}

.timer-time {
    font-size: 4rem;
    font-weight: 200;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}

.timer-date {
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Big Button */
.btn-big {
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.2s,
        opacity 0.2s,
        background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 64px;
}

.btn-big:active {
    transform: scale(0.98);
}

.btn-start {
    background: var(--success);
    color: white;
}

.btn-stop {
    background: var(--danger);
    color: white;
}

.btn-pause {
    background: var(--warning);
    color: white;
}

.btn-resume {
    background: var(--success);
    color: white;
}

.timer-running.paused .timer-time {
    color: var(--warning);
}

.pause-indicator {
    display: none;
    background: var(--warning);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.pause-indicator.active {
    display: inline-block;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.timer-buttons {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

.timer-buttons-row {
    display: flex;
    gap: 0.75rem;
}

.timer-buttons-row .btn-big {
    flex: 1;
}

/* Calendar Styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
}

.calendar-grid {
    will-change: transform;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-day {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: white;
    transition: all 0.2s;
    height: 70px;
    overflow: hidden;
}

.calendar-day:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.calendar-day.weekend {
    background: #f9fafb;
}

.calendar-day.target-met {
    background: #d1fae5;
    border-color: #10b981;
}

.calendar-day.sick {
    background: #fecaca;
    border-color: #ef4444;
}

.calendar-day.holiday {
    background: #bfdbfe;
    border-color: #3b82f6;
}

.calendar-day.vacation {
    background: #fde68a;
    border-color: #f59e0b;
}

.calendar-day.vacation-pending {
    background: #dad4b4;
    border-color: #c4b896;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-day.empty:active {
    transform: none;
}

.day-number {
    font-weight: 600;
    font-size: 0.875rem;
}

.day-hours {
    font-size: 0.625rem;
    color: var(--text-light);
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 0.25rem;
    border: 1px solid #e5e7eb;
}

.legend-color.work {
    background: white;
}
.legend-color.target {
    background: #d1fae5;
}
.legend-color.sick {
    background: #fecaca;
}
.legend-color.holiday {
    background: #bfdbfe;
}
.legend-color.vacation {
    background: #fde68a;
}
.legend-color.weekend {
    background: #f9fafb;
}

.day-detail-header {
    margin-bottom: 0.75rem;
}

.day-detail-header h3 {
    margin: 0 0 0.5rem 0;
}

.day-actions .week-entry-actions-bar {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.day-actions .btn,
.entry-item .btn {
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.day-actions .btn-danger,
.entry-item .btn-danger {
    border-color: var(--danger);
}

/* Buttons */
.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        transform 0.2s,
        opacity 0.2s,
        color 0.2s,
        background-color 0.2s;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid #d1d5db;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-block {
    width: 100%;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text);
}

input,
select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    -webkit-appearance: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Entry List */
.entry-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.entry-item {
    background: var(--bg);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-info {
    flex: 1;
}

.entry-item.filter-active {
    background: #eff6ff;
    box-shadow: inset 0 0 0 2px var(--primary);
}

.entry-date {
    font-weight: 600;
    font-size: 0.875rem;
}

.entry-time {
    color: var(--text-light);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.entry-duration {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.entry-project {
    font-size: 0.75rem;
    color: var(--text-light);
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
    margin-top: 0.25rem;
}

/* Status Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Navigation */
.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 100;
    transform: translateZ(0);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border: none;
    background: none;
    color: var(--text-light);
    font-size: 0.6875rem;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.25rem;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: #ffffff;
}

.login-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.calendar-day:active {
    border-color: var(--primary);
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.setup-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.numpad-btn {
    aspect-ratio: 1;
    border: none;
    background: var(--bg);
    border-radius: 1rem;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        transform 0.15s,
        opacity 0.15s,
        background-color 0.15s;
}

.numpad-btn:active {
    background: #d1d5db;
    transform: scale(0.95);
}

.numpad-btn.wide {
    grid-column: span 2;
    aspect-ratio: auto;
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: background 0.2s;
}

.pin-dot.filled {
    background: var(--primary);
}

/* Utility */
.hidden {
    display: none !important;
}
.text-center {
    text-align: center;
}
.mt-1 {
    margin-top: 0.5rem;
}
.mt-2 {
    margin-top: 1rem;
}
.mb-1 {
    margin-bottom: 0.5rem;
}
.mb-2 {
    margin-bottom: 1rem;
}
.flex {
    display: flex;
}
.gap-1 {
    gap: 0.5rem;
}
.gap-2 {
    gap: 1rem;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s,
        visibility 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 1.5rem 1.5rem 0 0;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
}

/* Schreibgeschützte Benutzerdetails (Manager) */
.user-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-light);
    font-weight: 500;
    flex-shrink: 0;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    z-index: 300;
    opacity: 0;
    transition:
        transform 0.3s,
        opacity 0.3s;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--danger);
}

.toast.success {
    background: var(--success);
}

/* Vacation Requests */
.vacation-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
    gap: 0.75rem;
}

.vacation-request-info {
    flex: 1;
    min-width: 0;
}

.vacation-request-info strong {
    display: block;
    margin-bottom: 0.125rem;
}

.vacation-request-info div {
    font-size: 0.8125rem;
    color: var(--text);
}

.vacation-request-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Notification Modal */
.notification-item {
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
}

.notification-item.approved {
    background: #d1fae5;
}

.notification-item.rejected {
    background: #fecaca;
}

select[size] {
    overflow-y: auto;
    padding: 0.5rem;
}
select[size] option {
    padding: 0.5rem;
}

.calendar-day.comp-time {
    background: #dbeafe;
    border-color: #3b82f6;
}

.vacation-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* ============================================================
   Buchhaltungs-Export
   ============================================================ */

.export-section .export-controls {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.export-section .export-controls:last-of-type {
    border-bottom: none;
}

.config-form {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.config-form h4 {
    font-size: 0.9375rem;
    margin-top: 0;
}

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

.config-form label {
    font-size: 0.8125rem;
}

.config-form input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.config-form input[type="number"]::-webkit-outer-spin-button,
.config-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

@media (max-width: 480px) {
    .export-section .export-controls > div {
        flex-direction: column;
    }

    .export-section .export-controls select,
    .export-section .export-controls input {
        width: 100% !important;
        min-width: unset !important;
    }
}

/* ============================================================
   Week List (Wochenansicht)
   ============================================================ */

.week-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.week-day {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
}

.week-day-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.75rem;
}

.week-day-header:hover {
    filter: brightness(0.97);
}

.week-day-header.weekend {
    background: #f9fafb;
}

.week-day-header.target-met {
    background: #d1fae5;
    border-color: #10b981;
}

.week-day-header.sick {
    background: #fecaca;
    border-color: #ef4444;
}

.week-day-header.holiday {
    background: #bfdbfe;
    border-color: #3b82f6;
}

.week-day-header.vacation {
    background: #fde68a;
    border-color: #f59e0b;
}

.week-day-header.vacation-pending {
    background: #dad4b4;
    border-color: #c4b896;
}

.week-day-header.comp-time {
    background: #dbeafe;
    border-color: #3b82f6;
}

.week-day-left {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.week-day-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.week-day-date {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.week-day-holiday {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

.week-day-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.week-day-center {
    flex: 1;
    text-align: center;
}

.week-day-status-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
}

.week-day-status-label.sick {
    background: #fecaca;
    color: #991b1b;
}

.week-day-status-label.vacation {
    background: #fde68a;
    color: #92400e;
}

.week-day-status-label.comp-time {
    background: #dbeafe;
    color: #1e40af;
}

.week-day-chevron {
    font-size: 0.875rem;
    color: var(--text-light);
    width: 1rem;
    text-align: center;
}

.week-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    background: #f3f4f6;
    color: var(--text);
}

.week-status.sick {
    background: #fecaca;
    color: #991b1b;
}

.week-status.comp-time {
    background: #dbeafe;
    color: #1e40af;
}

.week-status.vacation-pending {
    background: #dad4b4;
    color: #5c4d1d;
}

.week-status.vacation {
    background: #fde68a;
    color: #92400e;
}

.week-status.holiday {
    background: #bfdbfe;
    color: #1e40af;
}

.week-status.target-met {
    background: #d1fae5;
    color: #065f46;
}

.week-day-body {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.week-entry-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.week-entry-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    flex: 1;
}

.week-entry-time {
    font-weight: 500;
    font-size: 0.875rem;
}

.week-entry-project {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.week-entry-notes {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

.week-entry-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.week-entry-duration {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.week-entry-actions {
    display: flex;
    gap: 0.375rem;
}

.week-entry-actions .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-height: unset;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.week-entry-actions .btn-sm.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.week-entry-locked {
    font-size: 0.75rem;
    color: var(--text-light);
}

.week-entry-special.sick {
    background: #fecaca;
    border-color: #ef4444;
}

.week-entry-special.vacation {
    background: #fde68a;
    border-color: #f59e0b;
}

.week-entry-special.comp-time {
    background: #dbeafe;
    border-color: #3b82f6;
}

.week-entry-special.holiday {
    background: #bfdbfe;
    border-color: #3b82f6;
}

.week-entry-actions-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #d1d5db;
}

.week-entry-actions-bar .btn-sm {
    flex: 1;
    padding: 0.5rem 0.375rem;
    font-size: 0.8125rem;
    min-height: unset;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.week-entry-actions-bar .btn-sm.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.week-empty {
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.week-viewing-other {
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 0.375rem;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #f3f4f6;
}

/* ============================================================
   Schedule Cards (Arbeitszeiten)
   ============================================================ */

.schedule-mode-card {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    border: 2px solid var(--border-color, #e5e7eb);
    background: #fff;
    text-align: center;
    transition: all 0.15s;
}

.schedule-mode-card.active {
    border-color: var(--primary);
    background: #eff6ff;
}

.schedule-mode-card-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.schedule-mode-card-sub {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.schedule-day-row {
    display: grid;
    grid-template-columns: 1.75rem 4.5rem 0.5rem 4.5rem 0.5rem 2.5rem 3rem;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid #eee;
}

.schedule-day-label {
    font-weight: 600;
}

.schedule-time-input {
    padding: 0.25rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    width: 100%;
}

.schedule-break-icon {
    font-size: 0.6875rem;
    color: var(--text-light);
}

.schedule-break-val {
    font-size: 0.75rem;
    min-width: 2.5rem;
}

.schedule-break-val.has-break {
    color: var(--text);
}

.schedule-break-val.no-break {
    color: var(--text-light);
}

.schedule-day-hours {
    font-size: 0.8125rem;
    min-width: 3rem;
    text-align: right;
}

.schedule-day-hours.has-time {
    color: var(--success);
}

.schedule-day-hours.free {
    color: var(--text-light);
}

.schedule-sum-row {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.schedule-sum-text {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.schedule-sum-ok {
    color: var(--success);
    font-weight: 600;
}

.schedule-sum-warn {
    color: var(--warning);
    font-weight: 600;
}

/* Collapsible Admin Cards */
.card-collapsible h3 {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
}
.card-collapsible h3::before {
    content: '▼';
    font-size: 0.65rem;
    transition: transform 0.2s;
    display: inline-block;
    transform: rotate(-90deg);
}
.card-collapsible .card-body {
    display: none;
    margin-top: 0.75rem;
}
.card-collapsible.expanded h3::before {
    transform: rotate(0deg);
}
.card-collapsible.expanded .card-body {
    display: block;
}
.card-collapsible.expanded .card-badge {
    display: none;
}

/* Card Badge (Anzahl offener Anträge) */
.card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 3px;
    padding: 0 4px;
    margin-left: auto;
    line-height: 1;
}

/* Admin two-column layout and team overview */
.container.container-wide {
    max-width: 1200px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.admin-main,
.admin-team {
    min-width: 0;
}

/* Team-Übersicht nur auf Tablet/Desktop */
@media (max-width: 767px) {
    .admin-team {
        display: none;
    }
}

@media (min-width: 768px) {
    .admin-layout {
        grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    }
}

.team-overview-card {
    margin-bottom: 0;
}

.team-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.team-overview-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.team-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.team-grid {
    border-collapse: collapse;
    width: 100%;
    min-width: 640px;
    font-size: 0.75rem;
}

.team-grid th,
.team-grid td {
    border: 1px solid #e5e7eb;
    padding: 0.3rem 0.2rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.team-grid thead th {
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 1;
}

.team-employee {
    position: sticky;
    left: 0;
    background: #fff;
    text-align: left !important;
    min-width: 150px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 2;
    font-weight: 600;
}

.team-grid thead .team-employee {
    z-index: 3;
    background: #f9fafb;
}

.team-cell {
    min-width: 34px;
    height: 30px;
    color: var(--text);
}

.team-cell.weekend {
    background: #f3f4f6;
}

.team-cell.sick {
    background: #fecaca;
    color: #991b1b;
    font-weight: 700;
}

.team-cell.comp-time {
    background: #ddd6fe;
    color: #5b21b6;
    font-weight: 700;
}

.team-cell.vacation {
    background: #fde68a;
    color: #92400e;
    font-weight: 700;
}

.team-cell.holiday {
    background: #bfdbfe;
    color: #1e40af;
    font-weight: 700;
}

.team-cell.work {
    background: #fff;
}

.team-cell.target-met {
    background: #d1fae5;
    color: #065f46;
}

.team-overview-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
}

/* Team overview interactions */
.team-filter-bar {
    margin-bottom: 0.75rem;
}

.team-filter-bar input {
    width: 100%;
}

.team-filter-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1;
    padding: 0.25rem;
}

.team-filter-clear:hover {
    color: var(--text);
}

.team-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.team-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.team-day-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.team-day-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.team-cell {
    cursor: pointer;
}

.team-cell.active {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.team-cell.vacation-pending {
    background: #dad4b4;
    color: #6b5d2e;
    font-weight: 700;
}

/* Team overview pending comp-time */
.team-cell.comp-time-pending {
    background: #f3e8ff;
    color: #7c3aed;
    font-weight: 700;
}
