/* ==================== THEME SYSTEM ==================== */
:root,
[data-bs-theme="dark"] {
    --bg-primary: #060809;
    --bg-card: #0d0e10;
    --bg-card-hover: #151618;
    --border-color: #1e1f21;
    --text-primary: #e8e8ea;
    --text-secondary: #8e8f91;
    --accent-primary: #8B1A1A;
    --accent-primary-hover: #A52222;
    --accent-primary-light: rgba(139, 26, 26, 0.15);
    --accent-primary-border: rgba(139, 26, 26, 0.4);
    --accent-success: #2ea043;
    --accent-danger: #f85149;
    --accent-warning: #d29922;
    --accent-info: #c9553a;
    --accent-teal: #1abc9c;
    --accent-bronze: #c46a3c;
    --accent-bronze-light: rgba(196, 106, 60, 0.15);
    --input-bg: #090a0b;
    --login-bg-start: #060809;
    --login-bg-mid: #0d0e10;
    --login-bg-end: #151618;
    --bs-body-bg: #060809;
    --bs-body-color: #e8e8ea;
    /* Bootstrap blue overrides → anthracite/blood */
    --bs-primary-rgb: 139, 26, 26;
    --bs-info-rgb: 26, 188, 156;
    --bs-dark-rgb: 12, 14, 18;
    --bs-secondary-rgb: 28, 31, 38;
    --bs-border-color: #242526;
    --body-glow-rgb: 139, 26, 26;
}

[data-bs-theme="light"] {
    --bg-primary: #f6f6f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f5f5;
    --border-color: #e2dede;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --accent-primary: #8B1A1A;
    --accent-primary-hover: #A52222;
    --accent-primary-light: rgba(139, 26, 26, 0.08);
    --accent-primary-border: rgba(139, 26, 26, 0.25);
    --accent-success: #1a7f37;
    --accent-danger: #cf222e;
    --accent-warning: #bf8700;
    --accent-info: #a5412a;
    --accent-bronze: #c46a3c;
    --accent-bronze-light: rgba(196, 106, 60, 0.12);
    --input-bg: #ffffff;
    --login-bg-start: #f5f5f5;
    --login-bg-mid: #faf0f0;
    --login-bg-end: #f0e8e8;
    --bs-body-bg: #f5f5f5;
    --bs-body-color: #1a1a1a;
    --body-glow-rgb: 139, 26, 26;
}

/* ==================== GLOBAL ==================== */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 62px;
}

/* PWA Standalone-Mode (Add-to-Home-Screen / „bloodly als App"):
   viewport-fit=cover + apple-mobile-web-app-status-bar-style=black-translucent
   bewirken, dass die Status-Bar transparent über den Content läuft.
   Die fixed .navbar hängt am Viewport-Top — sie braucht eigenes safe-area-Padding
   damit Logo + Buttons unter die Notch/Status-Bar rutschen.
   Body bekommt zusätzliche Höhe-Kompensation, damit Content nicht unter die
   erweiterte Navbar wandert. */
@media (display-mode: standalone) {
    .navbar {
        padding-top: calc(0.75rem + env(safe-area-inset-top));
    }
    body {
        padding-top: calc(62px + env(safe-area-inset-top));
    }
}
html.ios-standalone .navbar {
    padding-top: calc(0.75rem + env(safe-area-inset-top));
}
html.ios-standalone body {
    padding-top: calc(62px + env(safe-area-inset-top));
}

body > main { flex: 1; }
body > footer { flex-shrink: 0; }

/* ==================== PAGE-HEADER SUBLINE ==================== */
/* Hänge-Einrückung: die Subline unter einem großen Seitentitel
   (<h1> mit führendem bi-Icon + me-2) soll bündig unter dem Titel-TEXT
   beginnen, nicht unter dem Icon. Einrückung = Icon-Glyph (~1em der h1)
   + me-2-Abstand (0.5rem). Die Werte spiegeln Bootstraps responsive
   h1-Größe (RFS), damit die Subline bei jeder Viewport-Breite mit dem
   Titel-Text fluchtet. Varianten -h2/-h3/-h4 für kleinere Content-
   Seitentitel (Wirksamkeit, Analysen, Blutwert-Infos …) — das Icon
   skaliert mit der Überschrift, daher je Größe ein eigener Wert. */
.page-subtitle    { padding-left: calc(1.875rem + 1.5vw); }  /* h1: (1.375rem + 1.5vw) + 0.5rem */
.page-subtitle-h2 { padding-left: calc(1.825rem + 0.9vw); }  /* h2: (1.325rem + 0.9vw) + 0.5rem */
.page-subtitle-h3 { padding-left: calc(1.8rem  + 0.6vw); }   /* h3: (1.3rem  + 0.6vw) + 0.5rem */
.page-subtitle-h4 { padding-left: calc(1.775rem + 0.3vw); }  /* h4: (1.275rem + 0.3vw) + 0.5rem */
@media (min-width: 1200px) {
    .page-subtitle    { padding-left: 3rem; }     /* h1: 2.5rem  + 0.5rem */
    .page-subtitle-h2 { padding-left: 2.5rem; }   /* h2: 2.0rem  + 0.5rem */
    .page-subtitle-h3 { padding-left: 2.25rem; }  /* h3: 1.75rem + 0.5rem */
    .page-subtitle-h4 { padding-left: 2rem; }     /* h4: 1.5rem  + 0.5rem */
}

/* ==================== DESKTOP-SEITENINSET ==================== */
/* Seitliche Ruhezonen ab dem Navbar-Expand-Breakpoint (≥992px = navbar-expand-lg):
   genau ab hier zeigt die Navbar die volle Leiste statt des Burger-Menüs, daher
   endet der Inset exakt am Burger-Breakpoint (kein Versatz mehr im 768–991px-
   Bereich). <992px (Burger / Mobile) bleibt full-bleed. width: min(80%, 1600px)
   + zentriert = ~10 % je Seite, aber nie breiter als 1600px (Ultrawide-Deckel).
   Navbar-Inhalt, Banner, Main und Footer fluchten dadurch bündig. */
@media (min-width: 992px) {
    .navbar > .container-fluid,
    body > .container-fluid,
    footer > .container-fluid {
        width: min(80%, 1600px);
        margin-inline: auto;
    }
    /* .navbar hat sonst padding-x:1rem → ihre 80%-Basis wäre kleiner als die
       des Contents (Versatz ~13px). Der Inset übernimmt den Seitenabstand,
       daher padding-x weg → Navbar-Inhalt fluchtet exakt mit dem Content.
       (body .navbar = höhere Spezifität als die spätere .navbar-Regel.) */
    body .navbar { padding-inline: 0; }
}

/* Subtiler roter Glow im Darkmode */
[data-bs-theme="dark"] body::before,
[data-bs-theme="dark"] body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

[data-bs-theme="dark"] body::before {
    top: -20%;
    left: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(var(--body-glow-rgb),0.18) 0%, rgba(var(--body-glow-rgb),0.07) 40%, transparent 70%);
    animation: glowDrift 25s ease-in-out infinite;
}

[data-bs-theme="dark"] body::after {
    bottom: -15%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(var(--body-glow-rgb),0.14) 0%, rgba(var(--body-glow-rgb),0.05) 40%, transparent 70%);
    animation: glowDrift 30s ease-in-out infinite reverse;
}

/* Light Mode: dezente Red Glows */
[data-bs-theme="light"] body::before,
[data-bs-theme="light"] body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

[data-bs-theme="light"] body::before {
    top: -20%;
    left: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(var(--body-glow-rgb),0.06) 0%, rgba(var(--body-glow-rgb),0.02) 40%, transparent 70%);
    animation: glowDrift 25s ease-in-out infinite;
}

[data-bs-theme="light"] body::after {
    bottom: -15%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(var(--body-glow-rgb),0.04) 0%, rgba(var(--body-glow-rgb),0.01) 40%, transparent 70%);
    animation: glowDrift 30s ease-in-out infinite reverse;
}

@keyframes glowDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, 30px); }
}

/* Content über dem Glow */
/* Navbar: Fixed + Auto-Hide on Scroll */

.navbar.nav-hidden {
    transform: translateY(-100%);
}

a { color: var(--accent-primary); }
a:hover { color: var(--accent-primary-hover); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.4rem 0.62rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle i { transition: transform 0.35s ease; }
.theme-toggle:hover i { transform: rotate(25deg); }

.theme-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-primary-light);
}

