/* ============================================================
   Kurszeit Design System — 2026
   ============================================================ */

/* Inter – self-hosted (DSGVO-konform, kein externer CDN) */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Design Tokens – Farben aus dem TSV-Wappen (Tannengrün · Gold · Weinrot),
   abgestimmt mit nc-admin, damit alle TSV-Anwendungen gleich aussehen. */
:root {
    --sidebar-width: 264px;
    --sidebar-collapsed-width: 72px;
    --topbar-height: 64px;

    --brand-forest:      #034135;
    --brand-forest-2:    #0a5443;
    --brand-forest-deep: #022d25;
    --brand-gold:        #f0b400;
    --brand-wine:        #a0191d;

    --sidebar-bg:       linear-gradient(180deg, var(--brand-forest) 0%, var(--brand-forest-deep) 100%);
    --sidebar-border:   rgba(255,255,255,.08);
    --sidebar-hover:    rgba(255,255,255,.07);
    --sidebar-active:   rgba(255,255,255,.12);
    --sidebar-accent:   var(--brand-gold);
    --sidebar-text:     rgba(255,255,255,.74);
    --sidebar-text-active: #ffffff;
    --sidebar-icon:     rgba(255,255,255,.52);

    --body-bg:          #f4f6f5;
    --topbar-bg:        #ffffff;
    --card-bg:          #ffffff;
    --card-border:      #e2e8e5;
    --card-shadow:      0 1px 2px rgba(16,24,20,.05);
    --card-shadow-hover:0 6px 18px rgba(16,24,20,.08);

    --text-primary:     #18221f;
    --text-secondary:   #3b4844;
    --text-muted:       #63706b;
    --text-xmuted:      #6b7772;

    --border-color:     #e2e8e5;
    --input-border:     #cdd6d2;
    --input-focus:      #0f6b52;

    --accent:           #0f6b52;
    --accent-hover:     #0a5443;
    --accent-light:     #e7f2ee;
    --accent-text:      #0a5443;
    --accent-rgb:       15, 107, 82;

    --success:          #237a35;
    --success-light:    #e3f4e7;
    --warning:          #a35f00;
    --warning-light:    #fff3d6;
    --danger:           #b42318;
    --danger-light:     #fde8e6;
    --info:             #1d6fb8;
    --info-light:       #e3effa;

    --radius-sm:        6px;
    --radius:           8px;
    --radius-lg:        12px;
    --radius-xl:        16px;

    --transition:       0.16s ease;

    /* Tabler-Variablen auf das TSV-Theme setzen */
    --tblr-primary:     #0f6b52;
    --tblr-primary-rgb: 15, 107, 82;
    --tblr-primary-fg:  #ffffff;
    --tblr-primary-darken: #0a5443;
    --tblr-primary-lt:  #e7f2ee;
    --tblr-link-color:  #0f6b52;
    --tblr-link-color-rgb: 15, 107, 82;
    --tblr-link-hover-color: #0a5443;
    --tblr-font-sans-serif: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --tblr-body-bg:     #f4f6f5;
    --tblr-body-color:  #18221f;
    --tblr-border-color: #e2e8e5;
    --tblr-focus-ring-color: rgba(15,107,82,.25);
}

/* ─── Base ──────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ─── Sidebar ────────────────────────────────────────────── */

.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width var(--transition);
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    min-height: var(--topbar-height);
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 36px; height: 36px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    color: #fff;
}

.sidebar-brand-text {
    display: flex; flex-direction: column;
    overflow: hidden;
}

.sidebar-brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.sidebar-brand-sub {
    font-size: 0.7rem;
    color: var(--sidebar-text);
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-border) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 2px; }

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sidebar-icon);
    padding: 16px 20px 6px;
    white-space: nowrap;
}

.sidebar-item {
    padding: 2px 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
    position: relative;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
    text-decoration: none;
}

.sidebar-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    box-shadow: inset 3px 0 0 var(--brand-gold);
}

.sidebar-link.active .sidebar-link-icon {
    color: var(--sidebar-accent);
}

.sidebar-link-icon {
    width: 18px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
    color: var(--sidebar-icon);
    transition: color var(--transition);
}

.sidebar-link:hover .sidebar-link-icon { color: var(--sidebar-accent); }

.sidebar-badge {
    margin-left: auto;
    background: var(--warning);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-badge.pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.5); }
    50%       { box-shadow: 0 0 0 4px rgba(245,158,11,0); }
}

/* Sidebar User Panel */
.sidebar-user {
    padding: 14px 16px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; flex: 1; }

.sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.68rem;
    color: var(--sidebar-text);
    white-space: nowrap;
}

.sidebar-user-logout {
    color: var(--sidebar-text);
    background: none;
    border: none;
    padding: 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}

.sidebar-user-logout:hover { background: var(--sidebar-hover); color: var(--danger); }

/* ─── Main Wrapper ───────────────────────────────────────── */

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

/* ─── Topbar ─────────────────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    z-index: 100;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.topbar-title small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: -1px;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ─── Page Content ───────────────────────────────────────── */

.page-content {
    flex: 1;
    padding: 28px;
}

/* ─── Cards ──────────────────────────────────────────────── */

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--card-shadow-hover); }

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body { padding: 20px; }
.card-footer {
    background: #fafafa;
    border-top: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* KPI Cards */
.kpi-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.kpi-card .kpi-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-card .kpi-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.kpi-card .kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Color Variants */
.kpi-accent   .kpi-icon { background: var(--accent-light); color: var(--accent); }
.kpi-success  .kpi-icon { background: var(--success-light); color: var(--success); }
.kpi-warning  .kpi-icon { background: var(--warning-light); color: var(--warning); }
.kpi-danger   .kpi-icon { background: var(--danger-light); color: var(--danger); }
.kpi-info     .kpi-icon { background: var(--info-light); color: var(--info); }
.kpi-muted    .kpi-icon { background: #f1f5f9; color: var(--text-muted); }

/* ─── Buttons ────────────────────────────────────────────── */

.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb),.28);
}

