/* ==========================================================================
   OTC PREMIUM TABLES & FILTERS (GLOBAL SHIELD)
   Standardized 3D Glassmorphism: 85% Opacity | 25px Blur | 18px Radius
   ========================================================================== */

/* --- Sortable Header Styling --- */
th.sortable, th.filterable {
    cursor: pointer !important;
    position: relative !important;
    user-select: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding-right: 40px !important;
    white-space: nowrap;
}

th.sortable:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

/* Header Sort Trigger (⇅) */
.btn-column-sort {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: rgba(0, 0, 0, 0.45) !important;
    font-size: 0.9rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
}

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

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

/* Header Filter Trigger (Funnel) */
.btn-column-filter {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !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: transparent !important;
    color: var(--table-accent-color) !important;
    box-shadow: none !important;
    border: none !important;
    transform: translateY(-50%) !important;
}

.btn-column-filter.active:hover {
    transform: translateY(-50%) scale(1.1) !important;
}

/* Dual layout for columns that are both sortable and filterable */
th.sortable.filterable {
    padding-right: 40px !important;
}
th.sortable.filterable .btn-column-filter {
    right: 8px !important;
}

.sort-rank-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    box-shadow: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    display: inline-block !important;
    z-index: 20 !important;
    line-height: 1 !important;
}

/* 3D Sort Bubble Menu */
.column-sort-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: 25px !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.16) !important;
    padding: 10px !important;
    z-index: 200000 !important;
    display: flex;
    flex-direction: column !important;
    gap: 4px !important;
    animation: sortIn 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes sortIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sort-option {
    padding: 10px 14px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 0.92rem !important;
    color: var(--text-main) !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sort-option:hover {
    background: color-mix(in srgb, var(--table-accent-color) 7%, transparent) !important;
    color: var(--table-accent-color) !important;
}

.sort-option.active {
    background: color-mix(in srgb, var(--table-accent-color) 12%, transparent) !important;
    color: var(--table-accent-color) !important;
    font-weight: 800 !important;
}

/* Filter Trigger Button (Funnel) */
.btn-filter-manage {
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: #94A3B8 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-filter-manage:hover {
    color: var(--table-accent-color) !important;
    transform: scale(1.15) !important;
}

/* 3D Active Filters Panel — positioned via JS (position:fixed, top/left set on open) */
.sort-manager-panel {
    position: fixed !important;
    width: 330px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 1.0) 0%, rgba(240, 245, 255, 1.0) 100%) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 25px !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;
    padding: 22px !important;
    z-index: 99999 !important;
    display: flex;
    flex-direction: column !important;
    gap: 15px !important;
    animation: panelIn 0.4s cubic-bezier(0.19, 1, 0.22, 1) !important;
}

.sort-manager-panel.hidden {
    display: none !important;
}

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

.sort-panel-header {
    font-size: 0.82rem !important;
    font-weight: 850 !important;
    color: var(--text-main) !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
}

.sort-rule-item,
.filter-rule-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.75) 100%) !important;
    border: 1px solid rgba(43, 67, 241, 0.1) !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: calc(100% - 20px) !important;
    margin: 0 auto !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    box-shadow: 
        3px 5px 12px rgba(163, 177, 198, 0.2),
        -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.1) !important;
}

.sort-rule-item:hover,
.filter-rule-item:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1.0) 0%, rgba(225, 235, 255, 0.85) 100%) !important;
    border-color: rgba(43, 67, 241, 0.25) !important;
    box-shadow: 
        4px 8px 16px rgba(163, 177, 198, 0.3),
        -4px -4px 12px rgba(255, 255, 255, 1.0),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 1),
        inset -1px -1px 2px rgba(163, 177, 198, 0.1) !important;
    transform: translateY(-1px) !important;
}

/* Dark Theme overrides for active sorting and filtering rule items */
[data-theme="dark"] .sort-rule-item,
[data-theme="dark"] .filter-rule-item {
    background: linear-gradient(145deg, rgba(30, 42, 68, 0.6) 0%, rgba(13, 18, 30, 0.8) 100%) !important;
    border: 1px solid rgba(92, 115, 242, 0.15) !important;
    box-shadow: 
        4px 6px 16px rgba(0, 0, 0, 0.5),
        -2px -2px 8px rgba(255, 255, 255, 0.03),
        inset 1px 1px 1px rgba(255, 255, 255, 0.05),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .sort-rule-item:hover,
[data-theme="dark"] .filter-rule-item:hover {
    background: linear-gradient(145deg, rgba(38, 52, 84, 0.75) 0%, rgba(17, 23, 38, 0.9) 100%) !important;
    border-color: rgba(92, 115, 242, 0.3) !important;
    box-shadow: 
        5px 10px 20px rgba(0, 0, 0, 0.6),
        -3px -3px 10px rgba(255, 255, 255, 0.05),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.05),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
}

.rule-priority,
.filter-icon-badge {
    width: 20px !important;
    height: 20px !important;
    background: var(--table-accent-color) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    flex-shrink: 0 !important;
}

.rule-priority {
    font-size: 0.75rem !important;
}

.filter-icon-badge {
    font-size: 0.68rem !important;
}

.rule-name { font-size: 0.80rem !important; font-weight: 650 !important; color: var(--text-main) !important; flex-grow: 1 !important; }

.rule-dir-toggle {
    background: color-mix(in srgb, var(--table-accent-color) 8%, transparent) !important;
    color: var(--table-accent-color) !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    font-size: 0.80rem !important;
}

.rule-value {
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    color: var(--table-accent-color) !important;
    background: color-mix(in srgb, var(--table-accent-color) 12%, transparent) !important;
    border-radius: 6px !important;
    padding: 2px 7px !important;
    font-family: 'Outfit', sans-serif !important;
}

.btn-remove-rule,
.btn-remove-filter {
    background: transparent !important;
    border: none !important;
    color: #ef4444 !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.btn-remove-rule:hover,
.btn-remove-filter:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    transform: scale(1.15) !important;
}


.btn-add-sort-trigger {
    width: auto !important;
    flex: 1 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    font-family: 'Outfit', sans-serif !important;
    border: none !important;
    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-add-sort-trigger: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: var(--text-main) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

[data-theme="dark"] .btn-add-sort-trigger {
    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;
    border: none !important;
    transform: none !important;
}

[data-theme="dark"] .btn-add-sort-trigger: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) !important;
    transform: scale(1.04) translateY(-1.5px) !important;
}

