:root {
    --primary: #00f2fe;
    --primary-rgb: 0, 242, 254;
    --primary-dark: #0284a8;
    /* Darker shade for text on light backgrounds */
    --secondary: #4facfe;
    --bg: #f3f3f3;
    --bg-image: #f3f3f3;
    /* Matches muscle map background */
    --card-bg: rgba(255, 255, 255, 1);
    /* Light glass */
    --text: #1e293b;
    /* Dark text for light mode */
    --text-muted: #64748b;
    --accent: #fbbf24;
    --warning: #f59e0b;
    --danger: #ef4444;
    --success: #22c55e;
    --success-rgb: 34, 197, 94;
    --glass: rgba(15, 23, 42, 0.05);
    --glass-border: rgba(15, 23, 42, 0.1);

    /* Unified Input Tokens */
    --input-bg: rgba(255, 255, 255, 0.95);
    --input-border: rgba(0, 0, 0, 0.08);
    --input-padding: 1rem 1.25rem;
    --input-radius: 1rem;

    /* Theme-aware UI Tokens */
    --ui-border-low: rgba(0, 0, 0, 0.05);
    --ui-bg-low: rgba(0, 0, 0, 0.03);
    --ui-text-mid: rgba(0, 0, 0, 0.6);
    --primary-tag-text: #0369a1; /* High contrast cyan for light mode */
    --success-tag-text: #166534; /* High contrast green for light mode */
}

.user-name-display {
    transition: all 0.3s ease;
    word-break: break-all;
}

.hidden {
    display: none !important;
}

/* Global Loader / Splash Screen */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#global-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 320px;
    max-width: 450px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    transition: all 0.3s ease;
}

.toast.removing {
    animation: toastFadeOut 0.3s ease forwards;
}

.toast i {
    font-size: 1.25rem;
}

.toast-success i {
    color: #10b981;
}

.toast-error i {
    color: #ef4444;
}

.toast-info i {
    color: var(--primary);
}

.toast-content {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

@keyframes toastSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastFadeOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Global Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    background-clip: content-box;
}

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

/* Hero Focus Layout */
.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1rem;
    /* Reduced gap */
    animation: fadeIn 0.5s ease;
    max-height: calc(100vh - 4rem);
    /* Fit in screen */
}

.hero-controls {
    width: 100%;
    max-width: 900px;
    z-index: 5;
    padding: 1.5rem !important;
    /* Compact */
}

.hero-map-section {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    /* Allow shrinking */
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    /* padding: 2.5rem; */
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.17);
}

h1,
h2,
h3 {
    margin-bottom: 1rem;
    /* Reduced margin */
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    padding: 0.75rem 1.5rem;
    /* Compact */
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    /* Slightly smaller */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    box-shadow: 0 4px 14px 0 rgba(0, 242, 254, 0.2);
}

@media (hover: hover) {
    .btn-primary:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
    }
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

@media (hover: hover) {
    .btn-ghost:hover {
        background: var(--glass);
        color: var(--primary);
        border-color: var(--primary);
    }
}

/* Sidebar Navigation */
.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* Compact */
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    /* Compact */
    border-radius: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

@media (hover: hover) {
    .nav-link:hover {
        background: var(--glass);
        color: var(--primary);
        transform: translateX(5px);
    }
}

.nav-link.active {
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    border-color: rgba(0, 242, 254, 0.2);
}

.nav-link.danger {
    color: var(--danger);
}

@media (hover: hover) {
    .nav-link.danger:hover {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.2);
    }
}

.input-group {
    margin-bottom: 1rem;
    /* Compact */
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    /* Compact */
    color: var(--text-muted);
    font-size: 0.7rem;
    /* Smaller */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.select-trigger,
.searchable-select .select-trigger {
    width: 100%;
    padding: var(--input-padding);
    border-radius: var(--input-radius);
    border: 1px solid var(--input-border) !important;
    background: var(--input-bg) !important;
    color: var(--text) !important;
    outline: none;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-height: 3.5rem;
    display: flex;
    align-items: center;
}

.select-trigger span,
.searchable-select .select-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 0.5rem;
}

textarea {
    min-height: 100px;
    resize: none;
    align-items: flex-start;
}

input:focus,
textarea:focus,
.custom-select.open .select-trigger,
.searchable-select.open .select-trigger {
    border-color: var(--primary) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Modern Top Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4.5rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 2.5rem;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
}