.btn-outline-primary {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-light {
    background: var(--body-bg);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.btn-light:hover { background: var(--border-color); }

/* ─── Forms ──────────────────────────────────────────────── */

.form-control, .form-select {
    border-color: var(--input-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.18);
    outline: none;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

/* ─── Tables ─────────────────────────────────────────────── */

.table {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.table thead th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 16px;
    background: #fafafa;
    white-space: nowrap;
}

.table tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover td { background: #f8fafc; }

.table-light { --bs-table-bg: #fafafa; }

/* ─── Badges / Status Pills ──────────────────────────────── */

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

.status-draft     { background: #f1f5f9; color: #475569; }
.status-submitted { background: var(--warning-light); color: #92400e; }
.status-approved  { background: var(--success-light); color: #065f46; }
.status-rejected  { background: var(--danger-light);  color: #991b1b; }
.status-paid      { background: var(--info-light);    color: #1e40af; }

/* ─── Page Header ────────────────────────────────────────── */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
    letter-spacing: -0.02em;
}

.page-header-sub {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin: 0;
}

/* ─── Toast Notifications ────────────────────────────────── */

.toast-container-custom {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    width: 100%;
}

.toast-custom {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-custom.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-custom.hide {
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.2s ease;
}

.toast-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: var(--success-light); color: var(--success); }
.toast-error   .toast-icon { background: var(--danger-light);  color: var(--danger); }
.toast-info    .toast-icon { background: var(--info-light);    color: var(--info); }

.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); margin-bottom: 2px; }
.toast-message { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.toast-close {
    background: none; border: none; padding: 0;
    color: var(--text-xmuted); cursor: pointer; font-size: 16px; line-height: 1;
    flex-shrink: 0; margin-top: 2px;
}
.toast-close:hover { color: var(--text-primary); }

.toast-progress {
    height: 3px;
    background: var(--border-color);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    margin: 10px -16px -14px;
}

.toast-progress-bar {
    height: 100%;
    border-radius: 2px;
    animation: toastProgress 4.5s linear forwards;
}

.toast-success .toast-progress-bar { background: var(--success); }
.toast-error   .toast-progress-bar { background: var(--danger); }
.toast-info    .toast-progress-bar { background: var(--info); }

@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

/* ─── Avatar ─────────────────────────────────────────────── */

.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; color: #fff;
    border-radius: 50%; flex-shrink: 0;
    font-size: 13px;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar-md { width: 36px; height: 36px; }
.avatar-lg { width: 44px; height: 44px; font-size: 16px; }
.avatar-xl { width: 80px; height: 80px; font-size: 28px; }
.avatar-accent  { background: var(--accent); }
.avatar-success { background: var(--success); }
.avatar-warning { background: var(--warning); }
.avatar-info    { background: var(--info); }

/* ─── Guest / Auth Pages ─────────────────────────────────── */

.auth-body {
    min-height: 100vh;
    display: flex;
    background: var(--body-bg);
}

.auth-panel {
    width: 420px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px;
}

.auth-panel-brand {
    display: flex; align-items: center; gap: 12px; margin-bottom: 48px;
}

.auth-panel-brand-icon {
    width: 40px; height: 40px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
}

.auth-panel-brand-name {
    font-size: 1.1rem; font-weight: 700; color: #fff;
}

.auth-panel-tagline {
    color: var(--sidebar-text);
    font-size: 0.875rem;
    line-height: 1.7;
}

.auth-panel-tagline h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.auth-panel-footer {
    font-size: 0.75rem;
    color: var(--sidebar-icon);
}

.auth-form-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-card {
    width: 100%;
    max-width: 400px;
}

.auth-form-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.auth-form-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ─── Mobile Sidebar Toggle ──────────────────────────────── */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1039;
    backdrop-filter: blur(2px);
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .main-wrapper { margin-left: 0 !important; }
    .topbar { padding: 0 16px; }
    .page-content { padding: 16px; }
}

/* ─── Mobile-First Safety Net ────────────────────────────── */
/* Verhindert, dass Header-/Filterzeilen (d-flex justify-content-between
   etc.) auf schmalen Screens gequetscht werden statt umzubrechen. */
@media (max-width: 575.98px) {
    .d-flex:not(.flex-nowrap) { flex-wrap: wrap; row-gap: 8px; }
}

/* ─── Utilities ──────────────────────────────────────────── */

.text-accent { color: var(--accent); }
.bg-accent   { background: var(--accent); }
.border-accent { border-color: var(--accent) !important; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.rounded-lg { border-radius: var(--radius-lg) !important; }

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 16px 0;
}

/* Input Group clean */
.input-group-text {
    background: #f8fafc;
    border-color: var(--input-border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Pagination */
.pagination .page-link {
    border-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.825rem;
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
    min-width: 32px;
    text-align: center;
}

.pagination .page-link:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); }

/* ─── Empty States ───────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 56px 24px;
}

.empty-state-icon {
    width: 72px; height: 72px;
    border-radius: var(--radius-xl);
    background: var(--body-bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    color: var(--text-xmuted);
    margin: 0 auto 20px;
}

.empty-state h5 {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

/* Dropdown clean */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    font-size: 0.875rem;
    padding: 6px;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    color: var(--text-secondary);
    transition: background var(--transition);
}

.dropdown-item:hover { background: var(--accent-light); color: var(--accent-text); }
.dropdown-item.text-danger:hover { background: var(--danger-light); color: var(--danger); }

.dropdown-divider { border-color: var(--border-color); margin: 4px 0; }
.dropdown-header { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; padding: 8px 12px 4px; }

/* ─── Welcome / Landing Page ─────────────────────────────── */

.welcome-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    min-height: 100vh;
}

.hero-card {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.97);
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: 0 32px 80px rgba(0,0,0,.25);
}

.btn-auth {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transition: all var(--transition);
}

.btn-auth:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb),.35);
}

/* ============================================================
   Docs / Hilfe-Seiten
   ============================================================ */
.docs-nav { padding: 8px 0; }
.docs-nav-link {
    display: block; padding: 8px 16px; font-size: .825rem;
    color: var(--text-secondary); text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.docs-nav-link:hover { background: var(--accent-light); color: var(--accent); }
.docs-step {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.docs-check-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border-radius: var(--radius);
    border: 1px solid var(--border-color); background: #fafafa;
}
.docs-required i { color: var(--accent); font-size: 18px; width: 24px; text-align: center; }
.docs-tip {
    display: flex; gap: 10px; padding: 12px 16px;
    background: var(--accent-light); border-radius: var(--radius);
    border-left: 3px solid var(--accent);
    font-size: .875rem; color: var(--accent-text); margin-top: 12px;
}
.docs-tip i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.docs-list { padding-left: 20px; line-height: 2; font-size: .875rem; }
.docs-list li { margin-bottom: 4px; }
.docs-info-box {
    padding: 14px; border-radius: var(--radius);
    border: 1px solid var(--border-color); background: #fafafa;
    font-size: .825rem;
}

/* ============================================================
   Öffentliches Layout (layouts/public): Impressum, Datenschutz
   ============================================================ */
.public-body { background: var(--body-bg); color: var(--text-primary); min-height: 100vh; display: flex; flex-direction: column; }
.public-header { background: var(--sidebar-bg); border-bottom: 1px solid var(--sidebar-border); }
.public-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--topbar-height); }
.public-brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--sidebar-text-active); text-decoration: none; font-weight: 700; }
.public-brand:hover, .public-brand:focus-visible { color: var(--sidebar-text-active); }
.public-brand-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--sidebar-accent); color: #fff; }
.public-brand-name { font-size: 1.05rem; }
.public-main { flex: 1; max-width: 860px; padding-top: 2rem; padding-bottom: 2rem; }
.public-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.public-title small { display: block; font-size: .85rem; font-weight: 400; color: var(--text-muted); margin-top: .25rem; }
.public-content { line-height: 1.65; overflow-wrap: anywhere; }
.public-footer { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; padding-bottom: 1.5rem; font-size: .85rem; color: var(--text-muted); }
.public-footer a { color: var(--text-muted); }
.public-footer a:hover, .public-footer a:focus-visible { color: var(--accent-text); }