.btn-clear-all-sorts,
.btn-clear-all-filters {
    width: auto !important;
    flex: 1 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: 'Outfit', sans-serif !important;
    white-space: nowrap !important;
    text-align: center !important;
    border: none !important;
    background: linear-gradient(145deg, #dc2626 0%, #991b1b 100%) !important;
    color: #ffffff !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-clear-all-sorts:hover,
.btn-clear-all-filters:hover {
    background: linear-gradient(145deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow:
        0 6px 18px rgba(185, 28, 28, 0.45),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px) scale(1.02) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-clear-all-sorts,
[data-theme="dark"] .btn-clear-all-filters {
    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;
    border: none !important;
    transform: none !important;
}

[data-theme="dark"] .btn-clear-all-sorts:hover,
[data-theme="dark"] .btn-clear-all-filters: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;
}

/* --- 3D Multi-Select (Planificación) --- */
.otc-ms-trigger {
    width: 100% !important;
    min-height: 38px !important;
    padding: 6px 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important; 
    opacity: 0.9 !important;
    cursor: pointer !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    align-items: center !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.otc-ms-trigger:hover {
    border-color: var(--table-accent-color) !important;
    background: color-mix(in srgb, var(--table-accent-color) 4%, transparent) !important;
}

.otc-ms-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0;
    width: max-content !important;
    min-width: 500px !important;
    max-width: 850px !important;
    background: var(--panel-bg) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 25px !important;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.22) !important;
    padding: 12px !important;
    z-index: 5500 !important;
    display: none;
    flex-direction: column !important;
    gap: 4px !important;
    animation: sortIn 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.otc-ms-dropdown.open {
    display: flex !important;
}

.otc-multiselect-container.dropup .otc-ms-dropdown {
    top: auto !important;
    bottom: calc(100% + 8px) !important;
    box-shadow: 0 -25px 65px rgba(0, 0, 0, 0.22) !important;
}

.otc-multiselect-container.drop-left .otc-ms-dropdown {
    left: auto !important;
    right: 0 !important;
}

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

.otc-ms-item {
    padding: 11px 8px 11px 15px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 0.9rem !important;
    color: var(--text-main) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.otc-ms-item:hover {
    background: color-mix(in srgb, var(--table-accent-color) 8%, transparent) !important;
    color: var(--table-accent-color) !important;
}

.otc-ms-tag {
    background: var(--table-accent-color) !important;
    color: white !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    box-shadow: 0 3px 8px color-mix(in srgb, var(--table-accent-color) 30%, transparent) !important;
}

/* Badge Nuevo Logic */
.badge-nuevo {
    position: absolute !important;
    top: -8px !important;
    right: 2px !important; 
    background: transparent !important;
    color: #64748B !important; 
    opacity: 0.95;
    font-size: 0.7rem !important; /* Slightly larger */
    padding: 0 !important;
    font-weight: 500 !important; /* Less thick */
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.2px !important;
    line-height: 1 !important;
    z-index: 30 !important;
    pointer-events: none !important;
    text-transform: none !important;
}

/* Additional Dropup Support for all premium components and table cells */
.otc-td.dropup .otc-td-menu,
.otc-timepicker-container.dropup .otc-tp-dropdown,
.otc-multiselect-container.dropup .otc-ms-dropdown,
.otc-datepicker-wrapper.dropup .otc-dp-dropdown,
.otc-custom-mobile-dropdown.dropup .otc-td-menu {
    top: auto !important;
    bottom: 100% !important;
    box-shadow: 0 -25px 65px rgba(0, 0, 0, 0.22) !important;
    transform-origin: bottom left !important;
}

.otc-td-menu:not(.open),
.otc-ms-dropdown:not(.open),
.otc-tp-dropdown:not(.open),
.otc-dp-dropdown:not(.open) {
    display: none !important;
}

/* 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: linear-gradient(145deg, rgba(255, 255, 255, 1.0) 0%, rgba(240, 245, 255, 1.0) 100%) !important;
    border: 1px solid var(--panel-border) !important;
    will-change: transform, opacity;
    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;
}

/* 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: linear-gradient(145deg, rgba(26, 36, 54, 1.0) 0%, rgba(13, 17, 28, 1.0) 100%) !important;
    border: 1px solid var(--panel-border) !important;
    will-change: transform, opacity;
    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;
}


/* 5. Estandarización de Opciones para Todos los Menús de Tablas (Filtros, Celdas, Reloj y Asignación) */

/* Light Theme Options Style */
.sort-option,
.filter-option,
.otc-td-option,
.otc-ms-item,
.otc-tp-item,
.otc-picker-dropdown .otc-modal-btn {
    padding: 10px 14px !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.2s 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: color-mix(in srgb, var(--table-accent-color) 7%, transparent) !important;
    color: var(--table-accent-color) !important;
    transform: none !important;
}

/* .sort-option.active,
.filter-option.active,
.otc-td-option.selected,
.otc-ms-item.selected,
.otc-tp-item.active {
    background: color-mix(in srgb, var(--table-accent-color) 12%, transparent) !important;
    color: var(--table-accent-color) !important;
    font-weight: 700 !important;
} */

/* Dark Theme Options 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: var(--text-muted) !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(255, 255, 255, 0.06) !important;
    color: var(--table-accent-color) !important;
}

/* [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: color-mix(in srgb, var(--table-accent-color) 15%, transparent) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
} */



/* Day/Ball Selection Adapts */
[data-theme="dark"] .otc-ball-selector-item {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .otc-ball-selector-item span {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .otc-ball-selector-item:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: color-mix(in srgb, var(--table-accent-color) 50%, transparent) !important;
}

[data-theme="dark"] .otc-ball-selector-item:hover span {
    color: var(--text-main) !important;
}

/* Assignments actions bar adaptation */
[data-theme="dark"] .asig-actions-bar {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .btn-select-all-asig {
    color: var(--table-accent-color) !important;
}

[data-theme="dark"] .btn-select-all-asig:hover {
    background: var(--timeline-badge-bg) !important;
}

[data-theme="dark"] .btn-deselect-all-asig {
    color: #f87171 !important;
}

[data-theme="dark"] .btn-deselect-all-asig:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* Legibilidad de Canchas y Horas en la Columna de Asignaciones (Tema Oscuro) */
[data-theme="dark"] .asig-text-row {
    color: var(--text-main) !important;
}
[data-theme="dark"] .asig-text-row > span {
    color: var(--text-main) !important;
}
[data-theme="dark"] .asig-text-row > span:last-of-type {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .asig-text-row > span:nth-child(2),
[data-theme="dark"] .asig-text-row > span:nth-child(4) {
    color: var(--text-muted) !important; /* los puntos separadores · */
}

[data-theme="dark"] .otc-td-option.is-ms-item > div > span:first-of-type {
    color: var(--text-main) !important;
}
[data-theme="dark"] .otc-td-option.is-ms-item > div > span:last-of-type {
    color: var(--text-muted) !important;
}

/* Selección activa de asignaciones adaptada al tema de la sede */
/* .otc-td-option.is-ms-item.active {
    background: var(--timeline-badge-bg) !important;
    color: var(--table-accent-color) !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .otc-td-option.is-ms-item.active {
    background: var(--timeline-badge-bg) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
} */


/* ==========================================================================
   UNIFIED VENUE NEUMORPHIC 3D CONVEX FLOATING MENUS & OPTIONS (MASTER MAESTRO)
   ========================================================================== */

/* 1. Modo Claro: Opción SELECCIONADA Flotante y Elevada 3D ("Botón Suspendido con Estilo de Página") */
.sort-option.active,
.sort-option.selected,
.filter-option.active,
.filter-option.selected,
.otc-td-option.selected,
.otc-td-option.active,
.otc-td-option.checked,
.otc-ms-item.selected,
.otc-ms-item.active,
.otc-ms-item.checked,
.otc-tp-item.active,
.otc-tp-item.selected,
.otc-mobile-sheet-body .otc-td-option.selected,
.otc-mobile-sheet-body .otc-td-option.active,
.otc-mobile-sheet-body .otc-td-option.checked,
.otc-mobile-sheet-body .otc-ms-item.selected,
.otc-mobile-sheet-body .otc-ms-item.active,
.otc-mobile-sheet-body .otc-ms-item.checked,
.otc-mobile-sheet-body .otc-tp-item.active,
.otc-mobile-sheet-body .otc-tp-item.selected {
    background: linear-gradient(145deg, #ffffff 0%, #edf2f7 100%) !important;
    color: #5b6e94 !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    box-shadow:
        4px 6px 12px rgba(163, 177, 198, 0.45),
        -3px -3px 8px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px #ffffff !important;
    transform: translateY(-2px) !important;
    border: none !important;
}

/* Adaptación cromática de textos internos en Light Theme (100% Sin Azul, Texto Oscuro Elegante) */
.otc-td-option.is-ms-item.active div,
.otc-td-option.is-ms-item.active span,
.otc-td-option.is-ms-item.active .asig-text-row,
.otc-td-option.is-ms-item.active .asig-text-row span,
.otc-mobile-sheet-body .otc-td-option.selected div,
.otc-mobile-sheet-body .otc-td-option.selected span,
.otc-mobile-sheet-body .otc-td-option.active div,
.otc-mobile-sheet-body .otc-td-option.active span {
    color: #1e293b !important;
}

.otc-td-option.is-ms-item.active > div > span:last-of-type,
.otc-td-option.is-ms-item.active .asig-text-row span:last-of-type {
    color: #64748b !important;
}

.otc-td-option.is-ms-item.active .ms-check-indicator {
    color: #1e293b !important;
}

/* --- UNIFIED ASSIGNMENT OPTION CARDS (ALWAYS RESERVE FULL HEIGHT & FLEX COLUMN) --- */
.otc-mobile-sheet-body .otc-td-option.is-ms-item,
.otc-td-option.is-ms-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: auto !important;
    box-sizing: border-box !important;
    gap: 8px !important;
    padding: 12px 14px !important;
    margin-bottom: 8px !important;
    border-radius: 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.otc-mobile-sheet-body .otc-td-option.is-ms-item .asig-day-pills-container,
.otc-td-option.is-ms-item .asig-day-pills-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    padding-left: 28px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Day Pills Base Style inside assignment cards */
.asig-day-toggle.otc-day-pill {
    font-size: 0.72rem !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    font-family: 'Outfit', sans-serif !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.15s ease !important;
}

/* Active Day Pill (Encendido / Seleccionado) */
.asig-day-toggle.otc-day-pill:not(.is-off) {
    background: #ffffff !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Suspended / Off Day Pill (Apagado / Suspendido pero visible con su boton y pelota) */
.asig-day-toggle.otc-day-pill.is-off {
    background: rgba(255, 255, 255, 0.55) !important;
    color: #64748b !important;
    font-weight: 500 !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: none !important;
    opacity: 0.45 !important;
    filter: grayscale(0.2) !important;
}

[data-theme="dark"] .asig-day-toggle.otc-day-pill:not(.is-off) {
    background: #334155 !important;
    color: #f8fafc !important;
    font-weight: 700 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
    opacity: 1 !important;
    filter: none !important;
}

[data-theme="dark"] .asig-day-toggle.otc-day-pill.is-off {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    opacity: 0.45 !important;
    filter: grayscale(0.2) !important;
}

/* Unselected Assignment Option Card: Flat semi-transparent card reserving full height */
.otc-mobile-sheet-body .otc-td-option.is-ms-item:not(.selected):not(.active):not(.checked),
.otc-td-option.is-ms-item:not(.selected):not(.active):not(.checked) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    background: rgba(245, 247, 250, 0.75) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Dark Theme Unselected Assignment Option Card */
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option.is-ms-item:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-td-option.is-ms-item:not(.selected):not(.active):not(.checked) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    background: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Sin asignación option single row formatting */
.otc-mobile-sheet-body .otc-td-option.asig-none-option,
.otc-td-option.asig-none-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 14px !important;
    margin-bottom: 6px !important;
}

/* 2. Modo Oscuro: Opción SELECCIONADA Flotante 3D Neumórfica (Idéntica al Tema Claro: Neumorfismo de Sombra y Brillo) */
[data-theme="dark"] .sort-option.active,
[data-theme="dark"] .sort-option.selected,
[data-theme="dark"] .filter-option.active,
[data-theme="dark"] .filter-option.selected,
[data-theme="dark"] .otc-td-option.selected,
[data-theme="dark"] .otc-td-option.active,
[data-theme="dark"] .otc-td-option.checked,
[data-theme="dark"] .otc-ms-item.selected,
[data-theme="dark"] .otc-ms-item.active,
[data-theme="dark"] .otc-ms-item.checked,
[data-theme="dark"] .otc-tp-item.active,
[data-theme="dark"] .otc-tp-item.selected,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option.selected,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option.active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option.checked,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item.selected,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item.active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item.checked,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item.active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item.selected {
    background: linear-gradient(145deg, #253146 0%, #151d2a 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    box-shadow:
        4px 6px 14px rgba(0, 0, 0, 0.75),
        -2px -2px 6px rgba(255, 255, 255, 0.08),
        inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) !important;
    border: none !important;
}

/* Adaptación cromática de textos internos de ítems activos en Dark Theme */
[data-theme="dark"] .otc-td-option.is-ms-item.active div,
[data-theme="dark"] .otc-td-option.is-ms-item.active span,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option.selected div,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option.selected span,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option.active div,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option.active span {
    color: #ffffff !important;
}
[data-theme="dark"] .otc-td-option.is-ms-item.active > div > span:last-of-type {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* 3. Hacer las opciones de ordenar y filtrar (botones seleccionados) un poco más grandes y legibles */
.column-sort-bubble .sort-option,
.column-filter-bubble .filter-option {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 10px !important;
    gap: 10px !important;
}

.column-sort-bubble .sort-option.active,
.column-filter-bubble .filter-option.active {
    transform: translateY(-0.5px) !important; /* Desactivar scale(1.02) */
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
}

.column-sort-bubble .bubble-search-input,
.column-filter-bubble .bubble-search-input {
    font-size: 0.85rem !important;
    padding: 8px 12px !important;
}

/* 4. Estilos personalizados para los elementos de las tarjetas activas (Gris para textos/números sueltos, flecha azul original) */
/* Modo Claro */
.rule-priority {
    background: transparent !important;
    color: #64748b !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    margin-right: 4px !important;
    display: inline-block !important;
    box-shadow: none !important;
}

.rule-name {
    color: #64748b !important;
}

/* Modo Oscuro */
[data-theme="dark"] .rule-priority {
    color: #94a3b8 !important;
    background: transparent !important;
    box-shadow: none !important;
}

[data-theme="dark"] .rule-name {
    color: #94a3b8 !important;
}
/* 5. Ocultar la flecha de ordenación del encabezado para dejar solo el símbolo de filtro */
.btn-column-sort {
    display: none !important;
}

/* Modo Oscuro para el botón de filtro de columna neomórfico */
[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-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"] .sort-rank-badge {
    background: transparent !important;
    color: #cbd5e1 !important;
    box-shadow: none !important;
    border: none !important;
}

/* =========================================
   ESTILOS PROFESIONALES MOBILE BOTTOM SHEET
   ========================================= */
html.otc-sheet-open,
body.otc-sheet-open,
body.otc-sheet-open .dashboards-section,
body.otc-sheet-open .app-container,
body.otc-sheet-open .table-container,
body.otc-sheet-open .focus-content-grid,
body.otc-sheet-open main,
body.otc-sheet-open section {
    overflow: hidden !important;
    touch-action: none !important;
}

.otc-mobile-sheet-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.18s ease !important;
    will-change: opacity;
}

.otc-mobile-sheet-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.otc-mobile-sheet {
    width: 100% !important;
    max-width: 600px !important;
    height: fit-content !important;
    max-height: min(68dvh, 480px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 245, 255, 0.98) 100%) !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    border: 1px solid var(--panel-border) !important;
    border-bottom: none !important;
    box-shadow: 0 -15px 45px rgba(0, 0, 0, 0.3) !important;
    padding: 10px 14px 16px 14px !important;
    transform: translateY(100%) !important;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform;
    box-sizing: border-box !important;
}

.otc-mobile-sheet.is-tall-sheet {
    max-height: min(80dvh, 580px) !important;
}

[data-theme="dark"] .otc-mobile-sheet {
    background: linear-gradient(145deg, rgba(26, 36, 54, 0.98) 0%, rgba(13, 17, 28, 0.98) 100%) !important;
}

.otc-mobile-sheet-overlay.active .otc-mobile-sheet {
    transform: translateY(0) !important;
}

.otc-mobile-sheet-handle {
    width: 42px !important;
    height: 5px !important;
    background: rgba(148, 163, 184, 0.4) !important;
    border-radius: 10px !important;
    margin: 0 auto 14px auto !important;
}

.otc-mobile-sheet-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15) !important;
}

.otc-mobile-sheet-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    font-family: 'Outfit', sans-serif !important;
    color: var(--text-main) !important;
    margin: 0 !important;
    text-transform: none !important;
}

.otc-mobile-sheet-close {
    background: transparent !important;
    border: none !important;
    font-size: 1.6rem !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    padding: 0 6px !important;
    line-height: 1 !important;
}

.otc-mobile-sheet-body {
    max-height: calc(min(68dvh, 480px) - 55px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 1 !important;
    padding-right: 4px !important;
    box-sizing: border-box !important;
}

.otc-mobile-sheet.is-tall-sheet .otc-mobile-sheet-body {
    max-height: calc(min(80dvh, 580px) - 55px) !important;
}

.otc-mobile-sheet-body::-webkit-scrollbar {
    width: 5px !important;
}
.otc-mobile-sheet-body::-webkit-scrollbar-track {
    background: transparent !important;
}
.otc-mobile-sheet-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3) !important;
    border-radius: 10px !important;
}

.otc-mobile-sheet-body .otc-mobile-calendar-wrapper .otc-td-trigger,
.otc-mobile-sheet-body .otc-datepicker-wrapper .otc-td-trigger {
    display: none !important;
}

.otc-mobile-sheet-body .otc-mobile-calendar-wrapper .otc-dp-dropdown,
.otc-mobile-sheet-body .otc-datepicker-wrapper .otc-dp-dropdown {
    display: flex !important;
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
}

.otc-mobile-sheet-body .otc-td-menu,
.otc-mobile-sheet-body .otc-td-menu:not(.open),
.otc-mobile-sheet-body .otc-ms-dropdown,
.otc-mobile-sheet-body .otc-ms-dropdown:not(.open),
.otc-mobile-sheet-body .otc-tp-dropdown,
.otc-mobile-sheet-body .otc-tp-dropdown:not(.open),
.otc-mobile-sheet-body .otc-dp-dropdown,
.otc-mobile-sheet-body .otc-dp-dropdown:not(.open),
.otc-mobile-sheet-body .otc-picker-dropdown,
.otc-mobile-sheet-body .otc-picker-dropdown:not(.open),
.otc-mobile-sheet-body .column-filter-bubble,
.otc-mobile-sheet-body .column-sort-bubble,
.otc-mobile-sheet-body .sort-manager-panel,
.otc-mobile-sheet-body .profile-floating-card,
.otc-mobile-sheet-body .otc-edit-profile-mobile-container,
.otc-mobile-sheet-body .notifications-floating-card,
.otc-mobile-sheet-body .mobile-week-plan-container,
.otc-mobile-sheet-body .otc-mobile-form-container,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-menu,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-menu:not(.open),
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-dropdown,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-dropdown:not(.open),
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-dropdown,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-dropdown:not(.open),
[data-theme="dark"] .otc-mobile-sheet-body .otc-dp-dropdown,
[data-theme="dark"] .otc-mobile-sheet-body .otc-dp-dropdown:not(.open),
[data-theme="dark"] .otc-mobile-sheet-body .otc-picker-dropdown,
[data-theme="dark"] .otc-mobile-sheet-body .otc-picker-dropdown:not(.open),
[data-theme="dark"] .otc-mobile-sheet-body .column-filter-bubble,
[data-theme="dark"] .otc-mobile-sheet-body .column-sort-bubble,
[data-theme="dark"] .otc-mobile-sheet-body .sort-manager-panel,
[data-theme="dark"] .otc-mobile-sheet-body .profile-floating-card,
[data-theme="dark"] .otc-mobile-sheet-body .otc-edit-profile-mobile-container,
[data-theme="dark"] .otc-mobile-sheet-body .notifications-floating-card,
[data-theme="dark"] .otc-mobile-sheet-body .mobile-week-plan-container,
[data-theme="dark"] .otc-mobile-sheet-body .otc-mobile-form-container,
html[data-theme="dark"] body .otc-mobile-sheet-body .otc-td-menu,
html[data-theme="dark"] body .otc-mobile-sheet-body .column-filter-bubble,
html[data-theme="dark"] body .otc-mobile-sheet-body .sort-manager-panel,
html[data-theme="dark"] body .otc-mobile-sheet-body .profile-floating-card,
html[data-theme="dark"] body .otc-mobile-sheet-body .otc-edit-profile-mobile-container,
html[data-theme="dark"] body .otc-mobile-sheet-body .notifications-floating-card,
html[data-theme="dark"] body .otc-mobile-sheet-body .mobile-week-plan-container,
html[data-theme="dark"] body .otc-mobile-sheet-body .otc-mobile-form-container {
    display: flex !important;
    flex-direction: column !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 4px 2px 8px 2px !important;
    margin: 0 !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    animation: none !important;
    border-radius: 0 !important;
}

.otc-mobile-sheet-body .otc-dp-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 2px !important;
}

.otc-mobile-sheet-body .otc-dp-weekday {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding-bottom: 2px !important;
}

.otc-mobile-sheet-body .otc-dp-day {
    width: 100% !important;
    max-width: 34px !important;
    height: 32px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}

.otc-mobile-sheet-body .otc-dp-footer {
    margin-top: 6px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
}

/* =========================================
   MOBILE LANDSCAPE OPTIMIZATIONS (VERTICAL MOBILE STYLE REUSED)
   ========================================= */
@media (max-height: 600px), (orientation: landscape) and (max-width: 1024px) {
    /* 1. LEFT / RIGHT SELECTOR CONTAINERS */
    .dashboard-left-selector,
    .dashboard-right-selector {
        top: 50% !important;
        transform: translateY(-50%) !important;
        bottom: auto !important;
        height: auto !important;
        max-height: calc(100vh - 40px) !important;
        gap: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 100 !important;
    }

    /* Active & Inactive button styles matching portrait vertical mobile */
    .dashboard-left-selector .btn-sede.active,
    .dashboard-left-selector .btn-hour-select.active,
    .dashboard-right-selector .btn-day.active,
    .dashboard-right-selector .btn-calendar-icon.active,
    .dashboard-right-selector .dashboard-datepicker-trigger.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;
        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"] .dashboard-left-selector .btn-hour-select.active,
    [data-theme="dark"] .dashboard-right-selector .btn-day.active,
    [data-theme="dark"] .dashboard-right-selector .btn-calendar-icon.active,
    [data-theme="dark"] .dashboard-right-selector .dashboard-datepicker-trigger.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;
        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;
    }

    /* Stack Sede Buttons (VAT, CTC, BRU) */
    .dashboard-left-selector .sede-buttons-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        margin-bottom: 4px !important;
        flex-shrink: 0 !important;
    }

    .dashboard-left-selector .btn-sede {
        width: 34px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
        font-weight: 800 !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .dashboard-left-selector .dashboard-hour-selector {
        margin-top: 2px !important;
        gap: 4px !important;
        max-height: calc(100vh - 150px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 2px !important;
        padding-bottom: 4px !important;
        scrollbar-width: none !important;
    }

    .dashboard-left-selector .dashboard-hour-selector::-webkit-scrollbar {
        display: none !important;
    }

    .btn-hour-select {
        width: 36px !important;
        height: 32px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        padding: 2px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !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.45rem !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .dashboard-right-selector .btn-calendar-icon.small,
    .dashboard-right-selector .dashboard-datepicker-trigger {
        width: 32px !important;
        height: 32px !important;
        margin-bottom: 4px !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;
    }

    .calendar-days-vertical {
        margin-top: 2px !important;
        gap: 4px !important;
        max-height: calc(100vh - 110px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-bottom: 4px !important;
        scrollbar-width: none !important;
    }

    .calendar-days-vertical::-webkit-scrollbar {
        display: none !important;
    }

    .calendar-days-vertical .btn-day {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        padding: 2px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        font-family: 'Outfit', sans-serif !important;
    }

    .calendar-days-vertical .btn-day .day-name-mobile {
        font-size: 0.55rem !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        margin: 0 !important;
        text-transform: uppercase !important;
    }

    .calendar-days-vertical .btn-day .day-number {
        font-size: 0.55rem !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    /* Ultra-Compact Mobile Bottom Sheet in Landscape Mode */
    .otc-mobile-sheet {
        max-height: 96vh !important;
        padding: 6px 12px 8px 12px !important;
    }

    .otc-mobile-sheet-handle {
        width: 32px !important;
        height: 4px !important;
        margin: 0 auto 4px auto !important;
    }

    .otc-mobile-sheet-header {
        margin-bottom: 4px !important;
        padding-bottom: 4px !important;
    }

    .otc-mobile-sheet-title {
        font-size: 0.92rem !important;
    }

    .otc-mobile-sheet-close {
        font-size: 1.3rem !important;
    }

    .otc-mobile-sheet-body {
        max-height: calc(96vh - 42px) !important;
    }

    .otc-mobile-sheet-body .otc-dp-dropdown {
        padding: 2px 2px 4px 2px !important;
        gap: 4px !important;
    }

    .otc-mobile-sheet-body .otc-dp-grid {
        gap: 2px !important;
        margin-top: 2px !important;
    }

    .otc-mobile-sheet-body .otc-dp-weekday {
        font-size: 0.7rem !important;
        padding-bottom: 1px !important;
    }

    .otc-mobile-sheet-body .otc-dp-day {
        max-width: 28px !important;
        height: 26px !important;
        font-size: 0.78rem !important;
        border-radius: 6px !important;
    }

    .otc-mobile-sheet-body .otc-dp-footer {
        margin-top: 4px !important;
        padding-top: 2px !important;
        padding-bottom: 2px !important;
    }

    .otc-mobile-sheet-body .otc-td-option,
    .otc-mobile-sheet-body .otc-ms-item,
    .otc-mobile-sheet-body .otc-tp-item,
    .otc-mobile-sheet-body .filter-option,
    .otc-mobile-sheet-body .sort-option,
    .otc-mobile-sheet-body .sort-manager-option {
        min-height: 32px !important;
        padding: 6px 10px !important;
        font-size: 0.85rem !important;
        margin-bottom: 2px !important;
        border-radius: 8px !important;
    }
}

/* Opciones NO seleccionadas en Mobile Bottom Sheet: planas, transparentes sin botón 3D ni sombra (estilo PC) */
.otc-mobile-sheet-body .otc-td-option:not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .otc-ms-item:not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .filter-option:not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .sort-option:not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .sort-manager-option:not(.selected):not(.active):not(.checked),
.column-filter-bubble .filter-option:not(.selected):not(.active):not(.checked),
.column-sort-bubble .sort-option:not(.selected):not(.active):not(.checked),
.sort-manager-panel .sort-option:not(.selected):not(.active):not(.checked) {
    min-height: 44px !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
    margin-bottom: 4px !important;
    display: flex !important;
    align-items: center !important;
    opacity: 1 !important;
    color: var(--text-main, #1e293b) !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid transparent !important;
    transform: none !important;
    pointer-events: auto !important;
    transition: all 0.15s ease !important;
}

.otc-mobile-sheet-body .otc-td-option:not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .otc-ms-item:not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .filter-option:not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .sort-option:not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .sort-manager-option:not(.selected):not(.active):not(.checked):hover,
.column-filter-bubble .filter-option:not(.selected):not(.active):not(.checked):hover,
.column-sort-bubble .sort-option:not(.selected):not(.active):not(.checked):hover,
.sort-manager-panel .sort-option:not(.selected):not(.active):not(.checked):hover {
    background: color-mix(in srgb, var(--table-accent-color, #4f46e5) 8%, transparent) !important;
    color: var(--table-accent-color, #4f46e5) !important;
}

[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .filter-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .sort-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .sort-manager-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .column-filter-bubble .filter-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .column-sort-bubble .sort-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .sort-manager-panel .sort-option:not(.selected):not(.active):not(.checked) {
    color: #f1f5f9 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid transparent !important;
    transform: none !important;
}

[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option:not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item:not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option:not(.selected):not(.active):not(.checked):active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item:not(.selected):not(.active):not(.checked):active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked):active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--table-accent-color, #818cf8) !important;
}

/* Scrollbars personalizadas para desplegables y Mobile Bottom Sheet */
.otc-td-menu,
.otc-ms-dropdown,
.otc-tp-dropdown,
.otc-dp-dropdown,
.otc-custom-mobile-dropdown .otc-td-menu,
.otc-picker-dropdown,
.sort-manager-panel,
.column-filter-bubble,
.otc-mobile-sheet-body {
    scrollbar-width: thin !important;
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color) !important;
}

.otc-td-menu::-webkit-scrollbar,
.otc-ms-dropdown::-webkit-scrollbar,
.otc-tp-dropdown::-webkit-scrollbar,
.otc-dp-dropdown::-webkit-scrollbar,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar,
.otc-picker-dropdown::-webkit-scrollbar,
.sort-manager-panel::-webkit-scrollbar,
.column-filter-bubble::-webkit-scrollbar,
.otc-mobile-sheet-body::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

.otc-td-menu::-webkit-scrollbar-track,
.otc-ms-dropdown::-webkit-scrollbar-track,
.otc-tp-dropdown::-webkit-scrollbar-track,
.otc-dp-dropdown::-webkit-scrollbar-track,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-track,
.otc-picker-dropdown::-webkit-scrollbar-track,
.sort-manager-panel::-webkit-scrollbar-track,
.column-filter-bubble::-webkit-scrollbar-track,
.otc-mobile-sheet-body::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color) !important;
}

.otc-td-menu::-webkit-scrollbar-thumb,
.otc-ms-dropdown::-webkit-scrollbar-thumb,
.otc-tp-dropdown::-webkit-scrollbar-thumb,
.otc-dp-dropdown::-webkit-scrollbar-thumb,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-thumb,
.otc-picker-dropdown::-webkit-scrollbar-thumb,
.sort-manager-panel::-webkit-scrollbar-thumb,
.column-filter-bubble::-webkit-scrollbar-thumb,
.otc-mobile-sheet-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-color) !important;
    border-radius: 10px !important;
}

.otc-td-menu::-webkit-scrollbar-thumb:hover,
.otc-ms-dropdown::-webkit-scrollbar-thumb:hover,
.otc-tp-dropdown::-webkit-scrollbar-thumb:hover,
.otc-dp-dropdown::-webkit-scrollbar-thumb:hover,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-thumb:hover,
.otc-picker-dropdown::-webkit-scrollbar-thumb:hover,
.sort-manager-panel::-webkit-scrollbar-thumb:hover,
.column-filter-bubble::-webkit-scrollbar-thumb:hover,
.otc-mobile-sheet-body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover-color) !important;
}

/* Columna Fija (Sticky Column) para Tablas en Móviles */
@media (max-width: 768px) {
    .otc-data-table th:first-child,
    .otc-data-table td:first-child {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        background: var(--panel-bg) !important;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.12) !important;
    }
}

