/* ===== Session Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #00D9A3;
    --primary-dark: #00B88A;
    --secondary: #6366F1;
    --accent: #F59E0B;
    --bg: #F7F9FC;
    --surface: #FFFFFF;
    --text: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --danger: #EF4444;
    --success: #22C55E;
    --warning: #F59E0B;
    --info: #3B82F6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ===== Navigation ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.navbar {
    padding: 0;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo:hover {
    color: var(--text);
}

.logo-icon {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(0, 217, 163, 0.1);
}

#chat-nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 6px 8px;
}

#chat-nav-btn:hover {
    background: rgba(0, 217, 163, 0.1);
    color: var(--primary);
}

/* Notification & chat badge position — closer to icon */
#notification-bell-btn .badge,
#chat-nav-btn .badge {
    transform: translate(-90%, 10%) !important;
    font-size: 0.65rem;
    padding: 3px 5px;
}

/* Mobile navbar */
@media (max-width: 991.98px) {
    .navbar .container-xl {
        flex-wrap: nowrap;
    }

    /* More space between header action buttons on mobile */
    .navbar .container-xl > .d-flex.align-items-center.gap-2 {
        gap: 12px !important;
    }

    /* Fullscreen overlay menu */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--surface);
        z-index: 1080;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 80px 32px 32px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        pointer-events: none;
    }

    .navbar-collapse.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Prevent Bootstrap collapse animation override */
    .navbar-collapse.collapsing {
        opacity: 0;
        visibility: hidden;
        height: auto !important;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .navbar-collapse .navbar-nav {
        text-align: center;
        gap: 8px;
    }

    .navbar-collapse .nav-link {
        font-size: 1.25rem;
        padding: 12px 24px;
    }

    /* Logo inside mobile overlay */
    .mobile-nav-logo {
        position: absolute;
        top: 16px;
        left: 16px;
    }

    /* Close button inside overlay */
    .mobile-nav-close {
        position: absolute;
        top: 16px;
        right: 16px;
        background: var(--primary);
        border: none;
        font-size: 1.5rem;
        color: #fff;
        padding: 8px 12px;
        border-radius: 10px;
        cursor: pointer;
        z-index: 1;
    }

    .mobile-nav-close:hover {
        color: var(--primary);
    }

    .navbar-toggler {
        border: none;
        padding: 4px 8px;
        z-index: 1070;
    }


    .navbar-toggler:focus {
        box-shadow: none;
    }

    /* Bell badge closer to icon on mobile */
    #notification-bell-btn {
        padding: 4px 6px;
    }

    #notification-bell-btn .badge,
    #chat-nav-btn .badge {
        transform: translate(-90%, 10%) !important;
    }

    #chat-nav-btn {
        padding: 4px 6px;
    }

    .user-avatar-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* Exercise tabs: stacked icon + text on mobile */
    .exercises-tabs {
        width: 100%;
    }

    .exercise-tab {
        padding: 8px 6px;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        gap: 2px;
        position: relative;
    }

    .exercise-tab .tab-label {
        font-size: 10px;
        line-height: 1.2;
        text-align: center;
        word-break: break-word;
    }

    .exercise-tab i {
        font-size: 18px;
    }

    .exercise-tab .tab-count {
        position: absolute;
        top: 2px;
        right: 2px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        padding: 0 4px;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    position: relative;
}

/* User avatar initials circle */
.user-avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: #6366F1;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    font-family: inherit;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.user-avatar-toggle {
    display: flex;
    align-items: center;
}

.user-avatar-toggle::after {
    display: none !important;
}

.user-avatar-circle:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    overflow: hidden;
    z-index: 1001;
}

.user-dropdown a,
.user-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    color: var(--text);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.2s;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: var(--bg);
}

/* ===== Buttons ===== */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 217, 163, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 217, 163, 0.35);
    color: var(--text);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border);
}

.btn-outline-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: 2px solid var(--danger);
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-top: 70px;
    width: 100%;
    padding: 32px 48px;
}

/* Container for views that want centered max-width content */
.view-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Full-width view layout (no max-width constraint) */
.view-fullwidth {
    width: 100%;
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 0;
}

.page-header p {
    color: var(--text-muted);
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: var(--surface);
    padding: 8px;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.tab {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    color: var(--text-muted);
}

.tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 217, 163, 0.3);
}

.tab:hover:not(.active) {
    background: var(--bg);
}

/* ===== Toolbar ===== */
.toolbar {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: min(300px, 100%);
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 163, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
}

.filter-btn {
    padding: 12px 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== Filter Panel ===== */
.filter-panel {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: none;
}

.filter-panel.active {
    display: block;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    padding: 10px 18px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-tag:hover {
    border-color: var(--primary);
}

.filter-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Age Range Slider */
.age-range-slider {
    padding: 4px 0 8px;
}

.age-range-labels {
    text-align: center;
    margin-bottom: 12px;
}

#age-range-display {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
}

.age-range-track-wrapper {
    position: relative;
    height: 24px;
    margin: 0 4px;
}

.age-range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    transform: translateY(-50%);
    background: var(--border);
    border-radius: 3px;
    pointer-events: none;
}

.age-range-fill {
    position: absolute;
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.age-range-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    z-index: 2;
}

.age-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.15s ease;
}

.age-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.age-range-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.age-range-ticks {
    display: flex;
    justify-content: space-between;
    padding: 6px 11px 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.session-age-filter {
    min-width: 220px;
}

/* ===== Tags / Badges ===== */
.tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0, 217, 163, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
    margin-bottom: 6px;
}

.tag.age {
    background: rgba(99, 102, 241, 0.1);
    color: var(--secondary);
}

.tag.duration {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

.tag.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ===== Cards ===== */
.card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.card-illustration {
    height: 160px;
    background: linear-gradient(135deg, #E0F2FE, #DBEAFE, #FEF3C7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}

.card-illustration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.card-author-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    z-index: 2;
}

.card-author-overlay .author-avatar {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.6);
}

.card-author-overlay .author-name {
    font-size: 0.75rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exercise-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.exercise-emoji-fallback {
    font-size: 64px;
}

/* Exercise image count badge */
.image-count-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

/* Video embed */
.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 8px;
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 12px;
}

/* Exercise detail modal image */
.exercise-image-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.exercise-detail-image-container {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
    min-height: 100px;
    text-align: center;
}

.exercise-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Exercise images gallery */
.exercise-images-gallery {
    position: relative;
    min-height: 200px;
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
}

.exercise-gallery-item {
    display: none !important;
    width: 100%;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exercise-gallery-item.active {
    display: block !important;
    position: relative;
    opacity: 1;
}

.exercise-gallery-item img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.exercise-gallery-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding: 8px;
}

.exercise-gallery-nav button {
    background: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.exercise-gallery-nav button:hover {
    background: var(--primary-dark);
}

.gallery-counter {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Exercise images manager (edit modal) */
.exercise-images-manager {
    margin-top: 16px;
}

.exercise-images-manager h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.edit-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.edit-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    border: 2px solid var(--border);
    transition: border-color 0.2s;
}

.edit-image-item.is-primary {
    border-color: var(--primary);
}

.edit-image-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.edit-image-actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.edit-image-item:hover .edit-image-actions {
    opacity: 1;
}

.btn-set-primary,
.btn-delete-image {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.1s;
}

.btn-set-primary {
    background: var(--primary);
    color: white;
}

.btn-set-primary:hover {
    transform: scale(1.05);
}

.btn-delete-image {
    background: var(--danger);
    color: white;
}

.btn-delete-image:hover {
    transform: scale(1.05);
}

.primary-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.05);
}

/* Create Modal Image Preview */
.create-image-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.create-image-upload-area:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.03);
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.image-preview-container:empty {
    display: none;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-preview-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-preview-item:hover .remove-preview-btn {
    opacity: 1;
}

.image-preview-item .remove-preview-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Drawing Picker (in create/edit exercise modal) */
.drawing-picker-container {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.drawing-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.drawing-picker-item {
    position: relative;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg);
}

.drawing-picker-item:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.05);
}

.drawing-picker-item.active {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.1);
}

.drawing-picker-thumb {
    width: 100%;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.drawing-picker-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.drawing-picker-thumb .bi {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.drawing-picker-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.drawing-picker-title {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.drawing-picker-badge {
    font-size: 0.6rem;
    padding: 1px 4px;
}

.drawing-picker-check {
    position: absolute;
    top: 4px;
    right: 4px;
    color: var(--primary);
    font-size: 1rem;
    display: none;
}

.drawing-picker-item.active .drawing-picker-check {
    display: block;
}

/* ===== Exercise Drawings Section ===== */
.exercise-drawings-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.drawings-empty-state {
    background: var(--bg);
    border-radius: 12px;
    padding: 32px 16px;
}

.drawings-gallery {
    margin-top: 12px;
}

.drawing-main-preview {
    position: relative;
    background: var(--bg);
    border-radius: 12px;
    overflow: visible;
    border: 2px solid var(--border);
    transition: border-color 0.2s, transform 0.2s;
}

.drawing-main-preview:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.drawing-unlink-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #DC2626;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.drawing-unlink-btn:hover {
    background: #B91C1C;
    transform: scale(1.1);
}

.drawing-unlink-btn-small {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #DC2626;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.drawing-unlink-btn-small:hover {
    background: #B91C1C;
    transform: scale(1.1);
}

.drawing-thumbnail-large {
    width: 100%;
    min-height: 200px;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.drawing-thumbnail-large img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

.drawing-placeholder {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.5);
}

.drawing-info {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: white;
}

.drawing-title {
    font-weight: 600;
    color: var(--text);
}

.drawings-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.drawing-thumbnail-item {
    position: relative;
    background: var(--bg);
    border-radius: 8px;
    overflow: visible;
    border: 2px solid var(--border);
    transition: border-color 0.2s, transform 0.2s;
    text-align: center;
}

.drawing-thumbnail-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.drawing-thumbnail-item img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    background: #f0f4f8;
}

.drawing-placeholder-small {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 24px;
}

.drawing-thumbnail-title {
    display: block;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawing-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    background: var(--bg);
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.drawing-more:hover {
    background: rgba(0, 217, 163, 0.1);
    color: var(--primary-dark);
}

.image-upload-area i {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.image-upload-area span {
    font-size: 13px;
    color: var(--text-muted);
}

.image-upload-area.uploading {
    pointer-events: none;
    opacity: 0.6;
}

.no-images-placeholder {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.exercise-card {
    display: flex;
    flex-direction: column;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-content p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    margin-top: auto;
}

/* ===== Card Grid ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 24px;
}

/* ===== Favorite Badge ===== */
.favorite-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
    border: none;
    z-index: 2;
}

.favorite-badge:hover {
    transform: scale(1.1);
}

/* ===== Add to Session Button ===== */
.add-to-session-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 8px 16px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
    font-family: inherit;
    z-index: 2;
}

.add-to-session-btn:hover {
    transform: scale(1.05);
}

.add-to-session-btn.added {
    background: var(--primary);
}

/* ===== Session Panel (Slide-in) ===== */
.session-panel {
    position: fixed;
    right: -400px;
    top: 70px;
    bottom: 0;
    width: 400px;
    background: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.session-panel.active {
    right: 0;
}

.session-panel-header {
    padding: 24px;
    border-bottom: 2px solid var(--border);
}

.session-panel-header h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.session-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.session-panel-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-panel-footer {
    padding: 24px;
    border-top: 2px solid var(--border);
}

/* ===== Session Counter Badge ===== */
.session-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== FAB (Floating Action Button) ===== */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 217, 163, 0.4);
    z-index: 998;
    transition: all 0.3s ease;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 217, 163, 0.5);
}