/* ============================================================
   Tabler-Brücke & Business-Look (2026)
   Die Views sind auf Bootstrap-Maße ausgelegt; Tabler ist kompakter.
   Hier werden Typo-Skala, Komponenten und Details angeglichen.
   ============================================================ */

/* ── Typografie ─────────────────────────────────────────── */
html { font-size: 16px; }
body {
    font-family: var(--tblr-font-sans-serif);
    font-size: .9rem;
    font-feature-settings: "cv11", "ss01";
    background: var(--body-bg);
}
h1, .h1 { font-size: 1.75rem; } h2, .h2 { font-size: 1.5rem; } h3, .h3 { font-size: 1.25rem; }
h4, .h4 { font-size: 1.1rem; }  h5, .h5 { font-size: 1rem; }    h6, .h6 { font-size: .875rem; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 650; color: var(--text-primary); letter-spacing: -.01em; }
.fs-1 { font-size: 2.25rem !important; } .fs-2 { font-size: 1.85rem !important; } .fs-3 { font-size: 1.5rem !important; }
.fs-4 { font-size: 1.25rem !important; } .fs-5 { font-size: 1.05rem !important; } .fs-6 { font-size: .95rem !important; }
.small, small { font-size: .825em; }
.text-muted { color: var(--text-muted) !important; }

/* Zahlen in Tabellen & Kennzahlen mit fester Ziffernbreite */
.table, .kpi-value, .text-end, .badge { font-variant-numeric: tabular-nums; }

/* Rechnungsnummern u. ä.: dezenter Chip statt Code-Optik */
code {
    font-family: var(--tblr-font-sans-serif);
    font-size: .85em;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--accent-light);
    padding: .15em .5em;
    border-radius: var(--radius-sm);
    letter-spacing: .01em;
    overflow-wrap: anywhere;
}
/* In Tabellen (Rechnungsnummern) nicht umbrechen */
.table code { white-space: nowrap; }
a code { color: inherit; }