.nav-tab {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.25rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-tab:hover,
.nav-tab.active {
    color: var(--primary);
    background: rgba(0, 242, 254, 0.06);
}

/* Studio Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 90px 1fr 420px;
    /* Tool Rail | Map | Command Panel */
    height: 100vh;
    width: 100vw;
    background: #f3f3f3;
    /* Uniform background */
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

/* Tool Rail (Left) */
.tool-rail {
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 0;
    z-index: 100;
}

.nav-brand-icon-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.nav-brand-icon {
    width: 48px;
    height: 48px;
    background: var(--text);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: var(--primary);
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-brand-icon:hover {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary);
    color: white;
    box-shadow: 0 15px 30px rgba(0, 242, 254, 0.3);
}

.brand-menu-dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 200px;
    padding: 0.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-menu-dropdown.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

.brand-menu-dropdown::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.brand-menu-dropdown .dropdown-item {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.brand-menu-dropdown .dropdown-item i {
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
}

.brand-menu-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(3px);
}

.brand-menu-dropdown .dropdown-item.danger {
    color: #f87171;
    margin-top: 0.25rem;
}

.brand-menu-dropdown .dropdown-item.danger:hover {
    background: rgba(248, 113, 113, 0.1);
}

.tool-item {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    font-size: 1.25rem;
}

@media (hover: hover) {
    .tool-item:hover {
        color: var(--text);
        transform: scale(1.1);
    }
}

.tool-item.active {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
    transform: scale(1.1);
}

/* Map Area (Center) */
.map-canvas-area {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f3f3f3;
}

.center-data-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 3.5rem;
    overflow-y: auto;
    z-index: 5;
    background: #f3f3f3;
    animation: fadeIn 0.4s ease;
}

.center-data-view h1 {
    font-size: 2.25rem;
    margin-top: .5rem;
    color: var(--text);
}

/* Command Panel (Right Side Management) */
.command-panel {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(50px);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 3.5rem 0 0 0;
    /* Horizontal padding moved to children */
    z-index: 90;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    /* Header and Footer are now stationary */
}

.command-header {
    padding: 0 2.5rem;
    margin-bottom: 2.5rem;
    flex-shrink: 0;
    /* Don't compress header */
}

.command-content {
    flex: 1;
    overflow-y: auto;
    /* Only content scrolls */
    padding: .8rem 2.5rem 2rem 2.5rem;
    -webkit-overflow-scrolling: touch;
}

.command-footer {
    flex-shrink: 0;
    /* Don't compress footer */
    padding: 2rem 2.5rem 2rem 2.5rem;
    /* Ensure comfortable spacing at bottom */
    background: inherit;
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}

/* Account Badge Styling */
.account-badge {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    background: white;
    border-radius: 1.25rem;
    margin: 0 2.5rem 2.5rem 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.avatar-circle {
    width: 44px;
    height: 44px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid var(--glass-border);
}

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

.account-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.user-name-display {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

/* Override containers for Studio mode */
.immersive-wrapper {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: var(--bg);
}

/* Muscle Map Styles - Image Based */
.muscle-map-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-image);
    overflow: hidden;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
}

.muscle-base,
.muscle-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    /* Ensure centered */
    pointer-events: none;
    -webkit-user-drag: none;
    transition: all 0.4s ease;
}

.muscle-base {
    z-index: 1;
}

.muscle-layer {
    z-index: 2;
    display: none;
}

.muscle-layer.active {
    display: block;

    /* Cyan-ish glow to match --primary */

}

/* Utility */
.hidden {
    display: none;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-1 {
    gap: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Loading Spinner */
.map-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Select Component */
.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
    z-index: 100;
}

.custom-select.open,
.custom-datetime-picker.open {
    z-index: 1001 !important;
}

.select-trigger {
    cursor: pointer;
    justify-content: space-between;
}

@media (hover: hover) {
    .select-trigger:hover {
        border-color: var(--primary);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
}

.select-trigger i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.custom-select.open .select-trigger,
.custom-select.open .select-trigger,
.custom-datetime-picker.open .select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.1);
}

/* Fix dropdown clipping by elevating parent panel z-index when open */
.glass-panel:has(.custom-select.open),
.glass-panel:has(.custom-datetime-picker.open),
.search-wrapper:has(.custom-select.open),
#until-date-group:has(.custom-datetime-picker.open) {
    z-index: 1000 !important;
    overflow: visible !important;
}

.custom-select.open .select-trigger i {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 100%;
    width: max-content;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 101;
}

.custom-select.open .select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

@media (hover: hover) {
    .select-option:hover {
        background: rgba(239, 68, 68, 0.05);
        color: var(--primary);
        padding-left: 1.5rem;
    }
}

.select-option.selected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary);
    font-weight: 700;
}

/* Scrollbar for select options (Webkit browsers) */
/* (Currently handled by global scrollbar styles) */

/* Empty State Component */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 2rem;
    width: 100%;
    margin: 2rem 0;
    animation: fadeIn 0.5s ease-out;
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--primary);
    opacity: 0.2;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 300px;
}