/* Footer del Calendario (Botones "Hoy" y "Borrar") */
.otc-dp-footer {
    display: flex !important;
    gap: 8px !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 10px !important;
    padding-top: 0 !important;
    width: 100% !important;
}

.otc-dp-footer .otc-modal-btn {
    flex: 1 !important;
}

/* Styling for Edit Profile & Profile Card inside Mobile Bottom Sheet */
    .otc-mobile-sheet-body .otc-dp-grid {
        gap: 2px !important;
        margin-top: 2px !important;
    }

    .otc-mobile-sheet-body .otc-dp-weekday {
        font-size: 0.7rem !important;
        padding-bottom: 1px !important;
    }

    .otc-mobile-sheet-body .otc-dp-day {
        max-width: 28px !important;
        height: 26px !important;
        font-size: 0.78rem !important;
        border-radius: 6px !important;
    }

    .otc-mobile-sheet-body .otc-dp-footer {
        margin-top: 4px !important;
        padding-top: 2px !important;
        padding-bottom: 2px !important;
    }

    .otc-mobile-sheet-body .otc-td-option:not(.is-ms-item),
    .otc-mobile-sheet-body .otc-ms-item:not(.is-ms-item),
    .otc-mobile-sheet-body .otc-tp-item,
    .otc-mobile-sheet-body .filter-option,
    .otc-mobile-sheet-body .sort-option,
    .otc-mobile-sheet-body .sort-manager-option {
        min-height: 32px !important;
        padding: 6px 10px !important;
        font-size: 0.85rem !important;
        margin-bottom: 2px !important;
        border-radius: 8px !important;
    }
}

