﻿/* Manrope – lokal gehostet (kein Google CDN) */
@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-variable.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* Grundlegende Schriftart */
html,
body {
    font-family: 'Manrope', "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    letter-spacing: -0.25px;
    color: var(--color-text-dark);
    background: #eeeeee;
    overflow-x: hidden;
    width: 100%;
}

h1 { font-weight: 800; letter-spacing: -1px; }
h2 { font-weight: 600; letter-spacing: -0.75px; }
h2 { font-weight: 520; letter-spacing: -0.65px; }
h2 { font-weight: 480; letter-spacing: -0.55px; }
h5 { font-weight: 400; letter-spacing: -0.45px; }


/* =====================================================
   CSS-Variablen
   ===================================================== */

:root {
    --color-text-light: #eeeeee;
    --color-text-dark: #222831;
    --color-primary: #4a90e2;
    --color-bg-dark: #222831;
    --color-bg-darker: #15191f;
    --color-range-accent: #444444;
    --color-btn-tp-bg: #000000;
    --color-btn-tp-bg-hover: #873922;
    --color-light-border: #e0e0e0;
    --color-sidebar: #222831;
    --color-sidebar-hover: #393E46;
    --color-sidebar-text: #E5E5E5;
    /* Main Design */
    --color-bg-main: #FFFCF9;
    --color-bg-grad1: #FFFCF9;
    --color-bg-grad2: #B8AEA6;
    --color-bg-grad3: #807671;
    /* Accent */
    --color-bg-accent1: #222831;
    --color-bg-accent1-grad: #272E3B;
    --color-bg-accent1-hover: #393E46;
    --color-bg-accent2: #000000;
    --topbar-height: 54px;
    --sidebar-width: 240px;
    --sidebar-width-collapsed: 72px;
    --sidebar-current-width: var(--sidebar-width);
}

        html.is-loading body > :not(#app-loader) {
            visibility: hidden;
        }

        html.is-loading body {
            overflow: hidden;
        }

        #app-loader {
            position: fixed;
            inset: 0;
            z-index: 9999;
            background: rgba(255, 255, 255, 0.98);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 12px;
        }

        /* Flash Messages Container */
        .flash-messages-container {
            position: fixed;
            top: 20px;
            left: 20px;
            z-index: 1050;
            max-width: 100%;
            width: calc(100% - 40px);
        }

        /* Flash Message Styling */
        .flash-message {
            margin-bottom: 12px;
            padding: 16px 56px 16px 20px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: center;
            gap: 12px;
            position: relative;
            animation: slideIn 0.3s ease-out;
            border: none;
            font-size: 0.95rem;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

            .flash-message.hiding {
                animation: slideOut 0.3s ease-out forwards;
            }

            /* Icons für verschiedene Kategorien */
            .flash-message::before {
                content: '';
                font-family: 'bootstrap-icons';
                font-size: 1.25rem;
                flex-shrink: 0;
            }

            .flash-message.alert-success {
                background: linear-gradient(135deg, #10b981 0%, #059669 100%);
                color: white;
            }

                .flash-message.alert-success::before {
                    content: '\f26b'; /* bi-check-circle-fill */
                }

            .flash-message.alert-danger {
                background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
                color: white;
            }

                .flash-message.alert-danger::before {
                    content: '\f623'; /* bi-x-circle-fill */
                }

            .flash-message.alert-warning {
                background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
                color: white;
            }

                .flash-message.alert-warning::before {
                    content: '\f33a'; /* bi-exclamation-triangle-fill */
                }

            .flash-message.alert-info {
                background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
                color: white;
            }

                .flash-message.alert-info::before {
                    content: '\f431'; /* bi-info-circle-fill */
                }

            /* Message Text */
            .flash-message span {
                flex: 1;
                line-height: 1.4;
            }

        /* Close Button */
        .flash-close {
            position: absolute;
            top: 50%;
            right: 12px;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

            .flash-close:hover {
                background: rgba(255, 255, 255, 0.3);
            }

        /* Progress Bar */
        .flash-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 3px;
            background: rgba(255, 255, 255, 0.4);
            width: 100%;
            border-radius: 0 0 8px 8px;
            transform-origin: left;
            animation: progressBar 5s linear forwards;
        }

        @keyframes slideIn {
            from {
                transform: translateX(420px);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOut {
            from {
                transform: translateX(0);
                opacity: 1;
            }

            to {
                transform: translateX(420px);
                opacity: 0;
            }
        }

        @keyframes progressBar {
            from {
                transform: scaleX(1);
            }

            to {
                transform: scaleX(0);
            }
        }

        @media (max-width: 576px) {
            .flash-messages-container {
                top: 70px;
                right: 10px;
                width: calc(100% - 20px);
                max-width: none;
            }

            .flash-message {
                padding: 14px 52px 14px 16px;
                font-size: 0.9rem;
            }
        }


/* =====================================================
   Buttons & Badges
   ===================================================== */

.btn-accent3 {
    background: var(--color-bg-main);
}

.btn-dashboard, .btn-dashboard-small {
    width: 90%;
    text-align: left;
    padding: 0.75rem 1.0rem;
    font-size: 16px;
    font-weight: 400;
    border-radius: 4px;
    color: var(--color-text-light);
    background: var(--color-sidebar);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.18s ease, color 0.2s ease;
}

.btn-dashboard-small {
    width: auto;
    height: 40px;
    padding: 7px 16px 0 16px;
}

.btn-dashboard:hover, .btn-dashboard-small:hover {
    background: var(--color-sidebar-hover);
    color: var(--color-text-light);
    filter: brightness(1.08);
}

/* Info Badge */
.info-badge {
    font-size: 1rem;
    padding: 0.8rem 0.8rem;
    background-color: #222831;
}


/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-main);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1020;
    height: var(--topbar-height);
    overflow: hidden;
    box-shadow: 0px 0 12px rgba(0, 0, 0, 0.2);
}

.titel {
    margin-top: 10px;
    letter-spacing: -1px;
    font-size: 26px;
}

.btn-menu-topbar {
    visibility: hidden;
}

.logo-topbar {
    visibility: hidden;
}

/* Hauptinhalt */
.row {
    margin-right: 0;
    margin-left: 0;
}

.row.mb-0 {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

main.content {
    margin-top: 60px;
    margin-right: 20px;
    padding: 0 !important;
    max-width: 100%;
    overflow-x: hidden;
}

.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Flash Nachricht */
.flash-message {
    position: fixed;
    top: var(--topbar-height);
    left: var(--sidebar-current-width);
    right: 0;
    z-index: 1065; /* über Sidebar (1040) */
    margin: 0;
    border-radius: 0;
    box-sizing: border-box;
    max-width: calc(100% - var(--sidebar-current-width));
    padding: 0.75rem 1rem;
}


/* =====================================================
   Tabellen & Formulare
   ===================================================== */

/* Tabellenspaltenbreiten Desktop */
.col-70px  { width: 70px; }
.col-120px { width: 120px; }
.col-200px { width: 200px; }
.col-date  { width: 150px; }
.col-check { width: 120px; }
.col-day_small { width: 120px; }

/* Tabelle */
table {
    table-layout: fixed;
    width: 100%;
    background-color: transparent !important; /* überschreibt Bootstrap */
    border-collapse: collapse;
}

.table thead th,
.table tbody td {
    background-color: transparent;
}

/* Formulare */
.form-control:read-only {
    background-color: #f8f9fa;
    cursor: default;
}

.form-control:read-only:focus {
    background-color: #f8f9fa;
    border-color: #ced4da;
    box-shadow: none;
}

/* Custom Radio Buttons */
.custom-radio {
    display: inline-block;
    position: relative;
    padding-left: 30px;
    margin-right: 20px;
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    vertical-align: middle;
}

.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.custom-radio:hover input ~ .checkmark {
    background-color: #ccc;
}

.custom-radio input:checked ~ .checkmark {
    background-color: var(--color-primary);
}

.custom-radio .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.custom-radio input:checked ~ .checkmark:after {
    display: block;
}

/* Checkbox Fehlerzustand */
.checkbox-error {
    outline: 2px solid red !important;
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    transition: outline 0.2s ease, box-shadow 0.2s ease;
}


/* =====================================================
   Karten & Slider
   ===================================================== */

.card,
.card_static {
    border-radius: 5px !important;
    border: none;
    background: white;
    animation: fade 0.3s ease-in-out;
    box-shadow: 0px 6px 15px rgba(0,0,0,0.1);
}

.cardbody {
    border-radius: 2px !important;
}

/* Document Navigator Cards */
.document-nav-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.document-nav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0px 12px 30px rgba(0,0,0,0.15) !important;
}

.document-nav-icon-header {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-accent1), var(--color-bg-accent1-grad));
    color: var(--color-text-light);
}