/* Exercise Library Grid & Search */
.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.exercise-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    cursor: pointer;
}

@media (hover: hover) {
    .exercise-card:hover {
        transform: translateY(-5px);
        border-color: var(--primary) !important;
        box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.1) !important;
    }
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}



.search-wrapper i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Admin Toolbar Search Specifics */
.admin-toolbar .search-wrapper {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    padding: 0 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    flex: 1.2;
}

.admin-toolbar .search-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.admin-toolbar .search-wrapper i {
    color: var(--primary);
    opacity: 0.6;
    font-size: 1rem;
    margin-right: 0.75rem;
    position: static !important;
    transform: none !important;
}

.admin-toolbar .search-wrapper input {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1rem 0 !important;
    min-height: 3.5rem !important;
    flex: 1;
}

/* Category Pills Styling */
.pill {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pill:hover {
    background: rgba(0, 242, 254, 0.05);
    border-color: var(--primary);
    color: var(--text);
    transform: translateY(-2px);
}

.pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000 !important;
    box-shadow: 0 10px 13px -10px rgba(0, 242, 254, 0.3);
}

/* Desktop: Wrap filters onto multiple lines */
.category-pills-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.8rem 0;
    margin: -0.8rem 0;
}

@media (max-width: 1024px) {
    .category-pills-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }
}

.category-pills-scroll::-webkit-scrollbar {
    display: none;
}

.muscle-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.muscle-tag {
    background: rgba(2, 132, 168, 0.08);
    color: var(--primary-dark);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Selectable Pills for Forms */
.pill-selectable {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.pill-selectable:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pill-selectable.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.2);
}

.muscle-tag::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--primary-dark);
    border-radius: 50%;
}

/* Premium Muscle Recruitment Sliders */
.slider-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

@media (hover: hover) {
    .slider-container:hover {
        background: rgba(255, 255, 255, 0.6);
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
        border-color: rgba(59, 130, 246, 0.2);
    }
}

.percentage-badge {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.recruitment-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    outline: none;
    margin: 1.25rem 0;
    cursor: pointer;
}

.recruitment-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
}

.recruitment-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -5px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

@media (hover: hover) {
    .recruitment-slider:hover::-webkit-slider-thumb {
        transform: scale(1.15);
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    }
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 2px;
}