/* ===== Modal ===== */
/* Modal overlay for custom modals (sessions view) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay .modal {
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    background: var(--surface) !important;
    backdrop-filter: none !important;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    padding: 0 !important;
}

.modal-overlay .modal.modal-sm {
    max-width: 340px !important;
}

.modal-overlay .modal.modal-sm .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-overlay .modal.modal-sm .modal-header h2 {
    font-size: 1.1rem;
}

.modal-overlay .modal.modal-sm .modal-body {
    padding: 20px;
}

.modal-overlay .modal.modal-sm .modal-body p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.modal-overlay .modal.modal-sm .modal-footer {
    padding: 16px 20px;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    gap: 10px;
}

.modal-overlay .modal.modal-lg {
    max-width: 900px;
}

.modal-overlay .modal.modal-xl {
    max-width: 1100px;
}

/* Legacy modal (Bootstrap pattern) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.modal-lg {
    max-width: 900px;
}

.modal-content.modal-xl {
    max-width: 1100px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Centering fix for Bootstrap modals with modal-dialog-centered */
.modal.fade .modal-dialog-centered .modal-content {
    margin: 0 auto;
}

.modal-header {
    padding: 24px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2,
.modal-header h5 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 2px solid var(--border);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.close-btn {
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--border);
    transform: rotate(90deg);
}

/* Modal close button (in custom overlay modals) */
.modal-close {
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
    transform: rotate(90deg);
}

/* ===== Detail Section ===== */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* ===== Timeline Items ===== */
.timeline-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.timeline-item:hover {
    border-color: var(--primary);
}

.timeline-item h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-item p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ===== Info Box ===== */
.info-box {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.info-box p {
    font-size: 13px;
    color: var(--secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===== Coach Tips ===== */
.coach-tips {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    border: 2px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.coach-tips h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

/* ===== Meta Cards ===== */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.meta-item {
    text-align: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
}

.meta-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.meta-value {
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
}

.meta-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ===== Range Slider ===== */
.range-input {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 217, 163, 0.3);
}

.range-value {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    margin-left: 8px;
}

/* ===== Tag Select (Multi-select buttons) ===== */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-select {
    padding: 10px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tag-select:hover {
    border-color: var(--primary);
}

.tag-select.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== Form Styles ===== */
.form-section {
    margin-bottom: 24px;
}

.form-section label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text);
}

.form-section select,
.form-section input[type="text"],
.form-section input[type="number"],
.form-section textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s ease;
    background: white;
}

.form-section select:focus,
.form-section input:focus,
.form-section textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 163, 0.1);
}

.form-section textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== Generate Button ===== */
.generate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--secondary), #4F46E5);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    font-family: inherit;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== Animated Background ===== */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.15), rgba(99, 102, 241, 0.1));
    top: 10%;
    right: 10%;
    animation: float-1 25s ease-in-out infinite;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(245, 158, 11, 0.1));
    bottom: 15%;
    left: 15%;
    animation: float-2 30s ease-in-out infinite;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(0, 217, 163, 0.1));
    top: 50%;
    right: 30%;
    animation: float-3 35s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -40px); }
    66% { transform: translate(-40px, 30px); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-35px, 45px); }
    66% { transform: translate(45px, -35px); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(40px, 40px); }
    66% { transform: translate(-30px, -30px); }
}

/* ===== Loading States ===== */
.loading-state {
    text-align: center;
    padding: 100px 40px;
    position: relative;
    z-index: 1;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: gentle-bounce 3s ease-in-out infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 24px;
}

/* ===== Notification ===== */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: notificationSlideIn 0.3s ease-out;
}

@keyframes notificationSlideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes notificationSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

/* ===== Split Layout (AI Generator) ===== */
.split-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    height: calc(100vh - 70px);
    margin: -32px -48px;
}

.generator-panel {
    background: var(--surface);
    border-right: 2px solid var(--border);
    padding: 32px 24px;
    overflow-y: auto;
    overflow-x: hidden;
}

.result-panel {
    background: var(--bg);
    padding: 32px;
    overflow-y: auto;
    position: relative;
}

/* ===== List Group ===== */
.list-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-group-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    border-color: var(--primary);
}

/* ===== Author Info ===== */
.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 600;
}

.author-avatar {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== Footer ===== */
.main-footer {
    background: var(--surface);
    border-top: 2px solid var(--border);
    margin-top: auto;
    padding: 48px 0 24px;
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 48px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 2px solid var(--border);
    text-align: center;
    color: var(--text-muted);
}

/* ===== Mobile Menu ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.2s;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .generator-panel {
        border-right: none;
        border-bottom: 2px solid var(--border);
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 24px;
    }

    #exercise-count {
        display: none;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        padding: 12px;
    }

    .filter-panel {
        padding: 16px;
    }

    .filter-tag {
        font-size: 12px;
        padding: 6px 12px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        border-bottom: 2px solid var(--border);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .session-panel {
        width: 100%;
        right: -100%;
    }

    .tabs {
        flex-direction: column;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-overlay .modal {
        border-radius: 0;
        max-height: 100vh;
        max-width: 100%;
        min-height: 100vh;
    }

    .modal-overlay {
        padding: 0;
        align-items: flex-start;
    }

    /* Bootstrap modals: full-screen sheet on mobile */
    .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        min-height: 100vh;
    }

    .modal-dialog-centered {
        align-items: center !important;
    }

    .modal-content {
        border-radius: 0 !important;
        min-height: 100vh;
        border: none !important;
    }

    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 24px;
    }

    .split-layout {
        margin: -24px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }

    .split-layout {
        margin: -16px;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }
}

/* ===== Hover Effects ===== */
.hover-shadow {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* ===== Bootstrap Overrides ===== */
.badge {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
}

.badge.bg-primary {
    background: var(--primary) !important;
    color: var(--text);
}

.badge.bg-secondary {
    background: var(--secondary) !important;
}

.badge.bg-success {
    background: var(--success) !important;
}

.badge.bg-danger {
    background: var(--danger) !important;
}

.badge.bg-warning {
    background: var(--warning) !important;
    color: var(--text);
}

.badge.bg-info {
    background: var(--info) !important;
}

.form-control,
.form-select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 163, 0.1);
}

.form-label {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text);
}

/* Google Sign-In container (renderButton) */
#google-signin-container {
    width: 100%;
    margin-bottom: 16px;
}

/* Google Sign-In button (fallback) */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 24px;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}
.google-signin-btn:hover {
    background: var(--bg);
    border-color: var(--text-muted);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Social login buttons (Facebook, Apple) */
.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}
.social-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 24px;
    margin-bottom: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}
.social-signin-btn:hover {
    background: var(--bg);
    border-color: var(--text-muted);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.facebook-signin-btn:hover {
    background: rgba(24, 119, 242, 0.05);
    border-color: #1877F2;
}
.apple-signin-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: #000;
}

/* Auth divider (or with e-post) */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.auth-divider span {
    padding: 0 12px;
}

/* Auth pages responsive */
@media (max-width: 576px) {
    .container.mt-5 {
        margin-top: 1.5rem !important;
    }
    .card-body.p-4 {
        padding: 1.25rem !important;
    }
}

.alert {
    border: 2px solid;
    border-radius: 12px;
    padding: 16px;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--accent);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* ===== Nav Pills Override ===== */
.nav-pills .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    color: var(--primary);
    background: rgba(0, 217, 163, 0.1);
}

.nav-pills .nav-link.active {
    background: var(--primary);
    color: white;
}

/* ===== Card Overrides ===== */
.card.border-0 {
    border: 2px solid var(--border) !important;
    border-radius: 16px;
}

.card-header {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    padding: 20px 24px;
    font-weight: 700;
}

.card-body {
    padding: 24px;
}

.card-footer {
    background: var(--surface);
    border-top: 2px solid var(--border);
    padding: 20px 24px;
}

/* ===== AI Generator Layout ===== */
.ai-gradient-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.ai-panel-header {
    text-align: center;
    margin-bottom: 32px;
}

.ai-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #00D9A3 0%, #00B389 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: white;
}

.ai-panel-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.ai-panel-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ai-form .form-group {
    margin-bottom: 24px;
}

.ai-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

/* Range Slider */
.range-slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.range-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: var(--border);
    border-radius: 4px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-value {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}


/* Saves/Likes Count on Exercise Card */
.favorite-badge .saves-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Intensity Selector */
.intensity-selector {
    display: flex;
    gap: 8px;
}

.intensity-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.intensity-btn i {
    font-size: 1.2rem;
}