/* Opciones NO seleccionadas en Mobile Bottom Sheet: planas, transparentes sin botón 3D ni sombra (estilo PC) */
[data-theme="dark"] .column-sort-bubble .sort-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .sort-manager-panel .sort-option:not(.selected):not(.active):not(.checked) {
    color: #f1f5f9 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid transparent !important;
    transform: none !important;
}

[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option:not(.is-ms-item):not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item:not(.is-ms-item):not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option:not(.is-ms-item):not(.selected):not(.active):not(.checked):active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item:not(.is-ms-item):not(.selected):not(.active):not(.checked):active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked):active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--table-accent-color, #818cf8) !important;
}

/* Scrollbars personalizadas para desplegables y Mobile Bottom Sheet */
.otc-td-menu,
.otc-ms-dropdown,
.otc-tp-dropdown,
.otc-dp-dropdown,
.otc-custom-mobile-dropdown .otc-td-menu,
.otc-picker-dropdown,
.sort-manager-panel,
.column-filter-bubble,
.otc-mobile-sheet-body {
    scrollbar-width: thin !important;
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color) !important;
}

.otc-td-menu::-webkit-scrollbar,
.otc-ms-dropdown::-webkit-scrollbar,
.otc-tp-dropdown::-webkit-scrollbar,
.otc-dp-dropdown::-webkit-scrollbar,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar,
.otc-picker-dropdown::-webkit-scrollbar,
.sort-manager-panel::-webkit-scrollbar,
.column-filter-bubble::-webkit-scrollbar,
.otc-mobile-sheet-body::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

