/* ==========================================================================
   Arbeitszeit – gemeinsames Stylesheet
   Aufbau: Tokens · Schrift · Basis · Layout (Kopfzeile, Navigation, Seite)
           · Komponenten · Seiten-Bausteine · Hilfsklassen
   Seiten verwenden nur diese Klassen; seitenspezifisches CSS bleibt die Ausnahme.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-sunken: #f1f5f9;
    --border: #e4e8ee;
    --border-strong: #cfd6df;

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-faint: #94a3b8;

    --primary: #0369a1;
    --primary-hover: #075985;
    --primary-soft: #e0f2fe;
    --primary-soft-text: #075985;
    --accent: #0ea5e9;

    --success: #047857;
    --success-solid: #059669;
    --success-hover: #047857;
    --success-soft: #d1fae5;

    --danger: #b91c1c;
    --danger-solid: #dc2626;
    --danger-hover: #b91c1c;
    --danger-soft: #fee2e2;

    --warning: #b45309;
    --warning-solid: #d97706;
    --warning-soft: #fef3c7;

    --violet: #6d28d9;
    --violet-soft: #ede9fe;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);
    --focus-ring: 0 0 0 3px rgba(14, 165, 233, 0.35);

    --header-h: 60px;
    --bottom-nav-h: 64px;
    --page-max: 1120px;
}

/* ---------- Schrift (lokal, OFL – siehe fonts/OFL.txt) ---------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-wght-normal.8e433c0592f7.woff2") format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                   U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-ext-wght-normal.ad4eb06671be.woff2") format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                   U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    font-feature-settings: 'cv11', 'tnum' 0;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--text); font-weight: 650; }
h1 { font-size: 24px; letter-spacing: -0.02em; }
h2 { font-size: 20px; letter-spacing: -0.01em; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

ul, ol { padding-left: 20px; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* Zahlen in Tabellen und Kennzahlen gleich breit */
.num, .stat-value, .table td.num, .timer-display { font-variant-numeric: tabular-nums; }

/* ---------- Kopfzeile ---------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.app-header-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
}
.brand-mark .icon { width: 18px; height: 18px; }
.brand-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: var(--radius-full);
    padding: 2px 8px;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.app-nav::-webkit-scrollbar { display: none; }
.app-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
.app-nav a:hover { background: var(--surface-sunken); color: var(--text); text-decoration: none; }
.app-nav a.active { background: var(--primary-soft); color: var(--primary-soft-text); font-weight: 600; }
.app-nav a .icon { width: 16px; height: 16px; }

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.user-menu form { display: contents; }
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    display: grid;
    place-items: center;
    text-transform: uppercase;
    flex-shrink: 0;
}
.user-name { font-size: 14px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
@media (max-width: 1400px) { .user-menu .user-name { display: none; } }

/* ---------- Untere Navigation (Handy) ---------- */
.bottom-nav { display: none; }

/* ---------- Seite ---------- */
.page {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 28px 20px 48px;
}
.page-narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.page-medium { max-width: 860px; margin-left: auto; margin-right: auto; }

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.page-header h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.back-link:hover { color: var(--text); text-decoration: none; }