.intensity-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.intensity-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Focus Area Tags */
.focus-area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.age-group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.age-tag {
    padding: 8px 16px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.age-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.age-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.age-group-tags.compact {
    gap: 6px;
}

.age-group-tags.compact .age-tag {
    padding: 5px 10px;
    font-size: 0.75rem;
}

.focus-tag {
    padding: 10px 16px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.focus-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.focus-tag.active {
    background: linear-gradient(135deg, #00D9A3, #00B389);
    border-color: #00D9A3;
    color: white;
}

/* Star Rating */
.star-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-rating .star {
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--border);
    transition: all 0.15s ease;
    user-select: none;
}

.star-rating .star.filled,
.star-rating .star.hover {
    color: #F59E0B;
}

.star-rating .star:hover {
    transform: scale(1.2);
}

.star-rating .rating-info {
    margin-left: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Generate Button */
.btn-generate {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 16px;
    color: #fff !important;
}

.btn-generate .btn-content,
.btn-generate .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Animated Background */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation-delay: -7s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, -50px) rotate(90deg); }
    50% { transform: translate(0, -100px) rotate(180deg); }
    75% { transform: translate(-50px, -50px) rotate(270deg); }
}

/* AI Content */
.ai-content {
    position: relative;
    z-index: 1;
    padding: 32px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Welcome State */
.ai-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 48px;
}

.welcome-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 48px;
}

.ai-welcome h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.ai-welcome p {
    opacity: 0.7;
    max-width: 400px;
    margin-bottom: 32px;
}

.welcome-features {
    display: flex;
    gap: 32px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

/* Generating State */
.generating-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 48px;
}

.generating-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--primary);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.generating-animation .ai-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.generating-state h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.generating-state p {
    opacity: 0.7;
}

/* AI Result */
.ai-result {
    margin-bottom: 24px;
}

/* Result Panel - New Design */
.result-panel {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.result-panel .animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    overflow: hidden;
}

.result-panel .animated-bg .floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 15s infinite ease-in-out;
}

.result-panel .animated-bg .shape-1 {
    width: 200px;
    height: 200px;
    background: white;
    top: -50px;
    right: -30px;
}

.result-panel .animated-bg .shape-2 {
    width: 150px;
    height: 150px;
    background: white;
    bottom: -30px;
    left: 20%;
    animation-delay: -5s;
}

.result-panel .animated-bg .shape-3 {
    width: 100px;
    height: 100px;
    background: white;
    top: 30%;
    left: 10%;
    animation-delay: -10s;
}

/* Result Header */
.result-panel .result-header {
    position: relative;
    z-index: 1;
    padding: 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.result-panel .result-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: white;
}

.result-panel .result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.action-btn.primary {
    background: white;
    color: var(--primary);
}

.action-btn.primary:hover {
    background: var(--surface);
}

/* Pass Info Section */
.pass-info {
    position: relative;
    z-index: 1;
    padding: 0 32px 32px;
    margin-top: -40px;
}

.pass-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.meta-item {
    text-align: center;
    padding: 12px;
}

.meta-icon {
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Coach Tips */
.coach-tips {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left: 4px solid var(--accent);
    padding: 20px 24px;
    border-radius: 12px;
}

.coach-tips h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--accent);
}