.otc-td-menu::-webkit-scrollbar-track,
.otc-ms-dropdown::-webkit-scrollbar-track,
.otc-tp-dropdown::-webkit-scrollbar-track,
.otc-dp-dropdown::-webkit-scrollbar-track,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-track,
.otc-picker-dropdown::-webkit-scrollbar-track,
.sort-manager-panel::-webkit-scrollbar-track,
.column-filter-bubble::-webkit-scrollbar-track,
.otc-mobile-sheet-body::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color) !important;
}

.otc-td-menu::-webkit-scrollbar-thumb,
.otc-ms-dropdown::-webkit-scrollbar-thumb,
.otc-tp-dropdown::-webkit-scrollbar-thumb,
.otc-dp-dropdown::-webkit-scrollbar-thumb,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-thumb,
.otc-picker-dropdown::-webkit-scrollbar-thumb,
.sort-manager-panel::-webkit-scrollbar-thumb,
.column-filter-bubble::-webkit-scrollbar-thumb,
.otc-mobile-sheet-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-color) !important;
    border-radius: 10px !important;
}

.otc-td-menu::-webkit-scrollbar-thumb:hover,
.otc-ms-dropdown::-webkit-scrollbar-thumb:hover,
.otc-tp-dropdown::-webkit-scrollbar-thumb:hover,
.otc-dp-dropdown::-webkit-scrollbar-thumb:hover,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-thumb:hover,
.otc-picker-dropdown::-webkit-scrollbar-thumb:hover,
.sort-manager-panel::-webkit-scrollbar-thumb:hover,
.column-filter-bubble::-webkit-scrollbar-thumb:hover,
.otc-mobile-sheet-body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover-color) !important;
}