.document-nav-icon-header i {
    font-size: 6rem;
    transition: transform 0.3s ease;
}

.document-nav-card:hover .document-nav-icon-header i {
    transform: scale(1.1);
}

.document-nav-card .card-body {
    padding: 1.5rem;
    min-height: 180px;
}

.document-nav-card h5 {
    color: var(--color-text-dark);
    transition: color 0.2s ease;
}

.document-nav-card:hover h5 {
    color: var(--color-bg-accent1);
}

.document-nav-card .text-muted {
    font-size: 0.95rem;
    line-height: 1.5;
}

.document-nav-card .btn-dashboard-small {
    margin-top: auto;
    transition: all 0.2s ease;
}

.document-nav-card:hover .btn-dashboard-small {
    transform: translateX(4px);
}

/* Slider Styles für Trainings-Tutorial */
.slider-container {
    position: relative;
    width: 100%;
    margin: auto;
    overflow: hidden;
    border: 1px solid #ccc;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 15px;
}

.slide {
    display: none;
    animation: fade 0.2s ease-in-out;
}

.slide.active {
    display: block;
    margin-bottom: 50px;
}

@keyframes fade {
    from { opacity: 0.4; }
    to   { opacity: 1; }
}

/* Intensitäts-Hintergründe für set-header */
.set-card .set-header.int-1 { background: #808080; color: #ffffff; }
.set-card .set-header.int-2 { background: #2A4D7F; color: #ffffff; }
.set-card .set-header.int-3 { background: #58A7A9; color: #ffffff; }
.set-card .set-header.int-4 { background: #D8A32A; color: #111111; }
.set-card .set-header.int-5 { background: #D83C3C; color: #ffffff; }

.set-card .set-header {
    transition: background .18s ease, color .18s ease;
}


/* =====================================================
   Links & Logout
   ===================================================== */

.mt-2 a,
.mt-1 a {
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mt-1 a {
    color: var(--color-text-light);
}

.mt-1 a:hover {
    color: #c4c4c4;
    text-decoration: underline;
}

/* Logout Link */
.logout-link {
    color: var(--color-bg-accent2);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
}

.logout-link:hover {
    text-decoration: underline;
}


@media (max-width: 950px) {
    #sidebarMenu .tp-logo-wide { display: inline-block !important; }
    #sidebarMenu .tp-logo-small { display: none !important; }

    main.content {
        margin-top: 60px;
        padding: 0 0rem;
        margin-right: 0px;
    }
}

/* =====================================================
   Mobile Footer Menü
   ===================================================== */

.mobile-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-footer-inner {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 60px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.12);
}

.mobile-footer-item {
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #212529;
    font-size: 11px;
}

.mobile-footer-item i {
    font-size: 20px;
}

.mobile-footer-fab {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--color-bg-accent1),
        var(--color-bg-accent1-grad)
    );
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.20);
    z-index: 1031;
}

.mobile-footer-fab i {
    font-size: 28px;
}

.mobile-footer-docs-slot {
    grid-column: 3; /* Mitte der 5 Spalten */
}

/* Hover/Active Effekte */
.mobile-footer-item,
.mobile-footer-fab {
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        color 0.2s ease,
        filter 0.18s ease;
}

.mobile-footer-item:hover {
    transform: translateY(-2px);
    color: var(--color-bg-accent1);
}

.mobile-footer-item:hover i {
    transform: scale(1.08);
    transition: transform 0.18s ease;
}

.mobile-footer-item:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.mobile-footer-fab:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 10px 22px rgba(0,0,0,0.25);
    background: linear-gradient(
        135deg,
        var(--color-bg-accent1-grad),
        var(--color-bg-accent1-hover)
    );
}

.mobile-footer-fab:active {
    transform: translateX(-50%) scale(0.98);
    filter: brightness(0.95);
}

/* Herzschlag Animation */
@keyframes mobileHeartBeat {
    0%   { transform: scale(1); }
    10%  { transform: scale(1.12); }
    20%  { transform: scale(1.00); }
    30%  { transform: scale(1.16); }
    45%  { transform: scale(1.00); }
    100% { transform: scale(1.00); }
}

.mobile-footer-fab i.bi-heart-pulse-fill {
    display: inline-block;
    transform-origin: center;
    animation: mobileHeartBeat 1.25s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-footer-fab i.bi-heart-pulse-fill {
        animation: none;
    }
}


/* =====================================================
   Media Queries
   ===================================================== */

/* <= 1550px: Reihen umbrechen */
@media (max-width: 1550px) {
    .row.mb-0 > [class^="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* <= 950px: Mobile Sidebar, Topbar, Content, Forms */
@media (max-width: 950px) {

    .btn-menu-topbar {
        visibility: visible;
    }

    .logo-topbar {
        visibility: visible;
        margin-top: 7px;
    }

    .titel {
        margin-left: 0;
        font-size: 20px;
    }

    .topbar {
        padding: 0 0.8rem 0 0.25rem;
    }

    input.form-control,
    .form-control-sm {
        font-size: 0.85rem;
        padding: 0.2rem 0.4rem;
    }

    .content {
        padding: 0 0.4rem !important;
    }

    label.custom-radio {
        font-size: 0.85rem;
        margin-right: 0.2rem;
    }

    .input-group-text {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
    }

    input[type="range"] {
        height: 20px;
    }

    label {
        font-size: 0.9rem;
    }

    .form-select {
        font-size: 0.85rem;
    }

    table {
        table-layout: fixed;
        width: 100%;
        font-size: 0.5rem;
        border-spacing: 0;
    }

    /* Mobile Spaltenbreiten */
    .col-70px      { width: 50px !important; margin: 0; }
    .col-120px     { width: 80px;           margin: 0; }
    .col-200px     { width: 50px;           margin: 0; }
    .col-check     { width: 40px !important; margin: 0; }
    .col-date      { width: 60px;           margin: 0; }
    .col-day_small { width: 45px;           margin: 0; }

    /* Mobile: beim TrainingPeaks-Button keinen Text anzeigen */
    #sidebarMenu .btn-sidebar-tp .tp-text {
      display: none !important;
    }

    .info-badge {
        font-size: 0.7rem;
    }

    /* Mobile: flash full width */
    .flash-message {
        left: 0 !important;
        right: 0 !important;
        max-width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        top: var(--topbar-height);
    }
}

/* >= 950px: Desktop Sidebar & Topbar & Content */
@media (min-width: 950px) {

    .topbar {
        padding-left: calc(var(--sidebar-current-width));
    }

    .titel {
        margin-left: 0 !important;
    }

    main.content {
        margin-left: calc(var(--sidebar-width-collapsed) + 28px);
    }
}

/* >= 768px: Footer ausblenden */
@media (min-width: 768px) {
    .mobile-footer {
        display: none;
    }
}

/* <= 780px: Platz für Footer */
@media (max-width: 780px) {
    main.content {
        padding-bottom: 50px !important;
    }
}


/* =====================================================
   PERFORMANCE HUB - Modern Design
   ===================================================== */

/* Performance Hub Variables */
:root {
    --perf-primary: #222831;
    --perf-secondary: #393E46;
    --perf-accent: #00ADB5;
    --perf-light: #EEEEEE;
    --perf-white: #FFFFFF;
    --perf-border: #E0E0E0;
    --perf-shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --perf-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --perf-shadow-lg: 0 8px 20px rgba(0,0,0,0.12);
    --perf-radius: 8px;

    /* Discipline Colors */
    --cycling-color: #62CAFD;
    --running-color: #FF9F39;
    --swimming-color: #4ECDC4;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Container */
.performance-hub-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Section */
.performance-header {
    background: linear-gradient(135deg, var(--perf-primary) 0%, var(--perf-secondary) 100%);
    border-radius: var(--perf-radius);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--perf-shadow-md);
}

.performance-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.performance-title {
    color: var(--perf-white);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.performance-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0.5rem 0 0 0;
}

.performance-header-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn-performance-primary {
    background: var(--perf-white);
    color: var(--perf-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-performance-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    color: var(--perf-primary);
    text-decoration: none;
}

.btn-performance-details {
    background: transparent;
    color: var(--perf-primary);
    border: 2px solid var(--perf-border);
    padding: 0.625rem 1.25rem;
    border-radius: var(--perf-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.btn-performance-details:hover {
    background: var(--perf-primary);
    color: var(--perf-white);
    border-color: var(--perf-primary);
}

/* Athlete Selection */
.performance-athlete-select {
    margin-bottom: 2rem;
}

.athlete-select-card {
    background: var(--perf-white);
    border-radius: var(--perf-radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--perf-shadow-sm);
}

.athlete-select-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--perf-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.athlete-select-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--perf-border);
    border-radius: var(--perf-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--perf-white);
}

.athlete-select-input:focus {
    outline: none;
    border-color: var(--perf-accent);
    box-shadow: 0 0 0 3px rgba(0, 173, 181, 0.1);
}

/* Performance Grid */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Performance Card */
.performance-card {
    background: var(--perf-white);
    border-radius: var(--perf-radius);
    overflow: hidden;
    box-shadow: var(--perf-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.performance-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--perf-shadow-lg);
}

.performance-card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--header-color-1) 0%, var(--header-color-2) 100%);
    color: var(--perf-white);
}