/* ==================== LOGIN PAGE ==================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--login-bg-start) 0%, var(--login-bg-mid) 50%, var(--login-bg-end) 100%);
    padding: 1rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: loginFadeIn 0.5s ease;
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo { text-align: center; margin-bottom: 2rem; }

.login-logo .logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--accent-primary);
    margin-bottom: 0.75rem;
}

.login-logo .logo-icon svg { width: 36px; height: 36px; }

.login-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: var(--accent-primary);
    letter-spacing: -0.5px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.login-card .form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.login-card .form-control:focus {
    background-color: var(--input-bg);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.login-card .form-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.login-card .btn-primary {
    background: var(--accent-primary);
    border: none;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: #fff;
}

.login-card .btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(var(--body-glow-rgb), 0.3);
}

.login-card .input-group-text {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 10px 0 0 10px;
}

.login-card .input-group .form-control {
    border-radius: 0 10px 10px 0;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    /* Frosted Glass (Sprint 2026-06-07): halbtransparent + Blur über dem scrollenden Inhalt */
    background-color: rgba(13, 14, 16, 0.50) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar .dropdown-menu {
    max-height: 80vh;
    overflow-y: auto;
    /* Glas-Dropdown (Richtung C): frosted, aber lesbar (Menü ≠ Bar) */
    background: rgba(14, 15, 18, 0.92);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 7px;
    margin-top: 0.5rem;
}
.navbar .dropdown-item {
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.navbar .dropdown-item i { margin: 0 !important; font-size: 1rem; width: 1.1rem; text-align: center; }
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
    background: var(--accent-bronze-light);
    color: #fff;
}
.navbar .dropdown-divider { border-top-color: rgba(255, 255, 255, 0.07); margin: 6px 10px; }

.navbar-brand { font-size: 1.25rem; }

.navbar-brand .brand-text {
    color: var(--accent-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ---- Top-Navbar: Pill-Navigation + Chevron (Sprint 2026-06-08, Richtung C) ---- */
/* Sauberer Chevron statt Bootstrap-Caret für alle Navbar-Dropdowns, rotiert beim Öffnen. */
.navbar .dropdown-toggle::after {
    content: "";
    display: inline-block;
    border: none;
    width: 0.45em;
    height: 0.45em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 0.5em;
    vertical-align: middle;
    transition: transform 0.2s ease;
}
.navbar .dropdown-toggle.show::after { transform: rotate(225deg); }

/* Pill-Navigation im linken Track — nur Desktop (Mobile = Burger-Stack, unverändert) */
@media (min-width: 992px) {
    .navbar-nav.me-auto {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        border-radius: 999px;
        padding: 3px;
        gap: 3px;
        margin-left: 0.85rem;
    }
    .navbar-nav.me-auto .nav-link {
        border-radius: 999px;
        padding: 0.42rem 0.9rem;
        font-weight: 600;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: 0.35rem;
        transition: background 0.18s ease, color 0.18s ease;
    }
    .navbar-nav.me-auto .nav-link i { margin: 0 !important; }
    .navbar-nav.me-auto .nav-link:hover {
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-primary);
    }
    /* aktiv = NUR Schriftfarbe (Blood-Red) + etwas fetter, kein Pill-Fill (User-Wunsch).
       Kein background/box-shadow → Hover-Bg greift weiterhin auch auf dem aktiven Item. */
    .navbar-nav.me-auto .nav-link.active {
        color: #fff;
        font-weight: 700;
        text-shadow: 0 0 6px rgba(255, 255, 255, 0.30);
    }
    /* Bronze-Glow-Dot vor dem aktiven Reiter + kleiner Abstand zum Icon */
    .navbar-nav.me-auto .nav-link.active::before {
        content: "";
        flex: 0 0 auto;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--accent-bronze);
        box-shadow: 0 0 8px rgba(196, 106, 60, 0.95), 0 0 3px rgba(196, 106, 60, 1);
        margin-right: 0.4rem;
    }
}