/* Columna Fija (Sticky Column) para Tablas en Móviles */
@media (max-width: 768px) {
    .otc-data-table th:first-child,
    .otc-data-table td:first-child {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        background: var(--panel-bg) !important;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.12) !important;
    }
}

/* Footer del Calendario (Botones "Hoy" y "Borrar") */
.otc-dp-footer {
    display: flex !important;
    gap: 8px !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 10px !important;
    padding-top: 0 !important;
    width: 100% !important;
}

.otc-dp-footer .otc-modal-btn {
    flex: 1 !important;
}

/* Styling for Edit Profile & Profile Card inside Mobile Bottom Sheet */
.otc-mobile-sheet-body .otc-edit-profile-mobile-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 !important;
}

.otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="text"],
.otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="email"],
.otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="password"] {
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    font-size: 0.9rem !important;
    font-family: 'Outfit', sans-serif !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--text-main) !important;
    outline: none !important;
}

[data-theme="dark"] .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="text"],
[data-theme="dark"] .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="email"],
[data-theme="dark"] .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="password"] {
    background: rgba(21, 29, 42, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Landscape Mode Adjustments for Profile & Edit Profile Sheets */
@media (max-height: 600px), (orientation: landscape) and (max-width: 1024px) {
    .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="text"],
    .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="email"],
}

/* Opciones NO seleccionadas en Mobile Bottom Sheet: planas, transparentes sin botón 3D ni sombra (estilo PC) */
.otc-mobile-sheet-body .otc-td-option:not(.is-ms-item):not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .otc-ms-item:not(.is-ms-item):not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .filter-option:not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .sort-option:not(.selected):not(.active):not(.checked),
.otc-mobile-sheet-body .sort-manager-option:not(.selected):not(.active):not(.checked),
.column-filter-bubble .filter-option:not(.selected):not(.active):not(.checked),
.column-sort-bubble .sort-option:not(.selected):not(.active):not(.checked),
.sort-manager-panel .sort-option:not(.selected):not(.active):not(.checked) {
    min-height: 44px !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
    margin-bottom: 4px !important;
    display: flex !important;
    align-items: center !important;
    opacity: 1 !important;
    color: var(--text-main, #1e293b) !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid transparent !important;
    transform: none !important;
    pointer-events: auto !important;
    transition: all 0.15s ease !important;
}

.otc-mobile-sheet-body .otc-td-option:not(.is-ms-item):not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .otc-ms-item:not(.is-ms-item):not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .filter-option:not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .sort-option:not(.selected):not(.active):not(.checked):hover,
.otc-mobile-sheet-body .sort-manager-option:not(.selected):not(.active):not(.checked):hover,
.column-filter-bubble .filter-option:not(.selected):not(.active):not(.checked):hover,
.column-sort-bubble .sort-option:not(.selected):not(.active):not(.checked):hover,
.sort-manager-panel .sort-option:not(.selected):not(.active):not(.checked):hover {
    background: color-mix(in srgb, var(--table-accent-color, #4f46e5) 8%, transparent) !important;
    color: var(--table-accent-color, #4f46e5) !important;
}

[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option:not(.is-ms-item):not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item:not(.is-ms-item):not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .filter-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .sort-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .otc-mobile-sheet-body .sort-manager-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .column-filter-bubble .filter-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .column-sort-bubble .sort-option:not(.selected):not(.active):not(.checked),
[data-theme="dark"] .sort-manager-panel .sort-option:not(.selected):not(.active):not(.checked) {
    color: #f1f5f9 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid transparent !important;
    transform: none !important;
}

[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option:not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item:not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked):hover,
[data-theme="dark"] .otc-mobile-sheet-body .otc-td-option:not(.selected):not(.active):not(.checked):active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-ms-item:not(.selected):not(.active):not(.checked):active,
[data-theme="dark"] .otc-mobile-sheet-body .otc-tp-item:not(.selected):not(.active):not(.checked):active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--table-accent-color, #818cf8) !important;
}

/* Scrollbars personalizadas para desplegables y Mobile Bottom Sheet */
.otc-td-menu,
.otc-ms-dropdown,
.otc-tp-dropdown,
.otc-dp-dropdown,
.otc-custom-mobile-dropdown .otc-td-menu,
.otc-picker-dropdown,
.sort-manager-panel,
.column-filter-bubble,
.otc-mobile-sheet-body {
    scrollbar-width: thin !important;
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color) !important;
}

.otc-td-menu::-webkit-scrollbar,
.otc-ms-dropdown::-webkit-scrollbar,
.otc-tp-dropdown::-webkit-scrollbar,
.otc-dp-dropdown::-webkit-scrollbar,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar,
.otc-picker-dropdown::-webkit-scrollbar,
.sort-manager-panel::-webkit-scrollbar,
.column-filter-bubble::-webkit-scrollbar,
.otc-mobile-sheet-body::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

.otc-td-menu::-webkit-scrollbar-track,
.otc-ms-dropdown::-webkit-scrollbar-track,
.otc-tp-dropdown::-webkit-scrollbar-track,
.otc-dp-dropdown::-webkit-scrollbar-track,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-track,
.otc-picker-dropdown::-webkit-scrollbar-track,
.sort-manager-panel::-webkit-scrollbar-track,
.column-filter-bubble::-webkit-scrollbar-track,
.otc-mobile-sheet-body::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color) !important;
}

.otc-td-menu::-webkit-scrollbar-thumb,
.otc-ms-dropdown::-webkit-scrollbar-thumb,
.otc-tp-dropdown::-webkit-scrollbar-thumb,
.otc-dp-dropdown::-webkit-scrollbar-thumb,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-thumb,
.otc-picker-dropdown::-webkit-scrollbar-thumb,
.sort-manager-panel::-webkit-scrollbar-thumb,
.column-filter-bubble::-webkit-scrollbar-thumb,
.otc-mobile-sheet-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-color) !important;
    border-radius: 10px !important;
}

