@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700&display=swap');

* {
    box-sizing: border-box;
}

/* Desactivar todas las transiciones temporalmente para un cambio de tema instantáneo y limpio */
html.no-transition,
html.no-transition *,
html.no-transition *::before,
html.no-transition *::after {
    transition: none !important;
    transition-property: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}




:root {
    color-scheme: light;
    /* Fondo limpio puro y futurista */
    --bg-color: #ffffff;
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #f4f7fc 40%, #e3ebf7 100%);
    --panel-bg: rgba(255, 255, 255, 0.85);
    --panel-border: rgba(255, 255, 255, 0.9);
    --text-main: #334155;
    --text-muted: #64748b;
    --shadow-premium: 0 15px 35px rgba(0, 0, 0, 0.08);
    --sidebar-bg: rgba(255, 255, 255, 0.94);

    --shadow-light: #ffffff;
    --shadow-dark: #f0f0f0;

    /* Paleta Cromo Y2K (Liquid Metal) */
    --color-chrome-base: #D1D5F0;
    --color-electric-blue: #2B43F1;
    --color-fire-orange: #F9A100;
    --color-bright-yellow: #FFD700;
    --color-deep-purple: #5D2E8C;
    --color-pure-white: #FFFFFF;

    /* Canchas transparentes con líneas blancas */
    --court-bg: transparent;
    --court-lines: #ffffff;
    /* Blanco sólido para resaltar en cristal */

    /* Textos */
    --font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Animations */
    --entrance-anim: entranceFadeIn 0.2s ease-out;

    /* Timeline Variables (Option 2: Unified Platinum) */
    --timeline-active-week-title: #0f172a;
    --timeline-active-week-text: #334155;
    --timeline-inactive-week-title: #94a3b8;
    --timeline-inactive-week-text: #94a3b8;
    --timeline-border-active: #64748b; /* Refined Steel/Slate Gray */
    --timeline-border-inactive: rgba(148, 163, 184, 0.2);
    --timeline-badge-bg: rgba(100, 116, 139, 0.08); /* Frosted silver badge */
    --timeline-badge-color: #475569;
    --timeline-h4-border: rgba(0, 0, 0, 0.06);

    /* Scrollbar Variables */
    --scrollbar-thumb-color: rgba(43, 67, 241, 0.22);
    --scrollbar-thumb-hover-color: rgba(43, 67, 241, 0.45);
    --scrollbar-track-color: rgba(43, 67, 241, 0.02);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-color: #090a0d; /* Gris antracita muy profundo */
    --bg-gradient: radial-gradient(circle at 50% 50%, #1a1c24 0%, #090a0d 100%);
    --panel-bg: rgba(8, 8, 12, 0.85); /* Deep dark translucent panel background */
    --panel-border: rgba(255, 255, 255, 0.06);
    --text-main: #cbd5e1;
    --text-muted: #94a3b8;
    --shadow-premium: 0 20px 45px rgba(0, 0, 0, 0.55);
    --court-bg: rgba(7, 9, 19, 0.4); /* Court backdrop matching dark space */
    --court-lines: rgba(255, 255, 255, 0.38); /* Luminous sharp white lines in dark mode */
    --sidebar-bg: rgba(12, 15, 24, 0.95);
    --color-pure-white: #1a1b20; /* Gris cromo */
    
    /* Azul eléctrico adaptado con mayor luminosidad y saturación para contraste óptimo */
    --color-electric-blue: #7e9dfc;
    
    --shadow-light: #222328;
    --shadow-dark: #0c0d0f;

    /* Timeline Variables (Tema Oscuro - Option 2: Unified Platinum) */
    --timeline-active-week-title: #ffffff;
    --timeline-active-week-text: #e2e8f0;
    --timeline-inactive-week-title: #475569;
    --timeline-inactive-week-text: #475569;
    --timeline-border-active: #cbd5e1; /* Silver White */
    --timeline-border-inactive: rgba(255, 255, 255, 0.06);
    --timeline-badge-bg: rgba(255, 255, 255, 0.08); /* Frosted platinum badge */
    --timeline-badge-color: #cbd5e1;
    --timeline-h4-border: rgba(255, 255, 255, 0.06);

    /* Scrollbar Variables */
    --scrollbar-thumb-color: rgba(92, 115, 242, 0.70);
    --scrollbar-thumb-hover-color: rgba(92, 115, 242, 0.95);
    --scrollbar-track-color: rgba(255, 255, 255, 0.05);
}

/* --- Dynamic Venue Themes (VAT, CTC, BRU) --- */
body.sede-theme-vat {
    --color-electric-blue: #2B43F1;
    --timeline-badge-bg: rgba(43, 67, 241, 0.12);
}
body.sede-theme-ctc {
    --color-electric-blue: #ea580c;
    --timeline-badge-bg: rgba(234, 88, 12, 0.12);
}
body.sede-theme-bru {
    --color-electric-blue: #16a34a;
    --timeline-badge-bg: rgba(22, 163, 74, 0.12);
}

[data-theme="dark"] body.sede-theme-vat, body[data-theme="dark"].sede-theme-vat {
    --color-electric-blue: #7e9dfc;
    --timeline-badge-bg: rgba(126, 157, 252, 0.20);
}
[data-theme="dark"] body.sede-theme-ctc, body[data-theme="dark"].sede-theme-ctc {
    --color-electric-blue: #f97316;
    --timeline-badge-bg: rgba(249, 115, 22, 0.20);
}
[data-theme="dark"] body.sede-theme-bru, body[data-theme="dark"].sede-theme-bru {
    --color-electric-blue: #22c55e;
    --timeline-badge-bg: rgba(34, 197, 94, 0.20);
}

/* ==========================================================================
   UNIFICADOR GLOBAL DE TIPOGRAFÍA  — Slate-Gray Palette
   Light mode: shades of slate (#334155 main, #64748b muted, #94a3b8 subtle)
   Dark  mode: shades of slate-white (#cbd5e1 main, #94a3b8 muted, #64748b subtle)
   ========================================================================== */

/* --- Celdas y texto de tablas --- */
td, th,
.otc-table td, .otc-table th,
.table-cell, .table-row-text,
.student-name, .student-cell,
.prof-name, .prof-cell,
.cancha-cell, .sede-cell,
.court-slot-text, .slot-label {
    color: var(--text-main) !important;
}

/* --- Cabeceras de columna de tablas --- */
thead th, .th-label, .col-header,
.otc-table thead th,
[class*="table-header"] th {
    color: var(--text-muted) !important;
}

/* --- Menús, dropdowns y opciones --- */
.otc-td-option, .otc-td-menu li,
.acad-dd-item, .acad-dd-label,
.dropdown-option, .dropdown-item,
select option,
.custom-select option,
.otc-custom-dropdown-btn,
.otc-td-menu .otc-td-option {
    color: var(--text-main) !important;
}

/* --- Botones de acción (Añadir Alumno, Guardar, etc.) --- */
.btn-add, .btn-save, .btn-primary, .btn-secondary,
.btn-action, .add-student-btn,
button:not(.btn-sede):not(.btn-day):not(.btn-hour-select):not(.timeline-month-nav-item):not(.acad-dd-trigger):not(.btn-clear-all-sorts):not(.btn-clear-all-filters):not(.btn-danger):not(.btn-delete):not(.btn-remove):not(.btn-confirm):not(.btn-confirm-edit):not(.otc-modal-btn):not(.btn-notif-action):not(.btn-primary-suspended):not(.btn-save-new-student):not(.mob-btn-save-new):not(.btn-profile-card-action):not(.clase-mode-pill):not(.clase-weekday-pill):not(.clase-preset-pill):not(.otc-land-pill-btn):not(.otc-tc-cta):not(.otc-tc-bookmark-btn):not(.otc-feed-chip):not(.otc-feed-action-btn):not(.otc-feed-card-link):not(.otc-auth-tab):not(.otc-react-btn):not(.otc-tc-card):not(.otc-tc-nav-btn):not(.otc-land-icon-btn):not(.otc-reader-close):not(.btn-primary-pill):not(.otc-cms-toolbar-btn):not(.otc-composer-tab):not(.otc-cta-mode-pill):not(.otc-cms-order-btn):not(.otc-composer-draft-btn):not(.otc-composer-publish-btn):not(.otc-composer-close):not(.otc-share-action-btn):not(.otc-share-menu-item):not(.otc-reader-share-link):not(.otc-reader-mini-icon):not(.otc-reader-recent-btn):not(.otc-reader-related-card):not(.otc-activity-close-btn):not(.otc-activity-tab):not(.otc-activity-view-btn):not(.otc-activity-expand-btn):not(.otc-activity-load-more-btn):not(.otc-analytics-detail-btn):not(.otc-analytics-post-btn):not(.btn-side-standalone):not(.otc-ws-pill):not(.otc-ws-return-btn):not(.otc-reg-chip):not(.otc-reg-btn-secondary):not(.otc-reg-club-option):not(.otc-reg-tag-remove):not(.otc-reg-invitado-toggle):not(.otc-reg-resend-btn):not(.otc-reg-other-add-btn):not(.otc-client-dd-btn):not(.otc-confirm-btn):not(.otc-client-dialog-close):not(.otc-reg-tag-role):not(.otc-reg-role-pill):not(.otc-danger-zone-trigger):not(.otc-client-manage-pill):not(.otc-auth-forgot-link):not(.otc-auth-back-link):not(.otc-theme-menu-item):not(.otc-pwa-sheet-close):not(.otc-pwa-sheet-btn) {
    color: var(--text-main) !important;
}

.btn-clear-all-sorts,
.btn-clear-all-filters,
button.btn-clear-all-sorts,
button.btn-clear-all-filters {
    color: #ffffff !important;
}

/* --- Labels y capsulas de filtros activos --- */
.active-filter-tag, .filter-tag, .filter-chip,
.active-filter-badge, .filter-label,
.acad-active-filter-tag {
    color: var(--text-muted) !important;
}

/* --- Inputs y textareas --- */
input[type="text"], input[type="search"], input[type="number"],
input[type="email"], input[type="date"],
textarea, .search-input, .input-field {
    color: var(--text-main) !important;
}
input::placeholder, textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

/* --- Filas de gráficos (chart-bar labels, rank rows, etc.) --- */
.chart-bar-label, .chart-row-label, .chart-label,
.rank-name, .rank-label, .chart-item-name,
.clases-bar-label, .clases-chart-row,
.chart-entry-label, .ranking-entry,
.chart-row span, .bar-row span,
[class*="chart"] span:not(.badge):not(.dot),
[class*="rank"] span,
.stat-label, .stat-text, .kpi-label {
    color: var(--text-muted) !important;
}

/* --- Texto de capsulas KPI del dashboard --- */
.capsule-text, .active-students-capsule .capsule-text,
.active-courts-capsule .capsule-text,
.active-teachers-capsule .capsule-text,
.stat-card-acad .capsule-text,
.stat-card-clases .capsule-text {
    color: var(--text-muted) !important;
}
.active-students-capsule strong, .active-courts-capsule strong,
.active-teachers-capsule strong, .stat-card-acad strong,
.stat-card-clases strong, .stat-card strong {
    color: var(--text-main) !important;
}

/* --- Sidebar / nav links --- */
.sidebar-link, .nav-link, .sidebar-item,
.nav-item-label, .sidebar-label {
    color: var(--text-muted) !important;
}
.sidebar-link.active, .nav-link.active {
    color: var(--text-main) !important;
}

/* --- Títulos de tarjetas y secciones generales --- */
.card-title, .section-title, .panel-title,
.modal-title, .drawer-title,
.chart-section-title {
    color: var(--text-muted) !important;
}

/* --- Texto genérico en párrafos y spans sueltos dentro de tarjetas --- */
.card p, .panel p, .info-text, .detail-text,
.description-text, .note-text {
    color: var(--text-muted) !important;
}



/* Botones en Tema Oscuro (Efecto Glassmorphic 3D Totalmente Suspendido con Letra Blanca) */
[data-theme="dark"] .btn-sede.active,
[data-theme="dark"] .dashboard-left-selector .btn-sede.active,
[data-theme="dark"] .timeline-side-selector .btn-sede.active,
[data-theme="dark"] .btn-day.active,
[data-theme="dark"] .btn-hour-select.active,
[data-theme="dark"] .timeline-month-nav-item.active {
    /* Fondo Convexo Metálico Oscuro (Mayor Contraste): Cristal más claro que el fondo */
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: #ffffff !important; /* Blanco puro de alta claridad */
    border: none !important; /* Sin bordes sólidos para mantener la ilusión extruida */
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 
        5px 6px 16px rgba(0, 0, 0, 0.45), /* Sombra externa más suave */
        -5px -5px 14px rgba(255, 255, 255, 0.04), /* Brillo externo superior sutil */
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.15), /* Rim de luz sutil */
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important; /* Rim interno de sombra sutil */
    transform: scale(1.08) translateY(-2px) !important; /* Misma escala que en Modo Claro */
}

[data-theme="dark"] .timeline-month-nav-item.active .nav-label {
    color: #ffffff !important;
}

/* Botones No Seleccionados/Inactivos en Tema Claro (Gris pizarra más claro y elegante) */
.dashboard-left-selector .btn-sede:not(.active),
.dashboard-left-selector .btn-sede:not(.active) span,
.timeline-side-selector .btn-sede:not(.active),
.timeline-side-selector .btn-sede:not(.active) span,
.btn-day:not(.active),
.btn-day:not(.active) span,
.btn-hour-select:not(.active),
.btn-hour-select:not(.active) span,
.timeline-month-nav-item:not(.active) .nav-label {
    color: #cbd5e1 !important; /* Gris pizarra claro y sutil */
}

/* Botones No Seleccionados/Inactivos en Tema Oscuro (Gris medio un poco más claro para mejor lectura) */
[data-theme="dark"] .dashboard-left-selector .btn-sede:not(.active),
[data-theme="dark"] .dashboard-left-selector .btn-sede:not(.active) span,
[data-theme="dark"] .timeline-side-selector .btn-sede:not(.active),
[data-theme="dark"] .timeline-side-selector .btn-sede:not(.active) span,
[data-theme="dark"] .btn-day:not(.active),
[data-theme="dark"] .btn-day:not(.active) span,
[data-theme="dark"] .btn-hour-select:not(.active),
[data-theme="dark"] .btn-hour-select:not(.active) span,
[data-theme="dark"] .timeline-month-nav-item:not(.active) .nav-label {
    color: #64748b !important; /* Gris pizarra medio visible */
}


[data-theme="dark"] .court-board {
    background: rgba(28, 48, 110, 0.65) !important; /* Lighter and more colorful cobalto sapphire inset glass */
    border: 1.5px solid rgba(92, 115, 242, 0.48) !important; /* Brighter border */
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.45), /* Softened inset dark shadow */
        inset -5px -5px 12px rgba(92, 115, 242, 0.45), /* Stronger sapphire backlight */
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.22) !important; /* Brighter rim */
}



[data-theme="dark"] .court-board.sede-vat {
    background: rgba(28, 48, 115, 0.65) !important; /* Lighter & richer blue */
    border: 1.5px solid rgba(126, 157, 252, 0.48) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.45),
        inset -5px -5px 12px rgba(126, 157, 252, 0.45),
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.22) !important;
}

[data-theme="dark"] .court-board.sede-vat .court-lines {
    background: transparent !important;
}

[data-theme="dark"] .court-board.sede-ctc {
    background: rgba(115, 50, 22, 0.65) !important; /* Lighter & richer clay orange */
    border: 1.5px solid rgba(249, 115, 22, 0.48) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.45),
        inset -5px -5px 12px rgba(249, 115, 22, 0.45),
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.22) !important;
}

[data-theme="dark"] .court-board.sede-ctc .court-lines {
    background: transparent !important;
}

[data-theme="dark"] .court-board.sede-bru {
    background: rgba(26, 85, 48, 0.65) !important; /* Lighter & richer grass green */
    border: 1.5px solid rgba(34, 197, 94, 0.48) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.45),
        inset -5px -5px 12px rgba(34, 197, 94, 0.45),
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.22) !important;
}

[data-theme="dark"] .court-board.sede-bru .court-lines {
    background: transparent !important;
}

[data-theme="dark"] .court-title,
[data-theme="dark"] #focus-court-container .court-title {
    color: #ffffff !important; /* Blanco de alta claridad como la barra lateral de alumnos/profesores activa */
}


[data-theme="dark"] .btn-arrow {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .btn-arrow:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--color-electric-blue) !important;
}

/* Lienzo de la línea de tiempo en Tema Oscuro */
[data-theme="dark"] .timeline-unified-canvas {
    background: var(--bg-color) !important;
}

[data-theme="dark"] .lt-main-line {
    background: rgba(5, 7, 13, 0.75) !important;
}

/* Tarjeta resumen del mes en la línea de tiempo */
[data-theme="dark"] .node-summary {
    background: rgba(26, 27, 32, 0.7) !important; /* Cristal oscuro ahumado obsidian */
    border: none !important;
    box-shadow:
        28px 36px 80px rgba(0, 0, 0, 0.65), /* Sombra externa profunda ULTRA extendida, desordenada y extensa */
        -24px -32px 72px rgba(255, 255, 255, 0.02), /* Brillo externo sutil ultra extendido */
        inset 0 0 0 1.5px rgba(255, 255, 255, 0.08) !important; /* Brillo interno perimetral perfectamente uniforme */
    color: var(--text-main) !important;
}

[data-theme="dark"] .node-summary {
    color: var(--text-main) !important;
}

/* Permitir que los colores específicos sobresalgan en modo oscuro */
[data-theme="dark"] .node-summary h4 {
    color: var(--color-electric-blue) !important;
}

[data-theme="dark"] .node-date {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Panel de auditoría lateral */
[data-theme="dark"] .audit-content {
    background: rgba(26, 27, 32, 0.85) !important;
    border-left: 1px solid var(--panel-border) !important;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.45) !important;
}

/* Spotlight modal */
[data-theme="dark"] .focus-container {
    /* Fondo Convexo Metálico Oscuro (igual al estilo de la carta de Objetivos Mensuales [data-theme="dark"] .node-summary) */
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.65) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    box-shadow: 
        16px 24px 48px rgba(0, 0, 0, 0.9), /* Sombra negra externa */
        -12px -16px 36px rgba(255, 255, 255, 0.05), /* Halo de luz exterior inverso */
        inset 2px 2px 4px rgba(255, 255, 255, 0.15), /* Rim de luz interna */
        inset -2px -2px 4px rgba(0, 0, 0, 0.5) !important; /* Rim de sombra interna */
    border: none !important;
}

[data-theme="dark"] .focus-content-grid {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .btn-close-focus {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
}

@media (hover: hover) {
    [data-theme="dark"] .btn-close-focus:hover {
        background: transparent !important;
        color: #ef4444 !important;
    }
}

[data-theme="dark"] .attendance-pill {
    background: rgba(255, 255, 255, 0.02) !important;
    color: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .attendance-pill:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transform: translateY(-1px) !important;
}

[data-theme="dark"] .attendance-pill.active {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 1px solid rgba(92, 115, 242, 0.35) !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.85),
        -2px -2px 8px rgba(255, 255, 255, 0.05),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .attendance-pill.active:hover {
    transform: translateY(-2px) !important;
    box-shadow: 
        6px 10px 18px rgba(0, 0, 0, 0.95),
        -2px -2px 8px rgba(255, 255, 255, 0.08),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.35),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
}

/* Placeholder styling for notes in light theme */
.focus-notes-area::placeholder {
    color: #475569 !important; /* Más oscuro para excelente legibilidad */
    opacity: 0.85 !important;
}

/* Dark Mode Overrides for Spotlight Modal Typography */
[data-theme="dark"] .focus-section-title {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .attendance-counter-text {
    color: #7e9dfc !important; /* Premium soft electric blue in dark theme */
}
[data-theme="dark"] .objective-card .label {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .objective-card .value {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .focus-notes-area::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

[data-theme="dark"] .focus-notes-area {
    background: rgba(10, 20, 50, 0.55) !important; /* Cobalto sapphire inset glass matching search bar */
    border: 1.5px solid rgba(92, 115, 242, 0.25) !important;
    color: #f1f5f9 !important;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.90), /* Intensified inset dark shadow */
        inset -5px -5px 12px rgba(92, 115, 242, 0.18), /* Sapphire backlight */
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .focus-notes-area:focus {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.90) 0%, rgba(15, 20, 30, 0.98) 100%) !important; /* Convex Metallic gradient */
    border: 1.5px solid rgba(92, 115, 242, 0.45) !important;
    color: #ffffff !important;
    transform: translateY(-4px) scale(1.01); /* Elevated shift */
    box-shadow: 
        12px 18px 36px rgba(0, 0, 0, 0.95), /* Enhanced floating dark shadow */
        -8px -10px 24px rgba(255, 255, 255, 0.05), /* Back glow */
        inset 2px 2px 4px rgba(255, 255, 255, 0.18), /* Rim luminoso */
        inset -2px -2px 4px rgba(0, 0, 0, 0.6) !important; /* Rim oscuro */
}

[data-theme="dark"] .column-filter-bubble {
    background: rgba(26, 27, 32, 0.95) !important;
    border: 1px solid var(--panel-border) !important;
    box-shadow: var(--shadow-premium) !important;
}

[data-theme="dark"] .column-filter-bubble .filter-option {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .column-filter-bubble .filter-option:hover {
    background: color-mix(in srgb, var(--table-accent-color) 10%, transparent) !important;
    color: var(--table-accent-color) !important;
}

/* Transiciones Globales para cambio de tema (Deshabilitadas para evitar parpadeos; gestionadas de forma instantánea o por View Transitions GPU)
html,
body,
.main-container,
.app-view,
.dashboard-panel,
.dashboard-nav-bar,
.sidebar,
.btn-sidebar,
.sidebar-group-header,
.th-label,
.court-title,
.court-ball-label,
.btn-day,
.btn-sede {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
*/

/* Botón del selector de tema y botón de hamburguesa con efectos neumórficos unificados */
.hamburger-btn {
    position: absolute !important;
    top: 22px !important;
    left: 22px !important;
    z-index: 10010 !important; /* Encima del menú lateral (sidebar) */
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    flex-direction: column;
    gap: 5px !important;
}

.theme-toggle-btn {
    position: absolute !important;
    top: 22px !important;
    right: 112px !important;
    left: auto !important;
    z-index: 9999 !important; /* Encima de todo */
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.theme-toggle-btn:active,
.hamburger-btn:active {
    transform: scale(0.95) !important;
}

.theme-icon.hidden {
    display: none !important;
}

@keyframes entranceFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 5px color-mix(in srgb, var(--table-accent-color) 20%, transparent);
    }

    50% {
        box-shadow: 0 0 20px color-mix(in srgb, var(--table-accent-color) 50%, transparent);
    }

    100% {
        box-shadow: 0 0 5px color-mix(in srgb, var(--table-accent-color) 20%, transparent);
    }
}

.hidden {
    display: none !important;
}

.ball-select-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
    margin-left: 15px;
    gap: 15px;
    /* Spacing between Filter Button and Search Group */
}

.search-group {
    position: relative;
    width: 36px;
    /* Start as a perfect circle/icon size */
    height: 36px;
    border-radius: 18px;
    background: transparent;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    overflow: hidden;
    /* This acts as the sliding window */
    cursor: pointer;
}

/* Background pill and expansion when active */
.search-group:hover,
.search-group:focus-within,
.search-group.has-content {
    width: 250px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.3s ease;
    pointer-events: none;
    /* Clicks pass through to the input padding */
    z-index: 2;
}

.search-group:hover .search-icon,
.search-group:focus-within .search-icon {
    color: var(--color-electric-blue);
}

.table-search {
    position: absolute;
    left: 0;
    top: 0;
    width: 250px;
    /* Always fixed width to prevent text sliding/glitching */
    height: 36px;
    border: none !important;
    background: transparent !important;
    padding: 0 10px 0 36px !important;
    /* Forces text to start strictly right of the icon */
    font-size: 0.9rem;
    outline: none;
    color: #444;
    cursor: pointer;
    box-sizing: border-box;
    opacity: 0;
    /* Hide placeholder when collapsed */
    transition: opacity 0.3s ease;
}

.search-group:hover .table-search,
.search-group:focus-within .table-search,
.search-group.has-content .table-search {
    opacity: 1;
    cursor: text;
}

/* ----- NAVEGACIÓN LATERAL (GLASS 50%) ----- */
.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor !important; /* Sigue dinámicamente el color del padre */
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.hamburger-btn:hover span {
    background: currentColor !important;
}

.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    transform: translate3d(-100%, 0, 0) !important;
    width: 320px;
    height: 100vh !important;
    background: var(--sidebar-bg) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 10005 !important;
    box-shadow: 12px 0 36px rgba(8, 12, 24, 0.14);
    transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1) !important;
    will-change: transform;
    padding: 100px 30px 40px;
    border-right: 1px solid var(--panel-border) !important;
    overflow-y: auto;
    overflow-x: hidden;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(43, 67, 241, 0.35) transparent;
}

/* Webkit scrollbar — sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(43, 67, 241, 0.3);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(43, 67, 241, 0.55);
    background-clip: padding-box;
}
[data-theme="dark"] .sidebar {
    scrollbar-color: rgba(92, 115, 242, 0.4) transparent;
}
[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb {
    background: rgba(92, 115, 242, 0.38);
    background-clip: padding-box;
}
[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 115, 242, 0.6);
    background-clip: padding-box;
}

.sidebar.open {
    transform: translate3d(0, 0, 0) !important;
}

.otc-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 22, 0.34);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 10004;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.14s ease;
}

body.sidebar-open .otc-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.otc-side-label-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.otc-side-label-icon svg {
    flex-shrink: 0;
}

.otc-sidebar-divider {
    height: 1px;
    margin: 6px 4px 4px;
    background: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .otc-sidebar-divider {
    background: rgba(255, 255, 255, 0.08);
}

#btn-side-view-landing {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 11px 14px !important;
    border-radius: 14px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.7px !important;
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #1e293b !important;
    box-shadow: none !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#btn-side-view-landing:hover {
    transform: scale(1.02) !important;
    background: #e0e7ff !important;
    border-color: #818cf8 !important;
    color: #1e3a8a !important;
}

[data-theme="dark"] #btn-side-view-landing {
    background: #1a2133 !important;
    border: 1.5px solid rgba(148, 163, 184, 0.32) !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] #btn-side-view-landing:hover {
    background: #232d45 !important;
    border-color: rgba(126, 157, 252, 0.5) !important;
    color: #ffffff !important;
}

/* Hamburger visible sobre el sidebar abierto - Light Mode */
body.sidebar-open .hamburger-btn {
    color: #94a3b8 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    outline: none !important;
}

/* Hamburger visible sobre el sidebar abierto - Dark Mode */
[data-theme="dark"] body.sidebar-open .hamburger-btn {
    color: #475569 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    outline: none !important;
}


.sidebar-header h3 {
    margin-bottom: 3rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-sidebar {
    background: transparent;
    border: 1px solid transparent;
    padding: 17px 24px;
    border-radius: 15px;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 600;
    color: #94a3b8 !important;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    min-width: 0;
}

.btn-sidebar:not(.active):hover {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #5b6e94 !important;
    box-shadow: none !important;
    transform: scale(1.05) translateX(4px) !important;
}

.btn-sidebar.active {
    background: rgba(43, 67, 241, 0.04) !important; /* Soft electric blue hue matching table search box */
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    color: #5b6e94 !important; /* Tema Claro Seleccionado: Gris azulado medio — igual que btn-sede.active */
    font-weight: 700;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
}

/* --- TEMA OSCURO --- */
[data-theme="dark"] .btn-sidebar {
    color: #94a3b8 !important; /* Tema Oscuro Inactivo: Gris claro elegante y legible (mismo color de texto de tarjetas Alumnos) */
}

[data-theme="dark"] .btn-sidebar:not(.active):hover {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transform: scale(1.05) translateX(4px) !important;
}

[data-theme="dark"] .btn-sidebar.active {
    background: rgba(10, 20, 50, 0.45) !important; /* Cobalto sapphire inset glass matching table search box */
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    color: #ffffff !important; /* Tema Oscuro Seleccionado: Blanco puro de máxima luz */
    font-weight: 700;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
}

/* Sidebar Accordion Groups */
.sidebar-group {
    border-radius: 14px;
    overflow: hidden;
}

.sidebar-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent !important;
    border: none;
    padding: 12px 6px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #94a3b8 !important; /* Tema Claro Inactivo: Gris claro elegante */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    text-align: left;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s ease !important;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}

/* Prevent group title text from wrapping — always one line */
.sidebar-group-header > span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* Chevron never shrinks */
.sidebar-group-header .group-chevron {
    flex-shrink: 0;
    margin-left: 6px;
}

.sidebar-group-header:focus,
.btn-sidebar:focus {
    outline: none !important;
}

.sidebar-group-header:focus-visible,
.btn-sidebar:focus-visible {
    outline: 2px solid var(--color-electric-blue) !important;
    outline-offset: 2px !important;
}

.sidebar-group-header:hover {
    background: transparent !important;
    transform: scale(1.04) !important; /* Escalamiento premium súper suave */
    color: #475569 !important; /* Tema Claro Hover: Gris medio-oscuro elegante */
}

/* --- TÍTULOS EN ESTADO CERRADO / PLEGADO (CÁPSULAS SÓLIDAS DE ALTO CONTRASTE POR MÓDULO) --- */
.sidebar-group:not(.open) .sidebar-group-header {
    padding: 10px 14px !important;
    border-radius: 14px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sidebar-group:not(.open) .sidebar-group-header:hover {
    transform: scale(1.02) !important;
    filter: brightness(0.97) !important;
}

[data-theme="dark"] .sidebar-group:not(.open) .sidebar-group-header:hover {
    filter: brightness(1.12) !important;
}

/* 1. Academia (Azul Marca) */
#group-academia:not(.open) .sidebar-group-header {
    background: #eef2ff !important;
    border: 1.5px solid #c7d2fe !important;
    color: #1e3a8a !important;
}

/* 2. Pro Series (Dorado Ámbar) */
#group-pro-series:not(.open) .sidebar-group-header {
    background: #fef3c7 !important;
    border: 1.5px solid #fcd34d !important;
    color: #92400e !important;
}

/* 3, 5, 6: Accesos directos de 1 clic (Clases Privadas, Usuarios, Publicaciones) */
#btn-side-clases-historial,
#btn-side-usuarios,
#btn-side-publicaciones {
    width: 100% !important;
    display: flex;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#btn-side-clases-historial svg,
#btn-side-usuarios svg,
#btn-side-publicaciones svg {
    color: currentColor;
    flex-shrink: 0;
}

#btn-side-clases-historial {
    background: #dcfce7 !important;
    border: 1.5px solid #86efac !important;
    color: #065f46 !important;
}

#btn-side-clases-historial:not(.active):hover {
    transform: scale(1.02) !important;
    filter: brightness(0.97) !important;
    background: #dcfce7 !important;
    border: 1.5px solid #86efac !important;
    color: #065f46 !important;
}

#btn-side-clases-historial.active {
    background: #bbf7d0 !important;
    border: 1.5px solid #16a34a !important;
    color: #064e3b !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.22) !important;
}

/* 4. Estadísticas (Cian / Azul Celeste Data Analytics - Exclusivo Master) */
#group-estadisticas:not(.open) .sidebar-group-header {
    background: #e0f2fe !important;
    border: 1.5px solid #7dd3fc !important;
    color: #0369a1 !important;
}

/* 5. Usuarios / Seguridad (Púrpura / Violeta Real - Exclusivo Master) */
#btn-side-usuarios {
    background: #f3e8ff !important;
    border: 1.5px solid #d8b4fe !important;
    color: #6b21a8 !important;
}

#btn-side-usuarios:not(.active):hover {
    transform: scale(1.02) !important;
    filter: brightness(0.97) !important;
    background: #f3e8ff !important;
    border: 1.5px solid #d8b4fe !important;
    color: #6b21a8 !important;
}

#btn-side-usuarios.active {
    background: #e9d5ff !important;
    border: 1.5px solid #9333ea !important;
    color: #581c87 !important;
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.22) !important;
}

/* 6. Publicaciones (Rosa Editorial - Exclusivo Master) */
#btn-side-publicaciones {
    background: #ffe4e6 !important;
    border: 1.5px solid #fda4af !important;
    color: #be123c !important;
}

#btn-side-publicaciones:not(.active):hover {
    transform: scale(1.02) !important;
    filter: brightness(0.97) !important;
    background: #ffe4e6 !important;
    border: 1.5px solid #fda4af !important;
    color: #be123c !important;
}

#btn-side-publicaciones.active {
    background: #fecdd3 !important;
    border: 1.5px solid #e11d48 !important;
    color: #881337 !important;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.22) !important;
}

/* --- TEMA OSCURO CERRADO --- */
[data-theme="dark"] .sidebar-group-header {
    color: #94a3b8 !important;
}

[data-theme="dark"] .sidebar-group-header:hover {
    color: #e2e8f0 !important;
}

[data-theme="dark"] #group-academia:not(.open) .sidebar-group-header {
    background: #172042 !important;
    border: 1.5px solid rgba(126, 157, 252, 0.42) !important;
    color: #c7d2fe !important;
    box-shadow: 0 0 12px rgba(43, 67, 241, 0.16) !important;
}

[data-theme="dark"] #group-pro-series:not(.open) .sidebar-group-header {
    background: #2b2010 !important;
    border: 1.5px solid rgba(251, 191, 36, 0.42) !important;
    color: #fde68a !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.16) !important;
}

[data-theme="dark"] #btn-side-clases-historial {
    background: #0f2920 !important;
    border: 1.5px solid rgba(52, 211, 153, 0.40) !important;
    color: #a7f3d0 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.16) !important;
}

[data-theme="dark"] #btn-side-clases-historial:not(.active):hover {
    filter: brightness(1.12) !important;
    background: #0f2920 !important;
    border: 1.5px solid rgba(52, 211, 153, 0.48) !important;
    color: #ffffff !important;
}

[data-theme="dark"] #btn-side-clases-historial.active {
    background: #13382b !important;
    border: 1.5px solid #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.36) !important;
}

[data-theme="dark"] #group-estadisticas:not(.open) .sidebar-group-header {
    background: #0e2438 !important;
    border: 1.5px solid rgba(56, 189, 248, 0.42) !important;
    color: #bae6fd !important;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.18) !important;
}

[data-theme="dark"] #btn-side-usuarios {
    background: #251738 !important;
    border: 1.5px solid rgba(192, 132, 252, 0.44) !important;
    color: #e9d5ff !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.20) !important;
}

[data-theme="dark"] #btn-side-usuarios:not(.active):hover {
    filter: brightness(1.12) !important;
    background: #251738 !important;
    border: 1.5px solid rgba(192, 132, 252, 0.55) !important;
    color: #ffffff !important;
}

[data-theme="dark"] #btn-side-usuarios.active {
    background: #331e4d !important;
    border: 1.5px solid #c084fc !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.38) !important;
}

[data-theme="dark"] #btn-side-publicaciones {
    background: #2f1520 !important;
    border: 1.5px solid rgba(251, 113, 133, 0.42) !important;
    color: #fecdd3 !important;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.18) !important;
}

[data-theme="dark"] #btn-side-publicaciones:not(.active):hover {
    filter: brightness(1.12) !important;
    background: #2f1520 !important;
    border: 1.5px solid rgba(251, 113, 133, 0.55) !important;
    color: #ffffff !important;
}

[data-theme="dark"] #btn-side-publicaciones.active {
    background: #421a2b !important;
    border: 1.5px solid #fb7185 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.36) !important;
}

@media (forced-colors: active) {
    .sidebar {
        background: Canvas !important;
        color: CanvasText !important;
        border-right: 1px solid CanvasText !important;
    }
    .sidebar-group:not(.open) .sidebar-group-header,
    #btn-side-clases-historial,
    #btn-side-usuarios,
    #btn-side-publicaciones,
    #btn-side-view-landing,
    .otc-ws-pill,
    .otc-ws-return-btn {
        background: ButtonFace !important;
        color: ButtonText !important;
        border: 1px solid ButtonText !important;
    }
}

.group-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sidebar-group.open .group-chevron {
    transform: rotate(180deg);
}

.sidebar-group-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.16s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.14s ease;
    padding: 0 0 0 10px;
}

.sidebar-group.open .sidebar-group-items {
    max-height: 500px;
    padding: 4px 0 8px 10px;
}

/* Smaller sidebar buttons inside groups */
.sidebar-group-items .btn-sidebar {
    font-size: 0.92rem;
    padding: 10px 14px;
    border-radius: 10px;
    white-space: nowrap;
}

/* ── Pro Series: Próximamente (En Desarrollo Activo) ── */
#group-pro-series .pro-series-options-container {
    display: none !important;
}

.pro-series-coming-soon-card {
    margin: 8px 10px 8px 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(217, 119, 6, 0.08);
    border: 1px dashed rgba(217, 119, 6, 0.35);
    display: flex;
    flex-direction: column;
    gap: 5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.pro-series-cs-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pro-series-cs-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d97706;
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.6);
    position: relative;
    flex-shrink: 0;
}

.pro-series-cs-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid #d97706;
    opacity: 0.6;
    animation: otc-pulse-amber 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes otc-pulse-amber {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(0.9); opacity: 0; }
}

.pro-series-cs-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #b45309;
}

.pro-series-cs-desc {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.74rem;
    line-height: 1.35;
    color: #92400e;
    opacity: 0.88;
}

/* Tema Oscuro */
[data-theme="dark"] .pro-series-coming-soon-card {
    background: rgba(245, 158, 11, 0.1);
    border: 1px dashed rgba(251, 191, 36, 0.35);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.08);
}

[data-theme="dark"] .pro-series-cs-dot {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

[data-theme="dark"] .pro-series-cs-dot::after {
    border-color: #f59e0b;
}

[data-theme="dark"] .pro-series-cs-title {
    color: #fde047;
}

[data-theme="dark"] .pro-series-cs-desc {
    color: #fef3c7;
    opacity: 0.75;
}


/* Sub-section labels inside accordion groups */
.sidebar-subgroup-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    padding: 6px 18px 2px;
    pointer-events: none;
    user-select: none;
}

/* Título de categoría cuando está DESPLEGADO (.open) en Tema Claro (Mismo tono de letras que cápsulas de tarjetas var(--text-muted) / #64748b) */
.sidebar-group.open .sidebar-group-header {
    color: var(--text-muted) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 6px !important;
    border-radius: 0 !important;
}

.sidebar-group.open .sidebar-group-header .group-chevron {
    transform: rotate(180deg) !important;
    color: var(--text-muted) !important;
    stroke: var(--text-muted) !important;
}

/* Ítems internos del menú desplegado en Tema Claro (Mismo peso ligero 550 y tono gris suave que Alumnos, Profesores, Canchas en las tarjetas) */
.sidebar-group-items .btn-sidebar,
.sidebar-group-items .sidebar-link,
.sidebar-group-items .sidebar-item {
    font-size: 0.86rem !important;
    font-weight: 550 !important;
    color: #64748b !important;
    opacity: 0.92 !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
}

.sidebar-group-items .btn-sidebar svg,
.sidebar-group-items .sidebar-link svg,
.sidebar-group-items .sidebar-item svg {
    stroke: #64748b !important;
    color: #64748b !important;
    opacity: 0.9 !important;
}

.sidebar-group-items .btn-sidebar:hover,
.sidebar-group-items .sidebar-link:hover,
.sidebar-group-items .sidebar-item:hover {
    color: #2563eb !important;
    background: rgba(37, 99, 235, 0.08) !important;
}

.sidebar-group-items .btn-sidebar:hover svg,
.sidebar-group-items .sidebar-link:hover svg,
.sidebar-group-items .sidebar-item:hover svg {
    stroke: #2563eb !important;
    color: #2563eb !important;
}

/* Título de categoría cuando está DESPLEGADO (.open) en Tema Oscuro */
[data-theme="dark"] .sidebar-group.open .sidebar-group-header {
    color: #f8fafc !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 6px !important;
}

[data-theme="dark"] .sidebar-group.open .sidebar-group-header .group-chevron {
    transform: rotate(180deg) !important;
    color: #f8fafc !important;
    stroke: #f8fafc !important;
}

[data-theme="dark"] .sidebar-group-items .btn-sidebar,
[data-theme="dark"] .sidebar-group-items .sidebar-link,
[data-theme="dark"] .sidebar-group-items .sidebar-item {
    color: #f8fafc !important;
}

[data-theme="dark"] .sidebar-group-items .btn-sidebar svg,
[data-theme="dark"] .sidebar-group-items .sidebar-link svg,
[data-theme="dark"] .sidebar-group-items .sidebar-item svg {
    stroke: #f8fafc !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .sidebar-group-items .btn-sidebar:hover,
[data-theme="dark"] .sidebar-group-items .sidebar-link:hover,
[data-theme="dark"] .sidebar-group-items .sidebar-item:hover {
    color: #60a5fa !important;
    background: rgba(59, 130, 246, 0.15) !important;
}

[data-theme="dark"] .sidebar-group-items .btn-sidebar:hover svg,
[data-theme="dark"] .sidebar-group-items .sidebar-link:hover svg,
[data-theme="dark"] .sidebar-group-items .sidebar-item:hover svg {
    stroke: #60a5fa !important;
    color: #60a5fa !important;
}

/* MARCADOR DE HOY (CALENDARIO SEMANAL) */
.btn-day.is-today:not(.active) {
    border: 1.5px solid #5b6e94 !important;
}
[data-theme="dark"] .btn-day.is-today:not(.active) {
    border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
}

html, body {
    touch-action: manipulation;
}

body {
    background: transparent !important;
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Fondos de alto rendimiento con aceleración por hardware (evita titileos por repaint) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1000;
    background: #ffffff !important;
    background-image: linear-gradient(135deg, #ffffff 0%, #f4f7fc 40%, #e3ebf7 100%) !important;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -999;
    background: #090a0d !important;
    background-image: radial-gradient(circle at 50% 50%, #1a1c24 0%, #090a0d 100%) !important;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Control de visibilidad de los fondos según el tema */
[data-theme="dark"] body::before {
    opacity: 0;
}

[data-theme="dark"] body::after {
    opacity: 1;
}

.main-container {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent !important;
}

.app-view {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    background: transparent !important;
    animation: var(--entrance-anim);
}

.dashboard-view {
    overflow: visible !important;
    height: auto !important;
    padding-bottom: 30px !important;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    display: block;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color) !important;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-color) !important;
    border-radius: 6px;
    border: 2px solid transparent !important;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover-color) !important;
}

html, body, * {
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color) !important;
    scrollbar-width: thin !important;
}

.table-container {
    display: flex;
    flex-direction: column;
    overflow: visible;
    width: 100%;
    margin: 0;
    padding: 1.5rem;
}


/* HEADER Y TITULO */
.header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    /* Pegados uno encima de otro */
}

.logo-liquid-container {
    width: 300px;
    /* Reducido a la mitad */
    display: flex;
    justify-content: center;
    position: relative;
}

.liquid-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* mix-blend-mode removido: el filtro SVG ahora extrae el alfa automáticamente */
    animation: heatShimmer 4s infinite alternate ease-in-out;
    margin-bottom: 25px;
    /* El nuevo filtro SVG ya incluye el efecto de Molde (Inner Shadow profundo) y calentamiento */
    filter: url('#mold-carve');
}

@keyframes heatShimmer {
    0% {
        filter: url('#mold-carve') brightness(1) saturate(1);
        transform: scale(1);
    }

    100% {
        filter: url('#mold-carve') brightness(1.1) saturate(1.2);
        transform: scale(1.02);
    }
    position: relative;
    z-index: 10;
}

.subtitle-carved {
    color: #c9d6e6;
    /* Gris azulado profundo hundiéndose en el fondo */
    text-shadow:
        2px 2px 3px rgba(255, 255, 255, 0.9),
        -1px -1px 2px rgba(0, 0, 0, 0.3);
}

/* BOTONES SEDE */
.dashboard-left-selector {
    position: fixed;
    top: 50%;
    right: 40px; /* Mirroring timeline-side-selector */
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.dashboard-left-selector .btn-sede {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: transparent;
    border: none;
    box-shadow: none;
    font-weight: 800;
    font-size: 0.8rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.dashboard-left-selector .btn-sede.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    color: #5b6e94 !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 
        5px 6px 16px rgba(163, 177, 198, 0.35),
        -5px -5px 14px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: scale(1.15) translateY(-2px);
    font-weight: 900;
}



/* Disable liquid effect for dashboard buttons to match timeline */
.dashboard-left-selector .btn-sede .liquid {
    display: none !important;
}

.dashboard-left-selector .btn-sede:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

.dashboard-left-selector .btn-sede:hover:not(.active) span {
    color: #64748b !important;
}

[data-theme="dark"] .dashboard-left-selector .btn-sede:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .dashboard-left-selector .btn-sede:hover:not(.active) span {
    color: #ffffff !important;
}


.court-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 380px;
    /* Rigurosamente alineado a los paralelos de la cancha */
    box-sizing: border-box;
    padding-bottom: 5px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    /* Distancia entre botón Pelota y Botón minimizar (-) */
}

.court-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #5b6e94 !important; /* Mismo color Slate Blue premium de alumnos/profesores/barra lateral */
    letter-spacing: -0.3px;
}

.court-ball-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8; /* Beautiful premium light Slate grey */
    letter-spacing: 0.1px;
}

.dashboard-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    margin-bottom: 0;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 1100;
    background: var(--bg-color); /* Explicitly white/dark but matches background */
    border: none !important;
    box-shadow: none !important;
}

.nav-group-left,
.nav-group-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.locations-section {
    display: flex;
    justify-content: flex-end;
    padding-right: 60px;
    gap: 1.2rem;
}

.btn-sede {
    position: relative;
    width: 90px;
    height: 38px;
    border: none;
    background: transparent;
    color: #5b6e94;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-sede.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 14px;
    color: #5b6e94 !important;
    box-shadow:
        5px 6px 16px rgba(163, 177, 198, 0.35), /* Sombra externa principal */
        -5px -5px 14px rgba(255, 255, 255, 0.9), /* Brillo externo */
        inset 1px 1px 2px rgba(255, 255, 255, 1), /* Rim interno luminoso */
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important; /* Rim interno de sombra */
    transform: scale(1.08) translateY(-2px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.liquid {
    position: absolute;
    bottom: -250%;
    left: -20%;
    width: 140%;
    height: 350%;
    /* Súper alto para cubrir el barrido */
    /* El gradiente exacto de GameMind suave */
    background: linear-gradient(180deg,
            #00235B 0%,
            #0066FF 30%,
            #00AAFF 45%,
            #00AAFF 55%,
            #0066FF 70%,
            #00235B 100%);
    background-size: 100% 250%;
    animation: gmPlasmaFlow 8s linear infinite;
    /* Animación de barrido súper lenta (8s) */
    transition: bottom 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
    z-index: 1;
    /* Efecto de olas de agua muy suaves */
    filter: url('#liquid');
    opacity: 0;
}

/* La animación vertical infinita exacta de GameMind */
@keyframes gmPlasmaFlow {
    0% {
        background-position: center 200%;
    }

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

/* El efecto wave rotando (no usado en liquid SVG, pero mantenido por si acaso) */
@keyframes waveRotate {
    0% {
        transform: rotate(0deg);
    }

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

.btn-sede.active .liquid {
    display: none !important;
}

/* CALENDARIO & CONTROLES SUPERIORES (RE-STYLING) */
.dashboard-right-selector {
    position: fixed;
    top: 50%;
    left: 40px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 1500;
}

.calendar-nav-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.calendar-days-vertical {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-section {
    display: none;
}

.calendar-days {
    display: flex;
    gap: 1rem;
}

.btn-day {
    position: relative;
    width: 65px;
    height: 38px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    flex-shrink: 0;
}

.btn-day * {
    pointer-events: none !important;
}

.btn-day .day-name-desktop {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
    line-height: 1;
    margin-bottom: 2px;
}

.btn-day .day-name-mobile {
    display: none;
}

.btn-day .day-number {
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.btn-day.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    color: #5b6e94 !important;
    border-radius: 12px !important;
    box-shadow: 
        5px 6px 16px rgba(163, 177, 198, 0.35),
        -5px -5px 14px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: scale(1.1) translateY(-2px);
    font-weight: 900;
}

.btn-day:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

.btn-day:hover:not(.active) span {
    color: #64748b !important;
}

[data-theme="dark"] .btn-day:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .btn-day:hover:not(.active) span {
    color: #ffffff !important;
}




.btn-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.2rem;
    color: #cbd5e1;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-arrow:hover {
    background: #ffffff;
    color: var(--color-electric-blue);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.btn-arrow:hover {
    color: #333;
}

.right-arrow-container {
    display: flex;
    flex-direction: row;
    /* Aligned with days */
    align-items: center;
    position: relative;
}

.icon-relative {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.btn-calendar-icon.small {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #cbd5e1;
}

.btn-calendar-icon.small:hover {
    background: #ffffff;
    transform: scale(1.1);
    color: var(--color-electric-blue);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.btn-calendar-icon.small:hover {
    transform: scale(1.1);
    color: var(--color-electric-blue);
}

.btn-calendar-icon.small:active {
    box-shadow: none;
    transform: scale(0.95);
}


/* DASHBOARDS HORARIOS */
.dashboards-section { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4rem; padding: 120px 120px 60px 120px; height: auto !important; overflow: visible !important; background: transparent; box-sizing: border-box; }

.dashboards-section::-webkit-scrollbar { display: none; }

.dashboard-panel {
    /* Fondo Convexo Cristalino Claro para el Contenedor Masivo */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 245, 255, 0.65) 100%) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: none !important;
    border-radius: 36px;
    padding: 2.5rem;

    /* Sombras y Luces Escala Masiva Convex Glass */
    box-shadow:
        20px 24px 60px rgba(163, 177, 198, 0.35), /* Sombra externa profunda más suave */
        -20px -24px 60px rgba(255, 255, 255, 0.9), /* Brillo externo superior-izquierdo */
        inset 2px 2px 4px rgba(255, 255, 255, 1), /* Rim direccional de luz interno */
        inset -2px -2px 4px rgba(163, 177, 198, 0.15) !important; /* Rim direccional oscuro interno */

    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
}

/* Fondo Convexo Metálico Oscuro para el Panel de Canchas */
[data-theme="dark"] .dashboard-panel {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.65) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    box-shadow: 
        20px 24px 60px rgba(0, 0, 0, 0.45), /* Sombra negra más suave */
        -16px -24px 48px rgba(255, 255, 255, 0.03), /* Halo exterior inverso escalado */
        inset 2px 2px 4px rgba(255, 255, 255, 0.1), /* Rim interno de luz direccional */
        inset -2px -2px 4px rgba(0, 0, 0, 0.3) !important; /* Rim interno de sombra direccional */
}



.dashboard-panel:hover {
    transform: translateY(-5px);
    /* Pequeño salto al pasar el mouse para reforzar el 3D */
}

/* ESTILOS PARA SELECCIÓN DE HORA EN BARRA LATERAL */
.btn-hour-select {
    position: relative;
    width: 65px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8; /* Inactivo Claro: gris pizarra elegante */
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: none;
}

.btn-hour-select * {
    pointer-events: none !important;
}

.btn-hour-select .hour-time {
    font-size: 0.72rem;
    font-weight: 700;
}

.btn-hour-select .hour-ampm {
    font-size: 0.58rem;
    font-weight: 600;
    margin-left: 2px;
    opacity: 0.8;
}

.btn-hour-select.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    color: #5b6e94 !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 
        5px 6px 16px rgba(163, 177, 198, 0.35),
        -5px -5px 14px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: scale(1.1) translateY(-2px) !important;
    font-weight: 900;
}

.btn-hour-select:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

.btn-hour-select:hover:not(.active) span {
    color: #64748b !important;
}

[data-theme="dark"] .btn-hour-select:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .btn-hour-select:hover:not(.active) span {
    color: #ffffff !important;
}



.panel-title {
    color: #555;
    display: none;
    text-shadow: 1px 1px 2px white;
}

.courts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 3rem;
    width: 100%;
}

.court-card {
    flex: 0 1 400px;
    min-width: 320px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    background: transparent !important; /* Fuerza transparencia total */
}

.court-header {
    background: transparent !important;
}

.btn-remove-court {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    /* like Chrome header buttons hover */
    margin-left: 5px;
}

.btn-remove-court::before {
    content: "";
    /* The little dash minus (-) */
    display: block;
    width: 12px;
    height: 2px;
    background-color: #999;
}

.btn-remove-court:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-remove-court:hover::before {
    background-color: #333;
}

.court-header-unused {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 380px;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Para separar la pelota del texto al seleccionar */
}

.pelota-options {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    /* Un poco menos transparente que antes */
    backdrop-filter: blur(10px);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    list-style: none;
    z-index: 10;
    min-width: 120px;
    overflow: hidden;
}

.pelota-options.open {
    display: block;
}

.pelota-options li {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    font-weight: 500;
}

.pelota-options li:hover {
    background: rgba(0, 0, 0, 0.05);
}

.otc-ball-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: relative;
    box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    overflow: hidden !important;
    /* Total containment */
    contain: paint;
    /* Forced isolation for artifacts */
}

.otc-ball-marker::before,
.otc-ball-marker::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    top: 0;
    box-sizing: border-box;
}

.otc-ball-marker::before {
    left: -70%;
}

.otc-ball-marker::after {
    right: -70%;
}

.otc-ball-marker.yellow {
    background: #d4f000 !important;
}

.otc-ball-marker.green {
    background: #228b22 !important;
}

.otc-ball-marker.orange {
    background: #ff8c00 !important;
}

.otc-ball-marker.red {
    background: #ff0000 !important;
}

.otc-ball-marker.grey {
    background: #a9a9a9 !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.otc-ball-marker.white {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* COLORES DINÁMICOS POR SEDE */
.court-board {
    width: 380px;
    height: 460px;
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    background: rgba(43, 67, 241, 0.05) !important; /* Inset sapphire tint matching search bar */
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    padding: 30px;
    overflow: hidden;
    box-shadow: 
        inset 5px 5px 10px rgba(0, 0, 0, 0.24),
        inset -5px -5px 12px rgba(255, 255, 255, 0.98),
        inset 0 0 14px rgba(43, 67, 241, 0.25) !important;
}



/* Efecto Liquido en canchas */
.liquid-court {
    position: absolute;
    bottom: -150%;
    left: -20%;
    width: 140%;
    height: 150%;
    background: transparent;
    transition: bottom 0.8s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.8s ease;
    z-index: 0;
    /* Behind court lines */
    opacity: 0.2;
    /* Transparencia fina aguada requerida */
}

.btn-pelota {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    /* Space between ball and text */
}

.btn-pelota:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-pelota .ball-inline {
    flex-direction: column;
    /* Match user image: Ball on top, text below */
    gap: 2px;
}

.btn-pelota .caret {
    font-size: 0.6rem;
    color: #888;
    margin-left: 2px;
}


/* Líneas de Cancha Completas */
.court-lines {
    position: absolute;
    top: 5%;
    bottom: 5%;
    left: 5%;
    right: 5%;
    border: 2px solid var(--court-lines);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    /* 3D depth */
    display: flex;
    pointer-events: none;
    /* Que no bloqueen clics */
    z-index: 1;
    border-radius: 6px;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.singles-area {
    border-left: 2px solid var(--court-lines);
    border-right: 2px solid var(--court-lines);
    flex: 1;
    margin: 0 5%;
    /* doubles alley width muy pequeño (5%), priorizando singles */
    position: relative;
}

.service-line {
    position: absolute;
    top: 25%;
    bottom: 25%;
    left: 0;
    right: 0;
    border-top: 2px solid var(--court-lines);
    border-bottom: 2px solid var(--court-lines);
}

.center-mark {
    position: absolute;
    top: 25%;
    bottom: 25%;
    left: 50%;
    border-left: 2px solid var(--court-lines);
    transform: translateX(-50%);
}

.court-net {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--court-lines);
    transform: translateY(-50%);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.court-board.fill-amarilla,
.court-board.fill-verde,
.court-board.fill-naranja,
.court-board.fill-roja {
    background: transparent; /* Permitir que se vea el fondo de la sede */
}

/* PRIORIDAD MÁXIMA: COLORES POR SEDE (GRAND SLAM THEMES) */
.court-board.sede-vat {
    background: rgba(43, 67, 241, 0.30) !important;
    border: 1.5px solid rgba(43, 67, 241, 0.48) !important;
    box-shadow: 
        inset 5px 5px 10px rgba(0, 0, 0, 0.24),
        inset -5px -5px 12px rgba(255, 255, 255, 0.98),
        inset 0 0 14px rgba(43, 67, 241, 0.25) !important;
}

.court-board.sede-vat .court-lines {
    background: transparent !important;
}

.court-board.sede-ctc {
    background: rgba(234, 88, 12, 0.30) !important;
    border: 1.5px solid rgba(234, 88, 12, 0.48) !important;
    box-shadow: 
        inset 5px 5px 10px rgba(0, 0, 0, 0.24),
        inset -5px -5px 12px rgba(255, 255, 255, 0.98),
        inset 0 0 14px rgba(234, 88, 12, 0.25) !important;
}

.court-board.sede-ctc .court-lines {
    background: transparent !important;
}

.court-board.sede-bru {
    background: rgba(22, 163, 74, 0.30) !important;
    border: 1.5px solid rgba(22, 163, 74, 0.48) !important;
    box-shadow: 
        inset 5px 5px 10px rgba(0, 0, 0, 0.24),
        inset -5px -5px 12px rgba(255, 255, 255, 0.98),
        inset 0 0 14px rgba(22, 163, 74, 0.25) !important;
}

.court-board.sede-bru .court-lines {
    background: transparent !important;
}

/* SECCIONES DENTRO DE CANCHA */
.otc-view-panel {
    display: none;
    padding: 30px;
    animation: fadeIn 0.4s ease;
    overflow-y: auto;
}

.section-drop {
    display: flex;
    z-index: 3;
    position: absolute;
    left: 5%;
    right: 5%;
}

.court-top.section-drop {
    top: 5%;
    height: 20%;
    /* Cubre exactamente el espacio entre la línea de base y la de saque */
    justify-content: center;
    align-items: center;
    padding: 0;
}

.court-board {
    z-index: 1;
    /* For stacking context */
}

/* Remove section drops limitations */
.section-drop {
    display: none;
}

/* Controles de añadir (+) ahora flotan abajo en la cancha de manera de fondo oscuro sutil */
.court-add-buttons {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-around;
    z-index: 5;
    pointer-events: none;
    /* Let clicks pass through empty spaces */
}

.btn-empty-add {
    background: rgba(255, 255, 255, 0.8);
    /* 80% white opacity for solid look */
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 8px 16px;
    color: #334155;
    /* Dark slate gray */
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05);
    /* 3D Depth */
    text-shadow: none;
    text-transform: none;
    /* Title case from HTML */
    letter-spacing: 0.2px;
}

.btn-empty-add:hover {
    background: rgba(255, 255, 255, 1.0);
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    color: var(--color-electric-blue);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-empty-add:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-icon.absolute-drag {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -50%);
    /* Centra el botón justo en el puntero */
}

.btn-alumno .level,
.btn-prof .level {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--color-naranja);
    color: white !important;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #334155;
    /* Gris oscuro solicitado */
    padding: 5px 10px;
    border-radius: 15px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   PROFESSOR TOP ZONE (centered at top)
═══════════════════════════════════════════ */
.court-prof-container {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    z-index: 20;
}

.court-prof-container .btn-prof {
    pointer-events: auto;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #5b6e94 !important;
    font-family: 'Outfit', sans-serif !important;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow:
        3px 5px 12px rgba(163, 177, 198, 0.55),
        -3px -4px 10px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.95),
        inset -1px -1px 2px rgba(163, 177, 198, 0.2) !important;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    white-space: nowrap;
    left: auto !important;
    top: auto !important;
    position: relative !important;
    transform: none !important;
    animation: profFloat 3s ease-in-out infinite;
}

.court-prof-container .btn-prof:nth-child(2) {
    animation-delay: 0.5s;
}

.court-prof-container .btn-prof:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(235, 242, 255, 0.85) 100%) !important;
    color: #5b6e94 !important;
    transform: translateY(-2px) !important;
    box-shadow:
        4px 6px 14px rgba(163, 177, 198, 0.65),
        -4px -5px 12px rgba(255, 255, 255, 1),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
}

/* ═══════════════════════════════════════════
   STUDENT AVATARS — same pill style as professors
   ═══════════════════════════════════════════ */
.student-avatar {
    position: absolute;
    z-index: 15;
    cursor: pointer;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #5b6e94 !important;
    font-family: 'Outfit', sans-serif !important;
    white-space: nowrap;
    width: max-content;
    box-shadow:
        3px 5px 12px rgba(163, 177, 198, 0.55),
        -3px -4px 10px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.95),
        inset -1px -1px 2px rgba(163, 177, 198, 0.2) !important;
    animation: avatarFloat 3s ease-in-out infinite;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    user-select: none;
}

.student-avatar:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(235, 242, 255, 0.85) 100%) !important;
    color: #5b6e94 !important;
    transform: translateX(-50%) translateY(-2px) !important;
    box-shadow:
        4px 6px 14px rgba(163, 177, 198, 0.65),
        -4px -5px 12px rgba(255, 255, 255, 1),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    z-index: 25;
}

/* Separate float keyframe for professors (no translateX needed) */
@keyframes profFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes avatarFloat {

    0%,
    100% {
        transform: translateX(-50%) translateY(0px);
    }

    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}


/* ═══════════════════════════════════════════
   AVATAR POPUP CARD (glassmorphic)
═══════════════════════════════════════════ */
.avatar-popup {
    position: fixed;
    z-index: 99999;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    padding: 18px 20px 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: popupFade 0.18s ease;
    pointer-events: auto;
}

@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
    }

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

.avatar-popup-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22), inset 0 2px 5px rgba(255, 255, 255, 0.25);
    border: 2.5px solid rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}

.avatar-popup-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    text-align: center;
}

.avatar-popup-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 500;
    flex-wrap: wrap;
    justify-content: center;
}

.avatar-popup-status {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    border-radius: 6px;
    padding: 1px 7px;
    font-weight: 700;
    font-size: 0.72rem;
}

.avatar-popup-asig {
    font-size: 0.76rem;
    color: #475569;
    text-align: center;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    width: 100%;
    font-weight: 500;
}

/* Dark Theme for Student Avatar Popup Card */
[data-theme="dark"] .avatar-popup {
    background: linear-gradient(145deg, rgba(30, 38, 55, 0.85) 0%, rgba(13, 17, 28, 0.98) 100%) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: none !important;
    box-shadow: 
        16px 20px 48px rgba(0, 0, 0, 0.85),
        -8px -8px 24px rgba(255, 255, 255, 0.03),
        inset 1.5px 1.5px 2.5px rgba(255, 255, 255, 0.12),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .avatar-popup-name {
    color: #ffffff !important;
}

[data-theme="dark"] .avatar-popup-asig {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
}


/* DROPUP LOGIC FOR TABLES */
.otc-td.dropup .otc-td-menu {
    top: auto;
    bottom: 100%;
    margin-bottom: 5px;
    margin-top: 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
}

/* DROP-LEFT LOGIC (Borde Derecho) */
.otc-td.drop-left .otc-td-menu,
.otc-multiselect-container.drop-left .otc-ms-dropdown,
.otc-timepicker-container.drop-left .otc-tp-dropdown,
.otc-datepicker-wrapper.drop-left .otc-dp-dropdown {
    left: auto !important;
    right: 0 !important;
    transform-origin: top right !important;
}

/* DROPUP + DROP-LEFT (Animación desde esquina inferior derecha) */
.otc-td.dropup.drop-left .otc-td-menu,
.otc-multiselect-container.dropup.drop-left .otc-ms-dropdown,
.otc-timepicker-container.dropup.drop-left .otc-tp-dropdown,
.otc-datepicker-wrapper.dropup.drop-left .otc-dp-dropdown {
    transform-origin: bottom right !important;
}

/* Soporte para componentes en premium-tables (UNIFIED) */
.otc-ms-options {
    max-height: 450px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 5px;
}

/* .is-ms-item.active {
    background: var(--timeline-badge-bg) !important;
    color: var(--color-electric-blue) !important;
    font-weight: 600;
} */

.otc-tp-cols {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: transparent !important;
    border-radius: 12px;
}

.otc-tp-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 56px;
}

.otc-tp-col:first-child {
    min-width: 72px; /* Espacio moderado para la columna de horas */
}

.otc-tp-unit {
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s ease;
    color: #475569;
}

.otc-tp-unit:hover {
    background: var(--timeline-badge-bg) !important;
    color: var(--table-accent-color) !important;
}

.otc-tp-unit.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    color: #5b6e94 !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow:
        3px 4px 12px rgba(163, 177, 198, 0.32),
        -3px -3px 10px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.12) !important;
    transform: translateY(-1px) scale(1.04) !important;
}

.otc-td.is-time .otc-td-menu {
    width: auto !important;
    min-width: 240px;
}

.otc-td.is-multi .otc-td-menu {
    min-width: 600px;
    padding: 10px;
}

/* NEW: 2-Column Days/Ball styles */
.day-row.active-edit {
    background: var(--timeline-badge-bg) !important;
    border: 1.5px solid var(--table-accent-color) !important;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--table-accent-color) 10%, transparent) !important;
}

.day-row.checked {
    color: var(--table-accent-color) !important;
}


/* ----- DRAG AND DROP ZONE ----- */
.trash-zone {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #ef4444; 
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99999;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.trash-zone.active {
    bottom: 30px;
}

.trash-zone.dragover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(-50%) scale(1.05);
    border-color: #ef4444;
    box-shadow: 0 20px 45px rgba(239, 68, 68, 0.2);
}

/* ----- CUSTOM CALENDAR GLASSMORPHISM ----- */
.flatpickr-calendar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.1) !important;
    border-radius: 15px !important;
}

.flatpickr-day.selected {
    background: var(--color-electric-blue) !important;
    border-color: var(--color-electric-blue) !important;
}

.empty-user {
    opacity: 0.5;
}

.btn-add-court {
    display: none;
    /* Managed via Crear Canchas config table */
}

.lt-zoom-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 8px;
    min-width: 60px;
    text-align: center;
    letter-spacing: 0.05em;
}

/* ----- APP VIEWS (ROUTING) ----- */
.hidden-view,
.app-view[style*="display: none"] {
    display: none !important;
}

.view-switch-section {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.btn-view {
    background: transparent;
    border: 2px solid transparent;
    padding: 0.8rem 2.5rem;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    box-shadow:
        5px 5px 10px rgba(0, 0, 0, 0.05),
        -5px -5px 10px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-view:hover {
    box-shadow:
        inset 2px 2px 5px rgba(0, 0, 0, 0.05),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8);
    color: var(--color-electric-blue);
}

.btn-view.active {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    border-radius: 12px;
    color: #666;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view.active:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    color: var(--color-electric-blue);
    transform: translateY(-2px);
}

/* ----- DATA TABLE VIEWS: all 4 tables share the same full-screen panel layout ----- */
#view-tablas,
#view-profesores,
#view-planificacion,
#view-crear-canchas,
#view-usuarios,
#view-clases-historial {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 0 15px 20px !important;
    background: transparent !important; /* Permitir que se vea el fondo Y2K cromo perimetral */
    z-index: 10;
    overflow: hidden;
}

.table-container,
[data-theme="dark"] .table-container {
    width: 100%;
    max-width: 100%;
    margin: 8px auto 18px !important;
    background: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 1rem;
    padding: 12px 28px 28px !important;
    box-sizing: border-box;
}

/* ==========================================================================
   MODERN PREMIUM TABLE HEADERS (v1035)
   Unified Horizontal Control Bar
   ========================================================================== */
.table-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 16px;
    margin-bottom: 4px;
    background: transparent !important;
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .table-header-premium {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left-group h2 {
    margin: 0;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: #64748b !important; /* Gris unificado elegante como la línea de tiempo de meses */
    letter-spacing: -0.3px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

[data-theme="dark"] .header-left-group h2 {
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.header-status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    background: transparent;
    border: none;
}

.selection-badge {
    background: var(--table-accent-color) !important;
    color: white !important;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 20px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--table-accent-color) 30%, transparent) !important;
}

.selection-badge.visible {
    display: block;
    opacity: 1;
    transform: scale(1);
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Modern Pill Search */
.search-pill-modern {
    position: relative;
    width: 280px;
    transition: width 0.3s ease;
}

.search-pill-modern:focus-within {
    width: 340px;
}

.search-pill-modern input {
    width: 100% !important;
    height: 42px !important;
    padding: 0 18px 0 42px !important;
    font-size: 0.88rem !important;
    border-radius: 50px !important;
    background: rgba(43, 67, 241, 0.04) !important; /* Soft electric blue hue */
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    color: var(--text-main) !important;
}

.search-pill-modern input:focus {
    background: rgba(43, 67, 241, 0.07) !important; /* Slightly richer hue */
    border-color: rgba(43, 67, 241, 0.35) !important;
    box-shadow: 
        inset 3px 3px 8px rgba(0, 0, 0, 0.12),
        inset -3px -3px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 12px rgba(43, 67, 241, 0.08) !important;
    outline: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.search-pill-modern .lupa-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #cbd5e1;
    pointer-events: none;
    transition: color 0.3s;
}

.search-pill-modern input:focus + .lupa-icon {
    color: var(--color-electric-blue);
}

/* Action Icon Group (Suspended) */
.action-pill-group {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 4px;
    border: none;
    flex-shrink: 0;
}

.btn-icon-premium {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #cbd5e1;
}

.btn-icon-premium:hover {
    background: white;
    color: var(--color-electric-blue);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.btn-icon-premium.btn-danger-alt:hover {
    color: #ef4444;
}

.btn-icon-premium.active {
    background: white;
    color: var(--color-electric-blue);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.btn-icon-premium svg {
    width: 18px;
    height: 18px;
}

.btn-icon-premium.hidden {
    display: none;
}

.btn-primary-pill {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.78) 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #5b6e94 !important;
    padding: 0 24px !important;
    height: 42px !important;
    border-radius: 50px !important;
    font-size: 0.88rem !important;
    font-weight: 900 !important;
    border: none !important;
    cursor: pointer;
    transition: transform 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
    box-shadow:
        5px 6px 16px rgba(163, 177, 198, 0.35),
        -5px -5px 14px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}

.btn-primary-pill:hover {
    transform: translateY(-2px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(240, 245, 255, 0.8) 100%) !important;
    box-shadow:
        6px 8px 18px rgba(163, 177, 198, 0.38),
        -6px -6px 16px rgba(255, 255, 255, 0.95),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.12) !important;
}

.btn-primary-pill svg {
    width: 18px;
    height: 18px;
}

.table-scroll {
    /* height must be fixed so the bottom (horizontal scrollbar) stays on screen */
    height: calc(100vh - 180px);
    /* 60px nav + 60px controls + 60px padding */
    max-height: calc(100vh - 180px);
    overflow-x: scroll !important;
    overflow-y: auto;
    scrollbar-color: rgba(43, 67, 241, 0.22) rgba(43, 67, 241, 0.02);
    scrollbar-width: thin;
}

/* Premium Custom Scrollbars for Chrome, Safari, and Edge */
.table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
    background: rgba(43, 67, 241, 0.02) !important;
    border-radius: 6px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: rgba(43, 67, 241, 0.22) !important;
    border-radius: 6px;
    border: 2px solid transparent !important;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(43, 67, 241, 0.45) !important;
}

.table-scroll::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Override de Scrollbars en Tema Oscuro */
[data-theme="dark"] .table-scroll {
    scrollbar-color: rgba(92, 115, 242, 0.40) rgba(10, 20, 50, 0.15);
}

[data-theme="dark"] .table-scroll::-webkit-scrollbar-track {
    background: rgba(10, 20, 50, 0.15) !important;
}

[data-theme="dark"] .table-scroll::-webkit-scrollbar-thumb {
    background: rgba(92, 115, 242, 0.40) !important;
}

[data-theme="dark"] .table-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 115, 242, 0.65) !important;
}

.otc-data-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 200 !important;
    background: rgba(245, 248, 253, 0.94) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.07) !important;
}

[data-theme="dark"] .otc-data-table thead th {
    background: rgba(14, 16, 23, 0.94) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .otc-data-table th {
    color: #cbd5e1 !important; /* Gris claro más visible en modo oscuro */
}

.otc-data-table {
    width: max-content;
    /* Allows true overflow so scrollbar appears */
    min-width: 100%;
    /* But never smaller than the container */
    border-collapse: separate !important;
    border-spacing: 0 !important;
    text-align: left;
    table-layout: auto;
}

.otc-data-table th {
    padding: 15px;
    color: var(--text-muted) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    white-space: nowrap;
    /* Column headers never wrap */
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.otc-data-table th.sortable {
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.otc-data-table th.sortable:hover {
    color: var(--color-electric-blue, #2563eb);
}

/* --- Column Resizer (Excel Style) --- */
.resizer {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: rgba(0, 0, 0, 0.05);
    cursor: col-resize;
    user-select: none;
    transition: background 0.2s;
    z-index: 10;
}

.resizer:hover,
.resizing {
    background: var(--color-electric-blue) !important;
    width: 2px;
}

.otc-data-table td {
    padding: 10px 12px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    font-weight: 500;
    vertical-align: middle !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.otc-data-table td.cell-dp {
    vertical-align: middle !important;
    position: relative;
    /* Ensure the cell can host absolute children if needed */
}

.otc-td-trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Better alignment on small screens */
    gap: 12px;
    padding: 10px 15px;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    height: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Selection column alignment - ABSOLUTE START */
.otc-table th:first-child,
.otc-table td:first-child,
table th:first-child,
table td:first-child {
    padding-left: 0 !important;
    padding-right: 5px !important;
    width: 30px !important;
    min-width: 30px !important;
    text-align: center;
}

/* PREMIUM TEXT INPUTS (Matching Mano Dominante style) */
table input[type="text"],
table input[type="password"],
table input[type="search"] {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 0 15px;
    height: 48px;
    min-height: 48px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; /* Only animate visuals, never layout */
    box-sizing: border-box;
    outline: none;
    display: block;
}

table input[type="text"]:focus,
table input[type="password"]:focus,
table input[type="search"]:focus {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1);
    background: #ffffff;
}

table input[type="text"]::placeholder,
table input[type="search"]::placeholder {
    color: #cbd5e1;
    opacity: 0.6;
}

.trigger-label {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* Allows tags to go side-by-side */
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    flex: 1;
    overflow: visible;
    padding: 4px 0;
}

.asig-text-row {
    width: 100%;
    /* Keep assignments stacked vertically */
}

/* Premium Suspended Tags for Days/Ball */
.otc-day-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #5b6e94 !important;
    font-family: 'Outfit', sans-serif !important;
    box-shadow:
        3px 5px 12px rgba(163, 177, 198, 0.55),
        -3px -4px 10px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.95),
        inset -1px -1px 2px rgba(163, 177, 198, 0.2) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.otc-day-tag:hover {
    transform: translateY(-2px);
    box-shadow:
        4px 6px 14px rgba(163, 177, 198, 0.65),
        -4px -5px 12px rgba(255, 255, 255, 1),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
}

.otc-datepicker-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    position: relative !important;
    /* Critical for absolute dropdown */
    cursor: pointer;
}

/* Blue checkbox fill across all tables */
.otc-data-table input[type="checkbox"] {
    accent-color: var(--color-electric-blue);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.otc-data-table tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.otc-data-table tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.otc-data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.2);
}

/* Selected row: blue highlight at 5% opacity (95% transparent) */
.otc-data-table tbody tr.row-selected td {
    background: rgba(96, 165, 250, 0.05) !important;
    border-bottom-color: rgba(96, 165, 250, 0.08);
}

.otc-data-table tbody tr.row-selected:hover td {
    background: rgba(96, 165, 250, 0.09) !important;
}

input[type="date"],
.otc-data-table select {
    min-width: 0 !important;
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Softer gray */
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    /* Uniform glass look */
    opacity: 0.85;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.otc-data-table input:focus,
.otc-data-table select:focus {
    border-color: var(--color-electric-blue);
    background: white;
}

select.asig-select {
    width: 100%;
}

/* =========================================
   HIGH-FIDELITY 3D TABLE DROPDOWNS
   ========================================= */
.otc-td {
    position: relative;
    width: 100%;
}

.otc-td-trigger {
    width: 100%;
    min-height: 38px;
    height: auto;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    opacity: 0.95;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    user-select: none;
}

.otc-td-trigger:hover {
    border-color: var(--color-electric-blue);
    background: rgba(255, 255, 255, 0.1);
}

.otc-td-trigger .caret {
    font-size: 0.6rem;
    opacity: 0.4;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.otc-td.open .otc-td-trigger .caret {
    transform: rotate(180deg);
    opacity: 0.8;
}

/* The 3D Floating Menu */
.otc-td-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.8) !important;
    /* 80% Opacity as requested */
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
    /* 3D Depth */
    padding: 10px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    transform-origin: top left;
}

.otc-td.open .otc-td-menu {
    display: flex !important;
    /* Force it to show */
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.otc-td-option {
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: #333;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.otc-td-option:hover {
    background: color-mix(in srgb, var(--table-accent-color) 10%, transparent);
    color: var(--table-accent-color);
    transform: translateX(4px);
}

.otc-td-option.selected {
    background: color-mix(in srgb, var(--table-accent-color) 12%, transparent);
    color: var(--table-accent-color);
    font-weight: 700;
}

.otc-td-option .option-emoji {
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Positioning refinements for right-side columns */
#view-tablas .otc-td-menu,
#view-profesores .otc-td-menu,
#view-planificacion .otc-td-menu,
#view-usuarios .otc-td-menu,
#view-clases-historial .otc-td-menu {
    right: 0;
    left: auto;
    transform-origin: top right;
}

/* Removed old redundant table cell styles */

.badge-nuevo {
    position: absolute !important;
    top: 0 !important;
    right: -2px !important;
    transform: translateY(-2px) !important;
    background: transparent !important;
    color: #94A3B8 !important;
    font-size: 0.65rem !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    pointer-events: none !important;
    box-shadow: none !important;
    z-index: 5 !important;
    letter-spacing: 0.5px !important;
}

[data-theme="dark"] .badge-nuevo {
    color: #e2e8f0 !important; /* Blanco suave más visible en modo oscuro */
}

.state-select.state-activo .otc-td-trigger {
    color: var(--table-accent-color) !important;
    background: color-mix(in srgb, var(--table-accent-color) 20%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 35%, transparent) !important;
}

.state-select.state-retirado .otc-td-trigger {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.20) !important;
    border-color: rgba(220, 53, 69, 0.35) !important;
}

.state-select.state-prueba .otc-td-trigger {
    color: #856404 !important;
    background: rgba(255, 193, 7, 0.20) !important;
    border-color: rgba(255, 193, 7, 0.35) !important;
}

.tag-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    text-align: center;
}

.tag-activo {
    background: var(--table-accent-color) !important;
    color: #ffffff !important;
}

.tag-nuevo {
    background: #cce5ff !important;
    color: #004085 !important;
    padding: 2px 7px !important;
    font-weight: 500 !important;
}

.tag-retirado {
    background: rgba(220, 53, 69, 0.9) !important;
    color: #ffffff !important;
}

.tag-prueba {
    background: rgba(255, 193, 7, 0.9) !important;
    color: #333333 !important;
}

/* #view-crear-canchas .table-container now inherits from global .table-container — no override needed */

#view-crear-canchas .otc-data-table {
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
}

/* Specific Column Widths for Proportionality */
#courts-config-table th:nth-child(1),
#courts-config-table td:nth-child(1) {
    width: 45px;
    min-width: 45px;
}

/* Checkbox */
#courts-config-table th:nth-child(2),
#courts-config-table td:nth-child(2) {
    width: 85px;
    min-width: 80px;
}

/* Sede */
#courts-config-table th:nth-child(3),
#courts-config-table td:nth-child(3) {
    width: 180px;
    min-width: 150px;
}

/* Nombre Cancha */
#courts-config-table th:nth-child(4),
#courts-config-table td:nth-child(4) {
    width: 110px;
    min-width: 100px;
}

/* Hora */
#courts-config-table th:nth-child(5),
#courts-config-table td:nth-child(5) {
    width: auto;
}

/* Creación */
#courts-config-table th:nth-child(6),
#courts-config-table td:nth-child(6) {
    width: 110px;
    min-width: 90px;
    text-align: center;
}

/* Modificación */
#courts-config-table th:nth-child(7),
#courts-config-table td:nth-child(7) {
    width: 110px;
    min-width: 90px;
    text-align: center;
}

/* Acción */
#courts-config-table th:nth-child(8),
#courts-config-table td:nth-child(8) {
    width: 55px;
    min-width: 55px;
    text-align: center;
}


/* Sticky column headers within internal scroll container */
#view-crear-canchas .otc-data-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 200 !important;
    background: rgba(245, 248, 253, 0.94) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08) !important;
}

[data-theme="dark"] #view-crear-canchas .otc-data-table thead th {
    background: rgba(14, 16, 23, 0.94) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

#view-crear-canchas .otc-data-table tr {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

#view-crear-canchas .otc-data-table td {
    background: transparent;
    backdrop-filter: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: background 0.2s ease;
}

#view-crear-canchas .otc-data-table tr:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}


#view-crear-canchas .table-scroll {
    height: calc(100vh - 180px);
    max-height: calc(100vh - 180px);
    overflow-x: scroll !important;
    overflow-y: auto;
}

#view-crear-canchas .otc-data-table input[type="text"] {
    width: 100%;
}

/* GLOBAL Standardized Glassmorphism for all dropdowns (30% Opacity) */
/* GLOBAL Standardized Dropdowns (v381 Solid Premium) */
.otc-td-menu,
.otc-ms-dropdown,
.otc-tp-dropdown,
.column-sort-bubble,
.otc-dp-dropdown {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.18) !important;
    backdrop-filter: none !important;
}

.asig-multiline {
    width: max-content;
}

.btn-delete-row,
.btn-edit-row,
.btn-reset-pwd {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #94a3b8;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.8;
}

.btn-edit-row:hover,
.btn-reset-pwd:hover {
    color: var(--color-electric-blue, #2b43f1);
    background: transparent !important;
    opacity: 1;
    transform: scale(1.15);
}

.btn-delete-row:hover {
    color: #ef4444;
    background: transparent !important;
    opacity: 1;
    transform: scale(1.15);
}

[data-theme="dark"] .btn-delete-row,
[data-theme="dark"] .btn-edit-row,
[data-theme="dark"] .btn-reset-pwd {
    color: #64748b;
}

[data-theme="dark"] .btn-edit-row:hover,
[data-theme="dark"] .btn-reset-pwd:hover {
    color: #5c73f2;
    opacity: 1;
}

[data-theme="dark"] .btn-delete-row:hover {
    color: #f87171;
    opacity: 1;
}

/* Conflicting legacy vertical timeline v2.0 styles completely removed */

.lt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lt-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lt-title {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    letter-spacing: 0.05em;
}

.lt-select {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Outfit', sans-serif;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
}

.lt-date-indicator {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.lt-btn-add {
    background: rgba(59, 130, 246, 0.25);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    transition: background 0.2s;
    white-space: nowrap;
}

.lt-btn-add:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* El canvas donde vive la linea */
.lt-canvas {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: visible;
    background: #f8fafc;
    /* Fondo claro per the ref */
    border-radius: 12px;
    padding: 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* La línea maestra */
.lt-canvas::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    /* Un poco más de grosor */
    background: #475569;
    /* Gris y negro azul */
    transform: translateY(-50%);
    z-index: 1;
    border-radius: 2px;
}

/* Relleno de progreso */
.lt-progress-fill {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 4px;
    background: #2563eb;
    /* Azul base */
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.8s ease;
    border-radius: 2px;
}

/* Zona que contiene todos los nodos y ticks */
.lt-nodes-container {
    position: absolute;
    inset: 0;
    z-index: 3;
}

/* Nodos (círculos) del timeline */
.lt-node {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #ffffff;
    border: 3px solid #2563eb;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lt-node:hover {
    transform: translate(-50%, -50%) scale(1.4);
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.4);
}

/* Con datos de planificación */
.lt-node.has-plan {
    border-color: #1e3a8a;
    width: 17px;
    height: 17px;
}

/* Palo vertical que conecta nodo con label */
.lt-node-stem {
    position: absolute;
    width: 2px;
    background: #94a3b8;
}

/* Etiqueta del nodo */
.lt-node-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #475569;
    /* Gris negro oscuro */
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    white-space: nowrap;
    text-align: center;
    line-height: 1.4;
    pointer-events: none;
}

.lt-node-label strong {
    display: block;
    font-size: 0.85rem;
    color: #0f172a;
    /* Azul casi negro */
    font-weight: 700;
}

/* Tick mayor (marca de tiempo sin nodo) */
.lt-tick-mark {
    position: absolute;
    top: 50%;
    width: 2px;
    height: 12px;
    background: #64748b;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Label de tick */
.lt-tick-label {
    position: absolute;
    top: calc(50% + 18px);
    transform: translateX(-50%);
    color: #cbd5e1;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* =========================================
   CUSTOM MODALS (GLASSMORPHISM)
   ========================================= */
.otc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    will-change: opacity;
    padding: 20px 10px;
    box-sizing: border-box;
    overflow-y: auto;
}

.otc-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.otc-modal {
    background: linear-gradient(145deg, rgba(245, 248, 253, 0.96) 0%, rgba(230, 238, 250, 0.91) 100%) !important;
    backdrop-filter: blur(25px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(160%) !important;
    border: none !important;
    box-shadow:
        16px 24px 48px rgba(163, 177, 198, 0.45),
        -16px -24px 48px rgba(255, 255, 255, 0.4),
        inset 2px 2px 4px rgba(255, 255, 255, 0.6),
        inset -2px -2px 4px rgba(163, 177, 198, 0.20) !important;
    border-radius: 28px !important;
    padding: 35px 30px !important;
    width: 90%;
    max-width: 440px;
    max-height: 88vh;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: center;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform;
}

.otc-modal::-webkit-scrollbar {
    width: 6px;
}
.otc-modal::-webkit-scrollbar-track {
    background: transparent;
}
.otc-modal::-webkit-scrollbar-thumb {
    background: rgba(43, 67, 241, 0.25);
    border-radius: 10px;
}
.otc-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(43, 67, 241, 0.45);
}

.otc-modal-overlay.active .otc-modal {
    transform: none;
    will-change: auto;
}

.otc-modal-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b !important;
    margin-bottom: 12px;
}

.otc-modal-text {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.95rem;
    color: #475569 !important;
    margin-bottom: 25px;
    line-height: 1.6;
    font-weight: 500;
}

.otc-modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.otc-modal-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
}

.otc-modal .btn-cancel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(226, 232, 240, 0.8) 100%) !important;
    color: #475569 !important;
    border: none !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    box-shadow: 
        3px 5px 10px rgba(163, 177, 198, 0.25),
        -3px -3px 10px rgba(255, 255, 255, 0.95),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transition: all 0.2s !important;
}

.otc-modal .btn-cancel:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(215, 225, 235, 0.9) 100%) !important;
    box-shadow: 
        4px 6px 12px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 1),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.1) !important;
    transform: translateY(-1.5px) !important;
}

/* Picker Dropdown (suspended 20% white) */
.otc-picker-dropdown {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 10px !important;
}

.otc-picker-dropdown .otc-modal-btn {
    background: transparent !important;
    color: #334155 !important;
    padding: 8px 15px !important;
    margin: 4px 0 !important;
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    transition: all 0.25s ease !important;
}

.otc-picker-dropdown .otc-modal-btn:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateX(4px);
    color: var(--color-electric-blue) !important;
}

.otc-modal .btn-confirm {
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    box-shadow: 
        0 4px 14px rgba(239, 68, 68, 0.35),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s !important;
}

.otc-modal .btn-confirm:hover {
    background: linear-gradient(145deg, #f87171 0%, #ef4444 100%) !important;
    color: #ffffff !important;
    box-shadow: 
        0 6px 18px rgba(239, 68, 68, 0.45),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.4),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-1.5px) !important;
}

.otc-modal .btn-confirm-edit {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.35),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s !important;
}

.otc-modal .btn-confirm-edit:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    box-shadow: 
        0 6px 18px rgba(59, 130, 246, 0.45),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.4),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-1.5px) !important;
}

/* =========================================
   CUSTOM MULTISELECT
   ========================================= */
.otc-multiselect-container {
    position: relative;
    width: 100%;
}

.otc-ms-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 6px 10px;
    min-height: 38px;
    min-width: 100px;
    /* Reduced to be tighter */
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    transition: border-color 0.2s;
}

.otc-ms-trigger:hover {
    border-color: var(--color-electric-blue);
}

.otc-ms-trigger.vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px;
    background: transparent;
    border: none;
}

.otc-ms-trigger.vertical .otc-day-pill {
    margin: 2px 0 !important;
    width: 100%;
}

.otc-day-pill {
    background: white !important;
    color: #334155 !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 4px !important;
    font-family: 'Outfit', sans-serif !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    /* 3D Floating shadow */
    transition: all 0.2s ease;
}

.otc-ms-trigger .otc-day-pill {
    padding: 2px 8px !important;
    border-radius: 5px !important;
}

.otc-ms-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 480px;
    /* Base width */
    max-width: 800px;
    /* Allow more space for long rows */
    background: rgba(255, 255, 255, 0.2) !important;
    /* 20% Opacity as requested */
    backdrop-filter: blur(25px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 20px !important;
    margin-top: 12px;
    padding: 12px;
    z-index: 9999;
    display: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05) !important;
}

.otc-ms-dropdown.open {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.otc-ms-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: transparent !important;
    /* Removed sub-filler */
    border: 1px solid transparent !important;
    /* Removed border */
    border-radius: 12px;
    color: #1e293b;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    user-select: none;
}

.otc-ms-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.otc-ms-item.selected {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #1e293b;
    /* Keep dark text for legibility on light blue */
    font-weight: 700;
}

/* =========================================
   CUSTOM TIMEPICKER (RELOJ)
   ========================================= */
.otc-timepicker-container {
    position: relative;
    width: 100%;
}

.otc-tp-trigger {
    background: color-mix(in srgb, var(--table-accent-color) 4%, transparent) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    padding: 7px 12px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    font-family: 'Outfit', sans-serif !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px color-mix(in srgb, var(--table-accent-color) 8%, transparent) !important;
    transition: all 0.2s ease !important;
    min-width: 80px;
}

.otc-tp-trigger:hover {
    background: color-mix(in srgb, var(--table-accent-color) 7%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 35%, transparent) !important;
    color: var(--text-main) !important;
    transform: none !important;
    box-shadow:
        inset 3px 3px 8px rgba(0, 0, 0, 0.12),
        inset -3px -3px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 12px color-mix(in srgb, var(--table-accent-color) 15%, transparent) !important;
}

.otc-tp-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 18px;
    padding: 15px;
    z-index: 9999;
    gap: 12px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
}

.otc-tp-dropdown.open {
    display: flex;
}

.otc-tp-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 5px;
}

.otc-tp-col::-webkit-scrollbar {
    width: 4px;
}

.otc-tp-col::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.otc-tp-item {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #64748b; /* Claro: gris medio */
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.otc-tp-item:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--color-electric-blue);
}

.otc-tp-item.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    color: #5b6e94 !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    border: none !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.22) !important;
    transform: scale(1.08) translateY(-2px) !important;
}

/* =========================================
   CUSTOM DATEPICKER (POOPUP CALENDARIO)
   ========================================= */
.calendar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.otc-datepicker-container {
    position: relative;
    width: 100%;
}

/* --- UNIFIED PREMIUM DATEPICKER (TABLES & DASHBOARD) --- */
.otc-dp-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 20px !important;
    padding: 22px !important;
    box-shadow: 
        4px 6px 12px rgba(163, 177, 198, 0.65),
        -4px -4px 12px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.25) !important;
    z-index: 10000 !important;
    display: none;
    flex-direction: column;
    gap: 15px;
    min-width: 320px;
    animation: calendarIn 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes calendarIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.otc-dp-dropdown.open { display: flex; }

.otc-dp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.otc-dp-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: #1e293b;
    font-size: 0.95rem;
    cursor: pointer;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
}

.otc-dp-title:hover {
    background: #f1f5f9;
    color: var(--color-electric-blue);
}

.otc-dp-nav { display: flex; gap: 6px; }

.otc-dp-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s;
    color: #cbd5e1;
}

.otc-dp-btn:hover {
    background: white;
    border-color: var(--color-electric-blue);
    color: var(--color-electric-blue);
}

/* Grid Logic for both modes */
.otc-dp-grid, 
.otc-dp-weekdays-header,
.otc-dp-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    width: 100%;
}

.otc-dp-weeks {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.otc-dp-weekday {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #99a8be !important;
    text-align: center !important;
    padding: 5px 0 !important;
    text-transform: uppercase !important;
}

.otc-dp-day {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.otc-dp-day:hover {
    background: rgba(43, 67, 241, 0.08);
    color: var(--color-electric-blue);
}

.otc-dp-day.active,
.otc-dp-item.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    box-shadow:
        6px 8px 16px rgba(163, 177, 198, 0.65), /* Sombra externa principal */
        -4px -4px 12px rgba(255, 255, 255, 0.8), /* Brillo externo */
        inset 1px 1px 2px rgba(255, 255, 255, 1), /* Rim interno luminoso */
        inset -1px -1px 2px rgba(163, 177, 198, 0.25) !important; /* Rim interno de sombra */
    color: #5b6e94 !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    transform: translateY(-2px) !important;
}

.otc-dp-day.is-today:not(.active) {
    border: 2px solid #64748b;
}

.otc-dp-item {
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
}



.otc-dp-day.other-month { opacity: 0.2; }

/* Week Selection Styles */
.is-week-mode .otc-dp-week-row:hover .otc-dp-day:not(.other-month) {
    background: rgba(43, 67, 241, 0.1) !important;
    border-radius: 0;
}
.is-week-mode .otc-dp-week-row.active .otc-dp-day:not(.other-month) {
    background: var(--color-electric-blue) !important;
    color: white !important;
    border-radius: 0;
}
.is-week-mode .otc-dp-week-row .otc-dp-day:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.is-week-mode .otc-dp-week-row .otc-dp-day:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }

.otc-td-menu {
    position: absolute;
    z-index: 9999;
    /* Higher z-index to stay on top of everything */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    display: none;
    margin-top: 8px;
    overflow: hidden;
}


/* Dashboard calendar specific (centered) */
.calendar-wrapper .otc-dp-dropdown {
    left: 50%;
    transform: translateX(-50%);
}

.otc-dp-dropdown.open {
    display: flex;
}

/* Week Picker Enhancements */
.otc-dp-weekdays-header,
.otc-dp-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.otc-dp-weeks {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
}

.otc-dp-calendar-container.is-week-mode .otc-dp-week-row:hover .otc-dp-day:not(.other-month) {
    background: rgba(43, 67, 241, 0.1) !important;
    color: var(--color-electric-blue) !important;
}

.otc-dp-calendar-container.is-week-mode .otc-dp-week-row.active .otc-dp-day:not(.other-month) {
    background: rgba(43, 67, 241, 0.2) !important;
    color: var(--color-electric-blue) !important;
    font-weight: 700;
}

.otc-dp-calendar-container.is-week-mode .otc-dp-day {
    border-radius: 0;
}

.otc-dp-calendar-container.is-week-mode .otc-dp-day:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.otc-dp-calendar-container.is-week-mode .otc-dp-day:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.otc-dp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.otc-dp-title {
    font-weight: 700;
    color: #cbd5e1;
    font-size: 0.85rem;
    cursor: pointer;
    background: transparent;
    padding: 6px 12px;
    border-radius: 10px;
    box-shadow: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-block;
    text-transform: capitalize;
}

.otc-dp-title:hover {
    color: var(--color-electric-blue);
    background: rgba(43, 67, 241, 0.05);
}

.otc-dp-title.active {
    background: #ffffff;
    color: var(--color-electric-blue) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.otc-dp-nav {
    display: flex;
    gap: 5px;
}

.otc-dp-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.otc-dp-btn:hover {
    background: white;
    border-color: var(--color-electric-blue);
}

/* Grid para el calendario del dashboard (usa .otc-dp-grid, 7 columnas) */
.otc-dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 8px;
}


.otc-dp-weekday {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #99a8be !important;
    text-align: center !important;
    padding-bottom: 5px !important;
}

/* Month & Year items in calendar */
.otc-dp-item {
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
    background: transparent;
}



.otc-dp-day {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.otc-dp-day:hover,
.otc-dp-day.week-hover {
    background: rgba(0, 0, 0, 0.05);
    color: #334155;
}

.otc-dp-day.active {
    font-weight: 700;
}

.otc-dp-day.other-month {
    opacity: 0.3;
}

.otc-dp-day.is-today:not(.active) {
    border: 1.5px solid #64748b;
}

.otc-ms-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 6px !important;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.otc-ms-item input[type="checkbox"]:checked {
    background: var(--color-electric-blue);
    border-color: var(--color-electric-blue);
}

.otc-ms-item input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Override de Checkbox para Tema Oscuro */
[data-theme="dark"] .otc-ms-item input[type="checkbox"] {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .otc-ms-item input[type="checkbox"]:checked {
    background: var(--table-accent-color) !important;
    border-color: var(--table-accent-color) !important;
}

/* Timeline specific refinements */
.lt-nodes-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    /* Ensure space for nodes */
}

.lt-node {
    position: absolute;
    top: 50%;
    z-index: 10;
}

.lt-node.has-plan {
    filter: drop-shadow(0 0 5px var(--color-electric-blue));
}

.lt-node-label {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* ----- EXPANDABLE SEARCH BAR ----- */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

/* ----- BATCH ACTION BUTTONS ----- */
.btn-batch {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    border-radius: 12px;
    color: #666;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 8px;
}

.btn-batch:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    color: var(--color-electric-blue);
    transform: translateY(-2px);
}

/* =========================================
   HIGH-FIDELITY 3D FILTERS & SORTING
   ========================================= */
th.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background 0.2s;
    padding-right: 42px !important;
    /* Fixed space for absolutely positioned icon */
    white-space: nowrap;
    position: relative !important;
}

th.sortable:hover {
    background: rgba(0, 0, 0, 0.03);
}

.btn-column-sort {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    color: rgba(0, 0, 0, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-column-sort:hover {
    background: transparent !important;
    color: var(--color-electric-blue);
    transform: translateY(-50%) scale(1.1);
}

.btn-column-sort.active {
    background: transparent !important;
    color: var(--color-electric-blue);
    font-weight: 800;
}

.sort-rank-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: var(--table-accent-color) !important;
    color: white !important;
    font-size: 0.65rem !important;
    font-weight: 900 !important;
    width: 13px !important;
    height: 13px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    z-index: 20 !important;
    line-height: 1 !important;
}

/* 3D Sort Bubble */
.column-sort-bubble {
    position: absolute;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    padding: 10px;
    z-index: 200000 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: bubbleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }

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

.sort-option {
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.sort-option:hover {
    background: rgba(0, 107, 255, 0.06);
    color: var(--color-electric-blue);
    transform: translateX(4px);
}

.sort-option.active {
    background: rgba(0, 107, 255, 0.1);
    color: var(--color-electric-blue);
    font-weight: 700;
}

/* 3D Filtros Activos Panel */
.sort-manager-panel {
    position: fixed;
    width: 320px;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    padding: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: panelIn 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

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


/* =========================================
   3D MULTI-SELECT COMPONENT (PLANIFICACIÓN)
   ========================================= */
.otc-ms-trigger {
    width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    /* Transparent Glass Cell */
    opacity: 0.85;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    transition: all 0.2s;
}

.otc-ms-trigger:hover {
    border-color: var(--color-electric-blue);
    background: rgba(255, 255, 255, 0.1);
}



.otc-ms-tag {
    background: var(--color-electric-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
}

.btn-clear-all-sorts {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 12px;
    color: #888;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-all-sorts:hover {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    border-color: rgba(255, 77, 77, 0.2);
}

/* ----- BUBBLE MENUS (10% transparent = 90% opaque) ----- */
.column-sort-bubble {
    position: absolute;
    z-index: 200000 !important;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.sort-option {
    padding: 8px 12px;
    color: #444;
    /* Dark gray simple text */
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sort-option:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111;
}

.sort-option.active {
    background: rgba(0, 107, 255, 0.08);
    color: var(--color-electric-blue);
    font-weight: 600;
}

/* Custom Scrollbar for Bubble Options */
.bubble-options-container::-webkit-scrollbar {
    width: 6px;
}

.bubble-options-container::-webkit-scrollbar-track {
    background: transparent;
}

.bubble-options-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.bubble-options-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Updated Table Header with Split Directions */
th.sortable {
    position: relative;
    padding-right: 35px !important;
    transition: background 0.2s;
}

th.sortable:hover {
    background: rgba(0, 0, 0, 0.02);
}

.btn-column-sort {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-column-sort:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-electric-blue);
}

.btn-column-sort.active {
    color: var(--color-electric-blue);
    background: transparent !important;
    font-weight: 900;
}

.sort-rank-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: var(--table-accent-color) !important;
    color: white !important;
    font-size: 0.65rem !important;
    font-weight: 900 !important;
    width: 13px !important;
    height: 13px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    z-index: 20 !important;
    line-height: 1 !important;
}

/* Center balls in table cells */
td .ball {
    display: block;
    margin: 2px auto;
}

.cell-pelota {
    text-align: center;
    vertical-align: middle;
}

/* Mobile Optimization for Tables */
@media (max-width: 768px) {
    .table-container,
    [data-theme="dark"] .table-container {
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        padding: 0 12px !important;
        margin: 6px auto 18px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .otc-data-table td {
        padding: 8px 10px !important;
    }

    #courts-config-table th:nth-child(3),
    #courts-config-table td:nth-child(3) {
        width: 140px;
    }

    #courts-config-table th:nth-child(4),
    #courts-config-table td:nth-child(4) {
        width: 90px;
    }

    .otc-td-trigger {
        padding: 6px 10px !important;
        min-height: 42px !important;
        gap: 8px !important;
    }

    .otc-day-tag {
        padding: 2px 8px !important;
        font-size: 0.72rem !important;
        gap: 4px !important;
    }

    .trigger-label {
        gap: 5px !important;
    }
}
/* --- SMART REASSIGN MODAL --- */
.otc-day-choice { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.otc-day-choice:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); background: #f1f5f9; }
.otc-day-choice input:checked + span { color: var(--color-electric-blue) !important; }




/* ----- SYNC CLOUD ICON (TOOLBAR INTEGRATED) ----- */
.sync-cloud-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    order: -1; /* Forzar que sea el primero a la izquierda */
    margin-right: 8px; /* Espacio extra respecto al filtro */
}

.sync-cloud-icon:hover {
    color: var(--color-electric-blue);
    transform: scale(1.1);
}

.sync-cloud-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
    display: block;
}

.sync-cloud-icon .cloud-check {
    transition: opacity 0.3s ease;
    opacity: 1;
}

/* States */
.sync-cloud-icon.loading {
    color: var(--color-electric-blue) !important;
    animation: cloudPulse 1.8s infinite ease-in-out;
}
.sync-cloud-icon.loading .cloud-check {
    opacity: 0;
}

.sync-cloud-icon.success {
    color: #cbd5e1; /* Keeping it minimalist gray when idle */
}
.sync-cloud-icon.success:hover {
    color: #10B981; /* Emerald on hover when saved */
}

.sync-cloud-icon.error {
    color: #EF4444 !important;
    animation: cloudShake 0.4s ease-in-out;
}

@keyframes cloudPulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.6; }
}

/* ----- PREMIUM TOOLTIP SYSTEM ----- */
.otc-tooltip {
    position: fixed;
    z-index: 100000;
    /* Fondo Convexo Cristalino Claro */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #5b6e94;
    pointer-events: none;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.65), /* Sombra principal inferior */
        -4px -4px 12px rgba(255, 255, 255, 0.8), /* Brillo externo superior */
        inset 1px 1px 2px rgba(255, 255, 255, 1), /* Rim luminoso */
        inset -1px -1px 2px rgba(163, 177, 198, 0.25); /* Rim de sombra */
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.otc-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Arrow when tooltip is ABOVE the button (Default) */
.otc-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--arrow-pos, 50%);
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(240, 245, 255, 0.85) transparent transparent transparent; /* Combina con el vidrio claro inferior */
}

/* Arrow when tooltip is BELOW the button (.is-bottom) */
.otc-tooltip.is-bottom::after {
    top: auto;
    bottom: 100%; /* Sube la flecha al techo del tooltip */
    border-color: transparent transparent rgba(255, 255, 255, 0.95) transparent; /* Combina con la luz superior del cristal claro */
}

/* Modo Oscuro: Tooltip de Vidrio Metálico Convexo */
[data-theme="dark"] .otc-tooltip {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: #ffffff;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.95),
        -2px -2px 8px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .otc-tooltip::after {
    border-color: rgba(20, 26, 40, 0.9) transparent transparent transparent; /* Combina con el metal oscuro inferior */
}

[data-theme="dark"] .otc-tooltip.is-bottom::after {
    border-color: transparent transparent rgba(50, 65, 90, 0.85) transparent; /* Combina con la luz superior del metal oscuro */
}

/* ----- COURT SPOTLIGHT / FOCUS MODE ----- */
#court-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#court-spotlight.active,
#week-plan-spotlight.active {
    opacity: 1 !important;
    visibility: visible !important;
}

#week-plan-spotlight.active .focus-container {
    transform: scale(1) translateY(0) !important;
}

/* Ball cards responsive grid: 2x2 on desktop & mobile landscape, 1-col ONLY on vertical mobile (portrait) */
.ball-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    align-items: start !important;
}

@media (max-width: 640px) and (orientation: portrait), (max-width: 480px) {
    .ball-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

@media (max-height: 550px) {
    .week-plan-focus-container {
        padding: 16px 20px !important;
        max-height: 96vh !important;
    }
}

/* Each ball card fills its cell uniformly */
.ball-cards-grid .ball-plan-card {
    margin-bottom: 0 !important;
    height: 100%;
    box-sizing: border-box;
}

.ball-card-field {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 10px;
}

.ball-card-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 2px;
}

.ball-card-value {
    font-weight: 700;
    color: var(--text-color, #0f172a);
}

/* Dark mode contrast overrides for week plan spotlight modal */
[data-theme="dark"] #week-plan-modal-title {
    color: #f8fafc !important; /* Pure white title in dark mode */
}

[data-theme="dark"] #week-plan-modal-subtitle {
    color: #60a5fa !important; /* Bright blue subtitle in dark mode */
}

[data-theme="dark"] .ball-card-field {
    background: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .ball-card-label {
    color: #cbd5e1 !important; /* High contrast bright slate silver for labels */
}

[data-theme="dark"] .ball-card-value {
    color: #f8fafc !important; /* High contrast pure white for values */
}

[data-theme="dark"] .ball-plan-card span[style*="font-style:italic"] {
    color: #cbd5e1 !important; /* High contrast for 'Sin planificación' */
}

.focus-container {
    /* Fondo Convexo Cristalino Claro (Satinado Atenuado para no encandilar) */
    background: linear-gradient(145deg, rgba(245, 248, 253, 0.96) 0%, rgba(230, 238, 250, 0.91) 100%) !important;
    backdrop-filter: blur(25px) saturate(160%) !important;
    border: none !important;
    box-shadow:
        16px 24px 48px rgba(163, 177, 198, 0.45), /* Sombra externa principal suavizada */
        -16px -24px 48px rgba(255, 255, 255, 0.4), /* Brillo externo suavizado para no encandilar */
        inset 2px 2px 4px rgba(255, 255, 255, 0.6), /* Rim interno luminoso atenuado */
        inset -2px -2px 4px rgba(163, 177, 198, 0.20) !important; /* Rim interno oscuro */
    width: 95%;
    max-width: 1200px;
    height: 85vh; /* Increased height for a spacious feel */
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(40px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

#court-spotlight.active .focus-container {
    transform: scale(1) translateY(0);
}

.btn-close-focus {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    font-size: 32px !important;
    color: #94a3b8 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: none !important;
    transition: all 0.3s;
}

@media (hover: hover) {
    .btn-close-focus:hover {
        background: transparent !important;
        color: #ef4444 !important;
        transform: rotate(90deg) scale(1.15) !important;
    }
}

.focus-content-grid {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: transparent !important;
}

#focus-court-container {
    flex: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: transparent;
    border-right: none;
}

#focus-court-container .court-card {
    width: 100%;
    max-width: 480px;
    transform: scale(1.1); /* Restored larger scale */
    pointer-events: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.focus-sidebar {
    flex: 0.7;
    padding: 50px 40px;
    overflow-y: auto;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: none; /* Hide for Firefox */
    -ms-overflow-style: none; /* Hide for IE/Edge */
}

.focus-sidebar::-webkit-scrollbar {
    display: none; /* Hide for Chrome/Safari */
}

.focus-section-title {
    font-size: 0.72rem;
    font-weight: 900;
    color: #1e293b !important; /* Oscurecido a Slate-800 para legibilidad atómica */
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendance-counter-text {
    color: #2B43F1 !important; /* Constant premium electric blue for clean look */
}

/* Attendance Grid (Glass Style) */
.attendance-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.attendance-pill {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid transparent !important;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155 !important; /* Oscurecido a Slate-700 para excelente legibilidad */
    cursor: pointer;
    box-shadow: none !important;
    backdrop-filter: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.attendance-pill:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px);
}

.attendance-pill.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    color: #1e293b !important; /* Oscurecido a Slate-800 */
    font-weight: 800 !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.5),
        -2px -2px 8px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.20) !important;
}

/* Notes & Objectives (Neumorphic Inset / Floating Master) */
.focus-notes-area {
    width: 100%;
    min-height: 120px;
    padding: 22px;
    border-radius: 28px;
    background: rgba(43, 67, 241, 0.05) !important; /* Inset sapphire tint matching search bar */
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #0f172a !important; /* Oscurecido a Slate-900 para contraste impecable en Tema Claro */
    resize: none;
    outline: none;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 
        inset 4px 4px 8px rgba(0, 0, 0, 0.12), /* Intensified inset dark shadow */
        inset -4px -4px 8px rgba(255, 255, 255, 0.95), /* Inset bright backlight */
        inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
}

.focus-notes-area:focus {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 250, 255, 0.94) 100%) !important; /* Convex satin floating matching node-summary */
    border-color: rgba(43, 67, 241, 0.35) !important;
    transform: translateY(-4px) scale(1.01); /* Elevated physical shift */
    box-shadow:
        12px 18px 36px rgba(163, 177, 198, 0.55), /* Floating 3D shadow */
        -10px -10px 24px rgba(255, 255, 255, 0.95), /* Floating 3D glow */
        inset 2px 2px 4px rgba(255, 255, 255, 1), /* Rim luminoso */
        inset -2px -2px 4px rgba(163, 177, 198, 0.20) !important; /* Rim oscuro */
}

.objective-card {
    padding: 8px 15px;
    background: transparent;
    border-left: 3px solid var(--color-electric-blue); /* Solid Electric Blue */
    border-radius: 0;
    margin-bottom: 6px;
}

.objective-card .label {
    font-size: 0.6rem;
    font-weight: 800;
    color: #334155 !important; /* Oscurecido a Slate-700 para Tema Claro */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 2px;
}

.objective-card .value {
    font-size: 1rem;
    color: #0f172a !important; /* Oscurecido a Slate-900 para contraste impecable en Tema Claro */
    font-weight: 600;
    line-height: 1.3;
}

/* Court Title Prominence */
#focus-court-container .court-title {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: #5b6e94 !important;
}

/* Footer Actions */
.focus-footer {
    margin-top: auto; /* Restored to push buttons to the bottom */
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.focus-footer .btn-rain-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(226, 232, 240, 0.8) 100%) !important;
    color: #475569 !important;
    border: none !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    cursor: pointer;
    box-shadow: 
        3px 5px 10px rgba(163, 177, 198, 0.25),
        -3px -3px 10px rgba(255, 255, 255, 0.95),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.focus-footer .btn-rain-toggle:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(215, 225, 235, 0.9) 100%) !important;
    box-shadow: 
        4px 6px 12px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 1),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.1) !important;
    transform: translateY(-2px) !important;
}

.focus-footer .btn-rain-toggle.active {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%) !important;
    color: #0ea5e9 !important;
    font-weight: 800 !important;
    border: 1px solid rgba(14, 165, 233, 0.3) !important;
    box-shadow:
        3px 5px 10px rgba(14, 165, 233, 0.12),
        inset 1px 1px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(14, 165, 233, 0.1) !important;
}

.focus-footer .btn-primary-suspended {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    border: none !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    cursor: pointer;
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.35),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    letter-spacing: 0.02em;
}

.focus-footer .btn-primary-suspended:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow: 
        0 6px 18px rgba(59, 130, 246, 0.45),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.4),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* COMPLETED COURT BADGE (DASHBOARD) */
.court-badge-done {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 22px; /* Smaller and more refined */
    height: 22px;
    background: linear-gradient(135deg, #ffd700 0%, #daa520 100%); /* Gold Gradient */
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    z-index: 20;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    transform: rotate(-12deg);
    animation: badge-gold-glow 2s infinite alternate, badge-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ═══════════════════════════════════════════
   PHASE 5: TIMELINE VIEW (v1039 PREMIUM)
   ═══════════════════════════════════════════ */
.timeline-unified-canvas {
    background: transparent !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    display: flex;
    flex-direction: column;
    z-index: 10 !important;
}

.timeline-side-selector {
    position: absolute;
    top: 30%;
    right: 40px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.timeline-side-selector .btn-sede {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: transparent; /* Totally clear when inactive */
    border: none;
    box-shadow: none;
    font-weight: 800;
    font-size: 0.8rem;
    color: #cbd5e1; /* Soft grey text */
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #475569; /* Slightly darker pill text */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.attendance-pill:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px);
}

.attendance-pill.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    color: #1e293b !important; /* Oscurecido a Slate-800 */
    font-weight: 800 !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.5),
        -2px -2px 8px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.20) !important;
}

/* Notes & Objectives (Neumorphic Inset / Floating Master) */
.focus-notes-area {
    width: 100%;
    min-height: 120px;
    padding: 22px;
    border-radius: 28px;
    background: rgba(43, 67, 241, 0.05) !important; /* Inset sapphire tint matching search bar */
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #0f172a !important; /* Oscurecido a Slate-900 para contraste impecable en Tema Claro */
    resize: none;
    outline: none;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 
        inset 4px 4px 8px rgba(0, 0, 0, 0.12), /* Intensified inset dark shadow */
        inset -4px -4px 8px rgba(255, 255, 255, 0.95), /* Inset bright backlight */
        inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
}

.focus-notes-area:focus {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 250, 255, 0.94) 100%) !important; /* Convex satin floating matching node-summary */
    border-color: rgba(43, 67, 241, 0.35) !important;
    transform: translateY(-4px) scale(1.01); /* Elevated physical shift */
    box-shadow:
        12px 18px 36px rgba(163, 177, 198, 0.55), /* Floating 3D shadow */
        -10px -10px 24px rgba(255, 255, 255, 0.95), /* Floating 3D glow */
        inset 2px 2px 4px rgba(255, 255, 255, 1), /* Rim luminoso */
        inset -2px -2px 4px rgba(163, 177, 198, 0.20) !important; /* Rim oscuro */
}

.objective-card {
    padding: 8px 15px;
    background: transparent;
    border-left: 3px solid var(--color-electric-blue); /* Solid Electric Blue */
    border-radius: 0;
    margin-bottom: 6px;
}

.objective-card .label {
    font-size: 0.6rem;
    font-weight: 800;
    color: #334155 !important; /* Oscurecido a Slate-700 para Tema Claro */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 2px;
}

.objective-card .value {
    font-size: 1rem;
    color: #0f172a !important; /* Oscurecido a Slate-900 para contraste impecable en Tema Claro */
    font-weight: 600;
    line-height: 1.3;
}

/* Court Title Prominence */
#focus-court-container .court-title {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: #5b6e94 !important;
}

/* Footer Actions */
.focus-footer {
    margin-top: auto; /* Restored to push buttons to the bottom */
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.focus-footer .btn-rain-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(226, 232, 240, 0.8) 100%) !important;
    color: #475569 !important;
    border: none !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    cursor: pointer;
    box-shadow: 
        3px 5px 10px rgba(163, 177, 198, 0.25),
        -3px -3px 10px rgba(255, 255, 255, 0.95),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.focus-footer .btn-rain-toggle:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(215, 225, 235, 0.9) 100%) !important;
    box-shadow: 
        4px 6px 12px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 1),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.1) !important;
    transform: translateY(-2px) !important;
}

.focus-footer .btn-rain-toggle.active {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%) !important;
    color: #0ea5e9 !important;
    font-weight: 800 !important;
    border: 1px solid rgba(14, 165, 233, 0.3) !important;
    box-shadow:
        3px 5px 10px rgba(14, 165, 233, 0.12),
        inset 1px 1px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(14, 165, 233, 0.1) !important;
}

.focus-footer .btn-primary-suspended {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    border: none !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    cursor: pointer;
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.35),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    letter-spacing: 0.02em;
}

.focus-footer .btn-primary-suspended:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow: 
        0 6px 18px rgba(59, 130, 246, 0.45),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.4),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* COMPLETED COURT BADGE (DASHBOARD) */
.court-badge-done {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 22px; /* Smaller and more refined */
    height: 22px;
    background: linear-gradient(135deg, #ffd700 0%, #daa520 100%); /* Gold Gradient */
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    z-index: 20;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    transform: rotate(-12deg);
    animation: badge-gold-glow 2s infinite alternate, badge-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ═══════════════════════════════════════════
   PHASE 5: TIMELINE VIEW (v1039 PREMIUM)
   ═══════════════════════════════════════════ */
.timeline-unified-canvas {
    background: #ffffff;
    position: fixed; /* Make the view itself fixed to the viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1800; /* Behind sidebar but above everything else */
}

/* Container de Scroll y Layout de Línea de Tiempo */
.linea-tiempo-main-scroll {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    background: transparent;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    padding: 0;
    padding-bottom: 35vh; /* Evita que los últimos meses (Septiembre a Diciembre) se corten en la parte inferior al hacer scroll */
}
.linea-tiempo-main-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari/Edge */
}

.linea-tiempo-container {
    position: relative;
    padding: 0; /* Clear previous artificial padding to support perfect 100vh snap sections */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* --- Canal Base Tallado (Groove Neumórfico Glassmorphic de Cristal Recesado) --- */
.lt-main-line {
  position: absolute;
  left: 50%;
  top: 50vh;
  bottom: 50vh;
  width: 10px; /* Rediseño super estilizado ultra fino */
  background: rgba(43, 67, 241, 0.05); /* Cristal esmerilado zafiro idéntico al chat/semana actual */
  border: 1.5px solid rgba(43, 67, 241, 0.18);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 3px 3px 6px rgba(0, 0, 0, 0.1), /* Grabado neumórfico rehundido */
    inset -3px -3px 6px rgba(255, 255, 255, 0.95),
    inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
  border-radius: 10px;
  transform: translateX(-50%);
  z-index: 1;
}

[data-theme="dark"] .lt-main-line {
  background: rgba(10, 20, 50, 0.55) !important; /* Cristal de cobalto esmerilado rehundido de notas/semana */
  border: 1.5px solid rgba(92, 115, 242, 0.25) !important;
  box-shadow:
    inset 5px 5px 10px rgba(0, 0, 0, 0.90),
    inset -5px -5px 12px rgba(92, 115, 242, 0.1) !important;
}

/* --- Riel Láser de Cristal de Fibra Óptica de Neón Satinado --- */
@keyframes breathingGlow {
  0%, 100% {
    box-shadow:
      0 0 12px rgba(43, 67, 241, 0.4),
      0 0 20px rgba(126, 157, 252, 0.35),
      inset 0 0 3px rgba(255, 255, 255, 0.6);
  }
  50% {
    box-shadow:
      0 0 16px rgba(43, 67, 241, 0.6),
      0 0 32px rgba(126, 157, 252, 0.55),
      inset 0 0 4px rgba(255, 255, 255, 0.85);
  }
}

@keyframes breathingGlowDark {
  0%, 100% {
    box-shadow:
      0 0 14px rgba(92, 132, 255, 0.6),
      0 0 24px rgba(0, 210, 255, 0.4),
      inset 0 0 4px rgba(255, 255, 255, 0.5) !important;
  }
  50% {
    box-shadow:
      0 0 22px rgba(92, 132, 255, 0.8),
      0 0 38px rgba(0, 210, 255, 0.6),
      inset 0 0 6px rgba(255, 255, 255, 0.75) !important;
  }
}

.lt-active-path {
  position: absolute;
  left: 50%;
  top: 50vh;
  width: 5px; /* Ajuste ultra-sleek dentro del canal de 9px */
  background: linear-gradient(180deg, #2B43F1 0%, #7e9dfc 50%, #2B43F1 100%) !important; /* Azul líquido firma capaz y brillante con degradados, constante y unificado para todas las sedes */
  animation: breathingGlow 4s ease-in-out infinite; /* Respiración dinámica */
  transform: translateX(-50%);
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  border-radius: 6px;
  border: 0.5px solid rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .lt-active-path {
  background: linear-gradient(180deg, #5c84ff 0%, #00d2ff 50%, #5c84ff 100%) !important; /* Azul cobalto/plasma cian brillante de alta gama, constante y unificado para todas las sedes */
  animation: breathingGlowDark 4s ease-in-out infinite !important;
  border: 0.5px solid rgba(255, 255, 255, 0.3) !important;
}

.timeline-side-selector {
    position: absolute;
    top: 50%; /* Center vertically matching the left sidebar */
    right: 40px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px; /* Symmetric tight, compact gap */
    z-index: 100;
}

/* --- BOTONES DE SEDE (REVERTIDOS AL ESTILO ORIGINAL) --- */
.timeline-side-selector .btn-sede {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: transparent;
    border: none;
    box-shadow: none;
    font-weight: 800;
    font-size: 0.75rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.timeline-side-selector .btn-sede span {
    color: #cbd5e1;
    transition: color 0.3s;
}

.timeline-side-selector .btn-sede:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

.timeline-side-selector .btn-sede:hover:not(.active) span {
    color: #64748b !important;
}

[data-theme="dark"] .timeline-side-selector .btn-sede:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .timeline-side-selector .btn-sede:hover:not(.active) span {
    color: #ffffff !important;
}

.timeline-side-selector .btn-sede.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #5b6e94 !important;
    box-shadow: 
        5px 6px 16px rgba(163, 177, 198, 0.35),
        -5px -5px 14px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: scale(1.15) translateY(-2px);
    font-weight: 900;
}

.timeline-side-selector .btn-sede.active span {
    color: #5b6e94 !important;
}

[data-theme="dark"] .timeline-side-selector .btn-sede.active span {
    color: #ffffff !important; /* Blanco brillante igual a los meses seleccionados */
}

[data-theme="dark"] .timeline-side-selector .btn-sede:not(.active) span {
    color: #64748b !important; /* Gris pizarra igual a los meses no seleccionados */
}

/* Disable liquid effect for timeline buttons */
.timeline-side-selector .btn-sede .liquid {
    display: none !important;
}

.otc-timeline-node {
    position: relative;
    width: 100%;
    height: 100vh; /* EACH MONTH BLOCK TAKES EXACTLY 100% VIEWPORT HEIGHT */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0; /* Clear previous bottom margin */
    scroll-snap-align: center; /* PERFECT NATIVE SNAP ALIGN */
    scroll-snap-stop: always; /* NATIVE SNAP STOP PREVENTS SKIPPING MONTHS */
    opacity: 0.15;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.otc-timeline-node:last-child {
    margin-bottom: 0;
}

.otc-timeline-node.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.node-content-wrapper {
    display: flex;
    width: 100%;
    max-width: 850px; /* Constrains nodes to center column */
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

.node-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 3;
}

.node-side.left { 
    align-items: flex-end; 
    padding-right: 55px; /* Separation from the central timeline line */
    text-align: right; 
}
.node-side.right { 
    align-items: flex-start; 
    padding-left: 55px; /* Separation from the central timeline line */
    text-align: left; 
}

/* Zig-Zag Alternating Layout */
.otc-timeline-node:nth-child(even) .node-content-wrapper {
  flex-direction: row-reverse;
}

.otc-timeline-node:nth-child(even) .node-side.left {
  align-items: flex-start;
  padding-left: 55px;
  padding-right: 0;
  text-align: left;
}

.otc-timeline-node:nth-child(even) .node-side.right {
  align-items: flex-end;
  padding-right: 55px;
  padding-left: 0;
  text-align: right;
}

.node-dot-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.node-dot {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.otc-timeline-node.active .node-dot {
    background: #1d40d4 !important; /* Azul cobalto unificado oficial de la barra */
    border-color: #ffffff !important;
    box-shadow: 0 0 0 6px rgba(29, 64, 212, 0.25) !important;
    transform: scale(1.25);
}

[data-theme="dark"] .otc-timeline-node.active .node-dot {
    background: #5c84ff !important; /* Azul eléctrico unificado oficial de la barra */
    border-color: #0b0f19 !important;
    box-shadow: 0 0 0 6px rgba(92, 132, 255, 0.25) !important;
}

.node-summary {
    width: 100%;
    max-width: 400px;
    padding: 25px;
    border-radius: 25px;
    /* Fondo Convexo Cristalino Claro */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 245, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    box-shadow:
        16px 24px 48px rgba(163, 177, 198, 0.6), /* Sombra externa principal escalada */
        -16px -24px 48px rgba(255, 255, 255, 0.8), /* Brillo externo escalado */
        inset 2px 2px 4px rgba(255, 255, 255, 1), /* Rim interno luminoso */
        inset -2px -2px 4px rgba(163, 177, 198, 0.25) !important; /* Rim interno oscuro */
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fondo Convexo Metálico Oscuro para la tarjeta de Objetivos Mensuales */
[data-theme="dark"] .node-summary {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.65) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    box-shadow: 
        16px 24px 48px rgba(0, 0, 0, 0.9), /* Sombra negra externa */
        -12px -16px 36px rgba(255, 255, 255, 0.05), /* Halo de luz exterior inverso */
        inset 2px 2px 4px rgba(255, 255, 255, 0.15), /* Rim de luz interna */
        inset -2px -2px 4px rgba(0, 0, 0, 0.5) !important; /* Rim de sombra interna */
}

/* --- Título de Objetivo Mensual (Azul Eléctrico Moderno Insignia) --- */
.node-summary h4 {
    font-size: 1.1rem;
    color: #1d40d4 !important; /* Azul cobalto unificado oficial de la barra */
    border-bottom: 1px solid var(--timeline-h4-border) !important;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

[data-theme="dark"] .node-summary h4 {
    color: #5c84ff !important; /* Azul eléctrico unificado oficial de la barra */
}

/* --- Mes Inactivo (Sombra Silueta Minimalista) --- */
.node-date {
    font-size: clamp(1.4rem, 3.4vw, 2.2rem); /* Calibrado fluido para evitar colisión de meses largos como Septiembre/Noviembre */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: rgba(100, 116, 139, 0.35) !important; /* Un gris un poco más claro/visible en modo claro */
    line-height: 1;
    white-space: nowrap !important;
    filter: blur(1.5px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

[data-theme="dark"] .node-date {
    color: rgba(255, 255, 255, 0.12) !important; /* Un gris un poco más claro/visible en modo oscuro */
    text-shadow: none;
}

.timeline-weekly-item {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left; /* Keep text left aligned inside cards */
  border-left: 4px solid transparent;
}

/* Semanas inactivas - Muy elegantes y apagadas */
.timeline-weekly-item.is-inactive {
  border-left: 3px solid var(--timeline-border-inactive);
  padding: 8px 12px 8px 15px;
  border-radius: 0;
  opacity: 0.7;
}

.timeline-weekly-item.is-inactive .weekly-item-title {
  font-weight: 600;
  color: var(--timeline-inactive-week-title);
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.timeline-weekly-item.is-inactive .weekly-item-content {
  color: var(--timeline-inactive-week-text);
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 400;
}

/* Semana actual - Tarjeta Neumórfica Inset Glass (Enterrada en relieve físico - Mismas físicas que .focus-notes-area) */
.timeline-weekly-item.is-current {
  background: rgba(43, 67, 241, 0.05) !important; /* Idéntico al color de notas/chat de notas */
  border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
  border-left: 4px solid #2B43F1 !important; /* Mismo azul eléctrico firma para la llave en ambos temas */
  box-shadow:
    inset 4px 4px 8px rgba(0, 0, 0, 0.12), /* Idéntico al grabado neumórfico rehundido de notas */
    inset -4px -4px 8px rgba(255, 255, 255, 0.95),
    inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
  backdrop-filter: blur(5px);
  /* Físicamente "enterrada", no usa transform translateY flotante */
}

[data-theme="dark"] .timeline-weekly-item.is-current {
  background: rgba(10, 20, 50, 0.55) !important; /* Cristal de cobalto esmerilado rehundido de notas */
  border: 1.5px solid rgba(92, 115, 242, 0.25) !important;
  border-left: 4px solid #2B43F1 !important; /* Mismo azul eléctrico firma para la llave */
  box-shadow:
    inset 5px 5px 10px rgba(0, 0, 0, 0.90), /* Grabado oscuro interno idéntico a notas */
    inset -5px -5px 12px rgba(92, 115, 242, 0.18), /* Retroiluminación zafiro activa */
    inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(5px);
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}


.timeline-weekly-item.is-current .weekly-item-title {
  font-weight: 800;
  color: #5b6e94 !important; /* Gris de botón VAT activo cuando está seleccionado */
  font-size: 0.85rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
}

.timeline-weekly-item.is-current .weekly-item-content {
  color: #5b6e94 !important; /* Gris de botón VAT activo cuando está seleccionado */
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 500;
}

[data-theme="dark"] .timeline-weekly-item.is-current .weekly-item-title {
  color: #ffffff !important; /* Blanco puro idéntico al botón de sede activo en oscuro */
}

[data-theme="dark"] .timeline-weekly-item.is-current .weekly-item-content {
  color: #f1f5f9 !important; /* Blanco suave idéntico al botón de sede activo en oscuro */
}

/* Badge de semana actual interactivo y reactivo */
.timeline-weekly-item .current-week-badge {
  font-size: 0.65rem;
  background: rgba(43, 67, 241, 0.1) !important; /* Fondo translúcido azul firma uniforme */
  color: #2B43F1 !important; /* Texto azul firma constante en ambos temas */
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(43, 67, 241, 0.15) !important;
  border: 1px solid rgba(43, 67, 241, 0.3) !important; /* Borde azul firma constante en ambos temas */
  display: inline-block;
  line-height: 1;
}

[data-theme="dark"] .timeline-weekly-item .current-week-badge {
  box-shadow: 0 0 15px rgba(43, 67, 241, 0.25) !important;
  border: 1px solid rgba(43, 67, 241, 0.4) !important;
}

/* --- Mes Activo: Azul Eléctrico Moderno (Máxima Consistencia visual) --- */
.otc-timeline-node.active .node-date {
    color: #1d40d4 !important; /* Azul eléctrico insignia moderno */
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    filter: blur(0) drop-shadow(0 4px 8px rgba(0, 85, 255, 0.15));
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(0, 85, 255, 0.08);
}

[data-theme="dark"] .otc-timeline-node.active .node-date {
    color: #5c84ff !important; /* Azul Eléctrico ultra luminoso modo oscuro */
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    filter: blur(0) drop-shadow(0 0 12px rgba(96, 165, 250, 0.25));
}

.timeline-weekly-item {
    margin-top: 15px;
    padding-left: 15px;
    border-left: 3px solid rgba(43, 67, 241, 0.2);
    text-align: left; /* Keep text left aligned inside cards */
}

/* --- SELECTORES DESPLEGABLES PREMIUM OTC (LIGHT & DARK THEMES) --- */
/* Matches exactly the .otc-td-trigger table dropdown button style */
.otc-premium-select {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 7px 32px 7px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-main);
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    min-height: 34px;
    opacity: 0.95;
}

.otc-premium-select:focus,
.otc-premium-select:hover {
    outline: none;
    border-color: var(--color-electric-blue);
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .otc-premium-select {
    background-color: rgba(255, 255, 255, 0.09);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    color: var(--text-main);
    box-shadow: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
}

[data-theme="dark"] .otc-premium-select:focus,
[data-theme="dark"] .otc-premium-select:hover {
    border-color: var(--color-electric-blue);
    background-color: rgba(255, 255, 255, 0.1);
}

.otc-premium-select option {
    background-color: #ffffff;
    color: #334155;
    font-family: 'Outfit', sans-serif;
}

[data-theme="dark"] .otc-premium-select option {
    background-color: #0f172a;
    color: #cbd5e1;
    font-family: 'Outfit', sans-serif;
}

.timeline-mobile-dropdowns,
.canchas-mobile-controls-bar {
    display: none;
}

/* ═══════════════════════════════════════════
   TIMELINE MONTH INDEX SIDEBAR (LEFT SIDE)
   ═══════════════════════════════════════════ */
.timeline-month-nav {
    position: absolute;
    top: 50%;
    left: 40px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px; /* Tight, compact gap for perfect layout of 12 buttons */
    z-index: 100;
}

/* --- BOTONES MENSUALES (REVERTIDOS AL ESTILO ORIGINAL) --- */
.timeline-month-nav-item {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.timeline-month-nav-item .nav-dot {
    display: none !important;
}

.timeline-month-nav-item .nav-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #cbd5e1;
    text-transform: uppercase;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
}

.timeline-month-nav-item:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

.timeline-month-nav-item:hover:not(.active) .nav-label {
    color: #64748b !important;
}

[data-theme="dark"] .timeline-month-nav-item:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .timeline-month-nav-item:hover:not(.active) .nav-label {
    color: #ffffff !important;
}

.timeline-month-nav-item.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 
        5px 6px 16px rgba(163, 177, 198, 0.35),
        -5px -5px 14px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: scale(1.15) translateY(-2px);
}

.timeline-month-nav-item.active .nav-label {
    color: #5b6e94 !important;
    font-weight: 900;
}



@keyframes badge-gold-glow {
    from { box-shadow: 0 0 8px rgba(218, 165, 32, 0.4); }
    to { box-shadow: 0 0 15px rgba(218, 165, 32, 0.8); }
}

@keyframes badge-pop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(-12deg); opacity: 1; }
}
/* ═══════════════════════════════════════════
   PHASE 4: AUDIT PANEL (SIDE OVER)
═══════════════════════════════════════════ */
.audit-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100vh;
    z-index: 200000;
    display: flex;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.audit-panel.active {
    transform: translateX(0);
    pointer-events: auto;
}

.audit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    pointer-events: none;
}

.audit-panel.active .audit-overlay {
    opacity: 1;
    pointer-events: auto;
}

.audit-content {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.audit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.audit-header h3 {
    font-size: 1.6rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 5px;
}

.audit-header p {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-close-audit {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: all 0.2s;
}

.btn-close-audit:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.audit-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Audit Cards */
.audit-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}

.audit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.audit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.audit-date {
    font-weight: 800;
    color: #1e293b;
    font-size: 0.95rem;
}

.audit-date small {
    color: #cbd5e1;
    font-weight: 600;
}

.audit-ball-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.audit-info-row {
    color: #475569;
    font-size: 0.9rem;
}

.audit-notes {
    margin-top: 15px;
    padding: 10px 15px;
    background: #f8fafc;
    border-left: 3px solid #e2e8f0;
    font-style: italic;
    color: #cbd5e1;
    font-size: 0.85rem;
    border-radius: 0 8px 8px 0;
}

.audit-loading, .audit-empty, .audit-error {
    text-align: center;
    padding: 100px 20px;
    color: #cbd5e1;
    font-weight: 500;
}

/* PREMIUM 3D MINIMALIST CARDS */
.premium-card-3d {
    background: #ffffff;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
    border-radius: 18px !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.premium-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s;
}

.premium-card-3d:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.premium-card-3d:hover::before {
    opacity: 1;
}

/* LOCAL AUDIT BUTTON */
.btn-audit-local {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-audit-local:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: scale(1.05);
}

/* Attendance Item - Highlight requested */
.attendance-item.present {
    background: rgba(59, 130, 246, 0.2) !important; /* Blue 20% Opacity as requested */
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Custom Scroll */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}



/* INSIGNIA VIDRIO PLATINO (CRYSTAL PREMIUM - SOFT WHITE GLOW) */
.court-badge-done {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.92) !important; /* Vidrio blanco sutil y limpio */
    backdrop-filter: blur(12px) !important; /* Sin saturación morada exagerada */
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-electric-blue); /* Azul vibrante OTC */
    font-weight: 900;
    z-index: 20;
    
    /* Borde Blanco Platino Sutil */
    border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
    
    /* Sombra de resplandor blanco suave y apagado */
    box-shadow: 
        0 4px 14px rgba(255, 255, 255, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 0 8px rgba(255, 255, 255, 0.8) !important;
        
    animation: badgeAppear 0.6s cubic-bezier(0.23, 1, 0.32, 1), badgePulse 3s infinite ease-in-out;
    cursor: default;
    pointer-events: none;
    text-shadow: none !important;
}

@keyframes badgeAppear {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(255, 255, 255, 0.5), 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 0 8px rgba(255, 255, 255, 0.8); }
    50% { transform: scale(1.02); box-shadow: 0 5px 18px rgba(255, 255, 255, 0.75), 0 2px 8px rgba(0, 0, 0, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.9); }
}


.court-card.session-complete {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* SYNC CLOUD ICONS (PREMIUM) */
.sync-cloud-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 7px; /* Visual correction to center over calendar */
    flex-shrink: 0;
    box-shadow: none !important;
}

.sync-cloud-icon:hover {
    background: #ffffff !important;
    transform: scale(1.1);
    color: var(--color-electric-blue) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
    border-color: #ffffff !important;
}

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

.sync-cloud-icon.loading {
    color: var(--color-electric-blue) !important;
    animation: cloudPulse 1.8s infinite ease-in-out;
}

.sync-cloud-icon.loading .cloud-check {
    opacity: 0;
}

.sync-cloud-icon.success {
    color: #cbd5e1 !important; /* Unified grey for success state */
}

.sync-cloud-icon.error {
    color: #EF4444 !important;
}

@keyframes cloudPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ==========================================================================
   PREMIUM FLOATING METRICS CAPSULE (STUDENT COUNT)
   ========================================================================== */
/* PREMIUM FLOATING METRICS CONTAINER */
.dashboard-metrics-container {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1750; /* Below sidebar but above courts canvas */
    pointer-events: none;
}

/* Base style for all capsules */
.active-students-capsule,
.active-teachers-capsule,
.active-courts-capsule,
.active-ratio-capsule,
.active-attendance-capsule {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    font-family: 'Outfit', sans-serif;
    color: #5b6e94 !important; /* Idéntico al color de letra del botón de sede activo */
    font-size: 0.85rem;
    font-weight: 700;
    pointer-events: auto !important; /* Habilitar interacción para hover */
    border-radius: 30px;
    overflow: hidden !important; /* Esencial para el choque visual en los bordes */
    position: relative !important; /* Contenedor de posicionamiento absoluto */
    isolation: isolate !important; /* Stacking context para mantener la onda detrás de textos */
    white-space: nowrap !important; /* Texto siempre en una línea */
    flex-shrink: 0 !important; /* No se encoge con la pantalla */
    min-width: max-content !important; /* Siempre el ancho del contenido */
}

/* Efectos de Grabado Neumórficos Con Color (Chat de Notas) */
/* Efectos de Grabado Neumórficos Con Degradado de Calor (Heat Map) */
.active-students-capsule,
.active-teachers-capsule,
.active-courts-capsule,
.active-ratio-capsule,
.active-attendance-capsule {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    font-family: 'Outfit', sans-serif;
    color: #5b6e94 !important;
    font-size: 0.85rem;
    font-weight: 700;
    pointer-events: auto !important;
    border-radius: 30px;
    overflow: hidden !important;
    position: relative !important;
    isolation: isolate !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-width: max-content !important;
    background: rgba(43, 67, 241, 0.05) !important;
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
    box-shadow: 
        inset 4px 4px 8px rgba(0, 0, 0, 0.12),
        inset -4px -4px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
}

.active-students-capsule:hover,
.active-teachers-capsule:hover,
.active-courts-capsule:hover,
.active-ratio-capsule:hover,
.active-attendance-capsule:hover {
    background: rgba(43, 67, 241, 0.08) !important;
    border-color: rgba(43, 67, 241, 0.28) !important;
    transform: none !important;
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.15),
        inset -5px -5px 10px rgba(255, 255, 255, 0.98),
        0 4px 12px rgba(43, 67, 241, 0.06) !important;
    z-index: 5;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

[data-theme="dark"] .active-students-capsule,
[data-theme="dark"] .active-teachers-capsule,
[data-theme="dark"] .active-courts-capsule,
[data-theme="dark"] .active-ratio-capsule,
[data-theme="dark"] .active-attendance-capsule {
    background: rgba(10, 20, 50, 0.55) !important;
    border: 1.5px solid rgba(92, 115, 242, 0.25) !important;
    color: #ffffff !important;
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.90),
        inset -5px -5px 12px rgba(92, 115, 242, 0.18),
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .active-students-capsule:hover,
[data-theme="dark"] .active-teachers-capsule:hover,
[data-theme="dark"] .active-courts-capsule:hover,
[data-theme="dark"] .active-ratio-capsule:hover,
[data-theme="dark"] .active-attendance-capsule:hover {
    background: rgba(20, 32, 65, 0.75) !important;
    border-color: rgba(92, 115, 242, 0.45) !important;
    transform: none !important;
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.95),
        inset -5px -5px 10px rgba(255, 255, 255, 0.15),
        0 4px 12px rgba(92, 115, 242, 0.25) !important;
    z-index: 5;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Indicadores Activos y Textos Destacados - Colores Temáticos Propios para cada Categoría */
.active-students-capsule .pulse-dot,
.active-teachers-capsule .pulse-dot-purple,
.active-courts-capsule .pulse-dot-green,
.active-ratio-capsule .pulse-dot-cyan,
.active-attendance-capsule .pulse-dot-orange,
.active-indigo-capsule .pulse-dot-indigo {
    width: 8px;
    height: 8px;
    border-radius: 50% !important;
    display: inline-block !important; /* Force block model everywhere */
    vertical-align: middle !important;
    position: relative !important; /* Esencial para centrar el ::after concéntrico */
}

.active-students-capsule .capsule-text strong,
.active-teachers-capsule .capsule-text strong,
.active-courts-capsule .capsule-text strong,
.active-ratio-capsule .capsule-text strong,
.active-attendance-capsule .capsule-text strong,
.active-indigo-capsule .capsule-text strong {
    font-weight: 800;
    font-size: 1.05rem;
    margin-left: 3px;
}

/* 1. Alumnos: Azul Premium */
.active-students-capsule .pulse-dot {
    background: #2563eb !important;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4) !important;
    animation: pulseBlue 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.active-students-capsule .capsule-text strong,
.active-students-capsule strong {
    color: #2563eb !important;
    text-shadow: 0 0 8px rgba(37, 99, 235, 0.15) !important;
}
[data-theme="dark"] .active-students-capsule .pulse-dot {
    background: #60a5fa !important;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5) !important;
}
[data-theme="dark"] .active-students-capsule .capsule-text strong,
[data-theme="dark"] .active-students-capsule strong {
    color: #60a5fa !important;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.3) !important;
}

/* 2. Profesores: Púrpura Elegante */
.active-teachers-capsule .pulse-dot-purple {
    background: #7c3aed !important;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.4) !important;
    animation: pulsePurple 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.active-teachers-capsule .capsule-text strong {
    color: #7c3aed !important;
    text-shadow: 0 0 8px rgba(124, 58, 237, 0.15) !important;
}
[data-theme="dark"] .active-teachers-capsule .pulse-dot-purple {
    background: #c084fc !important;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.5) !important;
}
[data-theme="dark"] .active-teachers-capsule .capsule-text strong {
    color: #c084fc !important;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.3) !important;
}

/* 3. Canchas: Verde Premium */
.active-courts-capsule .pulse-dot-green {
    background: #10b981 !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4) !important;
    animation: pulseGreen 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.active-courts-capsule .capsule-text strong {
    color: #10b981 !important;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.15) !important;
}
[data-theme="dark"] .active-courts-capsule .pulse-dot-green {
    background: #34d399 !important;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5) !important;
}
[data-theme="dark"] .active-courts-capsule .capsule-text strong {
    color: #34d399 !important;
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.3) !important;
}

/* 4. Ratio: Turquesa/Cian */
.active-ratio-capsule .pulse-dot-cyan {
    background: #06b6d4 !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4) !important;
    animation: pulseCyan 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.active-ratio-capsule .capsule-text strong {
    color: #06b6d4 !important;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.15) !important;
}
[data-theme="dark"] .active-ratio-capsule .pulse-dot-cyan {
    background: #22d3ee !important;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.5) !important;
}
[data-theme="dark"] .active-ratio-capsule .capsule-text strong {
    color: #22d3ee !important;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.3) !important;
}

/* 5. Asistencia: Naranja/Fuego */
.active-attendance-capsule .pulse-dot-orange {
    background: #f97316 !important;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4) !important;
    animation: pulseOrange 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.active-attendance-capsule .capsule-text strong {
    color: #f97316 !important;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.15) !important;
}
[data-theme="dark"] .active-attendance-capsule .pulse-dot-orange {
    background: #fb923c !important;
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.5) !important;
}
[data-theme="dark"] .active-attendance-capsule .capsule-text strong {
    color: #fb923c !important;
    text-shadow: 0 0 8px rgba(251, 146, 60, 0.3) !important;
}

/* 6. Formato Pico: Indigo Minimalista */
.active-indigo-capsule .pulse-dot-indigo {
    background: #6366f1 !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4) !important;
    animation: pulseIndigo 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.active-indigo-capsule .capsule-text strong {
    color: #6366f1 !important;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.15) !important;
}
[data-theme="dark"] .active-indigo-capsule .pulse-dot-indigo {
    background: #818cf8 !important;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.5) !important;
}
[data-theme="dark"] .active-indigo-capsule .capsule-text strong {
    color: #818cf8 !important;
    text-shadow: 0 0 8px rgba(129, 140, 248, 0.3) !important;
}

/* ==========================================
   WAVE: CONCENTRIC GLOWING AURA ON ACTIVE DOTS (::after)
   ========================================== */
.pulse-dot::after,
.pulse-dot-purple::after,
.pulse-dot-green::after,
.pulse-dot-cyan::after,
.pulse-dot-orange::after,
.pulse-dot-indigo::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none !important;
    z-index: -1 !important;
    display: block !important;
    transform-origin: center center !important;
}

/* Colores de Onda y Animación en Modo Claro */
.pulse-dot::after {
    background: rgba(37, 99, 235, 0.45) !important;
    animation: auraPulse 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.pulse-dot-purple::after {
    background: rgba(124, 58, 237, 0.45) !important;
    animation: auraPulse 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.pulse-dot-green::after {
    background: rgba(16, 185, 129, 0.45) !important;
    animation: auraPulse 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.pulse-dot-cyan::after {
    background: rgba(6, 182, 212, 0.45) !important;
    animation: auraPulse 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.pulse-dot-orange::after {
    background: rgba(249, 115, 22, 0.45) !important;
    animation: auraPulse 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.pulse-dot-indigo::after {
    background: rgba(99, 102, 241, 0.45) !important;
    animation: auraPulse 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}

/* Colores de Onda en Modo Oscuro */
[data-theme="dark"] .pulse-dot::after {
    background: rgba(96, 165, 250, 0.55) !important;
}
[data-theme="dark"] .pulse-dot-purple::after {
    background: rgba(192, 132, 252, 0.55) !important;
}
[data-theme="dark"] .pulse-dot-green::after {
    background: rgba(52, 211, 153, 0.55) !important;
}
[data-theme="dark"] .pulse-dot-cyan::after {
    background: rgba(34, 211, 238, 0.55) !important;
}
[data-theme="dark"] .pulse-dot-orange::after {
    background: rgba(251, 146, 60, 0.55) !important;
}
[data-theme="dark"] .pulse-dot-indigo::after {
    background: rgba(129, 140, 248, 0.55) !important;
}

/* Local Glowing Aura Ripple Keyframe - Onda Expansiva Simple en el Punto de Equilibrio Óptimo (Escala 5) */
@keyframes auraPulse {
    0%, 10% {
        transform: translate(-50%, -50%) scale(0); /* Nace del punto central del núcleo */
        opacity: 0;
    }
    11% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.95;
    }
    100% {
        transform: translate(-50%, -50%) scale(5); /* Rango de expansión óptimo de 40px de diámetro */
        opacity: 0;
    }
}


@keyframes pulseBlue {
    0%, 30%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
    }
    15% {
        transform: scale(1.40);
        box-shadow: 0 0 16px rgba(37, 99, 235, 0.85);
    }
}

@keyframes pulsePurple {
    0%, 30%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
    }
    15% {
        transform: scale(1.40);
        box-shadow: 0 0 16px rgba(124, 58, 237, 0.85);
    }
}

@keyframes pulseGreen {
    0%, 30%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    }
    15% {
        transform: scale(1.40);
        box-shadow: 0 0 16px rgba(16, 185, 129, 0.85);
    }
}

@keyframes pulseCyan {
    0%, 30%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
    }
    15% {
        transform: scale(1.40);
        box-shadow: 0 0 16px rgba(6, 182, 212, 0.85);
    }
}

@keyframes pulseIndigo {
    0%, 30%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
    }
    15% {
        transform: scale(1.40);
        box-shadow: 0 0 16px rgba(99, 102, 241, 0.85);
    }
}

@keyframes pulseYellow {
    0%, 30%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
    }
    15% {
        transform: scale(1.40);
        box-shadow: 0 0 16px rgba(234, 179, 8, 0.85);
    }
}

.active-students-capsule .capsule-text,
.active-teachers-capsule .capsule-text,
.active-courts-capsule .capsule-text,
.active-ratio-capsule .capsule-text,
.active-attendance-capsule .capsule-text {
    letter-spacing: 0.2px;
}

/* Premium Tooltip Integration */
.active-students-capsule,
.active-teachers-capsule,
.active-courts-capsule,
.active-ratio-capsule,
.active-attendance-capsule {
    cursor: pointer;
    pointer-events: auto !important; /* Enables hover triggers for global data-tooltip popups */
}

@keyframes pulseOrange {
    0%, 30%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
    }
    15% {
        transform: scale(1.40);
        box-shadow: 0 0 16px rgba(249, 115, 22, 0.85);
    }
}

.inactive-hour-panel {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* =========================================
   COLUMN FILTER BUBBLE UI & SORT STYLING
   ========================================= */
.column-filter-bubble,
.column-sort-bubble {
    text-transform: none !important;
    font-family: 'Outfit', sans-serif !important;
}

.column-filter-bubble {
    position: absolute;
    min-width: 190px !important;
    background: var(--panel-bg) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 18px !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.16) !important;
    padding: 10px !important;
    z-index: 200000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    animation: bubbleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transform-origin: center top !important;
    box-sizing: border-box !important;
    will-change: transform, opacity;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.column-filter-bubble .filter-option.clear { 
    color: #9ca3af !important; 
    border-top: 1px solid var(--panel-border) !important; 
}

/* Indicador de filtro activo en encabezado removido a petición: se mantiene solo el icono en azul */

/* ==========================================================================
   DASHBOARD RIGHT SELECTOR - CUSTOM PREMIUM HOVER BUTTONS (CLOUD, CALENDAR, ARROWS)
   ========================================================================== */

/* 1. Default (Not Hovered) - Completely invisible button boundary, clean icon */
.dashboard-right-selector .sync-cloud-icon,
.dashboard-right-selector .calendar-wrapper .btn-calendar-icon.small,
.dashboard-right-selector .calendar-nav-vertical .btn-arrow,
.theme-toggle-btn,
.hamburger-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #94a3b8 !important; /* Elegant light slate inactive icon color */
    transform: scale(1) translateY(0) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    outline: none !important;
}

/* 2. Hovered State (Light Mode) - Matches active VAT button (3D white floating button) */
@media (hover: hover) {
    .dashboard-right-selector .sync-cloud-icon:hover,
    .dashboard-right-selector .calendar-wrapper .btn-calendar-icon.small:hover,
    .dashboard-right-selector .calendar-nav-vertical .btn-arrow:hover,
    .hamburger-btn:hover,
    body.sidebar-open .hamburger-btn:hover,
    .theme-toggle-btn:hover {
        background: #ffffff !important;
        color: #2b43f1 !important; /* Active brand blue text/lines color */
        border: 1px solid #ffffff !important;
        border-radius: 50% !important;
        box-shadow: 
            4px 6px 14px rgba(163, 177, 198, 0.5),    /* Light blue-grey soft outer shadow */
            -4px -6px 12px #ffffff,                     /* White outer highlight */
            inset 0 0 0 1px #ffffff !important;         /* Sharp inner perimeter highlight */
        transform: scale(1.1) translateY(-2px) !important;
    }
}

/* 3. Default State (Dark Mode) - Dark theme muted inactive state */
[data-theme="dark"] .dashboard-right-selector .sync-cloud-icon,
[data-theme="dark"] .dashboard-right-selector .calendar-wrapper .btn-calendar-icon.small,
[data-theme="dark"] .dashboard-right-selector .calendar-nav-vertical .btn-arrow,
[data-theme="dark"] .theme-toggle-btn,
[data-theme="dark"] .hamburger-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #475569 !important; /* Dark anthracite muted inactive icon color */
    transform: scale(1) translateY(0) !important;
    outline: none !important;
}

/* 4. Hovered State (Dark Mode) - Matches active Dark theme VAT button (Obsidian glassmorphic) */
@media (hover: hover) {
    [data-theme="dark"] .dashboard-right-selector .sync-cloud-icon:hover,
    [data-theme="dark"] .dashboard-right-selector .calendar-wrapper .btn-calendar-icon.small:hover,
    [data-theme="dark"] .dashboard-right-selector .calendar-nav-vertical .btn-arrow:hover,
    [data-theme="dark"] .hamburger-btn:hover,
    [data-theme="dark"] body.sidebar-open .hamburger-btn:hover,
    [data-theme="dark"] .theme-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.12) !important;
        color: #ffffff !important; /* High brightness white text/icon */
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 50% !important;
        backdrop-filter: blur(16px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
        box-shadow: 
            4px 6px 14px rgba(0, 0, 0, 0.7),            /* Deep dark outer shadow */
            -4px -6px 12px rgba(255, 255, 255, 0.02),    /* Smooth outer highlight */
            inset 0 0 0 1.2px rgba(255, 255, 255, 0.1) !important; /* Perimetral inner highlight */
        transform: scale(1.1) translateY(-2px) !important;
    }
}

/* ==========================================================================
   DARK THEME CUSTOM AVATAR STYLING (PLAYERS & COACHES)
   ========================================================================== */

[data-theme="dark"] .student-avatar,
[data-theme="dark"] .court-prof-container .btn-prof {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.75) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.95),
        -2px -2px 8px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

[data-theme="dark"] .student-avatar:hover,
[data-theme="dark"] .court-prof-container .btn-prof:hover {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.85) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    box-shadow: 
        6px 8px 16px rgba(0, 0, 0, 0.98),
        -2px -2px 8px rgba(255, 255, 255, 0.08),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.35),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .student-avatar:hover {
    transform: translateX(-50%) translateY(-4px) !important; /* Conserve horizontal offset centering */
}

[data-theme="dark"] .court-prof-container .btn-prof:hover {
    transform: translateY(-4px) !important; /* Vertical lift */
}

/* 2. Sincronización en las Cápsulas Flotantes de Métricas (Header) */
[data-theme="dark"] .active-students-capsule:hover,
[data-theme="dark"] .active-teachers-capsule:hover,
[data-theme="dark"] .active-courts-capsule:hover,
[data-theme="dark"] .active-ratio-capsule:hover,
[data-theme="dark"] .active-attendance-capsule:hover {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.90) 0%, rgba(15, 20, 30, 0.98) 100%) !important; /* Convex Metallic gradient */
    border: 1.5px solid rgba(92, 115, 242, 0.45) !important;
    color: #ffffff !important;
    transform: none !important; /* Sin desplazamiento físico ni escala */
    box-shadow: 
        12px 18px 36px rgba(0, 0, 0, 0.95), /* Enhanced floating dark shadow */
        -8px -10px 24px rgba(255, 255, 255, 0.05), /* Back glow */
        inset 2px 2px 4px rgba(255, 255, 255, 0.18), /* Rim luminoso */
        inset -2px -2px 4px rgba(0, 0, 0, 0.6) !important; /* Rim oscuro */
    z-index: 5;
    cursor: pointer;
}

/* ==========================================================================
   DARK THEME COURT MODAL BUTTONS (RAIN TOGGLE & SAVE BUTTON)
   ========================================================================== */

[data-theme="dark"] .btn-rain-toggle {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.75) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 
        3px 5px 10px rgba(0, 0, 0, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1px 1px 2px rgba(255, 255, 255, 0.15),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

[data-theme="dark"] .btn-rain-toggle:hover {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.85) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.65),
        -3px -3px 10px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px) !important;
}

[data-theme="dark"] .btn-rain-toggle.active {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.3) 0%, rgba(3, 105, 161, 0.5) 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 1px solid rgba(14, 165, 233, 0.45) !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.65),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.35),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transform: none !important;
}

[data-theme="dark"] .btn-primary-suspended {
    background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.45),
        -2px -2px 8px rgba(255, 255, 255, 0.03),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

[data-theme="dark"] .btn-primary-suspended:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow: 
        0 6px 18px rgba(59, 130, 246, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.35),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* ==========================================================================
   OTC MODERN PREMIUM DARK TABLES & THEMATIC COLOR ACCENTS (GLOBAL HOOK)
   ========================================================================== */

/* --- Global Dark Mode Table Adaptations --- */
[data-theme="dark"] .otc-data-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .otc-data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Glassmorphic elements inside table in dark theme */
[data-theme="dark"] .otc-td-trigger {
    background: rgba(255, 255, 255, 0.09) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .otc-td-trigger:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .otc-day-tag {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%) !important;
    color: #94a3b8 !important;
    box-shadow:
        3px 5px 12px rgba(0, 0, 0, 0.45),
        -3px -4px 10px rgba(255, 255, 255, 0.05),
        inset 1px 1px 2px rgba(255, 255, 255, 0.05),
        inset -1px -1px 2px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .otc-day-tag:hover {
    background: linear-gradient(145deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
    transform: translateY(-2px);
    box-shadow:
        4px 6px 14px rgba(0, 0, 0, 0.55),
        -4px -5px 12px rgba(255, 255, 255, 0.08),
        inset 1px 1px 2px rgba(255, 255, 255, 0.08),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Premium text inputs and select boxes inside table (Dark Mode) */
[data-theme="dark"] table input[type="text"],
[data-theme="dark"] table input[type="password"],
[data-theme="dark"] table input[type="search"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] table input[type="text"]::placeholder,
[data-theme="dark"] table input[type="search"]::placeholder {
    color: #475569 !important;
}

[data-theme="dark"] .otc-data-table select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .otc-data-table select option {
    background: #111420 !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .btn-column-sort {
    color: rgba(255, 255, 255, 0.4) !important;
}

[data-theme="dark"] .sort-rank-badge {
    background: var(--table-accent-color) !important;
    color: #ffffff !important;
}

/* Sticky canchas header fix */
[data-theme="dark"] #view-crear-canchas .otc-data-table thead th {
    background: rgba(14, 16, 23, 0.94) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] #view-crear-canchas .otc-data-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] #view-crear-canchas .otc-data-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] #view-crear-canchas .otc-data-table tr:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}


/* --- State Selection Legibility Overrides (Dark Mode) --- */
[data-theme="dark"] .state-select.state-activo .otc-td-trigger {
    color: var(--table-accent-color) !important;
    background: color-mix(in srgb, var(--table-accent-color) 25%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 40%, transparent) !important;
}

[data-theme="dark"] .state-select.state-retirado .otc-td-trigger {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.40) !important;
}

[data-theme="dark"] .state-select.state-prueba .otc-td-trigger {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.25) !important;
    border-color: rgba(251, 191, 36, 0.40) !important;
}


/* --- Global Dynamic Table Accent Color (Linked to Active Sede Theme) --- */
:root {
    --table-accent-color: var(--color-electric-blue) !important;
}


/* --- Table-Specific Theme Customizations (Light & Dark Unified) --- */

.otc-data-table input[type="checkbox"] {
    accent-color: var(--table-accent-color) !important;
}

.otc-data-table tbody tr.row-selected td {
    background: color-mix(in srgb, var(--table-accent-color) 12%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--table-accent-color) 22%, transparent) !important;
}

[data-theme="dark"] .otc-data-table tbody tr.row-selected td {
    background: color-mix(in srgb, var(--table-accent-color) 18%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--table-accent-color) 30%, transparent) !important;
}

.otc-data-table .otc-td-trigger:hover,
.otc-data-table .otc-ms-trigger:hover {
    border-color: var(--table-accent-color) !important;
    background: color-mix(in srgb, var(--table-accent-color) 10%, transparent) !important;
}

[data-theme="dark"] .otc-data-table .otc-td-trigger:hover,
[data-theme="dark"] .otc-data-table .otc-ms-trigger:hover {
    border-color: var(--table-accent-color) !important;
    background: color-mix(in srgb, var(--table-accent-color) 18%, transparent) !important;
}

.otc-data-table input[type="text"]:focus,
.otc-data-table input[type="password"]:focus,
.otc-data-table input[type="search"]:focus,
.otc-data-table select:focus {
    border-color: color-mix(in srgb, var(--table-accent-color) 50%, transparent) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--table-accent-color) 16%, transparent) !important;
}

[data-theme="dark"] .otc-data-table input[type="text"]:focus,
[data-theme="dark"] .otc-data-table input[type="password"]:focus,
[data-theme="dark"] .otc-data-table input[type="search"]:focus,
[data-theme="dark"] .otc-data-table select:focus {
    border-color: var(--table-accent-color) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--table-accent-color) 32%, transparent) !important;
}


/* ==========================================================================
   PHASE 2 DARK MODE ADAPTATIONS: BUTTONS, SEARCH, SYNC & DROPDOWNS
   ========================================================================== */

/* 1. Visibility of Columns & Dynamic Labels (Sidebar Slate Grey / Text Main) */
[data-theme="dark"] .trigger-label {
    color: var(--text-main) !important;
}
[data-theme="dark"] .asig-text-row {
    color: var(--text-muted) !important;
}

/* 2. Adaptation of "Nuevo" Button (.btn-primary-pill) to Dark Theme */
[data-theme="dark"] .btn-primary-pill {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 
        6px 8px 16px rgba(0, 0, 0, 0.95),
        -4px -4px 12px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.6) !important;
}
[data-theme="dark"] .btn-primary-pill:hover {
    transform: translateY(-2px);
    background: linear-gradient(145deg, rgba(60, 75, 100, 0.8) 0%, rgba(25, 32, 48, 0.95) 100%) !important;
    box-shadow: 
        8px 10px 20px rgba(0, 0, 0, 0.99),
        -5px -5px 15px rgba(255, 255, 255, 0.08),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.6) !important;
    color: #ffffff !important;
}

/* 3. Search Focus (Buscador Focus Fix) */
[data-theme="dark"] .search-pill-modern input {
    background: rgba(10, 20, 50, 0.45) !important; /* Cobalto sapphire inset glass */
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    color: var(--text-main) !important;
}
[data-theme="dark"] .search-pill-modern input:focus {
    background: rgba(10, 20, 50, 0.65) !important; /* Deep sapphire glow */
    border-color: rgba(92, 115, 242, 0.40) !important;
    color: var(--text-main) !important;
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.95),
        inset -5px -5px 12px rgba(92, 115, 242, 0.25),
        inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
[data-theme="dark"] .table-search {
    color: var(--text-main) !important;
}

/* 4. Sincronización Icon (Nube) in Dark Theme */
[data-theme="dark"] .sync-cloud-icon {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
}
[data-theme="dark"] .sync-cloud-icon:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .sync-cloud-icon.loading {
    color: var(--color-electric-blue) !important;
}
[data-theme="dark"] .sync-cloud-icon.success {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .sync-cloud-icon.success:hover {
    color: #ffffff !important;
}

/* 5. Lists & Dropdown Menus Dark Theme Adaptation */

/* A. Datepicker (Calendario) */
/* A. Datepicker (Calendario) - Estilos oscuros movidos al final del archivo para unificar con otras tarjetas (Ver sección Premium Container for Calendars) */
[data-theme="dark"] .otc-dp-title {
    color: var(--text-main) !important;
    background: transparent !important;
    border: none !important;
}
[data-theme="dark"] .otc-dp-title:hover:not(.active) {
    background: transparent !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
}
[data-theme="dark"] .otc-dp-title.active {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 
        6px 8px 16px rgba(0, 0, 0, 0.95), /* Sombra profunda neumórfica */
        -4px -4px 12px rgba(255, 255, 255, 0.06), /* Brillo externo superior opuesto */
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25), /* Rim de luz más intenso */
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important; /* Rim interno de sombra */
    transform: scale(1.08) translateY(-2px) !important;
}
[data-theme="dark"] .otc-dp-btn {
    background: transparent !important;
    color: var(--text-muted) !important;
    border: none !important;
}
[data-theme="dark"] .otc-dp-btn:hover {
    background: transparent !important;
    color: #ffffff !important;
    transform: scale(1.15) !important;
}
[data-theme="dark"] .otc-dp-weekday {
    color: #94a3b8 !important;
}
[data-theme="dark"] .otc-dp-day {
    color: var(--text-main) !important;
}
[data-theme="dark"] .otc-dp-day:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--color-electric-blue) !important;
}
[data-theme="dark"] .otc-dp-day.is-today:not(.active) {
    border-color: var(--text-muted) !important;
}
[data-theme="dark"] .otc-dp-item {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .otc-dp-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}
[data-theme="dark"] .otc-dp-day.active,
[data-theme="dark"] .otc-dp-item.active {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    box-shadow: 
        6px 8px 16px rgba(0, 0, 0, 0.95), /* Sombra externa profunda */
        -4px -4px 12px rgba(255, 255, 255, 0.06), /* Brillo externo */
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25), /* Rim de luz interno */
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    transform: translateY(-2px) !important;
}
[data-theme="dark"] .is-week-mode .otc-dp-week-row:hover .otc-dp-day:not(.other-month) {
    background: rgba(255, 255, 255, 0.08) !important;
}
[data-theme="dark"] .is-week-mode .otc-dp-week-row.active .otc-dp-day:not(.other-month) {
    background: var(--color-electric-blue) !important;
    color: #ffffff !important;
}

/* B. Timepicker (Reloj) */
[data-theme="dark"] .otc-tp-dropdown {
    background: var(--panel-bg) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid var(--panel-border) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .otc-tp-trigger {
    background: rgba(10, 20, 50, 0.35) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 7px 12px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    font-family: 'Outfit', sans-serif !important;
    cursor: pointer;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px color-mix(in srgb, var(--table-accent-color) 15%, transparent),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    transition: all 0.2s ease !important;
}

[data-theme="dark"] .otc-tp-trigger:hover {
    background: rgba(10, 20, 50, 0.55) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 40%, transparent) !important;
    color: var(--text-main) !important;
    transform: none !important;
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.95),
        inset -5px -5px 12px color-mix(in srgb, var(--table-accent-color) 25%, transparent),
        inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
}

/* ==========================================================================
   CUSTOM MODALS (DARK THEME GLASSMORPHIC)
   ========================================================================== */
[data-theme="dark"] .otc-modal {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.65) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: none !important;
    box-shadow: 
        16px 24px 48px rgba(0, 0, 0, 0.9),
        -12px -16px 36px rgba(255, 255, 255, 0.05),
        inset 2px 2px 4px rgba(255, 255, 255, 0.15),
        inset -2px -2px 4px rgba(0, 0, 0, 0.5) !important;
    border-radius: 28px !important;
}

[data-theme="dark"] .otc-modal-title {
    color: #ffffff !important;
}

[data-theme="dark"] .otc-modal-text {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .btn-cancel {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.75) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 
        3px 5px 10px rgba(0, 0, 0, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1px 1px 2px rgba(255, 255, 255, 0.15),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .btn-cancel:hover {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.85) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.65),
        -3px -3px 10px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-1.5px) !important;
}

[data-theme="dark"] .btn-confirm {
    background: linear-gradient(145deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 
        0 4px 14px rgba(239, 68, 68, 0.45),
        -2px -2px 8px rgba(255, 255, 255, 0.03),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .btn-confirm:hover {
    background: linear-gradient(145deg, #f87171 0%, #ef4444 100%) !important;
    box-shadow: 
        0 6px 18px rgba(239, 68, 68, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.35),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-1.5px) !important;
}

[data-theme="dark"] .btn-confirm-edit {
    background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.45),
        -2px -2px 8px rgba(255, 255, 255, 0.03),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .btn-confirm-edit:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow: 
        0 6px 18px rgba(59, 130, 246, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.35),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-1.5px) !important;
}
[data-theme="dark"] .otc-tp-item {
    color: var(--text-main) !important;
}
[data-theme="dark"] .otc-tp-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--color-electric-blue) !important;
}
[data-theme="dark"] .otc-tp-item.active {
    background: var(--color-electric-blue) !important;
    color: #ffffff !important;
}
[data-theme="dark"] .otc-tp-col::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* C. Picker Dropdown (Filtros, Asignar Sede, Acciones Rápidas) */
[data-theme="dark"] .otc-picker-dropdown {
    background: var(--panel-bg) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid var(--panel-border) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .otc-picker-dropdown .otc-modal-btn {
    color: var(--text-main) !important;
}
[data-theme="dark"] .otc-picker-dropdown .otc-modal-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--color-electric-blue) !important;
}

/* D. Multiselect Dropdown & Day Pills */
[data-theme="dark"] .otc-ms-dropdown {
    background: var(--panel-bg) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid var(--panel-border) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .otc-ms-item {
    color: var(--text-main) !important;
}
[data-theme="dark"] .otc-ms-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}
[data-theme="dark"] .otc-ms-item.selected {
    background: color-mix(in srgb, var(--table-accent-color) 20%, transparent) !important;
    color: #ffffff !important;
}
[data-theme="dark"] .otc-day-pill {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] .otc-day-pill:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   ADAPTACIÓN PREMIUM DE BOTÓN DE FILTRO Y BUBBLES EN HEADER (MANTENIMIENTO TEMA OSCURO)
   ========================================================================== */

/* 1. Botón de Filtro (.btn-icon-premium) y hovers en Tema Oscuro */
[data-theme="dark"] .btn-icon-premium:hover,
[data-theme="dark"] .btn-icon-premium.active {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--color-electric-blue) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-icon-premium.btn-danger-alt:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

/* Hover de celdas ordenables (headers) y flechas en Tema Oscuro */
[data-theme="dark"] th.sortable:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .btn-column-sort {
    color: rgba(255, 255, 255, 0.45) !important;
}

[data-theme="dark"] .btn-column-filter {
    color: rgba(255, 255, 255, 0.45) !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

[data-theme="dark"] .btn-column-filter:hover {
    background: transparent !important;
    border: none !important;
    color: var(--table-accent-color) !important;
    box-shadow: none !important;
    transform: translateY(-50%) scale(1.1) !important;
}

[data-theme="dark"] .btn-column-sort.active {
    color: var(--table-accent-color) !important;
}

[data-theme="dark"] .btn-column-filter.active {
    background: transparent !important;
    border: none !important;
    color: var(--table-accent-color) !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
}

[data-theme="dark"] .btn-column-filter.active:hover {
    transform: translateY(-50%) scale(1.1) !important;
}

[data-theme="dark"] .btn-filter-manage {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .btn-filter-manage:hover {
    color: var(--color-electric-blue) !important;
}



[data-theme="dark"] .column-filter-bubble .filter-option.clear {
    color: #ef4444 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .column-filter-bubble .filter-option.clear:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}

/* Buscador de columnas y scrollbar premium en burbujas de ordenación */
[data-theme="dark"] .column-sort-bubble .bubble-search-input {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .column-sort-bubble > div[style*="border-bottom"] {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .column-sort-bubble .bubble-options-container::-webkit-scrollbar {
    width: 4px !important;
}

[data-theme="dark"] .column-sort-bubble .bubble-options-container::-webkit-scrollbar-track {
    background: transparent !important;
}

[data-theme="dark"] .column-sort-bubble .bubble-options-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important;
}

/* 3. Opacidad del 100% estandarizada para todos los submenús de listas, ordenamiento y filtros */

/* Light Theme 100% Solid Opacity */
.otc-td-menu,
.column-filter-bubble,
.column-sort-bubble,
.otc-ms-dropdown,
.otc-tp-dropdown,
.otc-dp-dropdown,
.sort-manager-panel {
    background: rgba(255, 255, 255, 1.0) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
}

/* Dark Theme 100% Obsidian Solid Opacity */
[data-theme="dark"] .otc-td-menu,
[data-theme="dark"] .column-filter-bubble,
[data-theme="dark"] .column-sort-bubble,
[data-theme="dark"] .otc-ms-dropdown,
[data-theme="dark"] .otc-tp-dropdown,
[data-theme="dark"] .otc-dp-dropdown,
[data-theme="dark"] .sort-manager-panel {
    background: rgba(13, 17, 28, 1.0) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.55) !important;
}

/* 5. Estandarización de Opciones para Todos los Menús de Tablas (Filtros, Celdas, Reloj y Asignación) */

/* Light Theme Options Base Style */
.sort-option,
.filter-option,
.otc-td-option,
.otc-ms-item,
.otc-tp-item,
.otc-picker-dropdown .otc-modal-btn {
    padding: 9px 13px !important; /* Compensate for 1px transparent border to prevent layout shift */
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 0.90rem !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
}

.sort-option:hover,
.filter-option:hover,
.otc-td-option:hover,
.otc-ms-item:hover,
.otc-tp-item:hover,
.otc-picker-dropdown .otc-modal-btn:hover {
    background: rgba(43, 67, 241, 0.04) !important;
    border-color: rgba(43, 67, 241, 0.15) !important;
    color: var(--color-electric-blue) !important;
    transform: scale(1.02) !important; /* Smooth micro-interaction */
}

/* Dark Theme Options Base Style */
[data-theme="dark"] .sort-option,
[data-theme="dark"] .filter-option,
[data-theme="dark"] .otc-td-option,
[data-theme="dark"] .otc-ms-item,
[data-theme="dark"] .otc-tp-item,
[data-theme="dark"] .otc-picker-dropdown .otc-modal-btn {
    color: #cbd5e1 !important; /* Elegant Slate 300 for maximum legibility */
    border: 1px solid transparent !important;
    background: transparent !important;
}

[data-theme="dark"] .sort-option:hover,
[data-theme="dark"] .filter-option:hover,
[data-theme="dark"] .otc-td-option:hover,
[data-theme="dark"] .otc-ms-item:hover,
[data-theme="dark"] .otc-tp-item:hover,
[data-theme="dark"] .otc-picker-dropdown .otc-modal-btn:hover {
    background: rgba(92, 115, 242, 0.10) !important; /* Soft Zafiro Glow */
    border-color: rgba(92, 115, 242, 0.25) !important;
    color: #ffffff !important;
    transform: scale(1.02) !important;
}

/* ==========================================================================
   v1.1.3 - ESTANDARIZACIÓN UNIVERSAL DE BOTONES E ICONOS DE FILTRADO
   ========================================================================== */

/* 1. Botón de Filtro de Columna (.btn-column-filter) y hovers */
.btn-column-filter {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 50% !important;
    color: rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
    z-index: 10 !important;
}

.btn-column-filter svg {
    width: 13px !important;
    height: 13px !important;
    display: block !important;
    transition: transform 0.2s ease !important;
}

th.sortable:hover .btn-column-filter,
th.filterable:hover .btn-column-filter,
.btn-column-filter:hover {
    color: var(--table-accent-color) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.btn-column-filter.active {
    background: white !important;
    color: var(--table-accent-color) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06) !important;
    border: 1px solid transparent !important;
    transform: translateY(-50%) !important;
}

.btn-column-filter.active:hover {
    transform: translateY(-50%) scale(1.05) !important;
}

/* ── Sub-filtros para la cabecera de Asignación (Cancha, Pelota, Día, Hora) ── */
.th-asig-header {
    min-width: 170px !important;
}
.asig-header-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
}
.asig-subfilter-icons {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
}
.btn-asig-subfilter {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #94a3b8 !important;
    border: 1px solid transparent !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}
.btn-asig-subfilter:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #2563eb !important;
    transform: scale(1.1) !important;
}
.btn-asig-subfilter.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}
[data-theme="dark"] .btn-asig-subfilter {
    color: #64748b !important;
}
[data-theme="dark"] .btn-asig-subfilter:hover {
    background: rgba(92, 115, 242, 0.2) !important;
    color: #60a5fa !important;
}
[data-theme="dark"] .btn-asig-subfilter.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
}

/* 2. Distribución de Doble Icono (Sort y Filter) en Cabeceras */
th.sortable.filterable {
    padding-right: 40px !important;
}
th.sortable.filterable .btn-column-filter {
    right: 8px !important;
}

/* 3. Hover Rojo en Quitar Filtro (.filter-option.clear) en Modo Claro */
.column-filter-bubble .filter-option.clear:hover {
    background: rgba(239, 68, 68, 0.06) !important;
    color: #ef4444 !important;
}

/* --- Phase 9: Premium Dark Theme Overrides for Days / Pelota & Timepicker --- */
[data-theme="dark"] .day-row.active-edit {
    background: var(--timeline-badge-bg) !important;
    border: 1.5px solid var(--table-accent-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .day-row.checked {
    color: var(--table-accent-color) !important;
}

/* Timepicker clock adaptations for dark theme */
[data-theme="dark"] .otc-tp-cols {
    background: transparent !important;
    border: none !important;
}

[data-theme="dark"] .otc-tp-unit {
    color: var(--text-muted) !important;
    background: transparent !important;
}

[data-theme="dark"] .otc-tp-unit:hover {
    background: var(--timeline-badge-bg) !important;
    color: var(--table-accent-color) !important;
}

[data-theme="dark"] .otc-tp-unit.active {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(92, 115, 242, 0.35) !important;
    box-shadow:
        4px 6px 12px rgba(0, 0, 0, 0.85),
        -2px -2px 8px rgba(255, 255, 255, 0.05),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-1px) scale(1.04) !important;
}

/* Premium Icon Buttons (Table Filters, Duplicate) */
.btn-icon-premium:hover,
.btn-icon-premium.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    color: #5b6e94 !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.65),
        -4px -4px 12px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.25) !important;
    transform: translateY(-2px) scale(1.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .btn-icon-premium:hover,
[data-theme="dark"] .btn-icon-premium.active {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.95),
        -2px -2px 8px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-2px) scale(1.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Premium Icon Buttons - DANGER (Delete) - Red Convex Glass */
.btn-icon-premium.btn-danger-alt:hover,
.btn-icon-premium.btn-danger-alt.active {
    background: linear-gradient(145deg, rgba(254, 226, 226, 0.95) 0%, rgba(254, 202, 202, 0.65) 100%) !important;
    color: #ef4444 !important; /* Red icon */
    box-shadow:
        4px 6px 12px rgba(239, 68, 68, 0.25),
        -4px -4px 12px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(239, 68, 68, 0.15) !important;
}

[data-theme="dark"] .btn-icon-premium.btn-danger-alt:hover,
[data-theme="dark"] .btn-icon-premium.btn-danger-alt.active {
    background: linear-gradient(145deg, rgba(127, 29, 29, 0.75) 0%, rgba(69, 10, 10, 0.95) 100%) !important;
    color: #fca5a5 !important; /* Light red icon */
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.95),
        -2px -2px 8px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.15),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
}



/* ==========================================================================
   GLOBAL PREMIUM CONVEX GLASS HOVER STATES (Matches VAT, CTC, BRU active)
   Applies to: Calendar, Cloud, Arrows, Theme Toggle, Table Filters
   ========================================================================== */

/* Light Mode Convex Glass Hover */
@media (hover: hover) {
    .dashboard-right-selector .sync-cloud-icon:hover,
    .dashboard-right-selector .calendar-wrapper .btn-calendar-icon.small:hover,
    .dashboard-right-selector .calendar-nav-vertical .btn-arrow:hover,
    .sync-cloud-icon:hover,
    .otc-dp-btn:hover,
    .theme-toggle-btn:hover,
    .notifications-btn:hover,
    .hamburger-btn:hover {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border: none !important;
        color: #5b6e94 !important;
        box-shadow:
            4px 6px 12px rgba(163, 177, 198, 0.65),
            -4px -4px 12px rgba(255, 255, 255, 0.8),
            inset 1px 1px 2px rgba(255, 255, 255, 1),
            inset -1px -1px 2px rgba(163, 177, 198, 0.25) !important;
        transform: scale(1.15) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}

/* Dark Mode Convex Glass Hover */
@media (hover: hover) {
    [data-theme="dark"] .dashboard-right-selector .sync-cloud-icon:hover,
    [data-theme="dark"] .dashboard-right-selector .calendar-wrapper .btn-calendar-icon.small:hover,
    [data-theme="dark"] .dashboard-right-selector .calendar-nav-vertical .btn-arrow:hover,
    [data-theme="dark"] .sync-cloud-icon:hover,
    [data-theme="dark"] .otc-dp-btn:hover,
    [data-theme="dark"] .theme-toggle-btn:hover,
    [data-theme="dark"] .notifications-btn:hover,
    [data-theme="dark"] .hamburger-btn:hover {
        background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border: none !important;
        color: #ffffff !important;
        box-shadow: 
            4px 6px 12px rgba(0, 0, 0, 0.95),
            -2px -2px 8px rgba(255, 255, 255, 0.06),
            inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
            inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
        transform: scale(1.15) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}







/* ==========================================================================
   UNIVERSAL CALENDAR "HOY" BUTTON
   ========================================================================== */

.otc-modal-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-main) !important;
    font-weight: normal !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Light Mode Hover */
.otc-modal-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    color: #5b6e94 !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.65),
        -4px -4px 12px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.25) !important;
    transform: scale(1.02) !important;
}

/* Dark Mode Hover */
[data-theme="dark"] .otc-modal-btn:hover {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.95),
        -2px -2px 8px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    transform: scale(1.02) !important;
}

/* ==========================================================================
   UNSELECTED CALENDAR DAYS (SPECIFICALLY FOR DAYS)
   ========================================================================== */

/* Normal State (Light Mode) */
.otc-dp-day:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    color: #99a8be !important; /* Slate suave claro uniforme en modo claro */
    font-weight: 700 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover State (Light Mode) */
.otc-dp-day:hover:not(.active),
.otc-dp-day.week-hover:not(.active),
.is-week-mode .otc-dp-week-row:hover .otc-dp-day:not(.active):not(.other-month) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
    color: #5b6e94 !important; /* Gris más oscuro en hover */
}

/* Normal State (Dark Mode) */
[data-theme="dark"] .otc-dp-day:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    color: #94a3b8 !important;
}

/* Hover State (Dark Mode) */
[data-theme="dark"] .otc-dp-day:hover:not(.active),
[data-theme="dark"] .otc-dp-day.week-hover:not(.active),
[data-theme="dark"] .is-week-mode .otc-dp-week-row:hover .otc-dp-day:not(.active):not(.other-month) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
    color: #e2e8f0 !important; /* Gris claro hover oscuro */
}

/* ==========================================================================
   UNSELECTED & ACTIVE MONTH/YEAR SELECTORS (MATCH VAT/CTC/BRU BUTTONS)
   ========================================================================== */

/* Normal State (Light Mode) */
.otc-dp-item:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    font-weight: 700 !important;
    color: #99a8be !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover State (Light Mode) */
.otc-dp-item:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #5b6e94 !important;
    transform: scale(1.15) !important;
}

/* Unselected Month/Year Titles (Matches VAT/CTC/BRU Unselected) */
.otc-dp-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    color: #99a8be !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    background: transparent !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    border: none !important;
    display: inline-block !important;
    text-transform: capitalize !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover Month/Year Titles (Matches VAT/CTC/BRU Hover) */
.otc-dp-title:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    color: #5b6e94 !important;
    transform: scale(1.15) !important;
}

/* Selected Month/Year Titles (Matches VAT/CTC/BRU Active) */
.otc-dp-title.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow:
        6px 8px 16px rgba(163, 177, 198, 0.65), /* Sombra externa principal */
        -4px -4px 12px rgba(255, 255, 255, 0.8), /* Brillo externo */
        inset 1px 1px 2px rgba(255, 255, 255, 1), /* Rim interno luminoso */
        inset -1px -1px 2px rgba(163, 177, 198, 0.25) !important; /* Rim interno de sombra */
    color: #2563eb !important;
    font-weight: 800 !important;
    transform: translateY(-2px) !important;
}

/* Navigation Arrows in Calendar */
.otc-dp-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #99a8be !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .otc-dp-btn {
    color: #94a3b8 !important;
}

/* ==========================================================================
   DARK THEME SELECTORS (MATCH VAT/CTC/BRU BUTTONS IN DARK MODE)
   ========================================================================== */

/* Dark Mode adaptation for Month/Year Grid Items */
[data-theme="dark"] .otc-dp-item:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .otc-dp-item:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #e2e8f0 !important;
    transform: scale(1.15) !important;
}

/* Dark Mode adaptation for Month/Year Titles */
[data-theme="dark"] .otc-dp-title {
    color: #94a3b8 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .otc-dp-title:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    color: #e2e8f0 !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .otc-dp-title.active {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 
        6px 8px 16px rgba(0, 0, 0, 0.95), /* Sombra profunda neumórfica */
        -4px -4px 12px rgba(255, 255, 255, 0.06), /* Brillo externo superior opuesto */
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25), /* Rim de luz más intenso */
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important; /* Rim interno de sombra */
    font-weight: 800 !important;
    transform: translateY(-2px) !important;
}

/* Today Date — borde gris, color gris más oscuro */
.otc-dp-day.is-today:not(.active) {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    color: #99a8be !important; /* Mismo color que días normales */
    background: transparent !important;
    border: 2px solid rgba(153, 168, 190, 0.6) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.otc-dp-day.is-today:not(.active):hover {
    background: transparent !important;
    box-shadow: none !important;
    border: 2px solid rgba(91, 110, 148, 0.8) !important;
    color: #5b6e94 !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .otc-dp-day.is-today:not(.active) {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    color: #94a3b8 !important; /* Mismo color que días normales en oscuro */
    background: transparent !important;
    border: 2px solid rgba(148, 163, 184, 0.6) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

[data-theme="dark"] .otc-dp-day.is-today:not(.active):hover {
    background: transparent !important;
    box-shadow: none !important;
    border: 2px solid rgba(148, 163, 184, 0.9) !important;
    color: #e2e8f0 !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    transform: scale(1.15) !important;
}

/* VAT matching for "Hoy" and "Borrar" elements */
.otc-dp-footer .otc-modal-btn {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    color: #99a8be !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.otc-dp-footer .otc-modal-btn:hover {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #5b6e94 !important;
    font-weight: 800 !important;
    transform: scale(1.08) !important;
}

[data-theme="dark"] .otc-dp-footer .otc-modal-btn {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .otc-dp-footer .otc-modal-btn:hover {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #e2e8f0 !important;
    font-weight: 800 !important;
    transform: scale(1.08) !important;
}

/* Premium Container for Calendars & Dropdowns (100% Opaque Solid Gradient) */
body .otc-picker-dropdown,
body .otc-dp-dropdown,
body .flatpickr-calendar,
body .otc-ms-dropdown,
body .otc-tp-dropdown,
body .column-sort-bubble,
body .column-filter-bubble,
body .otc-td-menu,
.otc-picker-dropdown,
.otc-dp-dropdown,
.flatpickr-calendar,
.otc-ms-dropdown,
.otc-tp-dropdown,
.column-sort-bubble,
.column-filter-bubble,
.otc-td-menu {
    border-radius: 25px !important;
    padding: 15px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 1.0) 0%, rgba(240, 245, 255, 1.0) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid var(--panel-border) !important;
    box-shadow:
        16px 24px 48px rgba(163, 177, 198, 0.6),
        -16px -24px 48px rgba(255, 255, 255, 0.8),
        inset 2px 2px 4px rgba(255, 255, 255, 1),
        inset -2px -2px 4px rgba(163, 177, 198, 0.25) !important;
}

html[data-theme="dark"] body .otc-picker-dropdown,
html[data-theme="dark"] body .otc-dp-dropdown,
html[data-theme="dark"] body .flatpickr-calendar,
html[data-theme="dark"] body .otc-ms-dropdown,
html[data-theme="dark"] body .otc-tp-dropdown,
html[data-theme="dark"] body .column-sort-bubble,
html[data-theme="dark"] body .column-filter-bubble,
html[data-theme="dark"] body .otc-td-menu,
[data-theme="dark"] .otc-picker-dropdown,
[data-theme="dark"] .otc-dp-dropdown,
[data-theme="dark"] .flatpickr-calendar,
[data-theme="dark"] .otc-ms-dropdown,
[data-theme="dark"] .otc-tp-dropdown,
[data-theme="dark"] .column-sort-bubble,
[data-theme="dark"] .column-filter-bubble,
[data-theme="dark"] .otc-td-menu {
    background: linear-gradient(145deg, rgba(26, 36, 54, 1.0) 0%, rgba(13, 17, 28, 1.0) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid var(--panel-border) !important;
    box-shadow: 
        16px 24px 48px rgba(0, 0, 0, 0.9),
        -12px -16px 36px rgba(255, 255, 255, 0.05),
        inset 2px 2px 4px rgba(255, 255, 255, 0.15),
        inset -2px -2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* Consolidado en las secciones de estilo originales de alumnos y profesores */

/* Remove extra background from calendar icon since container now has one */
.otc-dp-header .btn-calendar-icon.small:not(:hover),
.calendar-wrapper .btn-calendar-icon.small:not(:hover) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .otc-dp-header .btn-calendar-icon.small:not(:hover),
[data-theme="dark"] .calendar-wrapper .btn-calendar-icon.small:not(:hover) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Ensure no horizontal separation line divides the 'Hoy' button from the numbers, and bring it closer */
.otc-dp-footer {
    border-top: none !important;
    margin-top: 5px !important;
    padding-top: 0px !important;
}

/* ==========================================================================
   NEUMORPHIC INSET ENGRAVED CELL CONTROLS (GLOBAL EFFECT)
   ========================================================================== */

/* 1. Modo Claro Base: Grabado Cóncavo Premium */
.otc-td-trigger,
.otc-ms-trigger,
.otc-data-table input[type="text"],
.otc-data-table input[type="password"],
.otc-data-table input[type="date"],
.otc-data-table select,
.otc-data-table input[type="search"] {
    background: color-mix(in srgb, var(--table-accent-color) 4%, transparent) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px color-mix(in srgb, var(--table-accent-color) 8%, transparent) !important;
    color: var(--text-main) !important;
}

/* 2. Modo Claro Interacciones: Mayor Profundidad */
.otc-td-trigger:hover,
.otc-ms-trigger:hover,
.otc-data-table input[type="text"]:focus,
.otc-data-table input[type="password"]:focus,
.otc-data-table input[type="date"]:focus,
.otc-data-table select:focus,
.otc-td.open .otc-td-trigger,
.otc-multiselect-container.open .otc-ms-trigger,
.otc-data-table input[type="search"]:focus {
    background: color-mix(in srgb, var(--table-accent-color) 7%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 35%, transparent) !important;
    box-shadow: 
        inset 3px 3px 8px rgba(0, 0, 0, 0.12),
        inset -3px -3px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 12px color-mix(in srgb, var(--table-accent-color) 15%, transparent) !important;
    outline: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

/* ── Celda Contraseña Tabla Usuarios ─────────────────────────────────── */
.user-pwd-cell {
    position: relative !important;
    width: 170px !important;
    min-width: 170px !important;
    max-width: 170px !important;
    box-sizing: border-box !important;
}

.user-pwd-cell .u-pass-input {
    width: 100% !important;
    padding-right: 40px !important;
    box-sizing: border-box !important;
}

/* Máscara aplicada vía CSS class (nunca via atributo HTML — las extensiones no lo detectan) */
.user-pwd-cell .u-pass-input.masked {
    -webkit-text-security: disc !important;
}

/* Ojo: absolute dentro del td, centrado verticalmente */
.user-pwd-eye {
    position: absolute !important;
    right: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    outline: none !important;
    z-index: 10 !important;
}
.user-pwd-eye:hover { color: var(--text-main) !important; }
/* ──────────────────────────────────────────────────────────────────────── */

/* 3. Modo Claro Celdas de Estado (Activo, Retirado, Prueba) */
.state-select.state-activo .otc-td-trigger {
    color: var(--table-accent-color) !important;
    background: color-mix(in srgb, var(--table-accent-color) 12%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 25%, transparent) !important;
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.10),
        inset -2px -2px 4px rgba(255, 255, 255, 0.8),
        inset 0 0 6px color-mix(in srgb, var(--table-accent-color) 10%, transparent) !important;
}
.state-select.state-activo .otc-td-trigger:hover,
.otc-td.open.state-select.state-activo .otc-td-trigger {
    background: color-mix(in srgb, var(--table-accent-color) 16%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 40%, transparent) !important;
    box-shadow: 
        inset 2px 2px 6px rgba(0, 0, 0, 0.14),
        inset -2px -2px 6px rgba(255, 255, 255, 0.85),
        inset 0 0 8px color-mix(in srgb, var(--table-accent-color) 15%, transparent) !important;
}

.state-select.state-retirado .otc-td-trigger {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.12) !important;
    border-color: rgba(220, 53, 69, 0.25) !important;
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.10),
        inset -2px -2px 4px rgba(255, 255, 255, 0.8),
        inset 0 0 6px rgba(220, 53, 69, 0.08) !important;
}
.state-select.state-retirado .otc-td-trigger:hover,
.otc-td.open.state-select.state-retirado .otc-td-trigger {
    background: rgba(220, 53, 69, 0.16) !important;
    border-color: rgba(220, 53, 69, 0.40) !important;
    box-shadow: 
        inset 2px 2px 6px rgba(0, 0, 0, 0.14),
        inset -2px -2px 6px rgba(255, 255, 255, 0.85),
        inset 0 0 8px rgba(220, 53, 69, 0.12) !important;
}

.state-select.state-prueba .otc-td-trigger {
    color: #856404 !important;
    background: rgba(255, 193, 7, 0.12) !important;
    border-color: rgba(255, 193, 7, 0.25) !important;
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.10),
        inset -2px -2px 4px rgba(255, 255, 255, 0.8),
        inset 0 0 6px rgba(255, 193, 7, 0.08) !important;
}
.state-select.state-prueba .otc-td-trigger:hover,
.otc-td.open.state-select.state-prueba .otc-td-trigger {
    background: rgba(255, 193, 7, 0.16) !important;
    border-color: rgba(255, 193, 7, 0.40) !important;
    box-shadow: 
        inset 2px 2px 6px rgba(0, 0, 0, 0.14),
        inset -2px -2px 6px rgba(255, 255, 255, 0.85),
        inset 0 0 8px rgba(255, 193, 7, 0.12) !important;
}

/* 4. Modo Oscuro Base: Grabado de Cristal de Zafiro/Obsidiana */
[data-theme="dark"] .otc-td-trigger,
[data-theme="dark"] .otc-ms-trigger,
[data-theme="dark"] .otc-data-table input[type="text"],
[data-theme="dark"] .otc-data-table input[type="password"],
[data-theme="dark"] .otc-data-table input[type="date"],
[data-theme="dark"] .otc-data-table select,
[data-theme="dark"] .otc-data-table input[type="search"] {
    background: rgba(10, 20, 50, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px color-mix(in srgb, var(--table-accent-color) 15%, transparent),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    color: var(--text-main) !important;
}

/* 5. Modo Oscuro Interacciones: Cavidad Profunda y Retroiluminada */
[data-theme="dark"] .otc-td-trigger:hover,
[data-theme="dark"] .otc-ms-trigger:hover,
[data-theme="dark"] .otc-data-table input[type="text"]:focus,
[data-theme="dark"] .otc-data-table input[type="password"]:focus,
[data-theme="dark"] .otc-data-table input[type="date"]:focus,
[data-theme="dark"] .otc-data-table select:focus,
[data-theme="dark"] .otc-td.open .otc-td-trigger,
[data-theme="dark"] .otc-multiselect-container.open .otc-ms-trigger,
[data-theme="dark"] .otc-data-table input[type="search"]:focus {
    background: rgba(10, 20, 50, 0.55) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 40%, transparent) !important;
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.95),
        inset -5px -5px 12px color-mix(in srgb, var(--table-accent-color) 25%, transparent),
        inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

/* 6. Modo Oscuro Celdas de Estado */
[data-theme="dark"] .state-select.state-activo .otc-td-trigger {
    color: var(--table-accent-color) !important;
    background: color-mix(in srgb, var(--table-accent-color) 18%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 30%, transparent) !important;
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.85),
        inset -4px -4px 8px color-mix(in srgb, var(--table-accent-color) 20%, transparent),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
}
[data-theme="dark"] .state-select.state-activo .otc-td-trigger:hover,
[data-theme="dark"] .otc-td.open.state-select.state-activo .otc-td-trigger {
    background: color-mix(in srgb, var(--table-accent-color) 25%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 45%, transparent) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.90),
        inset -5px -5px 10px color-mix(in srgb, var(--table-accent-color) 25%, transparent),
        inset -1px -1px 0px rgba(255, 255, 255, 0.20) !important;
}

[data-theme="dark"] .state-select.state-retirado .otc-td-trigger {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: rgba(239, 68, 68, 0.30) !important;
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.85),
        inset -4px -4px 8px rgba(239, 68, 68, 0.20),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
}
[data-theme="dark"] .state-select.state-retirado .otc-td-trigger:hover,
[data-theme="dark"] .otc-td.open.state-select.state-retirado .otc-td-trigger {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.90),
        inset -5px -5px 10px rgba(239, 68, 68, 0.25),
        inset -1px -1px 0px rgba(255, 255, 255, 0.20) !important;
}

[data-theme="dark"] .state-select.state-prueba .otc-td-trigger {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.18) !important;
    border-color: rgba(251, 191, 36, 0.30) !important;
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.85),
        inset -4px -4px 8px rgba(251, 191, 36, 0.20),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
}
[data-theme="dark"] .state-select.state-prueba .otc-td-trigger:hover,
[data-theme="dark"] .otc-td.open.state-select.state-prueba .otc-td-trigger {
    background: rgba(251, 191, 36, 0.25) !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.90),
        inset -5px -5px 10px rgba(251, 191, 36, 0.25),
        inset -1px -1px 0px rgba(255, 255, 255, 0.20) !important;
}

/* ==========================================================================
   UNIFIED VENUE NEUMORPHIC 3D CONVEX FLOATING MENUS & HOVERS
   ========================================================================== */

/* 1. Modo Claro: Opciones de lista y menú seleccionadas emulan los botones de Sede */
.sort-option.active,
.filter-option.active,
.otc-td-option.selected,
.otc-ms-item.selected,
.otc-tp-item.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    color: #5b6e94 !important;
    font-weight: 800 !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.5),
        -2px -2px 8px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.20) !important;
    transform: translateY(-1px) scale(1.02) !important;
}

/* 2. Modo Oscuro: Opciones de lista y menú seleccionadas emulan los botones de Sede Oscuros */
[data-theme="dark"] .sort-option.active,
[data-theme="dark"] .filter-option.active,
[data-theme="dark"] .otc-td-option.selected,
[data-theme="dark"] .otc-ms-item.selected,
[data-theme="dark"] .otc-tp-item.active {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 1px solid rgba(92, 115, 242, 0.35) !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.85),
        -2px -2px 8px rgba(255, 255, 255, 0.05),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-1px) scale(1.02) !important;
}

/* 3. Hovers de Iconos e Indicadores de Columna a Color de Sede */
th.sortable:hover .btn-column-sort,
th.filterable:hover .btn-column-filter {
    color: var(--table-accent-color) !important;
    transform: translateY(-50%) scale(1.15) !important;
}

/* 4. Estilos de Selección de Fila Globales y Cohesionados */
.otc-data-table tbody tr.row-selected td {
    background: color-mix(in srgb, var(--table-accent-color) 15%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--table-accent-color) 25%, transparent) !important;
    vertical-align: middle !important;
}

.otc-data-table tbody tr.row-selected td:first-child {
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

.otc-data-table tbody tr.row-selected td:last-child {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

[data-theme="dark"] .otc-data-table tbody tr.row-selected td {
    background: color-mix(in srgb, var(--table-accent-color) 22%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--table-accent-color) 35%, transparent) !important;
}

/* 5. Premium Unified Sleek Scrollbar for Scrollable Dropdown Options Lists */
.otc-ms-options::-webkit-scrollbar,
.otc-tp-col::-webkit-scrollbar,
.bubble-options-container::-webkit-scrollbar,
.sort-rules-list::-webkit-scrollbar,
.filter-rules-list::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

.otc-ms-options::-webkit-scrollbar-track,
.otc-tp-col::-webkit-scrollbar-track,
.bubble-options-container::-webkit-scrollbar-track,
.sort-rules-list::-webkit-scrollbar-track,
.filter-rules-list::-webkit-scrollbar-track {
    background: transparent !important;
}

.otc-ms-options::-webkit-scrollbar-thumb,
.otc-tp-col::-webkit-scrollbar-thumb,
.bubble-options-container::-webkit-scrollbar-thumb,
.sort-rules-list::-webkit-scrollbar-thumb,
.filter-rules-list::-webkit-scrollbar-thumb {
    background: rgba(43, 67, 241, 0.18) !important;
    border-radius: 4px !important;
    transition: background 0.25s ease !important;
}

.otc-ms-options::-webkit-scrollbar-thumb:hover,
.otc-tp-col::-webkit-scrollbar-thumb:hover,
.bubble-options-container::-webkit-scrollbar-thumb:hover,
.sort-rules-list::-webkit-scrollbar-thumb:hover,
.filter-rules-list::-webkit-scrollbar-thumb:hover {
    background: rgba(43, 67, 241, 0.4) !important;
}

.otc-ms-options,
.otc-tp-col,
.bubble-options-container,
.sort-rules-list,
.filter-rules-list {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(43, 67, 241, 0.18) transparent !important;
}

/* Dark Mode Override for Dropdown Scrollbars */
[data-theme="dark"] .otc-ms-options::-webkit-scrollbar-thumb,
[data-theme="dark"] .otc-tp-col::-webkit-scrollbar-thumb,
[data-theme="dark"] .bubble-options-container::-webkit-scrollbar-thumb,
[data-theme="dark"] .sort-rules-list::-webkit-scrollbar-thumb,
[data-theme="dark"] .filter-rules-list::-webkit-scrollbar-thumb {
    background: rgba(92, 115, 242, 0.35) !important;
}

[data-theme="dark"] .otc-ms-options::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .otc-tp-col::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .bubble-options-container::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .sort-rules-list::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .filter-rules-list::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 115, 242, 0.60) !important;
}

[data-theme="dark"] .otc-ms-options,
[data-theme="dark"] .otc-tp-col,
[data-theme="dark"] .bubble-options-container,
[data-theme="dark"] .sort-rules-list,
[data-theme="dark"] .filter-rules-list {
    scrollbar-color: rgba(92, 115, 242, 0.35) transparent !important;
}


/* ==========================================================================
   HIGH-FIDELITY DESIGN-PRESERVING RESPONSIVE SYSTEM (v1044)
   ========================================================================== */

/* 1. FLUID RESPONSIVE SYSTEM USING CALCULATED CLAMP() FOR SCALED SELECTORS & PROPORTIONAL COURTS */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Push selectors closer to edges on smaller viewports */
    .dashboard-left-selector {
        right: clamp(4px, 1.5vw, 12px) !important;
        gap: clamp(8px, 2vw, 15px) !important;
    }

    .dashboard-right-selector {
        left: clamp(4px, 1.5vw, 12px) !important;
        gap: clamp(4px, 1vw, 6px) !important;
    }

    /* Fluid scaling of side buttons: they shrink mathematically as screen narrows */
    .dashboard-left-selector .btn-sede {
        width: clamp(28px, 4.5vw, 44px) !important;
        height: clamp(28px, 4.5vw, 44px) !important;
        font-size: clamp(0.6rem, 0.8vw, 0.75rem) !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .dashboard-left-selector .sede-buttons-group {
        gap: clamp(8px, 2vw, 15px) !important;
    }

    .dashboard-left-selector .dashboard-hour-selector {
        margin-top: clamp(15px, 4vw, 31.5px) !important;
        gap: clamp(6px, 1.5vw, 12px) !important;
    }

    /* Fluid scaling for Hour Selection buttons on the side (Visual Right Selector) */
    .btn-hour-select {
        width: clamp(40px, 6.8vw, 58px) !important;
        height: clamp(24px, 3.8vw, 34px) !important;
        font-size: clamp(0.5rem, 0.8vw, 0.65rem) !important;
        border-radius: clamp(5px, 1vw, 10px) !important;
    }

    .dashboard-right-selector .btn-calendar-icon.small {
        width: clamp(26px, 4.5vw, 36px) !important;
        height: clamp(26px, 4.5vw, 36px) !important;
    }

    .dashboard-right-selector .calendar-nav-vertical .btn-arrow {
        width: clamp(26px, 4.5vw, 36px) !important;
        height: clamp(16px, 2.5vw, 24px) !important;
    }

    /* Spacious vertical days fit "LUN 25" completely safely with fluid clamp sizes */
    .calendar-days-vertical .btn-day {
        width: clamp(34px, 5.5vw, 55px) !important;
        height: clamp(26px, 4vw, 34px) !important;
        font-size: clamp(0.5rem, 0.78vw, 0.65rem) !important;
        border-radius: clamp(5px, 1vw, 10px) !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    /* MATHEMATHICALLY CALCULATED SIDE PADDINGS TO PREVENT ANY OVERLAP WITH SELECTORS */
    .dashboards-section {
        padding-left: clamp(75px, 9vw, 95px) !important;
        padding-right: clamp(70px, 10vw, 100px) !important;
        padding-top: clamp(165px, 22vw, 195px) !important;
        padding-bottom: 40px !important;
        height: 100vh !important;
        overflow-y: auto !important;
    }

    /* Metrics floating container wrapping + centering to prevent right clipping */
    .dashboard-metrics-container {
        top: clamp(80px, 12vw, 95px) !important;
        width: 92% !important;
        max-width: 720px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        overflow-x: visible !important; /* Allow wrapping instead of horizontal scroll */
        display: flex !important;
        flex-wrap: wrap !important; /* Wrap cards into next line so all are visible */
        justify-content: center !important; /* Centered wrapping */
        gap: clamp(6px, 1vw, 10px) !important;
        padding: 8px 5px !important;
        position: absolute !important;
    }

    /* Tamaño fijo: las cápsulas no se encogen con la pantalla */
    .dashboard-metrics-container > div {
        flex-shrink: 0 !important;
        display: inline-flex !important;
        font-size: 0.85rem !important;
        padding: 8px 18px !important;
        gap: 10px !important;
    }

    /* Scale pulse dots too */
    .dashboard-metrics-container .pulse-dot,
    .dashboard-metrics-container .pulse-dot-purple,
    .dashboard-metrics-container .pulse-dot-green,
    .dashboard-metrics-container .pulse-dot-cyan,
    .dashboard-metrics-container .pulse-dot-orange {
        width: clamp(6px, 1vw, 9px) !important;
        height: clamp(6px, 1vw, 9px) !important;
    }

    /* 3D COURT BOARDS PROPORTIONAL SCALING - Keep exact original aspect ratio */
    .court-card {
        flex-shrink: 0 !important;
        width: 100% !important;
        max-width: 380px !important;
        min-width: 0 !important; /* Allow complete fluid shrinking */
    }

    .court-header {
        width: 100% !important;
        max-width: 380px !important;
        box-sizing: border-box !important;
    }

    .court-board {
        width: 100% !important;
        max-width: 380px !important;
        aspect-ratio: 380 / 460 !important; /* Lock proportional 3D dimensions */
        height: auto !important; /* Compute height based on proportional width */
    }

    /* Tamaño fijo igual que btn-prof: no se encoge con la pantalla */
    .student-avatar {
        padding: 5px 12px !important;
        font-size: 0.78rem !important;
    }
}

/* 2. CELL PHONES AND NARROW VIEWPORTS (width <= 768px) */
@media (max-width: 768px) {
    /* Menu Lateral Mobile-First Width */
    .sidebar {
        width: min(86vw, 316px) !important;
        max-width: 316px !important;
        height: 100dvh !important;
        padding: max(88px, calc(74px + env(safe-area-inset-top, 0px))) 22px max(32px, calc(24px + env(safe-area-inset-bottom, 0px))) !important;
        overscroll-behavior: contain;
        left: 0 !important;
        transform: translate3d(-105%, 0, 0) !important;
    }
    .sidebar.open {
        transform: translate3d(0, 0, 0) !important;
    }

    .dashboard-panel,
    [data-theme="dark"] .dashboard-panel {
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .court-card {
        width: 80% !important;
        max-width: 280px !important;
        min-width: 0 !important;
        margin: 0 auto !important;
    }

    .court-header {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    .court-board {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        aspect-ratio: 380 / 460 !important;
        height: auto !important;
        padding: 18px !important;
    }

    .student-avatar {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
    }


    /* COURTS COLUMN LAYOUT: Stacks courts vertically, one on top of the other */
    .courts-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        overflow-x: visible !important;
        gap: 1rem !important;
        width: 100% !important;
        padding-bottom: 0 !important;
    }


    /* Modal Spotlight Responsive Stack */
    .focus-container {
        width: 95% !important;
        height: 90vh !important;
        border-radius: 28px !important;
    }

    .focus-content-grid {
        flex-direction: column !important;
        overflow-y: auto !important;
    }

    #focus-court-container {
        flex: none !important;
        padding: 20px !important;
        min-height: 280px !important;
    }

    #focus-court-container .court-card {
        transform: scale(0.9) !important;
    }

    .focus-sidebar {
        flex: none !important;
        padding: 20px !important;
        overflow-y: visible !important;
    }

    .btn-close-focus {
        top: 15px !important;
        right: 15px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 20px !important;
    }

    /* Stack buttons vertically in Spotlight modal footer on mobile to prevent overflow */
    .focus-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        margin-top: 15px !important;
    }

    .focus-footer .btn-rain-toggle {
        width: 100% !important;
        justify-content: center !important;
    }

    .focus-footer .btn-primary-suspended {
        width: 100% !important;
        justify-content: center !important;
    }

    /* 2-row adaptive flow for premium tables to support batch actions on phone */
    .table-header-premium {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 6px 0 10px !important;
        margin-bottom: 10px !important;
    }

    .header-left-group {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .header-right-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        flex-wrap: wrap !important; /* Wrap to next line when batch controls appear */
    }

    .header-right-actions > div,
    .header-right-actions > button,
    .header-right-actions .action-pill-group {
        flex-shrink: 0 !important;
    }

    .header-left-group h2 {
        font-size: 1.12rem !important;
        line-height: 1.2 !important;
    }

    .btn-primary-pill {
        height: 34px !important;
        padding: 0 14px !important;
        font-size: 0.78rem !important;
        font-weight: 800 !important;
        gap: 6px !important;
    }

    .btn-primary-pill svg {
        width: 14px !important;
        height: 14px !important;
    }

    .btn-icon-premium {
        width: 34px !important;
        height: 34px !important;
    }

    .btn-icon-premium svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* Expandable search bar on focus prevents long placeholders from clipping */
    .search-pill-modern {
        width: 130px !important;
        flex-grow: 1 !important;
        transition: width 0.3s ease !important;
    }

    .search-pill-modern:focus-within {
        width: 180px !important;
    }

    .search-pill-modern input {
        height: 36px !important;
        padding: 0 14px 0 36px !important;
        font-size: 0.82rem !important;
        text-overflow: ellipsis !important;
    }

    .search-pill-modern .lupa-icon {
        left: 12px !important;
        width: 15px !important;
        height: 15px !important;
    }

    /* Timeline sidebars fluid spacing with clamp sizes */
    .timeline-month-nav {
        left: clamp(2px, 0.8vw, 4px) !important;
        gap: 6px !important;
    }

    .timeline-month-nav-item {
        width: clamp(30px, 4.2vw, 40px) !important;
        height: clamp(30px, 4.2vw, 40px) !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .timeline-month-nav-item .nav-label {
        font-size: clamp(0.65rem, 0.75vw, 0.75rem) !important;
    }

    .timeline-side-selector {
        right: clamp(2px, 0.8vw, 4px) !important;
        gap: 6px !important;
    }

    .timeline-side-selector .btn-sede {
        width: clamp(30px, 4.2vw, 40px) !important;
        height: clamp(30px, 4.2vw, 40px) !important;
        font-size: clamp(0.65rem, 0.75vw, 0.75rem) !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .linea-tiempo-main-scroll {
        margin-top: 10px !important;
        height: calc(100vh - 70px) !important;
        padding-left: clamp(38px, 6.2vw, 54px) !important;
        padding-right: clamp(38px, 6.2vw, 54px) !important;
    }

    /* --- OPTIMIZACIÓN LÍNEA DEL TIEMPO EN MÓVIL VERTICAL --- */
    /* Remover segundo fondo en la tarjeta de objetivos mensuales */
    .node-summary,
    [data-theme="dark"] .node-summary {
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    /* Reducir texto de los meses */
    .node-date {
        font-size: 1.1rem !important;
    }
    .otc-timeline-node.active .node-date {
        font-size: 1.3rem !important;
        transform: scale(1.05) !important;
    }

    /* Optimización de espacios laterales simétricos a ambos lados de la línea */
    .node-side.left {
        padding-right: 24px !important;
    }
    .node-side.right {
        padding-left: 24px !important;
    }
    .otc-timeline-node:nth-child(even) .node-side.left {
        padding-left: 24px !important;
        padding-right: 0 !important;
    }
    .otc-timeline-node:nth-child(even) .node-side.right {
        padding-right: 24px !important;
        padding-left: 0 !important;
    }

    /* Compactación y reducción de tamaño de letra de objetivos mensuales y semanales */
    .node-summary h4 {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
    }

    .timeline-weekly-item {
        margin-top: 8px !important;
        padding: 8px 10px !important;
    }

    .weekly-item-title {
        font-size: 0.78rem !important;
        margin-bottom: 2px !important;
    }

    .weekly-item-content {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
}

/* 3. SMALL CELL PHONES (width <= 480px) */
@media (max-width: 480px) {
    .theme-toggle-btn {
        top: 26px !important;
        right: 106px !important;
    }

    .sidebar {
        width: min(88vw, 312px) !important;
    }

    /* Increased top padding dynamically on tiny screens to avoid wrapped metrics overlap */
    .dashboards-section {
        padding-top: clamp(170px, 35vw, 210px) !important;
    }
}

/* ==========================================================================
   BIBLIOTECA DE VIDEOS (GLASSMORPHISM & NEUMORPHIC 3D - v1.3.0)
   ========================================================================== */

.video-canvas-content {
    margin-top: 20px;
    width: 100%;
}

/* Category Grid */
.video-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 10px;
}

/* Category Card */
.video-category-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(43, 67, 241, 0.08) !important;
    border-radius: 20px !important;
    padding: 30px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 
        6px 8px 20px rgba(163, 177, 198, 0.35),
        -6px -6px 20px rgba(255, 255, 255, 0.95),
        inset 1px 1px 2px rgba(255, 255, 255, 1) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.video-category-card:hover {
    transform: translateY(-8px) scale(1.03) !important;
    background: rgba(255, 255, 255, 0.93) !important;
    border-color: rgba(43, 67, 241, 0.25) !important;
    box-shadow: 
        12px 16px 30px rgba(163, 177, 198, 0.5),
        -6px -6px 20px rgba(255, 255, 255, 0.95),
        inset 1px 1px 2px rgba(255, 255, 255, 1) !important;
}

.video-category-card:active {
    transform: translateY(-2px) scale(0.99) !important;
}

.video-category-icon {
    font-size: 3.2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
    transition: transform 0.3s ease;
}

.video-category-card:hover .video-category-icon {
    transform: scale(1.15) rotate(5deg);
}

.video-category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.video-category-count {
    background: rgba(43, 67, 241, 0.06);
    border: 1px solid rgba(43, 67, 241, 0.12);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--color-electric-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Detail View Back Button */
.btn-back-videos {
    background: transparent !important;
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    color: var(--text-muted) !important;
    padding: 10px 18px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.btn-back-videos:hover {
    background: rgba(43, 67, 241, 0.04) !important;
    border-color: rgba(43, 67, 241, 0.35) !important;
    color: var(--color-electric-blue) !important;
    transform: translateX(-4px) !important;
}

/* Videos List Grid */
.video-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    width: 100%;
}

/* Video Card Item */
.video-item-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(43, 67, 241, 0.08) !important;
    border-radius: 18px !important;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 
        4px 6px 18px rgba(163, 177, 198, 0.25),
        -4px -4px 12px rgba(255, 255, 255, 0.9) !important;
    display: flex;
    flex-direction: column;
}

.video-item-card:hover {
    transform: translateY(-6px) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(43, 67, 241, 0.22) !important;
    box-shadow: 
        8px 12px 28px rgba(163, 177, 198, 0.45),
        -4px -4px 12px rgba(255, 255, 255, 0.9) !important;
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-item-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-item-card:hover .video-thumbnail-overlay {
    background: rgba(0, 0, 0, 0.35);
}

/* Play Button circular premium */
.video-play-btn-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--color-electric-blue);
    font-size: 1.1rem;
    padding-left: 3px; /* visual center for play arrow */
}

.video-item-card:hover .video-play-btn-circle {
    transform: scale(1.18);
    background: var(--color-electric-blue);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(43, 67, 241, 0.4);
}

/* Mini Delete Button */
.video-delete-btn-mini {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    color: #94a3b8;
    z-index: 10;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.video-delete-btn-mini:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: scale(1.1);
}

.video-info-content {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.video-item-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.video-item-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.4) !important;
    border: 1.5px dashed rgba(43, 67, 241, 0.15) !important;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Fullscreen Glassmorphic Video Overlay Player */
.video-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(25px) !important;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.video-player-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.video-player-container {
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(92, 115, 242, 0.15),
        inset 1px 1px 0px rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-player-overlay.active .video-player-container {
    transform: scale(1);
}

.video-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.btn-close-player {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.btn-close-player:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    transform: scale(1.1) rotate(90deg);
}

/* ==========================================================================
   TEMA OSCURO OVERRIDES (BIBLIOTECA DE VIDEOS)
   ========================================================================== */

[data-theme="dark"] .video-category-card {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.55) 0%, rgba(15, 20, 30, 0.85) 100%) !important;
    border: 1px solid rgba(92, 115, 242, 0.12) !important;
    box-shadow: 
        8px 12px 30px rgba(0, 0, 0, 0.8),
        -6px -6px 25px rgba(255, 255, 255, 0.02),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.15),
        inset -1.5px -1.5px 2px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .video-category-card:hover {
    background: linear-gradient(145deg, rgba(40, 55, 80, 0.75) 0%, rgba(20, 25, 40, 0.95) 100%) !important;
    border-color: rgba(92, 115, 242, 0.4) !important;
    box-shadow: 
        12px 18px 40px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(92, 115, 242, 0.25),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1.5px -1.5px 2px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .btn-back-videos {
    border-color: rgba(92, 115, 242, 0.18) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .btn-back-videos:hover {
    background: rgba(10, 20, 50, 0.45) !important;
    border-color: rgba(92, 115, 242, 0.4) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .video-item-card {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.55) 0%, rgba(15, 20, 30, 0.85) 100%) !important;
    border: 1px solid rgba(92, 115, 242, 0.1) !important;
    box-shadow: 
        6px 8px 24px rgba(0, 0, 0, 0.75),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.12),
        inset -1.5px -1.5px 2px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .video-item-card:hover {
    background: linear-gradient(145deg, rgba(40, 55, 80, 0.65) 0%, rgba(18, 22, 34, 0.93) 100%) !important;
    border-color: rgba(92, 115, 242, 0.3) !important;
    box-shadow: 
        10px 14px 32px rgba(0, 0, 0, 0.85),
        0 0 15px rgba(92, 115, 242, 0.12),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.18),
        inset -1.5px -1.5px 2px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .video-play-btn-circle {
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .video-item-card:hover .video-play-btn-circle {
    background: #ffffff;
    color: rgba(10, 20, 50, 0.85);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .video-delete-btn-mini {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255,255,255,0.05);
    color: #64748b;
}

[data-theme="dark"] .video-delete-btn-mini:hover {
    background: #ef4444;
    color: #ffffff;
}

[data-theme="dark"] .video-empty-state {
    background: rgba(10, 20, 50, 0.2) !important;
    border-color: rgba(92, 115, 242, 0.2) !important;
}

/* Emoji Picker Selector Grid */
.otc-emoji-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 8px;
    padding: 10px;
    background: rgba(43, 67, 241, 0.05) !important;
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
    border-radius: 16px !important;
    max-height: 150px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.12),
        inset -4px -4px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
    box-sizing: border-box;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(43, 67, 241, 0.18) transparent !important;
}

.otc-emoji-selector-grid::-webkit-scrollbar {
    width: 6px !important;
}

.otc-emoji-selector-grid::-webkit-scrollbar-track {
    background: transparent !important;
}

.otc-emoji-selector-grid::-webkit-scrollbar-thumb {
    background: rgba(43, 67, 241, 0.18) !important;
    border-radius: 4px !important;
    transition: background 0.25s ease !important;
}

.otc-emoji-selector-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(43, 67, 241, 0.4) !important;
}

[data-theme="dark"] .otc-emoji-selector-grid {
    background: rgba(10, 20, 50, 0.55) !important;
    border: 1.5px solid rgba(92, 115, 242, 0.25) !important;
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.90),
        inset -5px -5px 12px rgba(92, 115, 242, 0.18),
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.15) !important;
    scrollbar-color: rgba(92, 115, 242, 0.35) transparent !important;
}

[data-theme="dark"] .otc-emoji-selector-grid::-webkit-scrollbar-thumb {
    background: rgba(92, 115, 242, 0.35) !important;
}

[data-theme="dark"] .otc-emoji-selector-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 115, 242, 0.60) !important;
}

.otc-emoji-item {
    font-size: 1.35rem;
    height: 38px;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.otc-emoji-item:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(43, 67, 241, 0.15) !important;
    transform: scale(1.18) !important;
    box-shadow: 0 4px 10px rgba(163, 177, 198, 0.35) !important;
}

[data-theme="dark"] .otc-emoji-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(92, 115, 242, 0.25) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}

.otc-emoji-item.selected {
    background: rgba(43, 67, 241, 0.08) !important;
    border-color: rgba(43, 67, 241, 0.35) !important;
    transform: scale(1.22) !important;
    box-shadow: 0 6px 14px rgba(43, 67, 241, 0.2) !important;
}

[data-theme="dark"] .otc-emoji-item.selected {
    background: rgba(92, 115, 242, 0.2) !important;
    border-color: rgba(92, 115, 242, 0.6) !important;
    box-shadow: 0 6px 14px rgba(92, 115, 242, 0.35) !important;
}

/* ==========================================================================
   PREMIUM CARD ACTION DROPDOWN MENUS (EDIT / DELETE FOLDERS & VIDEOS)
   ========================================================================== */
.otc-card-actions-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.btn-card-actions-trigger {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05) !important;
    padding: 0 !important;
    user-select: none;
}

[data-theme="dark"] .btn-card-actions-trigger {
    background: rgba(10, 20, 50, 0.65) !important;
    border-color: rgba(92, 115, 242, 0.18) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
}

.btn-card-actions-trigger:hover {
    background: #ffffff !important;
    transform: scale(1.12);
    box-shadow: 0 5px 12px rgba(43, 67, 241, 0.20) !important;
    color: var(--color-electric-blue) !important;
}

[data-theme="dark"] .btn-card-actions-trigger:hover {
    background: rgba(92, 115, 242, 0.25) !important;
    color: #ffffff !important;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5) !important;
}

.otc-card-actions-menu {
    position: absolute;
    top: 34px;
    right: 0;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(43, 67, 241, 0.10) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(43, 67, 241, 0.08) !important;
    min-width: 135px;
    display: flex;
    flex-direction: column;
    padding: 6px !important;
    gap: 3px !important;
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
    pointer-events: none;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    z-index: 100;
}

[data-theme="dark"] .otc-card-actions-menu {
    background: rgba(10, 18, 42, 0.95) !important;
    border-color: rgba(92, 115, 242, 0.18) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.otc-card-actions-menu.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.otc-card-action-item {
    display: flex;
    align-items: center;
    gap: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px !important;
    color: var(--text-main) !important;
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box;
}

.otc-card-action-item:hover {
    background: rgba(43, 67, 241, 0.06) !important;
    color: var(--color-electric-blue) !important;
}

[data-theme="dark"] .otc-card-action-item:hover {
    background: rgba(92, 115, 242, 0.15) !important;
    color: #ffffff !important;
}

.otc-card-action-item.delete-item {
    color: #ef4444 !important;
}

.otc-card-action-item.delete-item:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

[data-theme="dark"] .otc-card-action-item.delete-item:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

/* Ensure relative positioning on cards to hold absolute actions */
.video-category-card, .video-item-card {
    position: relative !important;
}

/* ==========================================================================
   PREMIUM USER PROFILE BUTTON & AUTH MODAL STYLING (OTC TENNIS ACADEMY)
   ========================================================================== */

.profile-btn {
    position: absolute !important;
    top: 0px !important;
    right: 22px !important; /* Alineado simétricamente con el botón del menú lateral (hamburger-btn) */
    z-index: 9999 !important;
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
    transform: scale(1) translateY(0) !important;
    transition: all 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* OTC Logo inside the profile button */
.profile-otc-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    border-radius: 0;
    pointer-events: none;
    user-select: none;
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.38s ease;
    /* Light mode: logo natural (con líneas suavizadas a gris pizarra en el archivo físico) */
    filter:
        drop-shadow(0 2px 6px rgba(43,67,241,0.22))
        drop-shadow(0 0 4px rgba(234,88,12,0.12));
}

/* Dark mode: mantiene los colores cromáticos originales de la gota líquida y añade un resplandor premium de fondo */
[data-theme="dark"] .profile-otc-logo {
    filter:
        drop-shadow(0 4px 14px rgba(92,115,242,0.65));
}

/* EFECTO HOVER MODO CLARO: Solo escalado y glow sobre el logotipo, sin fondo suspendido */
@media (hover: hover) {
    .profile-btn:hover {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 1px solid transparent !important;
        box-shadow: none !important;
        transform: scale(1) translateY(0) !important;
    }

    .profile-btn:hover .profile-otc-logo {
        transform: scale(1.15);
        filter: none !important; /* Eliminada la sombra en hover */
    }
}

/* EFECTO HOVER MODO OSCURO: Solo brillo fluorescente y escala del logotipo, sin fondo obsidian */
@media (hover: hover) {
    [data-theme="dark"] .profile-btn:hover {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 1px solid transparent !important;
        box-shadow: none !important;
        transform: scale(1) translateY(0) !important;
    }

    /* Dark hover: escala limpia y mantención del resplandor premium de fondo oscuro */
    [data-theme="dark"] .profile-btn:hover .profile-otc-logo {
        filter:
            drop-shadow(0 5px 18px rgba(92,115,242,0.85)) !important;
        transform: scale(1.15);
    }
}

.profile-btn:active {
    transform: scale(0.93) !important;
}

/* Dark theme inactive state */
[data-theme="dark"] .profile-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: inherit !important;
}

/* Paleta de colores para la letra inicial adaptativos */
:root {
    --avatar-col_blue: #2b43f1;
    --avatar-col_green: #059669;
    --avatar-col_black_white: #000000;
    --avatar-col_purple: #7c3aed;
    --avatar-col_orange: #ea580c;
    --avatar-col_teal: #0d9488;
    --avatar-col_gold: #ca8a04;
    --avatar-col_silver: #788896;
    --avatar-col_bronze: #9a3412;
    --avatar-col_lime: #65a30d;
    --avatar-col_crimson: #be123c;
    --avatar-col_magenta: #c026d3;
    --avatar-col_cyan: #0891b2;
    --avatar-col_plum: #86198f;
    --avatar-col_jade: #0f766e;
}

[data-theme="dark"] {
    --avatar-col_blue: #5c73f2;
    --avatar-col_green: #34d399;
    --avatar-col_black_white: #ffffff;
    --avatar-col_purple: #a78bfa;
    --avatar-col_orange: #fb923c;
    --avatar-col_teal: #2dd4bf;
    --avatar-col_gold: #facc15;
    --avatar-col_silver: #cbd5e1;
    --avatar-col_bronze: #fdba74;
    --avatar-col_lime: #a3e635;
    --avatar-col_crimson: #fb7185;
    --avatar-col_magenta: #e879f9;
    --avatar-col_cyan: #22d3ee;
    --avatar-col_plum: #f0abfc;
    --avatar-col_jade: #6ee7b7;
}

/* Estilo premium de muestras en el selector de avatar */
.avatar-color-swatch {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    flex-shrink: 0 !important;
    background: rgba(43, 67, 241, 0.05) !important;
    border: 2px solid rgba(43, 67, 241, 0.15) !important;
}

[data-theme="dark"] .avatar-color-swatch {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 2px solid rgba(92, 115, 242, 0.25) !important;
}

.avatar-color-swatch:hover {
    transform: scale(1.08) translateY(-2px) !important;
}

.avatar-color-swatch.selected {
    border: 2.5px solid currentColor !important;
    box-shadow: 0 0 12px currentColor !important;
    transform: scale(1.05) !important;
}

/* Letra Inicial en el Botón (Cuando inicia sesión) */
.profile-initial {
    font-weight: 800;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    color: #2b43f1;
    text-shadow: 0 0 8px rgba(43, 67, 241, 0.25);
    text-transform: uppercase;
}

[data-theme="dark"] .profile-initial {
    color: #5c73f2;
    text-shadow: 0 0 10px rgba(92, 115, 242, 0.45);
}

/* Avatar de Imagen (Cuando inicia con Google u sube foto) */
.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(43, 67, 241, 0.15);
}

[data-theme="dark"] .profile-avatar-img {
    border: 1px solid rgba(92, 115, 242, 0.3);
}

/* --- AUTH MODAL TAB SWITCHING --- */
.auth-tabs {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid rgba(43, 67, 241, 0.06);
}

[data-theme="dark"] .auth-tabs {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(92, 115, 242, 0.1);
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    font-family: 'Outfit';
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.3s ease;
    z-index: 2;
    text-align: center;
}

.auth-tab-btn.active {
    color: #2b43f1 !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    box-shadow: 
        3px 5px 10px rgba(163, 177, 198, 0.35),
        -2px -2px 8px rgba(255, 255, 255, 0.8),
        inset 1px 1px 1.5px rgba(255, 255, 255, 1),
        inset -1px -1px 1.5px rgba(163, 177, 198, 0.1) !important;
    font-weight: 800 !important;
}

[data-theme="dark"] .auth-tab-btn.active {
    color: #ffffff !important;
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.75),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.15),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    font-weight: 800 !important;
}

/* ============================================================
   GOOGLE SIGN IN — CONVEXO DESDE EL INICIO (como btn-rain-toggle)
   ============================================================ */
.btn-google-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 46px;
    border-radius: 14px;
    border: none !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(226, 232, 240, 0.8) 100%) !important;
    color: #475569 !important;
    font-family: 'Outfit';
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow:
        3px 5px 10px rgba(163, 177, 198, 0.25),
        -3px -3px 10px rgba(255, 255, 255, 0.95),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: none !important;
}

.btn-google-auth:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(215, 225, 235, 0.9) 100%) !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 1),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.1) !important;
    transform: translateY(-2px) scale(1.02) !important;
    color: #2b43f1 !important;
}

[data-theme="dark"] .btn-google-auth {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.75) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow:
        3px 5px 10px rgba(0, 0, 0, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1px 1px 2px rgba(255, 255, 255, 0.15),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transform: none !important;
}

[data-theme="dark"] .btn-google-auth:hover {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.85) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    box-shadow:
        4px 6px 12px rgba(0, 0, 0, 0.65),
        -3px -3px 10px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px) scale(1.02) !important;
    color: #ffffff !important;
}

.btn-google-auth svg {
    width: 18px;
    height: 18px;
}

/* --- GOOGLE MOCK ACCOUNT LIST --- */
.google-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(43, 67, 241, 0.08);
    background: rgba(43, 67, 241, 0.02);
    cursor: pointer;
    transition: all 0.3s ease;
}

.google-account-item:hover {
    background: rgba(43, 67, 241, 0.06);
    border-color: rgba(43, 67, 241, 0.2);
    transform: translateX(4px);
}

[data-theme="dark"] .google-account-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .google-account-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(92, 115, 242, 0.3);
}

.google-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2b43f1;
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-family: 'Outfit';
}

[data-theme="dark"] .google-avatar-placeholder {
    background: #5c73f2;
}

.google-account-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.2;
}

.google-account-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- FLOATING PROFILE MENU (CARD) --- */
.profile-floating-card {
    position: fixed;
    top: 96px !important; /* Ajustado para mantener la distancia perfecta bajo el botón de perfil reubicado */
    right: 22px;
    width: 280px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 245, 255, 0.65) 100%) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: none !important;
    border-radius: 20px;
    padding: 20px;
    z-index: 99999;
    box-shadow: 
        16px 24px 48px rgba(163, 177, 198, 0.6), /* Sombra externa principal escalada */
        -16px -24px 48px rgba(255, 255, 255, 0.8), /* Brillo externo escalado */
        inset 2px 2px 4px rgba(255, 255, 255, 1), /* Rim interno luminoso */
        inset -2px -2px 4px rgba(163, 177, 198, 0.25) !important; /* Rim interno oscuro */
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1), transform 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
    pointer-events: none;
}

.profile-floating-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

[data-theme="dark"] .profile-floating-card {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.65) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    border: none !important;
    box-shadow: 
        16px 24px 48px rgba(0, 0, 0, 0.9), /* Sombra negra externa */
        -12px -16px 36px rgba(255, 255, 255, 0.05), /* Halo de luz exterior inverso */
        inset 2px 2px 4px rgba(255, 255, 255, 0.15), /* Rim de luz interna */
        inset -2px -2px 4px rgba(0, 0, 0, 0.5) !important; /* Rim de sombra interna */
}

.profile-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid rgba(43, 67, 241, 0.08);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

[data-theme="dark"] .profile-card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-card-avatar {
    width: 92px;
    height: 92px;
    border-radius: 0;
    background: transparent;
    border: none;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

[data-theme="dark"] .profile-card-avatar {
    background: transparent;
    border: none;
}

/* OTC Logo inside the profile card header */
.profile-card-otc-logo {
    width: 86px;
    height: 86px;
    object-fit: contain;
    display: block;
    user-select: none;
    pointer-events: none;
    /* Light mode: premium shadows */
    filter:
        drop-shadow(0 2px 8px rgba(43,67,241,0.22))
        drop-shadow(0 0 6px rgba(234,88,12,0.15));
}

/* Dark mode: mantiene los colores cromáticos originales del logotipo líquido en la tarjeta y añade resplandor */
[data-theme="dark"] .profile-card-otc-logo {
    filter:
        drop-shadow(0 4px 14px rgba(92,115,242,0.65));
}

.profile-card-avatar .profile-initial {
    font-size: 1.8rem;
}

.profile-card-name {
    font-family: 'Outfit';
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 2px;
}

.profile-card-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
}

.profile-card-role-pill {
    margin-top: 8px;
    padding: 3px 10px;
    background: rgba(43, 67, 241, 0.06);
    color: #2b43f1;
    border: 1px solid rgba(43, 67, 241, 0.12);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

[data-theme="dark"] .profile-card-role-pill {
    background: rgba(92, 115, 242, 0.12);
    color: #92a4f5;
    border: 1px solid rgba(92, 115, 242, 0.2);
}

.profile-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================================
   BOTONES DE SESIÓN — CONVEXOS DESDE EL INICIO
   (misma física 3D que btn-rain-toggle y btn-primary-suspended)
   ============================================================ */

/* Base — como btn-rain-toggle claro */
.btn-profile-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    border-radius: 12px;
    font-family: 'Outfit';
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: none !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(226, 232, 240, 0.8) 100%) !important;
    color: #475569 !important;
    box-shadow:
        3px 5px 10px rgba(163, 177, 198, 0.25),
        -3px -3px 10px rgba(255, 255, 255, 0.95),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: none !important;
}

/* Guardar / Enviar — como btn-primary-suspended azul */
.btn-profile-card-action#btn-edit-profile-save,
.btn-profile-card-action#btn-submit-auth,
.btn-profile-card-action#btn-submit-register,
.btn-profile-card-action#btn-save-post,
.btn-profile-card-action#btn-submit-user {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 4px 14px rgba(43, 67, 241, 0.35),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transform: none !important;
}

/* Cancelar / Editar Perfil — convexo neutro gris */
.btn-profile-card-action#btn-edit-profile-cancel,
.btn-profile-card-action#btn-otc-edit-profile,
.btn-profile-card-action#btn-asig-save-profile {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(226, 232, 240, 0.8) 100%) !important;
    color: #64748b !important;
    box-shadow:
        3px 5px 10px rgba(163, 177, 198, 0.25),
        -3px -3px 10px rgba(255, 255, 255, 0.95),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: none !important;
}

.btn-profile-card-action.btn-asig-save-btn {
    background: linear-gradient(145deg, #ffffff 0%, #e2e8f0 100%) !important;
    color: #475569 !important;
    box-shadow:
        3px 5px 10px rgba(163, 177, 198, 0.35),
        -3px -3px 10px rgba(255, 255, 255, 1),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.2) !important;
    transform: none !important;
}

/* Cerrar Sesión — rojo sólido convexo */
.btn-profile-card-action.signout,
#btn-otc-signout {
    background: linear-gradient(145deg, #dc2626 0%, #991b1b 100%) !important;
    color: #f1f5f9 !important;
    box-shadow:
        3px 5px 12px rgba(153, 27, 27, 0.40),
        -2px -2px 8px rgba(255, 255, 255, 0.35),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(153, 27, 27, 0.5) !important;
    transform: none !important;
}

.btn-profile-card-action.signout *,
#btn-otc-signout * {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border: none !important;
    color: #f1f5f9 !important;
    stroke: #f1f5f9 !important;
}

/* --- TEMA OSCURO — CONVEXO DESDE EL INICIO (como btn-rain-toggle oscuro) --- */
[data-theme="dark"] .btn-profile-card-action {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.75) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    color: #cbd5e1 !important;
    box-shadow:
        3px 5px 10px rgba(0, 0, 0, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1px 1px 2px rgba(255, 255, 255, 0.15),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transform: none !important;
}

[data-theme="dark"] .btn-profile-card-action#btn-edit-profile-save,
[data-theme="dark"] .btn-profile-card-action#btn-submit-auth,
[data-theme="dark"] .btn-profile-card-action#btn-submit-user {
    background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 4px 14px rgba(59, 130, 246, 0.45),
        -2px -2px 8px rgba(255, 255, 255, 0.03),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    transform: none !important;
}

[data-theme="dark"] .btn-profile-card-action#btn-edit-profile-cancel,
[data-theme="dark"] .btn-profile-card-action#btn-otc-edit-profile,
[data-theme="dark"] .btn-profile-card-action#btn-asig-save-profile {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.75) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    color: #94a3b8 !important;
    box-shadow:
        3px 5px 10px rgba(0, 0, 0, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1px 1px 2px rgba(255, 255, 255, 0.12),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transform: none !important;
}

[data-theme="dark"] .btn-profile-card-action.signout {
    background: linear-gradient(145deg, #ef4444 0%, #991b1b 100%) !important;
    color: #ffffff !important;
    box-shadow:
        3px 5px 12px rgba(0, 0, 0, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1px 1px 2px rgba(255, 255, 255, 0.20),
        inset -1px -1px 2px rgba(153, 27, 27, 0.40) !important;
    transform: none !important;
}

/* --- HOVER: ELEVACIÓN TÁCTIL (como btn-rain-toggle:hover) --- */
.btn-profile-card-action:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(215, 225, 235, 0.9) 100%) !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 1),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.1) !important;
    transform: translateY(-2px) scale(1.02) !important;
    color: var(--text-main, #475569) !important;
}

.btn-profile-card-action#btn-edit-profile-save:hover,
.btn-profile-card-action#btn-submit-auth:hover,
.btn-profile-card-action#btn-submit-user:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow:
        0 6px 18px rgba(59, 130, 246, 0.45),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.4),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px) scale(1.02) !important;
    color: #ffffff !important;
}

.btn-profile-card-action#btn-edit-profile-cancel:hover,
.btn-profile-card-action#btn-otc-edit-profile:hover,
.btn-profile-card-action#btn-asig-save-profile:hover,
.btn-profile-card-action.btn-asig-save-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(215, 225, 235, 0.9) 100%) !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 1),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.1) !important;
    color: #334155 !important;
    transform: translateY(-2px) scale(1.02) !important;
}

.btn-profile-card-action.signout:hover,
#btn-otc-signout:hover {
    background: linear-gradient(145deg, #dc2626 0%, #801515 100%) !important;
    box-shadow:
        3px 6px 14px rgba(153, 27, 27, 0.45),
        -2px -2px 8px rgba(255, 255, 255, 0.25),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(153, 27, 27, 0.5) !important;
    transform: translateY(-2px) scale(1.02) !important;
    color: #ffffff !important;
}

/* --- HOVER TEMA OSCURO --- */
[data-theme="dark"] .btn-profile-card-action:hover {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.85) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    color: var(--text-main, #cbd5e1) !important;
    box-shadow:
        4px 6px 12px rgba(0, 0, 0, 0.65),
        -3px -3px 10px rgba(255, 255, 255, 0.06),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.25),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

[data-theme="dark"] .btn-profile-card-action#btn-edit-profile-save:hover,
[data-theme="dark"] .btn-profile-card-action#btn-submit-auth:hover,
[data-theme="dark"] .btn-profile-card-action#btn-submit-user:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow:
        0 6px 18px rgba(59, 130, 246, 0.55),
        -2px -2px 8px rgba(255, 255, 255, 0.04),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.35),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-2px) scale(1.02) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-profile-card-action#btn-edit-profile-cancel:hover,
[data-theme="dark"] .btn-profile-card-action#btn-otc-edit-profile:hover,
[data-theme="dark"] .btn-profile-card-action#btn-asig-save-profile:hover,
[data-theme="dark"] .btn-profile-card-action.btn-asig-save-btn:hover {
    background: linear-gradient(145deg, rgba(45, 55, 75, 0.5) 0%, rgba(25, 30, 45, 0.7) 100%) !important;
    box-shadow: 
        3px 5px 10px rgba(0, 0, 0, 0.4),
        -3px -3px 10px rgba(255, 255, 255, 0.03),
        inset 1px 1px 1.5px rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main, #e2e8f0) !important;
    transform: scale(1.04) translateY(-1.5px) !important;
}

[data-theme="dark"] .btn-profile-card-action.signout:hover {
    background: linear-gradient(145deg, #f87171 0%, #dc2626 100%) !important;
    box-shadow: 
        0 6px 16px rgba(239, 68, 68, 0.45),
        inset 1px 1px 2px rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.04) translateY(-1.5px) !important;
    color: #ffffff !important;
}

/* ============================================================
   CASILLAS DE ESCRIBIR EN MODALES — INSET-TO-CONVEX PREMIUM
   (misma física que .focus-notes-area del spotlight de canchas)
   ============================================================ */
.otc-modal input[type="text"],
.otc-modal input[type="email"],
.otc-modal input[type="password"],
.otc-modal select,
.otc-modal textarea {
    width: 100% !important;
    border-radius: 16px !important;
    background: rgba(43, 67, 241, 0.05) !important;
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    box-sizing: border-box !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.12),
        inset -4px -4px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
}

.otc-modal input[type="text"],
.otc-modal input[type="email"],
.otc-modal input[type="password"],
.otc-modal select {
    height: 44px !important;
    padding: 0 14px !important;
}

.otc-modal textarea {
    height: 90px !important;
    padding: 12px 14px !important;
    resize: none !important;
    line-height: 1.5 !important;
}

.otc-modal input[type="password"] {
    padding-right: 44px !important;
}

.otc-modal input[type="text"]:focus,
.otc-modal input[type="email"]:focus,
.otc-modal input[type="password"]:focus,
.otc-modal select:focus,
.otc-modal textarea:focus {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 250, 255, 0.94) 100%) !important;
    border-color: rgba(43, 67, 241, 0.35) !important;
    transform: translateY(-4px) scale(1.01) !important;
    box-shadow:
        12px 18px 36px rgba(163, 177, 198, 0.55),
        -10px -10px 24px rgba(255, 255, 255, 0.95),
        inset 2px 2px 4px rgba(255, 255, 255, 1),
        inset -2px -2px 4px rgba(163, 177, 198, 0.20) !important;
}

.otc-modal input::placeholder,
.otc-modal textarea::placeholder {
    color: #475569 !important;
    opacity: 0.85 !important;
}

[data-theme="dark"] .otc-modal input[type="text"],
[data-theme="dark"] .otc-modal input[type="email"],
[data-theme="dark"] .otc-modal input[type="password"],
[data-theme="dark"] .otc-modal select,
[data-theme="dark"] .otc-modal textarea {
    background: rgba(10, 20, 50, 0.55) !important;
    border: 1.5px solid rgba(92, 115, 242, 0.25) !important;
    color: #f1f5f9 !important;
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.90),
        inset -5px -5px 12px rgba(92, 115, 242, 0.18),
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .otc-modal input[type="text"]:focus,
[data-theme="dark"] .otc-modal input[type="email"]:focus,
[data-theme="dark"] .otc-modal input[type="password"]:focus,
[data-theme="dark"] .otc-modal select:focus,
[data-theme="dark"] .otc-modal textarea:focus {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.90) 0%, rgba(15, 20, 30, 0.98) 100%) !important;
    border: 1.5px solid rgba(92, 115, 242, 0.45) !important;
    color: #ffffff !important;
    transform: translateY(-4px) scale(1.01) !important;
    box-shadow:
        12px 18px 36px rgba(0, 0, 0, 0.95),
        -8px -10px 24px rgba(255, 255, 255, 0.05),
        inset 2px 2px 4px rgba(255, 255, 255, 0.18),
        inset -2px -2px 4px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .otc-modal input::placeholder,
[data-theme="dark"] .otc-modal textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* --- COMPATIBILIDAD CON GESTORES DE CONTRASEÑA (CHROME, BITWARDEN, EDGE, SAFARI, BRAVE) --- */
.otc-modal input:is(:autofill, :-webkit-autofill),
.otc-modal input:is(:autofill, :-webkit-autofill):hover,
.otc-modal input:is(:autofill, :-webkit-autofill):focus,
.otc-modal input:is(:autofill, :-webkit-autofill):active {
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a;
    -webkit-box-shadow: 0 0 0 100vmax rgba(240, 245, 255, 0.98) inset, inset 4px 4px 8px rgba(0, 0, 0, 0.10) !important;
    box-shadow: 0 0 0 100vmax rgba(240, 245, 255, 0.98) inset, inset 4px 4px 8px rgba(0, 0, 0, 0.10) !important;
    transition: background-color 5000s ease-in-out 0s !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
}

[data-theme="dark"] .otc-modal input:is(:autofill, :-webkit-autofill),
[data-theme="dark"] .otc-modal input:is(:autofill, :-webkit-autofill):hover,
[data-theme="dark"] .otc-modal input:is(:autofill, :-webkit-autofill):focus,
[data-theme="dark"] .otc-modal input:is(:autofill, :-webkit-autofill):active {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    -webkit-box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.98) inset, inset 5px 5px 10px rgba(0, 0, 0, 0.90) !important;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.98) inset, inset 5px 5px 10px rgba(0, 0, 0, 0.90) !important;
    transition: background-color 5000s ease-in-out 0s !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
}

/* Estabilidad geométrica para Autofill móvil (Bitwarden / Chrome / Safari): sin saltos transform al enfocar */
#otc-auth-modal-overlay input[type="text"],
#otc-auth-modal-overlay input[type="email"],
#otc-auth-modal-overlay input[type="password"] {
    transition: border-color 0.16s ease, box-shadow 0.16s ease !important;
}

#otc-auth-modal-overlay input[type="text"]:focus,
#otc-auth-modal-overlay input[type="email"]:focus,
#otc-auth-modal-overlay input[type="password"]:focus,
[data-theme="dark"] #otc-auth-modal-overlay input[type="text"]:focus,
[data-theme="dark"] #otc-auth-modal-overlay input[type="email"]:focus,
[data-theme="dark"] #otc-auth-modal-overlay input[type="password"]:focus {
    transform: none !important;
}

/* --- FILTROS DE AVATAR (GENDER FILTERS) --- */
.btn-avatar-filter {
    padding: 4px 10px;
    border-radius: 8px;
    border: none !important;
    font-family: 'Outfit';
    font-size: 0.65rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--text-muted) !important;
    outline: none;
}

.btn-avatar-filter:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: var(--text-main) !important;
    transform: translateY(-0.5px);
}

.btn-avatar-filter.active {
    background: #2b43f1 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(43, 67, 241, 0.3) !important;
}

[data-theme="dark"] .btn-avatar-filter {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .btn-avatar-filter:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .btn-avatar-filter.active {
    background: #2b43f1 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(43, 67, 241, 0.45) !important;
}

/* --- MOBILE RESPONSIVE POSITIONING FOR COHESIVE LAYOUT --- */
@media (max-width: 480px) {
    .profile-btn {
        top: 4px !important;
        right: 16px !important;
    }
    
    .profile-floating-card {
        top: 84px !important;
        right: 16px !important;
        width: calc(100% - 32px) !important;
    }
}

/* --- ESCUDO DE SEGURIDAD (SHIELD GUARD) PARA PLATAFORMA --- */
body.is-logged-out .main-container,
body.is-logged-out #hamburger-menu,
body.is-logged-out #sidebar-menu,
body.is-logged-out #theme-toggle-btn,
body.is-logged-out #notifications-btn,
body.is-logged-out #profile-btn {
    display: none !important;
}

body.is-logged-out {
    background: radial-gradient(circle at 50% 50%, #0c0d14 0%, #020204 100%) !important;
    background-image: none !important;
    overflow: hidden !important;
}

body.is-logged-out[data-theme="light"] {
    background: #ffffff !important;
    background-image: none !important;
    overflow: hidden !important;
}

[data-theme="dark"] body.is-logged-out {
    background: radial-gradient(circle at 50% 50%, #0c0d14 0%, #020204 100%) !important;
    background-image: none !important;
    overflow: hidden !important;
}

/* --- PREMIUM NEUMORPHIC SEDE CHECKBOX BUTTONS --- */
.sede-checkbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(0, 0, 0, 0.02) !important;
    color: var(--text-muted) !important;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.06), inset -2px -2px 4px rgba(255,255,255,0.8) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.sede-checkbox-btn.active {
    background: linear-gradient(145deg, rgba(43, 67, 241, 0.1) 0%, rgba(43, 67, 241, 0.15) 100%) !important;
    border-color: rgba(43, 67, 241, 0.45) !important;
    color: var(--brand-primary) !important;
    box-shadow: 
        3px 4px 10px rgba(43, 67, 241, 0.15),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(43, 67, 241, 0.1) !important;
    transform: translateY(-2px);
}

[data-theme="dark"] .sede-checkbox-btn {
    background: rgba(10, 20, 50, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #64748b !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.6), inset -2px -2px 6px rgba(255,255,255,0.02) !important;
}

[data-theme="dark"] .sede-checkbox-btn.active {
    background: linear-gradient(145deg, rgba(92, 115, 242, 0.18) 0%, rgba(92, 115, 242, 0.08) 100%) !important;
    border-color: rgba(92, 115, 242, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 
        3px 4px 12px rgba(0, 0, 0, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 0.15),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
}

/* --- SELECTION-STATE STYLING FOR INPUTS IN SELECTED ROWS --- */
.otc-data-table tbody tr.row-selected input[type="text"],
.otc-data-table tbody tr.row-selected input[type="password"] {
    background: rgba(96, 165, 250, 0.05) !important;
    border-color: rgba(96, 165, 250, 0.25) !important;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.05) !important;
}

[data-theme="dark"] .otc-data-table tbody tr.row-selected input[type="text"],
[data-theme="dark"] .otc-data-table tbody tr.row-selected input[type="password"] {
    background: rgba(96, 165, 250, 0.1) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.6) !important;
}

/* --- OTC SEARCH INPUTS AS ZERO-TRIGGER INPUTS --- */
.otc-data-table input[type="search"]::-webkit-search-decoration,
.otc-data-table input[type="search"]::-webkit-search-cancel-button,
.otc-data-table input[type="search"]::-webkit-search-results-button,
.otc-data-table input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none !important;
}

.otc-data-table tbody tr.row-selected input[type="search"] {
    background: rgba(96, 165, 250, 0.05) !important;
    border-color: rgba(96, 165, 250, 0.25) !important;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.05) !important;
}

[data-theme="dark"] .otc-data-table tbody tr.row-selected input[type="search"] {
    background: rgba(96, 165, 250, 0.1) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.6) !important;
}

/* --- PREMIUM NEUMORPHIC INSET COLUMN SEARCH INPUT --- */
.bubble-search-input {
    width: 100% !important;
    height: 38px !important;
    padding: 0 16px !important;
    font-size: 0.85rem !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 50px !important;
    background: rgba(43, 67, 241, 0.04) !important; /* Soft electric blue hue */
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    color: var(--text-main) !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.bubble-search-input:focus {
    background: rgba(43, 67, 241, 0.07) !important; /* Slightly richer hue */
    border-color: rgba(43, 67, 241, 0.35) !important;
    box-shadow: 
        inset 3px 3px 8px rgba(0, 0, 0, 0.12),
        inset -3px -3px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 12px rgba(43, 67, 241, 0.08) !important;
}

/* Dark Theme Overrides for Column Search Input */
[data-theme="dark"] .bubble-search-input {
    background: rgba(10, 20, 50, 0.45) !important; /* Cobalto sapphire inset glass */
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .bubble-search-input:focus {
    background: rgba(10, 20, 50, 0.65) !important; /* Deep sapphire glow */
    border-color: rgba(92, 115, 242, 0.40) !important;
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.95),
        inset -5px -5px 12px rgba(92, 115, 242, 0.25),
        inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
}

/* ==========================================================================
   PREVENT TABLE COLUMNS SQUISHING ON SMALL SCREENS (HORIZONTAL SCROLL ENABLER)
   ========================================================================== */
.otc-data-table input[type="text"],
.otc-data-table input[type="search"],
.otc-data-table input[type="password"] {
    min-width: 130px !important;
}

/* Specific wider text fields */
.otc-data-table input[data-field="u-mail"],
.otc-data-table input[data-field="email"] {
    min-width: 180px !important;
}

.otc-data-table input[data-field="nombre"],
.otc-data-table input[data-field="u-fullname"],
.otc-data-table input[data-field="apellido"] {
    min-width: 140px !important;
}

/* Custom select triggers & wrappers */
.otc-data-table .otc-datepicker-wrapper,
.otc-data-table .otc-td-trigger {
    min-width: 120px !important;
}

/* Custom multi-select triggers */
.otc-data-table .otc-ms-trigger {
    min-width: 160px !important;
}

/* Datepicker cell and header */
.otc-data-table td.cell-dp,
.otc-data-table th.sortable, 
.otc-data-table th.filterable {
    min-width: 110px !important;
}

/* Form controls fallback */
.otc-data-table select,
.otc-data-table input[type="date"] {
    min-width: 120px !important;
}

/* Ensure checkbox and action columns remain compact but don't break */
.otc-data-table th:first-child,
.otc-data-table td:first-child {
    min-width: 35px !important;
    width: 35px !important;
}

.otc-data-table td:last-child,
.otc-data-table th:last-child {
    min-width: 50px !important;
    width: 50px !important;
}

/* ==========================================================================
   OTCADEMY PREMIUM FUTURISTIC BG CANVAS & AUTH OVERLAY MODS
   ========================================================================== */
#otc-auth-modal-overlay {
    backdrop-filter: none !important;
    background: transparent !important;
    z-index: 100000;
}

html.is-logged-out #otc-auth-modal-overlay,
body.is-logged-out #otc-auth-modal-overlay {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

html:not(.is-logged-out) body:not(.is-logged-out) #otc-auth-modal-overlay:not(.active) {
    display: none !important;
}

#otc-login-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99996;  /* DEBAJO del logo (99998) y del título (99999) */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.is-logged-out #otc-login-bg-canvas {
    opacity: 1;
}

.otc-login-bg-logo {
    display: none;
    position: fixed;
    top: 2.5vh; /* Subido un poco más */
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    max-width: 85vw; /* Evita desbordamiento en pantallas pequeñas */
    height: auto;
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.is-logged-out .otc-login-bg-logo {
    display: block;
    opacity: 0.85;
}

/* ==========================================================================
   OTC TENNIS - SECCIÓN CLASES PRIVADAS (DASHBOARD & CHARTS)
   ========================================================================== */
.clases-dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 16px 24px;
    border-bottom: none !important;
}

.stat-card-clases {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    border: 1.5px solid transparent !important;
    box-shadow:
        12px 18px 40px rgba(163, 177, 198, 0.32),
        -12px -18px 40px rgba(255, 255, 255, 0.9),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 1),
        inset -1.5px -1.5px 3px rgba(163, 177, 198, 0.12) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── Hover base: fija sin desplazamiento, con glow sutil (igual para todas) ── */
.stat-card-clases:hover {
    transform: none !important;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%) !important;
    box-shadow:
        14px 24px 48px rgba(163, 177, 198, 0.45),
        -12px -18px 40px rgba(255, 255, 255, 0.98),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 1),
        inset -1.5px -1.5px 3px rgba(163, 177, 198, 0.15),
        0 4px 16px rgba(43, 67, 241, 0.08) !important;
    z-index: 5;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* ── Hover temático claro: Alumnos (Azul) ── */
.active-students-capsule.stat-card-clases:hover {
    box-shadow:
        14px 24px 48px rgba(163, 177, 198, 0.45),
        -12px -18px 40px rgba(255, 255, 255, 0.98),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 1),
        inset -1.5px -1.5px 3px rgba(37, 99, 235, 0.12),
        0 8px 22px rgba(37, 99, 235, 0.18) !important;
    border-color: rgba(37, 99, 235, 0.18) !important;
}

/* ── Hover temático minimalista neutro (Sin luces de colores) ── */
.active-students-capsule.stat-card-clases:hover,
.active-teachers-capsule.stat-card-clases:hover,
.active-courts-capsule.stat-card-clases:hover,
.active-ratio-capsule.stat-card-clases:hover,
.active-attendance-capsule.stat-card-clases:hover,
.active-indigo-capsule.stat-card-clases:hover {
    transform: none !important;
    box-shadow:
        10px 16px 36px rgba(163, 177, 198, 0.35),
        -10px -14px 30px rgba(255, 255, 255, 0.98),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 1),
        inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}

/* ── Dark mode base ── */
[data-theme="dark"] .stat-card-clases {
    background: #242735 !important;
    border: 1.5px solid transparent !important;
    box-shadow: 
        12px 18px 40px rgba(0, 0, 0, 0.4),
        -12px -18px 40px rgba(255, 255, 255, 0.04),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 0.08),
        inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.25) !important;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* ── Dark mode hover base minimalista neutro ── */
[data-theme="dark"] .stat-card-clases:hover,
[data-theme="dark"] .active-students-capsule.stat-card-clases:hover,
[data-theme="dark"] .active-teachers-capsule.stat-card-clases:hover,
[data-theme="dark"] .active-courts-capsule.stat-card-clases:hover,
[data-theme="dark"] .active-ratio-capsule.stat-card-clases:hover,
[data-theme="dark"] .active-attendance-capsule.stat-card-clases:hover,
[data-theme="dark"] .active-indigo-capsule.stat-card-clases:hover {
    transform: none !important;
    background: linear-gradient(145deg, #2a2e40 0%, #1e212d 100%) !important;
    box-shadow: 
        14px 24px 48px rgba(0, 0, 0, 0.60),
        -12px -18px 40px rgba(255, 255, 255, 0.05),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 0.12),
        inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    z-index: 5;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.stat-card-clases .stat-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.stat-card-clases .capsule-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: normal;
}

.stat-card-clases .capsule-text::after {
    content: ":";
}

.stat-card-clases strong {
    font-size: 1.05rem;
    font-weight: 800;
    margin-top: 0;
    font-family: 'Outfit';
    letter-spacing: -0.2px;
}

#stat-total-clases { color: #2563eb !important; text-shadow: 0 0 8px rgba(37, 99, 235, 0.15) !important; }

/* ── Control de Academia KPI Filter Dropdowns ── */
.stat-card-clases.clickable {
    cursor: pointer !important;
    position: relative !important;
    user-select: none;
}

.stat-card-clases.clickable:hover {
    filter: brightness(1.02);
    /* transform ya lo aplica .stat-card-clases:hover — no anular */
}

.stat-card-clases.has-active-filter {
    /* No se añade borde resaltado a la carta para mantener el diseño minimalista */
}

.stat-card-clases .group-chevron {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-clases.dropdown-open .group-chevron {
    transform: rotate(180deg);
}

#stat-acad-alumnos { color: #2563eb !important; }
#stat-acad-profesores { color: #8b5cf6 !important; }
#stat-acad-canchas { color: #10b981 !important; }
#stat-acad-horas { color: #06b6d4 !important; }
#stat-acad-asistencia { color: #f97316 !important; }

[data-theme="dark"] #stat-acad-alumnos { color: #60a5fa !important; }
[data-theme="dark"] #stat-acad-profesores { color: #c084fc !important; }
[data-theme="dark"] #stat-acad-canchas { color: #34d399 !important; }
[data-theme="dark"] #stat-acad-horas { color: #22d3ee !important; }
[data-theme="dark"] #stat-acad-asistencia { color: #fb923c !important; }

#academia-active-filters-container,
#clases-active-filters-container {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    margin-left: 12px !important;
}

@media (max-width: 768px) {
    #academia-active-filters-container,
    #clases-active-filters-container {
        display: none !important;
    }
}

/* Cápsula de Filtro Activo al lado del Título (Estilo Píldora 3D neumórfica 1:1 a .btn-primary-pill) */
.acad-active-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 16px !important;
    height: 32px !important;
    border-radius: 50px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em !important;
    color: var(--text-muted) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    box-shadow: 
        4px 5px 14px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transition: background 0.2s ease, box-shadow 0.2s ease !important;
    animation: pillFloatIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.acad-active-pill strong {
    font-weight: 850 !important;
    color: var(--text-muted) !important;
    opacity: 0.95 !important;
}

.acad-active-pill:hover {
    transform: none !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(240, 245, 255, 0.8) 100%) !important;
    box-shadow: 
        5px 6px 16px rgba(163, 177, 198, 0.42),
        -5px -5px 14px rgba(255, 255, 255, 0.98),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.12) !important;
}

/* Modo Oscuro - Cápsula de Filtro Activo (Píldora Obsidiana 3D) */
[data-theme="dark"] .acad-active-pill {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    color: #94a3b8 !important;
    box-shadow: 
        5px 7px 14px rgba(0, 0, 0, 0.85),
        -3px -3px 10px rgba(255, 255, 255, 0.05),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.22),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .acad-active-pill strong {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .acad-active-pill:hover {
    transform: none !important;
    background: linear-gradient(145deg, rgba(60, 75, 100, 0.8) 0%, rgba(25, 32, 48, 0.95) 100%) !important;
    box-shadow: 
        7px 9px 18px rgba(0, 0, 0, 0.99),
        -4px -4px 12px rgba(255, 255, 255, 0.08),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.6) !important;
}

/* Botón X Minimalista Integrado en la Píldora */
.acad-active-pill .pill-x-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.80rem !important;
    font-weight: 800 !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    margin-left: 6px !important;
    opacity: 0.75 !important;
    transition: all 0.15s ease !important;
    background: transparent !important;
    border: none !important;
    padding: 0 2px !important;
    line-height: 1 !important;
}

.acad-active-pill:hover .pill-x-btn,
.acad-active-pill .pill-x-btn:hover {
    opacity: 1 !important;
    color: var(--text-main) !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .acad-active-pill .pill-x-btn {
    color: #94a3b8 !important;
}

[data-theme="dark"] .acad-active-pill:hover .pill-x-btn,
[data-theme="dark"] .acad-active-pill .pill-x-btn:hover {
    color: #ffffff !important;
}

@keyframes pillFloatIn {
    from { opacity: 0; transform: translateY(3px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.academia-kpi-dropdown {
    position: fixed;
    min-width: 290px;
    max-width: 320px;
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 16px 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.14), 0 0 1px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 1) !important;
    z-index: 9999999 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: acadDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', system-ui, sans-serif !important;
}

@keyframes acadDropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

[data-theme="dark"] .academia-kpi-dropdown {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(139, 92, 246, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}

.acad-dd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

[data-theme="dark"] .acad-dd-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.acad-dd-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Outfit', system-ui, sans-serif;
}

[data-theme="dark"] .acad-dd-title {
    color: #f8fafc;
}

.acad-dd-actions {
    display: flex;
    gap: 6px;
}

.acad-dd-btn {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    font-size: 0.80rem !important;
    font-weight: 700 !important;
    color: var(--text-muted, #64748b) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    font-family: 'Outfit', sans-serif !important;
}

[data-theme="dark"] .acad-dd-btn {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

.acad-dd-btn:hover {
    color: var(--text-main, #1e293b) !important;
    opacity: 0.85 !important;
}

[data-theme="dark"] .acad-dd-btn:hover {
    color: #f8fafc !important;
    opacity: 0.85 !important;
}

/* Texto plano de conteo (150/150) sin relleno de cápsula */
.acad-dd-badge {
    font-size: 0.80rem !important;
    font-weight: 800 !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    color: #64748b !important;
}

[data-theme="dark"] .acad-dd-badge {
    color: #94a3b8 !important;
}

/* Buscador Enterrado Estilo Neumórfico (Lupa #cbd5e1 y Borde Sutil en Reposo) */
.acad-dd-search {
    width: 100% !important;
    height: 38px !important;
    padding: 0 16px 0 36px !important;
    font-size: 0.84rem !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 50px !important;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 12px center !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    box-shadow: 
        inset 2.5px 2.5px 5px rgba(163, 177, 198, 0.3),
        inset -2.5px -2.5px 5px rgba(255, 255, 255, 1) !important;
    color: var(--text-color, #1e293b) !important;
    outline: none !important;
    box-sizing: border-box !important;
}

[data-theme="dark"] .acad-dd-search {
    background: #1e293b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 12px center !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.6),
        inset -2px -2px 4px rgba(255, 255, 255, 0.06) !important;
    color: #f8fafc !important;
}

.acad-dd-list {
    max-height: 230px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 8px 8px 8px;
    margin-top: 4px;
    margin-left: -4px;
    margin-right: -4px;
}

.acad-dd-list::-webkit-scrollbar {
    width: 6px;
}

.acad-dd-list::-webkit-scrollbar-track {
    background: transparent;
}

.acad-dd-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}

[data-theme="dark"] .acad-dd-list::-webkit-scrollbar-thumb {
    background: #334155;
}

.acad-dd-exponent,
.acad-card-exponent {
    font-size: 0.92rem !important;
    font-weight: 900 !important;
    color: #2563eb !important;
    margin-left: 3px !important;
    vertical-align: super !important;
    font-family: 'Outfit', sans-serif !important;
    line-height: 1 !important;
}

[data-theme="dark"] .acad-dd-exponent,
[data-theme="dark"] .acad-card-exponent {
    color: #60a5fa !important;
}

.acad-dd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 13px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.88rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main, #1e293b);
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    font-weight: 500;
}

[data-theme="dark"] .acad-dd-item {
    color: #cbd5e1;
}

/* Hover Sutil Gris Minimalista (Sin cambios de color azul/verde/morado) */
.acad-dd-item:not(.selected):hover,
.academia-kpi-dropdown[data-type="alumnos"] .acad-dd-item:hover,
.academia-kpi-dropdown[data-type="profesores"] .acad-dd-item:hover,
.academia-kpi-dropdown[data-type="canchas"] .acad-dd-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    color: var(--text-main, #1e293b) !important;
    transform: scale(1.01) !important;
}

[data-theme="dark"] .acad-dd-item:not(.selected):hover,
[data-theme="dark"] .academia-kpi-dropdown[data-type="alumnos"] .acad-dd-item:hover,
[data-theme="dark"] .academia-kpi-dropdown[data-type="profesores"] .acad-dd-item:hover,
[data-theme="dark"] .academia-kpi-dropdown[data-type="canchas"] .acad-dd-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    transform: scale(1.01) !important;
}

/* Opción SELECCIONADA: Cápsula 3D Píldora Neumórfica (Idéntica 1:1 a los filtros al lado del título .acad-active-pill) */
.acad-dd-item.selected {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 6px 14px !important;
    min-height: 32px !important;
    border-radius: 50px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em !important;
    color: var(--text-muted) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    box-shadow: 
        4px 5px 14px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transition: background 0.2s ease, box-shadow 0.2s ease !important;
    margin: 3px 2px 5px 2px !important;
}

[data-theme="dark"] .acad-dd-item.selected {
    background: linear-gradient(145deg, rgba(50, 65, 90, 0.75) 0%, rgba(20, 26, 40, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    color: #cbd5e1 !important;
    box-shadow: 
        5px 7px 14px rgba(0, 0, 0, 0.85),
        -3px -3px 10px rgba(255, 255, 255, 0.05),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.22),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Botón X Minimalista en la opción seleccionada (Idéntico 1:1 a .pill-x-btn, sin círculos ni sombras) */
.acad-dd-remove-x {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.80rem !important;
    font-weight: 800 !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    margin-left: 6px !important;
    opacity: 0.75 !important;
    transition: all 0.15s ease !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 2px !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

.acad-dd-item.selected:hover .acad-dd-remove-x,
.acad-dd-remove-x:hover {
    opacity: 1 !important;
    color: var(--text-main, #1e293b) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .acad-dd-remove-x {
    color: #94a3b8 !important;
}

[data-theme="dark"] .acad-dd-item.selected:hover .acad-dd-remove-x,
[data-theme="dark"] .acad-dd-remove-x:hover {
    color: #ffffff !important;
    background: transparent !important;
    box-shadow: none !important;
}

.acad-dd-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   TEMAS DE BUSQUEDA Y BOTONES DE CAPSUAL (MINIMALISTA NEUTRO)
   ========================================================= */

.academia-kpi-dropdown[data-type="alumnos"] .acad-dd-badge,
.academia-kpi-dropdown[data-type="profesores"] .acad-dd-badge,
.academia-kpi-dropdown[data-type="canchas"] .acad-dd-badge {
    color: var(--text-muted, #64748b) !important;
}

.academia-kpi-dropdown .acad-dd-search:focus {
    border-color: rgba(148, 163, 184, 0.45) !important;
    box-shadow: 
        inset 2px 2px 6px rgba(0, 0, 0, 0.08),
        inset -2px -2px 6px rgba(255, 255, 255, 0.95) !important;
    outline: none !important;
}

[data-theme="dark"] .academia-kpi-dropdown .acad-dd-search:focus {
    border-color: rgba(255, 255, 255, 0.20) !important;
    box-shadow:
        inset 3px 3px 8px rgba(0, 0, 0, 0.8),
        inset -2px -2px 6px rgba(255, 255, 255, 0.05) !important;
    outline: none !important;
}


#stat-total-clases { color: #2563eb !important; text-shadow: 0 0 8px rgba(37, 99, 235, 0.15) !important; }
[data-theme="dark"] #stat-total-clases { color: #60a5fa !important; text-shadow: 0 0 8px rgba(96, 165, 250, 0.3) !important; }

#stat-total-horas { color: #10b981 !important; text-shadow: 0 0 8px rgba(16, 185, 129, 0.15) !important; }
[data-theme="dark"] #stat-total-horas { color: #34d399 !important; text-shadow: 0 0 8px rgba(52, 211, 153, 0.3) !important; }

#stat-total-profesores { color: #8b5cf6 !important; text-shadow: 0 0 8px rgba(139, 92, 246, 0.15) !important; }
[data-theme="dark"] #stat-total-profesores { color: #c084fc !important; text-shadow: 0 0 8px rgba(192, 132, 252, 0.3) !important; }

#stat-total-alumnos { color: #06b6d4 !important; text-shadow: 0 0 8px rgba(6, 182, 212, 0.15) !important; }
[data-theme="dark"] #stat-total-alumnos { color: #22d3ee !important; text-shadow: 0 0 8px rgba(34, 211, 238, 0.3) !important; }

#stat-hora-pico { color: #f97316 !important; font-size: 1.05rem !important; text-shadow: 0 0 8px rgba(249, 115, 22, 0.15) !important; }
[data-theme="dark"] #stat-hora-pico { color: #fb923c !important; text-shadow: 0 0 8px rgba(251, 146, 60, 0.3) !important; }

#stat-formato-pico { color: #6366f1 !important; font-size: 1.05rem !important; text-shadow: 0 0 8px rgba(99, 102, 241, 0.15) !important; }
[data-theme="dark"] #stat-formato-pico { color: #818cf8 !important; text-shadow: 0 0 8px rgba(129, 140, 248, 0.3) !important; }



#view-academia-control .table-header-premium,
#view-clases-control .table-header-premium {
    position: relative !important;
    top: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
    z-index: 10 !important;
}

/* Charts Layout */
.clases-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 24px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.clases-charts-grid--3col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

@media (max-width: 1100px) {
    .clases-charts-grid--3col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .clases-charts-grid,
    .clases-charts-grid--3col,
    .clases-charts-grid--2col {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 0 8px 14px !important;
    }
    .clases-chart-card {
        padding: 16px 12px !important;
        border-radius: 16px !important;
    }
}

.clases-chart-card {
    padding: 22px;
    border-radius: 20px;
    background: #ffffff !important;
    border: none !important;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    box-shadow:
        12px 18px 40px rgba(163, 177, 198, 0.32),
        -12px -18px 40px rgba(255, 255, 255, 0.9),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 1),
        inset -1.5px -1.5px 3px rgba(163, 177, 198, 0.12) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

[data-theme="dark"] .clases-chart-card {
    background: #242735 !important;
    border: none !important;
    box-shadow: 
        12px 18px 40px rgba(0, 0, 0, 0.4),
        -12px -18px 40px rgba(255, 255, 255, 0.04),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 0.08),
        inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.25) !important;
}

.clases-chart-card h3 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #64748b !important; /* Gris unificado elegante como la línea de tiempo de meses */
    letter-spacing: -0.2px !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

[data-theme="dark"] .clases-chart-card h3 {
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Custom CSS Horizontal Bar Chart */
.clases-custom-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
    scrollbar-color: rgba(43, 67, 241, 0.22) rgba(43, 67, 241, 0.02);
    scrollbar-width: thin !important;
}
.clases-custom-chart::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.clases-custom-chart::-webkit-scrollbar-track {
    background: rgba(43, 67, 241, 0.02) !important;
    border-radius: 6px;
}
.clases-custom-chart::-webkit-scrollbar-thumb {
    background: rgba(43, 67, 241, 0.22) !important;
    border-radius: 6px;
    border: 2px solid transparent !important;
}
.clases-custom-chart::-webkit-scrollbar-thumb:hover {
    background: rgba(43, 67, 241, 0.45) !important;
}
[data-theme="dark"] .clases-custom-chart {
    scrollbar-color: rgba(92, 115, 242, 0.40) rgba(10, 20, 50, 0.15) !important;
}
[data-theme="dark"] .clases-custom-chart::-webkit-scrollbar-track {
    background: rgba(10, 20, 50, 0.15) !important;
}
[data-theme="dark"] .clases-custom-chart::-webkit-scrollbar-thumb {
    background: rgba(92, 115, 242, 0.40) !important;
}
[data-theme="dark"] .clases-custom-chart::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 115, 242, 0.65) !important;
}

/* Interactive Clock Chart */
.clock-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    position: relative;
    padding: 10px 0;
}

.clock-svg {
    width: 100%;
    max-width: 210px;
    height: auto;
    overflow: visible;
}

/* Clock Face */
.clock-face {
    fill: var(--card-bg);
    stroke: var(--panel-border);
    stroke-width: 1.5;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

[data-theme="dark"] .clock-face {
    fill: rgba(30, 30, 45, 0.3);
}

.clock-face-outer {
    fill: none;
    stroke: var(--panel-border);
    stroke-width: 0.5;
    stroke-dasharray: 2, 4;
}

/* Numbers & Ticks */
.clock-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 10px;
    fill: var(--text-muted);
    text-anchor: middle;
    dominant-baseline: middle;
    user-select: none;
    opacity: 0.8;
}

.clock-tick {
    stroke: var(--text-muted);
    stroke-width: 1;
    opacity: 0.25;
}

.clock-tick-major {
    stroke-width: 1.5;
    opacity: 0.45;
}

/* Petals / Rays */
.clock-petal {
    stroke-linecap: round;
    cursor: pointer;
    transition: stroke-width 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
    opacity: 0.75;
}

.clock-petal:hover {
    stroke-width: 6.5px !important;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--glow-color));
}

.clock-petal--active {
    stroke-width: 7px !important;
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--glow-color));
}

/* Hands */
.clock-hand {
    stroke-linecap: round;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: 100px 100px;
}

.clock-hand-hour {
    stroke: #8b5cf6;
    stroke-width: 3.5;
    filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.6));
}

.clock-hand-minute {
    stroke: #06b6d4;
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.6));
}

.clock-hand-pivot {
    fill: var(--text-main);
    stroke: var(--panel-bg);
    stroke-width: 2;
}

/* Central Digital Readout */
.clock-center-display {
    position: absolute;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 245, 255, 0.65) 100%) !important;
    border: none !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.35),
        -4px -4px 10px rgba(255, 255, 255, 0.9),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
}

[data-theme="dark"] .clock-center-display {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.65) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    border: none !important;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.45),
        -4px -4px 10px rgba(255, 255, 255, 0.03),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.1),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
}

.clock-center-time {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 11px;
    color: var(--text-main);
    line-height: 1.1;
    text-align: center;
}

.clock-center-ampm {
    font-size: 7.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

.clock-center-count {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 2px;
}

.clases-chart-bar-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 16px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.clases-chart-bar-row:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
    box-shadow: 2px 4px 10px rgba(163, 177, 198, 0.25) !important;
}

[data-theme="dark"] .clases-chart-bar-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Active filter style in chart row (Hundimiento neumórfico idéntico al menú de barra lateral) */
.clases-chart-bar-row.active-filter-item {
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    transform: none !important;
}

[data-theme="dark"] .clases-chart-bar-row.active-filter-item {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    transform: none !important;
}

.clases-chart-bar-row .bar-label {
    width: 90px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.clases-chart-bar-row .bar-track {
    flex: 1;
    height: 12px;
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    border-radius: 20px !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

[data-theme="dark"] .clases-chart-bar-row .bar-track {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
}

.clases-chart-bar-row .bar-fill {
    height: 100%;
    border-radius: 20px;
    position: relative;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glass shine overlay inside the bar fill */
.clases-chart-bar-row .bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    pointer-events: none;
}

.clases-chart-bar-row .bar-value {
    width: 32px;
    text-align: right;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

/* Specific bar colors, glows, and adapted text colors */

/* 1. Dias (Purple) */
#chart-clases-dias .bar-fill {
    background: linear-gradient(90deg, #8b5cf6 0%, #c084fc 100%) !important;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.22) !important;
}
#chart-clases-dias .bar-label,
#chart-clases-dias .bar-value {
    color: rgba(139, 92, 246, 0.8) !important;
}
#chart-clases-dias .clases-chart-bar-row:hover .bar-label,
#chart-clases-dias .clases-chart-bar-row:hover .bar-value,
#chart-clases-dias .clases-chart-bar-row.active-filter-item .bar-label,
#chart-clases-dias .clases-chart-bar-row.active-filter-item .bar-value {
    color: #7c3aed !important;
}
[data-theme="dark"] #chart-clases-dias .bar-label,
[data-theme="dark"] #chart-clases-dias .bar-value {
    color: rgba(192, 132, 252, 0.75) !important;
}
[data-theme="dark"] #chart-clases-dias .clases-chart-bar-row:hover .bar-label,
[data-theme="dark"] #chart-clases-dias .clases-chart-bar-row:hover .bar-value,
[data-theme="dark"] #chart-clases-dias .clases-chart-bar-row.active-filter-item .bar-label,
[data-theme="dark"] #chart-clases-dias .clases-chart-bar-row.active-filter-item .bar-value {
    color: #c084fc !important;
}

/* 2. Horas (Cyan) */
#chart-clases-horas .bar-fill {
    background: linear-gradient(90deg, #06b6d4 0%, #67e8f9 100%) !important;
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.22) !important;
}
#chart-clases-horas .bar-label,
#chart-clases-horas .bar-value {
    color: rgba(8, 145, 178, 0.8) !important;
}
#chart-clases-horas .clases-chart-bar-row:hover .bar-label,
#chart-clases-horas .clases-chart-bar-row:hover .bar-value,
#chart-clases-horas .clases-chart-bar-row.active-filter-item .bar-label,
#chart-clases-horas .clases-chart-bar-row.active-filter-item .bar-value {
    color: #0891b2 !important;
}
[data-theme="dark"] #chart-clases-horas .bar-label,
[data-theme="dark"] #chart-clases-horas .bar-value {
    color: rgba(103, 232, 249, 0.75) !important;
}
[data-theme="dark"] #chart-clases-horas .clases-chart-bar-row:hover .bar-label,
[data-theme="dark"] #chart-clases-horas .clases-chart-bar-row:hover .bar-value,
[data-theme="dark"] #chart-clases-horas .clases-chart-bar-row.active-filter-item .bar-label,
[data-theme="dark"] #chart-clases-horas .clases-chart-bar-row.active-filter-item .bar-value {
    color: #22d3ee !important;
}

/* 3. Sedes (Orange) */
#chart-clases-sedes .bar-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%) !important;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.22) !important;
}
#chart-clases-sedes .bar-label,
#chart-clases-sedes .bar-value {
    color: rgba(217, 119, 6, 0.8) !important;
}
#chart-clases-sedes .clases-chart-bar-row:hover .bar-label,
#chart-clases-sedes .clases-chart-bar-row:hover .bar-value,
#chart-clases-sedes .clases-chart-bar-row.active-filter-item .bar-label,
#chart-clases-sedes .clases-chart-bar-row.active-filter-item .bar-value {
    color: #d97706 !important;
}
[data-theme="dark"] #chart-clases-sedes .bar-label,
[data-theme="dark"] #chart-clases-sedes .bar-value {
    color: rgba(251, 191, 36, 0.75) !important;
}
[data-theme="dark"] #chart-clases-sedes .clases-chart-bar-row:hover .bar-label,
[data-theme="dark"] #chart-clases-sedes .clases-chart-bar-row:hover .bar-value,
[data-theme="dark"] #chart-clases-sedes .clases-chart-bar-row.active-filter-item .bar-label,
[data-theme="dark"] #chart-clases-sedes .clases-chart-bar-row.active-filter-item .bar-value {
    color: #fbbf24 !important;
}

/* 4. Profesores (Blue) */
#ranking-clases-profesores .bar-fill {
    background: linear-gradient(90deg, var(--color-electric-blue) 0%, #818cf8 100%) !important;
    box-shadow: 0 0 6px rgba(43, 67, 241, 0.22) !important;
}
#ranking-clases-profesores .bar-label,
#ranking-clases-profesores .bar-value {
    color: rgba(37, 99, 235, 0.8) !important;
}
#ranking-clases-profesores .clases-chart-bar-row:hover .bar-label,
#ranking-clases-profesores .clases-chart-bar-row:hover .bar-value,
#ranking-clases-profesores .clases-chart-bar-row.active-filter-item .bar-label,
#ranking-clases-profesores .clases-chart-bar-row.active-filter-item .bar-value {
    color: #2563eb !important;
}
[data-theme="dark"] #ranking-clases-profesores .bar-label,
[data-theme="dark"] #ranking-clases-profesores .bar-value {
    color: rgba(129, 140, 248, 0.75) !important;
}
[data-theme="dark"] #ranking-clases-profesores .clases-chart-bar-row:hover .bar-label,
[data-theme="dark"] #ranking-clases-profesores .clases-chart-bar-row:hover .bar-value,
[data-theme="dark"] #ranking-clases-profesores .clases-chart-bar-row.active-filter-item .bar-label,
[data-theme="dark"] #ranking-clases-profesores .clases-chart-bar-row.active-filter-item .bar-value {
    color: #818cf8 !important;
}

/* 5. Alumnos (Green) */
#ranking-clases-alumnos .bar-fill {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%) !important;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.22) !important;
}
#ranking-clases-alumnos .bar-label,
#ranking-clases-alumnos .bar-value {
    color: rgba(5, 150, 105, 0.8) !important;
}
#ranking-clases-alumnos .clases-chart-bar-row:hover .bar-label,
#ranking-clases-alumnos .clases-chart-bar-row:hover .bar-value,
#ranking-clases-alumnos .clases-chart-bar-row.active-filter-item .bar-label,
#ranking-clases-alumnos .clases-chart-bar-row.active-filter-item .bar-value {
    color: #059669 !important;
}
[data-theme="dark"] #ranking-clases-alumnos .bar-label,
[data-theme="dark"] #ranking-clases-alumnos .bar-value {
    color: rgba(52, 211, 153, 0.75) !important;
}
[data-theme="dark"] #ranking-clases-alumnos .clases-chart-bar-row:hover .bar-label,
[data-theme="dark"] #ranking-clases-alumnos .clases-chart-bar-row:hover .bar-value,
[data-theme="dark"] #ranking-clases-alumnos .clases-chart-bar-row.active-filter-item .bar-label,
[data-theme="dark"] #ranking-clases-alumnos .clases-chart-bar-row.active-filter-item .bar-value {
    color: #34d399 !important;
}

/* Sunken appearance for date and time fields in Clases Privadas form */
.clases-privadas-dp-wrapper button.otc-mobile-field-btn,
#clases-privadas-timepicker-container .otc-tp-trigger,
[id^="clases-privadas-timepicker-container"] .otc-tp-trigger {
    width: 100% !important;
    height: 44px !important;
    border-radius: 16px !important;
    background: rgba(43, 67, 241, 0.05) !important;
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 14px !important;
    cursor: pointer !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.12),
        inset -4px -4px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

/* Light mode hover effect */
.clases-privadas-dp-wrapper button.otc-mobile-field-btn:hover,
#clases-privadas-timepicker-container .otc-tp-trigger:hover,
[id^="clases-privadas-timepicker-container"] .otc-tp-trigger:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 250, 255, 0.94) 100%) !important;
    border-color: rgba(43, 67, 241, 0.35) !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow:
        12px 18px 36px rgba(163, 177, 198, 0.55),
        -10px -10px 24px rgba(255, 255, 255, 0.95),
        inset 2px 2px 4px rgba(255, 255, 255, 1),
        inset -2px -2px 4px rgba(163, 177, 198, 0.20) !important;
}

[data-theme="dark"] .clases-privadas-dp-wrapper button.otc-mobile-field-btn,
[data-theme="dark"] #clases-privadas-timepicker-container .otc-tp-trigger,
[data-theme="dark"] [id^="clases-privadas-timepicker-container"] .otc-tp-trigger {
    background: rgba(10, 20, 50, 0.55) !important;
    border: 1.5px solid rgba(92, 115, 242, 0.25) !important;
    color: #cbd5e1 !important;
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.90),
        inset -5px -5px 12px rgba(92, 115, 242, 0.18),
        inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.15) !important;
}
/* Dark mode hover effect */
[data-theme="dark"] .clases-privadas-dp-wrapper button.otc-mobile-field-btn:hover,
[data-theme="dark"] #clases-privadas-timepicker-container .otc-tp-trigger:hover,
[data-theme="dark"] [id^="clases-privadas-timepicker-container"] .otc-tp-trigger:hover {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.90) 0%, rgba(15, 20, 30, 0.98) 100%) !important;
    border: 1.5px solid rgba(92, 115, 242, 0.45) !important;
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow:
        12px 18px 36px rgba(0, 0, 0, 0.95),
        -8px -10px 24px rgba(255, 255, 255, 0.05),
        inset 2px 2px 4px rgba(255, 255, 255, 0.18),
        inset -2px -2px 4px rgba(0, 0, 0, 0.6) !important;
}

/* Overrides for TimePicker inside tables to match sunken/proportional style */
.otc-data-table td.otc-timepicker-container {
    width: auto !important;
    vertical-align: middle !important;
    position: relative !important;
}

.otc-data-table .otc-tp-trigger,
#clases-privadas-table .otc-tp-trigger {
    width: 100% !important;
    min-width: 90px !important;
    height: 38px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 10px !important;
    background: color-mix(in srgb, var(--table-accent-color) 4%, transparent) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px color-mix(in srgb, var(--table-accent-color) 8%, transparent) !important;
    color: var(--text-main) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

.otc-data-table .otc-tp-trigger:hover,
#clases-privadas-table .otc-tp-trigger:hover {
    background: color-mix(in srgb, var(--table-accent-color) 7%, transparent) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 35%, transparent) !important;
    box-shadow: 
        inset 3px 3px 8px rgba(0, 0, 0, 0.12),
        inset -3px -3px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 12px color-mix(in srgb, var(--table-accent-color) 15%, transparent) !important;
    color: var(--text-main) !important;
    transform: none !important;
}

[data-theme="dark"] .otc-data-table .otc-tp-trigger,
[data-theme="dark"] #clases-privadas-table .otc-tp-trigger {
    background: rgba(10, 20, 50, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px color-mix(in srgb, var(--table-accent-color) 15%, transparent),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .otc-data-table .otc-tp-trigger:hover,
[data-theme="dark"] #clases-privadas-table .otc-tp-trigger:hover {
    background: rgba(10, 20, 50, 0.55) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 40%, transparent) !important;
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.95),
        inset -5px -5px 12px color-mix(in srgb, var(--table-accent-color) 25%, transparent),
        inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
}

/* --- NUEVOS ESTILOS PARA DASHBOARD INTERACTIVO --- */

/* 1. Gráfico de Día de la Semana (Columnas Verticales) */
.clases-chart-column-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 140px;
    padding: 10px 0;
    gap: 10px;
}
.clases-chart-column-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    cursor: pointer;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 6px 4px;
    border-radius: 12px;
    border: 1px solid transparent;
}
.clases-chart-column-item:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
    box-shadow: 2px 4px 10px rgba(163, 177, 198, 0.25) !important;
}
[data-theme="dark"] .clases-chart-column-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.4) !important;
}
.clases-chart-column-item.active-filter-item {
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    transform: none !important;
}
[data-theme="dark"] .clases-chart-column-item.active-filter-item {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    transform: none !important;
}
.clases-chart-column-item .column-value {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
    opacity: 0.9;
}
.clases-chart-column-item .column-track {
    width: 14px;
    flex: 1;
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 10px !important;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.1) !important;
}
[data-theme="dark"] .clases-chart-column-item .column-track {
    background: rgba(10, 20, 50, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.5) !important;
}
.clases-chart-column-item .column-fill {
    width: 100%;
    border-radius: 10px;
    background: linear-gradient(180deg, #c084fc 0%, #8b5cf6 100%) !important;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.35) !important;
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.clases-chart-column-item .column-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.clases-chart-column-item .column-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.clases-chart-column-item:hover .column-label,
.clases-chart-column-item.active-filter-item .column-label {
    color: #8b5cf6 !important;
}
[data-theme="dark"] .clases-chart-column-item:hover .column-label,
[data-theme="dark"] .clases-chart-column-item.active-filter-item .column-label {
    color: #c084fc !important;
}

/* 2. Gráfico de Sedes (Tarjetas Radiales SVG) */
.clases-radial-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}
.clases-radial-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px;
    border-radius: 16px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex: 1;
}
.clases-radial-card:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
    box-shadow: 2px 4px 10px rgba(163, 177, 198, 0.25) !important;
}
[data-theme="dark"] .clases-radial-card:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.4) !important;
}
.clases-radial-card.active-filter-item {
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    transform: none !important;
}
[data-theme="dark"] .clases-radial-card.active-filter-item {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    transform: none !important;
}
.clases-radial-card .radial-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 0.5px;
}
.radial-svg-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.radial-center-text {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
}
.clases-radial-card .radial-percentage {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* 3. Estilos de Leaderboards (Profesores y Alumnos) */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    flex-shrink: 0;
}
[data-theme="dark"] .rank-badge {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}
.rank-gold, .rank-silver, .rank-bronze {
    background: transparent !important;
    font-size: 1.15rem !important;
    width: 22px;
    height: 22px;
}
.avatar-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff !important;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 4. Pastillas de Filtros Activos (Pills) */
.active-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: color-mix(in srgb, var(--table-accent-color) 8%, rgba(255, 255, 255, 0.95));
    border: 1px solid color-mix(in srgb, var(--table-accent-color) 30%, transparent);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--table-accent-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    animation: filterPillFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
[data-theme="dark"] .active-filter-pill {
    background: color-mix(in srgb, var(--table-accent-color) 15%, rgba(15, 23, 42, 0.8));
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.active-filter-pill span {
    white-space: nowrap;
}
.filter-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.filter-remove-btn:hover {
    opacity: 1;
}
.filter-remove-btn svg {
    width: 12px;
    height: 12px;
}
@keyframes filterPillFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(2px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- GRÁFICO CÍRCULOS STAT-BADGE: Días de la Semana --- */
.day-stat-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 6px;
    padding: 6px 0 2px;
}

.day-stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex: 1;
    cursor: pointer;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.day-stat-badge:hover {
    transform: translateY(-4px) scale(1.06);
}

.day-stat-badge--empty {
    opacity: 0.45;
}

.day-stat-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Brillo interno superior (glassmorphism) */
.day-stat-circle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50% 50% 0 0;
    pointer-events: none;
}

.day-stat-number {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.day-stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.day-stat-badge--active .day-stat-label {
    color: #8b5cf6 !important;
}

.day-stat-badge--active .day-stat-circle {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 14px 3px rgba(139, 92, 246, 0.45); }
    50%       { box-shadow: 0 0 24px 8px rgba(139, 92, 246, 0.7); }
}

/* Corona del día top */
.day-badge-crown {
    position: absolute;
    top: -14px;
    font-size: 0.85rem;
    animation: crownBounce 2.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

@keyframes crownBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-3px); }
}

/* Dark mode adjustments */
[data-theme="dark"] .day-stat-badge--empty {
    opacity: 0.3;
}
[data-theme="dark"] .day-stat-circle::after {
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 100%);
}
[data-theme="dark"] .day-stat-badge--active .day-stat-label {
    color: #c084fc !important;
}
[data-theme="dark"] .day-stat-badge--active .day-stat-circle {
    animation: badgePulseDark 2s ease-in-out infinite;
}

@keyframes badgePulseDark {
    0%, 100% { box-shadow: 0 0 16px 4px rgba(192, 132, 252, 0.4); }
    50%       { box-shadow: 0 0 28px 10px rgba(192, 132, 252, 0.65); }
}

/* ═══════════════════════════════════════════════════════════════════════
   SISTEMA NEUMÓRFICO UNIFICADO: Clases Privadas – todos los gráficos
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Anillos SVG: fila compartida (días y sedes) ── */
.neu-ring-row {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 4px;
    padding: 10px 0 4px;
    flex-wrap: nowrap;
}
.neu-ring-row--sedes {
    justify-content: space-evenly;
    gap: 12px;
}

.neu-ring-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.25s ease;
    border-radius: 12px;
    padding: 6px 4px 4px;
}
.neu-ring-item:hover {
    transform: translateY(-5px) scale(1.07);
    filter: brightness(1.05);
}
.neu-ring-item--active {
    transform: translateY(-4px) scale(1.05);
}
.neu-ring-item--sede {
    padding: 8px 6px 6px;
    background: var(--card-bg, rgba(255,255,255,0.05));
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07),
                inset 0 1px 2px rgba(255,255,255,0.5);
}
[data-theme="dark"] .neu-ring-item--sede {
    box-shadow: 0 2px 12px rgba(0,0,0,0.25),
                inset 0 1px 1px rgba(255,255,255,0.06);
}
.neu-ring-item--active.neu-ring-item--sede {
    box-shadow: 0 4px 18px rgba(0,0,0,0.14),
                inset 0 1px 2px rgba(255,255,255,0.5);
}

.neu-ring-wrap {
    transition: filter 0.3s ease;
}
.neu-ring-item--active .neu-ring-wrap {
    filter: drop-shadow(0 0 8px rgba(124,58,237,0.4));
}

.neu-ring-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.neu-ring-crown {
    position: absolute;
    top: -10px;
    font-size: 0.8rem;
    animation: crownBounce 2.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
    pointer-events: none;
}

/* ── Barras neumórficas (Horas, Pelotas, Edades) ── */
.neu-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    margin-bottom: 4px;
    -webkit-tap-highlight-color: transparent;
}
.neu-bar-row:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
    box-shadow: 2px 4px 10px rgba(163, 177, 198, 0.25) !important;
}
.neu-bar-row--active {
    background: rgba(43, 67, 241, 0.05) !important;
    border: 1px solid rgba(43, 67, 241, 0.22) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.12),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 10px rgba(43, 67, 241, 0.05) !important;
    transform: none !important;
}
.neu-bar-row--active .neu-bar-label {
    color: var(--color-primary, #2b43f1) !important;
    font-weight: 800 !important;
}
.neu-bar-row--active .neu-bar-value {
    color: var(--text-main, #0f172a) !important;
    font-weight: 800 !important;
}
.neu-bar-row--active .neu-bar-fill {
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6) !important;
}
[data-theme="dark"] .neu-bar-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .neu-bar-row--active {
    background: rgba(10, 20, 50, 0.55) !important;
    border: 1px solid rgba(92, 115, 242, 0.3) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.2),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    transform: none !important;
}
[data-theme="dark"] .neu-bar-row--active .neu-bar-label {
    color: #22d3ee !important;
}
[data-theme="dark"] .neu-bar-row--active .neu-bar-value {
    color: var(--text-main, #f8fafc) !important;
}

.neu-bar-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 65px;
    flex-shrink: 0;
}
.neu-bar-track {
    flex: 1;
    height: 14px;
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    border-radius: 99px;
    overflow: hidden;
    padding: 3px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
}
[data-theme="dark"] .neu-bar-track {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
}
.neu-bar-track--sm {
    height: 11px;
    min-width: 120px;
    max-width: 180px;
    padding: 2.5px;
}
.neu-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #8b5cf6 0%, #c084fc 100%);
    box-shadow: 0 0 6px rgba(139,92,246,0.25);
    transition: width 0.6s cubic-bezier(0.16,1,0.3,1);
}
.neu-bar-fill--cyan {
    background: linear-gradient(90deg, #06b6d4 0%, #818cf8 100%);
    box-shadow: 0 0 6px rgba(6,182,212,0.22);
}
.neu-bar-row--active .neu-bar-fill--cyan {
    box-shadow: 0 0 8px rgba(6,182,212,0.4);
}
.neu-bar-value {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 24px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Leaderboard (Profesores / Alumnos) ── */
.neu-leader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 4px;
}
.neu-leader-row:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
    box-shadow: 2px 4px 10px rgba(163, 177, 198, 0.25) !important;
}
.neu-leader-row--active {
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    transform: none !important;
}
[data-theme="dark"] .neu-leader-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .neu-leader-row--active {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    transform: none !important;
}

.neu-leader-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.neu-leader-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.neu-medal {
    font-size: 1rem;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}
.neu-rank-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.neu-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.62rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.neu-leader-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 110px;
    flex-shrink: 0;
}
.neu-leader-count {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 24px;
    text-align: right;
    flex-shrink: 0;
}

/* Empty state */
.neu-empty {
    text-align: center;
    padding: 16px;
    opacity: 0.45;
    font-style: italic;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   BARRAS VERTICALES NEUMÓRFICAS – Días de la Semana y Sedes
   Color unificado dashboard: cyan #06B6D4
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Contenedor principal de la chart de barras verticales ── */
.neu-vbar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 4px;
    padding: 16px 4px 6px;
    width: 100%;
    box-sizing: border-box;
}
.neu-vbar-chart--sedes {
    justify-content: space-evenly;
    gap: clamp(8px, 3vw, 20px);
    padding: 12px 8px 8px;
}
.neu-vbar-chart--multi {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: clamp(2px, 1.2vw, 8px);
    width: 100%;
    padding: 12px 2px 6px;
    box-sizing: border-box;
}
.neu-vbar-chart--multi .neu-vbar-group {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 1px 4px;
    overflow: hidden;
}
.neu-vbar-chart--multi .neu-vbar-track {
    width: clamp(16px, 4.2vw, 28px);
    height: clamp(90px, 18vw, 130px);
    margin: 0 auto;
}
.neu-vbar-chart--multi .neu-vbar-label {
    font-size: clamp(0.50rem, 1.6vw, 0.62rem);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    letter-spacing: -0.2px;
}
.neu-vbar-chart--multi .neu-vbar-value {
    font-size: clamp(0.68rem, 2vw, 0.75rem);
}

.short-label { display: none; }
@media (max-width: 480px) {
    .full-label { display: none; }
    .short-label { display: inline; }
}

/* ── Grupo individual por columna (día o sede) ── */
.neu-vbar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    cursor: pointer;
    position: relative;
    padding: 8px 4px 6px;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}
.neu-vbar-group:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
    box-shadow: 2px 4px 10px rgba(163, 177, 198, 0.25) !important;
}
.neu-vbar-group--active {
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.15) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    transform: none !important;
}

[data-theme="dark"] .neu-vbar-group:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .neu-vbar-group--active {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    transform: none !important;
}

/* ── Track (fondo hundido estilo neumórfico) ── */
.neu-vbar-track {
    width: 28px;
    height: 135px;
    border-radius: 99px;
    /* Efecto hundimiento neumórfico: sombra inset */
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: 3px;
    position: relative;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
}
[data-theme="dark"] .neu-vbar-track {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
}

/* Track más alto para sedes y días de la semana */
.neu-vbar-track--tall {
    height: 135px;
    width: 32px;
}

/* Track más estrecho para horas */
.neu-vbar-track--hours {
    width: 22px;
    height: 90px;
}

/* ── Fill (la barra que sube, gradiente cyan) ── */
.neu-vbar-fill {
    width: 100%;
    border-radius: 99px;
    background: linear-gradient(180deg, #22d3ee 0%, #06b6d4 100%);
    box-shadow: 0 -2px 8px rgba(6,182,212,0.25);
    transition: height 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 0;
    flex-shrink: 0;
}
.neu-vbar-group--active .neu-vbar-fill {
    box-shadow: 0 -4px 12px rgba(6,182,212,0.45);
    animation: vbarPulse 2.2s ease-in-out infinite;
}
@keyframes vbarPulse {
    0%, 100% { box-shadow: 0 -3px 10px rgba(6,182,212,0.35); }
    50%       { box-shadow: 0 -5px 16px rgba(6, 182, 212, 0.60); }
}

/* ── Valor numérico encima de la barra ── */
.neu-vbar-value {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    transition: color 0.25s ease;
    min-height: 14px;
}

/* ── Etiqueta del día (abreviatura) ── */
.neu-vbar-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    text-transform: uppercase;
    transition: color 0.25s ease;
}

/* ── Porcentaje (solo sedes) ── */
.neu-vbar-pct {
    font-family: 'Space Mono', monospace;
    font-size: 0.60rem;
    font-weight: 700;
    color: #06b6d4;
    opacity: 0.8;
    transition: color 0.25s ease;
}

/* ── Dark mode adjustments ── */
[data-theme="dark"] .neu-vbar-group:hover {
    filter: brightness(1.12);
}
[data-theme="dark"] .neu-vbar-value {
    color: var(--text-main);
}
[data-theme="dark"] .neu-vbar-pct {
    color: #22d3ee;
}
[data-theme="dark"] .neu-vbar-group--active .neu-vbar-label {
    color: #22d3ee !important;
}

/* ── Gráfica de Edades compacta para 15+ barras verticales ── */
.neu-vbar-chart--edades {
    gap: 3px;
    padding: 12px 2px 4px;
    justify-content: space-between;
    width: 100%;
}
.neu-vbar-group--edades {
    padding: 4px 1px 4px;
    gap: 3px;
    border-radius: 8px;
    min-width: 0;
    flex: 1;
}
.neu-vbar-track--edades {
    width: 15px;
    height: 125px;
    padding: 2px;
    border-radius: 99px;
}
.neu-vbar-group--edades .neu-vbar-value {
    font-size: 0.68rem;
    min-height: 12px;
    letter-spacing: -0.3px;
}
.neu-vbar-group--edades .neu-vbar-label {
    font-size: 0.58rem;
    letter-spacing: -0.3px;
    white-space: nowrap;
}
@media (max-width: 900px) {
    .neu-vbar-track--edades {
        width: 12px;
        height: 95px;
    }
    .neu-vbar-group--edades .neu-vbar-label {
        font-size: 0.52rem;
    }
}

/* ── Responsive: hacer tracks un poco más delgados en pantallas pequeñas ── */
@media (max-width: 480px) {
    .neu-vbar-track {
        width: 22px;
        height: 72px;
    }
    .neu-vbar-track--tall {
        width: 28px;
        height: 88px;
    }
    .neu-vbar-track--hours {
        width: 16px;
        height: 72px;
    }
    .neu-vbar-chart { gap: 2px; }
    .neu-bar-track--sm {
        min-width: 80px;
        max-width: 120px;
    }
}

/* ── Reloj Analógico e Interactivo de Distribución Horaria ── */
.neu-clock-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    width: 100%;
}
.neu-clock-svg {
    width: 220px;
    height: 220px;
    overflow: visible;
}
.neu-clock-ring {
    fill: none;
    stroke: rgba(0, 0, 0, 0.06);
    stroke-dasharray: 2, 4;
    stroke-width: 1;
}
[data-theme="dark"] .neu-clock-ring {
    stroke: rgba(255, 255, 255, 0.08);
}
.neu-clock-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    fill: var(--text-muted);
    text-anchor: middle;
    dominant-baseline: middle;
    opacity: 0.65;
    transition: opacity 0.25s ease, fill 0.25s ease, font-weight 0.25s ease;
}
.neu-clock-num--active {
    opacity: 1;
    fill: #8b5cf6;
    font-weight: 800;
}
[data-theme="dark"] .neu-clock-num--active {
    fill: #a78bfa;
}
.neu-clock-hand {
    stroke-linecap: round;
    stroke-width: 2.5;
    opacity: 0.55;
    transition: opacity 0.25s ease, stroke-width 0.25s ease;
    cursor: pointer;
}
.neu-clock-hand:hover,
.neu-clock-hand--active {
    stroke-width: 4;
    opacity: 1;
}
.neu-clock-bubble {
    stroke: var(--panel-bg);
    stroke-width: 1.5;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease, r 0.25s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.neu-clock-bubble:hover {
    transform: scale(1.25);
    filter: brightness(1.15) drop-shadow(0 4px 8px rgba(139,92,246,0.35));
}
.neu-clock-bubble--active {
    stroke: #fff;
    stroke-width: 2.2;
    filter: brightness(1.25) drop-shadow(0 0 10px var(--glow-color, rgba(139,92,246,0.5)));
}
.neu-clock-center-bg {
    fill: var(--panel-bg);
    stroke: var(--panel-border);
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.05));
    transition: fill 0.25s ease, stroke 0.25s ease;
}
.neu-clock-center-time {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    fill: var(--text-main);
    text-anchor: middle;
    dominant-baseline: middle;
    transition: fill 0.25s ease;
}
.neu-clock-center-count {
    font-family: 'Space Mono', monospace;
    font-size: 0.58rem;
    font-weight: 700;
    fill: var(--text-muted);
    text-anchor: middle;
    dominant-baseline: middle;
    transition: fill 0.25s ease;
}

/* Month Timeline Style (Horizontal Transparent Selector) */
.clases-timeline-horizontal {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin: 5px 0 20px 0;
    padding: 6px 4px;
    gap: 4px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Hide scrollbars but keep horizontal scroll if screen is too small */
.clases-timeline-horizontal::-webkit-scrollbar {
    height: 0px;
    width: 0px;
    display: none;
}

/* Dropdown móvil de meses (oculto por defecto, visible en móvil/tablet) */
.clases-mobile-dropdowns-bar {
    display: none;
}

/* --- Clases Privadas Table Cells Matching Search Bar Style --- */

/* 1. Light Mode */
#clases-privadas-table input[type="text"],
#clases-privadas-table .otc-td-trigger {
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1px solid rgba(43, 67, 241, 0.12) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
}

#clases-privadas-table input[type="text"]:focus,
#clases-privadas-table .otc-td-trigger:hover,
#clases-privadas-table .otc-td.open .otc-td-trigger {
    background: rgba(43, 67, 241, 0.07) !important;
    border-color: rgba(43, 67, 241, 0.35) !important;
    box-shadow: 
        inset 3px 3px 8px rgba(0, 0, 0, 0.12),
        inset -3px -3px 8px rgba(255, 255, 255, 0.95),
        inset 0 0 12px rgba(43, 67, 241, 0.08) !important;
}

/* 2. Dark Mode */
[data-theme="dark"] #clases-privadas-table input[type="text"],
[data-theme="dark"] #clases-privadas-table .otc-td-trigger {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 1px solid rgba(92, 115, 242, 0.18) !important;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -5px -5px 10px rgba(92, 115, 242, 0.15),
        inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] #clases-privadas-table input[type="text"]:focus,
[data-theme="dark"] #clases-privadas-table .otc-td-trigger:hover,
[data-theme="dark"] #clases-privadas-table .otc-td.open .otc-td-trigger {
    background: rgba(10, 20, 50, 0.65) !important;
    border-color: rgba(92, 115, 242, 0.40) !important;
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.95),
        inset -5px -5px 12px rgba(92, 115, 242, 0.25),
        inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
}

/* Table Spacer Rows */
.otc-data-table tbody tr.empty-spacer-row td,
.otc-data-table tbody tr.empty-spacer-row:hover td {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
    height: 48px !important;
}

/* ==========================================================================
   SOLICITUDES DE CAMBIO DE CLASE (NOTIFICACIONES & BANDEJA DE ENTRADA)
   ========================================================================== */

.notifications-btn {
    position: absolute !important;
    top: 22px !important;
    right: 162px !important;
    left: auto !important;
    z-index: 9999 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #94a3b8 !important;
    transform: scale(1) translateY(0) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.notifications-btn:active {
    transform: scale(0.95) !important;
}

[data-theme="dark"] .notifications-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #475569 !important;
    transform: scale(1) translateY(0) !important;
}

.notifications-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    border: 1.5px solid #ffffff;
}

[data-theme="dark"] .notifications-badge {
    border-color: #0b0f19;
}

.notifications-floating-card {
    position: fixed;
    top: 70px !important;
    right: 152px;
    width: 380px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 245, 255, 0.65) 100%) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: none !important;
    border-radius: 20px;
    padding: 20px;
    z-index: 99999;
    box-shadow: 
        16px 24px 48px rgba(163, 177, 198, 0.6),
        -16px -24px 48px rgba(255, 255, 255, 0.8),
        inset 2px 2px 4px rgba(255, 255, 255, 1),
        inset -2px -2px 4px rgba(163, 177, 198, 0.25) !important;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
}

.notifications-floating-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

[data-theme="dark"] .notifications-floating-card {
    background: linear-gradient(145deg, rgba(35, 45, 65, 0.65) 0%, rgba(11, 15, 25, 0.95) 100%) !important;
    box-shadow: 
        16px 24px 48px rgba(0, 0, 0, 0.9),
        -12px -16px 36px rgba(255, 255, 255, 0.05),
        inset 2px 2px 4px rgba(255, 255, 255, 0.15),
        inset -2px -2px 4px rgba(0, 0, 0, 0.5) !important;
}

.notifications-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(163, 177, 198, 0.2);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

[data-theme="dark"] .notifications-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.notifications-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.notifications-list {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.notification-item {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(163, 177, 198, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
    text-align: left;
}

[data-theme="dark"] .notification-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.notification-badge-type {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.notification-badge-type.editar {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.notification-badge-type.eliminar {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.notification-profesor {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.notification-details {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notification-motivo {
    font-size: 0.8rem;
    background: rgba(43, 67, 241, 0.05);
    padding: 6px 8px;
    border-radius: 6px;
    font-style: italic;
    color: var(--text-main);
}

[data-theme="dark"] .notification-motivo {
    background: rgba(255, 255, 255, 0.05);
}

.notification-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

.btn-notif-action {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-notif-action.approve {
    background: var(--color-electric-blue, #2b43f1) !important;
    color: #ffffff !important;
}

.btn-notif-action.reject {
    background: #ef4444 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-notif-action.reject {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.btn-notif-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    color: #ffffff !important;
}

.btn-request-change {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
}

.btn-request-change:hover {
    color: var(--color-electric-blue, #2b43f1);
    background: rgba(43, 67, 241, 0.08);
    transform: scale(1.1);
}

.btn-notif-action.read {
    background: rgba(43, 67, 241, 0.08) !important;
    color: var(--color-electric-blue, #2b43f1) !important;
    font-size: 0.85rem !important;
    line-height: 1 !important;
    padding: 6px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

[data-theme="dark"] .btn-notif-action.read {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* Animación de destello para fila seleccionada */
@keyframes rowGlow {
    0% { background-color: rgba(43, 67, 241, 0.45); }
    50% { background-color: rgba(43, 67, 241, 0.25); }
    100% { background-color: transparent; }
}
.row-highlight-glow td {
    animation: rowGlow 2.5s ease-out !important;
}

/* Transiciones y desvanecimiento para items de notificación */
.notification-item {
    transition: all 0.4s ease, opacity 0.4s ease, max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
    overflow: hidden;
    max-height: 600px;
}
.notification-item.notif-fading {
    opacity: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border: none !important;
}
.undo-notif-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(43, 67, 241, 0.05);
    border: 1px dashed rgba(43, 67, 241, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: left;
}
.undo-notif-link {
    color: var(--color-electric-blue, #2b43f1);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}
.undo-notif-link:hover {
    filter: brightness(0.9);
}

/* Botón de cerrar de notificaciones con el estilo glassmorphic de la página */
.btn-close-notif-card {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 16px;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.btn-close-notif-card:hover {
    background: #ef4444 !important;
    color: white !important;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .btn-close-notif-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .btn-close-notif-card:hover {
    background: #ef4444 !important;
    color: white !important;
}

.otc-sede-pill {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #5b6e94 !important;
    font-family: 'Outfit', sans-serif !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        2px 3px 6px rgba(163, 177, 198, 0.4),
        -2px -2px 6px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 0.9),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    text-transform: uppercase;
    user-select: none;
}

[data-theme="dark"] .otc-sede-pill {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%) !important;
    color: #94a3b8 !important;
    box-shadow:
        2px 3px 6px rgba(0, 0, 0, 0.4),
        -2px -2px 6px rgba(255, 255, 255, 0.05),
        inset 1px 1px 2px rgba(255, 255, 255, 0.05),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* ==========================================================================
   UNIFIED DEBOSSED MODULE TITLE (TOP CENTER)
   ========================================================================== */
.otc-unified-module-title {
    position: absolute !important;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    z-index: 9990 !important; /* Elevado para asegurar que no quede cubierto por los lienzos de las vistas */
    pointer-events: none; /* Pass-through clicks */
    user-select: none;
    transition: color 0.2s ease, opacity 0.2s ease;
    
    /* Neumorphic/Debossed Sunken Effect - Light Theme (Text-only, no capsule) */
    color: #e2e8f0;
    text-shadow: 
        -1px -1px 1px rgba(0, 0, 0, 0.15),
        1px 1px 1px rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .otc-unified-module-title {
    /* Letras Enterradas - Tema Oscuro (Efecto Bajorrelieve con Contraste Optimizado) */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    backdrop-filter: none !important;
    width: max-content !important;
    white-space: nowrap !important;
    
    /* Cuerpo de la letra en gris pizarra medio (ligeramente más claro que el fondo #1a1c24) 
       para permitir que los ojos distingan las letras con facilidad y las sombras resalten */
    color: #2b2d38 !important;
    -webkit-text-fill-color: initial !important;
    -webkit-text-stroke: none !important; /* QUITADO: Quita cualquier línea o contorno interno */
    
    /* Sombras y biseles calibrados para el tema oscuro (Blanco y Negro con contraste):
       - Sombra de cavidad arriba-izquierda (negra al 95% para marcar profundidad)
       - Bisel de luz abajo-derecha (blanca al 22% para reflejo de arista)
    */
    text-shadow: 
        -1.5px -1.5px 2px rgba(0, 0, 0, 0.95),
        1.5px 1.5px 1px rgba(255, 255, 255, 0.22) !important;
}

@media (max-width: 768px) {
    .otc-unified-module-title {
        font-size: 1.4rem;
        top: 25px;
        letter-spacing: 0.15em;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}

/* Sizing adjustment for the longer logged-out title positioned below the logo */
body.is-logged-out .otc-unified-module-title {
    font-size: 1.3rem !important;
    letter-spacing: 0.22em !important;
    width: 90% !important;
    text-align: center !important;
    position: fixed !important;
    top: 155px !important;
    z-index: 99999 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

[data-theme="dark"] body.is-logged-out .otc-unified-module-title {
    color: #2b2d38 !important;
    text-shadow: 
        -1.5px -1.5px 2px rgba(0, 0, 0, 0.95),
        1.5px 1.5px 1px rgba(255, 255, 255, 0.22) !important;
}

@media (max-width: 768px) {
    .otc-login-bg-logo {
        width: 300px !important;
        top: 2.5vh !important;
    }
    body.is-logged-out .otc-unified-module-title {
        font-size: 0.85rem !important;
        letter-spacing: 0.12em !important;
        top: 110px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}

/* Custom Checkbox for Login Page */
.otc-login-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 6px !important;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    outline: none;
    flex-shrink: 0;
}

.otc-login-checkbox:checked {
    background: var(--color-electric-blue) !important;
    border-color: var(--color-electric-blue) !important;
}

.otc-login-checkbox:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 13px;
    font-weight: 900;
}

[data-theme="dark"] .otc-login-checkbox {
    background: rgba(10, 20, 50, 0.45) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .otc-login-checkbox:checked {
    background: var(--table-accent-color) !important;
    border-color: var(--table-accent-color) !important;
}

/* ==========================================================================
   OTC HIGH-FIDELITY MOBILE OVERRIDES (v1.3.1)
   ========================================================================== */
@media (max-width: 768px), (max-height: 600px) and (max-width: 1024px) {
    /* 1. FIXED HEADER BUTTONS & TITLE ALIGNMENT */
    .hamburger-btn {
        position: absolute !important;
        top: 19px !important;
        left: 16px !important; /* Unified standard mobile margin */
        width: 26px !important; /* Thinner header button */
        height: 26px !important;
        z-index: 10010 !important;
        padding: 0 !important;
    }

    .profile-btn {
        position: absolute !important;
        top: 19px !important;
        right: 16px !important;
        width: 58px !important; /* Sleek compact mobile logo width */
        height: 26px !important;
        z-index: 9999 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .profile-otc-logo {
        width: 58px !important;
        height: 16px !important; /* Elegant, proportionate mobile logo height */
        object-fit: contain !important;
        transform: none !important;
    }

    .theme-toggle-btn {
        position: absolute !important;
        top: 19px !important;
        right: 82px !important; /* Spaced cleanly next to the compact logo */
        left: auto !important;
        width: 26px !important;
        height: 26px !important;
        z-index: 9999 !important;
        padding: 0 !important;
    }
    
    .theme-toggle-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .notifications-btn {
        position: absolute !important;
        top: 19px !important;
        right: 116px !important; /* Spaced cleanly without colliding with theme toggle */
        left: auto !important;
        width: 26px !important;
        height: 26px !important;
        z-index: 9999 !important;
        padding: 0 !important;
    }
    
    .notifications-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .app-view {
        padding-top: 96px !important;
    }

    .otc-unified-module-title {
        position: absolute !important;
        top: 48px !important; /* Positioned cleanly below the top header buttons */
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 1.15rem !important;
        letter-spacing: 0.1em !important;
        max-width: none !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
        overflow: visible !important;
        z-index: 9990 !important;
    }


    /* 2. FLOATING DROPDOWN CARDS */
    .notifications-floating-card,
    .profile-floating-card {
        width: 92% !important;
        max-width: 340px !important;
        right: 10px !important;
        top: 60px !important;
        z-index: 210000 !important;
    }

    /* 3. CLOSE BUTTONS FOR ALL MODALS */
    .btn-close-focus,
    #spotlight-close-btn,
    #edit-profile-modal-close,
    #auth-modal-close,
    #close-add-user-modal,
    #close-add-clase-modal,
    #close-solicitar-modal {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 20px !important;
        z-index: 999999 !important;
        pointer-events: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 4. DASHBOARD CONTROLS POSITIONING (NO CONFLICT SCROLLS) */
    .dashboard-metrics-container {
        position: absolute !important;
        top: 86px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 91% !important; /* Unified standard mobile margin */
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 5px 7px !important;
        z-index: 100 !important;
        padding: 0 !important;
    }

    .dashboard-metrics-container::-webkit-scrollbar {
        display: none !important;
    }

    /* Small neomorphic sunken panels (hundimientos como estaban pero más pequeños) */
    .dashboard-metrics-container > div {
        flex-shrink: 1 !important;
        flex-grow: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 4px 10px !important; /* Compact padding but nice capsule look */
        font-family: 'Outfit', sans-serif !important;
        font-size: 0.62rem !important; /* Smaller letters */
        border-radius: 20px !important; /* Rounded capsule shape like desktop */
        box-sizing: border-box !important;
        background: rgba(43, 67, 241, 0.05) !important;
        border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
        box-shadow: 
            inset 3px 3px 6px rgba(0, 0, 0, 0.12),
            inset -3px -3px 6px rgba(255, 255, 255, 0.95),
            inset 0 0 8px rgba(43, 67, 241, 0.05) !important;
        color: #5b6e94 !important;
    }

    [data-theme="dark"] .dashboard-metrics-container > div {
        background: rgba(10, 20, 50, 0.55) !important; /* Cobalto sapphire inset glass matching search bar */
        border: 1.5px solid rgba(92, 115, 242, 0.25) !important;
        color: #ffffff !important;
        box-shadow:
            inset 5px 5px 10px rgba(0, 0, 0, 0.90), /* Intensified inset dark shadow */
            inset -5px -5px 12px rgba(92, 115, 242, 0.18), /* Sapphire backlight */
            inset -1.5px -1.5px 0px rgba(255, 255, 255, 0.15) !important;
    }

    /* Restore tiny pulse dots inside the capsules */
    .dashboard-metrics-container .pulse-dot,
    .dashboard-metrics-container .pulse-dot-purple,
    .dashboard-metrics-container .pulse-dot-green,
    .dashboard-metrics-container .pulse-dot-cyan,
    .dashboard-metrics-container .pulse-dot-orange {
        display: inline-block !important;
        width: 5px !important;
        height: 5px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }

    .dashboard-metrics-container > div strong {
        font-weight: 800 !important;
        margin-left: 2px !important;
        font-size: 0.62rem !important; /* Uniform font size with letters */
    }

    .dashboard-left-selector,
    .dashboard-right-selector {
        display: none !important;
    }

    .canchas-mobile-controls-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: absolute !important;
        left: 16px !important;
        right: 16px !important;
        top: 150px !important;
        width: calc(100% - 32px) !important;
        z-index: 1000 !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }

    .canchas-mobile-left-group {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    .canchas-mobile-right-group {
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }

    .canchas-mobile-controls-bar .otc-custom-mobile-dropdown {
        position: relative !important;
        flex: 0 0 auto !important;
        width: auto !important;
    }

    #mobile-canchas-hour-dropdown-container {
        min-width: 105px !important;
    }

    #mobile-canchas-sede-dropdown-container {
        min-width: 80px !important;
    }

    /* Estilo idéntico a los selectores de la Línea de Tiempo (Píldoras 38px) */
    .canchas-mobile-controls-bar .otc-custom-dropdown-btn {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        height: 38px !important;
        padding: 0 32px 0 16px !important;
        font-family: 'Outfit', sans-serif !important;
        font-size: 0.88rem !important;
        font-weight: 500 !important;
        border-radius: 50px !important;
        background-color: rgba(43, 67, 241, 0.04) !important;
        border: 1px solid rgba(43, 67, 241, 0.12) !important;
        color: var(--text-main) !important;
        box-shadow: 
            inset 3px 3px 6px rgba(0, 0, 0, 0.08),
            inset -3px -3px 6px rgba(255, 255, 255, 0.9),
            inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232B43F1' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 14px center !important;
        background-size: 12px !important;
        cursor: pointer !important;
        text-align: left !important;
        box-sizing: border-box !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        user-select: none !important;
    }

    .canchas-mobile-controls-bar .otc-custom-dropdown-btn:hover,
    .canchas-mobile-controls-bar .otc-custom-dropdown-btn:focus {
        background-color: rgba(43, 67, 241, 0.07) !important;
        border-color: rgba(43, 67, 241, 0.35) !important;
        box-shadow: 
            inset 3px 3px 8px rgba(0, 0, 0, 0.12),
            inset -3px -3px 8px rgba(255, 255, 255, 0.95),
            inset 0 0 12px rgba(43, 67, 241, 0.08) !important;
        outline: none !important;
    }

    /* Modo Oscuro Canchas */
    [data-theme="dark"] .canchas-mobile-controls-bar .otc-custom-dropdown-btn {
        background-color: rgba(10, 20, 50, 0.45) !important;
        border: 1px solid rgba(92, 115, 242, 0.18) !important;
        box-shadow:
            inset 4px 4px 8px rgba(0, 0, 0, 0.85),
            inset -5px -5px 10px rgba(92, 115, 242, 0.15),
            inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
        color: var(--text-main) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2392a3fb' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
    }

    [data-theme="dark"] .canchas-mobile-controls-bar .otc-custom-dropdown-btn:hover,
    [data-theme="dark"] .canchas-mobile-controls-bar .otc-custom-dropdown-btn:focus {
        background-color: rgba(10, 20, 50, 0.65) !important;
        border-color: rgba(92, 115, 242, 0.40) !important;
        box-shadow:
            inset 4px 4px 10px rgba(0, 0, 0, 0.95),
            inset -5px -5px 12px rgba(92, 115, 242, 0.25),
            inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
    }

    .otc-custom-calendar-btn {
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(43, 67, 241, 0.04) !important;
        border: 1px solid rgba(43, 67, 241, 0.12) !important;
        color: #2b43f1 !important;
        box-shadow: 
            inset 3px 3px 6px rgba(0, 0, 0, 0.08),
            inset -3px -3px 6px rgba(255, 255, 255, 0.9),
            inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
        cursor: pointer !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .otc-custom-calendar-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .otc-custom-calendar-btn:hover,
    .otc-custom-calendar-btn:active {
        background: rgba(43, 67, 241, 0.08) !important;
        border-color: rgba(43, 67, 241, 0.3) !important;
        transform: scale(0.96) !important;
    }

    [data-theme="dark"] .otc-custom-calendar-btn {
        background: rgba(10, 20, 50, 0.45) !important;
        border: 1px solid rgba(92, 115, 242, 0.18) !important;
        color: #92a3fb !important;
        box-shadow:
            inset 4px 4px 8px rgba(0, 0, 0, 0.85),
            inset -5px -5px 10px rgba(92, 115, 242, 0.15),
            inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    }

    [data-theme="dark"] .otc-custom-calendar-btn:hover,
    [data-theme="dark"] .otc-custom-calendar-btn:active {
        background: rgba(10, 20, 50, 0.65) !important;
        border-color: rgba(92, 115, 242, 0.40) !important;
    }

    .dashboard-left-selector .sede-buttons-group {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 10px !important;
        flex-shrink: 0 !important;
        width: auto !important;
    }

    .dashboard-left-selector .btn-sede {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.55rem !important;
        font-weight: 800 !important;
        font-family: 'Outfit', sans-serif !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .dashboard-left-selector .dashboard-hour-selector {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        overflow: visible !important; /* Allow hour button shadows to render completely without clipping */
        justify-content: center !important; /* Centered hour buttons */
        width: auto !important;
        gap: 8px !important;
        margin-top: 10px !important;
        padding: 0 !important;
    }


    .dashboard-left-selector .dashboard-hour-selector::-webkit-scrollbar {
        display: none !important;
    }

    .btn-hour-select {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important; /* Stack time and ampm vertically */
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        padding: 0 !important;
        font-family: 'Outfit', sans-serif !important;
    }

    .btn-hour-select .hour-time {
        font-size: 0.55rem !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .btn-hour-select .hour-ampm {
        font-size: 0.55rem !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        text-transform: uppercase !important;
        margin: 0 !important;
    }

    /* Style active selector buttons as floating (suspendido) neumorphic elements */
    .dashboard-left-selector .btn-sede.active,
    .btn-hour-select.active,
    .calendar-days-vertical .btn-day.active {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.65) 100%) !important;
        border: none !important;
        border-radius: 8px !important; /* Force matching rounded corners for all thinner active buttons */
        box-shadow: 
            2px 3px 8px rgba(163, 177, 198, 0.35),
            -2px -2px 8px rgba(255, 255, 255, 0.9),
            inset 1px 1px 1px rgba(255, 255, 255, 1),
            inset -1px -1px 1px rgba(163, 177, 198, 0.1) !important;
        transform: translateY(-1px) !important;
        color: #5b6e94 !important;
        font-weight: 800 !important;
    }

    [data-theme="dark"] .dashboard-left-selector .btn-sede.active,
    [data-theme="dark"] .btn-hour-select.active,
    [data-theme="dark"] .calendar-days-vertical .btn-day.active {
        background: linear-gradient(145deg, rgba(50, 65, 90, 0.8) 0%, rgba(20, 26, 40, 0.98) 100%) !important;
        border: none !important;
        border-radius: 8px !important; /* Force matching rounded corners for all thinner active buttons */
        box-shadow: 
            2px 3px 8px rgba(0, 0, 0, 0.4),
            -2px -2px 8px rgba(255, 255, 255, 0.05),
            inset 1px 1px 1px rgba(255, 255, 255, 0.1),
            inset -1px -1px 1px rgba(0, 0, 0, 0.3) !important;
        transform: translateY(-1px) !important;
        color: #ffffff !important;
        font-weight: 800 !important;
    }

    /* Inactive buttons: completely transparent as requested (like inactive VAT, CTC, BRU) */
    .dashboard-left-selector .btn-sede:not(.active),
    .btn-hour-select:not(.active),
    .calendar-days-vertical .btn-day:not(.active) {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: #94a3b8 !important;
        transform: none !important;
    }

    [data-theme="dark"] .dashboard-left-selector .btn-sede:not(.active),
    [data-theme="dark"] .btn-hour-select:not(.active),
    [data-theme="dark"] .calendar-days-vertical .btn-day:not(.active) {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: #64748b !important;
        transform: none !important;
    }

    /* Ocultar completamente los selectores laterales en móvil (días, horas, sedes fijas y calendario lateral) */
    .dashboard-left-selector,
    .dashboard-right-selector,
    .dashboard-right-selector .calendar-wrapper,
    .dashboard-right-selector .calendar-nav-vertical,
    .calendar-days-vertical {
        display: none !important;
    }

    /* 5. COURTS CONTAINER FULL WIDTH WITH GENEROUS MARGINS */
    .dashboards-section {
        padding-left: 28px !important;
        padding-right: 28px !important;
        padding-top: 192px !important; /* Positioned tightly below controls bar */
        height: auto !important;
        overflow: visible !important;
        gap: 1.5rem !important;
    }

    .court-card {
        width: 100% !important;
        max-width: 310px !important;
        min-width: 0 !important;
        margin: 0 auto !important;
    }
    
    .court-header {
        width: 100% !important;
        max-width: 310px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .court-board {
        width: 100% !important;
        max-width: 310px !important;
        margin: 0 auto !important;
        aspect-ratio: 380 / 460 !important;
        height: auto !important;
        padding: 16px 12px !important;
    }


    .court-title {
        font-size: 1rem !important;
    }

    .court-ball-label {
        font-size: 0.7rem !important;
    }

    .otc-ball-marker {
        width: 1rem !important;
        height: 1rem !important;
    }

/* Sticky footer 100% Solid Opacity - Zero Bleed Through */
.otc-ms-save-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent !important;
    padding: 10px 0 4px 0;
    margin-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 25;
    display: flex;
    justify-content: center;
}

[data-theme="dark"] .otc-ms-save-footer {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
    
    /* 5.5 SCALE STUDENT AVATARS AND TEACHERS INSIDE COURTS ON MOBILE */
    .student-avatar,
    .court-prof-container .btn-prof {
        padding: 3px 8px !important;
        font-size: 0.7rem !important;
        border-radius: 12px !important;
    }
    
    .court-prof-container {
        gap: 6px !important;
        top: 10px !important;
    }
    
    #focus-court-container .court-card {
        transform: scale(0.85) !important;
        transform-origin: top center !important;
        margin: 0 auto !important;
        max-width: 100% !important;
    }

    /* 6. TIMELINE LAYOUT ADJUSTMENTS - VERTICAL MOBILE Select Dropdowns */
    .timeline-month-nav,
    .timeline-side-selector {
        display: none !important;
    }

    .timeline-mobile-dropdowns {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: absolute !important;
        left: 16px !important;
        right: 16px !important;
        top: 62px !important;
        width: calc(100% - 32px) !important;
        z-index: 1000 !important;
        gap: 8px !important;
    }

    .timeline-mobile-dropdowns select {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 55% !important;
        height: 38px !important;
        padding: 0 32px 0 16px !important;
        font-family: 'Outfit', sans-serif !important;
        font-size: 0.88rem !important;
        font-weight: 500 !important;
        border-radius: 50px !important;
        background-color: rgba(43, 67, 241, 0.04) !important;
        border: 1px solid rgba(43, 67, 241, 0.12) !important;
        color: var(--text-main) !important;
        box-shadow: 
            inset 3px 3px 6px rgba(0, 0, 0, 0.08),
            inset -3px -3px 6px rgba(255, 255, 255, 0.9),
            inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232B43F1' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 14px center !important;
        background-size: 12px !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .timeline-mobile-dropdowns select:focus,
    .timeline-mobile-dropdowns select:hover {
        background-color: rgba(43, 67, 241, 0.07) !important;
        border-color: rgba(43, 67, 241, 0.35) !important;
        box-shadow: 
            inset 3px 3px 8px rgba(0, 0, 0, 0.12),
            inset -3px -3px 8px rgba(255, 255, 255, 0.95),
            inset 0 0 12px rgba(43, 67, 241, 0.08) !important;
        outline: none !important;
    }

    /* Modo Oscuro móvil */
    [data-theme="dark"] .timeline-mobile-dropdowns select {
        background-color: rgba(10, 20, 50, 0.45) !important;
        border: 1px solid rgba(92, 115, 242, 0.18) !important;
        box-shadow:
            inset 4px 4px 8px rgba(0, 0, 0, 0.85),
            inset -5px -5px 10px rgba(92, 115, 242, 0.15),
            inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
        color: var(--text-main) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2392a3fb' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
    }

    [data-theme="dark"] .timeline-mobile-dropdowns select:focus,
    [data-theme="dark"] .timeline-mobile-dropdowns select:hover {
        background-color: rgba(10, 20, 50, 0.65) !important;
        border-color: rgba(92, 115, 242, 0.40) !important;
        box-shadow:
            inset 4px 4px 10px rgba(0, 0, 0, 0.95),
            inset -5px -5px 12px rgba(92, 115, 242, 0.25),
            inset -1px -1px 0px rgba(255, 255, 255, 0.25) !important;
    }

    .timeline-mobile-dropdowns select#mobile-sede-select {
        max-width: 40% !important;
    }

    .linea-tiempo-main-scroll {
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-top: 100px !important;
    }

    /* 7. TABLES COMPACT VIEWS */
    .otc-data-table th, .otc-data-table td {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }
    .otc-data-table thead th {
        font-size: 0.75rem !important;
    }

    /* FORCE NO DOUBLE BACKGROUND ON MOBILE IN BOTH LIGHT AND DARK THEME */
    .dashboard-panel,
    [data-theme="dark"] .dashboard-panel {
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 8. CLASES PRIVADAS - DROPDOWN MÓVIL DE MESES */
    /* Ocultar la barra horizontal de botones de mes en móvil */
    .clases-timeline-horizontal {
        display: none !important;
    }

    /* Mostrar el dropdown personalizado neumórfico en su lugar */
    .clases-mobile-dropdowns-bar {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0 4px !important;
        margin: 8px 0 16px 0 !important;
        gap: 12px !important;
        box-sizing: border-box !important;
    }

    .clases-mobile-dropdowns-bar .otc-custom-mobile-dropdown {
        flex: 1 !important;
        max-width: 220px !important;
    }

    /* 9. CLASES PRIVADAS - CENTRADO DE DASHBOARD EN MÓVIL */
    /* Eliminar márgenes y padding asimétricos del contenedor de la vista */
    #view-clases-control {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #view-academia-control .table-container,
    #view-clases-control .table-container {
        padding: 0 12px !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Forzar centrado completo del grid de KPI cards */
    .clases-dashboard-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        padding: 12px 8px !important;
        margin: 0 auto !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    /* Forzar centrado de los gráficos y charts */
    .clases-charts-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 0 8px 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
    }
}

/* ==========================================================================
   PORTRAIT ORIENTATION RESPONSIVE LANDSCAPE OPTIMIZATION (IMMERSIBA v1038)
   ========================================================================== */
/* Optimizar el diseño móvil de canchas al rotar el teléfono 90 grados (modo horizontal/landscape) */
@media (max-width: 1024px) and (orientation: landscape) {
    /* 1. Forzar scroll nativo de cuerpo y página en horizontal */
    body.otc-portrait-lock-enabled {
        overflow-y: auto !important;
        height: auto !important;
    }

    /* 2. Desactivar scroll interno de dashboards-section para que la página completa scrollée */
    body.otc-portrait-lock-enabled .dashboards-section {
        padding-left: 54px !important;
        padding-right: 54px !important;
        padding-top: 115px !important;
        padding-bottom: 20px !important;
        gap: 1rem !important;
        height: auto !important;
        overflow-y: visible !important;
    }

    /* 3. Reorganizar las canchas en columnas de a 2 (diseño en grid fluido) */
    body.otc-portrait-lock-enabled .courts-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1.2rem !important;
        width: 100% !important;
    }
    
    body.otc-portrait-lock-enabled .court-card {
        flex: 0 1 310px !important;
        width: 310px !important;
        margin: 0 !important;
    }

    /* 4. Forzar la eliminación del doble fondo (dashboard-panel) para máxima limpieza */
    body.otc-portrait-lock-enabled .dashboard-panel,
    body.otc-portrait-lock-enabled [data-theme="dark"] .dashboard-panel {
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 5. Asegurar cabeceras y métricas como absolutas para que scrolléen (estilo web) */
    body.otc-portrait-lock-enabled .otc-unified-module-title {
        font-size: 1.1rem !important;
        top: 15px !important;
        position: absolute !important;
    }

    body.otc-portrait-lock-enabled .dashboard-metrics-container {
        position: absolute !important;
        top: 72px !important;
        width: 88% !important;
        gap: 4px 6px !important;
    }
    
    body.otc-portrait-lock-enabled .dashboard-metrics-container > div {
        padding: 3px 8px !important;
        font-size: 0.58rem !important;
    }

    body.otc-portrait-lock-enabled .hamburger-btn {
        position: absolute !important;
        top: 19px !important;
        left: 16px !important;
        width: 26px !important;
        height: 26px !important;
    }

    body.otc-portrait-lock-enabled .profile-btn {
        position: absolute !important;
        top: 19px !important;
        right: 16px !important;
        width: 58px !important;
        height: 26px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    body.otc-portrait-lock-enabled .profile-otc-logo {
        width: 58px !important;
        height: 16px !important;
        object-fit: contain !important;
        transform: none !important;
    }

    body.otc-portrait-lock-enabled .theme-toggle-btn {
        position: absolute !important;
        top: 19px !important;
        right: 82px !important;
        left: auto !important;
        width: 26px !important;
        height: 26px !important;
    }

    body.otc-portrait-lock-enabled .theme-toggle-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    body.otc-portrait-lock-enabled .notifications-btn {
        position: absolute !important;
        top: 19px !important;
        right: 116px !important;
        left: auto !important;
        width: 26px !important;
        height: 26px !important;
    }

    /* 6. OCULTAR SELECTORES LATERALES EN MÓVIL Y ACTIVAR BARRA SUPERIOR DE CANCHAS */
    body.otc-portrait-lock-enabled .dashboard-left-selector,
    body.otc-portrait-lock-enabled .dashboard-right-selector,
    body.otc-portrait-lock-enabled .dashboard-right-selector .calendar-wrapper,
    body.otc-portrait-lock-enabled .dashboard-right-selector .calendar-nav-vertical,
    body.otc-portrait-lock-enabled .calendar-days-vertical {
        display: none !important;
    }

    body.otc-portrait-lock-enabled .canchas-mobile-controls-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: absolute !important;
        left: 16px !important;
        right: 16px !important;
        top: 150px !important;
        width: calc(100% - 32px) !important;
        z-index: 1000 !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }

    body.otc-portrait-lock-enabled .dashboards-section {
        padding-left: 28px !important;
        padding-right: 28px !important;
        padding-top: 192px !important;
    }
}

/* ==========================================================================
   MOBILE & TABLET DROPDOWNS OVERRIDES (PORTRAIT & LANDSCAPE)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Custom Mobile Dropdowns (Estilo Neumórfico Inset/Grabado como buscador de tablas) */
    .otc-custom-mobile-dropdown {
        position: relative !important;
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 55% !important;
    }

    #mobile-sede-dropdown-container {
        max-width: 40% !important;
    }

    .otc-custom-dropdown-btn {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        height: 38px !important;
        padding: 0 32px 0 16px !important;
        font-family: 'Outfit', sans-serif !important;
        font-size: 0.88rem !important;
        font-weight: 500 !important;
        border-radius: 50px !important;
        background: rgba(43, 67, 241, 0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232B43F1' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") no-repeat right 14px center / 12px !important;
        border: 1px solid rgba(43, 67, 241, 0.12) !important;
        color: var(--text-main) !important;
        box-shadow: 
            inset 3px 3px 6px rgba(0, 0, 0, 0.08),
            inset -3px -3px 6px rgba(255, 255, 255, 0.9),
            inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
        cursor: pointer !important;
        text-align: left !important;
        box-sizing: border-box !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        user-select: none !important;
    }

    .otc-custom-dropdown-btn:focus,
    .otc-custom-dropdown-btn:hover {
        background: rgba(43, 67, 241, 0.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232B43F1' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") no-repeat right 14px center / 12px !important;
        border-color: rgba(43, 67, 241, 0.35) !important;
        box-shadow: 
            inset 3px 3px 8px rgba(0, 0, 0, 0.12),
            inset -3px -3px 8px rgba(255, 255, 255, 0.95),
            inset 0 0 12px rgba(43, 67, 241, 0.08) !important;
        outline: none !important;
    }

    /* MODO OSCURO */
    [data-theme="dark"] .otc-custom-dropdown-btn {
        background: rgba(10, 20, 50, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2392a3fb' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") no-repeat right 14px center / 12px !important;
        border: 1px solid rgba(92, 115, 242, 0.18) !important;
        box-shadow:
            inset 4px 4px 8px rgba(0, 0, 0, 0.85),
            inset -5px -5px 10px rgba(92, 115, 242, 0.15),
            inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
        color: var(--text-main) !important;
    }

    [data-theme="dark"] .otc-custom-dropdown-btn:focus,
    [data-theme="dark"] .otc-custom-dropdown-btn:hover {
        background: rgba(10, 20, 50, 0.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2392a3fb' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") no-repeat right 14px center / 12px !important;
        border-color: rgba(92, 115, 242, 0.40) !important;
        box-shadow:
            inset 4px 4px 10px rgba(0, 0, 0, 0.95),
            inset -5px -5px 12px rgba(92, 115, 242, 0.25),
            inset -1px -1px 0px rgba(255, 255, 255, 0.15) !important;
    }

    /* Menú desplegable flotante adaptado de .otc-td-menu */
    .otc-custom-mobile-dropdown .otc-td-menu {
        position: absolute !important;
        top: calc(100% + 6px) !important;
        left: 0 !important;
        right: auto !important;
        min-width: 140px !important;
        max-height: 250px !important;
        overflow-y: auto !important;
        z-index: 200000 !important;
        display: none !important;
        flex-direction: column !important;
        opacity: 0 !important;
        transform: translateY(-10px) scale(0.95) !important;
        transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1) !important;
        pointer-events: none !important;
        transform-origin: top left !important;
    }

    /* Alinear desplegable de sedes a la derecha para evitar desbordes */
    #mobile-sede-dropdown-container .otc-td-menu {
        left: auto !important;
        right: 0 !important;
        transform-origin: top right !important;
    }

    /* Soporte para volteo vertical Dropup (Smart Flip) */
    .otc-custom-mobile-dropdown.dropup .otc-td-menu {
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        transform: translateY(10px) scale(0.95) !important;
        transform-origin: bottom left !important;
    }

    #mobile-sede-dropdown-container.dropup .otc-td-menu {
        transform-origin: bottom right !important;
    }

    .otc-custom-mobile-dropdown.open .otc-td-menu {
        display: flex !important;
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        pointer-events: auto !important;
    }

    /* Opciones del desplegable adaptado de .otc-td-option */
    .otc-custom-mobile-dropdown .otc-td-option {
        text-align: left !important;
        user-select: none !important;
    }

    /* Optimización de altura y centrado de nodos de la línea de tiempo en móvil */
    .otc-timeline-node {
        height: calc(100vh - 70px) !important;
        scroll-snap-align: center !important;
    }
}

/* --- OT C ASIG SAVE BUTTON (Explicit 1:1 copy of Editar perfil - 100% Opaco Solido) --- */
.otc-ms-save.btn-asig-save-btn,
button.otc-ms-save.btn-asig-save-btn,
.btn-profile-card-action#btn-asig-save-profile {
    background: linear-gradient(145deg, #ffffff 0%, #e2e8f0 100%) !important;
    color: #475569 !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow:
        3px 5px 10px rgba(163, 177, 198, 0.35),
        -3px -3px 10px #ffffff,
        inset 1.5px 1.5px 2px #ffffff,
        inset -1px -1px 2px rgba(163, 177, 198, 0.2) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.otc-ms-save#btn-asig-save-profile:hover,
.otc-ms-save#btn-asig-save-profile:focus,
.otc-ms-save#btn-asig-save-profile:active,
button#btn-asig-save-profile:hover,
button#btn-asig-save-profile:focus,
button#btn-asig-save-profile:active {
    background: linear-gradient(145deg, #ffffff 0%, #cbd5e1 100%) !important;
    color: #475569 !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.45),
        -4px -4px 12px #ffffff,
        inset 1.5px 1.5px 2px #ffffff,
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

[data-theme="dark"] .otc-ms-save.btn-asig-save-btn,
[data-theme="dark"] button.otc-ms-save.btn-asig-save-btn,
[data-theme="dark"] .btn-profile-card-action#btn-asig-save-profile {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%) !important;
    color: #cbd5e1 !important;
    box-shadow:
        3px 5px 10px rgba(0, 0, 0, 0.65),
        -2px -2px 8px rgba(255, 255, 255, 0.08),
        inset 1px 1px 2px rgba(255, 255, 255, 0.2),
        inset -1px -1px 2px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] button#btn-asig-save-profile:hover,
[data-theme="dark"] button#btn-asig-save-profile:focus,
[data-theme="dark"] button#btn-asig-save-profile:active {
    background: linear-gradient(145deg, #334155 0%, #1e293b 100%) !important;
    color: #e2e8f0 !important;
    box-shadow: 
        3px 5px 10px rgba(0, 0, 0, 0.8),
        -3px -3px 10px rgba(255, 255, 255, 0.1),
        inset 1px 1px 1.5px rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.04) translateY(-1.5px) !important;
}

/* ============================================================
   GUARDAR BUTTON — NUCLEAR OVERRIDE (always last, always wins)
   ============================================================ */
#btn-asig-save-profile {
    color: #475569 !important;
    background: linear-gradient(145deg, #ffffff 0%, #e2e8f0 100%) !important;
}

#btn-asig-save-profile:hover,
#btn-asig-save-profile:focus,
#btn-asig-save-profile:active {
    /* Tema claro: texto se vuelve MÁS OSCURO al hover (igual que editar perfil) */
    color: #1e293b !important;
    background: linear-gradient(145deg, #f8fafc 0%, #cbd5e1 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

[data-theme="dark"] #btn-asig-save-profile {
    color: #cbd5e1 !important;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%) !important;
}

[data-theme="dark"] #btn-asig-save-profile:hover,
[data-theme="dark"] #btn-asig-save-profile:focus,
[data-theme="dark"] #btn-asig-save-profile:active {
    /* Tema oscuro: texto se vuelve MÁS CLARO al hover */
    color: #f8fafc !important;
    background: linear-gradient(145deg, #334155 0%, #1e293b 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* --- OTC FORM INPUTS & BUTTONS NEUMORPHIC STYLE SYSTEM --- */
.otc-modal-form input[type="text"],
.otc-modal-form input[type="url"],
.otc-modal-form textarea,
.otc-mobile-form-container input[type="text"],
.otc-mobile-form-container input[type="url"],
.otc-mobile-form-container textarea {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 16px !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    border-radius: 14px !important;
    background: rgba(43, 67, 241, 0.04) !important;
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.95),
        inset 0 0 8px rgba(43, 67, 241, 0.03) !important;
    color: #1e293b !important;
    outline: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.otc-modal-form textarea,
.otc-mobile-form-container textarea {
    min-height: 85px !important;
    resize: vertical !important;
}

.otc-modal-form input[type="text"]:focus,
.otc-modal-form input[type="url"]:focus,
.otc-modal-form textarea:focus,
.otc-mobile-form-container input[type="text"]:focus,
.otc-mobile-form-container input[type="url"]:focus,
.otc-mobile-form-container textarea:focus {
    background: rgba(43, 67, 241, 0.07) !important;
    border-color: rgba(43, 67, 241, 0.45) !important;
    box-shadow: 
        inset 3px 3px 8px rgba(0, 0, 0, 0.12),
        inset -3px -3px 8px rgba(255, 255, 255, 1),
        0 0 0 3px rgba(43, 67, 241, 0.15) !important;
}

[data-theme="dark"] .otc-modal-form input[type="text"],
[data-theme="dark"] .otc-modal-form input[type="url"],
[data-theme="dark"] .otc-modal-form textarea,
[data-theme="dark"] .otc-mobile-form-container input[type="text"],
[data-theme="dark"] .otc-mobile-form-container input[type="url"],
[data-theme="dark"] .otc-mobile-form-container textarea {
    background: rgba(10, 20, 50, 0.65) !important;
    border: 1.5px solid rgba(92, 115, 242, 0.3) !important;
    box-shadow: 
        inset 4px 4px 8px rgba(0, 0, 0, 0.85),
        inset -3px -3px 6px rgba(255, 255, 255, 0.05) !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .otc-modal-form input[type="text"]:focus,
[data-theme="dark"] .otc-modal-form input[type="url"]:focus,
[data-theme="dark"] .otc-modal-form textarea:focus,
[data-theme="dark"] .otc-mobile-form-container input[type="text"]:focus,
[data-theme="dark"] .otc-mobile-form-container input[type="url"]:focus,
[data-theme="dark"] .otc-mobile-form-container textarea:focus {
    border-color: rgba(92, 115, 242, 0.65) !important;
    box-shadow: 
        inset 4px 4px 10px rgba(0, 0, 0, 0.9),
        0 0 0 3px rgba(92, 115, 242, 0.25) !important;
}

.otc-mobile-form-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.otc-modal-actions,
.otc-mobile-form-container .otc-modal-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 18px !important;
    box-sizing: border-box !important;
}

.btn-cancel,
.otc-modal-btn.btn-cancel {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    border: none !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(226, 232, 240, 0.85) 100%) !important;
    color: #475569 !important;
    box-shadow: 
        3px 5px 10px rgba(163, 177, 198, 0.3),
        -3px -3px 10px rgba(255, 255, 255, 0.95),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.15) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex: 1 !important;
}

.btn-confirm,
.otc-modal-btn.btn-confirm {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 0.92rem !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    border: none !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    box-shadow: 
        0 6px 16px rgba(239, 68, 68, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex: 1 !important;
}

.btn-confirm-edit,
.otc-modal-btn.btn-confirm-edit {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 0.92rem !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    border: none !important;
    background: linear-gradient(135deg, #2b43f1 0%, #1e32c8 100%) !important;
    color: #ffffff !important;
    box-shadow: 
        0 6px 16px rgba(43, 67, 241, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex: 1 !important;
}

.btn-cancel:hover {
    transform: translateY(-1.5px) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(215, 225, 235, 0.95) 100%) !important;
}

.btn-confirm:hover,
.otc-modal-btn.btn-confirm:hover {
    transform: translateY(-1.5px) !important;
    color: #ffffff !important;
    background: linear-gradient(145deg, #f87171 0%, #ef4444 100%) !important;
    box-shadow: 
        0 8px 20px rgba(239, 68, 68, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
}

.btn-confirm-edit:hover,
.otc-modal-btn.btn-confirm-edit:hover {
    transform: translateY(-1.5px) !important;
    color: #ffffff !important;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 
        0 8px 20px rgba(43, 67, 241, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
}

[data-theme="dark"] .btn-cancel,
[data-theme="dark"] .otc-modal-btn.btn-cancel {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
    color: #cbd5e1 !important;
    box-shadow: 
        3px 4px 8px rgba(0, 0, 0, 0.6),
        inset 1px 1px 1px rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .btn-confirm,
[data-theme="dark"] .otc-modal-btn.btn-confirm {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    box-shadow: 
        0 6px 18px rgba(239, 68, 68, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .btn-confirm:hover,
[data-theme="dark"] .otc-modal-btn.btn-confirm:hover {
    transform: translateY(-1.5px) !important;
    color: #ffffff !important;
    background: linear-gradient(145deg, #f87171 0%, #ef4444 100%) !important;
}

[data-theme="dark"] .btn-confirm-edit,
[data-theme="dark"] .otc-modal-btn.btn-confirm-edit {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    box-shadow: 
        0 6px 18px rgba(59, 130, 246, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .btn-confirm-edit:hover,
[data-theme="dark"] .otc-modal-btn.btn-confirm-edit:hover {
    transform: translateY(-1.5px) !important;
    color: #ffffff !important;
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%) !important;
}

/* --- DESPLEGABLE Y SUBFORMULARIO DE ALUMNOS REGISTRADOS POR CI --- */
[data-theme="dark"] .otc-student-dropdown-panel {
    background: #0f172a !important;
    border: 1.5px solid rgba(92, 115, 242, 0.4) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
}

[data-theme="dark"] .otc-student-search-input,
[data-theme="dark"] .new-student-tipo-doc,
[data-theme="dark"] .new-student-num-doc,
[data-theme="dark"] .new-student-full-name {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: rgba(92, 115, 242, 0.3) !important;
}

[data-theme="dark"] .otc-student-opt-item {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .otc-student-opt-item.is-add-new {
    background: rgba(92, 115, 242, 0.15) !important;
    color: #60a5fa !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
}

.new-student-tipo-doc {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    flex: 0 0 58px !important;
    text-align: center !important;
    font-weight: 800 !important;
    padding: 0 2px !important;
}

.new-student-num-doc {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
}

[data-theme="dark"] .new-student-tipo-trigger {
    background: #1e293b !important;
    color: #60a5fa !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
}

[data-theme="dark"] .new-student-tipo-options {
    background: #0f172a !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8) !important;
}

[data-theme="dark"] .tipo-opt-item {
    color: #f8fafc !important;
}

/* --- PULSE DOT PINK PARA FORMATO PICO --- */
.pulse-dot-pink {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ec4899;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.pulse-dot-pink::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 1.5px solid #ec4899;
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

/* --- ACTIVE INDIGO CAPSULE & PULSE DOT INDIGO (FORMATO PICO) --- */
.active-indigo-capsule .pulse-dot-indigo {
    background: #6366f1 !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4) !important;
    animation: pulseIndigo 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
    animation-delay: 0s !important;
}
.active-indigo-capsule .capsule-text strong {
    color: #6366f1 !important;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.15) !important;
}
[data-theme="dark"] .active-indigo-capsule .pulse-dot-indigo {
    background: #818cf8 !important;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.5) !important;
}
[data-theme="dark"] .active-indigo-capsule .capsule-text strong {
    color: #818cf8 !important;
    text-shadow: 0 0 8px rgba(129, 140, 248, 0.3) !important;
}

.pulse-dot-indigo {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
.pulse-dot-indigo::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none !important;
    z-index: -1 !important;
    display: block !important;
    transform-origin: center center !important;
    background: rgba(99, 102, 241, 0.45) !important;
    animation: auraPulse 3s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
}
[data-theme="dark"] .pulse-dot-indigo::after {
    background: rgba(129, 140, 248, 0.55) !important;
}

/* ==========================================================================
   NORMATIVA DE JERARQUÍA DE COLORES Y TIPOGRAFÍA DE LA PÁGINA
   ========================================================================== */

/* BARRA DE GRÁFICOS VERTICALES Y HORIZONTALES EN MODO CLARO (AZUL KOBALTO A CIAN NEÓN) */
.neu-vbar-fill,
.v-bar-fill,
[class*="vbar-fill"] {
    background: linear-gradient(180deg, #2563eb 0%, #00d4ff 100%) !important;
    box-shadow: 0 3px 10px rgba(0, 212, 255, 0.35) !important;
}

.neu-bar-fill,
.bar-fill,
[class*="bar-fill"]:not(.neu-vbar-fill) {
    background: linear-gradient(90deg, #2563eb 0%, #00d4ff 100%) !important;
    box-shadow: 0 3px 10px rgba(0, 212, 255, 0.35) !important;
}

/* BARRA DE GRÁFICOS VERTICALES Y HORIZONTALES EN MODO OSCURO (UNIFICADO SEGÚN REGLAMENTO) */
[data-theme="dark"] .neu-vbar-fill,
[data-theme="dark"] .v-bar-fill,
[data-theme="dark"] [class*="vbar-fill"],
[data-theme="dark"] #chart-acad-sedes .neu-vbar-fill,
[data-theme="dark"] #chart-acad-dias .neu-vbar-fill,
[data-theme="dark"] #chart-clases-sedes .neu-vbar-fill,
[data-theme="dark"] #chart-clases-dias .neu-vbar-fill {
    background: linear-gradient(180deg, #3b82f6 0%, #a855f7 100%) !important;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.5) !important;
}

[data-theme="dark"] .neu-bar-fill,
[data-theme="dark"] .bar-fill,
[data-theme="dark"] [class*="bar-fill"]:not(.neu-vbar-fill),
[data-theme="dark"] #chart-acad-horarios .neu-bar-fill,
[data-theme="dark"] #chart-acad-pelotas .neu-bar-fill,
[data-theme="dark"] #chart-acad-reves .neu-bar-fill,
[data-theme="dark"] #chart-acad-mano .neu-bar-fill,
[data-theme="dark"] #chart-acad-edades .neu-bar-fill,
[data-theme="dark"] #chart-clases-horas .neu-bar-fill,
[data-theme="dark"] #ranking-clases-profesores .neu-bar-fill,
[data-theme="dark"] #ranking-clases-alumnos .neu-bar-fill {
    background: linear-gradient(90deg, #3b82f6 0%, #a855f7 100%) !important;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.5) !important;
}

/* VALORES Y NÚMEROS DE RANKING UNIFICADOS EN MODO CLARO Y OSCURO */
.neu-avatar,
.neu-rank-badge,
.rank-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Space Mono', monospace !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #00d4ff 100%) !important;
    box-shadow: 0 3px 12px rgba(0, 212, 255, 0.4) !important;
    border-radius: 50% !important;
    border: none !important;
}

[data-theme="dark"] .neu-avatar,
[data-theme="dark"] .neu-rank-badge,
[data-theme="dark"] .rank-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Space Mono', monospace !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%) !important;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.5) !important;
    border-radius: 50% !important;
    border: none !important;
}

.neu-bar-value,
.neu-leader-count,
.neu-vbar-value,
.neu-vbar-pct,
.rank-val {
    font-family: 'Space Mono', monospace !important;
    font-weight: 800 !important;
    color: #1d4ed8 !important;
}

[data-theme="dark"] .neu-bar-value,
[data-theme="dark"] .neu-rank-num,
[data-theme="dark"] .neu-leader-count,
[data-theme="dark"] .neu-vbar-value,
[data-theme="dark"] .neu-vbar-pct,
[data-theme="dark"] .rank-number,
[data-theme="dark"] .rank-val {
    font-family: 'Space Mono', monospace !important;
    font-weight: 800 !important;
    color: #c084fc !important;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.45) !important;
}

/* Botón de Guardar/Actualizar en modal de asistencia con texto blanco brillante de alto contraste */
#btn-save-session,
.btn-primary-suspended,
.focus-footer .btn-primary-suspended {
    color: #ffffff !important;
    background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%) !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
    letter-spacing: 0.03em !important;
}
#btn-save-session *,
.btn-primary-suspended *,
.focus-footer .btn-primary-suspended * {
    color: #ffffff !important;
}
#btn-save-session:hover,
.btn-primary-suspended:hover,
.focus-footer .btn-primary-suspended:hover {
    color: #ffffff !important;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%) !important;
}

/* ==========================================================================
   UNIFIED HIGH-CONTRAST ACTION & CONFIRMATION BUTTON TEXT ENFORCEMENT
   Garantiza texto blanco nítido (#ffffff) en todos los botones de acción,
   confirmación, modales y notificaciones en Modo Claro y Modo Oscuro.
   ========================================================================== */
.otc-modal-btn.btn-confirm,
.otc-modal-btn.btn-confirm-edit,
.otc-modal .btn-confirm,
.otc-modal .btn-confirm-edit,
button.btn-confirm,
button.btn-confirm-edit,
.btn-confirm,
.btn-confirm-edit,
.btn-save-new-student,
.mob-btn-save-new,
#btn-confirm-mobile-time,
.btn-profile-card-action#btn-submit-user,
.btn-profile-card-action#btn-submit-auth,
.btn-profile-card-action#btn-submit-register,
.btn-profile-card-action#btn-save-post,
.btn-profile-card-action#btn-edit-profile-save,
.btn-profile-card-action.signout,
#btn-otc-signout,
.btn-notif-action.approve,
.btn-notif-action.reject {
    color: #ffffff !important;
}

.otc-modal-btn.btn-confirm *,
.otc-modal-btn.btn-confirm-edit *,
.otc-modal .btn-confirm *,
.otc-modal .btn-confirm-edit *,
button.btn-confirm *,
button.btn-confirm-edit *,
.btn-confirm *,
.btn-confirm-edit *,
.btn-save-new-student *,
.mob-btn-save-new *,
#btn-confirm-mobile-time *,
.btn-profile-card-action#btn-submit-user *,
.btn-profile-card-action#btn-submit-auth *,
.btn-profile-card-action#btn-submit-register *,
.btn-profile-card-action#btn-save-post *,
.btn-profile-card-action#btn-edit-profile-save *,
.btn-profile-card-action.signout *,
#btn-otc-signout *,
.btn-notif-action.approve *,
.btn-notif-action.reject * {
    color: #ffffff !important;
}

.otc-modal-btn.btn-confirm:hover,
.otc-modal-btn.btn-confirm-edit:hover,
.otc-modal .btn-confirm:hover,
.otc-modal .btn-confirm-edit:hover,
button.btn-confirm:hover,
button.btn-confirm-edit:hover,
.btn-confirm:hover,
.btn-confirm-edit:hover,
.btn-save-new-student:hover,
.mob-btn-save-new:hover,
#btn-confirm-mobile-time:hover,
.btn-profile-card-action#btn-submit-user:hover,
.btn-profile-card-action#btn-submit-auth:hover,
.btn-profile-card-action#btn-submit-register:hover,
.btn-profile-card-action#btn-save-post:hover,
.btn-profile-card-action#btn-edit-profile-save:hover,
.btn-profile-card-action.signout:hover,
#btn-otc-signout:hover,
.btn-notif-action.approve:hover,
.btn-notif-action.reject:hover {
    color: #ffffff !important;
}

/* ==========================================================================
   CONTEXTUAL WORKSPACE WORKFLOW RAIL & CANVAS FLOATING DOCK (v1.9.44)
   ========================================================================== */
@property --ws-fade-start {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
}

@property --ws-fade-end {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
}

.otc-ws-rail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 12px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    min-width: 0;
}

[data-theme="dark"] .otc-ws-rail {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

.otc-ws-rail.hidden {
    display: none !important;
}

.otc-ws-track {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 2px 2px 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: inline proximity;
    scroll-padding-inline: 24px;
    --ws-fade-size: 24px;
    transition: --ws-fade-start 0.2s ease, --ws-fade-end 0.2s ease;
}

@supports (mask-composite: subtract) {
    .otc-ws-track {
        mask:
            linear-gradient(#000, #000) no-clip subtract,
            linear-gradient(to right, #000, transparent) 0 0 / var(--ws-fade-start) 100% no-repeat no-clip,
            linear-gradient(to right, transparent, #000) 100% 0 / var(--ws-fade-end) 100% no-repeat no-clip;
    }
}

.otc-ws-track::-webkit-scrollbar {
    display: none;
}

@supports (animation-timeline: scroll()) {
    @keyframes otcWsRevealStart {
        to {
            --ws-fade-start: var(--ws-fade-size);
        }
    }

    @keyframes otcWsHideEnd {
        from {
            --ws-fade-end: var(--ws-fade-size);
        }
    }

    .otc-ws-track {
        animation: otcWsRevealStart linear both, otcWsHideEnd linear both;
        animation-timeline: scroll(self inline);
        animation-range: 0 var(--ws-fade-size), calc(100% - var(--ws-fade-size)) 100%;
    }
}

.otc-ws-track.more-start {
    --ws-fade-start: var(--ws-fade-size);
}

.otc-ws-track.more-end {
    --ws-fade-end: var(--ws-fade-size);
}

.otc-ws-pill {
    flex: none;
    scroll-snap-align: start;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-block-size: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: #64748b;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.otc-ws-pill svg {
    flex-shrink: 0;
    color: currentColor;
}

.otc-ws-pill:hover {
    background: rgba(15, 23, 42, 0.05);
    border-color: transparent;
    color: #0f172a;
}

.otc-ws-pill[aria-current="page"] {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
}

.otc-ws-pill[aria-current="page"] svg {
    color: var(--color-electric-blue, #2B43F1);
}

[data-theme="dark"] .otc-ws-pill {
    background: transparent;
    border-color: transparent;
    color: #94a3b8;
}

[data-theme="dark"] .otc-ws-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: transparent;
    color: #f8fafc;
}

[data-theme="dark"] .otc-ws-pill[aria-current="page"] {
    background: #1e2538;
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.36);
}

[data-theme="dark"] .otc-ws-pill[aria-current="page"] svg {
    color: #7e9dfc;
}

.otc-ws-pill:focus-visible {
    outline: 2px solid var(--color-electric-blue, #2B43F1);
    outline-offset: 2px;
}

.otc-active-filters-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.otc-active-filters-row:empty {
    display: none;
    margin: 0;
}

@media (pointer: coarse) {
    .otc-ws-pill {
        min-block-size: 32px;
        padding-inline: 11px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .otc-ws-rail {
        gap: 6px;
        padding-bottom: 8px;
        margin-bottom: 4px;
    }

    .otc-ws-pill {
        height: 32px;
        min-block-size: 32px;
        padding: 0 11px;
        font-size: 0.75rem;
        gap: 5px;
    }

    .otc-ws-pill svg {
        width: 13px;
        height: 13px;
    }

    /* Single-row flow when #view-clases-historial header H2 is omitted */
    #view-clases-historial .table-header-premium {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
    }

    #view-clases-historial .header-left-group {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    #view-clases-historial .header-right-actions {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }

    /* Proportionate modal actions & KPI cards on mobile */
    .otc-modal-actions {
        gap: 10px !important;
    }

    .btn-cancel,
    .otc-modal-btn.btn-cancel,
    .btn-confirm,
    .otc-modal-btn.btn-confirm,
    .btn-confirm-edit,
    .otc-modal-btn.btn-confirm-edit {
        padding: 9px 14px !important;
        font-size: 0.84rem !important;
        border-radius: 10px !important;
    }

    .clases-dashboard-grid .stat-card-clases {
        padding: 9px 13px !important;
        border-radius: 16px !important;
    }

    .clases-dashboard-grid .stat-card-clases .capsule-text {
        font-size: 0.78rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .otc-ws-pill,
    .otc-ws-track,
    .otc-theme-menu,
    .otc-theme-menu-backdrop {
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   3-OPTION PROFESSIONAL THEME PICKER (DISPOSITIVO / CLARO / OSCURO)
   ========================================================================== */
#theme-toggle-btn .theme-icon,
#otc-land-theme-btn svg {
    display: none;
}

html[data-theme-pref="system"] #theme-toggle-btn .system-icon,
html:not([data-theme-pref]) #theme-toggle-btn .system-icon,
html[data-theme-pref="system"] #otc-land-theme-btn .system-icon,
html:not([data-theme-pref]) #otc-land-theme-btn .system-icon {
    display: block;
}

html[data-theme-pref="light"] #theme-toggle-btn .sun-icon,
html[data-theme-pref="light"] #otc-land-theme-btn .sun-icon {
    display: block;
}

html[data-theme-pref="dark"] #theme-toggle-btn .moon-icon,
html[data-theme-pref="dark"] #otc-land-theme-btn .moon-icon {
    display: block;
}

html.otc-theme-sheet-open,
html.otc-theme-sheet-open body {
    overflow: hidden !important;
}

.otc-theme-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 129990;
    background: rgba(6, 9, 16, 0.48);
    opacity: 0;
    pointer-events: none;
    touch-action: none;
    transition: opacity 0.16s ease;
}

.otc-theme-menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.otc-theme-menu {
    position: fixed;
    z-index: 129995;
    width: 196px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.09);
    box-shadow: 0 18px 42px -12px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translate3d(0, -6px, 0) scale(0.98);
    transition: opacity 0.14s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.otc-theme-menu[hidden] {
    display: none !important;
}

.otc-theme-menu.open {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

[data-theme="dark"] .otc-theme-menu {
    background: rgba(18, 22, 34, 0.96);
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: 0 22px 48px -10px rgba(0, 0, 0, 0.68), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.otc-theme-menu-grab {
    display: none;
}

.otc-theme-menu-title {
    padding: 6px 10px 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    user-select: none;
}

[data-theme="dark"] .otc-theme-menu-title {
    color: #94a3b8;
}

.otc-theme-menu-item {
    appearance: none;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: none;
    border-radius: 11px;
    background: transparent;
    color: #1e293b;
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.otc-theme-menu-item:hover,
.otc-theme-menu-item:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    outline: none;
}

[data-theme="dark"] .otc-theme-menu-item {
    color: #e2e8f0;
}

[data-theme="dark"] .otc-theme-menu-item:hover,
[data-theme="dark"] .otc-theme-menu-item:focus-visible {
    background: rgba(255, 255, 255, 0.07);
}

.otc-theme-menu-item.is-active {
    background: rgba(43, 67, 241, 0.1);
    color: #2B43F1;
    font-weight: 700;
}

[data-theme="dark"] .otc-theme-menu-item.is-active {
    background: rgba(96, 130, 255, 0.16);
    color: #93b4ff;
}

.otc-theme-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.86;
}

.otc-theme-menu-item.is-active .otc-theme-menu-icon {
    opacity: 1;
}

.otc-theme-menu-label {
    flex: 1;
}

.otc-theme-menu-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.otc-theme-menu-item.is-active .otc-theme-menu-check {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 680px) {
    .otc-theme-menu {
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100%;
        max-height: 92dvh;
        padding: 10px 14px calc(20px + env(safe-area-inset-bottom, 0px));
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        transform: translate3d(0, 28px, 0);
    }

    .otc-theme-menu.open {
        transform: translate3d(0, 0, 0);
    }

    .otc-theme-menu-grab {
        display: block;
        width: 38px;
        height: 4px;
        margin: 2px auto 10px;
        border-radius: 999px;
        background: rgba(100, 116, 139, 0.35);
    }

    .otc-theme-menu-title {
        padding: 2px 10px 8px;
        font-size: 0.72rem;
    }

    .otc-theme-menu-item {
        min-height: 48px;
        padding: 11px 12px;
        font-size: 0.95rem;
        border-radius: 14px;
    }
}

/* ==========================================================================
   PWA INSTALL ICON (1:1 MEB — NATIVE MOBILE/TABLET ONLY, ZERO PROCEDURAL SHEET)
   ========================================================================== */
html:not(.otc-pwa-installable) #otc-land-install-btn,
html:not(.otc-pwa-installable) #otc-app-install-btn,
#otc-land-install-btn[hidden],
#otc-app-install-btn[hidden] {
    display: none !important;
}

#otc-app-install-btn {
    right: 210px !important;
}

@media (max-width: 768px) {
    #otc-app-install-btn {
        right: 150px !important;
    }
}

@media (min-width: 1025px) and (pointer: fine) {
    #otc-land-install-btn,
    #otc-app-install-btn {
        display: none !important;
    }
}