.coach-tips p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* AI Generator Responsive */
@media (max-width: 991.98px) {
    .ai-content {
        padding: 20px;
    }

    .ai-welcome {
        padding: 24px 16px;
    }

    .ai-welcome h2 {
        font-size: 1.5rem;
    }

    .welcome-features {
        gap: 16px;
    }

    .welcome-icon {
        width: 72px;
        height: 72px;
        font-size: 36px;
    }

    .result-panel .result-header {
        padding: 20px;
    }

    .result-panel .result-header .result-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pass-info {
        padding: 0 16px 16px;
    }

    .pass-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .generating-state {
        padding: 24px 16px;
    }

    /* AI form filters */
    .ai-panel-header {
        margin-bottom: 20px;
    }

    .ai-logo {
        width: 48px;
        height: 48px;
        font-size: 22px;
        border-radius: 12px;
    }

    .ai-panel-header h2 {
        font-size: 1.25rem;
    }

    .ai-form .form-group {
        margin-bottom: 16px;
    }

    .range-slider-container {
        flex-direction: column;
        gap: 8px;
    }

    .range-slider {
        width: 100%;
    }

    #age-sliders {
        width: 100%;
    }

    .range-value {
        padding: 6px 12px;
        min-width: unset;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .intensity-selector {
        gap: 6px;
    }

    .intensity-btn {
        padding: 10px 8px;
        font-size: 0.8rem;
        gap: 2px;
    }

    .focus-tag {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .focus-area-tags {
        gap: 6px;
    }

    .btn-generate {
        padding: 12px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .intensity-selector {
        flex-direction: column;
    }

    .intensity-btn {
        flex-direction: row;
        padding: 10px 14px;
    }

    .welcome-features {
        flex-direction: column;
        gap: 12px;
    }

    .pass-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .meta-item {
        padding: 8px;
    }

    .meta-icon {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }

    .meta-value {
        font-size: 0.95rem;
    }

    .result-panel .result-header .result-actions {
        flex-direction: column;
    }

    .result-panel .result-header .result-actions .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Exercise Comments */
.exercise-comments-section {
    margin-top: 16px;
}

.comment-form {
    margin-bottom: 16px;
}

.comment-form textarea {
    border: 2px solid var(--border);
    border-radius: 12px;
    resize: vertical;
    font-size: 0.9rem;
}

.comment-form textarea:focus {
    border-color: var(--primary);
    box-shadow: none;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: var(--bg);
    border-radius: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-header strong {
    font-size: 0.85rem;
    color: var(--text);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-delete-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    font-size: 0.9rem;
}

.comment-delete-btn:hover {
    color: #ef4444;
}

.comment-text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.5;
}

/* Exercise Timeline - New Design */
.exercise-timeline {
    padding: 0 32px 32px;
}

.timeline-item {
    position: relative;
    padding: 24px;
    background: var(--surface);
    border-radius: 16px;
    margin-bottom: 16px;
    border-left: 4px solid var(--border);
    transition: all 0.2s ease;
}

.timeline-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.timeline-item.warmup {
    border-left-color: var(--accent);
}

.timeline-item.main {
    border-left-color: var(--secondary);
}

.timeline-item.cooldown {
    border-left-color: var(--primary);
}

.timeline-number {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.timeline-item.warmup .timeline-number {
    background: var(--accent);
}

.timeline-item.main .timeline-number {
    background: var(--secondary);
}

.timeline-item.cooldown .timeline-number {
    background: var(--primary);
}

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    padding-right: 48px;
    color: var(--text);
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.timeline-duration {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-section-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-section-badge.warmup {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
}

.timeline-section-badge.main {
    background: rgba(99, 102, 241, 0.15);
    color: var(--secondary);
}

.timeline-section-badge.cooldown {
    background: rgba(0, 217, 163, 0.15);
    color: var(--primary);
}

.timeline-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.timeline-actions {
    margin-top: 12px;
}

.timeline-actions .btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-actions .btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* AI Tip in Timeline */
.ai-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ai-tip i {
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* AI History */
.ai-history {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
}

.history-header {
    margin-bottom: 16px;
}

.history-header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.history-item-content {
    flex: 1;
}

.history-item-content h4 {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.history-meta {
    display: flex;
    gap: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.history-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-item-actions {
    display: flex;
    gap: 8px;
}

.history-item-actions .btn-icon {
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item-actions .btn-icon:hover {
    color: white;
    transform: scale(1.2);
}

.empty-history {
    text-align: center;
    padding: 32px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-history i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

/* Exercise Images */
.exercise-images-container {
    margin: 12px 0;
}

.images-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exercise-thumbnail img {
    max-height: 80px;
    max-width: 120px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.exercise-thumbnail img:hover {
    transform: scale(1.05);
}

.no-images,
.images-wrapper .error {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive AI Layout (result stats) */
@media (max-width: 768px) {
    .result-stats {
        flex-direction: column;
    }
}

/* ===== Sessions View - New Design ===== */
.sessions-view {
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-header-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: var(--text);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* Sessions Stats Bar */
.sessions-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.session-stat-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.session-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon-wrapper.community {
    background: linear-gradient(135deg, var(--secondary), #4F46E5);
}

.stat-icon-wrapper.favorite {
    background: linear-gradient(135deg, #EC4899, #DB2777);
}

.stat-icon-wrapper.completed {
    background: linear-gradient(135deg, var(--success), #16A34A);
}

.stat-details {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.stat-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Sessions Tabs */
.sessions-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--surface);
    padding: 8px;
    border-radius: 14px;
    border: 2px solid var(--border);
}

.session-tab {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-family: inherit;
}

.session-tab:hover {
    background: var(--bg);
    color: var(--primary);
}

.session-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.3);
}

/* Sessions Toolbar */
.sessions-toolbar {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.search-filter-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.session-filter-select {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.session-filter-select:focus {
    border-color: var(--primary);
}

.sessions-toolbar .search-box {
    flex: 1;
    min-width: min(280px, 100%);
    position: relative;
}

.sessions-toolbar .search-box input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.sessions-toolbar .search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 217, 163, 0.1);
}

.sessions-toolbar .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-muted);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-buttons .filter-btn {
    padding: 10px 18px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-family: inherit;
}

.filter-buttons .filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-buttons .filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Pass Grid */
.pass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 24px;
}

/* Pass Card */
.pass-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.pass-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.pass-card-header {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Image collage container */
.pass-images-collage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pass-images-collage .pass-emoji.fallback {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* Image collage grid layouts */
.image-collage {
    width: 100%;
    height: 100%;
    display: grid;
    gap: 2px;
}

.image-collage.single {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.image-collage.double {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.image-collage.triple {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.image-collage.triple .item-1 {
    grid-row: span 2;
}

.image-collage.quad {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.collage-item {
    overflow: hidden;
    position: relative;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pass-card:hover .collage-item img {
    transform: scale(1.05);
}

/* Gradient overlay on images for better text contrast */
.pass-images-collage::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}

.pass-emoji {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.favorite-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    z-index: 3;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #EC4899;
}

.ai-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 3;
}

.pass-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pass-card-body .pass-description {
    flex: 1;
}

.pass-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.pass-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.pass-tag.difficulty-beginner {
    background: rgba(0, 217, 163, 0.15);
    color: var(--primary);
}

.pass-tag.difficulty-intermediate {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
}

.pass-tag.difficulty-advanced {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.pass-tag.age {
    background: rgba(99, 102, 241, 0.15);
    color: var(--secondary);
}

.pass-tag.copied-tag,
.tag.copied-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.copied-indicator {
    color: #059669;
    cursor: default;
}

.pass-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text);
    line-height: 1.3;
}

.pass-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.pass-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.pass-author .author-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.pass-author .author-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.pass-stats {
    display: flex;
    gap: 20px;
}

.pass-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pass-stat i {
    font-size: 1rem;
    color: var(--primary);
}

.pass-card-footer {
    padding: 16px 20px;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

.pass-card-footer .btn-primary {
    color: #fff !important;
}

.pass-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-sm {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.btn-icon-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Empty State Full */
.empty-state-full {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 20px;
}

.empty-illustration {
    font-size: 6rem;
    margin-bottom: 24px;
    animation: gentle-bounce 3s ease-in-out infinite;
}

.empty-state-full h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.empty-state-full p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Session Detail Modal */
.session-detail-modal {
    border-radius: 24px;
    overflow: hidden;
}

.modal-header-gradient {
    padding: 20px 24px;
    position: relative;
    min-height: 100px;
    overflow: hidden;
}

/* Modal image collage (background) */
.modal-images-collage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-images-collage .modal-emoji.fallback {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    z-index: 1;
}

.modal-image-collage {
    width: 100%;
    height: 100%;
    display: grid;
    gap: 2px;
}

.modal-image-collage.single {
    grid-template-columns: 1fr;
}

.modal-image-collage.double {
    grid-template-columns: 1fr 1fr;
}

.modal-image-collage.triple {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.modal-image-collage.triple .item-1 {
    grid-row: span 2;
}

.modal-image-collage.quad {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.modal-collage-item {
    overflow: hidden;
}

.modal-collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient overlay for readability */
.modal-images-collage::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.modal-emoji {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.modal-header-gradient .modal-title-section {
    flex: 1;
}

.modal-header-gradient .modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-gradient .ai-icon {
    color: rgba(255, 255, 255, 0.9);
}

.modal-meta-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 3;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Stats Bar */
.modal-stats-bar {
    display: flex;
    gap: 0;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
}

.modal-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-right: 2px solid var(--border);
}

.modal-stat:last-child {
    border-right: none;
}

.modal-stat i {
    font-size: 1.5rem;
    color: var(--primary);
}

.modal-stat-info {
    display: flex;
    flex-direction: column;
}

.modal-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.modal-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Detail Section */
.detail-section {
    margin-bottom: 28px;
}

.detail-section h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-section h4 i {
    color: var(--primary);
}

.session-description-text {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.equipment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.equipment-tag {
    padding: 8px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

/* Session Images Gallery (detail modal) */
.session-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.session-image-item {
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.session-image-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.session-image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* Session Images Edit Grid (edit modal) */
.session-images-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.session-image-edit-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    border: 2px solid var(--border);
}

.session-image-edit-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.session-image-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 38, 38, 0.85);
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.session-image-edit-item:hover .session-image-delete-btn {
    opacity: 1;
}

.session-image-delete-btn:hover {
    background: rgba(220, 38, 38, 1);
}

/* Quill Editor Overrides */
.quill-editor-container {
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    resize: vertical;
    overflow: hidden;
    min-height: 130px;
}

.quill-editor-container .ql-toolbar {
    border: none;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}

.quill-editor-container .ql-container {
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    flex: 1;
    overflow: auto;
    resize: vertical;
    min-height: 80px;
}

.quill-editor-container .ql-editor {
    min-height: 80px;
    padding: 12px;
}

.modal textarea.form-control {
    resize: vertical;
}

.quill-editor-container .ql-editor.ql-blank::before {
    color: var(--text-muted);
    font-style: normal;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-top: 2px solid var(--border);
    background: var(--bg);
}

.modal-footer-actions {
    display: flex;
    gap: 12px;
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
}

.loading-state .loading-spinner {
    margin: 0 auto 20px;
}

.loading-state p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Responsive Sessions */
@media (max-width: 1200px) {
    .sessions-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-content h1 {
        font-size: 1.5rem;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .sessions-stats-bar {
        grid-template-columns: 1fr;
    }

    .sessions-tabs {
        flex-direction: column;
    }

    .sessions-toolbar {
        padding: 12px;
    }

    .search-filter-row {
        flex-direction: column;
    }

    .sessions-toolbar .search-box {
        width: 100%;
        min-width: auto;
    }

    .filter-buttons {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .pass-grid {
        grid-template-columns: 1fr;
    }

    .modal-stats-bar {
        flex-direction: column;
    }

    .modal-stat {
        border-right: none;
        border-bottom: 2px solid var(--border);
    }

    .modal-stat:last-child {
        border-bottom: none;
    }

    .modal-footer {
        flex-direction: column;
        gap: 16px;
    }

    .modal-footer-actions {
        width: 100%;
        flex-direction: column;
    }

    .modal-footer-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Exercise Picker (Sessions Modal) ===== */
.picker-search {
    margin-bottom: 16px;
}

.picker-search input {
    padding-left: 40px;
}

.exercise-picker-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid var(--border);
    border-radius: 12px;
}

.picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.picker-item:last-child {
    border-bottom: none;
}

.picker-item:hover {
    background: var(--bg);
}

.picker-checkbox {
    flex-shrink: 0;
}

.picker-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.picker-info {
    flex: 1;
    min-width: 0;
}

.picker-info label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.picker-info strong {
    color: var(--text);
    font-weight: 600;
}

.picker-info small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.picker-meta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.picker-meta .tag {
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.picker-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.picker-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.picker-preview {
    padding: 12px 16px 12px 64px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.picker-preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 8px;
    object-fit: contain;
}

.picker-preview-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    white-space: pre-line;
}

.picker-preview-btn {
    padding: 2px 6px !important;
    font-size: 0.8rem !important;
}

/* Selected exercises list */
.selected-exercises-list {
    margin-top: 12px;
}

.selected-exercises-list .no-exercises {
    color: var(--text-muted);
    font-style: italic;
    padding: 16px;
    text-align: center;
    background: var(--bg);
    border-radius: 12px;
}

.selected-exercises {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-exercise-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 12px;
    border: 2px solid var(--border);
    cursor: grab;
    transition: box-shadow 0.2s, border-color 0.2s, opacity 0.2s;
}

.selected-exercise-item.dragging {
    opacity: 0.4;
    border-color: var(--primary);
}

.selected-exercise-item.drag-over {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 217, 163, 0.3);
}

.exercise-drag-handle {
    color: var(--text-muted);
    cursor: grab;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Reorder buttons (mobile-friendly alternative to drag) */
.exercise-reorder-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}
.btn-reorder {
    width: 28px;
    height: 20px;
    padding: 0;
    border: 1px solid var(--border-color);
    background: var(--surface);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
}
.btn-reorder:hover:not(:disabled) { background: var(--primary); color: white; border-color: var(--primary); }
.btn-reorder:disabled { opacity: 0.3; cursor: default; }
@media (min-width: 768px) {
    .exercise-reorder-btns { display: none; }
}

.selected-exercises-summary {
    font-size: 0.9rem;
}
.exercise-duration-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}
.exercise-duration-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.exercise-slider-group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
}
.exercise-duration-slider {
    width: 70px;
    height: 4px;
    accent-color: var(--primary);
    cursor: pointer;
}
.exercise-duration-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
    white-space: nowrap;
}

.exercise-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.exercise-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.exercise-title {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exercise-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.section-select {
    padding: 6px 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.duration-input {
    width: 60px;
    padding: 6px 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--text);
    text-align: center;
}

.remove-exercise-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-exercise-btn:hover {
    background: var(--danger);
    color: white;
}

/* AI Descriptions Section */
.ai-descriptions-section {
    background: var(--bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.ai-descriptions-section h4 {
    margin-bottom: 16px;
    color: var(--primary);
    font-weight: 700;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.section-label.warmup {
    background: rgba(0, 217, 163, 0.15);
    color: var(--primary);
}

.section-label.main {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.section-label.cooldown {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

/* Empty state for sessions */
.empty-state-full {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-illustration {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state-full h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state-full p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ===== Session Builder Offcanvas ===== */
#session-offcanvas {
    width: 380px;
    max-width: 100%;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

/* Push content when offcanvas is open (desktop only) */
@media (min-width: 769px) {
    body:has(#session-offcanvas.show) .card-grid,
    body:has(#session-offcanvas.show) .page-header,
    body:has(#session-offcanvas.show) .toolbar,
    body:has(#session-offcanvas.show) .filter-panel,
    body:has(#session-offcanvas.show) #pagination {
        margin-right: 380px;
        transition: margin-right 0.3s ease-in-out;
    }
}

/* Mobile: full-width offcanvas */
@media (max-width: 768px) {
    #session-offcanvas {
        width: 100% !important;
    }
}

.card-grid,
.page-header,
.toolbar,
.filter-panel,
#pagination {
    transition: margin-right 0.3s ease-in-out;
}

.session-offcanvas-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
}

.session-offcanvas-header .offcanvas-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.session-offcanvas-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.session-offcanvas-header .btn-close {
    filter: brightness(0) invert(1);
}

.session-offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.session-offcanvas-footer {
    padding: 16px 20px;
    border-top: 2px solid var(--border);
    background: var(--surface);
}

/* Session panel item in offcanvas */
#session-offcanvas .session-panel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    transition: background 0.2s;
}

#session-offcanvas .session-panel-item:hover {
    background: var(--bg);
}

/* Session counter badge */
.session-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--danger);
    color: white;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Exercises Tabs ===== */
.exercises-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--bg);
    border-radius: 12px;
    width: fit-content;
}

.exercise-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.exercise-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.5);
}

.exercise-tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.exercise-tab i {
    font-size: 16px;
}

.tab-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.tab-count:empty {
    display: none;
}

/* ===== Shared Page Container ===== */
.page-container,
.dashboard-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* ===== Dashboard (Home) ===== */

/* Hero Section */
.dashboard-hero {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-radius: 24px;
    margin-bottom: 32px;
}

.dashboard-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Bar */
.dashboard-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    transition: all 0.2s ease;
}

.dashboard-stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 217, 163, 0.15);
    transform: translateY(-2px);
}

.dashboard-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dashboard-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dashboard-stat-icon {
    font-size: 1.5rem;
}

.dashboard-stat-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

/* Section Titles */
.dashboard-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

/* Quick Actions Grid */
.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-actions-centered {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(2, 1fr);
}

.dashboard-action-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.dashboard-action-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(0, 217, 163, 0.15);
    transform: translateY(-4px);
}

.dashboard-action-icon {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-action-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.dashboard-action-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dashboard-action-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.dashboard-action-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.dashboard-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Dashboard Buttons */
.dashboard-btn-primary {
    background: var(--primary);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.3);
}

.dashboard-btn-secondary {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.3);
}

/* Activity Section */
.dashboard-activity-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
}

.dashboard-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-activity-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.dashboard-view-all {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.dashboard-view-all:hover {
    color: var(--primary-dark);
}

.dashboard-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.dashboard-activity-item:hover {
    background: rgba(0, 217, 163, 0.05);
}

.dashboard-activity-item-icon {
    width: 64px;
    height: 64px;
    background: var(--surface);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.dashboard-activity-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.dashboard-activity-item-content {
    flex: 1;
    min-width: 0;
}

.dashboard-activity-item-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.dashboard-activity-item-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.dashboard-activity-item-time {
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Guest CTA */
.dashboard-cta-content {
    text-align: center;
    padding: 32px;
}

.dashboard-cta-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.dashboard-cta-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.dashboard-cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.dashboard-cta-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Notification Modal */
.dashboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dashboard-modal.active {
    opacity: 1;
    visibility: visible;
}

.dashboard-modal-content {
    background: var(--surface);
    border-radius: 24px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.dashboard-modal.active .dashboard-modal-content {
    transform: scale(1) translateY(0);
}

.dashboard-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.dashboard-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.dashboard-modal-header p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
}

.dashboard-modal-body {
    margin-bottom: 28px;
}

.dashboard-notification-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-notification-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-notification-option:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.05);
}

.dashboard-notification-option.selected {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.1);
}

.dashboard-notification-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.dashboard-notification-option.selected .dashboard-notification-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.dashboard-notification-option.selected .dashboard-notification-checkbox::after {
    content: '✓';
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.dashboard-notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.dashboard-notification-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.dashboard-notification-info {
    flex: 1;
}

.dashboard-notification-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.dashboard-notification-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.dashboard-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.dashboard-btn-cancel {
    background: transparent;
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-btn-cancel:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.dashboard-btn-confirm {
    background: var(--primary);
    color: var(--text);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-btn-confirm:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.dashboard-btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dashboard Responsive */
@media (max-width: 768px) {
    .page-container,
    .dashboard-main {
        padding: 16px;
    }

    .dashboard-hero {
        padding: 32px 16px;
        margin-bottom: 24px;
    }

    .dashboard-hero-title {
        font-size: 1.75rem;
    }

    .dashboard-hero-subtitle {
        font-size: 1rem;
    }

    .dashboard-stats-bar {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 28px;
    }

    .dashboard-stat-card {
        padding: 16px 20px;
    }

    .dashboard-stat-value {
        font-size: 1.5rem;
    }

    .dashboard-actions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 28px;
    }

    .dashboard-actions-centered {
        max-width: 100%;
        grid-template-columns: 1fr;
    }

    .dashboard-action-card {
        padding: 20px;
    }

    .dashboard-action-icon {
        width: 80px;
        height: 80px;
    }

    .dashboard-activity-section {
        padding: 20px;
    }

    .dashboard-activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dashboard-modal-content {
        padding: 24px;
        margin: 16px;
    }

    .dashboard-modal-actions {
        flex-direction: column;
    }

    .dashboard-btn-cancel,
    .dashboard-btn-confirm {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard-hero {
        padding: 24px 12px;
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .dashboard-hero-title {
        font-size: 1.4rem;
    }

    .dashboard-hero-subtitle {
        font-size: 0.875rem;
    }

    .dashboard-section-title {
        font-size: 1.1rem;
    }

    .dashboard-action-card {
        padding: 16px;
        border-radius: 14px;
    }

    .dashboard-action-title {
        font-size: 1rem;
    }

    .dashboard-action-description {
        font-size: 0.8125rem;
    }

    .dashboard-stat-card {
        padding: 14px 16px;
    }

    .dashboard-stat-value {
        font-size: 1.25rem;
    }

    .dashboard-activity-section {
        padding: 16px;
        border-radius: 14px;
    }

    .dashboard-modal-content {
        padding: 20px;
        margin: 8px;
        border-radius: 16px;
    }
}

/* ===== Profile Page ===== */
.profile-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

/* Profile Sidebar */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

/* Profile Card */
.profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(0, 217, 163, 0.25);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.profile-avatar:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
    font-size: 1.5rem;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.profile-member-since {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
    margin-bottom: 0;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.profile-badge-admin {
    background: rgba(245, 158, 11, 0.15);
    color: #D97706;
}

.profile-badge-coach {
    background: rgba(0, 217, 163, 0.15);
    color: var(--primary-dark);
}

.profile-admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.profile-admin-link:hover {
    background: #D97706;
    color: white;
    transform: translateY(-2px);
}

/* Profile Stats Card */
.profile-stats-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.profile-stats-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.profile-stats-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-stats-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-stats-icon {
    font-size: 1.5rem;
}

.profile-stats-info {
    display: flex;
    flex-direction: column;
}

.profile-stats-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.profile-stats-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Profile Content */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Settings Card */
.profile-settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
}

.profile-settings-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 28px;
}

.profile-settings-title i {
    color: var(--text-muted);
}

.profile-settings-group {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.profile-settings-group:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.profile-settings-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

/* Language Selector */
.profile-language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.profile-language-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.profile-language-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.05);
}

.profile-language-btn.active {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 217, 163, 0.15);
}

.profile-language-flag {
    font-size: 1.5rem;
}

.profile-language-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

/* Form Elements */
.profile-form-group {
    margin-bottom: 20px;
}

.profile-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.profile-form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text);
    transition: all 0.2s ease;
}

.profile-form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 163, 0.15);
}

.profile-form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profile-form-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Profile Buttons */
.profile-btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn-save:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.3);
}

.profile-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Toggle Switches */
.profile-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
}

.profile-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-toggle-label {
    font-weight: 600;
    color: var(--text);
}

.profile-toggle-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.profile-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.profile-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.profile-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.profile-toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-toggle input:checked + .profile-toggle-slider {
    background: var(--primary);
}

.profile-toggle input:checked + .profile-toggle-slider::before {
    transform: translateX(24px);
}

/* Danger Zone */
.profile-danger-card {
    background: var(--surface);
    border: 2px solid var(--danger);
    border-radius: 20px;
    padding: 28px;
}

.profile-danger-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 12px;
}

.profile-danger-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.profile-danger-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn-logout:hover {
    border-color: var(--text-muted);
    background: var(--surface);
}

.profile-btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn-delete:hover {
    background: #DC2626;
    transform: translateY(-2px);
}

/* Profile Responsive */
@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        position: static;
    }

    .profile-card {
        padding: 24px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-avatar-text {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .profile-main {
        padding: 16px;
    }

    .profile-settings-card {
        padding: 20px;
    }

    .profile-danger-actions {
        flex-direction: column;
    }

    .profile-btn-logout,
    .profile-btn-delete {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Drawing Tool ===== */
.drawing-mobile-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 32px;
}

.drawing-mobile-notice-content {
    text-align: center;
    max-width: 360px;
}

.drawing-main {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    background: var(--bg);
}

/* Drawing Header */
.drawing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.drawing-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.drawing-back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.drawing-title-input {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    border: none;
    padding: 8px 0;
    min-width: 200px;
    font-family: inherit;
}

.drawing-title-input:focus {
    outline: none;
    border-bottom: 2px solid var(--primary);
}

.drawing-header-actions {
    display: flex;
    gap: 12px;
}

.drawing-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.drawing-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Drawing Workspace */
.drawing-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Drawing Sidebars */
.drawing-sidebar {
    width: 160px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawing-sidebar-right {
    border-right: none;
    border-left: 1px solid var(--border);
}

.drawing-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.drawing-tools-section {
    /* Section container */
}

/* Tool Buttons */
.drawing-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.drawing-tool-btn {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.125rem;
    color: var(--text-muted);
}

.drawing-tool-btn:hover {
    background: rgba(0, 217, 163, 0.1);
    color: var(--primary);
}

.drawing-tool-btn.active {
    background: rgba(0, 217, 163, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

/* Color Buttons */
.drawing-color-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.drawing-color-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-color-btn:hover {
    transform: scale(1.1);
}

.drawing-color-btn.active {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text);
}

/* Slider */
.drawing-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.drawing-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.drawing-slider-value {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Action Buttons */
.drawing-action-btns {
    display: flex;
    gap: 8px;
}

.drawing-action-btn {
    flex: 1;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.drawing-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}


/* Steps */
.drawing-steps-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.drawing-steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.drawing-steps-header .drawing-section-title {
    margin-bottom: 0;
}

.drawing-add-step-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-add-step-btn:hover {
    background: var(--primary-dark);
}

.drawing-steps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
}

.drawing-step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-step-item:hover {
    border-color: var(--border);
}

.drawing-step-item.active {
    background: rgba(0, 217, 163, 0.1);
    border-color: var(--primary);
}

.drawing-step-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.drawing-step-name {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    min-width: 0;
}

.drawing-step-name:focus {
    outline: none;
}

.drawing-step-delete {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0;
}

.drawing-step-item:hover .drawing-step-delete {
    opacity: 1;
}

.drawing-step-delete:hover {
    background: var(--danger);
    color: white;
}

/* Preview Button */
.drawing-preview-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-preview-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
}

.drawing-preview-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.drawing-preview-btn.playing {
    background: var(--danger);
}

/* Step Scrubber */
.drawing-steps-body {
    display: flex;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.drawing-steps-body .drawing-steps-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.drawing-step-scrubber {
    display: flex;
    align-items: stretch;
    padding: 4px 0;
}

.drawing-step-slider {
    writing-mode: vertical-lr;
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    width: 24px;
    height: 100%;
    min-height: 80px;
    background: transparent;
    cursor: pointer;
}

.drawing-step-slider::-webkit-slider-runnable-track {
    width: 4px;
    background: var(--border);
    border-radius: 2px;
}

.drawing-step-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--secondary);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: grab;
    margin-left: -7px;
}

.drawing-step-slider::-moz-range-track {
    width: 4px;
    background: var(--border);
    border-radius: 2px;
    border: none;
}

.drawing-step-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--secondary);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: grab;
}

/* Canvas Area */
.drawing-canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: auto;
    background: var(--bg);
    position: relative;
}
.drawing-zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px 8px;
}
.drawing-zoom-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}
.drawing-zoom-btn:hover {
    background: var(--bg);
    color: var(--text-primary);
}
.drawing-zoom-display {
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.drawing-canvas-wrapper {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

#drawing-canvas {
    display: block;
    border-radius: 8px;
    cursor: crosshair;
}

.drawing-zoom-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

/* Drawing Modals */
.drawing-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawing-modal.active {
    opacity: 1;
    visibility: visible;
}

.drawing-modal-content {
    background: var(--surface);
    border-radius: 20px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.drawing-modal.active .drawing-modal-content {
    transform: scale(1) translateY(0);
}

.drawing-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.drawing-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.drawing-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.drawing-modal-close:hover {
    background: var(--danger);
    color: white;
}

.drawing-modal-body {
    /* Modal body */
}

/* Link Options */
.drawing-link-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.drawing-link-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-link-option:hover {
    border-color: var(--primary);
}

.drawing-link-option.active {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.1);
}

.drawing-link-option i {
    font-size: 1.5rem;
    color: var(--primary);
}

.drawing-link-option span {
    font-weight: 600;
    color: var(--text);
}

.drawing-link-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Export Options */
.drawing-export-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawing-export-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.drawing-export-option:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.05);
}

.drawing-export-option i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.drawing-export-option span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.drawing-export-option small {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* Exercise Link Display in Header */
.drawing-exercise-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 217, 163, 0.15);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.drawing-exercise-link i {
    font-size: 1rem;
}

/* Belongs-to Tag (when coming from an exercise) */
.drawing-belongs-to-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    color: var(--secondary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.drawing-belongs-to-tag .belongs-to-title {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawing-link-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-link-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 217, 163, 0.05);
}

.drawing-link-btn i {
    font-size: 1rem;
}

/* Link Exercise Modal Styles */
.drawing-modal-lg {
    max-width: 600px;
}

.drawing-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.drawing-search-box i {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.drawing-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.9375rem;
    color: var(--text);
}

.drawing-search-box input::placeholder {
    color: var(--text-muted);
}

.drawing-exercise-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawing-exercise-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-exercise-item:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.05);
}