.otc-td-menu::-webkit-scrollbar-thumb:hover,
.otc-ms-dropdown::-webkit-scrollbar-thumb:hover,
.otc-tp-dropdown::-webkit-scrollbar-thumb:hover,
.otc-dp-dropdown::-webkit-scrollbar-thumb:hover,
.otc-custom-mobile-dropdown .otc-td-menu::-webkit-scrollbar-thumb:hover,
.otc-picker-dropdown::-webkit-scrollbar-thumb:hover,
.sort-manager-panel::-webkit-scrollbar-thumb:hover,
.column-filter-bubble::-webkit-scrollbar-thumb:hover,
.otc-mobile-sheet-body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover-color) !important;
}

/* Columna Fija (Sticky Column) para Tablas en Móviles deshabilitada (igual que en PC) */
@media (max-width: 768px) {
    .otc-data-table th:first-child,
    .otc-data-table td:first-child {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        box-shadow: none !important;
    }
}

/* Footer del Calendario (Botones "Hoy" y "Borrar") */
.otc-dp-footer {
    display: flex !important;
    gap: 8px !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 10px !important;
    padding-top: 0 !important;
    width: 100% !important;
}

.otc-dp-footer .otc-modal-btn {
    flex: 1 !important;
}

/* Styling for Edit Profile & Profile Card inside Mobile Bottom Sheet */
.otc-mobile-sheet-body .otc-edit-profile-mobile-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 !important;
}

.otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="text"],
.otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="email"],
.otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="password"] {
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    font-size: 0.9rem !important;
    font-family: 'Outfit', sans-serif !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--text-main) !important;
    outline: none !important;
}

[data-theme="dark"] .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="text"],
[data-theme="dark"] .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="email"],
[data-theme="dark"] .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="password"] {
    background: rgba(21, 29, 42, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Landscape Mode Adjustments for Profile & Edit Profile Sheets */
@media (max-height: 600px), (orientation: landscape) and (max-width: 1024px) {
    .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="text"],
    .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="email"],
    .otc-mobile-sheet-body .otc-edit-profile-mobile-container input[type="password"] {
        padding: 6px 10px !important;
        font-size: 0.82rem !important;
    }

    .otc-mobile-sheet-body .profile-card-actions .btn-profile-card-action,
    .otc-mobile-sheet-body .otc-edit-profile-mobile-container .btn-profile-card-action {
        height: 36px !important;
        font-size: 0.85rem !important;
    }
}

/* Styling for Notifications Inbox inside Mobile Bottom Sheet */
.otc-mobile-sheet-body .notifications-floating-card {
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.otc-mobile-sheet-body .notifications-floating-card .notifications-card-header {
    display: none !important;
}

.otc-mobile-sheet-body .notifications-list {
    max-height: calc(85vh - 70px) !important;
    overflow-y: auto !important;
    width: 100% !important;
}

/* Styling for Court Asistencia & Spotlight inside Mobile Bottom Sheet */
.otc-mobile-sheet-body .otc-court-mobile-sheet-content {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 0 !important;
}

.otc-mobile-sheet-body .focus-court-preview-mobile {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.otc-mobile-sheet-body .focus-court-preview-mobile .court-card {
    width: 100% !important;
    max-width: 270px !important;
    margin: 0 auto !important;
    pointer-events: auto !important;
}

.otc-mobile-sheet-body .focus-sidebar-mobile {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.otc-mobile-sheet-body .attendance-pill {
    min-height: 40px !important;
    padding: 8px 14px !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

/* Grid Dinámico Auto-Adaptable para Planificación Semanal en Móvil (Portrait y Landscape) */
.otc-mobile-sheet-body .mobile-week-plan-container {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    padding: 2px !important;
}

.otc-mobile-sheet-body .mobile-week-plan-container .ball-plan-card {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 12px 14px !important;
}

@media (max-height: 600px), (orientation: landscape) and (max-width: 1024px) {
    .otc-mobile-sheet-body .focus-court-preview-mobile .court-card {
        max-width: 280px !important;
    }
    .otc-mobile-sheet-body .attendance-pill {
        min-height: 34px !important;
        font-size: 0.82rem !important;
        padding: 4px 10px !important;
    }

    .otc-mobile-sheet-body .mobile-week-plan-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
    }

    /* Forzar visibilidad de las listas desplegables superiores de Mes y Sede en modo horizontal */
    .timeline-month-nav,
    .timeline-side-selector,
    .dashboard-left-selector,
    .dashboard-right-selector {
        display: none !important;
    }

    .timeline-mobile-dropdowns {
        display: flex !important;
    }

    /* Remover tarjeta flotante de la línea de tiempo en móvil (vertical y horizontal) */
    .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;
    }

    .otc-mobile-sheet-body .otc-add-clase-mobile-container #add-clase-form {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .otc-mobile-sheet-body .otc-add-clase-mobile-container button[type="submit"] {
        grid-column: 1 / -1 !important;
    }
}

.otc-mobile-sheet-body .otc-add-clase-mobile-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 6px 16px 16px 16px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

/* Styling for Sub-sheet Options List in Mobile */
.otc-mobile-sheet-body .otc-mobile-sheet-options-list {
    width: 100% !important;
    max-height: calc(85vh - 70px) !important;
    overflow-y: auto !important;
}

.otc-mobile-sheet-body .otc-mobile-sheet-options-list .otc-td-option:hover,
.otc-mobile-sheet-body .otc-mobile-sheet-options-list .otc-td-option:active {
    background: rgba(43, 67, 241, 0.12) !important;
}

/* Custom Dropdown Adjustments inside Modals to match table style and not overflow */
.profesor-modal-select-wrapper .otc-td-menu,
.admin-dest-modal-select-wrapper .otc-td-menu,
.sede-modal-select-wrapper .otc-td-menu {
    max-height: 220px !important;
    overflow-y: auto !important;
    width: auto !important;
    min-width: 280px !important;
    max-width: 100% !important;
}

/* Make calendar dropdown even more compact inside modals to prevent clipping */
.otc-modal .otc-dp-dropdown {
    min-width: 230px !important;
    padding: 8px !important;
    gap: 6px !important;
    border-radius: 14px !important;
}

.otc-modal .otc-dp-title {
    font-size: 0.90rem !important;
}
.otc-modal .otc-dp-btn {
    width: 24px !important;
    height: 24px !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #99a8be !important;
    font-size: 1.1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.otc-modal .otc-dp-btn:hover {
    background: transparent !important;
    border: none !important;
    color: #5b6e94 !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
}

[data-theme="dark"] .otc-modal .otc-dp-btn {
    background: transparent !important;
    border: none !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .otc-modal .otc-dp-btn:hover {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
}
.otc-modal .otc-dp-weekday {
    font-size: 0.60rem !important;
    padding: 1px 0 !important;
}

.otc-modal .otc-dp-day {
    font-size: 0.75rem !important;
    border-radius: 6px !important;
}

/* Remove sunken (inset shadow) style from Date trigger and footer buttons in modals */
.otc-modal .clases-privadas-dp-wrapper .otc-td-trigger,
#otc-add-clase-modal .clases-privadas-dp-wrapper .otc-td-trigger {
    box-shadow: none !important;
    background: rgba(43, 67, 241, 0.05) !important;
    border: 1.5px solid rgba(43, 67, 241, 0.18) !important;
}

.otc-modal .clases-privadas-dp-wrapper .otc-td-trigger:hover,
#otc-add-clase-modal .clases-privadas-dp-wrapper .otc-td-trigger:hover {
    box-shadow: 0 4px 12px rgba(163, 177, 198, 0.2) !important;
    transform: translateY(-2px) scale(1.01) !important;
}

.otc-modal .clases-privadas-dp-wrapper .otc-dp-footer button.otc-modal-btn,
#otc-add-clase-modal .clases-privadas-dp-wrapper .otc-dp-footer button.otc-modal-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #99a8be !important;
    font-weight: 700 !important;
    height: auto !important;
    width: auto !important;
    padding: 0 !important;
    transform: none !important;
    display: inline-block !important;
    cursor: pointer !important;
}