.cycling-header {
    --header-color-1: #64343c;
    --header-color-2: #64343c;
}

.running-header {
    --header-color-1: #FF9F39;
    --header-color-2: #FF8C1A;
}

.swimming-header {
    --header-color-1: #62CAFD;
    --header-color-2: #4AB8EB;

}

.performance-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--perf-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.performance-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.performance-card-date {
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.performance-card-body {
    padding: 1.5rem;
}

/* Metrics */
.performance-metric-primary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--perf-border);
}

.metric-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--perf-primary);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.metric-unit {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
}

.performance-metric-secondary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.performance-metric-secondary .metric-label {
    font-size: 0.875rem;
}

.performance-metric-secondary .metric-value {
    font-size: 1.125rem;
    font-weight: 600;
}

.performance-protocol {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--perf-light);
    padding: 0.5rem 1rem;
    border-radius: var(--perf-radius);
    font-size: 0.875rem;
    color: var(--perf-primary);
    margin-top: 1rem;
}

.performance-no-data {
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
}

.performance-no-data i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.performance-no-data p {
    margin: 0;
    font-size: 0.95rem;
}

/* Zones Preview */
.performance-zones-preview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--perf-border);
}

.zones-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--perf-primary);
}

.zones-count {
    background: var(--perf-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--perf-radius);
    font-size: 0.75rem;
}