.user-chip {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.25rem 0.7rem 0.25rem 0.3rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.user-chip:hover { background: var(--bg-card-hover); border-color: var(--accent-primary-border); }
.user-chip::after { margin-left: 0.1rem; vertical-align: middle; }
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #3a0d0d);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}
.user-chip-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); line-height: 1; }
.user-role-pill {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 0.14rem 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    line-height: 1;
}
.user-role-pill.role-admin { color: #e0a3a3; background: var(--accent-primary-light); border-color: var(--accent-primary-border); }
.user-role-pill.role-coach { color: var(--accent-warning); background: rgba(210, 153, 34, 0.13); border-color: rgba(210, 153, 34, 0.35); }
.user-role-pill.role-user  { color: var(--text-secondary); background: rgba(255, 255, 255, 0.05); border-color: var(--border-color); }

/* ==================== COACH ATHLETE SWITCHER ==================== */
.athlete-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.athlete-switcher label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.athlete-switcher .form-select {
    max-width: 300px;
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ==================== STAT CARDS ==================== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

[data-bs-theme="dark"] .stat-card {
    background: linear-gradient(180deg, #1e1e1e 0%, #171717 100%);
    border-color: rgba(255,255,255,0.06);
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] .stat-card:hover {
    background: #1c1c1c;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-info { display: flex; flex-direction: column; }

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ==================== CATEGORY CARDS ==================== */
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .category-card {
    background: linear-gradient(180deg, #1e1e1e 0%, #171717 100%);
    border-color: rgba(255,255,255,0.06);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cat-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    border-color: color-mix(in srgb, var(--cat-color) 30%, transparent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px color-mix(in srgb, var(--cat-color) 10%, transparent);
}

[data-bs-theme="dark"] .category-card:hover {
    background: #1c1c1c;
}

.category-card:hover::before { opacity: 1; }

.category-card-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    background: color-mix(in srgb, var(--cat-color) 15%, transparent);
    color: var(--cat-color);
    transition: all 0.3s ease;
}

.category-card:hover .category-card-icon {
    transform: scale(1.1);
    background: color-mix(in srgb, var(--cat-color) 25%, transparent);
}

.category-card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.category-card-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==================== CATEGORY NAV ==================== */
.category-nav-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.category-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.category-nav-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--cat-color);
}

.category-nav-btn.active {
    background: color-mix(in srgb, var(--cat-color) 20%, transparent);
    border-color: var(--cat-color);
    color: var(--cat-color);
    font-weight: 600;
}

/* ==================== CATEGORY HEADER ==================== */
.category-header-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== CHART CARDS ==================== */
.chart-card { transition: all 0.2s ease; }
.chart-card:hover { border-color: var(--accent-primary) !important; }

/* Charts-Collapsed: nur der Verlaufs-Chart (Canvas + Zeitfilter) wird
   ausgeblendet. Wertetabelle, Supplements-Badges, Tags und Kommentar
   bleiben sichtbar — der User hat nur den Platz-fressenden Chart weg.
   Greift in Dashboard + Kategorie-Ansicht durch .charts-collapsed am parent. */
.charts-collapsed .chart-card .chart-time-filter,
.charts-collapsed .chart-card .chart-container { display: none !important; }

/* ==================== OCR/IMPORT-PROGRESS (indeterminate) ==================== */
/* CSS-only animierte Progress-Bar. Läuft auch dann weiter, wenn Mobile
   Safari während eines synchronen Form-Submits die JS-Timer drosselt —
   Keyframes-Animationen werden vom Browser unabhängig vom JS-Thread
   gerendert. So sieht der User immer, dass die App arbeitet. */
.ocr-indeterminate {
    position: relative;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    height: 6px;
    border-radius: 3px;
}
.ocr-indeterminate::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 40%;
    background: var(--accent-primary, #4dabf7);
    border-radius: 3px;
    animation: ocr-indeterminate 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes ocr-indeterminate {
    0%   { left: -40%; width: 40%; }
    50%  { left:  30%; width: 50%; }
    100% { left: 100%; width: 40%; }
}

/* ==================== KATEGORIEN-ORDNER-ANSICHT ==================== */
.categories-tree {
    background: var(--bg-card, #1a1b1d);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    padding: 0.75rem 1rem;
}
.cat-tree-node { border-bottom: 1px solid rgba(255,255,255,0.04); }
.cat-tree-node:last-child { border-bottom: none; }
.cat-tree-row,
.bvt-tree-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}
.cat-tree-row { font-weight: 600; }
.bvt-tree-row { padding-left: 1.5rem; font-weight: 500; }
.cat-tree-chevron,
.bvt-tree-chevron {
    background: transparent;
    border: 0;
    color: var(--text-secondary, #8b8f96);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.cat-tree-chevron:hover,
.bvt-tree-chevron:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary, #e9ecef);
}
.cat-tree-chevron:focus-visible,
.bvt-tree-chevron:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 1px;
}
.bvt-tree-chevron-empty {
    display: inline-block;
    width: 1.35rem;
    height: 1rem;
}
.cat-tree-icon { color: var(--cat-color, var(--accent-primary)); font-size: 1.1rem; }
.cat-tree-name,
.bvt-tree-name {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    transition: color 0.15s;
}
.cat-tree-name:hover,
.bvt-tree-name:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}
.cat-tree-arrow,
.bvt-tree-arrow {
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    font-size: 1.1rem;
    margin-left: -0.15rem;
}
.cat-tree-name:hover .cat-tree-arrow,
.bvt-tree-name:hover .bvt-tree-arrow {
    opacity: 1;
    transform: translateX(2px);
}
.cat-tree-count { font-size: 0.85rem; }
.bvt-tree-latest { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.bvt-tree-ref {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
    padding-left: 0.25rem;
    border-left: 1px solid rgba(255,255,255,0.08);
    margin-left: 0.1rem;
}
.bvt-tree-ref i { font-size: 0.85rem; margin-right: 0.1rem; }
.cat-tree-body,
.bvt-tree-body {
    padding-left: 1.2rem;
}
.m-tree-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0 0.25rem 1.8rem;
    font-size: 0.85rem;
    border-left: 2px solid rgba(255,255,255,0.08);
    margin-left: 0.9rem;
}
.m-tree-date { min-width: 5.5rem; font-variant-numeric: tabular-nums; }
.m-tree-value { font-weight: 500; font-variant-numeric: tabular-nums; }

.categories-view-btn.active { pointer-events: none; }

/* Chart Meta: Wert, Referenz, Messwerte */
.chart-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.chart-meta-item {
    color: var(--text-secondary);
    font-size: 0.82rem;
    white-space: nowrap;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ==================== SUPPLEMENT BADGES ==================== */
.supplement-badge {
    --badge-color: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0.15rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 4px solid var(--badge-color);
    font-size: 0.875rem;
    flex-wrap: wrap;
    max-width: 100%;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.supplement-badge:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 24px color-mix(in srgb, var(--badge-color) 25%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.supplement-badge strong {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.95);
}
.supplement-badge .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 500;
}
.supplement-badge small.text-muted {
    color: rgba(255, 255, 255, 0.42) !important;
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
}

.supplement-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--badge-color);
}

/* Chevron-Rotation bei Collapse-Togglern */
[aria-expanded="true"] .collapse-chevron { transform: rotate(180deg); }

/* IM-Gruppen-Container: farbiger linker Strich, kein Hintergrund */
.im-group-container {
    --group-color: rgba(165, 34, 34, 0.6);
    position: relative;
    padding: 0.5rem 0.75rem 0.75rem 1rem;
    border-left: 3px solid var(--group-color);
    margin-bottom: 0.75rem;
}
.im-group-container-heading {
    color: var(--group-color);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

/* Blood-Value-Verknüpfungs-Chip */
.supplement-badge .bv-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.12rem 0.4rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.supplement-badge .bv-link-chip i { font-size: 0.7rem; }

.supplement-badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    border: 1px solid;
    font-size: 0.75rem;
    transition: opacity 0.15s, filter 0.15s;
}
/* Variante mit Meta-Zeile (Date + ggf. Schedule): immer zweizeilig */
.supplement-badge-sm.has-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 0.75rem;
}
.supp-badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 0.35rem;
    row-gap: 0.15rem;
}
.supp-badge-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 0.4rem;
    row-gap: 0.15rem;
    margin-top: 0.3rem;
    padding-left: 1.05rem;
    font-size: 0.68rem;
    opacity: 0.75;
    line-height: 1.25;
}
.supp-badge-date {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.supp-badge-sep {
    opacity: 0.5;
    user-select: none;
}
.supp-badge-schedule {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    word-break: break-word;
    min-width: 0;
}
.supp-badge-schedule > i {
    font-size: 0.6rem;
    opacity: 0.8;
    flex-shrink: 0;
}
.chart-toggle-badge:hover { filter: brightness(1.3); }
/* Tag-Date rechts-bündig — wirkt nur wenn Tag-Badge volle Breite hat (Mobile).
   Auf Desktop bleibt das Datum inline neben dem Tag-Namen. */
.chart-toggle-badge[data-toggle-type="tag"] .tag-date {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
@media (max-width: 768px) {
    /* Mobile: Sichtbare Badges (mit Meta-Zeile) sowie Tag-Badges erhalten volle
       Breite — verhindert hässliches Wrap-Tetris bei langen Schedule-Strings,
       macht das Tap-Target großzügiger und sorgt für eine einheitliche Optik
       im gesamten Annotations-Block. Reine Hidden-Badges (kompakt) dürfen
       weiterhin nebeneinander liegen. */
    .supplement-badge-sm.has-meta,
    .chart-toggle-badge[data-toggle-type="tag"] {
        width: 100%;
    }
    .supp-badge-meta {
        font-size: 0.7rem;
        padding-left: 1rem;
    }
}

.supplement-dot-sm { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.supplement-dot-lg { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* Tags-Sektion: Collapsible in ChartCards */
.tags-collapse-toggle[aria-expanded="true"] .tags-collapse-icon { transform: rotate(180deg); }
.tags-collapse-toggle:hover small { color: var(--text-color, #e8ecf1) !important; }

/* ==================== SUPPLEMENT CARDS ==================== */
.supplement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    border-left: 4px solid;
}

.supplement-card:hover { background: var(--bg-card-hover); }
.supplement-card.active-supplement { border-left-color: var(--accent-success); }
.supplement-card.ended-supplement { border-left-color: var(--text-secondary); opacity: 0.75; }

/* ==================== NAVIGATION PILLS ==================== */
.personal-nav,
.backend-nav,
.admin-nav {
    gap: 3px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    /* Segmented Track (Sprint 2026-06-08), konsistent zur Top-Nav-Pill-Sprache */
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 3px;
}

.personal-nav::-webkit-scrollbar,
.backend-nav::-webkit-scrollbar,
.admin-nav::-webkit-scrollbar { display: none; }

.personal-nav .nav-link,
.backend-nav .nav-link,
.admin-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.42rem 0.9rem;
}
.personal-nav .nav-link i,
.backend-nav .nav-link i,
.admin-nav .nav-link i { margin: 0 !important; }

.personal-nav .nav-link:hover,
.backend-nav .nav-link:hover,
.admin-nav .nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* aktiv = dezenter Bronze-Tint-Pill + Bronze-Text (statt hartem rotem Block) */
.personal-nav .nav-link.active,
.backend-nav .nav-link.active,
.admin-nav .nav-link.active {
    background: transparent;   /* Bootstrap .nav-pills Default-Active-Bg killen */
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.30);
}
.personal-nav .nav-link.active::before,
.backend-nav .nav-link.active::before,
.admin-nav .nav-link.active::before {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-bronze);
    box-shadow: 0 0 8px rgba(196, 106, 60, 0.95), 0 0 3px rgba(196, 106, 60, 1);
    margin-right: 0.4rem;
}

/* ── Sektions-Pills „Mehr"-Dropdown (2b, Sprint 2026-06-08) ── */
/* Beide Sektions-Navs mit „Mehr"-Dropdown brauchen sichtbaren Overflow, sonst
   schneidet der ehemalige Scroll-Track das Dropdown ab. Declutter macht den
   horizontalen Scroll überflüssig → flex-wrap fängt schmale Breiten ab. */
.personal-nav,
.admin-nav { overflow: visible; flex-wrap: wrap; row-gap: 3px; }

.personal-nav .dropdown-toggle::after,
.admin-nav .dropdown-toggle::after {
    content: "";
    display: inline-block;
    border: none;
    width: 0.42em;
    height: 0.42em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 0.05rem;
    vertical-align: middle;
    transition: transform 0.2s ease;
}
.personal-nav .dropdown-toggle.show::after,
.admin-nav .dropdown-toggle.show::after { transform: rotate(225deg); }

.personal-nav .dropdown-menu,
.admin-nav .dropdown-menu {
    background: rgba(14, 15, 18, 0.92);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 7px;
    margin-top: 0.45rem;
}
.personal-nav .dropdown-item,
.admin-nav .dropdown-item {
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.personal-nav .dropdown-item i,
.admin-nav .dropdown-item i { margin: 0 !important; font-size: 1rem; width: 1.1rem; text-align: center; }
.personal-nav .dropdown-item:hover,
.personal-nav .dropdown-item:focus,
.admin-nav .dropdown-item:hover,
.admin-nav .dropdown-item:focus { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }
.personal-nav .dropdown-item.active,
.admin-nav .dropdown-item.active { background: var(--accent-bronze-light); color: #fff; }

/* ==================== ANALYSIS SESSION CARDS ==================== */
.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.analysis-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.analysis-card .analysis-date { font-size: 1.1rem; font-weight: 600; }
.analysis-card .analysis-meta { color: var(--text-secondary); font-size: 0.85rem; }

/* ==================== ADMIN DASHBOARD ==================== */
.admin-metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.admin-metric-card .metric-value { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.admin-metric-card .metric-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }

.progress-bar-custom {
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    overflow: hidden;
}

.progress-bar-custom .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ==================== USER MANAGEMENT ==================== */
.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-role-badge.role-admin {
    background: rgba(var(--body-glow-rgb), 0.15);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary-border);
}

.user-role-badge.role-coach {
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-warning);
    border: 1px solid rgba(210, 153, 34, 0.3);
}

.user-role-badge.role-manager {
    background: rgba(120, 80, 160, 0.15);
    color: #b088d0;
    border: 1px solid rgba(120, 80, 160, 0.3);
}

.user-role-badge.role-user {
    background: rgba(201, 85, 58, 0.15);
    color: var(--accent-info);
    border: 1px solid rgba(201, 85, 58, 0.3);
}

/* ==================== MAPPING GRID ==================== */
.mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* ==================== TABLES ==================== */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: var(--bg-card-hover);
}

[data-bs-theme="light"] .table-dark {
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
}

/* ==================== FORMS ==================== */
.form-control,
.form-select {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem var(--accent-primary-light);
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

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

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

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

/* ==================== CARDS ==================== */
.card {
    border-radius: 12px;
    background-color: var(--bg-card);
    transition: background-color 0.3s ease;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    background-color: var(--bg-card);
}

/* Dark Mode: Card depth — Header leicht erhöht, Body abgedunkelt */
[data-bs-theme="dark"] .card-header {
    background: linear-gradient(180deg, #1a1b1d 0%, #151618 100%);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

[data-bs-theme="dark"] .card-body {
    background: linear-gradient(180deg, #1e1e1e 0%, #171717 100%);
    border-radius: 0 0 12px 12px;
}

/* Cards ohne Header: Body bekommt volle Rundung */
[data-bs-theme="dark"] .card-body:first-child {
    border-radius: 12px;
}

/* ==================== BOOTSTRAP OVERRIDES — Anti-Blue ==================== */
[data-bs-theme="dark"] {
    --bs-border-color: var(--border-color);
    --bs-tertiary-bg: var(--bg-card);
    --bs-secondary-bg: var(--bg-card-hover);
}

/* Bootstrap info → teal statt blau */
[data-bs-theme="dark"] .bg-info {
    background-color: rgba(26, 188, 156, 0.9) !important;
}

[data-bs-theme="dark"] .text-info {
    color: var(--accent-teal) !important;
}

[data-bs-theme="dark"] .badge.bg-info {
    background-color: rgba(26, 188, 156, 0.85) !important;
}

[data-bs-theme="dark"] .border-info {
    border-color: var(--accent-teal) !important;
}

/* Bootstrap primary → blood statt blau */
[data-bs-theme="dark"] .text-primary {
    color: var(--accent-primary) !important;
}

[data-bs-theme="dark"] .bg-primary {
    background-color: var(--accent-primary) !important;
}

/* Stat-Icon Hintergründe: warm statt blau */
[data-bs-theme="dark"] .stat-icon.bg-primary.bg-opacity-25 {
    background-color: rgba(var(--body-glow-rgb), 0.2) !important;
}

[data-bs-theme="dark"] .stat-icon.bg-info.bg-opacity-25 {
    background-color: rgba(26, 188, 156, 0.15) !important;
}

[data-bs-theme="dark"] .stat-icon.bg-success.bg-opacity-25 {
    background-color: rgba(46, 160, 67, 0.15) !important;
}

[data-bs-theme="dark"] .stat-icon.bg-warning.bg-opacity-25 {
    background-color: rgba(210, 153, 34, 0.15) !important;
}

/* Form-Switch — anthrazit statt blau */
[data-bs-theme="dark"] .form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

[data-bs-theme="dark"] .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem var(--accent-primary-light);
    border-color: var(--accent-primary);
}

/* Dropdown — anthrazit */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: var(--bg-card-hover);
}

/* Modal — anthrazit */
[data-bs-theme="dark"] .modal-content {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

/* Pagination — anthrazit */
[data-bs-theme="dark"] .page-link {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .page-link:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Nav-Tabs und Pills — kein Blau */
[data-bs-theme="dark"] .nav-link:hover {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .nav-link.active {
    color: #fff;
}

/* Border-secondary anthrazit */
.border-secondary {
    border-color: var(--border-color) !important;
}

/* ==================== ALERTS ==================== */
.alert { border-radius: 10px; }

/* Alert-Text an Theme binden — Bootstrap's dunkelblaues alert-info ist auf
   Anthrazit-Dark-Mode unlesbar. Wir setzen color auf --text-primary, auch
   Links/details-summary erben das. */
.alert-info,
.alert-info *:not(.text-warning):not(.text-success):not(.text-danger):not(.text-primary):not(.btn) {
    color: var(--text-primary) !important;
}
.alert-info a,
.alert-info summary.text-primary {
    color: var(--accent-info, #6ab7ff) !important;
}
.alert-info hr { border-color: var(--border-color); }
.alert-warning,
.alert-warning *:not(.text-success):not(.text-danger):not(.text-primary):not(.btn) {
    color: var(--text-primary) !important;
}
.alert-danger,
.alert-danger *:not(.text-warning):not(.text-success):not(.btn) {
    color: var(--text-primary) !important;
}
.alert-success,
.alert-success *:not(.text-warning):not(.text-danger):not(.btn) {
    color: var(--text-primary) !important;
}

/* ==================== PROFILE SECTION ==================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

/* ==================== VIEWING-AS BANNER ==================== */
.viewing-as-banner {
    background: linear-gradient(90deg, rgba(210, 153, 34, 0.15) 0%, rgba(210, 153, 34, 0.05) 100%);
    border: 1px solid rgba(210, 153, 34, 0.3);
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.viewing-as-banner > i { color: var(--accent-warning); font-size: 1.15rem; flex-shrink: 0; }
.viewing-as-banner .viewing-name {
    font-weight: 600;
    color: var(--accent-warning);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}
.viewing-as-banner .btn-back-coach {
    margin-left: auto;
    background: rgba(210, 153, 34, 0.2);
    border: 1px solid rgba(210, 153, 34, 0.4);
    color: var(--accent-warning);
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}
.viewing-as-banner .btn-back-coach:hover {
    background: rgba(210, 153, 34, 0.35);
    color: #fff;
}
.viewing-as-banner .btn-back-coach-label-short { display: none; }
@media (max-width: 575.98px) {
    .viewing-as-banner { padding: 0.5rem 0.7rem; gap: 0.45rem; }
    .viewing-as-banner > i { font-size: 1rem; }
    .viewing-as-banner .viewing-name { font-size: 0.95rem; }
    .viewing-as-banner .btn-back-coach { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
    .viewing-as-banner .btn-back-coach-label { display: none; }
    .viewing-as-banner .btn-back-coach-label-short { display: inline; }
}

/* ==================== COACH PANEL ==================== */

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Athlete Cards */
.athlete-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 92%, rgba(210, 153, 34, 0.5)) 100%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: all 0.25s ease;
    cursor: pointer;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.athlete-card--red {
    border-color: rgba(248, 81, 73, 0.3);
    background: linear-gradient(145deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 88%, rgba(248, 81, 73, 0.5)) 100%);
}
.athlete-card--yellow {
    border-color: rgba(210, 153, 34, 0.3);
    background: linear-gradient(145deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 88%, rgba(210, 153, 34, 0.5)) 100%);
}
.athlete-card--green {
    border-color: rgba(26, 188, 156, 0.3);
    background: linear-gradient(145deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 88%, rgba(26, 188, 156, 0.5)) 100%);
}
.athlete-card:hover {
    border-color: rgba(210, 153, 34, 0.5);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* Athlete Card Header */
.athlete-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.athlete-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    border: 2px solid rgba(210, 153, 34, 0.3);
    transition: border-color 0.2s;
}
.athlete-avatar--red { border-color: rgba(248, 81, 73, 0.5); }
.athlete-avatar--yellow { border-color: rgba(210, 153, 34, 0.5); }
.athlete-avatar--green { border-color: rgba(26, 188, 156, 0.5); }
.athlete-card-identity {
    flex: 1;
    min-width: 0;
}
.athlete-card-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.athlete-card-username {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.athlete-card-status-dot {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Metrics Row */
.athlete-card-metrics {
    display: flex;
    gap: 0.5rem;
}
.athlete-metric {
    flex: 1;
    text-align: center;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 0.5rem 0.25rem;
    border: 1px solid transparent;
}
.athlete-metric--danger {
    background: rgba(248, 81, 73, 0.08);
    border-color: rgba(248, 81, 73, 0.2);
}
.athlete-metric--warn {
    background: rgba(210, 153, 34, 0.08);
    border-color: rgba(210, 153, 34, 0.2);
}
.athlete-metric-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}
.athlete-metric-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Category Health Dots */
.athlete-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.cat-dot {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.cat-dot--green { background: rgba(26, 188, 156, 0.12); border-color: rgba(26, 188, 156, 0.3); }
.cat-dot--yellow { background: rgba(210, 153, 34, 0.12); border-color: rgba(210, 153, 34, 0.3); }
.cat-dot--red { background: rgba(248, 81, 73, 0.12); border-color: rgba(248, 81, 73, 0.3); }
.cat-dot--empty { opacity: 0.4; }

/* Footer & Action */
.athlete-card-footer {
    margin-top: auto;
}
.athlete-card-action {
    margin-top: 0.25rem;
}
.athlete-card-btn {
    background: rgba(210, 153, 34, 0.12);
    border: 1px solid rgba(210, 153, 34, 0.3);
    color: var(--accent-warning);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.45rem;
    transition: all 0.2s;
}
.athlete-card-btn:hover {
    background: rgba(210, 153, 34, 0.25);
    color: #fff;
    border-color: rgba(210, 153, 34, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(210, 153, 34, 0.15);
}
.athlete-card-btn--prominent {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.2) 0%, rgba(210, 153, 34, 0.1) 100%);
    border: 1px solid rgba(210, 153, 34, 0.4);
    padding: 0.6rem;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}
.athlete-card-btn--prominent:hover {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.4) 0%, rgba(210, 153, 34, 0.2) 100%);
    border-color: rgba(210, 153, 34, 0.7);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(210, 153, 34, 0.2);
}

/* Coach Notes Button in Athlete Card */
.athlete-card-btn--notes {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.15) 0%, rgba(108, 117, 125, 0.08) 100%);
    border: 1px solid rgba(108, 117, 125, 0.3);
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 2px;
}
.athlete-card-btn--notes:hover {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.25) 0%, rgba(210, 153, 34, 0.12) 100%);
    border-color: rgba(210, 153, 34, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Coach Note Cards */
.coach-note-card {
    border-left: 3px solid var(--border-subtle, rgba(108, 117, 125, 0.3));
    transition: border-color 0.2s, box-shadow 0.2s;
}
.coach-note-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.coach-note-high {
    border-left-color: rgba(248, 81, 73, 0.6);
    background: linear-gradient(145deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 95%, rgba(248, 81, 73, 0.3)) 100%);
}
.note-content {
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Coach-Note BVT Multi-Select */
.bvt-multiselect-grid {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    background: var(--bg-card);
}
.bvt-multiselect-cat {
    margin-bottom: 0.85rem;
}
.bvt-multiselect-cat:last-child { margin-bottom: 0; }
.bvt-multiselect-cat-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-warning);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border-color);
}
.bvt-multiselect-cat-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.15rem 0.6rem;
}
.bvt-multiselect-item .form-check-label {
    font-size: 0.88rem;
    cursor: pointer;
}
.bvt-multiselect-item .form-check-input {
    cursor: pointer;
}

