:root {
    --bg: #07111f;
    --bg2: #0b1627;
    --surface: #0d182b;
    --surface-2: #101d32;
    --surface-3: #13233b;
    --line: rgba(98, 179, 234, 0.14);
    --line-strong: rgba(98, 179, 234, 0.24);

    --text: #edf4ff;
    --muted: #9bb0c9;
    --muted-2: #7f94ad;

    --primary: #62B3EA;
    --secondary: #395074;
    --accent: #0BA5AD;

    --danger: #ff7b7b;
    --danger-bg: rgba(255, 123, 123, 0.12);
    --danger-line: rgba(255, 123, 123, 0.25);

    --success-bg: rgba(11, 165, 173, 0.14);
    --success-line: rgba(11, 165, 173, 0.24);

    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.22);
    --sidebar-width: 270px;
    --radius: 18px;
    --radius-sm: 12px;

    /* element-level tokens (overridden per theme) */
    --body-bg: radial-gradient(circle at top left, rgba(98,179,234,0.08), transparent 24%),
               radial-gradient(circle at top right, rgba(11,165,173,0.05), transparent 18%),
               linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(7,17,31,0.99) 0%, rgba(8,18,32,0.97) 100%);
    --sidebar-border: rgba(98,179,234,0.08);
    --card-bg: linear-gradient(180deg, rgba(13,24,43,0.96) 0%, rgba(10,20,36,0.96) 100%);
    --kpi-card-bg: linear-gradient(160deg, rgba(16,29,50,0.96) 0%, rgba(10,20,36,0.98) 100%);
    --input-bg: #172540;
    --input-border: rgba(98,179,234,0.12);
    --plan-card-bg: #172540;
}