.section { margin-top: 28px; }
.section:first-child { margin-top: 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.section-title { font-size: 16px; font-weight: 650; }
.section-subtitle { font-size: 13px; color: var(--text-muted); }

.messages { display: grid; gap: 8px; margin-bottom: 20px; }

/* ---------- Raster ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stack { display: grid; gap: 12px; }
.cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Karten ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.card-body { padding: 20px; }
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-title .icon { color: var(--text-muted); }
.card-subtitle { font-size: 13px; color: var(--text-muted); }
.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-muted);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.card-flush > .table-wrap { border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-muted { background: var(--surface-muted); box-shadow: none; }

/* ---------- Kennzahlen ---------- */
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-label .icon { width: 15px; height: 15px; }
.stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 6px;
    line-height: 1.15;
}
.stat-value small, .stat-unit { font-size: 14px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; margin-left: 2px; }
.stat-meta { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.stat-lg .stat-value { font-size: 34px; }
.stat-value-xl { font-size: 32px; margin-top: 0; }
.card-highlight, .stat.card-highlight { border-color: #bae6fd; box-shadow: 0 0 0 3px var(--primary-soft); }

.positive { color: var(--success); }
.negative { color: var(--danger); }
.warning-text { color: var(--warning); }

/* Schlüssel/Wert-Listen */
.kv { display: grid; gap: 0; }
.kv-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row dt, .kv-key { color: var(--text-muted); }
.kv-row dd, .kv-value { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv-total { font-weight: 700; border-top: 1px solid var(--border-strong); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-sunken); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-sunken); color: var(--text); }
.btn-success { background: var(--success-solid); color: #fff; }
.btn-success:hover { background: var(--success-hover); color: #fff; }
.btn-danger { background: var(--danger-solid); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover { background: #fecaca; color: var(--danger); }
.btn-warning { background: var(--warning-solid); color: #fff; }
.btn-warning:hover { background: var(--warning); color: #fff; }

.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { min-height: 34px; width: 34px; padding: 0; border-radius: var(--radius-sm); }
.btn-icon.btn-sm { width: 30px; min-height: 30px; }
.btn[disabled], .btn.disabled { opacity: 0.5; pointer-events: none; }

.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Abzeichen ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    background: var(--surface-sunken);
    color: var(--text-secondary);
}
.badge .icon { width: 13px; height: 13px; }
.badge-primary, .badge-info { background: var(--primary-soft); color: var(--primary-soft-text); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); }
.badge-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.badge-live::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- Hinweise ---------- */
.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 14px;
    background: var(--primary-soft);
    color: var(--primary-soft-text);
    border-color: #bae6fd;
}
.alert .icon { margin-top: 1px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert strong { font-weight: 650; }
.alert-success { background: var(--success-soft); color: #065f46; border-color: #a7f3d0; }
.alert-danger, .alert-error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-warning { background: var(--warning-soft); color: #92400e; border-color: #fde68a; }
.alert-info, .alert-debug { background: var(--primary-soft); color: var(--primary-soft-text); border-color: #bae6fd; }

/* Formularfehler (von Views als Liste 'errors' geliefert) */
.error-list {
    background: var(--danger-soft);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 12px 14px;
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 16px;
}
.error-list ul { margin: 0; padding-left: 18px; }

/* ---------- Tabellen ---------- */
.table-wrap {
    position: relative;  /* hält absolut positionierte Kinder (z.B. .sr-only) im Scrollbereich */
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.card > .table-wrap { border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 16px;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-muted); }
.table .num, .table th.num { text-align: right; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn-group { justify-content: flex-end; flex-wrap: nowrap; }
.table tfoot td, .table .total-row td { font-weight: 700; background: var(--surface-muted); border-top: 1px solid var(--border-strong); }
.table-compact td { padding: 8px 14px; }
.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 13px; color: var(--text-muted); }

/* ---------- Formulare ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
fieldset { border: 0; min-width: 0; }
legend { font-size: 14px; font-weight: 550; margin-bottom: 6px; }
.field label, .label { font-size: 14px; font-weight: 550; color: var(--text); }
.field .help, .help { font-size: 13px; color: var(--text-muted); }
.required::after { content: ' *'; color: var(--danger); }

.input,
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="date"], .field input[type="time"],
.field input[type="datetime-local"], .field input[type="search"], .field select, .field textarea,
.input-inline {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}
.field select, select.input, select.input-inline {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}
.field textarea { min-height: 96px; resize: vertical; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-faint); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .input-inline:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}
.input-inline { width: auto; min-height: 36px; font-size: 14px; }

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}
.check input[type="checkbox"], .check input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.check-title { font-weight: 550; }
.check-help { display: block; font-size: 13px; color: var(--text-muted); }

/* Auswahlkacheln (z.B. Abwesenheitsart, Reiseart) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.choice {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    font-size: 14px;
}
.choice:hover { border-color: var(--text-faint); }
.choice input { margin-top: 3px; accent-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 4px;
}
.form-actions-split { justify-content: space-between; }

/* Filterleiste über Listen */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}
.filter-bar .field { min-width: 150px; flex: 1 1 150px; }
.filter-bar .field label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Umschalter / Tabs ---------- */
.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 100%;
    overflow-x: auto;
}
.segmented a, .segmented button {
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 550;
    color: var(--text-secondary);
    white-space: nowrap;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.segmented a:hover, .segmented button:hover { color: var(--text); text-decoration: none; }
.segmented .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Zeitraum-Navigation: ‹  Oktober 2026  › */
.period-nav { display: inline-flex; align-items: center; gap: 6px; }
.period-label { font-weight: 650; font-size: 15px; min-width: 120px; text-align: center; white-space: nowrap; }

/* ---------- Fortschritt ---------- */
.progress {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    max-width: 100%;
    transition: width 0.4s ease;
}
.progress-bar.warning { background: var(--warning-solid); }
.progress-bar.danger { background: var(--danger-solid); }
.progress-bar.success { background: var(--success-solid); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }

/* ---------- Leere Zustände ---------- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}
.empty-state .icon { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--text-faint); stroke-width: 1.5; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }

/* ---------- Listen (Zeilen mit Aktionen) ---------- */
.list { display: grid; }
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    min-width: 0;
}
.list-item:last-child { border-bottom: 0; }
.list-item-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.list-item-title { font-weight: 600; }
.list-item-meta { font-size: 13px; color: var(--text-muted); }
.list-item-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------- Tagesgruppen (Einträge, Statistik) ---------- */
.day-group + .day-group { margin-top: 12px; }
.day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-wrap: wrap;
}
.day-title { font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-totals { display: flex; align-items: center; gap: 8px; }
.time-range { font-weight: 600; font-variant-numeric: tabular-nums; }
.sub-list {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--surface-muted);
    border-radius: var(--radius);
    display: grid;
    gap: 6px;
    font-size: 13px;
}
.sub-list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Dashboard: Zeiterfassung ---------- */
.timer-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 24px;
}
.timer-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.timer-display {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.timer-caption { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.timer-actions { display: grid; gap: 10px; min-width: 220px; }
.timer-actions form { display: contents; }
.timer-card.is-running { border-color: #a7f3d0; box-shadow: 0 0 0 3px var(--success-soft); }
.timer-card.is-paused { border-color: #fde68a; box-shadow: 0 0 0 3px var(--warning-soft); }

/* ---------- Anmeldung ---------- */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background:
        radial-gradient(1200px 500px at 10% -10%, #e0f2fe 0%, transparent 60%),
        radial-gradient(900px 400px at 110% 110%, #ede9fe 0%, transparent 55%),
        var(--bg);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; text-align: center; }
.auth-brand .brand-mark { width: 48px; height: 48px; border-radius: 13px; }
.auth-brand .brand-mark .icon { width: 26px; height: 26px; }

/* ---------- Kalender-Kacheln (Woche) ---------- */
.day-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: grid;
    gap: 10px;
    align-content: start;
    min-width: 0;
}
.day-tile.is-today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--primary-soft); }
.day-tile.is-weekend, .day-tile.is-holiday { background: var(--surface-muted); }
.day-tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }

/* ---------- Hilfsklassen ---------- */
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }
.only-mobile { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Responsiv
   ========================================================================== */
@media (max-width: 1300px) {
    .app-nav a .icon { display: none; }
}

@media (max-width: 960px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    body { font-size: 15px; }
    body.has-nav { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }

    .app-header-inner { height: 56px; padding: 0 16px; gap: 12px; }
    .app-nav { display: none; }
    .user-name, .hide-mobile { display: none; }
    .only-mobile { display: revert; }

    .page { padding: 20px 16px 32px; }
    h1 { font-size: 21px; }
    .page-header { margin-bottom: 18px; align-items: flex-start; }
    .page-actions { width: 100%; }
    .page-actions > .btn, .page-actions > form > .btn { flex: 1 1 auto; }

    .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid { gap: 12px; }
    .form-row, .form-row-3 { grid-template-columns: minmax(0, 1fr); }

    .card-body { padding: 16px; }
    .card-header, .day-head, .list-item { padding-left: 16px; padding-right: 16px; }
    .stat { padding: 14px; }
    .stat-value { font-size: 22px; }
    .stat-lg .stat-value { font-size: 28px; }
    .stat-value-xl { font-size: 28px; }

    .list-item { flex-wrap: wrap; }
    .list-item-side { margin-left: auto; }

    .table th, .table td { padding: 10px 12px; }

    .timer-card { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 18px; text-align: center; }
    .timer-status { justify-content: center; }
    .timer-display { font-size: 44px; }
    .timer-actions { min-width: 0; }

    .form-actions .btn { flex: 1 1 auto; }

    /* Untere Navigation */
    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: saturate(180%) blur(8px);
        border-top: 1px solid var(--border);
    }
    .bottom-nav > a, .bottom-nav summary {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 11px;
        font-weight: 550;
        color: var(--text-muted);
        list-style: none;
        cursor: pointer;
        min-width: 0;
    }
    .bottom-nav summary::-webkit-details-marker { display: none; }
    .bottom-nav .icon { width: 22px; height: 22px; }
    .bottom-nav > a:hover { text-decoration: none; }
    .bottom-nav > a.active, .bottom-nav details.active > summary, .bottom-nav details[open] > summary { color: var(--primary); }
    .bottom-nav details { flex: 1; display: flex; }
    .bottom-nav details > summary { width: 100%; }
    .more-sheet {
        position: fixed;
        right: 12px;
        left: 12px;
        bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 8px);
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        padding: 6px;
        display: grid;
    }
    .more-sheet a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        border-radius: var(--radius);
        color: var(--text);
        font-weight: 550;
    }
    .more-sheet a:hover { background: var(--surface-sunken); text-decoration: none; }
    .more-sheet a.active { background: var(--primary-soft); color: var(--primary-soft-text); }
}

@media (max-width: 420px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-value { font-size: 20px; }
    .btn-lg { min-height: 52px; }
}

@media print {
    .app-header, .bottom-nav, .page-actions, .form-actions, .btn { display: none !important; }
    body { background: #fff; }
    .card, .stat { box-shadow: none; }
}