/* Coach Sort Icon Button */
.coach-sort-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1.05rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    position: relative;
}
.coach-sort-icon-btn:hover,
.coach-sort-icon-btn:focus {
    border-color: var(--accent-warning);
    color: var(--accent-warning);
    background: rgba(210, 153, 34, 0.10);
    transform: translateY(-1px);
    outline: none;
}
.coach-sort-icon-btn.is-non-default {
    border-color: rgba(210, 153, 34, 0.55);
    color: var(--accent-warning);
}
.coach-sort-icon-btn.is-non-default::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-warning);
    box-shadow: 0 0 4px rgba(210, 153, 34, 0.7);
}

/* Coach Sort Modal Options */
.coach-sort-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid transparent;
    margin-bottom: 0.35rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.coach-sort-option:hover {
    background: var(--bg-card-hover, rgba(255, 255, 255, 0.04));
    color: var(--text-primary);
    border-color: var(--border-color);
    text-decoration: none;
    transform: translateX(2px);
}
.coach-sort-option.is-active {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.18), rgba(210, 153, 34, 0.06));
    border-color: rgba(210, 153, 34, 0.45);
}
.coach-sort-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.coach-sort-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}
.coach-sort-option-label {
    font-weight: 600;
    font-size: 0.95rem;
}
.coach-sort-option-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.coach-sort-option-check {
    color: var(--accent-warning);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Coach Panel Toggle in Navbar */
.coach-panel-toggle {
    color: var(--accent-warning) !important;
    font-weight: 600;
}
.coach-panel-toggle.active {
    background: rgba(210, 153, 34, 0.15) !important;
    border-radius: 6px;
}

/* Coach Panel Quick-Button — Mobile */
.coach-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(210, 153, 34, 0.45);
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.14), rgba(210, 153, 34, 0.04));
    color: var(--accent-warning);
    font-size: 1.05rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.coach-mobile-btn:hover,