/* ===== LIGHT MODE ===== */
html[data-theme="light"] {
    --bg: #f0f4f8;
    --bg2: #e8edf5;
    --surface: #ffffff;
    --surface-2: #f5f8fc;
    --surface-3: #edf1f7;
    --line: rgba(62,110,162,0.14);
    --line-strong: rgba(62,110,162,0.28);

    --text: #0e1c2f;
    --muted: #4a6080;
    --muted-2: #6b839e;

    --primary: #2277c9;
    --secondary: #c4d8ef;
    --accent: #0995a0;

    --danger: #c0392b;
    --danger-bg: rgba(192,57,43,0.10);
    --danger-line: rgba(192,57,43,0.22);

    --success-bg: rgba(11,165,173,0.10);
    --success-line: rgba(11,165,173,0.22);

    --shadow-soft: 0 8px 32px rgba(30,70,120,0.10);

    --body-bg: radial-gradient(circle at top left, rgba(62,110,162,0.06), transparent 24%),
               radial-gradient(circle at top right, rgba(11,165,173,0.04), transparent 18%),
               linear-gradient(180deg, #eef2f8 0%, #e5eaf3 100%);
    --sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
    --sidebar-border: rgba(62,110,162,0.12);
    --card-bg: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    --kpi-card-bg: linear-gradient(160deg, #ffffff 0%, #f5f8fc 100%);
    --input-bg: #ffffff;
    --input-border: rgba(62,110,162,0.18);
    --plan-card-bg: #f0f4f8;
}

html[data-theme="light"] body {
    background: var(--body-bg);
}

html[data-theme="light"] .sidebar {
    background: var(--sidebar-bg);
    border-right-color: var(--sidebar-border);
}

html[data-theme="light"] .sidebar-brand {
    border-bottom-color: var(--sidebar-border);
}

html[data-theme="light"] .sidebar-footer {
    border-top-color: var(--sidebar-border);
}

html[data-theme="light"] .logo-sprung {
    color: #0e1c2f;
}

html[data-theme="light"] .sidebar-btn:hover {
    background: rgba(62,110,162,0.08);
}

html[data-theme="light"] .sidebar-btn.is-active {
    background: rgba(62,110,162,0.12);
}

html[data-theme="light"] .card {
    background: var(--card-bg);
}

html[data-theme="light"] .kpi-card {
    background: var(--kpi-card-bg);
}

html[data-theme="light"] .kpi-ring-bg {
    stroke: rgba(62,110,162,0.12);
}

html[data-theme="light"] .kpi-card::after {
    background: radial-gradient(ellipse at 50% 0%, rgba(62,110,162,0.04), transparent 65%);
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text);
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
    border-color: rgba(62,110,162,0.45);
    box-shadow: 0 0 0 3px rgba(62,110,162,0.10);
}

html[data-theme="light"] .btn,
html[data-theme="light"] button {
    background: rgba(0,0,0,0.03);
}

html[data-theme="light"] .plan-card {
    background: var(--plan-card-bg);
    border-color: rgba(62,110,162,0.14);
}

html[data-theme="light"] .plan-option:hover .plan-card {
    border-color: rgba(62,110,162,0.32);
}

html[data-theme="light"] .plan-option input:checked + .plan-card {
    background: linear-gradient(180deg, rgba(62,110,162,0.10), #f0f4f8);
    border-color: rgba(62,110,162,0.55);
    box-shadow: 0 0 0 3px rgba(62,110,162,0.10);
}

html[data-theme="light"] .tbl-btn {
    border-color: rgba(62,110,162,0.14);
}

html[data-theme="light"] .tbl-btn:hover {
    background: rgba(62,110,162,0.08);
}

html[data-theme="light"] thead th {
    border-bottom-color: rgba(62,110,162,0.12);
}

html[data-theme="light"] tbody td {
    border-bottom-color: rgba(62,110,162,0.08);
}

html[data-theme="light"] tbody tr:hover td {
    background: rgba(62,110,162,0.04);
}

html[data-theme="light"] .sidebar-nav {
    scrollbar-color: rgba(62,110,162,0.12) transparent;
}

/* ===== THEME TOGGLE SWITCH ===== */
.theme-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    flex-shrink: 0;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(98,179,234,0.12);
    border: 1px solid var(--line-strong);
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease;
    display: flex;
    align-items: center;
    padding: 0 4px;
    gap: 6px;
}

.theme-toggle input:checked + .theme-toggle-track {
    background: rgba(240,200,60,0.15);
    border-color: rgba(240,200,60,0.40);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    transition: transform .25s ease, background .25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-thumb {
    transform: translateX(28px);
    background: #f0c83c;
}

.theme-toggle-icon {
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    flex-shrink: 0;
}

.pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.pref-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pref-row:first-child {
    padding-top: 0;
}

.pref-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pref-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pref-label strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

/* Hint text — hidden by default, visible when hints-inline is active */
.pref-hint {
    display: none;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

html.hints-inline .pref-hint {
    display: block;
}

/* Hint ? button — shown by default, hidden when hints-inline is active */
.hint-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    color: var(--muted);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    cursor: default;
    flex-shrink: 0;
    position: relative;
}

html.hints-inline .hint-btn {
    display: none;
}

/* Tooltip for ? button */
.hint-btn::after {
    content: attr(data-hint);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg, #0d1a2b);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    white-space: nowrap;
    max-width: 260px;
    white-space: normal;
    width: max-content;
    max-width: 240px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.hint-btn:hover::after {
    opacity: 1;
}

/* Compact pref-row control area */
.pref-control {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: Inter, system-ui, Arial, sans-serif;
    color: var(--text);
    background: var(--body-bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    width: 100%;
}

/* ===== SIDEBAR ===== */

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 14px 20px;
    border-right: 1px solid var(--sidebar-border);
    background: var(--sidebar-bg);
    overflow: hidden;
}

/* Logo */
.sidebar-brand {
    flex-shrink: 0;
    padding: 2px 4px 20px;
    border-bottom: 1px solid rgba(98, 179, 234, 0.08);
    margin-bottom: 12px;
}

.sidebar-logo-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
}

.sidebar-wordmark {
    position: relative;
    display: inline-block;
    padding-top: 17px;
}

.sidebar-arc {
    position: absolute;
    top: 0;
    left: 0;
    width: 108px;
    height: 17px;
    pointer-events: none;
}

.sidebar-logo-text {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    display: flex;
}

.logo-sprung { color: #ffffff; }
.logo-helden { color: #F07820; }

.sidebar-logo-img {
    display: block;
    width: 170px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    transition: opacity .15s;
}
.sidebar-logo-link:hover .sidebar-logo-img { opacity: .85; }

/* Brand: App-Icon + Text-Wordmark (kein Box-on-Box-Effekt) */
.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    transition: transform .15s;
}
.sidebar-brand-link:hover { transform: translateY(-1px); }

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sidebar-brand-wordmark {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    display: flex;
}

.sidebar-tagline {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted-2);
    letter-spacing: 0.025em;
    padding-left: 1px;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(98, 179, 234, 0.12) transparent;
    padding-bottom: 8px;
}

.sidebar-group {
    margin-bottom: 2px;
}

.sidebar-group-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding: 14px 14px 5px;
    user-select: none;
}

/* Rollen-Badges in der Sidebar */
.sidebar-role-badge {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sidebar-role-badge.role-instructor { background: #60a5fa; box-shadow: 0 0 6px rgba(96,165,250,.55); }
.sidebar-role-badge.role-dzmanager  { background: #F07820; box-shadow: 0 0 6px rgba(240,120,32,.55); }
.sidebar-role-badge.role-admin      { background: #a78bfa; box-shadow: 0 0 6px rgba(167,139,250,.55); }

.sidebar-group.role-section {
    margin-top: 12px;
    padding-top: 6px;
    border-top: 1px dashed var(--line);
}
.sidebar-group.role-section .sidebar-group-label {
    padding-top: 8px;
}
.sidebar-group.role-instructor .sidebar-group-label { color: #60a5fa; }
.sidebar-group.role-dzmanager  .sidebar-group-label { color: #F07820; }
.sidebar-group.role-admin      .sidebar-group-label { color: #a78bfa; }

.sidebar-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    padding: 0 12px;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    transition: background .15s ease, color .15s ease;
}

.sidebar-btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
    transition: background .15s ease;
}

.sidebar-btn:hover {
    background: rgba(98, 179, 234, 0.07);
    color: var(--text);
    transform: none;
}

.sidebar-btn.is-active {
    background: rgba(98, 179, 234, 0.10);
    color: var(--text);
}

.sidebar-btn.is-active::before {
    background: var(--primary);
}

.sidebar-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.sidebar-btn:hover .sidebar-icon,
.sidebar-btn.is-active .sidebar-icon {
    opacity: 1;
}

/* Farbige Icons — jedes Icon bekommt seine semantische Farbe.
   Im Active-State wird die Farbe weiß, damit Icon auf Gradient-Hintergrund lesbar bleibt. */
.sico               { transition: color .15s ease; }
.sico-dashboard     { color: #62B3EA; } /* Blau — Übersicht */
.sico-plus          { color: #4ade80; } /* Grün — neue Aktion */
.sico-training      { color: #F07820; } /* Orange — Logbuch/Training */
.sico-stats         { color: #0ba5ad; } /* Teal — Datenanalyse */
.sico-gear          { color: #fbbf24; } /* Amber — Ausrüstung */
.sico-settings      { color: #a0a0a0; } /* Grau — Utility */
.sico-compare       { color: #a78bfa; } /* Violett — Vergleich */
.sico-sliders       { color: #ec4899; } /* Magenta — Admin-Config */
.sico-users         { color: #818cf8; } /* Indigo — User-Mgmt */
.sico-audit         { color: #94a3b8; } /* Slate — Logs */
.sico-graduation    { color: #4ade80; } /* Grün — AFF-Fortschritt */
.sico-building      { color: #F07820; } /* Orange — Dropzone */
.sico-bug           { color: #ef4444; } /* Rot — Bug-Reports */

.sidebar-btn.is-active .sico { color: #fff; }

/* Footer */
.sidebar-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 4px 0;
    border-top: 1px solid rgba(98, 179, 234, 0.08);
    margin-top: 8px;
}

.sidebar-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-left: 4px;
}

.sidebar-avatar {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d4268, #62B3EA);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.03em;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

.sidebar-user-plan {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted-2);
    margin-top: 1px;
}

/* Klickbarer Avatar + Name → führt zu Settings/Konto */
.sidebar-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    padding: 4px;
    margin: -4px;
    border-radius: 8px;
    transition: background .12s;
}
.sidebar-user-link:hover {
    background: rgba(98,179,234,0.08);
}
.sidebar-user-link:hover .sidebar-user-name {
    color: var(--primary);
}

/* Plan-Badge als Link → führt zu Subscribe-Seite */
.sidebar-user-plan-link {
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    transition: all .12s;
    white-space: nowrap;
}
.sidebar-user-plan-link:hover {
    background: rgba(98,179,234,0.14);
    color: var(--primary);
    border-color: rgba(98,179,234,0.4);
}

.sidebar-logout-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.sidebar-logout-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.sidebar-logout-btn:hover {
    background: var(--danger-bg);
    border-color: var(--danger-line);
    color: var(--danger);
    transform: none;
}

.main-content {
    min-width: 0;
    padding: 18px 24px 28px;
}

.dashboard-stack {
    display: grid;
    gap: 18px;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

/* ===== KPI RING STRIP ===== */

.kpi-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--kpi-card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 20px 10px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.kpi-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.kpi-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(98, 179, 234, 0.05), transparent 65%);
    pointer-events: none;
}

.kpi-ring-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
}

.kpi-ring {
    width: 88px;
    height: 88px;
    transform: rotate(-90deg);
    transform-origin: center;
    display: block;
}

.kpi-ring-bg {
    fill: none;
    stroke: rgba(98, 179, 234, 0.09);
    stroke-width: 5;
}

.kpi-ring-fill {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
}

.kpi-ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-value {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    text-align: center;
    line-height: 1;
}

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    line-height: 1.3;
}

/* Top-Disziplin card */
.kpi-card-text {
    justify-content: center;
}

.kpi-disc-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.kpi-disc-icon {
    width: 28px;
    height: 28px;
    color: #F07820;
    opacity: 0.9;
}

.kpi-disc-value {
    font-size: clamp(15px, 1.3vw, 20px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.2;
    word-break: break-word;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 18px;
    min-width: 0;
}

.grid-stats .card {
    padding: 16px 18px 18px;
    position: relative;
    overflow: hidden;
}

.grid-stats .card::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(98, 179, 234, 0.9), rgba(11, 165, 173, 0.7));
    border-radius: 999px;
    opacity: 0.95;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0;
}
.toast {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    z-index: 9999;

    min-width: 280px;
    max-width: min(92vw, 520px);
    padding: 14px 18px;
    border-radius: 14px;

    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;

    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease;
}

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

.toast.success {
    background: linear-gradient(135deg, #0BA5AD, #62B3EA);
}

.toast.error {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
}

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

.plan-option {
    display: block;
    cursor: pointer;
}

.plan-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-card {
    border: 1px solid rgba(98, 179, 234, 0.12);
    background: var(--plan-card-bg);
    border-radius: 14px;
    padding: 16px;
    min-height: 120px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.plan-option:hover .plan-card {
    border-color: rgba(98, 179, 234, 0.28);
    transform: translateY(-1px);
}

.plan-option input:checked + .plan-card {
    border-color: rgba(98, 179, 234, 0.55);
    box-shadow: 0 0 0 3px rgba(98, 179, 234, 0.12);
    background: linear-gradient(180deg, rgba(98, 179, 234, 0.10), rgba(23, 37, 64, 1));
}

.plan-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.plan-copy {
    font-size: 14px;
}

@media (max-width: 860px) {
    .plan-grid {
        grid-template-columns: 1fr;
    }
}

.stat-value {
    font-size: clamp(32px, 2.4vw, 52px);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text);
    word-break: break-word;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 12px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
}

.btn-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px rgba(98, 179, 234, 0.16);
}

.btn-jump-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px 11px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 55%, #14c7b4 100%);
    background-size: 200% 100%;
    background-position: 0% 0%;
    box-shadow:
        0 10px 26px rgba(11, 165, 173, 0.35),
        0 2px 6px rgba(98, 179, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    overflow: hidden;
    isolation: isolate;
    transition: background-position 0.5s ease, transform 0.18s ease, box-shadow 0.25s ease;
}

.btn-jump-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.75s ease;
    pointer-events: none;
    z-index: 1;
}

.btn-jump-cta > * { position: relative; z-index: 2; }

.btn-jump-cta .btn-jump-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.35s ease;
}

.btn-jump-cta:hover {
    background-position: 100% 0%;
    transform: translateY(-2px);
    box-shadow:
        0 14px 32px rgba(11, 165, 173, 0.45),
        0 4px 10px rgba(98, 179, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-jump-cta:hover::before { transform: translateX(120%); }
.btn-jump-cta:hover .btn-jump-ico { transform: rotate(-12deg) scale(1.08); }
.btn-jump-cta:active { transform: translateY(0); }

@keyframes btn-jump-pulse {
    0%, 100% { box-shadow: 0 10px 26px rgba(11, 165, 173, 0.35), 0 0 0 0 rgba(11, 165, 173, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
    50%      { box-shadow: 0 10px 26px rgba(11, 165, 173, 0.35), 0 0 0 8px rgba(11, 165, 173, 0), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
}
.btn-jump-cta { animation: btn-jump-pulse 2.6s ease-in-out infinite; }
.btn-jump-cta:hover { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
    .btn-jump-cta,
    .btn-jump-cta::before,
    .btn-jump-cta .btn-jump-ico { animation: none; transition: none; }
}

.btn-danger {
    background: var(--danger-bg);
    color: #ffd7d7;
    border-color: var(--danger-line);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--success-bg);
    border: 1px solid var(--success-line);
    color: #ddffff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge .muted {
    color: rgba(221, 255, 255, 0.72);
    font-size: 11px;
    margin-left: 2px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 7px;
}

input,
textarea,
select {
    width: 100%;
    min-width: 0;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text);
    padding: 12px 14px;
    outline: none;
    font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease;
}

/* iOS/iPad: native Date-Input korrekt darstellen */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 44px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(98, 179, 234, 0.45);
    box-shadow: 0 0 0 3px rgba(98, 179, 234, 0.12);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.full {
    grid-column: 1 / -1;
}

.equipment-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(98, 179, 234, 0.08);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table.table-fixed {
    min-width: 820px;
    table-layout: fixed;
}

thead th {
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted-2);
    white-space: nowrap;
    padding: 10px 10px 10px;
    border-bottom: 1px solid rgba(98, 179, 234, 0.1);
    vertical-align: bottom;
    white-space: nowrap;
}

thead th a {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}

thead th a:hover {
    color: var(--text);
}

tbody tr {
    transition: background .12s ease;
}

tbody tr:hover td {
    background: rgba(98, 179, 234, 0.025);
}

tbody td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid rgba(98, 179, 234, 0.06);
    vertical-align: middle;
    line-height: 1.3;
}

/* Table cell utility classes */
.tbl-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted-2);
    font-variant-numeric: tabular-nums;
}

.tbl-date {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tbl-primary {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.tbl-sub {
    display: block;
    font-size: 11.5px;
    color: var(--muted-2);
    margin-top: 2px;
    line-height: 1.3;
}

.tbl-note {
    display: block;
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    opacity: 0.7;
}

.jumps-table td {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tbl-nil {
    color: var(--muted-2);
    opacity: 0.45;
}

.gear-ico-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    transition: background .15s, border-color .15s, transform .15s;
    cursor: default;
}

.gear-ico-tip:hover {
    background: rgba(98,179,234,0.15);
    border-color: rgba(98,179,234,0.4);
    transform: scale(1.1);
}

.gear-ico-card {
    display: none;
    position: fixed;
    min-width: 190px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    z-index: 9999;
    pointer-events: none;
}

.gear-ico-card.visible {
    display: block;
}

.gear-ico-card-type {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.gear-ico-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-top: 3px;
}

.gear-ico-card-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

.gear-ico-card-row span:last-child {
    font-weight: 600;
    color: var(--text);
}

.tbl-mono {
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 600;
}
/* Nur Spans bekommen Block-Layout — auf <td> würde das die Tabellen-Zelle kaputt machen */
span.tbl-mono {
    display: block;
}

.tbl-ff {
    color: var(--primary);
}

.tbl-pause {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.tbl-gear {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.tbl-empty-row {
    padding: 20px 10px;
    color: var(--muted-2);
    font-size: 13px;
}

/* Icon action buttons */
.tbl-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

.tbl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 7px;
    border: 1px solid rgba(98, 179, 234, 0.1);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
}

.tbl-btn:hover {
    background: rgba(98, 179, 234, 0.08);
    color: var(--text);
    border-color: var(--line-strong);
    transform: none;
}

.tbl-btn-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-line);
}

.clickable-row {
    cursor: pointer;
}

/* Training status indicators in jump list */
.tbl-training-status {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    cursor: default;
}
.tbl-training-status svg { display: block; }

.tbl-btn svg {
    width: 13px;
    height: 13px;
    display: block;
}

/* Mobile jump rows */
.jump-row {
    padding: 14px 2px;
    border-bottom: 1px solid rgba(98, 179, 234, 0.07);
}

.jump-row:last-child {
    border-bottom: 0;
}

.jump-row-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.jump-row-no {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--muted-2);
    min-width: 38px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.jump-row-meta {
    flex: 1;
    min-width: 0;
}

.jump-row-detail {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-left: 50px;
    font-size: 12px;
    color: var(--muted-2);
}

.jump-row-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-left: 50px;
}

.muted {
    color: var(--muted);
}

.error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-line);
    color: #ffd6d6;
}

.equipment-list {
    display: grid;
    gap: 6px;
}

.equipment-item {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(98, 179, 234, 0.12);
    background: rgba(98, 179, 234, 0.05);
    line-height: 1.2;
}

.video-frame {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 10px;
}

.actions-stack {
    display: grid;
    gap: 8px;
}

.mobile-jumps,
.mobile-gear {
    display: none;
}

.jump-card,
.gear-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(98, 179, 234, 0.08);
}

.jump-card-head,
.gear-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.jump-card-grid,
.gear-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.field-label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.field-value {
    font-size: 15px;
    line-height: 1.35;
    color: var(--text);
}

.topbar,
.grid-main,
.grid-charts,
.grid-gear {
    display: block;
}

.login-box {
    max-width: 420px;
    margin: 72px auto;
}

@media (max-width: 1280px) {
    .grid-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpi-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Bug #3: Tablet — unwichtige Spalten ausblenden, damit Tabelle passt */
    .jumps-table .col-hide-tablet,
    .jumps-table th.col-hide-tablet,
    .jumps-table td.col-hide-tablet {
        display: none;
    }
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid rgba(98, 179, 234, 0.08);
        padding: 16px 14px 14px;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        overflow: visible;
    }

    .sidebar-group {
        display: contents;
    }

    .sidebar-group-label {
        display: none;
    }

    .sidebar-btn {
        width: auto;
        flex: 0 0 auto;
    }

    .sidebar-footer {
        margin-top: 12px;
        padding-top: 12px;
    }

    .main-content {
        padding: 18px 18px 24px;
    }

    .grid-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .desktop-jumps,
    .desktop-gear {
        display: none;
    }

    .mobile-jumps,
    .mobile-gear {
        display: block;
    }

    .form-grid,
    .equipment-box,
    .gear-card-grid {
        grid-template-columns: 1fr;
    }

    .grid-stats {
        grid-template-columns: 1fr;
    }

    .kpi-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .video-frame {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .sidebar {
        padding: 18px 14px;
    }

    .main-content {
        padding: 14px;
    }

    .card {
        padding: 14px;
        border-radius: 16px;
    }

    .sidebar-logo-text {
        font-size: 18px;
    }

    .sidebar-arc {
        width: 88px;
        height: 14px;
    }

    .sidebar-wordmark {
        padding-top: 14px;
    }

    .stat-value {
        font-size: 34px;
    }

    .kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-two-col {
        grid-template-columns: 1fr !important;
    }
}

.login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #07111f;
}

.login-bg,
.login-overlay {
    position: absolute;
    inset: 0;
}

.login-bg {
    background:
        url('/assets/login-skydiving-bg.jpg') center center / cover no-repeat;
    transform: scale(1.03);
}

.login-overlay {
    background:
        linear-gradient(90deg, rgba(5, 12, 22, 0.82) 0%, rgba(7, 17, 31, 0.68) 38%, rgba(7, 17, 31, 0.78) 100%),
        radial-gradient(circle at top right, rgba(98, 179, 234, 0.16), transparent 26%),
        radial-gradient(circle at bottom left, rgba(11, 165, 173, 0.12), transparent 22%);
    backdrop-filter: blur(2px);
}

.login-layout {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 480px);
    align-items: center;
    gap: 48px;
    padding: 48px 56px;
}

.login-hero {
    max-width: 720px;
    color: #fff;
}

.login-hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(98, 179, 234, 0.12);
    border: 1px solid rgba(98, 179, 234, 0.24);
    color: #dff3ff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.login-logo {
    display: block;
    width: clamp(220px, 26vw, 340px);
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
    transition: transform .2s;
}
.login-logo:hover { transform: translateY(-1px); }

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    margin-bottom: 28px;
    transition: transform .2s;
}
.login-brand:hover { transform: translateY(-1px); }

.login-brand-icon {
    width: clamp(48px, 6vw, 64px);
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
}

.login-brand-wordmark {
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.login-brand-sprung { color: #ffffff; }
.login-brand-helden { color: #F07820; }

.login-features {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
    max-width: 480px;
}
.login-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(237, 244, 255, 0.9);
}
.login-features svg { flex-shrink: 0; }

.login-card-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.login-card-icon {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin-bottom: 8px;
    box-shadow: 0 8px 20px rgba(11, 165, 173, 0.25);
}

.login-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.06em;
    font-weight: 900;
    max-width: 700px;
}

.login-hero p {
    margin: 0;
    max-width: 560px;
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.55;
    color: rgba(237, 244, 255, 0.86);
}

.login-card {
    width: 100%;
    border-radius: 24px;
    padding: 28px;
    background: rgba(10, 20, 36, 0.72);
    border: 1px solid rgba(98, 179, 234, 0.16);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.login-card-head {
    margin-bottom: 20px;
}

.login-card-head h2 {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-field label {
    display: block;
    margin-bottom: 7px;
}

.login-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    font-size: 15px;
}

.login-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.login-links .btn {
    flex: 1 1 180px;
}

@media (max-width: 1100px) {
    .login-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 28px 20px 32px;
    }

    .login-hero {
        max-width: none;
    }

    .login-card {
        max-width: 520px;
    }
}

@media (max-width: 640px) {
    .login-layout {
        padding: 18px 14px 22px;
    }

    .login-card {
        padding: 20px;
        border-radius: 20px;
    }

    .login-hero h1 {
        font-size: 40px;
    }

    .login-links {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   DESIGN SYSTEM — gemeinsame Page-Bausteine (.dz-* prefix)
   ============================================================ */

/* Hero Header */
.dz-hero {
    position: relative; overflow: hidden;
    border-radius: 14px;
    padding: 24px 28px;
    background:
        radial-gradient(circle at 85% 20%, rgba(240,120,32,0.18), transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(11,165,173,0.20), transparent 50%),
        linear-gradient(135deg, rgba(98,179,234,0.12), rgba(11,165,173,0.06));
    border: 1px solid var(--border);
    margin-bottom: 18px;
}
.dz-hero-row     { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.dz-hero-title   { font-size: 30px; font-weight: 800; line-height: 1.1; margin: 0; }
.dz-hero-sub     { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.dz-hero-meta    { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dz-hero-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.dz-hero-pill    {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 14px; font-size: 11px; font-weight: 600;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text);
}
.dz-hero-pill svg { opacity: .7; }

/* Tabs */
.dz-tabs       { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.dz-tab        { padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none;
                 background: var(--bg-hover); color: var(--text-muted); transition: all .15s; }
.dz-tab:hover  { color: var(--text); }
.dz-tab.active { background: var(--text); color: var(--bg); }

/* KPI / Today chips */
.dz-today      { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 18px; }
.dz-today.cols-2 { grid-template-columns: repeat(2,1fr); }
.dz-today.cols-4 { grid-template-columns: repeat(4,1fr); }
@media (max-width: 1220px) {
    .dz-today.cols-4 { grid-template-columns: repeat(2,1fr); }
    .dz-chip { padding: 10px 12px; }
    .dz-chip-ico { width: 34px; height: 34px; font-size: 16px; }
    .dz-chip-val { font-size: 16px; }
}
@media (max-width: 800px) { .dz-today, .dz-today.cols-2, .dz-today.cols-4 { grid-template-columns: 1fr; } }
.dz-chip       {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
}
.dz-chip-ico   { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.dz-chip-lbl   { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.dz-chip-val   { font-size: 18px; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.dz-chip-sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Two-column page grid */
.dz-grid       { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.dz-grid.even  { grid-template-columns: 1fr 1fr; }
.dz-grid.right-wide { grid-template-columns: 1fr 1.6fr; }
@media (max-width: 1220px) { .dz-grid, .dz-grid.right-wide { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .dz-grid.even { grid-template-columns: 1fr; } }
.dz-col        { display: flex; flex-direction: column; gap: 18px; }

/* Section heading inside a card */
.dz-h          { display: flex; align-items: center; gap: 10px; margin: 0 0 14px 0; font-size: 16px; font-weight: 700; }
.dz-h-ico      { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
                 background: rgba(98,179,234,0.12); color: #62B3EA; }
.dz-h-ico.orange { background: rgba(240,120,32,0.12); color: #F07820; }
.dz-h-ico.green  { background: rgba(74,222,128,0.12); color: #4ade80; }
.dz-h-ico.purple { background: rgba(155,89,182,0.12); color: #9b59b6; }
.dz-h-ico.red    { background: rgba(239,68,68,0.12);  color: #ef4444; }
.dz-h-ico.yellow { background: rgba(241,196,15,0.12); color: #f1c40f; }
.dz-h-meta     { margin-left: auto; font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* Info row (icon + label + value list) */
.dz-info-row   { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.dz-info-row:last-child { border-bottom: none; }
.dz-info-ico   { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
                 background: var(--bg-hover); color: var(--text-muted); }
.dz-info-lbl   { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.dz-info-val   { font-size: 13px; font-weight: 500; margin-top: 1px; word-break: break-word; }
.dz-info-val a { color: var(--text); text-decoration: none; }
.dz-info-val a:hover { color: var(--accent); }

/* Group label with horizontal line */
.dz-pg         { margin-bottom: 18px; }
.dz-pg:last-child { margin-bottom: 0; }
.dz-pg-head    { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dz-pg-label   { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.dz-pg-line    { flex: 1; height: 1px; background: var(--border); }

/* Status / suitability badge */
.dz-suit       { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 14px; font-size: 11px; font-weight: 700; }
.dz-suit.ok       { background: rgba(40,180,99,0.15);  color: #28b463; }
.dz-suit.caution  { background: rgba(255,140,0,0.15);  color: #ff8c00; }
.dz-suit.no-go    { background: rgba(220,53,69,0.15);  color: #dc3545; }

/* Generic colored pill (for type tags, status, etc.) */
.dz-pill        { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.dz-pill.blue   { background: rgba(98,179,234,0.12); color: #62B3EA; border: 1px solid rgba(98,179,234,0.3); }
.dz-pill.orange { background: rgba(240,120,32,0.12); color: #F07820; border: 1px solid rgba(240,120,32,0.3); }
.dz-pill.green  { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.dz-pill.purple { background: rgba(155,89,182,0.12); color: #9b59b6; border: 1px solid rgba(155,89,182,0.3); }
.dz-pill.red    { background: rgba(239,68,68,0.12);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.dz-pill.gray   { background: rgba(120,120,120,0.12); color: var(--text-muted); border: 1px solid var(--border); }

/* Social link buttons */
.dz-soc {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.06); color: var(--text-muted);
    transition: all .15s; text-decoration: none; border: 1px solid var(--border);
}
.dz-soc:hover { transform: translateY(-1px); background: rgba(255,255,255,0.10); }
.dz-soc.web:hover  { color: #62B3EA; }
.dz-soc.ig:hover   { color: #E1306C; }
.dz-soc.fb:hover   { color: #1877F2; }

/* Empty state */
.dz-empty       { text-align: center; padding: 30px 20px; color: var(--text-muted); }
.dz-empty-ico   { font-size: 40px; opacity: .5; margin-bottom: 10px; }
.dz-empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* Weather-specific helpers (used by my_dropzone + compare) */
.dz-w-head     { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.dz-w-temp     { font-size: 42px; font-weight: 800; line-height: 1; }
.dz-w-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 14px; }
.dz-w-stat     { background: rgba(98,179,234,0.06); border: 1px solid rgba(98,179,234,0.18); border-radius: 8px; padding: 10px 12px; }
.dz-w-stat .l  { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 600; }
.dz-w-stat .v  { font-size: 15px; font-weight: 700; margin-top: 3px; }
.dz-fc         { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.dz-fc-day     { text-align: center; padding: 8px 4px; border: 1px solid var(--border); border-radius: 8px; }
.dz-fc-day .d  { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.dz-fc-day .i  { font-size: 20px; line-height: 1.2; margin: 2px 0; }
.dz-fc-day .t  { font-size: 11px; font-weight: 600; }

/* Money / Balance card */
.dz-bal-card   { padding: 16px; border-radius: 12px;
                 background: linear-gradient(135deg, rgba(74,222,128,0.08), rgba(11,165,173,0.04));
                 border: 1px solid rgba(74,222,128,0.15); margin-bottom: 14px; }
.dz-bal-card.neg { background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(239,68,68,0.02)); border-color: rgba(239,68,68,0.20); }
.dz-bal-lbl    { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; }
.dz-bal-val    { font-size: 32px; font-weight: 800; line-height: 1; margin-top: 6px; }
.dz-bal-sub    { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Price row */
.dz-pr         { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 8px; transition: background .15s; }
.dz-pr:hover   { background: var(--bg-hover); }
.dz-pr-name    { font-size: 14px; font-weight: 500; }
.dz-pr-sub     { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.dz-pr-amt     { font-size: 15px; font-weight: 700; white-space: nowrap; color: var(--text); }

/* File list link */
.dz-file       { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg-hover); text-decoration: none; color: var(--text); transition: all .15s; }
.dz-file:hover { background: var(--bg-card); transform: translateX(2px); }
.dz-file + .dz-file { margin-top: 6px; }

/* Bonus row (deposit bonus tier) */
.dz-bonus-row  { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; background: rgba(74,222,128,0.06); border: 1px solid rgba(74,222,128,0.15); }
.dz-bonus-row + .dz-bonus-row { margin-top: 6px; }

/* Deposit list row */
.dz-dep-row    { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; background: var(--bg-hover); font-size: 12px; }
.dz-dep-row + .dz-dep-row { margin-top: 4px; }

/* Avatar */
.avatar-bubble {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; overflow: hidden;
    flex-shrink: 0; vertical-align: middle;
    background: var(--bg-hover);
    font-weight: 700; color: #fff;
    line-height: 1;
    user-select: none;
}
.avatar-bubble img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.avatar-bubble.avatar-initials { letter-spacing: .02em; }
.avatar-bubble.avatar-ring     { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(98,179,234,0.4); }

/* ============================================================
   BUG REPORT WIDGET — Floating button, modal, admin view
   ============================================================ */

.bug-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 18px 12px 14px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e3c 55%, #ffb347 100%);
    background-size: 200% 100%;
    box-shadow:
        0 10px 28px rgba(255, 107, 107, 0.35),
        0 3px 8px rgba(255, 142, 60, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                gap 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s ease,
                background-position 0.5s ease;
}
.bug-fab-label {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease 0.1s;
}

/* Kollabierter State: nur noch Icon — 3s nach Page-Load aktiv */
.bug-fab.is-collapsed {
    padding: 12px;
    gap: 0;
}
.bug-fab.is-collapsed .bug-fab-label {
    max-width: 0;
    opacity: 0;
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.15s ease;
}
/* Hover klappt wieder aus — auch wenn .is-collapsed */
.bug-fab.is-collapsed:hover,
.bug-fab.is-collapsed:focus-visible {
    padding: 12px 18px 12px 14px;
    gap: 9px;
}
.bug-fab.is-collapsed:hover .bug-fab-label,
.bug-fab.is-collapsed:focus-visible .bug-fab-label {
    max-width: 200px;
    opacity: 1;
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease 0.15s;
}

.bug-fab:hover {
    transform: translateY(-2px) scale(1.03);
    background-position: 100% 0%;
    box-shadow:
        0 14px 34px rgba(255, 107, 107, 0.45),
        0 5px 12px rgba(255, 142, 60, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.bug-fab:active { transform: translateY(0); }
.bug-fab svg { transition: transform 0.4s ease; flex-shrink: 0; }
.bug-fab:hover svg { transform: rotate(-12deg) scale(1.08); }

@keyframes bug-fab-pulse {
    0%, 100% { box-shadow: 0 10px 28px rgba(255,107,107,0.35), 0 0 0 0 rgba(255,107,107,0.35), inset 0 1px 0 rgba(255,255,255,0.28); }
    50%      { box-shadow: 0 10px 28px rgba(255,107,107,0.35), 0 0 0 10px rgba(255,107,107,0), inset 0 1px 0 rgba(255,255,255,0.28); }
}
/* Pulse läuft nur solange der Button ausgeklappt ist — beim Kollabieren stoppen */
.bug-fab:not(.is-collapsed) { animation: bug-fab-pulse 3s ease-in-out infinite; }
.bug-fab:hover { animation-play-state: paused; }

@media (max-width: 640px) {
    .bug-fab { padding: 12px; right: 16px; bottom: 16px; }
    .bug-fab-label { display: none; }
}

/* ---------- Modal ---------- */

.bug-modal {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.bug-modal[hidden] { display: none; }

.bug-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 22, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.18s ease;
}
.bug-modal.is-open .bug-modal-backdrop { opacity: 1; }

.bug-modal-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
    padding: 22px 22px 18px;
}
.bug-modal.is-open .bug-modal-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.bug-modal-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.bug-modal-head-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(255,107,107,0.18), rgba(255,142,60,0.18));
    border: 1px solid rgba(255,107,107,0.3);
}
.bug-modal-head h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}
.bug-modal-sub { font-size: 12.5px; line-height: 1.45; }

.bug-modal-close {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}
.bug-modal-close:hover { border-color: var(--line-strong); color: var(--text); }

.bug-modal-form { display: flex; flex-direction: column; gap: 14px; }

.bug-form-row { display: flex; flex-direction: column; gap: 6px; }
.bug-form-row > label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.2px;
    margin: 0;
}
.bug-form-row .req { color: #ff7b7b; }

.bug-form-row input[type="text"],
.bug-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bug-form-row input[type="text"]:focus,
.bug-form-row textarea:focus {
    outline: none;
    border-color: var(--line-strong);
    box-shadow: 0 0 0 3px rgba(98, 179, 234, 0.12);
}
.bug-form-row textarea { resize: vertical; min-height: 100px; }

.bug-cat-grid,
.bug-sev-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.bug-cat-opt,
.bug-sev-opt {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}
.bug-cat-opt input,
.bug-sev-opt input { position: absolute; opacity: 0; pointer-events: none; }
.bug-cat-opt:hover,
.bug-sev-opt:hover { border-color: var(--line-strong); color: var(--text); }
.bug-cat-opt:has(input:checked) {
    border-color: #62B3EA;
    background: rgba(98, 179, 234, 0.12);
    color: var(--text);
    box-shadow: 0 0 0 2px rgba(98, 179, 234, 0.18);
}
.bug-sev-opt.sev-low:has(input:checked)      { border-color: #6cc070; background: rgba(108,192,112,0.14); color: var(--text); }
.bug-sev-opt.sev-medium:has(input:checked)   { border-color: #f0b23a; background: rgba(240,178,58,0.14); color: var(--text); }
.bug-sev-opt.sev-high:has(input:checked)     { border-color: #ff8c42; background: rgba(255,140,66,0.16); color: var(--text); }
.bug-sev-opt.sev-critical:has(input:checked) { border-color: #ff6b6b; background: rgba(255,107,107,0.16); color: var(--text); }

@media (max-width: 560px) {
    .bug-cat-grid, .bug-sev-grid { grid-template-columns: repeat(2, 1fr); }
}

.bug-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
    border-top: 1px dashed var(--line);
    padding-top: 14px;
}
.bug-modal-actions .btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}
.bug-modal-actions .btn-ghost:hover { border-color: var(--line-strong); color: var(--text); }
.bug-modal-actions .btn-primary {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

/* ---------- Admin view ---------- */

.bug-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bug-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    background: var(--surface-2);
    transition: all 0.15s ease;
}
.bug-filter-chip:hover { border-color: var(--line-strong); color: var(--text); }
.bug-filter-chip.is-active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(98,179,234,0.25);
}
.bug-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10.5px;
    background: rgba(255,255,255,0.12);
}
.bug-filter-chip:not(.is-active) .bug-filter-count {
    background: rgba(98,179,234,0.14);
    color: var(--text);
}

.bug-report-card {
    padding: 14px 16px;
    border-left: 3px solid transparent;
}
.bug-report-card.bug-sev-low      { border-left-color: #6cc070; }
.bug-report-card.bug-sev-medium   { border-left-color: #f0b23a; }
.bug-report-card.bug-sev-high     { border-left-color: #ff8c42; }
.bug-report-card.bug-sev-critical { border-left-color: #ff6b6b; }

.bug-report-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.bug-report-title-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bug-report-meta { font-size: 11.5px; }

.bug-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
}
.bug-chip-cat.bug-cat-bug       { color: #ff8e8e; border-color: rgba(255,107,107,0.35); background: rgba(255,107,107,0.10); }
.bug-chip-cat.bug-cat-idea      { color: #ffd27a; border-color: rgba(240,178,58,0.35);  background: rgba(240,178,58,0.10);  }
.bug-chip-cat.bug-cat-question  { color: #9ec8ff; border-color: rgba(98,179,234,0.35);  background: rgba(98,179,234,0.10);  }
.bug-chip-cat.bug-cat-other     { color: var(--muted); }

.bug-chip-sev.bug-sev-chip-low      { color: #9de0a4; border-color: rgba(108,192,112,0.35); background: rgba(108,192,112,0.10); }
.bug-chip-sev.bug-sev-chip-medium   { color: #ffd27a; border-color: rgba(240,178,58,0.35);  background: rgba(240,178,58,0.10);  }
.bug-chip-sev.bug-sev-chip-high     { color: #ffb38a; border-color: rgba(255,140,66,0.35);  background: rgba(255,140,66,0.10);  }
.bug-chip-sev.bug-sev-chip-critical { color: #ff8e8e; border-color: rgba(255,107,107,0.40); background: rgba(255,107,107,0.14); }

.bug-chip-status.bug-st-open        { color: #9ec8ff; border-color: rgba(98,179,234,0.35); background: rgba(98,179,234,0.10); }
.bug-chip-status.bug-st-in_progress { color: #ffd27a; border-color: rgba(240,178,58,0.35); background: rgba(240,178,58,0.10); }
.bug-chip-status.bug-st-resolved    { color: #9de0a4; border-color: rgba(108,192,112,0.35); background: rgba(108,192,112,0.10); }
.bug-chip-status.bug-st-wontfix     { color: var(--muted-2); }

.bug-report-title {
    margin: 6px 0 4px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}
.bug-report-desc {
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.bug-report-tech {
    margin: 8px 0 12px;
    font-size: 12px;
}
.bug-report-tech summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 700;
    padding: 4px 0;
}
.bug-report-tech dl {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 4px 12px;
    margin: 8px 0 0;
}
.bug-report-tech dt { color: var(--muted); font-weight: 700; }
.bug-report-tech dd { margin: 0; color: var(--text); word-break: break-all; }
.bug-report-tech code {
    background: var(--surface-3);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
}

.bug-report-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}
.bug-report-actions .bug-status-select {
    padding: 7px 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 12.5px;
}
.bug-report-actions input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 7px 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 12.5px;
}
.bug-report-actions .btn-primary {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}
.bug-report-delete {
    margin-top: 8px;
    text-align: right;
}
.bug-report-delete .btn-danger {
    padding: 6px 12px;
    font-size: 11.5px;
    border-radius: 8px;
    border: 1px solid var(--danger-line);
    cursor: pointer;
}

/* ============================================================
   AFF ACTIVATION / STUDENT LOGBOOK-ONLY BANNER
   ============================================================ */

.student-activate-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(98,179,234,0.10), rgba(11,165,173,0.10));
    border: 1px solid rgba(98,179,234,0.28);
}
.student-activate-banner .sab-left { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 240px; }
.student-activate-banner .sab-ico {
    width: 44px; height: 44px; flex: 0 0 44px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: rgba(98,179,234,0.18);
    border: 1px solid rgba(98,179,234,0.32);
    border-radius: 12px;
}
.student-activate-banner .sab-title {
    font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 4px;
}
.student-activate-banner .sab-sub {
    font-size: 12.5px; color: var(--muted); line-height: 1.5; max-width: 560px;
}
.student-activate-banner .sab-actions .btn-primary {
    padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none;
}

.aff-activate-card {
    background: linear-gradient(135deg, rgba(98,179,234,0.10), rgba(11,165,173,0.10));
    border: 1px solid rgba(98,179,234,0.28);
    padding: 20px 22px;
}
.aff-activate-head {
    display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px;
}
.aff-activate-ico {
    width: 52px; height: 52px; flex: 0 0 52px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    background: rgba(98,179,234,0.16);
    border: 1px solid rgba(98,179,234,0.32);
    border-radius: 14px;
}
.aff-activate-actions {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.aff-activate-actions .btn-primary,
.aff-activate-actions .btn-ghost {
    padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none;
}
.aff-activate-actions .btn-ghost {
    background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.aff-activate-actions .btn-ghost:hover { border-color: var(--line-strong); color: var(--text); }
.aff-activate-hint {
    font-size: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
}

.card.aff-inactive {
    opacity: 0.6;
    position: relative;
}
.card.aff-inactive::after {
    content: "Warte auf DZ-Zuweisung";
    position: absolute;
    top: 14px; right: 14px;
    padding: 3px 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 999px;
}

/* ============================================================
   CHANGELOG + SIDEBAR VERSION
   ============================================================ */

.sidebar-version {
    display: block;
    padding: 8px 14px;
    text-align: center;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--muted);
    text-decoration: none;
    border-top: 1px solid var(--line);
    transition: color 0.15s ease, background 0.15s ease;
}
.sidebar-version:hover {
    color: var(--text);
    background: var(--surface-2);
}

.changelog-timeline { display: flex; flex-direction: column; gap: 18px; }
.changelog-release {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
}
.changelog-release-head {
    display: flex; gap: 14px; align-items: flex-start;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}
.changelog-version-badge {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(98,179,234,0.20);
}
.changelog-release-title { margin: 0 0 2px; font-size: 16px; font-weight: 800; color: var(--text); }
.changelog-entries {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.changelog-entries li {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.5;
}
.changelog-tag {
    flex: 0 0 auto;
    padding: 2px 8px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
}
.changelog-tag.tag-feature  { color: #9de0a4; border-color: rgba(108,192,112,0.35); background: rgba(108,192,112,0.10); }
.changelog-tag.tag-fix      { color: #ffb38a; border-color: rgba(255,140,66,0.35);  background: rgba(255,140,66,0.10); }
.changelog-tag.tag-change   { color: #9ec8ff; border-color: rgba(98,179,234,0.35);  background: rgba(98,179,234,0.10); }
.changelog-tag.tag-security { color: #ff8e8e; border-color: rgba(255,107,107,0.40); background: rgba(255,107,107,0.14); }
.changelog-tag.tag-perf     { color: #ffd27a; border-color: rgba(240,178,58,0.35);  background: rgba(240,178,58,0.10); }


/* ============================================================
   GLOBAL KPI GRID — used by general/control/dz_manager
   (was scoped to general.php, extracted for cross-view usage)
   ============================================================ */
.gen-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
@media (max-width: 720px) { .gen-kpi-row { grid-template-columns: repeat(2, 1fr); } }

.gen-kpi {
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: border-color .2s ease, transform .2s ease;
}
.gen-kpi:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.gen-kpi-val { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.gen-kpi-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.gen-kpi.is-warn { border-color: rgba(251,191,36,0.45); background: linear-gradient(135deg, rgba(251,191,36,0.10), transparent); }
.gen-kpi.is-warn .gen-kpi-val { color: #fbbf24; }

/* ========================================================================
   DZ Combobox (searchable dropdown for Dropzones)
   ======================================================================== */
.dz-cb { position: relative; }
.dz-cb-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    transition: border-color .12s;
}
.dz-cb-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(98,179,234,0.15);
}
.dz-cb-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 280px;
    overflow-y: auto;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 4px;
}
.dz-cb-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text);
}
.dz-cb-opt:hover, .dz-cb-opt.is-active {
    background: rgba(98,179,234,0.14);
}
.dz-cb-opt .dz-cb-name { font-weight: 600; }
.dz-cb-opt .dz-cb-city { color: var(--muted); font-size: 12px; }
.dz-cb-opt .dz-cb-empty { color: var(--muted); font-style: italic; }
.dz-cb-empty-state {
    padding: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
}

/* ========================================================================
   Legal pages (Impressum, Datenschutz, AGB, Widerruf)
   ======================================================================== */
.legal-page {
    min-height: 100vh;
    background: var(--bg);
    padding: 40px 20px;
}
.legal-container {
    max-width: 820px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 40px 44px;
    color: var(--text);
}
.legal-back {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 18px;
}
.legal-back:hover { color: var(--primary); }
.legal-page h1 {
    font-size: 28px;
    margin: 0 0 10px;
    color: var(--text);
}
.legal-page h2 {
    font-size: 18px;
    margin: 28px 0 10px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
}
.legal-page h3 {
    font-size: 15px;
    margin: 18px 0 8px;
    color: var(--text);
}
.legal-page p, .legal-page ul, .legal-page ol {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    margin: 10px 0;
}
.legal-page ul, .legal-page ol { padding-left: 22px; }
.legal-page li { margin: 4px 0; }
.legal-page a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(98,179,234,0.4);
}
.legal-page a:hover { text-decoration-color: var(--primary); }
.legal-page .legal-intro {
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
    margin-bottom: 24px;
    line-height: 1.6;
}
.legal-page .legal-footer {
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
}
.legal-page code {
    font-family: ui-monospace, monospace;
    font-size: 13px;
    background: var(--surface-2);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--line);
}

/* Footer-Links die auf jeder Seite gezeigt werden */
.site-legal-footer {
    text-align: center;
    padding: 18px 12px;
    font-size: 12px;
    color: var(--muted);
}
.site-legal-footer a {
    color: var(--muted);
    text-decoration: none;
    margin: 0 10px;
}
.site-legal-footer a:hover { color: var(--primary); }

/* ========================================================================
   App-Footer (rechtliche Links + Version)
   ======================================================================== */
.app-footer {
    margin-top: 40px;
    padding: 18px 20px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--muted);
}
.app-footer-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.app-footer-links a {
    color: var(--muted);
    text-decoration: none;
    padding: 3px 4px;
    transition: color .12s;
}
.app-footer-links a:hover { color: var(--primary); }
.app-footer-links span { color: var(--line-strong); }
.app-footer-meta a { color: var(--muted); text-decoration: none; }
.app-footer-meta a:hover { color: var(--primary); }

@media (max-width: 600px) {
    .app-footer { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ========================================================================
   Dashboard v1.0.9 — Hero-KPIs + Support-Tiles + Finance-Card
   Mit globalem Hover-Sweep für mehr Haptik
   ======================================================================== */

/* -------- Witz-Karte (dismissible) -------- */
.joke-card {
    position: relative;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 48px 14px 16px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(251,191,36,0.10), transparent 75%);
    border: 1px solid rgba(251,191,36,0.22);
    border-left: 3px solid #fbbf24;
    border-radius: 12px;
    overflow: hidden;
}
.joke-card-ico { font-size: 28px; line-height: 1; flex-shrink: 0; }
.joke-card-body { flex: 1; min-width: 0; }
.joke-card-lbl {
    font-size: 10.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .04em; color: #fbbf24; margin-bottom: 4px;
}
.joke-card-text { font-size: 14px; line-height: 1.55; color: var(--text); }
.joke-card-close {
    position: absolute; top: 10px; right: 10px;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.joke-card-close:hover {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
    transform: scale(1.1);
}

/* -------- Shared Hover-Sweep-Effect -------- */
.dash-kpi-hero, .dash-tile, .dash-finance {
    position: relative;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.4,0,.2,1), border-color .2s ease, box-shadow .25s ease;
}
.dash-kpi-hero::before, .dash-tile::before {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255,255,255,0.04) 45%,
        rgba(255,255,255,0.10) 50%,
        rgba(255,255,255,0.04) 55%,
        transparent 100%
    );
    transition: left .7s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}
.dash-kpi-hero:hover::before,
.dash-tile:hover::before { left: 120%; }

.dash-kpi-hero:hover,
.dash-tile:hover,
.dash-finance:hover {
    transform: translateY(-2px);
    border-color: rgba(98,179,234,0.4);
    box-shadow: 0 8px 22px rgba(0,0,0,0.28), 0 0 0 1px rgba(98,179,234,0.15);
}

/* -------- Hero-KPIs (2 columns) -------- */
.dash-hero-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
@media (max-width: 720px) { .dash-hero-kpis { grid-template-columns: 1fr; } }

.dash-kpi-hero {
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.dash-kpi-hero-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 6px;
}
.dash-kpi-hero-ico { font-size: 18px; line-height: 1; }
.dash-kpi-hero-lbl {
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .05em; color: var(--muted);
}
.dash-kpi-hero-val {
    font-size: 42px; font-weight: 800; color: var(--text);
    line-height: 1.05;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 8px;
}
.dash-kpi-hero-spark { width: 100%; margin: 4px 0 6px; }
.dash-kpi-hero-sub {
    font-size: 11px; color: var(--muted);
    font-weight: 500;
}

/* -------- Support-Tiles (horizontal row) -------- */
.dash-tile-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.dash-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.dash-tile-ico {
    width: 40px; height: 40px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--primary);
}
.dash-tile-body { min-width: 0; flex: 1; }
.dash-tile-val {
    font-size: 16px; font-weight: 800; color: var(--text);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-tile-lbl {
    font-size: 10.5px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .04em;
    margin-top: 2px;
}

/* -------- Finance-Card -------- */
.dash-finance {
    padding: 20px 22px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(74,222,128,0.04), transparent 70%);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.dash-finance-head {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 12px; margin-bottom: 14px;
}
.dash-finance-title {
    font-size: 14px; font-weight: 800;
    color: var(--text);
}
.dash-finance-dz { font-size: 11.5px; }

.dash-finance-row {
    display: grid;
    grid-template-columns: 80px 1fr 90px;
    align-items: center;
    gap: 10px;
    margin: 7px 0;
}
.dash-finance-lbl {
    font-size: 12px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .03em;
}
.dash-finance-bar {
    height: 10px; border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
    border: 1px solid var(--line);
}
.dash-finance-bar-fill {
    height: 100%;
    transition: width .6s cubic-bezier(.4,0,.2,1);
    border-radius: 999px;
}
.dash-finance-bar-fill.is-income  { background: linear-gradient(90deg, #4ade80, #22c55e); }
.dash-finance-bar-fill.is-expense { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.dash-finance-val {
    text-align: right;
    font-size: 14px; font-weight: 700; color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-finance-sep {
    height: 1px; background: var(--line);
    margin: 12px 0 10px;
}
.dash-finance-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0;
}
.dash-finance-total-lbl {
    font-size: 13px; font-weight: 800; color: var(--text);
    text-transform: uppercase; letter-spacing: .03em;
}
.dash-finance-total-val {
    font-size: 22px; font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.dash-finance-total-val.is-positive { color: #4ade80; }
.dash-finance-total-val.is-negative { color: #ef4444; }

.dash-finance-spark {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}
.dash-finance-spark-lbl {
    font-size: 10.5px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .04em;
    margin-bottom: 6px;
}
.dash-finance-extra {
    margin-top: 10px;
    font-size: 12px;
}

@media (max-width: 620px) {
    .dash-finance-row { grid-template-columns: 70px 1fr 80px; gap: 8px; }
    .dash-kpi-hero-val { font-size: 34px; }
}

/* ========================================================================
   Soft-Paywall: gesperrte Features (v1.0.15)
   ======================================================================== */
.feature-locked {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 22px;
    margin: 14px 0;
    background: linear-gradient(135deg, rgba(98,179,234,0.08), transparent 70%);
    border: 1px solid var(--line);
    border-left: 3px solid var(--primary);
    border-radius: 12px;
}
.feature-locked .fl-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(98,179,234,0.12);
    border-radius: 50%;
}
.feature-locked .fl-body {
    flex: 1;
    min-width: 0;
}
.feature-locked .fl-title {
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 2px;
}
.feature-locked .fl-reason {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 10px;
}
.feature-locked .fl-cta {
    display: inline-block;
    padding: 7px 14px;
    font-size: 13px;
}

.feature-locked-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(98,179,234,0.12);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