.drawing-exercise-item.selected {
    border-color: var(--primary);
    background: rgba(0, 217, 163, 0.1);
}

.drawing-exercise-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawing-exercise-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.drawing-exercise-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.drawing-exercise-check {
    color: var(--primary);
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drawing-exercise-item.selected .drawing-exercise-check {
    opacity: 1;
}

.drawing-loading,
.drawing-empty,
.drawing-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
}

.drawing-error {
    color: var(--danger);
}

/* Drawing Responsive */
@media (max-width: 1024px) {
    .drawing-sidebar {
        width: 150px;
        padding: 12px;
    }

    .drawing-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .drawing-figures-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .drawing-main {
        height: auto;
        min-height: 100vh;
    }

    .drawing-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .drawing-header-left {
        width: 100%;
    }

    .drawing-title-input {
        flex: 1;
    }

    .drawing-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .drawing-workspace {
        flex-direction: column;
    }

    .drawing-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .drawing-sidebar-right {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .drawing-tools-section {
        flex: 1;
        min-width: 150px;
    }

    .drawing-steps-section {
        width: 100%;
    }

    .drawing-canvas-container {
        padding: 16px;
    }

    .drawing-canvas-wrapper {
        padding: 12px;
    }
}

/* Drawing Header Center - Court Toggle */
.drawing-header-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawing-court-toggle {
    display: flex;
    background: var(--bg);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.drawing-court-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawing-court-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

.drawing-court-btn:hover {
    color: var(--text);
}

.drawing-court-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Drawing Icon Buttons (Undo/Redo) */
.drawing-btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    font-size: 1rem;
}

.drawing-btn-icon:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.drawing-btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Figures List - Vertical Layout with Icons */
.drawing-figures-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawing-figure-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    background: var(--bg);
    border: 1.5px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.drawing-figure-btn:hover {
    background: rgba(0, 217, 163, 0.08);
    border-color: var(--primary);
}

.drawing-figure-btn .drawing-figure-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    max-width: 26px;
    min-height: 26px;
    max-height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    color: white;
    overflow: hidden;
}