.coach-mobile-btn:focus {
    color: var(--accent-warning);
    text-decoration: none;
    border-color: var(--accent-warning);
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.28), rgba(210, 153, 34, 0.10));
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(210, 153, 34, 0.25);
}
.coach-mobile-btn.active {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.32), rgba(210, 153, 34, 0.14));
    border-color: var(--accent-warning);
    box-shadow: 0 0 0 2px rgba(210, 153, 34, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.coach-mobile-btn.active::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-warning);
    box-shadow: 0 0 4px rgba(210, 153, 34, 0.7);
}
.coach-mobile-btn {
    position: relative;
}

/* ==================== FAVORITE BUTTON ==================== */
.favorite-btn:hover i { color: var(--accent-warning) !important; }

/* ==================== TEXT ACCENT HELPERS ==================== */
.text-primary { color: var(--accent-primary) !important; }

/* ==================== LIGHT MODE OVERRIDES ==================== */
[data-bs-theme="light"] .bg-dark {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] .card.bg-dark,
[data-bs-theme="light"] .card {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] .card-header {
    background: linear-gradient(180deg, #f8f8f8 0%, #f2f2f2 100%) !important;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

[data-bs-theme="light"] .card-body {
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%) !important;
    border-radius: 0 0 12px 12px;
}

[data-bs-theme="light"] .card-body:first-child {
    border-radius: 12px;
}

[data-bs-theme="light"] .table-dark {
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text-primary) !important;
    --bs-table-border-color: var(--border-color) !important;
    --bs-table-hover-bg: var(--bg-card-hover) !important;
    --bs-table-striped-bg: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] .table-dark th,
[data-bs-theme="light"] .table-dark td {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-bs-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.50) !important;
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="light"] .navbar .nav-link {
    color: var(--text-secondary) !important;
}

[data-bs-theme="light"] .navbar .nav-link:hover,
[data-bs-theme="light"] .navbar .nav-link.active {
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] .navbar-brand img {
    filter: brightness(0.2);
}

[data-bs-theme="light"] .dropdown-menu-dark {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

[data-bs-theme="light"] .dropdown-menu-dark .dropdown-item {
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] .dropdown-menu-dark .dropdown-item:hover {
    background-color: var(--bg-card-hover) !important;
}

[data-bs-theme="light"] .dropdown-menu-dark .dropdown-divider {
    border-color: var(--border-color) !important;
}

[data-bs-theme="light"] .border-secondary {
    border-color: var(--border-color) !important;
}

[data-bs-theme="light"] .text-muted {
    color: var(--text-secondary) !important;
}

[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    background-color: var(--input-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] .form-control.bg-dark {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] .input-group-text {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="light"] .btn-close {
    filter: none !important;
}

[data-bs-theme="light"] .modal-content.bg-dark {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] .bg-black {
    background-color: var(--bg-card-hover) !important;
}

[data-bs-theme="light"] .text-light {
    color: var(--text-primary) !important;
}

[data-bs-theme="light"] pre.bg-black {
    background-color: #1c1c1e !important;
    color: #2ea043 !important;
}

[data-bs-theme="light"] footer {
    border-top-color: var(--border-color) !important;
}

[data-bs-theme="light"] .progress-bar-custom {
    background: #e0d0d0;
}

[data-bs-theme="light"] .stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

[data-bs-theme="light"] .stat-card:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%) !important;
}