/* ── Sidebar: TSV-Logo statt Stoppuhr-Icon ──────────────── */
.sidebar { background: var(--sidebar-bg); border-right: 0; }
.sidebar-brand { padding: 18px 18px 16px; }
.sidebar-brand-logo { height: 42px; width: auto; flex-shrink: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.sidebar-brand-name { font-size: 1.05rem; letter-spacing: .01em; }
.sidebar-brand-sub { font-size: .68rem; letter-spacing: .08em; color: rgba(255,255,255,.6); }
.sidebar-section-label { color: rgba(255,255,255,.45); letter-spacing: .09em; }
.sidebar-link .ti { font-size: 18px; }
.sidebar-badge { background: var(--brand-gold); color: var(--brand-forest-deep); }
.sidebar-user-avatar { background: var(--brand-gold); color: var(--brand-forest-deep); }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar { box-shadow: 0 1px 0 var(--border-color); border-bottom: 0; }

/* ── Karten ─────────────────────────────────────────────── */
.card { border-radius: var(--radius-lg); }
.card:hover { box-shadow: var(--card-shadow); }   /* Karten sind keine Buttons */
a.card:hover, .card.card-link:hover { box-shadow: var(--card-shadow-hover); }
.card-header { font-weight: 650; }
.card-footer { background: #fafbfa; }
.kpi-card .kpi-label { letter-spacing: .05em; font-weight: 600; font-size: .72rem; }
.kpi-card .kpi-value { font-size: 1.6rem; letter-spacing: -.01em; }

/* ── Buttons ────────────────────────────────────────────── */
.btn { letter-spacing: 0; font-weight: 550; }
.btn .ti { font-size: 1.15em; vertical-align: -.15em; }
.btn-primary { --tblr-btn-bg: var(--accent); --tblr-btn-border-color: var(--accent);
    --tblr-btn-hover-bg: var(--accent-hover); --tblr-btn-hover-border-color: var(--accent-hover);
    --tblr-btn-active-bg: var(--accent-hover); }
.btn-primary:hover, .btn-primary:focus { box-shadow: 0 2px 8px rgba(var(--accent-rgb),.25); }
.btn-outline-primary { --tblr-btn-color: var(--accent); --tblr-btn-border-color: var(--accent);
    --tblr-btn-hover-bg: var(--accent); --tblr-btn-hover-border-color: var(--accent); }

/* ── Tabellen: ruhige Köpfe, klare Zeilen ───────────────── */
.table thead th {
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--text-muted);
    background: #f8faf9;
    font-weight: 600;
}
.table thead th a { color: inherit !important; }
.table tbody tr:hover td { background: #f6f9f7; }

/* ── Badges ─────────────────────────────────────────────── */
.badge { letter-spacing: .01em; font-weight: 600; }
.status-draft     { background: #eef1ef; color: #4a5752; }
.status-submitted { background: var(--warning-light); color: #8a4b00; }
.status-approved  { background: var(--success-light); color: #1e6b31; }
.status-rejected  { background: var(--danger-light);  color: #8f1c13; }
.status-paid      { background: var(--info-light);    color: #17548c; }

/* ── Formulare ──────────────────────────────────────────── */
.form-label { letter-spacing: 0; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.16); }

/* ── Pagination ─────────────────────────────────────────── */
.pagination .page-link:hover { background: var(--accent-light); color: var(--accent-text); border-color: var(--accent); }

/* ── Icons: Größen & Animation (Ersatz für fa-lg/2x/3x/spin) ─ */
.ti { line-height: 1; }
.ti-lg { font-size: 1.33em; }
.ti-2x { font-size: 2em; }
.ti-3x { font-size: 3em; }
.ti-fw { width: 1.25em; text-align: center; display: inline-block; }
.ti-spin { display: inline-block; animation: ti-spin 1s linear infinite; }
@keyframes ti-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ti-spin { animation-duration: 3s; } }

/* ── Login / Registrierung ──────────────────────────────── */
.auth-panel { background: var(--sidebar-bg); }
.auth-panel-logo { height: 56px; width: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.auth-feature-icon { color: var(--brand-gold) !important; }
.btn-auth { background: var(--accent); border-color: var(--accent); }

/* ── Sichtbarer Tastatur-Fokus (WCAG 2.2) ───────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sidebar :focus-visible { outline-color: var(--brand-gold); }
.public-brand-logo { height: 36px; width: auto; }

/* ── Statusfarben auch für Tabler-Utilities (bg-*, text-*, btn-*) ── */
:root {
    --tblr-success: #237a35; --tblr-success-rgb: 35, 122, 53;
    --tblr-warning: #a35f00; --tblr-warning-rgb: 163, 95, 0;
    --tblr-danger:  #b42318; --tblr-danger-rgb: 180, 35, 24;
    --tblr-info:    #1d6fb8; --tblr-info-rgb: 29, 111, 184;
}

/* ── Badges: lesbare Schrift auf farbigem Grund ─────────── */
.badge.bg-primary, .badge.bg-success, .badge.bg-danger, .badge.bg-info,
.badge.bg-dark, .badge.bg-warning { color: #fff; }
.badge.bg-warning.text-dark { color: #fff !important; }
/* Abteilungen & Neutrales: ruhiger, heller Chip statt grauem Block */
.badge.bg-secondary { background: #eef1ef !important; color: #3b4844; font-weight: 600; }
.badge.bg-light { background: #f4f6f5 !important; color: var(--text-secondary) !important; }

/* ── Avatare mit Initialen (App-Muster .avatar > .avatar-initial) ── */
.avatar:has(> .avatar-initial) { background: none; box-shadow: none; }
.avatar-initial {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 650; font-size: .8em; border-radius: 50%;
}
.avatar-sm { --tblr-avatar-size: 30px; }

/* KPI-Beschriftungen dürfen umbrechen statt abgeschnitten zu werden */
.kpi-card .kpi-label { white-space: normal; overflow: visible; }

/* Login: Feature-Kästchen auf Grün */
.auth-feature-box { background: rgba(255,255,255,.08) !important; }
.auth-feature-box { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topbar-context { font-size: .85rem; font-weight: 500; color: var(--text-muted); }

/* Initialen-Kreis ohne Tabler-.avatar-Konflikt */
.avatar-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 650; flex-shrink: 0; }
.avatar-badge.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-badge.avatar-warning { background: var(--brand-gold); color: var(--brand-forest-deep); }
/* Tabellen-Abschnitt aufklappen ohne Höhen-Animation (tbody kann keine Höhe animieren) */
tbody.collapse.show { display: table-row-group; }
tbody.collapsing { display: table-row-group; height: auto !important; transition: none; }

/* Kennzahlen auf dem Handy: zwei Spalten, kompakt */
@media (max-width: 575.98px) {
    .kpi-card .card-body { padding: 14px; }
    .kpi-card .kpi-icon { width: 36px; height: 36px; font-size: 17px; }
    .kpi-card .kpi-value { font-size: 1.3rem; }
    .kpi-card .kpi-label { font-size: .66rem; }
}

/* ── Handy: nichts darf seitlich überstehen ─────────────── */
.pagination { flex-wrap: wrap; row-gap: 4px; }
.btn-check + .btn { white-space: normal; }
@media (max-width: 575.98px) {
    /* große Abstände (g-4/g-5) sprengen sonst den Seitenrand */
    .g-4, .gx-4, .g-5, .gx-5 { --tblr-gutter-x: 1rem; --bs-gutter-x: 1rem; }
    /* Button-Gruppen (z. B. Zeiträume) dürfen umbrechen */
    .btn-group { flex-wrap: wrap; row-gap: 4px; }
    .btn-group:not(.w-100) > .btn { flex: 0 0 auto; }
    .btn-group.w-100 > .btn { flex: 1 1 0; min-width: 0; }
    /* Paginierungs-Info und Seitenzahlen untereinander */
    .pagination { justify-content: center; }
}

/* ── Feinschliff Listen & Kennzahlen ────────────────────── */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .825rem; color: var(--text-muted); width: 100%; }
.card-footer:has(> .pagination-bar), .card-footer .pagination-bar { margin-top: 0; }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .page-link { color: var(--text-secondary); }
/* Rechnungsnummern als Link in der ersten Spalte nicht umbrechen */
.table td:first-child a { white-space: nowrap; }
/* Kennzahl-Kacheln: Icon bleibt links, alle Kacheln gleich hoch */
.kpi-card { height: 100%; }
.kpi-card > .card-body.d-flex { flex-wrap: nowrap !important; }
.row > [class*="col"] > .kpi-card { margin-bottom: 0; }
/* Lange deutsche Wörter in Kacheln sauber trennen statt abschneiden */
.kpi-card .card-body > div:last-child { min-width: 0; }
/* Beschriftung in normaler Schreibweise: ruhiger und schmaler als gesperrte Versalien */
.kpi-card .kpi-label { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; line-height: 1.3; }
.kpi-card .kpi-value { white-space: nowrap; }
@media (max-width: 575.98px) {
    /* nur auf schmalen Kacheln lange Wörter trennen */
    .kpi-card .kpi-label { overflow-wrap: anywhere; hyphens: auto; }
}

/* ============================================================
   Einrichtungsassistent
   ============================================================ */
.setup-banner {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; margin-bottom: 24px;
    background: #fffaeb; border: 1px solid #f5d77a; border-left: 4px solid var(--brand-gold);
    border-radius: var(--radius-lg);
}
.setup-banner-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-gold); color: var(--brand-forest-deep);
    display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.setup-banner-text { flex: 1; min-width: 220px; display: flex; flex-direction: column; font-size: .875rem; color: var(--text-secondary); }
.setup-banner-text strong { color: var(--text-primary); }

.setup-wrap { max-width: 920px; margin: 0 auto; }
.setup-head { text-align: center; margin-bottom: 28px; }
.setup-head h1 { font-size: 1.6rem; margin-bottom: 6px; }
.setup-head p { color: var(--text-muted); margin: 0; }

/* Schrittanzeige */
.setup-steps { display: flex; list-style: none; padding: 0; margin: 0 0 28px; gap: 6px; counter-reset: step; }
.setup-step { flex: 1; position: relative; text-align: center; min-width: 0; }
.setup-step a, .setup-step span.setup-step-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--text-muted); font-size: .8rem; font-weight: 600; }
.setup-step::before { content: ""; position: absolute; top: 19px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; background: var(--border-color); }
.setup-step:first-child::before { display: none; }
.setup-step.is-done::before, .setup-step.is-current::before { background: var(--accent); }
.setup-step-dot { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 2px solid var(--border-color); color: var(--text-muted); font-size: 18px; position: relative; z-index: 1; transition: all var(--transition); }
.setup-step.is-done .setup-step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.setup-step.is-current .setup-step-dot { border-color: var(--brand-gold); background: var(--brand-gold); color: var(--brand-forest-deep); box-shadow: 0 0 0 4px rgba(240,180,0,.22); }
.setup-step.is-current a, .setup-step.is-current .setup-step-inner { color: var(--text-primary); }
.setup-step a:hover .setup-step-dot { border-color: var(--accent); }
.setup-step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (max-width: 575.98px) {
    .setup-step-label { display: none; }
    .setup-step.is-current .setup-step-label { display: block; position: absolute; top: 46px; left: 50%; transform: translateX(-50%); white-space: nowrap; max-width: none; overflow: visible; }
    .setup-steps { margin-bottom: 44px; }
}

.setup-card .card-body { padding: 28px; }
@media (max-width: 575.98px) { .setup-card .card-body { padding: 18px; } }
.setup-why { display: flex; gap: 10px; padding: 12px 14px; background: var(--accent-light); color: var(--accent-text); border-radius: var(--radius); font-size: .85rem; margin-bottom: 22px; }
.setup-why .ti { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.setup-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.setup-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.setup-level-row { display: grid; grid-template-columns: 1fr 160px 40px; gap: 10px; align-items: start; margin-bottom: 10px; }
@media (max-width: 575.98px) { .setup-level-row { grid-template-columns: 1fr 110px 36px; gap: 6px; } }
.setup-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.setup-summary-item { padding: 16px; border: 1px solid var(--border-color); border-radius: var(--radius); background: #fafbfa; }
.setup-summary-item .value { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.setup-summary-item .label { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.setup-done-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; background: var(--accent-light); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-size: 38px; }

/* ============================================================
   U6: Onboarding (Trainer) und Einrichtungs-Aufgaben (Admin)
   ============================================================ */
.onboarding-card { border-left: 4px solid var(--brand-gold); }
.onboarding-progress { width: 180px; max-width: 100%; height: 8px; border-radius: 4px; background: var(--border-color); overflow: hidden; align-self: center; }
.onboarding-progress span { display: block; height: 100%; background: var(--accent); }
.onboarding-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.onboarding-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); flex-wrap: wrap; }
.onboarding-step:not(.is-done) { background: #fafbfa; }
.onboarding-step-body { flex: 1; min-width: 200px; }
.onboarding-step-icon { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--border-color); color: var(--text-muted); font-size: 16px; }
.onboarding-step.is-done .onboarding-step-icon { background: var(--accent); border-color: var(--accent); color: #fff; }
.onboarding-step.is-done .onboarding-step-body .fw-600 { color: var(--text-muted); }
.onboarding-step.is-waiting .onboarding-step-icon { border-color: var(--brand-gold); color: #8a6200; }

/* Kennzahl-Kacheln: Icon über dem Text, damit Beschriftungen die volle Breite haben
   (bei fünf Kacheln nebeneinander war für Icon + Text zu wenig Platz) */
@media (min-width: 576px) {
    .kpi-card > .card-body.d-flex { flex-direction: column; align-items: flex-start !important; gap: 10px !important; }
    .kpi-card .kpi-icon { width: 38px; height: 38px; font-size: 18px; }
    .kpi-card .kpi-label { word-wrap: normal; overflow-wrap: normal; }
}

/* ── U7: Kontrast & Lesbarkeit (WCAG 2.2 AA, mit axe-core geprüft) ── */
:root { --tblr-secondary: #5c6762; --tblr-secondary-rgb: 92, 103, 98; --tblr-muted: #5c6762; }
.btn-outline-secondary { --tblr-btn-color: #4a5752; --tblr-btn-border-color: #aab4af; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.badge.bg-success { background-color: var(--success) !important; }
.badge.bg-warning { background-color: var(--warning) !important; }
/* Links im Fließtext nicht nur über die Farbe erkennbar machen */
.public-content a:not(.btn), .form-text a, .alert a:not(.btn), .docs-tip a, .card-body p a:not(.btn),
.card-body li a:not(.btn), .small a:not(.btn), .setup-why a { text-decoration: underline; text-underline-offset: 2px; }
.card-header.text-white .card-title, .card-header.bg-primary .card-title { color: inherit; }
.btn-check:checked + .btn .text-muted, .btn-check:active + .btn .text-muted, .btn:hover .text-muted.d-block { color: rgba(255,255,255,.88) !important; }
.alert-light { color: var(--text-primary); background-color: #f8faf9; }

/* ── U8: Umschalter zwischen den Anleitungen ── */
.docs-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.docs-tab {
  display: inline-flex; align-items: center; padding: .45rem .9rem; border-radius: 999px;
  border: 1px solid var(--border-color); background: #fff; color: var(--text-secondary);
  font-size: .85rem; font-weight: 600; text-decoration: none;
}
.docs-tab:hover { border-color: var(--accent, #0f6b52); color: var(--accent, #0f6b52); }
.docs-tab.active { background: #034135; border-color: #034135; color: #fff; }
.docs-tab:focus-visible { outline: 3px solid #f0b400; outline-offset: 2px; }

/* ── U2: Utilities statt Inline-Styles ── */
.fs-xxs { font-size: .72rem !important; }
.fs-xs  { font-size: .75rem !important; }
.fs-sm  { font-size: .825rem !important; }
.fs-md  { font-size: .875rem !important; }
.text-accent { color: var(--accent) !important; }
.text-pre-line { white-space: pre-line; }
.docs-sticky { top: calc(var(--topbar-height) + 20px); }
.kz-eyebrow { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.icon-tile { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-tile-success { background: var(--success-light); }
.icon-tile-accent  { background: var(--accent-light); }
.icon-tile-warning { background: var(--warning-light); }
.icon-tile-info    { background: var(--info-light); }
.callout { border-radius: var(--radius); }
.callout-warning { background: var(--warning-light); }
.callout-danger  { background: var(--danger-light); color: #991b1b; }
.callout-neutral { background: var(--body-bg); border: 1px solid var(--border-color); }

/* ── C5: aus Inline-Styles erzeugte Utilities (gleiche Werte, !important wie vorher der Inline-Vorrang) ── */
.u-ai-center { align-items: center !important; }
.u-as-flex-end { align-self: flex-end !important; }
.u-bc-accent { border-color: var(--accent) !important; }
.u-bc-border-color { border-color: var(--border-color) !important; }
.u-bc-fca5a5 { border-color: #fca5a5 !important; }
.u-bc-success-22c55e { border-color: var(--success,#22c55e) !important; }
.u-bd-1px-solid-6ee7b7 { border: 1px solid #6ee7b7 !important; }
.u-bd-1px-solid-border-color { border: 1px solid var(--border-color) !important; }
.u-bd-1px-solid-fca5a5 { border: 1px solid #fca5a5 !important; }
.u-bd-1px-solid-fcd34d { border: 1px solid #fcd34d !important; }
.u-bd-1px-solid-fde68a { border: 1px solid #fde68a !important; }
.u-bd-1px-solid-fecaca { border: 1px solid #fecaca !important; }
.u-bd-1px-solid-rgba-240-180-0-_2 { border: 1px solid rgba(240,180,0,.2) !important; }
.u-bd-2px-solid-b42318 { border: 2px solid #b42318 !important; }
.u-bg-237a35 { background: #237a35 !important; }
.u-bg-a35f00 { background: #a35f00 !important; }
.u-bg-accent { background: var(--accent) !important; }
.u-bg-accent-light { background: var(--accent-light) !important; }
.u-bg-accent-light-eff6ff { background: var(--accent-light,#eff6ff) !important; }
.u-bg-b42318 { background: #b42318 !important; }
.u-bg-body-bg { background: var(--body-bg) !important; }
.u-bg-border-color { background: var(--border-color) !important; }
.u-bg-d1fae5 { background: #d1fae5 !important; }
.u-bg-dbeafe { background: #dbeafe !important; }
.u-bg-e7f2ee { background: #e7f2ee !important; }
.u-bg-e9ecef { background-color: #e9ecef !important; }
.u-bg-f1f5f9 { background: #f1f5f9 !important; }
.u-bg-f3e8ff { background: #f3e8ff !important; }
.u-bg-fafafa { background: #fafafa !important; }
.u-bg-fee2e2 { background: #fee2e2 !important; }
.u-bg-fef3c7 { background: #fef3c7 !important; }
.u-bg-fff5f5 { background: #fff5f5 !important; }
.u-bg-fffbeb { background: #fffbeb !important; }
.u-bg-info-light { background: var(--info-light) !important; }
.u-bg-rgba-240-180-0-_08 { background: rgba(240,180,0,.08) !important; }
.u-bg-success-light { background: var(--success-light) !important; }
.u-bg-success-light-dcfce7 { background: var(--success-light,#dcfce7) !important; }
.u-bg-success-light-f0fdf4 { background: var(--success-light,#f0fdf4) !important; }
.u-bg-warning { background: var(--warning) !important; }
.u-bg-warning-light { background: var(--warning-light) !important; }
.u-br-3px { border-radius: 3px !important; }
.u-br-4px { border-radius: 4px !important; }
.u-br-6px { border-radius: 6px !important; }
.u-br-8px { border-radius: 8px !important; }
.u-br-radius { border-radius: var(--radius) !important; }
.u-bt-1px-solid-border-color { border-top: 1px solid var(--border-color) !important; }
.u-bt-1px-solid-sidebar-border { border-top: 1px solid var(--sidebar-border) !important; }
.u-c-065f46 { color: #065f46 !important; }
.u-c-0f6b52 { color: #0f6b52 !important; }
.u-c-237a35 { color: #237a35 !important; }
.u-c-2563eb { color: #2563eb !important; }
.u-c-475569 { color: #475569 !important; }
.u-c-64748b { color: #64748b !important; }
.u-c-6c757d { color: #6c757d !important; }
.u-c-7c3aed { color: #7c3aed !important; }
.u-c-7f1d1d { color: #7f1d1d !important; }
.u-c-94a3b8 { color: #94a3b8 !important; }
.u-c-a35f00 { color: #a35f00 !important; }
.u-c-accent { color: var(--accent) !important; }
.u-c-accent-text { color: var(--accent-text) !important; }
.u-c-b42318 { color: #b42318 !important; }
.u-c-e2e8f0 { color: #e2e8f0 !important; }
.u-c-ffd866 { color: #ffd866 !important; }
.u-c-fff { color: #fff !important; }
.u-c-info { color: var(--info) !important; }
.u-c-sidebar-border { color: var(--sidebar-border) !important; }
.u-c-sidebar-icon { color: var(--sidebar-icon) !important; }
.u-c-success { color: var(--success) !important; }
.u-c-success-16a34a { color: var(--success,#16a34a) !important; }
.u-c-text-muted { color: var(--text-muted) !important; }
.u-c-text-primary { color: var(--text-primary) !important; }
.u-c-text-secondary { color: var(--text-secondary) !important; }
.u-c-text-xmuted { color: var(--text-xmuted) !important; }
.u-c-warning { color: var(--warning) !important; }
.u-cur-pointer { cursor: pointer !important; }
.u-d-flex { display: flex !important; }
.u-d-inline-block { display: inline-block !important; }
.u-flex-1 { flex: 1 !important; }
.u-flex-2 { flex: 2 !important; }
.u-fs-0_75rem { font-size: 0.75rem !important; }
.u-fs-10px { font-size: 10px !important; }
.u-fs-11px { font-size: 11px !important; }
.u-fs-12px { font-size: 12px !important; }
.u-fs-14px { font-size: 14px !important; }
.u-fs-16px { font-size: 16px !important; }
.u-fs-1_05rem { font-size: 1.05rem !important; }
.u-fs-1_1rem { font-size: 1.1rem !important; }
.u-fs-1_4rem { font-size: 1.4rem !important; }
.u-fs-1_8rem { font-size: 1.8rem !important; }
.u-fs-1rem { font-size: 1rem !important; }
.u-fs-2rem { font-size: 2rem !important; }
.u-fs-4rem { font-size: 4rem !important; }
.u-fs-_62rem { font-size: .62rem !important; }
.u-fs-_65rem { font-size: .65rem !important; }
.u-fs-_72rem { font-size: .72rem !important; }
.u-fs-_75rem { font-size: .75rem !important; }
.u-fs-_78rem { font-size: .78rem !important; }
.u-fs-_7rem { font-size: .7rem !important; }
.u-fs-_825rem { font-size: .825rem !important; }
.u-fs-_85rem { font-size: .85rem !important; }
.u-fs-_875rem { font-size: .875rem !important; }
.u-fs-_8rem { font-size: .8rem !important; }
.u-fs-_95rem { font-size: .95rem !important; }
.u-fs-_9rem { font-size: .9rem !important; }
.u-fs-clamp-1_6rem-3vw-2_2rem { font-size: clamp(1.6rem,3vw,2.2rem) !important; }
.u-fw-500 { font-weight: 500 !important; }
.u-fw-600 { font-weight: 600 !important; }
.u-fw-700 { font-weight: 700 !important; }
.u-fw-800 { font-weight: 800 !important; }
.u-gap-10px { gap: 10px !important; }
.u-gap-12px { gap: 12px !important; }
.u-gap-2px { gap: 2px !important; }
.u-h-10px { height: 10px !important; }
.u-h-12px { height: 12px !important; }
.u-h-1px { height: 1px !important; }
.u-h-28px { height: 28px !important; }
.u-h-32px { height: 32px !important; }
.u-h-40px { height: 40px !important; }
.u-h-48px { height: 48px !important; }
.u-h-6px { height: 6px !important; }
.u-h-8px { height: 8px !important; }
.u-jc-center { justify-content: center !important; }
.u-jc-space-between { justify-content: space-between !important; }
.u-lh-1_7 { line-height: 1.7 !important; }
.u-lh-1_9 { line-height: 1.9 !important; }
.u-lh-2 { line-height: 2 !important; }
.u-ls-_02em { letter-spacing: -.02em !important; }
.u-ls-_06em { letter-spacing: .06em !important; }
.u-ls-_1em { letter-spacing: .1em !important; }
.u-m-0-20px-16px { margin: 0 20px 16px !important; }
.u-m-0-4px { margin: 0 4px !important; }
.u-m-8px-0 { margin: 8px 0 !important; }
.u-maxh-150px { max-height: 150px !important; }
.u-maxh-340px { max-height: 340px !important; }
.u-maxh-90px { max-height: 90px !important; }
.u-maxw-100pct { max-width: 100% !important; }
.u-maxw-150px { max-width: 150px !important; }
.u-maxw-200px { max-width: 200px !important; }
.u-maxw-220px { max-width: 220px !important; }
.u-maxw-240px { max-width: 240px !important; }
.u-maxw-260px { max-width: 260px !important; }
.u-maxw-480px { max-width: 480px !important; }
.u-mb-12px { margin-bottom: 12px !important; }
.u-mb-14px { margin-bottom: 14px !important; }
.u-mb-32px { margin-bottom: 32px !important; }
.u-minw-160px { min-width: 160px !important; }
.u-minw-180px { min-width: 180px !important; }
.u-minw-200px { min-width: 200px !important; }
.u-minw-240px { min-width: 240px !important; }
.u-ml-auto { margin-left: auto !important; }
.u-mr-auto { margin-right: auto !important; }
.u-mt-12px { margin-top: 12px !important; }
.u-mt-2px { margin-top: 2px !important; }
.u-mt-4px { margin-top: 4px !important; }
.u-of-contain { object-fit: contain !important; }
.u-ov-hidden { overflow: hidden !important; }
.u-p-0-12px-6px { padding: 0 12px 6px !important; }
.u-p-10px-12px { padding: 10px 12px !important; }
.u-p-32px { padding: 32px !important; }
.u-p-32px-0 { padding: 32px 0 !important; }
.u-p-40px { padding: 40px !important; }
.u-p-8px { padding: 8px !important; }
.u-p-8px-16px { padding: 8px 16px !important; }
.u-p-9px-18px { padding: 9px 18px !important; }
.u-pl-2rem { padding-left: 2rem !important; }
.u-pt-8px { padding-top: 8px !important; }
.u-shrink-0 { flex-shrink: 0 !important; }
.u-ta-center { text-align: center !important; }
.u-ta-right { text-align: right !important; }
.u-td-none { text-decoration: none !important; }
.u-tt-uppercase { text-transform: uppercase !important; }
.u-w-100pct { width: 100% !important; }
.u-w-10pct { width: 10% !important; }
.u-w-12pct { width: 12% !important; }
.u-w-12px { width: 12px !important; }
.u-w-130px { width: 130px !important; }
.u-w-13pct { width: 13% !important; }
.u-w-15pct { width: 15% !important; }
.u-w-1px { width: 1px !important; }
.u-w-200px { width: 200px !important; }
.u-w-20pct { width: 20% !important; }
.u-w-220px { width: 220px !important; }
.u-w-28pct { width: 28% !important; }
.u-w-28px { width: 28px !important; }
.u-w-32px { width: 32px !important; }
.u-w-36px { width: 36px !important; }
.u-w-40pct { width: 40% !important; }
.u-w-40px { width: 40px !important; }
.u-w-48px { width: 48px !important; }
.u-w-51pct { width: 51% !important; }
.u-w-5pct { width: 5% !important; }
.u-w-64px { width: 64px !important; }
.u-w-70px { width: 70px !important; }
.u-w-8pct { width: 8% !important; }
.u-w-9pct { width: 9% !important; }
.u-w-auto { width: auto !important; }

/* ── B1: Buchhaltung – neu seit dem letzten Export ── */
.buchhaltung-new {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--border-color); background: #fff;
}
.buchhaltung-new.has-new { border-color: #f0b400; background: #fff8e1; }
.buchhaltung-new-icon {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--success-light); color: var(--success); font-size: 1.25rem; flex-shrink: 0;
}
.buchhaltung-new.has-new .buchhaltung-new-icon { background: #f0b400; color: #034135; }
.buchhaltung-new-text { flex: 1 1 260px; display: flex; flex-direction: column; }
.buchhaltung-new-text span { color: var(--text-muted); font-size: .875rem; }
.buchhaltung-new-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-new {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  background: #fff3c4; color: #7a4700; border: 1px solid #f0d27a;
}
/* Absolut positionierte Kinder (z. B. .visually-hidden in Tabellenköpfen) bleiben im Scrollbereich */
.table-responsive { position: relative; }

/* ── S11: Zwei-Faktor-Anmeldung ── */
.twofa-steps { padding-left: 1.25rem; margin: 0; }
.twofa-steps > li { margin-bottom: 1.25rem; }
.twofa-steps > li:last-child { margin-bottom: 0; }
.twofa-qr-wrap {
  display: inline-block; padding: 12px; background: #fff;
  border: 1px solid var(--border-color); border-radius: var(--radius);
}
.twofa-qr { display: block; width: 200px; height: 200px; max-width: 100%; }
.twofa-secret {
  display: inline-block; padding: 6px 10px; border-radius: var(--radius);
  background: var(--body-bg); border: 1px solid var(--border-color);
  font-size: .95rem; letter-spacing: .05em; word-break: break-all;
}
.twofa-confirm-form { max-width: 340px; }
.twofa-code-input { font-family: var(--tblr-font-monospace, monospace); letter-spacing: .15em; }
.twofa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; max-width: 360px; font-size: 1rem; }
@media print {
  body:has(.twofa-recovery) .sidebar,
  body:has(.twofa-recovery) .page-header,
  body:has(.twofa-recovery) .twofa-recovery ~ *,
  body:has(.twofa-recovery) .col-lg-5,
  body:has(.twofa-recovery) .twofa-recovery .btn { display: none !important; }
}

/* ── P2: Jahresbescheinigung im EStG-Kasten ── */
.estg-downloads {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-color); font-size: .85rem;
}
.estg-downloads > span { color: var(--text-muted); }
.estg-downloads a { min-height: 44px; display: inline-flex; align-items: center; }
.sepa-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sepa-form input[type=date] { width: auto; max-width: 180px; }

/* ── G4: Status der Datensicherung ── */
.backup-status { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.backup-status dt { font-weight: 600; color: var(--text-muted); }
.backup-status dd { margin: 0; }
.sepa-skipped { margin-top: 4px; }
.sepa-skipped summary { cursor: pointer; min-height: 32px; display: list-item; }