.otc-modal .clases-privadas-dp-wrapper .otc-dp-footer button.otc-modal-btn:hover,
#otc-add-clase-modal .clases-privadas-dp-wrapper .otc-dp-footer button.otc-modal-btn:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #5b6e94 !important;
    font-weight: 800 !important;
    transform: scale(1.08) !important;
}

/* Styling for TimePicker footer and clear button */
.otc-tp-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;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
}

.otc-tp-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-tp-footer .otc-modal-btn {
    color: #94a3b8 !important;
}

[data-theme="dark"] .otc-tp-footer .otc-modal-btn:hover {
    color: #e2e8f0 !important;
}

/* Fix datepicker day hover effect in modals to match table styles (no blue background, scale transition instead) */
.otc-modal .otc-dp-day:hover:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.15) !important;
    color: #5b6e94 !important;
}

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

/* Make "Hoy" and "Borrar" buttons in modal calendars smaller and proportional */
.otc-modal .otc-dp-footer button.otc-modal-btn,
#otc-add-clase-modal .clases-privadas-dp-wrapper .otc-dp-footer button.otc-modal-btn {
    font-size: 0.8rem !important;
}

/* Center alignment and equal sizing for TimePicker columns */
.otc-tp-cols,
.otc-tp-cols-container {
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    align-items: stretch !important;
}

.otc-tp-col {
    flex: 1 !important;
    min-width: 52px !important;
    max-width: 60px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    max-height: 180px !important;
    overflow-y: auto !important;
    padding-right: 3px !important;
    box-sizing: border-box !important;
}

.otc-tp-col::-webkit-scrollbar {
    width: 3px !important;
}

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

[data-theme="dark"] .otc-tp-col::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Perfect centering for numbers and periods inside timepicker buttons */
.otc-tp-item,
.otc-tp-unit {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.82rem !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
}

/* Hover State */
.otc-tp-item:hover,
.otc-tp-unit:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #5b6e94 !important;
    border-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .otc-tp-item:hover,
[data-theme="dark"] .otc-tp-unit:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

/* Precise and Clean selected active style (very subtle/fine neumorphic shadow and glow) */
.otc-tp-item.active,
.otc-tp-unit.active {
    background: linear-gradient(145deg, #ffffff 0%, #edf2f7 100%) !important;
    border: none !important;
    color: #5b6e94 !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    box-shadow:
        1px 2px 4px rgba(163, 177, 198, 0.35),
        -1px -1px 3px rgba(255, 255, 255, 0.9),
        inset 1px 1px 1px #ffffff !important;
    transform: translateY(-0.5px) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

[data-theme="dark"] .otc-tp-item.active,
[data-theme="dark"] .otc-tp-unit.active {
    background: linear-gradient(145deg, #253146 0%, #151d2a 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    box-shadow:
        1px 2px 4px rgba(0, 0, 0, 0.5),
        -1px -1px 3px rgba(255, 255, 255, 0.04),
        inset 1px 1px 1px rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-0.5px) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ── Mobile Bottom Sheet: Timepicker (tabla canchas) layout overrides ── */
/* The .otc-td-menu inherits overflow:visible from the sheet, which breaks the
   otc-tp-col scrolling. These rules restore the correct layout inside a sheet. */
.otc-mobile-sheet-body .otc-td-menu.is-time,
.otc-mobile-sheet-body .otc-td-menu.open {
    gap: 0 !important;
    padding: 0 !important;
}

.otc-mobile-sheet-body .otc-tp-cols {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    justify-content: center !important;
    align-items: stretch !important;
    width: 100% !important;
}

.otc-mobile-sheet-body .otc-tp-col {
    flex: 1 !important;
    min-width: 52px !important;
    max-width: 80px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
}

.otc-mobile-sheet-body .otc-tp-footer {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 16px !important;
    padding-top: 10px !important;
    border-top: none !important;
    background: transparent !important;
}

.otc-mobile-sheet-body .otc-tp-footer .otc-modal-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
}

/* ==========================================================================
   FIX: UNIFIED MOBILE ASSIGNMENT CARD & DAY PILLS ANTI-OVERLAP LAYOUT
   ========================================================================== */
.otc-mobile-sheet-body .otc-asig-options-scroll,
.otc-asig-options-scroll {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    max-height: 58vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

.otc-mobile-sheet-body .otc-td-option.is-ms-item,
.otc-td-option.is-ms-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    position: relative !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    padding: 10px 14px !important;
    margin-bottom: 8px !important;
    border-radius: 12px !important;
}

.otc-mobile-sheet-body .otc-td-option.is-ms-item > div:first-child,
.otc-td-option.is-ms-item > div:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    position: relative !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.otc-mobile-sheet-body .otc-td-option.is-ms-item .asig-day-pills-container,
.otc-td-option.is-ms-item .asig-day-pills-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
    padding-left: 32px !important;
    gap: 4px 6px !important;
    clear: both !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    min-height: auto !important;
}

.otc-mobile-sheet-body .asig-day-toggle.otc-day-pill,
.otc-td-option.is-ms-item .asig-day-toggle.otc-day-pill,
.asig-day-toggle.otc-day-pill {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    float: none !important;
    margin: 2px !important;
    font-size: 0.72rem !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

/* ==========================================================================
   UNIFICADOR GLOBAL DE TIPOGRAFÍA — Slate-Gray Palette
   Light mode: --text-main #334155 / --text-muted #64748b
   Dark  mode: --text-main #cbd5e1 / --text-muted #94a3b8
   ========================================================================== */

/* Celdas de tabla */
.otc-table td, .table-body td, .table-row td,
.student-row td, .prof-row td {
    color: var(--text-main) !important;
}
/* Cabeceras de columna */
.otc-table th, .table-head th, thead > tr > th {
    color: var(--text-muted) !important;
}
/* Opciones de dropdown/menú - texto primario */
.otc-td-option,
.otc-td-option > div,
.otc-td-option > span,
.otc-td-option .asig-text-row,
.otc-td-option .asig-text-row span:first-of-type {
    color: var(--text-main) !important;
}
/* Subtexto secundario */
.otc-td-option .asig-text-row span:last-of-type,
.otc-td-option small {
    color: var(--text-muted) !important;
}
/* Botones sort/filter de columna */
.btn-column-sort, .btn-column-filter, .btn-filter-manage {
    color: var(--text-muted) !important;
}
/* Botón dropdown selector */
.otc-custom-dropdown-btn {
    color: var(--text-main) !important;
}
/* Etiquetas de filtros activos */
.active-filter-tag, .filter-chip, [class*="filter-tag"] {
    color: var(--text-muted) !important;
}
/* Inputs de búsqueda en tablas */
input[type="search"], .table-search-input, .filter-input {
    color: var(--text-main) !important;
}
input[type="search"]::placeholder,
.table-search-input::placeholder,
.filter-input::placeholder {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}
/* Overrides modo oscuro */
[data-theme="dark"] .otc-table td,
[data-theme="dark"] .table-body td {
    color: var(--text-main) !important;
}
[data-theme="dark"] .otc-table th,
[data-theme="dark"] thead > tr > th {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .otc-td-option,
[data-theme="dark"] .otc-td-option > div,
[data-theme="dark"] .otc-td-option > span {
    color: var(--text-main) !important;
}
[data-theme="dark"] .btn-column-sort,
[data-theme="dark"] .btn-column-filter,
[data-theme="dark"] .btn-filter-manage {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .otc-custom-dropdown-btn {
    color: var(--text-main) !important;
}