[data-bs-theme="light"] .athlete-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f6f3 100%) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
[data-bs-theme="light"] .athlete-card--red {
    background: linear-gradient(145deg, #ffffff 0%, #fef8f7 100%) !important;
    border-color: rgba(248, 81, 73, 0.25) !important;
}
[data-bs-theme="light"] .athlete-card--yellow {
    background: linear-gradient(145deg, #ffffff 0%, #fefbf5 100%) !important;
    border-color: rgba(210, 153, 34, 0.25) !important;
}
[data-bs-theme="light"] .athlete-card--green {
    background: linear-gradient(145deg, #ffffff 0%, #f6fcfa 100%) !important;
    border-color: rgba(26, 188, 156, 0.25) !important;
}
[data-bs-theme="light"] .athlete-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
}
[data-bs-theme="light"] .athlete-metric {
    background: rgba(0,0,0,0.02);
}
[data-bs-theme="light"] .cat-dot {
    background: rgba(0,0,0,0.03);
}

[data-bs-theme="light"] .admin-metric-card,
[data-bs-theme="light"] .analysis-card,
[data-bs-theme="light"] .supplement-card,
[data-bs-theme="light"] .profile-header {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

[data-bs-theme="light"] .category-card {
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

[data-bs-theme="light"] .category-card:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%) !important;
}

[data-bs-theme="light"] .mapping-grid {
    background: rgba(0, 0, 0, 0.03) !important;
}

[data-bs-theme="light"] .bg-opacity-25 {
    opacity: 1 !important;
}

[data-bs-theme="light"] .bg-opacity-10 {
    opacity: 1 !important;
}

[data-bs-theme="light"] .coach-note-high {
    border-left-color: rgba(220, 53, 69, 0.5);
    background: linear-gradient(145deg, #ffffff 0%, #fef8f7 100%);
}
[data-bs-theme="light"] .coach-note-card {
    border-left-color: rgba(108, 117, 125, 0.25);
}
[data-bs-theme="light"] .athlete-card-btn--notes {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
}
[data-bs-theme="light"] .athlete-card-btn--notes:hover {
    background: rgba(210, 153, 34, 0.1);
    border-color: rgba(210, 153, 34, 0.4);
}

/* ==================== ONBOARDING WIZARD ==================== */
.onboarding-wizard {
    padding: 2rem 0;
}

.onboarding-progress {
    padding: 0 2rem;
}

.onboarding-step {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    background: var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.onboarding-step.active {
    background: var(--accent-primary);
    color: #fff;
    transform: scale(1.1);
}

.onboarding-step.done {
    background: var(--accent-success);
    color: #fff;
}

.onboarding-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 0.5rem;
}

.onboarding-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.onboarding-panel.active {
    display: block;
}
.onboarding-action-card {
    transition: border-color 0.2s, transform 0.15s;
    cursor: pointer;
}
.onboarding-action-card:hover {
    border-color: var(--accent-primary) !important;
    transform: translateY(-2px);
}

/* ==================== DRAG & DROP IMPORT ==================== */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light);
}

.drop-zone.dragover {
    transform: scale(1.01);
    box-shadow: 0 0 20px var(--accent-primary-light);
}

.drop-zone .drop-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.drop-zone.dragover .drop-icon {
    color: var(--accent-primary);
    transform: scale(1.15);
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drop-zone .file-name {
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    display: none;
}

.drop-zone.has-file .file-name { display: block; }
.drop-zone.has-file .drop-hint { display: none; }

/* ==================== CHART TIME FILTER ==================== */
.chart-time-filter {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.chart-time-filter .btn {
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.chart-time-filter .btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.chart-time-filter .btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

/* ==================== SKELETON SCREENS ==================== */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-card) 25%,
        var(--bg-card-hover) 50%,
        var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-25 { width: 25%; }

.skeleton-card {
    height: 120px;
    border-radius: 12px;
}

.skeleton-chart {
    height: 280px;
    border-radius: 12px;
}

/* ==================== MOBILE SWIPE NAV ==================== */
.category-nav-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.category-nav-btn {
    scroll-snap-align: start;
}


/* ==================== EMPTY STATES ==================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

.empty-state h4 {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto 1.25rem;
}

.empty-state .btn {
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==================== ENHANCED ANIMATIONS ==================== */
.card {
    animation: fadeIn 0.3s ease;
    transition: background-color 0.3s ease, border-color 0.2s ease, transform 0.2s ease;
}

.stat-card, .analysis-card, .supplement-card, .category-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.nav-link {
    transition: all 0.2s ease;
}

/* Staggered card entrance */
.row > [class*="col"]:nth-child(1) .card { animation-delay: 0s; }
.row > [class*="col"]:nth-child(2) .card { animation-delay: 0.05s; }
.row > [class*="col"]:nth-child(3) .card { animation-delay: 0.1s; }
.row > [class*="col"]:nth-child(4) .card { animation-delay: 0.15s; }

/* ==================== LOGIN ENHANCED ==================== */
.login-wrapper::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--body-glow-rgb), 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: glowDrift 25s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: fixed;
    bottom: -15%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--body-glow-rgb), 0.05) 0%, transparent 70%);
    pointer-events: none;
    animation: glowDrift 30s ease-in-out infinite reverse;
}