/* Skeleton Loading */
.skeleton-line {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 25%, rgba(0, 0, 0, 0.08) 50%, rgba(0, 0, 0, 0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s infinite;
    border-radius: 0.875rem;
    width: 100%;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Delete Confirmation Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.modal-visible {
    opacity: 1;
}

.modal-card {
    background: var(--card-bg) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.75rem;
    padding: 2.5rem 2rem;
    max-width: 500px;
    width: 95%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .modal-card {
        max-width: 550px;
        padding: 3rem;
    }
}

.modal-overlay.modal-visible .modal-card {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
}

.modal-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.modal-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.modal-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-description strong {
    color: var(--text);
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-card .input-group {
    margin-bottom: 1.5rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

@media (hover: hover) {
    .btn-danger:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    }
}

.btn-danger:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

/* ========================================
   DARK MODE
   ======================================== */
body.dark-mode {
    --bg: #0f172a;
    --bg-image: #04162e;
    --card-bg: rgba(30, 41, 59, 1);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-dark: #38bdf8;

    /* Unified Input Tokens - Dark Mode */
    --input-bg: rgba(30, 41, 59, 0.95);
    --input-border: rgba(255, 255, 255, 0.12);

    /* Theme-aware UI Tokens (Dark) */
    --ui-border-low: rgba(255, 255, 255, 0.08);
    --ui-bg-low: rgba(255, 255, 255, 0.03);
    --ui-text-mid: rgba(255, 255, 255, 0.5);
    --primary-tag-text: var(--primary); /* Glowing cyan for dark mode */
    --success-tag-text: var(--success); /* Vibrant green for dark mode */
}

/* Dark Mode Scrollbar Overrides */
body.dark-mode ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

body.dark-mode .dashboard {
    background: var(--bg);
}

body.dark-mode .tool-rail {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .command-panel {
    background: rgba(15, 23, 42, 0.97);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .map-canvas-area {
    background: #0f172a;
}

body.dark-mode .center-data-view {
    background: #0f172a;
}

body.dark-mode .glass-panel {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .account-badge {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}



body.dark-mode input[type="date"]::-webkit-calendar-picker-indicator,
body.dark-mode input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: var(--text-muted);
}

body.dark-mode .muscle-tag {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-dark);
}

body.dark-mode .muscle-tag::before {
    background: var(--primary-dark);
}

body.dark-mode .exercise-card {
    background: #1e293b !important;
}

/* Modal Custom Content Styles */
.modal-scroll-container {
    max-height: 300px;
    overflow-y: auto;
    margin: 1.5rem 0;
    padding-right: 0.5rem;
}

.modal-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 0.85rem;
    margin-bottom: 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.modal-item-card.is-done {
    background: rgba(34, 197, 94, 0.04);
    border-color: rgba(34, 197, 94, 0.15);
}

.modal-item-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

.modal-load-input {
    width: 60px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.35rem;
    text-align: center;
    font-weight: 800;
    color: #0f172a;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.modal-load-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.modal-unit {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

body.dark-mode .toast {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

body.dark-mode .btn-primary {
    color: #000;
    /* Keeping it dark for neon blue, but let's check if we need to force white for specific backgrounds */
}

/* Fix for buttons with success/dark backgrounds in dark mode */
body.dark-mode .btn-primary[style*="background: var(--success)"],
body.dark-mode .btn-primary[style*="background:var(--success)"] {
    color: #fff !important;
}

body.dark-mode .toast-content {
    color: var(--text);
}

/* Dark Mode Sidebar & Select Overrides */
body.dark-mode .nav-brand-icon {
    background: #1e293b;
    color: var(--primary-dark);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .tool-item.active {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.3);
    transform: scale(1.1);
}



body.dark-mode .select-options {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .select-option {
    color: var(--text);
}

@media (hover: hover) {
    body.dark-mode .select-option:hover {
        background: rgba(56, 189, 248, 0.08);
        color: var(--primary-dark);
    }
}

body.dark-mode .select-option.selected {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-dark);
}

/* Dark Mode Datetime Picker */
body.dark-mode .datetime-dropdown {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .calendar-header span {
    color: var(--text);
}

body.dark-mode .calendar-header button {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

@media (hover: hover) {
    body.dark-mode .calendar-header button:hover {
        background: var(--primary);
        color: #000;
    }
}

body.dark-mode .day {
    color: var(--text);
}

@media (hover: hover) {
    body.dark-mode .day:hover:not(.empty) {
        background: rgba(56, 189, 248, 0.1);
        color: var(--primary-dark);
    }
}

body.dark-mode .day.today {
    border-color: var(--primary-dark);
}

body.dark-mode .time-picker-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .time-column label {
    color: var(--text-muted);
}

body.dark-mode .time-scroll {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .time-item {
    color: var(--text);
}

@media (hover: hover) {
    body.dark-mode .time-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

body.dark-mode .time-item.selected {
    background: var(--primary);
    color: #000;
}

body.dark-mode .time-separator {
    color: var(--text-muted);
}

body.dark-mode .datetime-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* Dark Mode Toggle Switch */
.dark-toggle {
    position: relative;
    display: inline-block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

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

.dark-toggle-track {
    display: block;
    width: 44px;
    height: 24px;
    background: var(--glass-border);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
    border: 1px solid var(--glass-border);
}

.dark-toggle input:checked+.dark-toggle-track {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.dark-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dark-toggle input:checked+.dark-toggle-track .dark-toggle-thumb {
    transform: translateX(20px);
}

/* Searchable Select Component */
.searchable-select {
    position: relative;
    width: 100%;
    z-index: 105;
}

.searchable-select .select-trigger {
    cursor: text;
    padding: 0 1.25rem;
}

.searchable-select .select-trigger input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 1rem 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
}

.searchable-select .select-trigger i {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.searchable-select.open .select-trigger {
    border-color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.searchable-select.open .select-trigger i {
    transform: rotate(180deg);
}

.searchable-select .select-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary);
    border-top: none;
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 110;
}

.searchable-select.open .select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.searchable-select .select-option {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.searchable-select .select-option:last-child {
    border-bottom: none;
}

@media (hover: hover) {
    .searchable-select .select-option:hover {
        background: rgba(56, 189, 248, 0.08);
        color: var(--primary-dark);
        padding-left: 1.5rem;
    }
}

.searchable-select .select-option.hidden {
    display: none;
}

/* Dark Mode Searchable Select */


body.dark-mode .searchable-select .select-trigger input {
    background: transparent;
    color: var(--text);
}

body.dark-mode .searchable-select .select-option {
    color: var(--text) !important;
    border-color: rgba(255, 255, 255, 0.05);
}

/* Custom Datetime Picker Dropdown */
.datetime-dropdown {
    min-width: 320px;
    width: max-content;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    left: auto !important;
    right: 0 !important;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.calendar-header span {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.calendar-header button {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

@media (hover: hover) {
    .calendar-header button:hover {
        background: var(--primary);
        color: white;
    }
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 1.5rem;
}

.weekday {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 0.5rem 0;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

@media (hover: hover) {
    .day:hover:not(.empty) {
        background: rgba(0, 242, 254, 0.1);
        color: var(--primary);
    }
}

.day.selected {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: #000 !important;
    font-weight: 700;
}

.day.today {
    border: 1px solid var(--primary);
}

.day.empty {
    cursor: default;
}

.time-picker-section {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.time-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-column label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
}

.time-scroll {
    height: 100px;
    overflow-y: auto;
    background: var(--glass);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    padding: 2px;
}

.time-item {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

@media (hover: hover) {
    .time-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

.time-item.selected {
    background: var(--primary);
    color: #000;
    font-weight: 700;
}

.time-separator {
    font-size: 1.5rem;
    font-weight: 700;
    padding-bottom: 30px;
    color: var(--text-muted);
}

.datetime-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-datetime-confirm {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem !important;
}

/* Custom Datetime Picker Container */
.custom-datetime-picker {
    position: relative;
    width: 100%;
}

.custom-datetime-picker .select-trigger {
    cursor: pointer;
    justify-content: space-between;
}

.custom-datetime-picker .select-trigger i {
    color: var(--primary);
    font-size: 1.1rem;
}

.custom-datetime-picker.open .datetime-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ========================================
   PROTOCOL HISTORY CARDS
   ======================================== */
.protocol-card {
    background: var(--card-bg);
    border-radius: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease-out;
}

.protocol-card.protocol-inactive {
    opacity: 0.6;
    border-style: dashed;
}

@media (hover: hover) {
    .protocol-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }
}

.protocol-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.protocol-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.protocol-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 600;
}

.protocol-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-teacher {
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-student {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-inactive {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.15);
}

.protocol-card-actions {
    display: flex;
    gap: 0.75rem;
}

/* Dark Mode Protocol Cards */
body.dark-mode .protocol-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .badge-teacher {
    background: rgba(0, 242, 254, 0.2);
    color: #00f2fe;
}

body.dark-mode .badge-student {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

body.dark-mode .badge-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* ========================================
   REFINED PROTOCOL & WORKOUT HIERARCHY
   ======================================== */

.protocol-main-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.protocol-main-card.active {
    border-left: 6px solid var(--primary);
}

.protocol-main-card.inactive {
    opacity: 0.7;
    filter: grayscale(0.5);
    border-left: 6px solid var(--text-muted);
}

@media (hover: hover) {
    .protocol-main-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    }
}

.workout-item-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

@media (hover: hover) {
    .workout-item-card:hover {
        background: white;
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        transform: scale(1.02);
    }
}

.badge {
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-inactive {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* Dark Mode Overrides */
body.dark-mode .protocol-main-card {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .workout-item-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

@media (hover: hover) {
    body.dark-mode .workout-item-card:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--primary);
    }
}



body.dark-mode .badge-inactive {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

body.dark-mode .slider-container {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.06);
}

@media (hover: hover) {
    body.dark-mode .slider-container:hover {
        background: rgba(15, 23, 42, 0.6);
        border-color: var(--primary);
    }
}

body.dark-mode .recruitment-slider {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .recruitment-slider::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .slider-labels {
    color: var(--text-muted);
}

body.dark-mode .empty-state {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .empty-state h3 {
    color: var(--text);
}

body.dark-mode .empty-state p {
    color: var(--text-muted);
}

/* ========================================
   GENERAL CALENDAR VIEW
   ======================================== */

.calendar-wide-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    min-height: 400px;
}

.wide-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.wide-grid .weekday {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    padding: 1rem 0;
}

.wide-day {
    padding: 0.75rem;
    min-height: 80px;
    background: rgba(var(--primary-rgb), 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wide-day span {
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (hover: hover) {
    .wide-day:hover {
        background: rgba(var(--primary-rgb), 0.06);
        transform: translateY(-2px);
        border-color: var(--primary);
    }
}

.wide-day.today {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

.wide-day.selected {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.1);
}

.wide-day .apt-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    align-self: flex-end;
    box-shadow: 0 0 10px var(--primary);
}

.wide-day.empty {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 600px) {
    .wide-grid .weekday {
        font-size: 0.6rem;
    }

    .wide-day {
        min-height: 60px;
        padding: 0.5rem;
        border-radius: 0.6rem;
    }
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 1024px) {
    body {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }

    input,
    textarea {
        -webkit-user-select: auto !important;
        -moz-user-select: auto !important;
        -ms-user-select: auto !important;
        user-select: auto !important;
    }

    ::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }

    * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

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

    .sidebar-toggle {
        display: flex !important;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 10001;
        background: var(--primary);
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        cursor: pointer;
    }

    .tool-rail {
        display: none;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 10000;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .center-data-view {
        padding: 1.5rem !important;
        padding-top: 5rem !important;
        /* Space for mobile toggle */
    }

    .exercise-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .exercise-card {
        padding: 1.25rem !important;
    }

    .search-wrapper {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    .flex.justify-between.items-center {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .command-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .exercise-card h3 {
        font-size: 1.1rem;
    }

    .muscle-tag {
        padding: 0.25rem 0.6rem;
        font-size: 0.65rem;
    }
}

/* Bottom Navigation (Mobile Only) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 10002;
    padding: 0 1rem;
    align-items: center;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item span {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    text-shadow: 0 0 15px var(--primary);
}

@media (max-width: 1024px) {
    .bottom-nav {
        display: flex;
    }

    .command-panel {
        position: fixed;
        inset: 0;
        z-index: 11000 !important;
        background: var(--bg);
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex !important;
        flex-direction: column;
        padding-bottom: 0px !important;
        overflow: hidden !important;
        visibility: hidden;
        /* Prevent blocking clicks when not active */
        pointer-events: none;
    }

    .command-header {
        position: relative !important;
        top: 0;
        background: var(--bg);
        z-index: 10;
        flex-shrink: 0;
    }

    .command-content {
        flex: 1 !important;
        overflow-y: auto !important;
        padding-bottom: 2rem !important;
    }

    .command-content-scroll {
        padding: 0 !important;
    }

    .command-panel.active {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    /* Mobile Close Button Style */
    .mobile-close-btn {
        position: absolute;
        top: 1.25rem;
        /* Adjusted for better alignment with compact header */
        right: 1.25rem;
        width: 38px;
        height: 38px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex !important;
        /* Ensure it's shown on mobile */
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        color: var(--text);
        z-index: 1001;
        cursor: pointer;
        padding: 0;
        transition: all 0.2s ease;
    }

    .mobile-close-btn:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.15);
    }
}


/* Mobile Close Button for Command Panel */
.mobile-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10006;
}

body.dark-mode .mobile-close-btn {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1024px) {
    .sidebar {
        z-index: 10010 !important;
        /* Above bottom nav and map */
    }

    .map-canvas-area {
        height: calc(100vh - 70px) !important;
        margin-bottom: 70px;
    }

    .center-data-view {
        min-height: calc(100vh - 70px);
        padding-bottom: 90px !important;
    }
}


/* App Top Bar */
.app-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    /* Solid white for better light mode contrast */
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.06);
    /* Subtle depth */
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    /* More defined border */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 10003;
    display: none;
    /* Mobile only */
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar-logo {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.top-bar-greet {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.top-bar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.user-name-display-top {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.avatar-circle-sm {
    width: 32px;
    height: 32px;
    background: rgba(15, 23, 42, 0.05);
    /* Themed glass for light mode */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.8rem;
}

/* Sticky Dashboard Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--bg);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .app-top-bar {
        display: flex;
    }

    .center-data-view {
        padding-top: 5rem !important;
        /* Space for Top Bar + Sticky Margin */
    }

    .sticky-header {
        padding-top: 1rem;
        background: var(--bg);
        margin: 0 -1.5rem 1.5rem -1.5rem;
        /* Match parent padding */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
    }
}


/* Refinement for Sidebar Toggle in Top Bar */
.sidebar-toggle {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 1.25rem !important;
    margin-left: 0.25rem;
    z-index: 1;
    color: var(--text) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    transition: all 0.2s ease;
}

.sidebar-toggle:active {
    background: rgba(15, 23, 42, 0.05) !important;
    transform: scale(0.95);
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 10005;
    animation: dropdownFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

.user-menu-dropdown.active {
    display: flex;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    border-radius: 0.85rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.dropdown-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-item:active {
    background: rgba(15, 23, 42, 0.05);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:active {
    background: rgba(239, 68, 68, 0.08);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* Utility Classes */
.hidden {
    display: none !important;
}

/* Fix Command Panel Background & Postion on Mobile */
@media (max-width: 1024px) {
    .command-panel {
        top: 60px !important;
        /* Ensure it stays below top nav */
        background: var(--bg) !important;
        /* Solid background */
        z-index: 10005;
    }

    .sticky-header {
        background: var(--bg) !important;
        /* Match container bg */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .command-content {
        padding-bottom: 90px !important;
    }

    /* Stacked View Mode (Map + Details) */
    .dashboard.stacked-view:not(.hidden) {
        display: block !important;
        height: 100vh !important;
        overflow-y: auto !important;
        background: var(--bg);
        position: relative !important;
        padding-top: 0 !important;
    }

    /* Mobile Expand Handle */
    .mobile-expand-handle {
        width: 100%;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        background: var(--bg);
        border-top-left-radius: 1.5rem;
        border-top-right-radius: 1.5rem;
        margin-top: -10px;
        /* Pull it up slightly over the border */
        z-index: 10;
        position: absolute;
        top: 0;
        left: 0;
    }

    .mobile-expand-handle .handle-bar {
        width: 40px;
        height: 5px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
        transition: background 0.2s;
    }

    body.dark-mode .mobile-expand-handle .handle-bar {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Push down badge so it doesn't overlap handle */
    .dashboard.stacked-view .command-panel {
        padding-top: 2rem !important;
        /* Space for the handle */
    }

    /* Expanded View state for the bottom sheet */
    .dashboard.stacked-view .command-panel.expanded-view {
        position: fixed !important;
        top: 60px !important;
        /* Below the top nav */
        bottom: 70px !important;
        /* Above the bottom nav */
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 130px) !important;
        min-height: calc(100vh - 130px) !important;
        z-index: 10000 !important;
        /* Over muscle map but under bottom-nav */
        transform: none !important;
        background: var(--bg) !important;
        transition: top 0.3s ease, height 0.3s ease;

        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        /* Locks container, allows content to scroll */
        padding-bottom: 0 !important;
    }

    /* Guarantee footer sticks exactly to the bottom of the expanded panel */
    .dashboard.stacked-view .command-panel.expanded-view .command-footer {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }

    /* Aggressive hidden fix to prevent scroll leaks */
    .dashboard.hidden {
        display: none !important;
        position: fixed !important;
        height: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .dashboard.stacked-view.hidden {
        display: none !important;
    }

    .muscle-map-container {
        height: 380px !important;
    }

    .command-footer {
        position: relative !important;
        bottom: 0px !important;
        z-index: 11005 !important;
        left: 0;
        width: 100%;
        flex-shrink: 0;
        background: var(--bg) !important;
        border-top: 1px solid var(--glass-border) !important;
        z-index: 11006 !important;
        /* Above expanded panel to remain interactive */
        padding: 1rem 1.5rem !important;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
        margin: 0 !important;
    }

    .dashboard.stacked-view .map-canvas-area {
        height: 380px !important;
        position: sticky !important;
        top: 60px;
        z-index: 1000;
        background: var(--bg);
        border-bottom: 1px solid var(--glass-border);
    }

    .dashboard.stacked-view .command-panel {
        position: relative !important;
        transform: none !important;
        display: block !important;
        height: auto !important;
        min-height: 50vh;
        padding-top: 1.5rem !important;
        padding-bottom: 100px !important;
        box-shadow: none !important;
        z-index: 10;
        overflow: visible !important;
        top: 0 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .dashboard.stacked-view .sidebar,
    .dashboard.stacked-view .center-data-view {
        display: none !important;
    }
}

@media (max-width: 1024px) {

    .muscle-base,
    .muscle-layer {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }
}

@media (max-width: 1024px) {
    .account-badge {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .top-bar-greet {
        color: var(--text) !important;
    }

    body.dark-mode .app-top-bar {
        background: rgba(15, 23, 42, 0.95) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    body.dark-mode .top-bar-left .sidebar-toggle {
        color: white !important;
    }

    body.dark-mode .user-menu-dropdown {
        background: #0f172a;
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }

    body.dark-mode .dropdown-item:active {
        background: rgba(255, 255, 255, 0.05);
    }

    body.dark-mode .avatar-circle-sm {
        background: rgba(255, 255, 255, 0.05) !important;
    }

    body.dark-mode .bottom-nav {
        background: rgba(15, 23, 42, 0.95) !important;
    }

    body.dark-mode .top-bar-greet {
        color: white !important;
    }

    body.dark-mode .sticky-header {
        background: rgba(15, 23, 42, 1) !important;
    }
}

/* Admin Toolbar Responsive Layout */
.admin-toolbar {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-toolbar-content {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
}

.admin-filters-group {
    display: flex;
    gap: 1rem;
    flex: 1.5;
}

@media (max-width: 1024px) {
    .admin-toolbar {
        padding: 1.25rem 1rem !important;
        border-radius: 1.25rem !important;
    }

    .admin-toolbar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .search-wrapper {
        flex: none !important;
        width: 100% !important;
        height: 3.25rem !important;
    }

    .admin-filters-group {
        flex: none !important;
        flex-direction: column;
        width: 100% !important;
        gap: 0.75rem;
    }

    .admin-filters-group .custom-select {
        width: 100% !important;
    }

    .admin-filters-group .select-trigger {
        height: 3.25rem !important;
        border-radius: 0.85rem !important;
    }
}

/* Calendar Mobile Optimizations */
.mobile-text {
    display: none;
}

@media (max-width: 1024px) {
    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }

    .calendar-grid.wide-grid {
        gap: 3px !important;
        margin-bottom: 1rem;
    }

    .wide-grid .weekday {
        font-size: 0.55rem !important;
        padding: 0.25rem 0 !important;
        letter-spacing: 0;
    }

    .wide-day {
        min-height: unset !important;
        aspect-ratio: 1 / 1.1 !important;
        padding: 0.25rem !important;
        border-radius: 6px !important;
        font-size: 0.75rem !important;
    }

    .wide-day span {
        font-size: 0.8rem;
    }

    .wide-day .apt-dot {
        width: 5px !important;
        height: 5px !important;
        margin-bottom: 2px;
    }

    .calendar-header h2 {
        font-size: 1.2rem !important;
    }

    .calendar-header {
        margin-bottom: 1.5rem !important;
        gap: 0.5rem;
    }
}

/* ========================================
   AUTH LAYOUT (REORGANIZED)
   ======================================== */
.auth-card {
    max-width: 420px;
    margin: 6rem auto;
    padding: 3rem 2.5rem !important;
    z-index: 100;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    margin: 1rem 0 0.25rem;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--primary) 0%, #4facfe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.btn-auth-submit {
    width: 100%;
    height: 56px;
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--primary) 0%, #4facfe 100%);
    border: none;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 242, 254, 0.2);
    transition: all 0.3s ease;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 242, 254, 0.3);
}

.auth-switch {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    margin-left: 0.3rem;
}

@media (max-width: 1024px) {
    .auth-card {
        margin: 8vh 1.25rem 2rem !important;
        padding: 2.5rem 1.5rem !important;
        max-width: none !important;
        width: auto !important;
    }

    .auth-header h1 {
        font-size: 1.85rem;
    }

    .btn-auth-submit {
        height: 52px;
        font-size: 0.95rem;
    }
}

/* Auth Inline Error Banner */
.auth-error-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.85rem;
    padding: 0.85rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 1rem;
    animation: auth-error-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-error-banner i {
    font-size: 1rem;
    flex-shrink: 0;
}

@keyframes auth-error-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Auth Field Shake Animation */
@keyframes auth-shake {
    0%   { transform: translateX(0); }
    15%  { transform: translateX(-6px); }
    30%  { transform: translateX(6px); }
    45%  { transform: translateX(-4px); }
    60%  { transform: translateX(4px); }
    75%  { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

.auth-shake {
    animation: auth-shake 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}


/* Custom Checkbox */
.custom-checkbox-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(var(--primary-rgb), 0.05);
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 1.5px dashed rgba(var(--primary-rgb), 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.custom-checkbox-container:hover {
    background: rgba(var(--primary-rgb), 0.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
}

.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark-box {
    width: 44px;
    height: 44px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.custom-checkbox-container:hover .checkmark-box {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
}

.custom-checkbox-container input:checked+.checkmark-box {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.6);
    transform: scale(1.1);
}

.checkbox-label {
    margin: 0;
    font-weight: 800;
    color: var(--primary);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    user-select: none;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Exercise Preview GIF */
.exercise-preview-gif {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exercise-preview-gif:hover {
    transform: scale(1.05);
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Select Components - Light Glass Theme */
.custom-select {
    position: relative !important;
    user-select: none;
    transition: all 0.3s ease;
}

.custom-select.open .select-trigger {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.custom-select .select-options {
    position: absolute !important;
    top: calc(100% + 0.5rem) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: var(--input-bg) !important;
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid var(--glass-border) !important;
    border-radius: 1.25rem !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15) !important;
    z-index: 10015;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select.open .select-options {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.select-option {
    padding: 0.85rem 1.25rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.select-option:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.select-option.selected {
    background: rgba(var(--primary-rgb), 0.1) !important;
    color: var(--primary) !important;
}

/* NUCLEAR FIX: MODAL DARK MODE OVERRIDES */
body.dark-mode #system-modal .modal-card {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode #system-modal .modal-title {
    background: none !important;
    -webkit-text-fill-color: #f8fafc !important;
    background-clip: unset !important;
    color: #f8fafc !important;
    margin-bottom: 0.5rem !important;
}

body.dark-mode #system-modal .modal-description {
    color: #94a3b8 !important;
}

body.dark-mode #system-modal .modal-close {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}

body.dark-mode #system-modal .modal-item-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode #system-modal .modal-item-title {
    color: #e2e8f0 !important;
}

body.dark-mode #system-modal .modal-load-input {
    background: #1e293b !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 700 !important;
}

body.dark-mode #system-modal .modal-unit {
    color: #64748b !important;
}

body.dark-mode #system-modal .btn-light {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}