.zones-preview-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    gap: 2px;
}

.zone-bar-segment {
    transition: transform 0.3s ease;
}

.zone-bar-segment:hover {
    transform: scaleY(1.5);
}

/* Zone Colors */
.zone-1, .zone-bar-segment.zone-1 { background-color: #62CAFD; }
.zone-2, .zone-bar-segment.zone-2 { background-color: #82D5FD; }
.zone-3, .zone-bar-segment.zone-3 { background-color: #B2E4FB; }
.zone-4, .zone-bar-segment.zone-4 { background-color: #FFF589; }
.zone-5, .zone-bar-segment.zone-5 { background-color: #FDDA5A; }
.zone-6, .zone-bar-segment.zone-6 { background-color: #FF9F39; }
.zone-7, .zone-bar-segment.zone-7 { background-color: #FE8333; }

.performance-card-footer {
    padding: 1rem 1.5rem;
    background: var(--perf-light);
}

/* No Athlete State */
.performance-no-athlete {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--perf-white);
    border-radius: var(--perf-radius);
    box-shadow: var(--perf-shadow-sm);
}

.no-athlete-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.performance-no-athlete h3 {
    color: var(--perf-primary);
    margin-bottom: 0.5rem;
}

.performance-no-athlete p {
    color: #666;
}

/* Modal */
.performance-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.performance-modal-content {
    background: var(--perf-white);
    border-radius: var(--perf-radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--perf-shadow-lg);
    animation: fadeInUp 0.3s ease-out;
}

.performance-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--perf-border);
}

.performance-modal-header h2 {
    margin: 0;
    color: var(--perf-primary);
    font-size: 1.5rem;
}

.performance-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.3s ease;
}

.performance-modal-close:hover {
    color: var(--perf-primary);
}

.performance-modal-body {
    padding: 2rem;
}

/* Zone Detail Table */
.zones-detail-table {
    overflow-x: auto;
}

.zones-detail-table table {
    width: 100%;
    border-collapse: collapse;
}

.zones-detail-table th {
    background: var(--perf-light);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--perf-primary);
    border-bottom: 2px solid var(--perf-border);
}

.zones-detail-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--perf-border);
}