.login-card {
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

/* ==================== FORM ENHANCEMENTS ==================== */
.form-control, .form-select {
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:hover, .form-select:hover {
    border-color: color-mix(in srgb, var(--border-color) 70%, var(--accent-primary));
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

/* ==================== MOBILE BURGER MENU ==================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-top: 0.75rem;
        padding: 1rem;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    }

    .navbar-collapse .nav-link {
        padding: 0.65rem 0.75rem !important;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    .navbar-collapse .nav-link:hover {
        background: var(--bg-card-hover);
    }

    .navbar-collapse .dropdown-menu {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 1rem;
    }

    .navbar-collapse .dropdown-item {
        border-radius: 6px;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .navbar-collapse .dropdown-item:hover {
        background: var(--bg-card-hover) !important;
    }

    .navbar-collapse .dropdown-divider {
        border-color: var(--border-color);
        margin: 0.35rem 0;
    }

    .navbar-collapse .nav-item {
        margin-bottom: 0.15rem;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .stat-number { font-size: 1.25rem; }
    .stat-card { padding: 0.75rem; gap: 0.75rem; min-height: 0; }
    .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
    .stat-info { min-width: 0; overflow: hidden; }
    .stat-info .fw-semibold { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stat-label { font-size: 0.65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .admin-metric-card { padding: 0.75rem; }
    .admin-metric-card .metric-value { font-size: 1.4rem; }
    .admin-metric-card .metric-label { font-size: 0.7rem; }

    .category-card { padding: 1rem; }
    .category-card-icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .category-card-title { font-size: 0.9rem; }

    .chart-container { height: 280px; }
    .chart-time-filter { margin-bottom: 0; }

    /* Mobile: Meta-Items untereinander */
    .chart-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .mapping-grid { grid-template-columns: 1fr; }
    .login-card { padding: 1.5rem; margin: 0.5rem; }
    .athlete-switcher { flex-direction: column; align-items: stretch; }
    .athlete-switcher .form-select { max-width: 100%; }

    /* Mobile Tabellen */
    .table-responsive { margin: 0 -0.75rem; }
    .table th, .table td { padding: 0.5rem 0.4rem; font-size: 0.8rem; white-space: nowrap; }

    /* Mobile Cards */
    .card-header h5 { font-size: 0.95rem; }
    .card-body { padding: 0.75rem; }

    /* Mobile Nav */
    .personal-nav .nav-link, .admin-nav .nav-link { font-size: 0.78rem; padding: 0.35rem 0.65rem; }

    /* Mobile Dashboard */
    .supplement-badge { font-size: 0.75rem; padding: 0.4rem 0.75rem; }

    /* Mobile Footer */
    footer { padding: 0.75rem 0 !important; margin-top: 2rem !important; }

    /* Mobile Buttons */
    .btn-lg { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

    /* Mobile Profile Header */
    .profile-header { flex-direction: column; text-align: center; gap: 1rem; padding: 1rem; }
    .profile-avatar { width: 60px; height: 60px; font-size: 1.5rem; }

    /* Mobile Chart Filter */
    .chart-time-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .chart-time-filter::-webkit-scrollbar { display: none; }

    /* Onboarding Mobile */
    .onboarding-wizard { padding: 1rem 0; }
    .onboarding-progress { padding: 0; }
    .onboarding-step { width: 30px; height: 30px; font-size: 0.75rem; }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== MISC ==================== */
.badge { font-weight: 500; }
pre { margin: 0; }
code { font-size: 0.8rem; }

/* ==================== MERGE PAGE ==================== */
.preview-box { min-height: 150px; max-height: 400px; overflow-y: auto; }
.preview-box .table { font-size: 0.85rem; }
#conflictPreview .border-bottom:last-child { border-bottom: none !important; }


/* ==================== MOBILE BOTTOM-TAB-NAV (max-width: 767.98px)
   Modern 2026: Floating + Glassmorphism + Animated Pill-Indikator
   ==================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    /* Bottom-nav: schwebend, nicht edge-to-edge.
       Default-Stack = sicherer Frosted-Glas-Look (Chromium + iOS Safari + Firefox).
       Echter Liquid-Glass-Look mit SVG-Refraktion wird zusätzlich angewendet
       wenn der Browser via JS-Detection als Chromium erkannt wurde
       (.supports-liquid-glass Klasse auf <html>). */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: max(12px, env(safe-area-inset-bottom, 12px));
        left: 12px;
        right: 12px;
        z-index: 1030;
        height: 60px;
        padding: 6px;
        border-radius: 28px;
        background: rgba(11, 11, 15, 0.72);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.10);
        box-shadow:
            0 12px 36px rgba(0, 0, 0, 0.55),
            0 4px 12px rgba(0, 0, 0, 0.30),
            inset 0 1.5px 0 rgba(255, 255, 255, 0.18),
            inset 0 -1px 0 rgba(0, 0, 0, 0.20);
        overflow: visible;
    }

    /* iOS / Firefox: realistischere Glas-Border via Hairline + stärkere Bevel-Inset-Shadows.
       Greift überall WO Liquid-Glass NICHT aktiv ist (also iOS Safari + Firefox), da
       deren frosted-glass ohne Refraktion sonst sehr "flach" wirkt. */
    html:not(.supports-liquid-glass) .mobile-bottom-nav {
        border: 0.5px solid rgba(255, 255, 255, 0.14);
        box-shadow:
            0 14px 40px rgba(0, 0, 0, 0.55),
            0 4px 12px rgba(0, 0, 0, 0.30),
            inset 0 1px 0 rgba(255, 255, 255, 0.32),
            inset 0 -1px 0 rgba(0, 0, 0, 0.35),
            inset 0 8px 14px -8px rgba(255, 255, 255, 0.10);
    }

    html:not(.supports-liquid-glass)[data-bs-theme="light"] .mobile-bottom-nav {
        border: 1px solid rgba(0, 0, 0, 0.18);
        box-shadow:
            /* Drop-Shadows für Elevation */
            0 14px 40px rgba(15, 23, 42, 0.18),
            0 4px 12px rgba(15, 23, 42, 0.08),
            /* Top-Highlight (Licht trifft den oberen Rand der Glas-Pille) */
            inset 0 1.5px 0 rgba(255, 255, 255, 0.85),
            /* Bottom-Shadow-Line (Unterseite ohne Licht) */
            inset 0 -1px 0 rgba(0, 0, 0, 0.30),
            /* Top-Inner-Glow (gewölbte Glasoberfläche) */
            inset 0 12px 20px -12px rgba(255, 255, 255, 0.55),
            /* Bottom-Inner-Shadow (verstärkt 3D-Bevel) */
            inset 0 -10px 18px -12px rgba(0, 0, 0, 0.22);
    }

    /* Liquid-Glass Enhancement — nur Chromium + Desktop-Safari (via JS-UA-Detection
       in app.js, .supports-liquid-glass-Klasse auf <html>). iOS WebKit + Firefox
       können `backdrop-filter: url(...)` nicht rendern und bekommen den
       frosted-glass-Default oben. Filter-SVG ist komplett als data-URL eingebettet
       (kein Fragment-Ref, weil Chromium den Chain bei url(#x) silently dropt). */

    html.supports-liquid-glass .mobile-bottom-nav {
        background: rgba(11, 11, 15, 0.20);
        -webkit-backdrop-filter: blur(4px) url('data:image/svg+xml;utf8,%3Csvg%20height%3D%2260%22%20width%3D%22380%22%20viewBox%3D%220%200%20380%2060%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22displace%22%20x%3D%22-20%25%22%20y%3D%22-20%25%22%20width%3D%22140%25%22%20height%3D%22140%25%22%20color-interpolation-filters%3D%22sRGB%22%3E%3CfeImage%20x%3D%220%22%20y%3D%220%22%20width%3D%22380%22%20height%3D%2260%22%20href%3D%22data%3Aimage%2Fsvg%2Bxml%3Butf8%2C%253Csvg%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520viewBox%253D%25220%25200%2520380%252060%2522%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%253E%253Cstyle%253E.mix%257Bmix-blend-mode%253Ascreen%257D%253C%252Fstyle%253E%253Cdefs%253E%253ClinearGradient%2520id%253D%2522Y%2522%2520x1%253D%25220%2522%2520x2%253D%25220%2522%2520y1%253D%25227%2525%2522%2520y2%253D%252293%2525%2522%253E%253Cstop%2520offset%253D%25220%2525%2522%2520stop-color%253D%2522%25230F0%2522%252F%253E%253Cstop%2520offset%253D%2522100%2525%2522%2520stop-color%253D%2522%2523000%2522%252F%253E%253C%252FlinearGradient%253E%253ClinearGradient%2520id%253D%2522X%2522%2520x1%253D%25221%2525%2522%2520x2%253D%252299%2525%2522%2520y1%253D%25220%2522%2520y2%253D%25220%2522%253E%253Cstop%2520offset%253D%25220%2525%2522%2520stop-color%253D%2522%2523F00%2522%252F%253E%253Cstop%2520offset%253D%2522100%2525%2522%2520stop-color%253D%2522%2523000%2522%252F%253E%253C%252FlinearGradient%253E%253C%252Fdefs%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522%2523808080%2522%252F%253E%253Cg%2520filter%253D%2522blur%25282px%2529%2522%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522%2523000080%2522%252F%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522url%2528%2523Y%2529%2522%2520class%253D%2522mix%2522%252F%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522url%2528%2523X%2529%2522%2520class%253D%2522mix%2522%252F%253E%253Crect%2520x%253D%25228%2522%2520y%253D%25228%2522%2520height%253D%252244%2522%2520width%253D%2522364%2522%2520fill%253D%2522%2523808080%2522%2520rx%253D%252228%2522%2520ry%253D%252228%2522%2520filter%253D%2522blur%25288px%2529%2522%252F%253E%253C%252Fg%253E%253C%252Fsvg%253E%22%20result%3D%22displacementMap%22%2F%3E%3CfeDisplacementMap%20in%3D%22SourceGraphic%22%20in2%3D%22displacementMap%22%20scale%3D%2225%22%20xChannelSelector%3D%22R%22%20yChannelSelector%3D%22G%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3C%2Fsvg%3E#displace') blur(8px) brightness(1.08) saturate(1.5);
        backdrop-filter: blur(4px) url('data:image/svg+xml;utf8,%3Csvg%20height%3D%2260%22%20width%3D%22380%22%20viewBox%3D%220%200%20380%2060%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22displace%22%20x%3D%22-20%25%22%20y%3D%22-20%25%22%20width%3D%22140%25%22%20height%3D%22140%25%22%20color-interpolation-filters%3D%22sRGB%22%3E%3CfeImage%20x%3D%220%22%20y%3D%220%22%20width%3D%22380%22%20height%3D%2260%22%20href%3D%22data%3Aimage%2Fsvg%2Bxml%3Butf8%2C%253Csvg%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520viewBox%253D%25220%25200%2520380%252060%2522%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%253E%253Cstyle%253E.mix%257Bmix-blend-mode%253Ascreen%257D%253C%252Fstyle%253E%253Cdefs%253E%253ClinearGradient%2520id%253D%2522Y%2522%2520x1%253D%25220%2522%2520x2%253D%25220%2522%2520y1%253D%25227%2525%2522%2520y2%253D%252293%2525%2522%253E%253Cstop%2520offset%253D%25220%2525%2522%2520stop-color%253D%2522%25230F0%2522%252F%253E%253Cstop%2520offset%253D%2522100%2525%2522%2520stop-color%253D%2522%2523000%2522%252F%253E%253C%252FlinearGradient%253E%253ClinearGradient%2520id%253D%2522X%2522%2520x1%253D%25221%2525%2522%2520x2%253D%252299%2525%2522%2520y1%253D%25220%2522%2520y2%253D%25220%2522%253E%253Cstop%2520offset%253D%25220%2525%2522%2520stop-color%253D%2522%2523F00%2522%252F%253E%253Cstop%2520offset%253D%2522100%2525%2522%2520stop-color%253D%2522%2523000%2522%252F%253E%253C%252FlinearGradient%253E%253C%252Fdefs%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522%2523808080%2522%252F%253E%253Cg%2520filter%253D%2522blur%25282px%2529%2522%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522%2523000080%2522%252F%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522url%2528%2523Y%2529%2522%2520class%253D%2522mix%2522%252F%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522url%2528%2523X%2529%2522%2520class%253D%2522mix%2522%252F%253E%253Crect%2520x%253D%25228%2522%2520y%253D%25228%2522%2520height%253D%252244%2522%2520width%253D%2522364%2522%2520fill%253D%2522%2523808080%2522%2520rx%253D%252228%2522%2520ry%253D%252228%2522%2520filter%253D%2522blur%25288px%2529%2522%252F%253E%253C%252Fg%253E%253C%252Fsvg%253E%22%20result%3D%22displacementMap%22%2F%3E%3CfeDisplacementMap%20in%3D%22SourceGraphic%22%20in2%3D%22displacementMap%22%20scale%3D%2225%22%20xChannelSelector%3D%22R%22%20yChannelSelector%3D%22G%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3C%2Fsvg%3E#displace') blur(8px) brightness(1.08) saturate(1.5);
    }


    /* Light-Mode Default-Stack (Fallback für Safari/Firefox + Default für alle) */
    [data-bs-theme="light"] .mobile-bottom-nav {
        background: rgba(248, 250, 252, 0.72);
        -webkit-backdrop-filter: blur(28px) saturate(180%);
        backdrop-filter: blur(28px) saturate(180%);
        border: 1px solid rgba(0, 0, 0, 0.10);
        box-shadow:
            0 12px 36px rgba(15, 23, 42, 0.20),
            0 4px 12px rgba(15, 23, 42, 0.10),
            inset 0 1.5px 0 rgba(255, 255, 255, 0.85),
            inset 0 -1px 0 rgba(0, 0, 0, 0.06);
    }

    /* Light-Mode + Chromium = echtes Liquid-Glass mit Refraktion */
    html.supports-liquid-glass[data-bs-theme="light"] .mobile-bottom-nav {
        background: rgba(255, 255, 255, 0.20);
        -webkit-backdrop-filter: blur(4px) url('data:image/svg+xml;utf8,%3Csvg%20height%3D%2260%22%20width%3D%22380%22%20viewBox%3D%220%200%20380%2060%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22displace%22%20x%3D%22-20%25%22%20y%3D%22-20%25%22%20width%3D%22140%25%22%20height%3D%22140%25%22%20color-interpolation-filters%3D%22sRGB%22%3E%3CfeImage%20x%3D%220%22%20y%3D%220%22%20width%3D%22380%22%20height%3D%2260%22%20href%3D%22data%3Aimage%2Fsvg%2Bxml%3Butf8%2C%253Csvg%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520viewBox%253D%25220%25200%2520380%252060%2522%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%253E%253Cstyle%253E.mix%257Bmix-blend-mode%253Ascreen%257D%253C%252Fstyle%253E%253Cdefs%253E%253ClinearGradient%2520id%253D%2522Y%2522%2520x1%253D%25220%2522%2520x2%253D%25220%2522%2520y1%253D%25227%2525%2522%2520y2%253D%252293%2525%2522%253E%253Cstop%2520offset%253D%25220%2525%2522%2520stop-color%253D%2522%25230F0%2522%252F%253E%253Cstop%2520offset%253D%2522100%2525%2522%2520stop-color%253D%2522%2523000%2522%252F%253E%253C%252FlinearGradient%253E%253ClinearGradient%2520id%253D%2522X%2522%2520x1%253D%25221%2525%2522%2520x2%253D%252299%2525%2522%2520y1%253D%25220%2522%2520y2%253D%25220%2522%253E%253Cstop%2520offset%253D%25220%2525%2522%2520stop-color%253D%2522%2523F00%2522%252F%253E%253Cstop%2520offset%253D%2522100%2525%2522%2520stop-color%253D%2522%2523000%2522%252F%253E%253C%252FlinearGradient%253E%253C%252Fdefs%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522%2523808080%2522%252F%253E%253Cg%2520filter%253D%2522blur%25282px%2529%2522%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522%2523000080%2522%252F%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522url%2528%2523Y%2529%2522%2520class%253D%2522mix%2522%252F%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522url%2528%2523X%2529%2522%2520class%253D%2522mix%2522%252F%253E%253Crect%2520x%253D%25228%2522%2520y%253D%25228%2522%2520height%253D%252244%2522%2520width%253D%2522364%2522%2520fill%253D%2522%2523808080%2522%2520rx%253D%252228%2522%2520ry%253D%252228%2522%2520filter%253D%2522blur%25288px%2529%2522%252F%253E%253C%252Fg%253E%253C%252Fsvg%253E%22%20result%3D%22displacementMap%22%2F%3E%3CfeDisplacementMap%20in%3D%22SourceGraphic%22%20in2%3D%22displacementMap%22%20scale%3D%2225%22%20xChannelSelector%3D%22R%22%20yChannelSelector%3D%22G%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3C%2Fsvg%3E#displace') blur(8px) brightness(1.08) saturate(1.5);
        backdrop-filter: blur(4px) url('data:image/svg+xml;utf8,%3Csvg%20height%3D%2260%22%20width%3D%22380%22%20viewBox%3D%220%200%20380%2060%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22displace%22%20x%3D%22-20%25%22%20y%3D%22-20%25%22%20width%3D%22140%25%22%20height%3D%22140%25%22%20color-interpolation-filters%3D%22sRGB%22%3E%3CfeImage%20x%3D%220%22%20y%3D%220%22%20width%3D%22380%22%20height%3D%2260%22%20href%3D%22data%3Aimage%2Fsvg%2Bxml%3Butf8%2C%253Csvg%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520viewBox%253D%25220%25200%2520380%252060%2522%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%253E%253Cstyle%253E.mix%257Bmix-blend-mode%253Ascreen%257D%253C%252Fstyle%253E%253Cdefs%253E%253ClinearGradient%2520id%253D%2522Y%2522%2520x1%253D%25220%2522%2520x2%253D%25220%2522%2520y1%253D%25227%2525%2522%2520y2%253D%252293%2525%2522%253E%253Cstop%2520offset%253D%25220%2525%2522%2520stop-color%253D%2522%25230F0%2522%252F%253E%253Cstop%2520offset%253D%2522100%2525%2522%2520stop-color%253D%2522%2523000%2522%252F%253E%253C%252FlinearGradient%253E%253ClinearGradient%2520id%253D%2522X%2522%2520x1%253D%25221%2525%2522%2520x2%253D%252299%2525%2522%2520y1%253D%25220%2522%2520y2%253D%25220%2522%253E%253Cstop%2520offset%253D%25220%2525%2522%2520stop-color%253D%2522%2523F00%2522%252F%253E%253Cstop%2520offset%253D%2522100%2525%2522%2520stop-color%253D%2522%2523000%2522%252F%253E%253C%252FlinearGradient%253E%253C%252Fdefs%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522%2523808080%2522%252F%253E%253Cg%2520filter%253D%2522blur%25282px%2529%2522%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522%2523000080%2522%252F%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522url%2528%2523Y%2529%2522%2520class%253D%2522mix%2522%252F%253E%253Crect%2520x%253D%25220%2522%2520y%253D%25220%2522%2520height%253D%252260%2522%2520width%253D%2522380%2522%2520fill%253D%2522url%2528%2523X%2529%2522%2520class%253D%2522mix%2522%252F%253E%253Crect%2520x%253D%25228%2522%2520y%253D%25228%2522%2520height%253D%252244%2522%2520width%253D%2522364%2522%2520fill%253D%2522%2523808080%2522%2520rx%253D%252228%2522%2520ry%253D%252228%2522%2520filter%253D%2522blur%25288px%2529%2522%252F%253E%253C%252Fg%253E%253C%252Fsvg%253E%22%20result%3D%22displacementMap%22%2F%3E%3CfeDisplacementMap%20in%3D%22SourceGraphic%22%20in2%3D%22displacementMap%22%20scale%3D%2225%22%20xChannelSelector%3D%22R%22%20yChannelSelector%3D%22G%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3C%2Fsvg%3E#displace') blur(8px) brightness(1.08) saturate(1.5);
    }

    /* Pill-Indikator etwas kräftiger im Light-Mode, hebt sich auf hellem Glas
       klar ab. */
    [data-bs-theme="light"] .mobile-bottom-nav-pill {
        background: rgba(165, 34, 34, 0.18);
        border: 1px solid rgba(165, 34, 34, 0.35);
    }

    /* Body-Padding für floating bar (60 height + 12 bottom + 12 gap + safe-area) */
    body {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0));
    }

    /* Bestehende personal-nav + admin-sidebar auf Mobile ausblenden */
    .personal-nav-wrap-mobile-hide,
    .admin-nav-wrap-mobile-hide {
        display: none !important;
    }
}