.drawing-figure-btn .drawing-figure-img {
    width: 26px;
    height: 26px;
    max-width: 26px;
    max-height: 26px;
    object-fit: contain;
}

.drawing-figure-btn .drawing-figure-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}


/* Playback Controls */
.drawing-playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.drawing-playback-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.drawing-playback-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.drawing-playback-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.drawing-playback-btn.play-pause {
    width: 44px;
    height: 44px;
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    border-radius: 50%;
}

.drawing-playback-btn.play-pause:hover:not(:disabled) {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    transform: scale(1.05);
}

.drawing-step-indicator {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    min-width: 60px;
    text-align: center;
}

/* ===== Season Planning ===== */
.season-planning-view { max-width: 1200px; margin: 0 auto; }

.season-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 20px;
}

.season-plan-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}
.season-plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--primary);
}
.season-plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 0;
}
.season-plan-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), #00B389);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem;
}
.season-plan-card-body {
    padding: 12px 20px 20px;
}
.season-plan-card-body h3 {
    font-size: 1.1rem; font-weight: 700; margin: 0 0 4px;
}
.season-plan-meta {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px;
    font-size: 0.8rem; color: var(--text-muted);
}
.season-plan-meta i { margin-right: 4px; }

/* Season Detail */
.season-detail-header {
    display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.season-detail-info h2 { margin: 0; font-size: 1.4rem; }

/* Timeline */
.season-timeline {
    display: flex; flex-direction: column; gap: 24px; margin-bottom: 24px;
}
.season-month-group { }
.season-month-label {
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.05em;
}
.season-month-weeks {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.season-week-card {
    background: white; border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 14px; min-width: 120px; cursor: pointer;
    transition: all 0.2s ease; position: relative;
}
.season-week-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.season-week-card.active {
    box-shadow: 0 4px 16px rgba(0,217,163,0.15);
    border-color: var(--primary);
}
.season-week-header {
    display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.season-week-number {
    font-size: 0.8rem; font-weight: 700; color: var(--text);
}
.season-week-meta {
    display: flex; align-items: center; gap: 6px; font-size: 0.7rem;
}
.season-week-sessions-count {
    font-size: 0.7rem; color: var(--primary); margin-top: 4px; font-weight: 600;
}
.season-week-sessions-preview {
    margin-top: 6px; display: flex; flex-direction: column; gap: 4px;
    border-top: 1px solid var(--border); padding-top: 6px;
}
.week-session-preview-item {
    display: flex; align-items: flex-start; gap: 6px; font-size: 0.72rem;
}
.week-session-day-abbr {
    font-weight: 700; color: var(--primary-dark); min-width: 18px; text-align: center;
    padding-top: 1px;
}
.week-session-day-entries {
    display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0;
}
.week-session-entry {
    display: flex; flex-direction: column; gap: 1px;
}
.week-session-entry-header {
    display: flex; align-items: center; gap: 4px;
}
.week-session-emoji {
    font-size: 0.8rem; line-height: 1;
}
.week-session-title {
    font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.week-session-entry-details {
    display: flex; align-items: center; gap: 6px; padding-left: 18px;
}
.week-session-meta {
    font-size: 0.62rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 3px;
}
.week-session-meta i { font-size: 0.58rem; }

/* Copy Week Modal */
.copy-week-target-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px;
    cursor: pointer; transition: all 0.15s;
}
.copy-week-target-item:hover { background: var(--bg); border-color: var(--primary); }
.copy-week-target-item:has(input:checked) { background: rgba(0, 217, 163, 0.06); border-color: var(--primary); }
.copy-week-target-item input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }
.copy-week-target-info {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1;
}
.copy-week-target-info strong { font-size: 0.85rem; }
.phase-badge-sm { font-size: 0.6rem !important; padding: 1px 6px !important; }

/* AI Preview Table */
.ai-preview-table { font-size: 0.85rem; }
.ai-preview-table th { font-weight: 600; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.ai-preview-table td { vertical-align: middle; }
.intensity-bar-sm { width: 60px; height: 6px; }

/* Phase Badge */
.phase-badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 0.65rem; font-weight: 600; color: white;
    text-transform: uppercase; letter-spacing: 0.03em;
}

/* Intensity Bar */
.intensity-bar {
    flex: 1; height: 4px; background: var(--border); border-radius: 2px;
    overflow: hidden; min-width: 40px;
}
.intensity-fill {
    height: 100%; border-radius: 2px; transition: width 0.3s ease;
}
.intensity-label {
    font-size: 0.65rem; font-weight: 600; color: var(--text-muted); min-width: 28px;
}

/* Week Detail Panel */
.week-detail-card {
    background: white; border: 1px solid var(--border); border-radius: 16px;
    padding: 24px;
}
.week-detail-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.week-detail-header h4 { margin: 0; font-size: 1.1rem; }

/* Day rows */
.week-days { display: flex; flex-direction: column; gap: 8px; }
.season-day-row {
    display: flex; align-items: flex-start; gap: 12px; padding: 8px 0;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
}
.season-day-row:last-child { border-bottom: none; }
.day-label {
    min-width: 80px; font-weight: 600; font-size: 0.85rem; padding-top: 4px;
}
.day-sessions {
    display: flex; flex-wrap: wrap; gap: 6px; flex: 1;
}

/* Planned Session Chip (timeline preview) */
.planned-session-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-lighter, #E6FBF5); border: 1px solid var(--primary);
    border-radius: 8px; padding: 4px 10px; font-size: 0.8rem; font-weight: 500;
}
.planned-session-chip i { color: var(--primary); }

/* Planned Session Detail Card (week modal) */
.planned-session-detail {
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 12px; margin-bottom: 6px; transition: border-color 0.15s;
}
.planned-session-detail:hover { border-color: var(--primary); }
.planned-session-detail-main {
    display: flex; align-items: flex-start; gap: 10px;
}
.planned-session-emoji {
    font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: 2px;
}
.planned-session-detail-info {
    flex: 1; min-width: 0;
}
.planned-session-detail-info strong {
    font-size: 0.85rem; display: block; margin-bottom: 3px;
}
.planned-session-detail-meta {
    display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.72rem; color: var(--text-secondary);
}
.planned-session-detail-meta span {
    display: inline-flex; align-items: center; gap: 3px;
}
.planned-session-detail-meta i { font-size: 0.7rem; }
.planned-session-time {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.75rem; color: var(--primary); font-weight: 500;
    background: rgba(0, 217, 163, 0.08); padding: 1px 7px; border-radius: 10px;
    white-space: nowrap;
}
.planned-session-time i { font-size: 0.7rem; }
.week-session-time {
    font-size: 0.62rem; color: var(--primary); font-weight: 500;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 2px;
}
.btn-remove-session {
    background: none; border: none; cursor: pointer; padding: 2px 4px;
    color: var(--text-muted); font-size: 0.85rem; line-height: 1; flex-shrink: 0;
    border-radius: 4px; transition: all 0.15s;
}
.btn-remove-session:hover { color: var(--danger, #EF4444); background: rgba(239, 68, 68, 0.08); }

/* Session Picker */
.session-picker-list {
    max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
}
.session-picker-item {
    display: flex; align-items: flex-start; gap: 10px; padding: 0;
    cursor: pointer;
}
.session-picker-item input[type="radio"] {
    margin-top: 18px; margin-left: 12px; flex-shrink: 0;
}
.session-picker-item:has(input:checked) .session-picker-card {
    border-color: var(--primary); background: rgba(0, 217, 163, 0.04); box-shadow: 0 0 0 2px rgba(0, 217, 163, 0.2);
}
.session-picker-card {
    display: flex; flex-direction: column; gap: 8px; cursor: pointer; flex: 1;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    transition: all 0.15s ease;
}
.session-picker-card:hover { border-color: var(--primary-dark); background: var(--bg); }
.session-picker-card-header {
    display: flex; align-items: flex-start; gap: 10px;
}
.session-picker-emoji {
    font-size: 1.6rem; line-height: 1; flex-shrink: 0;
}
.session-picker-card-title {
    flex: 1; min-width: 0;
}
.session-picker-card-title strong {
    font-size: 0.9rem; display: block; margin-bottom: 2px;
}
.session-picker-card-title small {
    font-size: 0.78rem; line-height: 1.3;
}
.session-picker-card-meta {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.session-picker-card-meta .badge {
    font-size: 0.72rem; font-weight: 500; padding: 3px 7px;
}

.btn-edit-week {
    padding: 2px 6px; font-size: 0.7rem; margin-left: auto;
}

/* ===== Global Search ===== */
#global-search-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: var(--text-muted);
}
#global-search-btn:hover {
    background: rgba(0, 217, 163, 0.1);
    color: var(--primary);
}
.search-result-item {
    border-radius: 8px;
    transition: background 0.15s ease;
    cursor: pointer;
}
.search-result-item:hover {
    background: rgba(0, 217, 163, 0.08);
}

/* ===== Notification System ===== */
#notification-bell-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

#notification-bell-btn:hover {
    background: rgba(0, 217, 163, 0.1);
    color: var(--primary);
}

#notification-badge {
    font-size: 0.65rem;
    min-width: 18px;
    padding: 2px 5px;
    line-height: 1.2;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.notification-header h6 {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.notification-header .btn-link {
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.notification-header .btn-link:hover {
    color: var(--primary-dark);
}

.notification-list {
    overflow-y: auto;
    max-height: 400px;
    flex: 1;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.notification-empty p {
    font-size: 0.85rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(0, 217, 163, 0.04);
}

.notification-item.unread {
    background: rgba(0, 217, 163, 0.06);
    border-left: 3px solid var(--primary);
}

.notification-item.unread:hover {
    background: rgba(0, 217, 163, 0.1);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.notification-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    overflow: hidden;
    position: relative;
}

.notification-type-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    border: 2px solid var(--bg);
}

.notification-club {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 1px;
}

.notification-icon.icon-comment {
    background: rgba(99, 102, 241, 0.1);
    color: var(--secondary);
}

.notification-icon.icon-save {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

.notification-icon.icon-copy {
    background: rgba(0, 217, 163, 0.1);
    color: var(--primary);
}

.notification-icon.icon-session {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.notification-icon.icon-like {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.notification-icon.icon-chat {
    background: rgba(0, 217, 163, 0.1);
    color: var(--primary);
}

.notification-icon.icon-default {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-actor {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.notification-message {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

.notification-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    font-size: 1rem;
}

.notification-item:hover .notification-dismiss {
    opacity: 1;
}

.notification-dismiss:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Notification Toast */
.notification-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
    pointer-events: auto;
    max-width: 360px;
}

.notification-toast.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.notification-toast .notification-message {
    font-size: 0.85rem;
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .notification-dropdown {
        position: fixed;
        top: 60px;
        left: 16px;
        right: 16px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
}

/* ===============================================
   Like Button
   =============================================== */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.like-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.like-btn.liked {
    color: var(--danger);
}

.like-btn.liked i {
    color: var(--danger);
}

.like-btn i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.like-btn:hover i {
    transform: scale(1.15);
}

.like-btn .like-count {
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    min-width: 20px;
    height: 20px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    line-height: 1;
}

.like-btn .like-count:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.1);
}

.like-btn.liked .like-count {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.like-btn.liked .like-count:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* Pulse animation on like */
.like-btn.like-pulse i {
    animation: likePulse 0.4s ease;
}

@keyframes likePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ===============================================
   Likes Modal (Bootstrap modal content styles)
   =============================================== */
.likes-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.likes-modal-item:last-child {
    border-bottom: none;
}

.likes-modal-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.likes-modal-name {
    font-weight: 600;
    font-size: 14px;
}

.likes-modal-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Admin: Online Users ===== */
.online-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.online-user-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 217, 163, 0.15);
}

.online-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
}

.online-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--surface);
}

.online-user-info {
    flex: 1;
    min-width: 0;
}

.online-user-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-user-email {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Chat (Redesigned) ===== */
.admin-chat-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 220px);
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

@media (min-width: 1024px) {
    .admin-chat-container {
        grid-template-columns: 380px 1fr;
    }
}

/* --- Sidebar --- */
.chat-sidebar {
    background: white;
    border-right: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-sidebar-header {
    padding: 16px;
    border-bottom: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-sidebar-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-sidebar-title span {
    font-size: 20px;
    font-weight: 800;
}

.chat-new-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.25);
}

.chat-new-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 217, 163, 0.35);
}