.zone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-weight: 700;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .performance-hub-container {
        padding: 1rem 0.5rem;
    }

    .performance-header {
        padding: 1.5rem 1rem;
    }

    .performance-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .performance-title {
        font-size: 1.5rem;
    }

    .performance-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .performance-modal-content {
        margin: 1rem;
    }

    .performance-modal-header,
    .performance-modal-body {
        padding: 1rem;
    }
}


/* =====================================================
   PERFORMANCE MANAGEMENT - Input Interface
   ===================================================== */

.performance-manage-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.btn-performance-secondary {
    background: transparent;
    color: var(--perf-white);
    border: 2px solid var(--perf-white);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-performance-secondary:hover {
    background: var(--perf-white);
    color: var(--perf-primary);
    text-decoration: none;
}

/* Discipline Tabs */
.performance-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--perf-white);
    padding: 0.5rem;
    border-radius: var(--perf-radius);
    box-shadow: var(--perf-shadow-sm);
}

.performance-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--perf-radius);
    font-size: 1rem;
    font-weight: 600;
    color: var(--perf-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.performance-tab i {
    font-size: 1.25rem;
}

.performance-tab:hover {
    background: var(--perf-light);
}


/* =====================================================
   Coach Connect - Mobile Messenger Layout
   ===================================================== */

/* Remove padding from main.content for Coach Connect chat on mobile */
@media (max-width: 768px) {
    body.coach-connect-session main.content {
        padding: 0 !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.performance-tab.active {
    background: var(--perf-primary);
    color: var(--perf-white);
}

/* Panels */
.performance-panels {
    position: relative;
}

.performance-panel {
    display: none;
}

.performance-panel.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

/* Section Grid */
.performance-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

/* Input Cards */
.performance-input-card {
    background: var(--perf-white);
    border-radius: var(--perf-radius);
    box-shadow: var(--perf-shadow-md);
    overflow: hidden;
}

.performance-card-header-simple {
    padding: 1.5rem 2rem;
    background: var(--perf-light);
    border-bottom: 1px solid var(--perf-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.performance-card-header-simple h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--perf-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.performance-badge {
    background: var(--perf-primary);
    color: var(--perf-white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--perf-radius);
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-performance-small {
    background: transparent;
    color: var(--perf-primary);
    border: 2px solid var(--perf-border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-performance-small:hover {
    background: var(--perf-primary);
    color: var(--perf-white);
    border-color: var(--perf-primary);
}

.performance-card-body-simple {
    padding: 2rem;
}

/* Form Elements */
.form-group-perf {
    margin-bottom: 1.5rem;
}

.form-group-perf label {
    display: block;
    font-weight: 600;
    color: var(--perf-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input-perf {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--perf-border);
    border-radius: var(--perf-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--perf-white);
}

.form-input-perf:focus {
    outline: none;
    border-color: var(--perf-accent);
    box-shadow: 0 0 0 3px rgba(0, 173, 181, 0.1);
}

.form-row-perf {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

textarea.form-input-perf {
    resize: vertical;
    font-family: inherit;
}

.btn-performance-save {
    width: 100%;
    background: linear-gradient(135deg, var(--perf-primary) 0%, var(--perf-secondary) 100%);
    color: var(--perf-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--perf-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--perf-shadow-sm);
}

.btn-performance-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--perf-shadow-md);
}

.btn-performance-save:active {
    transform: translateY(0);
}

/* Zones Table Wrapper */
.zones-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.zones-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.zones-table-wrapper th {
    background: var(--perf-light);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--perf-primary);
    border-bottom: 2px solid var(--perf-border);
    font-size: 0.875rem;
}

.zones-table-wrapper td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--perf-border);
}

.zones-table-wrapper input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--perf-border);
    border-radius: 4px;
    font-size: 0.875rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* Responsive Management */
@media (max-width: 1024px) {
    .performance-section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .performance-manage-container {
        padding: 1rem 0.5rem;
    }

    .performance-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .performance-tab {
        justify-content: flex-start;
    }

    .performance-card-header-simple {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .performance-card-body-simple {
        padding: 1rem;
    }

    .form-row-perf {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Datenschutz-Hinweis (Cookie Notice)
   ===================================================== */

.aspect-privacy-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.22);
    padding: 0.625rem 1.25rem;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.aspect-privacy-notice.is-visible {
    transform: translateY(0);
}

.aspect-privacy-notice__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 920px;
    margin: 0 auto;
}

.aspect-privacy-notice__text {
    font-size: 0.775rem;
    color: rgba(229, 229, 229, 0.72);
    margin: 0;
    line-height: 1.55;
    flex: 1;
}

.aspect-privacy-notice__link {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.aspect-privacy-notice__link:hover,
.aspect-privacy-notice__link:focus-visible {
    color: #fff;
    outline: none;
}

.aspect-privacy-notice__close {
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0.3rem 0.75rem;
    line-height: 1.4;
}

.aspect-privacy-notice__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.32);
}

.aspect-privacy-notice__close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    color: #fff;
}

@media (min-width: 950px) {
    .aspect-privacy-notice {
        padding-left: calc(var(--sidebar-current-width, var(--sidebar-width-collapsed)) + 1.25rem);
    }
}

@media (max-width: 767px) {
    .aspect-privacy-notice {
        padding: 0.5rem 1rem;
    }

    /* Über das mobile Footer-Menü heben (60px Höhe + safe-area) */
    .aspect-privacy-notice.has-mobile-footer {
        bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .aspect-privacy-notice__text {
        font-size: 0.725rem;
    }

    .aspect-privacy-notice__close {
        white-space: normal;
        text-align: center;
        line-height: 1.3;
        padding: 0.3rem 0.6rem;
        font-size: 0.68rem;
        max-width: 90px;
    }
}