.mobile-bottom-nav-item {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    color: var(--text-secondary, #9aa6b8);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: color 0.25s ease, transform 0.15s ease;
    padding: 0.4rem 0.15rem;
    text-align: center;
    line-height: 1.05;
    overflow: hidden;
    border-radius: 22px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-bottom-nav-item i {
    font-size: 1.215rem;
    line-height: 1;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-bottom-nav-item:active {
    transform: scale(0.96);
}

.mobile-bottom-nav-item.active {
    color: var(--accent-primary, #A52222);
}

.mobile-bottom-nav-item.active i {
    transform: scale(1.08);
}

.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item:focus {
    color: var(--text-primary, #e8ecf1);
    text-decoration: none;
}

/* Animierter Pill-Indikator (Material You-Style) — gleitet zum aktiven Tab.
   left:0 weil JS via translateX positioniert (itemRect.left - navRect.left
   enthält bereits das Padding der Bar). */
.mobile-bottom-nav-pill {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 0;
    border-radius: 22px;
    background: rgba(165, 34, 34, 0.18);
    border: 1px solid rgba(165, 34, 34, 0.25);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transform: translateX(0);
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.25s ease;
}

.mobile-bottom-nav-pill.is-ready {
    opacity: 1;
}

/* Bottom-Sheet (Mehr-Drawer) — Bootstrap-Offcanvas Customizing */
.offcanvas.mobile-more-drawer {
    height: auto;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
    background: var(--bg-card, #1a1a22);
    border-top: 1px solid var(--border-color, #2a2a35);
}

.offcanvas.mobile-more-drawer .offcanvas-header {
    border-bottom: 1px solid var(--border-color, #2a2a35);
    padding: 1rem 1.25rem;
}

.offcanvas.mobile-more-drawer .offcanvas-body {
    padding: 0.75rem;
}

.mobile-drawer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.mobile-drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem 0.5rem;
    background: var(--bg-card-hover, #13131a);
    border: 1px solid var(--border-color, #2a2a35);
    border-radius: 10px;
    color: var(--text-primary, #e8ecf1);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.15;
    min-height: 76px;
}

.mobile-drawer-item i {
    font-size: 1.3rem;
    color: var(--accent-primary, #A52222);
}

.mobile-drawer-item.active {
    background: rgba(165, 34, 34, 0.15);
    border-color: var(--accent-primary, #A52222);
    color: var(--accent-primary, #A52222);
}

.mobile-drawer-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mobile-drawer-item.disabled .pro-badge {
    background: var(--accent-primary, #A52222);
    color: white;
    font-size: 0.55rem;
    padding: 0.1rem 0.35rem;
    border-radius: 8px;
    position: absolute;
    top: 6px;
    right: 6px;
}

.mobile-drawer-item {
    position: relative;
}