.chat-search-box {
    position: relative;
}

.chat-search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.chat-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 217, 163, 0.1);
}

.chat-search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

/* Search panel (user search for new chat) */
.chat-search-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
}

.chat-search-input-wrap i {
    color: var(--text-muted);
    font-size: 14px;
}

.chat-search-input-wrap input {
    flex: 1;
    border: 2px solid var(--border);
    outline: none;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.chat-search-input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 217, 163, 0.1);
}

.chat-search-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
}

.chat-search-close:hover {
    color: var(--text);
}

.chat-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    margin-bottom: 4px;
}

.chat-search-item:hover {
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.06), rgba(99, 102, 241, 0.04));
    transform: translateX(4px);
}

/* Filter buttons */
.chat-filters {
    display: flex;
    gap: 6px;
    padding: 12px 16px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chat-filter-btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.chat-filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
}

.chat-filter-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

/* Conversation list */
.chat-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    margin-bottom: 4px;
    position: relative;
}

.chat-conv-item:hover {
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.06), rgba(99, 102, 241, 0.04));
    transform: translateX(4px);
}

.chat-conv-item.active {
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.12), rgba(99, 102, 241, 0.08));
}

.chat-conv-item.unread {
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.08), rgba(99, 102, 241, 0.06));
}

.chat-conv-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
}

.chat-conv-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.chat-conv-avatar .online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success, #10B981);
    border: 2px solid white;
    border-radius: 50%;
}

.chat-conv-info {
    flex: 1;
    min-width: 0;
}

.chat-conv-name {
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-conv-last-msg {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conv-item.unread .chat-conv-last-msg {
    color: var(--text);
    font-weight: 800;
}

.chat-conv-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.chat-conv-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
}

.chat-conv-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* --- Main chat area --- */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.chat-back-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    line-height: 1;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-avatar.online::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    background: var(--success, #10B981);
    border: 2px solid white;
    border-radius: 50%;
}

.chat-header-text h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 2px 0;
}

.chat-header-status {
    font-size: 12px;
    color: var(--success, #10B981);
    font-weight: 700;
}

.chat-header-status:empty {
    display: none;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.chat-header-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-header-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.02), rgba(99, 102, 241, 0.01));
}

@keyframes chatMessageSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    max-width: 75%;
    animation: chatMessageSlide 0.3s ease;
}

.chat-msg-row.sent {
    align-self: flex-end;
}

.chat-msg-row.received {
    align-self: flex-start;
}

.chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-msg-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.chat-msg-avatar.invisible {
    visibility: hidden;
}

.chat-msg-content {
    display: flex;
    flex-direction: column;
}

.chat-msg-row.sent .chat-msg-content {
    align-items: flex-end;
}

.chat-msg-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg-row.sent .chat-msg-bubble {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-top-right-radius: 4px;
}

.chat-msg-row.received .chat-msg-bubble {
    background: #fff;
    color: var(--text);
    border: 2px solid var(--border);
    border-top-left-radius: 4px;
}

.chat-msg-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-msg-row.sent .chat-msg-time {
    text-align: right;
}

/* Typing indicator */
.chat-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px;
    border-top-left-radius: 4px;
    width: fit-content;
    margin-bottom: 16px;
}

.chat-typing-dots {
    display: flex;
    gap: 4px;
}

.chat-typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: chatTypingBounce 1.4s infinite;
}

.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatTypingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Input area */
.chat-input-area {
    padding: 16px 20px;
    border-top: 2px solid var(--border);
    background: white;
}

.chat-quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chat-quick-action-btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.chat-input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 217, 163, 0.1);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.25);
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 217, 163, 0.35);
}

/* Empty state */
.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.chat-empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.chat-empty-state .empty-text {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.chat-empty-state .empty-subtext {
    font-size: 14px;
    font-weight: 600;
}

.chat-unread-badge {
    background: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
}

/* --- Mobile responsive --- */
@media (max-width: 768px) {
    .admin-chat-container {
        display: grid;
        grid-template-columns: 1fr;
        position: relative;
        height: calc(100vh - 180px);
        height: calc(100dvh - 180px);
    }
    .chat-sidebar {
        width: 100%;
        border-right: none;
        height: 100%;
        overflow-y: auto;
    }
    .chat-main {
        display: none;
        position: absolute;
        inset: 0;
        z-index: 10;
        background: #fff;
        flex-direction: column;
        overflow: hidden;
    }
    .admin-chat-container.chat-open .chat-sidebar {
        display: none;
    }
    .admin-chat-container.chat-open .chat-main {
        display: flex;
        min-height: 0;
    }
    .chat-back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .chat-conv-avatar {
        width: 40px;
        height: 40px;
    }
    .chat-sidebar-header {
        padding: 12px;
    }
    .chat-filters {
        padding: 8px 12px 0;
    }
    .chat-header {
        padding: 12px 16px;
        flex-shrink: 0;
        z-index: 5;
        background: #fff;
        border-bottom: 2px solid var(--border);
    }
    .chat-messages {
        padding: 16px;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }
    .chat-input-area {
        padding: 12px 16px;
        flex-shrink: 0;
    }

    /* Fullscreen chat on mobile */
    body.chat-active footer {
        display: none !important;
    }
    body.chat-active #app {
        padding: 0 !important;
        overflow: hidden;
    }
    body.chat-active .admin-chat-container {
        height: calc(100vh - 56px);
        height: calc(100dvh - 56px);
    }
    body.chat-active .container-fluid {
        padding: 0;
        max-width: 100% !important;
    }

    /* Fix iOS auto-zoom on input focus (requires font-size >= 16px) */
    .chat-search-box input,
    .chat-search-input-wrap input,
    .chat-input-wrapper input {
        font-size: 16px !important;
    }
}

/* ========================================
   PLANNING PRO
   ======================================== */

/* Season banner */
.pp-season-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.pp-season-banner-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.pp-season-banner-info > div:last-child {
    min-width: 0;
}
.pp-season-banner-info h5 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pp-season-banner-info .text-muted {
    font-size: 0.85rem;
}
.pp-season-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00D9A3, #00B386);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.pp-season-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
@media (max-width: 767px) {
    .pp-season-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }
    .pp-season-banner-actions {
        width: 100%;
    }
    .pp-season-banner-actions .btn {
        flex: 1;
    }
}

/* View toggle */
.pp-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 768px) {
    .pp-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.pp-view-toggle {
    display: flex;
    gap: 6px;
    background: white;
    padding: 4px;
    border-radius: 14px;
    border: 2px solid var(--border-color);
    width: 100%;
    overflow-x: auto;
}
@media (min-width: 768px) {
    .pp-view-toggle {
        gap: 8px;
        padding: 6px;
        width: fit-content;
    }
}
.pp-view-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}
@media (min-width: 768px) {
    .pp-view-btn {
        padding: 10px 20px;
        font-size: 14px;
        flex: initial;
        gap: 6px;
    }
}
.pp-view-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.3);
}

/* Stats */
.pp-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 640px) {
    .pp-stats-row { grid-template-columns: repeat(4, 1fr); }
}
.pp-stat-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
}
@media (min-width: 768px) {
    .pp-stat-card {
        padding: 20px;
        border-radius: 18px;
    }
    .pp-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 40px rgba(0, 217, 163, 0.12);
    }
}
.pp-stat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.pp-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .pp-stat-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
}
.pp-stat-icon.green { background: linear-gradient(135deg, rgba(0, 217, 163, 0.15), rgba(0, 217, 163, 0.08)); }
.pp-stat-icon.purple { background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.08)); }
.pp-stat-icon.orange { background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08)); }
.pp-stat-icon.red { background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08)); }
.pp-stat-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
@media (min-width: 768px) { .pp-stat-label { font-size: 13px; } }
.pp-stat-value {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@media (min-width: 768px) { .pp-stat-value { font-size: 32px; } }

/* Quick actions */
.pp-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Layout */
.pp-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@media (min-width: 1024px) {
    .pp-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
.pp-main-area { min-width: 0; }
.pp-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
@media (min-width: 768px) {
    .pp-card { padding: 24px; border-radius: 18px; }
}

/* Sidebar */
.pp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (min-width: 768px) { .pp-sidebar { gap: 16px; } }
@media (min-width: 1024px) {
    .pp-sidebar { max-height: calc(100vh - 180px); overflow-y: auto; }
}
.pp-sidebar-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
.pp-sidebar-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}
.pp-sidebar-title {
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pp-favorites-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(245, 158, 11, 0.15);
    padding: 4px 8px;
    border-radius: 12px;
}
.pp-empty-favorites {
    text-align: center;
    padding: 16px 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

/* Exercise list */
.pp-exercise-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}
.pp-exercise-item {
    padding: 10px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-exercise-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.15);
}
.pp-exercise-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.pp-exercise-info { flex: 1; min-width: 0; }
.pp-exercise-name {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pp-exercise-meta { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.pp-fav-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.pp-fav-btn:hover { background: rgba(245, 158, 11, 0.1); transform: scale(1.1); }
.pp-fav-btn.active { color: var(--warning); }

/* Schedule builder */
.pp-schedule-day {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 6px;
}
.pp-schedule-check {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}
.pp-schedule-day-name {
    font-weight: 800;
    font-size: 12px;
    flex: 1;
    min-width: 0;
}
.pp-schedule-time,
.pp-schedule-end-time {
    padding: 4px 6px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    width: 65px;
    flex-shrink: 0;
}
.pp-schedule-separator {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Calendar header */
.pp-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.pp-cal-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}
.pp-cal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.pp-cal-nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}
.pp-cal-month {
    font-size: 16px;
    font-weight: 800;
    min-width: 140px;
    text-align: center;
}
@media (min-width: 768px) { .pp-cal-month { font-size: 20px; min-width: 180px; } }

/* Calendar grid */
.pp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
@media (min-width: 768px) { .pp-cal-grid { gap: 8px; } }
.pp-cal-day-header {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 6px 2px;
    letter-spacing: 0.3px;
}
@media (min-width: 768px) { .pp-cal-day-header { font-size: 11px; padding: 8px; } }

/* Calendar day cells */
.pp-cal-day {
    min-height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .pp-cal-day {
        min-height: 100px;
        border-radius: 12px;
        padding: 8px;
    }
    .pp-cal-day:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 217, 163, 0.15);
    }
}
.pp-cal-day.other-month { opacity: 0.3; pointer-events: none; }
.pp-cal-day.today {
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.08), rgba(99, 102, 241, 0.06));
    border-color: var(--primary);
}
.pp-cal-day.has-session {
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.12), rgba(99, 102, 241, 0.08));
    border-color: var(--primary);
}
.pp-cal-day.has-match {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
    border-color: var(--danger);
}
.pp-cal-day.has-note {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
    border-color: #f59e0b;
}
.pp-day-num {
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 2px;
}
@media (min-width: 768px) { .pp-day-num { font-size: 14px; margin-bottom: 4px; } }
.pp-day-sessions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.pp-day-badge {
    font-size: 7px;
    font-weight: 900;
    padding: 2px 4px;
    border-radius: 4px;
    color: white;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 768px) { .pp-day-badge { font-size: 9px; padding: 3px 6px; border-radius: 6px; } }
.pp-day-badge.session {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.pp-day-badge.match {
    background: linear-gradient(135deg, var(--danger), #DC2626);
}
.pp-day-badge.note {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Week view grid */
.pp-week-grid {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    gap: 4px;
}
@media (min-width: 768px) {
    .pp-week-grid { grid-template-columns: 60px repeat(7, 1fr); gap: 6px; }
}
.pp-week-header-empty { }
.pp-week-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    padding: 8px 4px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.08), rgba(99, 102, 241, 0.06));
    border-radius: 8px;
}
.pp-week-day-header.today {
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.2), rgba(99, 102, 241, 0.15));
    border: 2px solid var(--primary);
}
.pp-week-day-num {
    font-size: 16px;
    font-weight: 900;
    display: block;
}
.pp-week-time-label {
    text-align: right;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 8px 4px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}
@media (min-width: 768px) { .pp-week-time-label { font-size: 11px; } }
.pp-week-cell {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    min-height: 45px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pp-week-cell:hover {
    border-color: var(--primary);
    border-style: solid;
    background: rgba(0, 217, 163, 0.04);
}
.pp-week-event {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 5px;
    border-radius: 5px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 768px) { .pp-week-event { font-size: 10px; padding: 4px 6px; } }
.pp-week-event.session {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.pp-week-event.match {
    background: linear-gradient(135deg, var(--danger), #DC2626);
}
.pp-week-event.note {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Season view */
.pp-season-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-season-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 640px) {
    .pp-season-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
.pp-season-phase {
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    background: white;
    transition: all 0.2s ease;
}
.pp-season-phase:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 217, 163, 0.12);
}
.pp-season-phase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.pp-season-phase-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.12), rgba(99, 102, 241, 0.08));
    flex-shrink: 0;
}
.pp-season-phase-name { font-size: 16px; font-weight: 800; }
.pp-season-phase-period { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.pp-season-progress {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.pp-season-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}
.pp-season-phase-desc {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.pp-season-phase-stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}
.pp-season-phase-stats i {
    margin-right: 4px;
}
