/* 📡 Ángulo animable del anillo de sync de asistencia (efecto "líquido en el
   tubo"). @property debe registrarse a nivel raíz para que la animación del
   conic-gradient interpole en vez de saltar. */
@property --cloud-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

        /* ==========================================================================
   📊 TABLAS RESPONSIVAS - Scroll horizontal con indicador visual
   ========================================================================== */
.responsive-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Sombras laterales que indican que hay más contenido al lado */
    background:
        linear-gradient(to right, #0f172a 30%, rgba(15, 23, 42, 0)) left center / 24px 100% no-repeat,
        linear-gradient(to left, #0f172a 30%, rgba(15, 23, 42, 0)) right center / 24px 100% no-repeat,
        radial-gradient(ellipse at left, rgba(6, 182, 212, 0.18), transparent 70%) left center / 24px 100% no-repeat,
        radial-gradient(ellipse at right, rgba(6, 182, 212, 0.18), transparent 70%) right center / 24px 100% no-repeat;
    background-attachment: local, local, scroll, scroll;
    border-radius: 8px;
}
.responsive-table-wrapper table {
    min-width: 600px;
}
@media (max-width: 640px) {
    .responsive-table-wrapper table {
        font-size: 0.8rem;
    }
    .responsive-table-wrapper th,
    .responsive-table-wrapper td {
        padding: 8px !important;
    }
}

        /* ==========================================================================
   ♿ ACCESIBILIDAD - Touch targets mínimos (WCAG 2.5.5 Target Size AAA)
   En dispositivos táctiles, todo botón debe ser ≥ 44×44px
   ========================================================================== */
@media (pointer: coarse) {
    button:not(.modal-close):not(.notif-close):not(.filter-pill-btn):not([data-no-min-target]),
    [role="button"]:not([data-no-min-target]),
    a.btn,
    .view-btn,
    .header-icon-btn,
    .modal-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

        /* ==========================================================================
   🚀 P4-OPT: PANTALLA DE CARGA (MODERN DESIGN)
   ========================================================================== */
#app-loader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc; /* Color pizarra suave */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* ⚡ OPT: Transición solo al ocultar (fade-out), entrada instantánea */
    transition: opacity 0.4s ease-out, visibility 0.4s;
}

#app-loader.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in, visibility 0.4s;
}

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

.loader-dots {
    display: flex;
    gap: 8px;
}

.loader-dots span {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.2s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }

.loader-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #475569;
    text-transform: uppercase;
    animation: pulse-text 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}


        body {
            background: #000;
            min-height: 100vh;
            color: #f1f5f9;
        }

        body.has-bottom-nav {
            padding-bottom: 80px;
            /* Espacio para el menú inferior moderno de 70px */
        }

        body.has-bottom-bar-weekly {
            padding-bottom: 60px;
            /* Espacio exacto para la nueva barra de fechas semanal */
        }

        :root {
            --header-height: 0px;
            --bottom-nav-offset: 85px;
            /* Altura por defecto sobre el menú (70px + 15px) */
        }

        .container {
            width: 100%;
            padding: 0 12px;
            max-width: 100%;

        }

        /* 📱 CONTROLES DE VISTA (NAVEGACIÓN INTERNA) */
        .view-controls {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 12px;
            width: 100%;
            margin-bottom: 16px;
        }

        .view-btn {
            background: #1e293b;
            border: 1px solid #334155;
            color: #94a3b8;
            padding: 12px 16px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
        }

        .view-btn.active {
            background: #06b6d4;
            color: #000;
            border-color: #06b6d4;
        }





        /* Scrollbar moderno (Mini-mapa) */
        .modern-scroll::-webkit-scrollbar {
            height: 6px;
            width: 8px;
            /* Un poco más ancho para los indicadores */
        }

        .modern-scroll::-webkit-scrollbar-track {
            background: #0f172a;
            border-left: 1px solid #1e293b;
        }

        .modern-scroll::-webkit-scrollbar-thumb {
            background: #334155;
            border-radius: 10px;
            border: 2px solid #0f172a;
            /* Efecto de padding interno */
        }

        .modern-scroll::-webkit-scrollbar-thumb:hover {
            background: #06b6d4;
        }

        /* Contenedor del Mini-mapa Interactivo */
        .scrollbar-indicator-container {
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 10px;
            pointer-events: none;
            z-index: 9999;
            opacity: 1;
            transition: opacity 0.3s ease, width 0.2s ease;
            background: rgba(15, 23, 42, 0.2);
            /* Sutil carril visible */
            border-left: 1px solid rgba(255, 255, 255, 0.05);
        }

        .scrollbar-indicator-container.mode-on-scroll {
            opacity: 0;
        }

        .scrollbar-indicator-container.mode-on-scroll.scrolling,
        .scrollbar-indicator-container.mode-on-scroll:hover {
            opacity: 1;
            width: 12px;
            /* Se agranda al interactuar */
        }

        .scrollbar-indicator-container.mode-hidden {
            display: none;
        }

        /* Variante para Scroll de Página (Fixed) */
        .scrollbar-indicator-container.mode-fixed {
            position: fixed;
            right: 0;
            top: 0;
            bottom: 0;
            z-index: 10000;
            background: rgba(15, 23, 42, 0.4);
            border-left: 1px solid rgba(255, 255, 255, 0.1);
        }

        .scroll-indicator {
            position: absolute;
            right: 1px;
            width: 6px;
            /* Más ancho para parecer una marca de IDE */
            height: 2px;
            /* Altura de barra horizontal */
            border-radius: 1px;
            transform: translateY(-50%);
            box-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
            transition: all 0.2s ease;
        }

        .scrollbar-indicator-container:hover .scroll-indicator {
            width: 10px;
            right: 1px;
            height: 3px;
        }

        /* Colores Neón (IDE Style) */
        .scroll-indicator.regular {
            background: #10b981;
            /* Verde esmeralda */
            box-shadow: 0 0 5px rgba(16, 185, 129, 0.6);
        }

        .scroll-indicator.absent {
            background: #ff4d4d;
            box-shadow: 0 0 5px rgba(255, 77, 77, 0.6);
        }

        .scroll-indicator.extra {
            background: #00d9ff;
            box-shadow: 0 0 5px rgba(0, 217, 255, 0.6);
        }

        .scroll-indicator.holiday {
            background: #ffcc00;
            box-shadow: 0 0 4px rgba(255, 204, 0, 0.5);
        }

        .scroll-indicator.note {
            background: #ffffff;
            box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
            width: 3px;
            /* Más sutil para notas */
        }

        .scroll-indicator.multiposition {
            background: #bf00ff;
            box-shadow: 0 0 5px rgba(191, 0, 255, 0.6);
        }

        .scroll-indicator.pending {
            background: #4b5563;
            /* Gris medio (Slate 600) */
            box-shadow: 0 0 3px rgba(75, 85, 99, 0.4);
            opacity: 0.6;
        }

        /* Animación para la aparición de indicadores */
        @keyframes indicatorFadeIn {
            from {
                opacity: 0;
                transform: scale(0.5) translateY(-50%);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(-50%);
            }
        }

        .scroll-indicator {
            animation: indicatorFadeIn 0.3s ease-out;
        }

        @media (min-width: 768px) {
            .container {
                max-width: 80rem;
                margin: 0 auto;
                padding: 0 24px;
            }
        }

        /* --- MODO SCROLL DE PÁGINA (VISTA DIARIA) --- */
        .day-view-page-mode {
            padding-bottom: 60px;
            /* Espacio para que no lo tape el footer/controles */
        }

        .sticky-controls-wrapper {
            position: sticky;
            top: 0;
            z-index: 20;
            pointer-events: auto;
            background: rgba(15, 23, 42, 0.85);
            /* Glassmorphism */
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            padding: 10px 0;
            margin-top: -10px;
            border-bottom: 1px solid rgba(51, 65, 85, 0.5);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }

        /* Asegurar que la lista no tenga altura fija en modo página */
        .day-view-page-mode .employee-list.sticky-table-container {
            max-height: none !important;
            overflow: visible !important;
        }

        /* --- GLOBAL BUTTONS --- */
        .btn {
            padding: 10px 20px;
            border-radius: 10px;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            border: none;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            text-decoration: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, #06b6d4, #10b981);
            color: #000;
        }

        .btn-primary:active {
            transform: scale(0.98);
        }

        .btn-secondary {
            background: #1e293b;
            color: #f1f5f9;
            border: 2px solid #334155;
        }

        .btn-secondary:hover {
            border-color: #475569;
            background: #334155;
        }

        /* --- GLOBAL NAVIGATION TABS --- */
        .nav-tabs {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            scrollbar-width: none;
            padding: 4px 0;
            margin-bottom: 20px;
        }

        .nav-tabs::-webkit-scrollbar {
            display: none;
        }

        .nav-tab {
            padding: 8px 16px;
            border-radius: 10px;
            background: #1e293b;
            border: 2px solid #334155;
            color: #94a3b8;
            font-size: 0.875rem;
            font-weight: 700;
            white-space: nowrap;
            flex-shrink: 0;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .nav-tab.active {
            background: #06b6d4;
            color: #1a1a1a;
            border-color: #06b6d4;
            box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
        }

        /* ⚡ Responsive Navigation Tabs Hotfix */
        @media (max-width: 768px) {
            .nav-tabs {
                gap: 6px;
            }

            .nav-tab {
                flex: 0 0 auto;
                padding: 10px;
                min-width: 48px;
                justify-content: center;
            }

            .nav-tab:not(.active) .tab-text {
                display: none;
            }

            .nav-tab.active {
                flex: 1 1 auto;
                min-width: 120px;
            }
        }

        /* --- FORM STYLES --- */
        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 700;
            color: #94a3b8;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .form-input {
            width: 100%;
            background: #0f172a;
            border: 2px solid #334155;
            color: #f1f5f9;
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 0.95rem;
            outline: none;
            transition: all 0.2s;
            font-weight: 500;
        }

        .form-input:focus {
            border-color: #06b6d4;
            background: rgba(6, 182, 212, 0.05);
            box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
        }

        /* Corregir visibilidad de opciones en selectores (Chrome/Windows) */
        select.form-input option {
            background-color: #1e293b;
            color: #f1f5f9;
        }

        select.form-input {
            cursor: pointer;
            appearance: none;
            /* Eliminar estilo nativo para mayor control */
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 16px;
            padding-right: 40px;
        }



        /* Date Controls */
        .date-controls {
            background: #0f172a;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 16px;
            border: 1px solid #1e293b;
        }

        .date-navigation {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .date-btn {
            width: 44px;
            height: 44px;
            border-radius: 10px;
            background: #1e293b;
            border: 2px solid #334155;
            color: #f1f5f9;
            font-size: 1.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .date-display {
            flex: 1;
            text-align: center;
            font-size: 0.95rem;
            font-weight: 600;
            color: #06b6d4;
            padding: 12px 8px;
            background: #1e293b;
            border-radius: 8px;
            border: 1px solid #334155;
            cursor: pointer;
            position: relative;
        }



        .control-section.side-control {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .control-section.center-control {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .btn-today-nav {
            background: rgba(30, 41, 59, 0.7);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #f1f5f9;
            padding: 8px 16px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            /* Llenar el ancho de la sección (110px) para igualar visualmente
               con la caja de Feriado, que también es width:100% de su padre. */
            width: 100%;
            box-sizing: border-box;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            height: 44px;
            /* Igual altura que .holiday-control y .stepper-container */
        }

        .btn-today-nav:hover {
            background: rgba(51, 65, 85, 0.8);
            transform: translateY(-2px);
            border-color: rgba(6, 182, 212, 0.4);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }

        .btn-today-nav:active {
            transform: translateY(0);
        }

        .btn-today-nav svg {
            color: #10b981;
            /* Verde esmeralda para el icono de hoy */
        }

        .segmented-control {
            display: flex;
            background: #1e293b;
            padding: 4px;
            border-radius: 12px;
            border: 1px solid #334155;
            gap: 4px;
            flex: 1;
        }

        .segmented-item {
            flex: 1;
            padding: 8px 12px;
            border: none;
            background: transparent;
            color: #94a3b8;
            font-size: 0.875rem;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            transition: all 200ms ease;
            white-space: nowrap;
        }

        .segmented-item.active {
            background: #06b6d4;
            color: #0f172a;
            box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
        }

        .view-btn {
            padding: 10px 12px;
            min-height: 44px;
            border-radius: 8px;
            background: #1e293b;
            border: 2px solid #334155;
            color: #94a3b8;
            font-size: 0.875rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 200ms ease;
            white-space: nowrap;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-width: 44px;
            min-height: 44px;
        }

        .view-btn:active {
            transform: scale(0.95);
        }

        .view-btn.action-btn {
            border-radius: 12px;
            padding: 10px 16px;
            color: #f1f5f9;
        }

        /* Holiday Switch Component */
        .holiday-switch-container {
            display: flex;
            align-items: center;
            gap: 12px;
            background: #1e293b;
            padding: 4px 14px;
            border-radius: 14px;
            border: 1px solid #334155;
            cursor: pointer;
            user-select: none;
            transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
            min-height: 44px;
            flex: 1;
            justify-content: space-between;
        }

        .holiday-switch-container:hover {
            border-color: #475569;
            background: #242f42;
        }

        .holiday-switch-container.active {
            background: rgba(245, 158, 11, 0.1);
            border-color: rgba(245, 158, 11, 0.5);
        }

        .switch-track {
            width: 40px;
            height: 22px;
            background: #0f172a;
            border-radius: 20px;
            position: relative;
            transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
            border: 1.5px solid #334155;
        }

        .holiday-switch-container.active .switch-track {
            background: #f59e0b;
            border-color: #f59e0b;
        }

        .switch-thumb {
            width: 16px;
            height: 16px;
            background: #64748b;
            border-radius: 50%;
            position: absolute;
            top: 1.5px;
            left: 2px;
            transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .holiday-switch-container.active .switch-thumb {
            left: calc(100% - 18.5px);
            background: #0f172a;
            transform: scale(1.1);
        }

        .switch-label {
            font-size: 0.75rem;
            font-weight: 800;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            pointer-events: none;
        }

        .holiday-switch-container.active .switch-label {
            color: #f59e0b;
        }

        /* Compact Sticky Date Navigation (for scroll) */
        .date-controls-compact {
            position: fixed;
            top: calc(var(--header-height) + 12px);
            left: 50%;
            transform: translateX(-50%) translateY(-100px);
            width: auto;
            min-width: 320px;
            /* Un poco más ancha */
            z-index: 1500;
            /* Asegurar que esté por encima de todo */
            background: rgba(15, 23, 42, 0.85);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(6, 182, 212, 0.4);
            border-radius: 100px;
            /* Estilo píldora */
            padding: 8px 24px;
            /* Más aire interno */
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(6, 182, 212, 0.1);
            opacity: 0;
            pointer-events: none;
            transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .date-controls-compact.visible {
            opacity: 1;
            pointer-events: all;
            transform: translateX(-50%) translateY(0);
        }

        /* Variantes para Vista Semanal (Fijo abajo) */
        .date-controls-compact.at-bottom {
            top: auto;
            bottom: 85px;
            /* Elevado para estar sobre la nav-bar (70px + 15px gap) */
            transform: translateX(-50%) translateY(100px);
            /* Aparece desde abajo */
            background: rgba(15, 23, 42, 0.9);
            border-color: rgba(6, 182, 212, 0.6);
            box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(6, 182, 212, 0.2);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), bottom 0.3s ease;
        }

        /* 🆕 Barra Fija Inferior (Modo Semanal Legacy) */
        .date-controls-compact.as-bottom-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            top: auto;
            transform: none !important;
            width: 100%;
            min-width: 100%;
            max-width: 100%;
            border-radius: 0;
            padding: 8px 0;
            background: #0f172a;
            /* Fondo sólido para eliminar la franja negra */
            border: none;
            border-top: 1px solid rgba(6, 182, 212, 0.3);
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: auto !important;
            display: flex;
            justify-content: center;
            z-index: 2000;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
        }

        .date-controls-compact.as-bottom-bar .pill-nav {
            transform: scale(1.1);
            /* Ligeramente más grande para facilitar el toque */
        }

        /* Ajuste dinámico cuando la barra de navegación inferior está oculta */
        body.bottom-nav-hidden .date-controls-compact.at-bottom {
            bottom: 25px;
            /* Baja al fondo cuando no hay nav-bar */
        }

        .date-controls-compact.at-bottom.visible {
            transform: translateX(-50%) translateY(0);
        }

        /* Estilos para cuando la píldora está dentro del contenedor compacto (flotante) */
        .date-controls-compact .pill-nav {
            background: transparent;
            border: none;
            box-shadow: none;
            margin: 0;
            padding: 0;
        }

        .pill-display {
            position: relative;
        }

        .date-controls-compact .pill-display {
            min-width: auto;
            padding: 0 12px;
        }

        /* Back to Top Floating Button (Glassmorphism) */
        .back-to-top {
            position: fixed;
            bottom: var(--bottom-nav-offset);
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            background: rgba(15, 23, 42, 0.75);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(6, 182, 212, 0.3);
            color: #06b6d4;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 1000;
            opacity: 0;
            pointer-events: none;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
        }

        .back-to-top.visible {
            opacity: 1;
            pointer-events: all;
            transform: translateX(-50%) translateY(0);
        }

        .back-to-top:hover {
            background: rgba(6, 182, 212, 0.2);
            border-color: #06b6d4;
            color: #fff;
            box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
        }

        .back-to-top i {
            transition: transform 0.3s ease;
            font-size: 1.2rem;
        }

        .back-to-top:hover i {
            transform: translateY(-3px);
        }

        /* Ajuste dinámico cuando la barra de navegación inferior está oculta */
        body.bottom-nav-hidden {
            --bottom-nav-offset: 25px;
        }

        /* En pantallas grandes el menú lateral reemplaza al inferior */
        @media (min-width: 1024px) {
            :root {
                --bottom-nav-offset: 25px;
            }
        }

        /* Responsive: Mobile - botones más compactos */
        @media (max-width: 640px) {
            .view-btn {
                padding: 8px 10px;
                font-size: 0.75rem;
            }

            .date-controls-compact {
                top: calc(var(--header-height) + 4px);
                padding: 6px 8px;
            }

            .date-controls-compact .date-btn {
                width: 30px;
                height: 30px;
                font-size: 0.95rem;
            }
        }

        /* Date Picker Popup */
        .date-picker-popup {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 8px;
            background: #0f172a;
            border: 2px solid #06b6d4;
            border-radius: 12px;
            padding: 16px;
            z-index: 50;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }

        .date-picker-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .date-picker-month {
            font-size: 1rem;
            font-weight: 700;
            color: #06b6d4;
        }

        .date-picker-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
        }

        .date-picker-day-label {
            text-align: center;
            font-size: 0.7rem;
            color: #64748b;
            font-weight: 700;
            padding: 4px;
        }

        .date-picker-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            background: #1e293b;
            font-size: 0.875rem;
            cursor: pointer;
            border: 1px solid #334155;
            transition: all 0.2s;
        }

        .date-picker-day:hover:not(.disabled):not(.other-month) {
            background: #334155;
            border-color: #06b6d4;
        }

        .date-picker-day.today {
            border-color: #06b6d4;
            border-width: 2px;
        }

        .date-picker-day.selected {
            background: #06b6d4;
            color: #000;
            font-weight: 700;
        }

        .date-picker-day.other-month {
            opacity: 0.3;
        }

        .date-picker-day.disabled {
            opacity: 0.3;
            cursor: not-allowed !important;
        }

        /* 💰 Periodo de Pago y Día de Pago */
        .calendar-day-pay-period,
        .date-picker-day-pay-period {
            border: 2px solid #06b6d4 !important;
            background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.2)) !important;
            box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.1);
            position: relative;
            z-index: 1;
        }

        .calendar-payday,
        .date-picker-day-payday {
            border: 2px solid #f59e0b !important;
            /* Ámbar/Dorado para Día de Pago */
            background: rgba(245, 158, 11, 0.15) !important;
            font-weight: 800 !important;
            box-shadow: 0 0 15px rgba(245, 158, 11, 0.3) !important;
        }

        .payday-icon {
            position: absolute;
            top: -4px;
            right: -4px;
            font-size: 0.7rem;
            filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
            background: #f59e0b;
            color: #fff;
            width: 14px;
            height: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            z-index: 10;
            border: 1px solid #fff;
        }

        /* Leyenda de Calendario */
        .calendar-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            padding: 10px 16px;
            background: rgba(30, 41, 59, 0.5);
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            font-size: 0.75rem;
            color: #94a3b8;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .legend-box {
            width: 10px;
            height: 10px;
            border-radius: 2px;
        }

        .legend-box.pay-period {
            background: rgba(6, 182, 212, 0.3);
            border: 1px solid #06b6d4;
        }

        .legend-box.payday {
            background: rgba(245, 158, 11, 0.3);
            border: 1px solid #f59e0b;
        }

        .legend-box.present {
            background: #10b981;
        }

        .legend-box.absent {
            background: #ef4444;
        }

        /* Stats - Combinado en una tarjeta con toggle */
        /* Stats Grid - RESPONSIVE */
        .stats-combined {
            background: #0f172a;
            border-radius: 12px;
            padding: 12px;
            border: 1px solid #1e293b;
            margin-bottom: 16px;
        }

        .stats-row {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
        }

        .stat-item {
            text-align: center;
            padding: 8px;
            border-radius: 8px;
            background: #1e293b;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px solid transparent;
            min-width: 0;
            /* Permite que se comprima */
        }

        .stat-item:active {
            transform: scale(0.95);
        }

        .stat-item.active {
            border-color: #06b6d4;
            background: rgba(6, 182, 212, 0.1);
        }

        .stat-icon {
            font-size: 1.5rem;
            margin-bottom: 4px;
        }

        .stat-value {
            font-size: 1.2rem;
            font-weight: 700;
            background: linear-gradient(135deg, #06b6d4, #10b981);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 2px;
            white-space: nowrap;
            font-size: 1.5rem;
            font-weight: 700;

        }



        .stat-value-clock {
            background: linear-gradient(135deg, #06b6d4, #10b981);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 2px;
            white-space: nowrap;
            font-size: 1.5rem;
            font-weight: 700;
        }

        .stat-label {
            font-size: 0.7rem;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.7px;
            white-space: nowrap;
            margin-top: 2px;
            margin-bottom: 2px;
        }

        /* Employee Row - COMPACTO */
        .employee-row {
            background: #0f172a;
            border-radius: 10px;
            padding: 10px 12px;
            margin-bottom: 6px;
            border: 1px solid #1e293b;
            display: flex;
            align-items: center;
            gap: 12px;
            /* Sin min-height forzado: la tarjeta crece con su contenido */
        }

        .employee-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 4px;
        }

        .employee-header {
            display: flex;
            align-items: baseline;
            gap: 8px;
            margin-bottom: 0;
            flex-wrap: nowrap;
            /* min-width: 0 deja que el hijo flex (.employee-name) se
               encoja con ellipsis cuando el ancho del padre no alcanza,
               en lugar de empujarse a una segunda línea. */
            min-width: 0;
        }
        /* El nombre va primero y ocupa el espacio principal (truncando con …
           si excede); el badge del número queda a su derecha. Ambos se
           alinean por baseline para que visualmente queden sobre la misma
           línea, sin importar la diferencia de tamaño de fuente. */
        .employee-header .employee-name {
            flex: 1 1 auto;
            min-width: 0;
        }
        .employee-header .employee-number {
            flex: 0 0 auto;
        }

        .employee-number {
            font-family: monospace;
            font-size: 0.7rem;
            color: #06b6d4;
            font-weight: 700;
            background: #1e293b;
            padding: 2px 6px;
            border-radius: 4px;
            /* El badge nunca se encoge; siempre mantiene su tamaño. */
            flex-shrink: 0;
        }

        .employee-name {
            font-size: 0.95rem;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
            /* flex: 1 + min-width: 0 obliga al nombre a ocupar el espacio
               restante en la fila y truncar con … si excede. Sin esto,
               la regla por defecto de flex es "no encoger por debajo del
               ancho del contenido", lo que rompe el layout en mobile. */
            flex: 1 1 auto;
            min-width: 0;
        }

        .employee-name:active {
            color: #06b6d4;
        }

        .employee-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.7rem;
            color: #64748b;
            margin-top: 0;
        }

        .employee-meta-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .employee-meta-divider {
            width: 1px;
            height: 12px;
            background: #334155;
        }

        /* Toggle Buttons para Posiciones - COMPACTO */
        .position-toggles {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
        }

        .position-toggle {
            padding: 4px 8px;
            border-radius: 6px;
            background: #1e293b;
            border: 2px solid #334155;
            font-size: 0.7rem;
            font-weight: 600;
            color: #94a3b8;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .position-toggle .pos-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
        }

        .position-toggle.active {
            border-color: #06b6d4;
            background: rgba(6, 182, 212, 0.15);
            color: #06b6d4;
        }

        .position-toggle:active {
            transform: scale(0.95);
        }

        .position-toggle.worked-today {
            border-width: 2.5px !important;
            font-weight: 700 !important;
            z-index: 1;
        }

        @keyframes pulse-neon {
            0% {
                opacity: 0.8;
                transform: scale(1);
            }

            50% {
                opacity: 1;
                transform: scale(1.02);
            }

            100% {
                opacity: 0.8;
                transform: scale(1);
            }
        }

        /* Checkbox - tamaño accesible (56×56 ≥ 44 WCAG) sin inflar la fila */
        .check-container {
            position: relative;
            width: 56px;
            height: 56px;
            flex-shrink: 0;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .check-container:hover {
            transform: scale(1.08);
        }

        .check-container:hover .check-box {
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3);
        }

        .check-input {
            position: absolute;
            opacity: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
            z-index: 1;
            margin: 0;
        }

        .check-box {
            width: 100%;
            height: 100%;
            border-radius: 12px;
            background: #1e293b;
            border: 4px solid #334155;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            transition: all 0.2s;
            /* ⚡ FIX: Remover transform que causaba desplazamiento */
        }

        .check-box.check-regular {
            background: #10b981;
            border-color: #10b981;
        }

        .check-box.check-multiposition {
            background: linear-gradient(135deg, #8b5cf6, #a78bfa);
            border-color: #8b5cf6;
        }

        /* ⚡ NUEVO: Morado para multi-posición */
        .check-box.check-holiday {
            background: linear-gradient(135deg, #f59e0b, #fbbf24);
            border-color: #f59e0b;
        }

        .check-box.check-overtime {
            background: linear-gradient(135deg, #06b6d4, #3b82f6);
            border-color: #06b6d4;
        }

        /* ═══ 📡 Anillo de sincronización (patrón WhatsApp) ═══════════════
           La clase de estado vive en .check-container (updateCheckboxOnly
           solo resetea .check-box, así el anillo sobrevive al render
           ultra-selectivo). pending = subiendo a la nube; failed = quedó
           solo local; synced = brillo breve de confirmación. */
        .check-container.cloud-pending .check-box,
        .check-container.cloud-failed .check-box,
        .check-container.cloud-synced .check-box {
            position: relative;
        }

        /* AMARILLO circulando = guardando ("líquido en el tubo"): un riel
           amarillo tenue COMPLETO siempre visible + un segmento brillante que
           circula adentro. El elemento NO rota (rotar un cuadrado redondeado
           bambolea las esquinas): se anima el ÁNGULO del conic-gradient vía
           @property --cloud-angle. La máscara xor recorta el centro y deja
           solo el tubo de 4px. */
        .check-container.cloud-pending .check-box::after {
            content: '';
            position: absolute;
            inset: -10px;
            border-radius: 18px;
            padding: 4px;
            background:
                conic-gradient(from var(--cloud-angle),
                    transparent 0deg 235deg,
                    rgba(251, 191, 36, 0.45) 280deg,
                    #fbbf24 325deg,
                    #f59e0b 360deg),
                rgba(245, 158, 11, 0.28);
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
                    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor;
                    mask-composite: exclude;
            animation: cloud-ring-spin 1.1s linear infinite;
            pointer-events: none;
        }

        /* ROJO fijo = no se completó la subida (quedó solo en este equipo) */
        .check-container.cloud-failed .check-box::after {
            content: '';
            position: absolute;
            inset: -10px;
            border-radius: 18px;
            border: 4px solid rgba(239, 68, 68, 0.9);
            pointer-events: none;
        }

        .check-container.cloud-synced .check-box::after {
            content: '';
            position: absolute;
            inset: -10px;
            border-radius: 18px;
            border: 4px solid rgba(16, 185, 129, 0.8);
            pointer-events: none;
            animation: cloud-ring-fade 2s ease-out forwards;
        }

        @keyframes cloud-ring-spin {
            to { --cloud-angle: 360deg; }
        }

        @keyframes cloud-ring-fade {
            0% { opacity: 1; }
            70% { opacity: 1; }
            100% { opacity: 0; }
        }

        .check-box.check-undertime {
            background: linear-gradient(135deg, #ec4899, #ef4444);
            border-color: #ec4899;
        }

        /* Checkboxes de días laborables */
        .day-checkbox {
            padding: 8px 4px;
            border-radius: 8px;
            background: #1e293b;
            border: 2px solid #334155;
            transition: all 0.2s;
            cursor: pointer;
        }

        .day-checkbox:hover {
            border-color: #06b6d4;
            transform: translateY(-2px);
        }

        .day-checkbox.active {
            background: linear-gradient(135deg, #06b6d4, #10b981);
            border-color: #06b6d4;
            color: #fff;
            font-weight: 600;
        }

        /* Filtros de posición */
        .filters-toggle:hover {
            background: #334155 !important;
            border-color: #06b6d4 !important;
        }

        .filter-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .filter-btn:active {
            transform: translateY(0);
        }

        .hours-badge {
            position: absolute;
            bottom: -6px;
            right: -6px;
            background: #06b6d4;
            color: #000;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 4px;
            font-family: monospace;
        }

        /* Floating Employee Detail Card */
        .floating-card {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #0f172a;
            border: 2px solid #06b6d4;
            border-radius: 20px 20px 0 0;
            padding: 20px;
            z-index: 2100;
            max-height: 70vh;
            overflow-y: auto;
            animation: slideUp 0.3s ease-out;
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
        }

        @media (min-width: 768px) {
            .floating-card {
                left: 50%;
                transform: translateX(-50%);
                width: 90%;
                max-width: 600px;
                border-radius: 20px;
                bottom: 20px;
            }
        }

        @keyframes slideUp {
            from {
                transform: translateY(100%);
            }

            to {
                transform: translateY(0);
            }
        }

        .floating-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid #1e293b;
        }

        .floating-card-title {
            font-size: 1.125rem;
            font-weight: 700;
            background: linear-gradient(135deg, #06b6d4, #10b981);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .floating-card-close {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: #1e293b;
            border: 2px solid #334155;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.125rem;
            cursor: pointer;
        }

        /* Calendar Compact */
        .calendar-compact {
            margin-bottom: 16px;
        }

        .calendar-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            gap: 12px;
            padding: 8px 12px;
            background: #1e293b;
            border-radius: 8px;
            border: 1px solid #334155;
        }

        .calendar-month {
            flex: 1;
            font-size: 1rem;
            font-weight: 700;
            color: #06b6d4;
            text-align: center;
            white-space: nowrap;
        }

        .calendar-nav-btn {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            background: #0f172a;
            border: 1px solid #334155;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            color: #06b6d4;
            font-size: 1.25rem;
            transition: all 0.2s;
        }

        .calendar-nav-btn:hover {
            background: #1e293b;
            border-color: #06b6d4;
            transform: scale(1.05);
        }

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

        .calendar-header {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
            margin-bottom: 8px;
            text-align: center;
        }

        .calendar-header-day {
            font-size: 0.65rem;
            color: #64748b;
            font-weight: 700;
        }

        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            background: #1e293b;
            border: 2px solid #334155;
            font-size: 0.75rem;
            position: relative;
            transition: all 0.2s;
        }

        /* 💰 Refuerzo para Período de Pago en Card Flotante */
        .calendar-day.calendar-day-pay-period {
            background: rgba(6, 182, 212, 0.25) !important;
            border: 2px solid #06b6d4 !important;
            box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.3) !important;
            z-index: 1;
        }

        .calendar-day.has-attendance {
            border-width: 2px;
        }

        .calendar-day.regular {
            background: #10b981;
            border-color: #10b981;
            color: #000;
        }

        .calendar-day.multiposition {
            background: linear-gradient(135deg, #8b5cf6, #a78bfa);
            border-color: #8b5cf6;
            color: #fff;
        }

        /* ⚡ NUEVO */
        .calendar-day.holiday {
            background: linear-gradient(135deg, #f59e0b, #fbbf24);
            border-color: #f59e0b;
            color: #000;
        }

        .calendar-day.overtime {
            background: linear-gradient(135deg, #06b6d4, #3b82f6);
            border-color: #06b6d4;
            color: #000;
        }

        .calendar-day.undertime {
            background: linear-gradient(135deg, #ec4899, #ef4444);
            border-color: #ec4899;
            color: #000;
        }

        .calendar-day.today {
            box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.5);
        }

        .calendar-day.other-month {
            opacity: 0.3;
        }

        .calendar-day-hours {
            font-size: 0.6rem;
            margin-top: 2px;
            opacity: 0.8;
        }

        .stats-compact-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .stat-mini {
            background: rgba(30, 41, 59, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.05);
            padding: 10px 8px;
            border-radius: 12px;
            text-align: center;
            transition: all 0.2s;
        }

        .stat-mini:hover {
            background: rgba(30, 41, 59, 0.6);
            transform: translateY(-2px);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .stat-mini-label {
            font-size: 0.65rem;
            color: #94a3b8;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-weight: 700;
        }

        .stat-mini-value {
            font-size: 0.95rem;
            font-weight: 800;
            color: #f1f5f9;
        }

        .earnings-highlight {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
            border: 1px solid rgba(16, 185, 129, 0.2);
            margin-bottom: 20px;
            padding: 16px;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.05);
        }

        .earnings-label {
            font-size: 0.75rem;
            color: #6ee7b7;
            font-weight: 600;
        }

        .earnings-value {
            font-size: 1.5rem;
            font-weight: 900;
            color: #10b981;
            letter-spacing: -0.02em;
            text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
        }

        .stat-compact-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #06b6d4;
        }

        /* Chart Compact */
        .chart-compact {
            background: #1e293b;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 16px;
        }

        .chart-compact-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .chart-compact-title {
            font-size: 0.875rem;
            font-weight: 700;
        }

        .chart-filter {
            display: flex;
            gap: 4px;
        }

        .chart-filter-btn {
            padding: 4px 10px;
            border-radius: 6px;
            background: #0f172a;
            border: 1px solid #334155;
            color: #94a3b8;
            font-size: 0.7rem;
            font-weight: 600;
            cursor: pointer;
        }

        .chart-filter-btn.active {
            background: #06b6d4;
            border-color: #06b6d4;
            color: #000;
        }

        .chart-bars {
            display: flex;
            align-items: flex-end;
            gap: 4px;
            height: 150px;
        }

        .chart-bar-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .chart-bar {
            width: 100%;
            background: #0f172a;
            border-radius: 4px 4px 0 0;
            min-height: 10px;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            overflow: hidden;
        }

        .chart-segment {
            width: 100%;
        }

        .chart-segment.regular {
            background: #10b981;
        }

        .chart-segment.holiday {
            background: #f59e0b;
        }

        .chart-segment.overtime {
            background: #06b6d4;
        }

        .chart-segment.absent {
            background: #ef4444;
        }

        .chart-bar-label {
            font-size: 0.6rem;
            color: #64748b;
        }

        /* Week Table */
        .week-table-container {
            overflow-x: auto;
            overflow-y: auto;
            background: #0f172a;
            border-radius: 12px;
            border: 1px solid #1e293b;
            max-height: 70vh;
            position: relative;
        }

        .week-table {
            width: 100%;
            min-width: 700px;
            border-collapse: collapse;
        }

        .week-table thead {
            position: sticky;
            top: 0;
            z-index: 20;
            background: #0f172a;
        }

        .week-table th {
            background: #1e293b;
            padding: 12px 8px;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            color: #64748b;
            border-bottom: 2px solid #334155;
        }

        .week-table td {
            padding: 12px 8px;
            text-align: center;
            border-bottom: 1px solid #1e293b;
        }

        .week-table td:first-child {
            text-align: left;
            position: sticky;
            left: 0;
            background: #0f172a;
            z-index: 10;
            border-right: 1px solid #1e293b;
        }

        .week-employee-cell {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 140px;
        }

        .week-employee-name {
            font-weight: 600;
            font-size: 0.875rem;
        }

        .day-cell {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        /* NEW: Week Check Wrapper - Clickable container */
        .week-check-wrapper {
            width: 48px;
            height: 48px;
            cursor: pointer;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s;
        }

        .week-check-wrapper:hover {
            transform: scale(1.1);
        }

        .week-check-wrapper:active {
            transform: scale(0.95);
        }

        .week-check-container {
            width: 48px;
            height: 48px;
        }

        .week-check-box {
            width: 100%;
            height: 100%;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            transition: all 0.2s;
        }

        .week-position-toggles {
            display: flex;
            gap: 2px;
            margin-top: 4px;
        }

        .week-position-toggle {
            padding: 2px 6px;
            border-radius: 4px;
            background: #1e293b;
            border: 1px solid #334155;
            font-size: 0.6rem;
            color: #94a3b8;
            cursor: pointer;
            transition: all 0.2s;
        }

        .week-position-toggle:hover {
            border-color: #06b6d4;
            transform: scale(1.05);
        }

        .week-position-toggle.active {
            border-color: #06b6d4;
            background: rgba(6, 182, 212, 0.2);
            color: #06b6d4;
            font-weight: 700;
        }

        /* Context Menu */
        .context-menu {
            position: fixed;
            background: #0f172a;
            border: 2px solid #06b6d4;
            border-radius: 12px;
            min-width: 200px;
            z-index: 1001;
            overflow: hidden;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes popIn {
            from {
                transform: scale(0.8);
                opacity: 0;
            }

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

        .context-menu-item {
            padding: 14px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid #1e293b;
            color: #f1f5f9;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .context-menu-item:last-child {
            border-bottom: none;
        }

        .context-menu-item:hover {
            background: rgba(6, 182, 212, 0.1);
        }

        .context-menu-item:active {
            background: rgba(6, 182, 212, 0.2);
            transform: scale(0.98);
        }

        .context-menu-item.danger:hover {
            background: rgba(239, 68, 68, 0.1);
        }

        .context-menu-item.danger:active {
            background: rgba(239, 68, 68, 0.2);
        }

        .context-menu-icon {
            font-size: 1.25rem;
        }

        /* Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 2500;
            display: flex;
            align-items: flex-end;
            overflow-y: auto;
        }

        @media (min-width: 768px) {
            .modal-overlay {
                align-items: center;
                justify-content: center;
            }
        }

        .modal-content {
            background: #0f172a;
            width: 100%;
            max-height: 95vh;
            overflow-y: auto;
            border-radius: 20px 20px 0 0;
        }

        @media (min-width: 768px) {
            .modal-content {
                max-width: 600px;
                border-radius: 16px;
            }
        }

        .modal-header {
            padding: 20px;
            border-bottom: 1px solid #1e293b;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            background: #0f172a;
            z-index: 10;
        }

        .modal-title {
            font-size: 1.25rem;
            font-weight: 700;
            background: linear-gradient(135deg, #06b6d4, #10b981);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .modal-close {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            background: #1e293b;
            border: 2px solid #334155;
            color: #f1f5f9;
            font-size: 1.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-body {
            padding: 20px;
        }

        .modal-info {
            background: #1e293b;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 20px;
            border-left: 4px solid #06b6d4;
        }

        .info-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 0.875rem;
        }

        .info-row:last-child {
            margin-bottom: 0;
        }

        .info-label {
            color: #64748b;
            font-weight: 600;
        }

        .info-value {
            color: #06b6d4;
            font-family: monospace;
            font-weight: 700;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 600;
            color: #94a3b8;
            margin-bottom: 8px;
        }

        .form-input,
        .form-select,
        .form-textarea {
            width: 100%;
            padding: 14px;
            border-radius: 8px;
            background: #1e293b;
            border: 2px solid #334155;
            color: #f1f5f9;
            font-size: 1rem;
        }

        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            outline: none;
            border-color: #06b6d4;
        }

        .form-textarea {
            resize: vertical;
            min-height: 100px;
        }

        .form-checkbox {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px;
            background: #1e293b;
            border-radius: 8px;
            border: 2px solid #334155;
            cursor: pointer;
        }

        .form-checkbox input[type="checkbox"] {
            width: 24px;
            height: 24px;
            accent-color: #06b6d4;
        }

        .modal-footer {
            padding: 20px;
            border-top: 1px solid #1e293b;
            display: flex;
            gap: 12px;
            position: sticky;
            bottom: 0;
            background: #0f172a;
        }

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

        .btn-secondary {
            background: #1e293b;
            border: 2px solid #334155;
            color: #94a3b8;
        }

        .btn-secondary:active {
            transform: scale(0.95);
            background: #334155;
        }

        .btn-primary {
            background: #06b6d4;
            border: 2px solid #06b6d4;
            color: #000;
        }

        .btn-primary:active {
            transform: scale(0.95);
            background: #0891b2;
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

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

        .main-content {
            padding: 0 0 0 0;
        }

        .legend {
            background: #0f172a;
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 16px;
            border: 1px solid #1e293b;
        }

        .legend-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            margin-bottom: 10px;
        }

        .legend-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: #94a3b8;
            text-transform: uppercase;
        }

        .legend-items {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .legend-color {
            width: 18px;
            height: 18px;
            border-radius: 4px;
            flex-shrink: 0;
            border: 2px solid #334155;
        }

        .legend-text {
            font-size: 0.75rem;
            color: #94a3b8;
            white-space: nowrap;
        }

        .legend-color.check-regular {
            background: #10b981;
            border-color: #10b981;
        }

        .legend-color.check-multiposition {
            background: linear-gradient(135deg, #8b5cf6, #a78bfa);
            border-color: #8b5cf6;
        }

        /* ⚡ NUEVO */
        .legend-color.check-holiday {
            background: linear-gradient(135deg, #f59e0b, #fbbf24);
            border-color: #f59e0b;
        }

        .legend-color.check-overtime {
            background: linear-gradient(135deg, #06b6d4, #3b82f6);
            border-color: #06b6d4;
        }

        .legend-color.check-undertime {
            background: linear-gradient(135deg, #ec4899, #ef4444);
            border-color: #ec4899;
        }

        /* Responsive: Mobile */
        @media (max-width: 640px) {
            .legend {
                padding: 10px;
            }

            .legend-title {
                font-size: 0.7rem;
            }

            .legend-items {
                gap: 8px;
            }

            .legend-color {
                width: 16px;
                height: 16px;
            }

            .legend-text {
                font-size: 0.7rem;
            }
        }

        .legend-text {
            font-size: 0.875rem;
        }

        /* Dashboard */
        .dashboard-chart-btn {
            background: #1e293b;
            border: 2px solid #334155;
            color: #94a3b8;
            padding: 12px 16px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.875rem;
        }

        .dashboard-chart-btn:hover {
            border-color: #06b6d4;
            color: #06b6d4;
            transform: translateY(-2px);
        }

        .dashboard-chart-btn.active {
            background: linear-gradient(135deg, #06b6d4, #0891b2);
            border-color: #06b6d4;
            color: white;
        }

        /* Animaciones para notificaciones */
        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }

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

        @keyframes slideOut {
            from {
                transform: translateX(0);
                opacity: 1;
            }

            to {
                transform: translateX(400px);
                opacity: 0;
            }
        }

        /* Overlay */
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 2050;
        }

        /* Animación para campos opcionales */
        @keyframes slideDown {
            from {
                opacity: 0;
                max-height: 0;
                transform: translateY(-10px);
            }

            to {
                opacity: 1;
                max-height: 500px;
                transform: translateY(0);
            }
        }

        /* ⚡ NUEVO: Animación de rotación para indicador de sincronización */
        @keyframes spin {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        /* Animación pulse para badge activo */
        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.5;
                transform: scale(0.8);
            }
        }

        /* Animación spin para loading */
        @keyframes spin {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        /* ============================================ */
        /* NOTIFICATION SYSTEM - Estilos Premium Sileo */
        /* ============================================ */

        .notification-container {
            position: fixed;
            z-index: 100000;
            display: flex;
            flex-direction: column;
            gap: 0;
            pointer-events: none;
            padding: 20px;
            width: 100%;
            max-width: 420px;
            contain: layout;
            /* Aísla el layout del resto de la página */
        }

        .notification-container.top-right {
            top: 10px;
            right: 10px;
            align-items: flex-end;
        }

        .notification-container.top-center {
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            align-items: center;
        }

        .notification-container.top-left {
            top: 10px;
            left: 10px;
            align-items: flex-start;
        }

        .notification-container.bottom-right {
            bottom: 10px;
            right: 10px;
            align-items: flex-end;
        }

        .notification-container.bottom-center {
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            align-items: center;
        }

        .notification-container.bottom-left {
            bottom: 10px;
            left: 10px;
            align-items: flex-start;
        }

        .notification {
            background: rgba(15, 23, 42, 0.99);
            /* Casi sólido para evitar estrés de transparencia */
            backdrop-filter: blur(8px) saturate(180%);
            -webkit-backdrop-filter: blur(8px) saturate(180%);
            border-radius: 20px;
            padding: 14px;
            box-shadow:
                0 10px 15px -3px rgba(0, 0, 0, 0.4),
                0 0 0 1.5px rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            pointer-events: all;
            margin-bottom: 0;
            position: absolute;
            transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            will-change: transform, opacity;
            /* Simplificado will-change */
            contain: content;
            /* Aísla el contenido */
        }

        /* Anclaje según posición */
        .notification-container.top-right .notification,
        .notification-container.top-left .notification,
        .notification-container.top-center .notification {
            top: 0;
        }

        .notification-container.bottom-right .notification,
        .notification-container.bottom-left .notification,
        .notification-container.bottom-center .notification {
            bottom: 0;
        }

        /* Estilo por tipo (más sutil) */
        .notification::after {
            content: '';
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 24px;
            border-radius: 2px;
            opacity: 0.9;
        }

        .notification-success::after {
            background: #10b981;
        }

        .notification-error::after {
            background: #ef4444;
        }

        .notification-warning::after {
            background: #f59e0b;
        }

        .notification-info::after {
            background: #06b6d4;
        }

        .notification-icon-wrapper {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            background: rgba(255, 255, 255, 0.08);
            margin-left: 10px;
        }

        .notification-success .notification-icon {
            color: #10b981;
        }

        .notification-error .notification-icon {
            color: #ef4444;
        }

        .notification-warning .notification-icon {
            color: #f59e0b;
        }

        .notification-info .notification-icon {
            color: #06b6d4;
        }

        .notification-content {
            flex: 1;
            padding-right: 8px;
        }

        .notification-message {
            color: #ffffff;
            font-size: 0.95rem;
            font-weight: 600;
            line-height: 1.4;
        }

        .notification-close {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: #94a3b8;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .notification-close:hover {
            background: rgba(255, 255, 255, 0.2);
            color: #ffffff;
            transform: scale(1.1);
        }

        /* Animaciones y Estados */
        .notification-enter {
            opacity: 0;
            transform: translateY(30px) scale(0.9) !important;
        }

        .notification-container[class*="top-"] .notification-enter {
            transform: translateY(-30px) scale(0.9) !important;
        }

        /* State-specific colors and icons */
        .notification-success .notification-icon-wrapper {
            background: rgba(34, 197, 94, 0.2);
            color: #22c55e;
        }

        .notification-error .notification-icon-wrapper {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }

        .notification-warning .notification-icon-wrapper {
            background: rgba(245, 158, 11, 0.2);
            color: #f59e0b;
        }

        .notification-info .notification-icon-wrapper {
            background: rgba(59, 130, 246, 0.2);
            color: #3b82f6;
        }

        .notification-loading .notification-icon-wrapper {
            background: rgba(148, 163, 184, 0.2);
            color: #94a3b8;
        }

        /* Loading Spinner */
        .notification-spinner {
            width: 18px;
            height: 18px;
            border: 2px solid currentColor;
            border-bottom-color: transparent;
            border-radius: 50%;
            display: inline-block;
            box-sizing: border-box;
            animation: rotation 1s linear infinite;
        }

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

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

        /* Base styles for message updates */
        .notification-message {
            transition: opacity 0.2s ease-in-out;
        }

        .notification-updating .notification-message,
        .notification-updating .notification-icon {
            opacity: 0.5;
        }

        .notification-visible {
            opacity: 1;
        }

        .notification-exit {
            opacity: 0;
            transform: scale(0.8) !important;
            filter: blur(8px);
        }

        /* ============================================ */
        /* MODAL SYSTEM - Estilos Profesionales */
        /* ============================================ */

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .modal-backdrop {
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
        }

        .modal-container {
            background: linear-gradient(135deg, #0f172a, #1e293b);
            border-radius: 16px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
            display: flex;
            flex-direction: column;
            max-height: 90vh;
            width: 100%;
        }

        .modal-small {
            max-width: 400px;
        }

        .modal-medium {
            max-width: 600px;
        }

        .modal-large {
            max-width: 900px;
        }

        .modal-fullscreen {
            max-width: 95vw;
            max-height: 95vh;
        }

        .modal-header {
            padding: 24px 28px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            background: linear-gradient(135deg, #06b6d4, #10b981);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 0;
        }

        .modal-close {
            background: transparent;
            border: none;
            color: #64748b;
            font-size: 1.75rem;
            cursor: pointer;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            transition: all 0.2s;
            line-height: 1;
        }

        .modal-close:hover {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
            transform: rotate(90deg);
        }

        .modal-body {
            padding: 28px;
            overflow-y: auto;
            flex: 1;
        }

        .modal-body::-webkit-scrollbar {
            width: 8px;
        }

        .modal-body::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 4px;
        }

        .modal-body::-webkit-scrollbar-thumb {
            background: rgba(6, 182, 212, 0.5);
            border-radius: 4px;
        }

        .modal-body::-webkit-scrollbar-thumb:hover {
            background: rgba(6, 182, 212, 0.7);
        }

        .modal-footer {
            padding: 20px 28px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .modal-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
        }

        .btn-primary {
            background: linear-gradient(135deg, #06b6d4, #0891b2);
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
        }

        .btn-secondary {
            background: #334155;
            color: #f1f5f9;
            border: 1px solid #475569;
        }

        .btn-secondary:hover {
            background: #475569;
        }

        .btn-danger {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
        }

        .btn-danger:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
        }

        .btn-success {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
        }

        .btn-success:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
        }

        .btn-warning {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
        }

        /* Animaciones de Modal */
        .modal-enter {
            opacity: 0;
            transform: scale(0.9) translateY(-20px);
        }

        .modal-visible {
            opacity: 1;
            transform: scale(1) translateY(0);
            transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .modal-exit {
            opacity: 0;
            transform: scale(0.9) translateY(20px);
            transition: all 0.6s ease-out;
        }

        /* ============================================ */
        /* 🎨 DRAWER SYSTEM (Panel Lateral) - Option 1 */
        /* ============================================ */

        .modal-drawer {
            position: absolute;
            top: 0;
            bottom: 0;
            height: 100vh;
            border-radius: 0;
            box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
            max-height: 100vh;
        }

        .modal-drawer-right {
            right: 0;
            width: 450px;
            max-width: 100vw;
            border-left: 1px solid rgba(255, 255, 255, 0.1);
        }

        .drawer-overlay {
            background: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            justify-content: flex-end;
            /* Alinear container a la derecha */
            padding: 0;
            /* Sin padding para que el drawer pegue al borde */
        }

        /* Animaciones para Drawer (Slide de Derecha) */
        .drawer-enter {
            transform: translateX(100%);
            opacity: 1;
        }

        .drawer-visible {
            transform: translateX(0);
            opacity: 1;
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .drawer-exit {
            transform: translateX(100%);
            opacity: 1;
            transition: transform 0.3s ease-in;
        }

        /* Estilo Interno del Drawer */
        .modal-drawer .modal-header {
            background: rgba(30, 41, 59, 0.5);
            backdrop-filter: blur(4px);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .modal-drawer .modal-footer {
            background: rgba(30, 41, 59, 0.5);
            backdrop-filter: blur(4px);
            position: sticky;
            bottom: 0;
            z-index: 10;
        }

        /* Responsive para Drawer */
        @media (max-width: 640px) {
            .modal-drawer-right {
                width: 90%;
            }
        }


        /* ============================================ */
        /* COMPONENTES UI - Estilos POO */
        /* ============================================ */

        /* TableComponent */
        .table-wrapper {
            overflow-x: auto;
            border-radius: 12px;
            background: #1e293b;
            border: 1px solid #334155;
        }

        .table-component {
            width: 100%;
            border-collapse: collapse;
        }

        .table-component thead {
            background: #0f172a;
        }

        .table-component th {
            padding: 16px;
            text-align: left;
            font-weight: 600;
            color: #06b6d4;
            border-bottom: 2px solid #334155;
        }

        .table-component th.sortable {
            cursor: pointer;
            user-select: none;
        }

        .table-component th.sortable:hover {
            background: #1e293b;
        }

        .sort-icon {
            margin-left: 8px;
            opacity: 0.5;
        }

        .table-component td {
            padding: 16px;
            border-bottom: 1px solid #334155;
            color: #f1f5f9;
        }

        .table-striped tbody tr:nth-child(even) {
            background: rgba(15, 23, 42, 0.5);
        }

        .table-hoverable tbody tr:hover {
            background: rgba(6, 182, 212, 0.1);
            cursor: pointer;
        }

        .empty-message {
            text-align: center;
            padding: 40px 20px !important;
            color: #64748b;
            font-style: italic;
        }

        /* FormComponent */
        .form-component {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .form-group label {
            font-weight: 600;
            color: #f1f5f9;
            font-size: 0.875rem;
        }

        .form-group .required {
            color: #ef4444;
            margin-left: 4px;
        }

        .form-input {
            padding: 12px 16px;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 8px;
            color: #f1f5f9;
            font-size: 0.875rem;
            transition: all 0.2s;
        }

        .form-input:focus {
            outline: none;
            border-color: #06b6d4;
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
        }

        .form-input::placeholder {
            color: #64748b;
        }

        textarea.form-input {
            resize: vertical;
            min-height: 80px;
        }

        .form-group-checkbox {
            flex-direction: row;
            align-items: center;
        }

        .form-group-checkbox label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }

        .form-checkbox {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .form-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
            margin-top: 8px;
        }

        /* CalendarPickerComponent */
        .calendar-picker {
            position: absolute;
            top: calc(100% + 12px);
            left: 50%;
            transform: translateX(-50%);
            z-index: 20000;
            background: #1e293b;
            border-radius: 20px;
            padding: 16px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow:
                0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.05);
            width: min(320px, calc(100vw - 32px));
            max-width: calc(100vw - 32px);
            box-sizing: border-box;
            animation: calendar-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            backdrop-filter: blur(12px);

        }

        @keyframes calendar-pop {
            from {
                opacity: 0;
                transform: translateX(-50%) scale(0.95) translateY(-10px);
            }

            to {
                opacity: 1;
                transform: translateX(-50%) scale(1) translateY(0);
            }
        }

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

        .calendar-title {
            font-weight: 700;
            font-size: 1.125rem;
            color: #f1f5f9;
        }

        /* ⚠️ ELIMINADO: Estos estilos duplicados causaban conflicto con el floating card
        .calendar-nav {
            background: transparent;
            border: 1px solid #334155;
            color: #06b6d4;
            width: 36px;
            height: 36px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        
        .calendar-nav:hover {
            background: rgba(6, 182, 212, 0.1);
            border-color: #06b6d4;
        }
        */

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

        .calendar-weekday {
            text-align: center;
            font-size: 0.75rem;
            font-weight: 600;
            color: #64748b;
            padding: 8px;
        }

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

        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            cursor: pointer;
            color: #f1f5f9;
            font-weight: 500;
            transition: all 0.2s;
            border: 1px solid transparent;
        }

        .calendar-day:hover:not(.calendar-day-empty) {
            background: rgba(6, 182, 212, 0.1);
            border-color: #06b6d4;
        }

        .calendar-day-empty {
            cursor: default;
        }

        .calendar-day-today {
            background: rgba(16, 185, 129, 0.2);
            border-color: #10b981;
        }

        .calendar-day-selected {
            background: linear-gradient(135deg, #06b6d4, #0891b2);
            color: white;
            font-weight: 700;
        }

        .calendar-day-highlighted {
            background: rgba(245, 158, 11, 0.2);
            border-color: #f59e0b;
        }

        /* StatCardComponent */
        .stat-card {
            background: linear-gradient(135deg, #1e293b, #0f172a);
            border: 1px solid #334155;
            border-radius: 12px;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.2s;
        }

        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
            border-color: #06b6d4;
        }

        .stat-icon {
            font-size: 2.5rem;
            line-height: 1;
        }

        .stat-content {
            flex: 1;
        }





        .stat-trend {
            font-size: 0.75rem;
            margin-top: 4px;
        }

        .stat-trend.up {
            color: #10b981;
        }

        .stat-trend.down {
            color: #ef4444;
        }

        .stat-card-primary .stat-icon {
            color: #06b6d4;
        }

        .stat-card-success .stat-icon {
            color: #10b981;
        }

        .stat-card-warning .stat-icon {
            color: #f59e0b;
        }

        .stat-card-danger .stat-icon {
            color: #ef4444;
        }

        /* SearchComponent */
        .search-component {
            position: relative;
            display: flex;
            align-items: center;
        }

        .search-icon {
            position: absolute;
            left: 12px;
            color: #64748b;
            pointer-events: none;
        }

        .search-input {
            width: 100%;
            padding: 12px 16px 12px 40px;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 8px;
            color: #f1f5f9;
            font-size: 0.875rem;
            transition: all 0.2s;
        }

        .search-input:focus {
            outline: none;
            border-color: #06b6d4;
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
        }

        .search-input::placeholder {
            color: #64748b;
        }

        /* Employee filter bar search (responsive) */
        .employee-search {
            position: relative;
            flex: 2;
            min-width: 220px;
        }

        .employee-search-input {
            width: 100%;
            background: #1e293b;
            border: 1px solid #334155;
            color: #f1f5f9;
            padding: 10px 12px 10px 36px;
            border-radius: 8px;
            font-size: 0.875rem;
            transition: width 0.2s ease, opacity 0.2s ease;
        }

        .employee-search-input:focus {
            outline: none;
            border-color: #06b6d4;
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
        }

        .employee-search-btn {
            position: absolute;
            left: 8px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .employee-search-clear {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            padding: 4px;
        }

        @media (max-width: 640px) {
            .employee-search {
                flex: 0 0 40px;
                min-width: 40px;
            }

            .employee-search-input {
                width: 0;
                opacity: 0;
                pointer-events: none;
                padding-left: 36px;
                padding-right: 12px;
            }

            .employee-search.open {
                flex: 1 1 100%;
                min-width: 180px;
            }

            .employee-search.open .employee-search-input,
            .employee-search-input:focus {
                width: 100%;
                opacity: 1;
                pointer-events: auto;
            }
        }

        /* Employee filter pills */
        .filters-bar {
            display: flex;
            gap: 10px;
            width: 100%;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-start;
        }

        .filter-pill {
            position: relative;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 10px;
            background: #1e293b;
            border: 1px solid #334155;
            border-radius: 8px;
            height: 40px;
            flex: 0 0 auto;
            transition: width 0.3s ease, min-width 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
        }

        .filter-pill:focus-within,
        .filter-pill.open {
            border-color: #06b6d4;
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
        }

        .filter-pill-btn {
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .filter-pill-label {
            color: #e2e8f0;
            font-size: 0.85rem;
            white-space: nowrap;
        }

        .filter-pill-select {
            position: absolute;
            inset: 0;
            opacity: 0;
            cursor: pointer;
        }

        .filter-pill:not(.active):not(.open) {
            width: 40px;
            padding: 6px;
            justify-content: center;
        }

        .filter-pill:not(.active):not(.open) .filter-pill-label {
            display: none;
        }

        .filter-pill.open {
            min-width: 180px;
        }

        .filter-pill.active {
            min-width: 160px;
        }

        .filter-pill.take-row {
            flex: 1 1 100%;
            justify-content: flex-start;
        }

        /* BadgeComponent */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            border-radius: 12px;
            font-weight: 600;
            font-size: 0.75rem;
            line-height: 1;
        }

        .badge-small {
            padding: 2px 8px;
            font-size: 0.625rem;
        }

        .badge-large {
            padding: 6px 16px;
            font-size: 0.875rem;
        }

        .badge-default {
            background: #334155;
            color: #f1f5f9;
        }

        .badge-primary {
            background: linear-gradient(135deg, #06b6d4, #0891b2);
            color: white;
        }

        .badge-success {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
        }

        .badge-warning {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
        }

        .badge-danger {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
        }

        /* TooltipComponent */
        .tooltip-wrapper {
            position: relative;
            display: inline-block;
        }

        .tooltip-wrapper::before {
            content: attr(data-tooltip);
            position: absolute;
            background: #0f172a;
            color: #f1f5f9;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 0.75rem;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
            border: 1px solid #334155;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            z-index: 1000;
        }

        .tooltip-wrapper:hover::before {
            opacity: 1;
        }

        .tooltip-wrapper[data-position="top"]::before {
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(-8px);
        }

        .tooltip-wrapper[data-position="bottom"]::before {
            top: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(8px);
        }

        .tooltip-wrapper[data-position="left"]::before {
            right: 100%;
            top: 50%;
            transform: translateY(-50%) translateX(-8px);
        }

        .tooltip-wrapper[data-position="right"]::before {
            left: 100%;
            top: 50%;
            transform: translateY(-50%) translateX(8px);
        }


        /* ============================================ */
        /* FASE 5: Estilos para componentes nuevos */
        /* ============================================ */

        /* Virtual Scroll */
        .virtual-scroll-container {
            position: relative;
            overflow-y: auto;
            overflow-x: hidden;
        }

        .virtual-scroll-spacer {
            width: 100%;
        }

        .virtual-scroll-content {
            width: 100%;
        }

        /* Offline Banner */
        .offline-banner {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
            padding: 12px 20px;
            text-align: center;
            font-weight: 600;
            z-index: 10000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from {
                transform: translateY(-100%);
            }

            to {
                transform: translateY(0);
            }
        }

        @keyframes slideUp {
            from {
                transform: translateY(20px);
                opacity: 0;
            }

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

        /* Install Banner */
        .install-banner {
            animation: slideUp 0.3s ease-out;
        }

        /* Sync Badge */
        .sync-badge {
            position: fixed;
            bottom: 80px;
            right: 20px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
            padding: 12px 20px;
            border-radius: 12px;
            font-weight: 600;
            font-size: 0.875rem;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
            cursor: pointer;
            z-index: 9998;
            transition: transform 0.2s;
        }

        .sync-badge:hover {
            transform: translateY(-2px);
        }

        .sync-badge:active {
            transform: translateY(0);
        }

        @media (max-width: 768px) {

            /* Root y body */
            body {
                padding-bottom: 60px;
            }

            /* Header responsive */
            .header {
                position: sticky;
                top: 0;
                z-index: 100;
            }

            .header-content {
                padding: 12px 16px;
            }

            .company-name {
                font-size: 1rem;
            }

            /* Navegación */
            .nav-tabs {
                overflow-x: auto;
                overflow-y: hidden;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                -ms-overflow-style: none;
                padding-bottom: 4px;
            }

            .nav-tabs::-webkit-scrollbar {
                display: none;
            }

            .nav-tab {
                white-space: nowrap;
                min-width: auto;
                padding: 8px 16px;
                font-size: 0.875rem;
            }

            /* Container */
            .container {
                padding: 12px;
                max-width: 100%;
            }

            /* Botones */
            .btn {
                padding: 10px 16px;
                font-size: 0.875rem;
            }

            /* Tarjetas de estadísticas */
            .stat-card {
                flex-direction: column;
                text-align: center;
                padding: 16px;
                min-width: auto;
            }

            .stat-grid {
                grid-template-columns: 1fr 1fr;
                gap: 12px;
            }

            /* Controles de fecha */
            .date-controls {
                flex-direction: column;
                gap: 12px;
            }

            .pill-nav {
                width: 100%;
                justify-content: space-between;
                margin-bottom: 16px;
            }

            .date-controls-compact .pill-nav {
                margin-bottom: 0;
                width: 100%;
            }

            .view-controls {
                width: 100%;
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
                gap: 8px;
                justify-content: center;
            }

            /* Lista de empleados */
            .employee-row,
            .position-row,
            .leader-row {
                padding: 12px;
                font-size: 0.875rem;
            }

            .employee-number,
            .employee-name {
                font-size: 0.875rem;
            }

            /* Badges */
            .badge {
                padding: 4px 8px;
                font-size: 0.625rem;
            }

            /* Inputs */
            .form-input,
            .form-select,
            .form-textarea {
                font-size: 16px;
                /* Previene zoom en iOS */
                padding: 10px 12px;
            }

            /* Modales */
            .notification {
                min-width: auto;
                max-width: calc(100vw - 40px);
            }

            .modal-container {
                max-width: 100%;
                max-height: 100vh;
                border-radius: 0;
                margin: 0;
            }

            .modal-small,
            .modal-medium,
            .modal-large {
                max-width: 100%;
                max-height: 100vh;
                border-radius: 0;
            }

            .modal-header {
                padding: 16px;
            }

            .modal-body {
                padding: 16px;
                max-height: calc(100vh - 140px);
            }

            .modal-footer {
                padding: 16px;
                display: grid !important;
                grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
                gap: 10px;
                background: #0f172a;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
            }

            .modal-btn {
                width: 100%;
                padding: 12px 10px !important;
                font-size: 0.85rem !important;
                justify-content: center;
                display: flex;
                align-items: center;
            }

            /* Navegación interna de modales (Perfil) */
            .profile-tabs-container {
                display: flex !important;
                flex-direction: row !important;
                overflow-x: auto !important;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                padding: 0 5px !important;
                background: #0f172a;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                white-space: nowrap;
            }

            .profile-tabs-container::-webkit-scrollbar {
                display: none;
            }

            .profile-tab {
                flex-shrink: 0;
                padding: 12px 16px !important;
                font-size: 0.8rem !important;
                min-width: 120px;
                text-align: center;
                justify-content: center;
            }

            /* Tablas */
            .table-wrapper {
                border-radius: 0;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            table {
                font-size: 0.75rem;
            }

            th,
            td {
                padding: 8px;
                min-width: 80px;
            }

            /* Calendario */
            .calendar-picker {
                border-radius: 0;
                max-width: 100%;
            }

            /* Settings específicos */
            details {
                font-size: 0.875rem;
            }

            details summary {
                padding: 10px;
            }

            /* Botones de radio personalizados */
            label input[type="radio"]+div {
                padding: 10px 12px;
                font-size: 0.875rem;
            }

            /* Fase 5 componentes */
            .install-banner {
                bottom: 10px;
                left: 10px;
                right: 10px;
                transform: none !important;
                flex-direction: column;
                text-align: center;
                padding: 12px 16px;
            }

            .sync-badge {
                bottom: 70px;
                right: 10px;
                font-size: 0.75rem;
                padding: 10px 16px;
            }

            /* Ajustes de tipografía */
            h1 {
                font-size: 1.5rem;
            }

            h2 {
                font-size: 1.25rem;
            }

            h3 {
                font-size: 1.125rem;
            }

            /* Mejoras de touch */
            button,
            .btn,
            .nav-tab,
            .date-btn {
                min-height: 44px;
                /* Tamaño mínimo recomendado para touch */
            }

            /* Espaciado mejorado */
            .form-group {
                margin-bottom: 16px;
            }

            /* Scroll suave */
            * {
                -webkit-tap-highlight-color: transparent;
                -webkit-touch-callout: none;
            }
        }

        /* Para pantallas muy pequeñas (< 375px) */
        @media (max-width: 375px) {
            .stat-grid {
                grid-template-columns: 1fr;
            }

            .nav-tab {
                font-size: 0.75rem;
                padding: 8px 12px;
            }

            .company-name {
                font-size: 0.875rem;
            }
        }

        /* ─── UNDO TOAST ─── */
        #undo-toast {
            position: fixed;
            bottom: var(--bottom-nav-offset);
            left: 50%;
            transform: translateX(-50%) translateY(120px);
            z-index: 9999;
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            pointer-events: none;
        }

        #undo-toast.visible {
            transform: translateX(-50%) translateY(0);
        }

        .undo-toast-inner {
            background: rgba(15, 23, 42, 0.98);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1.5px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 6px 10px;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
            position: relative;
            overflow: hidden;
            pointer-events: auto;
            width: fit-content;
        }

        .undo-toast-inner::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            height: 3px;
            width: 100%;
            background: linear-gradient(90deg, #06b6d4, #8b5cf6);
            transition: width 5s linear;
        }

        #undo-toast.visible .undo-toast-inner::after {
            width: 0%;
        }

        .undo-toast-icon {
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        .undo-toast-text {
            flex: 1;
            font-size: 0.82rem;
            color: #94a3b8;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .undo-toast-btn {
            background: #06b6d4;
            color: #000;
            border: none;
            padding: 8px 18px;
            border-radius: 8px;
            font-size: 0.75rem;
            font-weight: 800;
            cursor: pointer;
            font-family: inherit;
            letter-spacing: 0.5px;
            transition: all 0.15s;
            flex-shrink: 0;
        }

        .undo-toast-btn:hover {
            background: #0891b2;
            transform: scale(1.05);
        }

        .undo-toast-btn:active {
            transform: scale(0.95);
        }

        .undo-toast-close {
            background: transparent;
            border: 1px solid #334155;
            color: #64748b;
            width: 28px;
            height: 28px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
            flex-shrink: 0;
        }

        .undo-toast-close:hover {
            border-color: #ef4444;
            color: #ef4444;
        }



        /* 📱 OPTIMIZACIÓN LANDSCAPE PARA TABLA SEMANAL */
        @media screen and (orientation: landscape) {
            .week-view-table th {
                font-size: 0.75rem !important;
                padding: 6px 4px !important;
                margin-bottom: 100px;
            }

            .week-view-table td {
                padding: 4px 4px !important;
            }

            .week-employee-cell {
                gap: 6px;
            }

            .week-employee-name {
                font-size: 0.8rem;
            }
        }

        /* ============================================
           🗓️ PREMIUM CALENDAR PICKER
           ============================================ */
        .calendar-picker {
            position: absolute;
            top: calc(100% + 12px);
            left: 50%;
            transform: translateX(-50%);
            background: rgba(15, 23, 42, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            width: min(320px, calc(100vw - 32px));
            max-width: calc(100vw - 32px);
            box-sizing: border-box;
            padding: 16px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(6, 182, 212, 0.2);
            animation: calendarPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            user-select: none;
            z-index: 20000;
        }

        @keyframes calendarPopIn {
            from {
                transform: translateX(-50%) scale(0.9) translateY(-10px);
                opacity: 0;
            }

            to {
                transform: translateX(-50%) scale(1) translateY(0);
                opacity: 1;
            }
        }

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

        .calendar-title {
            font-weight: 800;
            font-size: 1rem;
            color: #f1f5f9;
            cursor: pointer;
            padding: 4px 12px;
            border-radius: 8px;
            transition: all 0.2s;
            text-transform: capitalize;
        }

        .calendar-title:hover {
            background: rgba(6, 182, 212, 0.1);
            color: #06b6d4;
        }

        .calendar-nav {
            background: #1e293b;
            border: 1px solid #334155;
            color: #06b6d4;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .calendar-nav:hover {
            border-color: #06b6d4;
            background: #334155;
            transform: scale(1.1);
        }

        .calendar-weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
            margin-bottom: 8px;
            width: 100%;
            min-width: 0;
        }

        .calendar-weekday {
            text-align: center;
            font-size: 0.7rem;
            font-weight: 800;
            color: #64748b;
            text-transform: uppercase;
        }

        .calendar-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
            width: 100%;
            min-width: 0;
        }

        .calendar-day {
            min-width: 0;
            aspect-ratio: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            font-weight: 600;
            color: #f1f5f9;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            border: 1px solid transparent;
        }

        .calendar-day:hover:not(.calendar-day-empty) {
            background: rgba(255, 255, 255, 0.05);
            border-color: #334155;
            transform: translateY(-2px);
        }

        .calendar-day-selected {
            background: #06b6d4 !important;
            color: #0f172a !important;
            box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
        }

        .calendar-day-today {
            background: #10b981 !important;
            color: #ffffff !important;
            border-color: #10b981 !important;
            font-weight: 800;
        }

        .calendar-day-holiday {
            background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
            color: #000 !important;
            font-weight: 800;
        }

        .calendar-day-other {
            opacity: 0.3;
            font-weight: 400;
        }

        .calendar-day-highlighted {
            background: rgba(6, 182, 212, 0.15);
        }

        /* Indicadores */
        .calendar-indicators {
            display: flex;
            gap: 2px;
            position: absolute;
            bottom: 4px;
        }

        .indicator-dot {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: #06b6d4;
        }

        .indicator-icon {
            font-size: 0.6rem;
        }

        /* Footer */
        .calendar-footer {
            margin-top: 16px;
            padding-top: 12px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            justify-content: center;
        }

        .btn-today {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.3);
            color: #10b981;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-today:hover {
            background: #10b981;
            color: #0f172a;
            transform: scale(1.05);
        }

        /* Grid de Selección Rápida (Meses) */
        .calendar-grid-jumper {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-top: 8px;
        }

        .jumper-item {
            padding: 10px 4px;
            text-align: center;
            background: #1e293b;
            border: 1px solid #334155;
            border-radius: 8px;
            font-size: 0.8rem;
            font-weight: 600;
            color: #f1f5f9;
            cursor: pointer;
            transition: all 0.2s;
        }

        .jumper-item:hover {
            border-color: #06b6d4;
            background: rgba(6, 182, 212, 0.1);
            color: #06b6d4;
        }

        .jumper-item.active {
            background: #06b6d4;
            color: #0f172a;
            border-color: #06b6d4;
        }

        /* 📱 Responsive */
        @media (max-width: 480px) {
            .calendar-picker {
                width: min(290px, calc(100vw - 24px));
                max-width: calc(100vw - 24px);
                padding: 12px;
            }

            .calendar-day {
                font-size: 0.75rem;
            }
        }

        /* ============================================
           💎 PREMIUM CALENDAR VIEW (Reusable)
           ============================================ */
        .premium-calendar {
            background: transparent;
            user-select: none;
        }

        .premium-calendar .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
        }

        .premium-calendar .calendar-day-name {
            text-align: center;
            font-size: 0.7rem;
            font-weight: 800;
            color: #64748b;
            text-transform: uppercase;
            padding-bottom: 8px;
        }

        .premium-calendar .calendar-day {
            aspect-ratio: 1;
            background: rgba(30, 41, 59, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
        }

        .premium-calendar .calendar-day:hover {
            background: rgba(30, 41, 59, 0.6);
            transform: translateY(-2px);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .premium-calendar .calendar-day.other-month {
            opacity: 0.2;
            pointer-events: none;
        }

        .premium-calendar .calendar-day.today {
            background: rgba(6, 182, 212, 0.1);
            border-color: rgba(6, 182, 212, 0.4);
        }

        .premium-calendar .calendar-day.today .day-number {
            color: #06b6d4;
            font-weight: 800;
        }

        /* 📅 Periodo de Pago (Marco Neón Azul) */
        .calendar-day-pay-period {
            border: 2px solid #06b6d4 !important;
            box-shadow: 0 0 8px rgba(6, 182, 212, 0.4), inset 0 0 4px rgba(6, 182, 212, 0.2) !important;
            z-index: 1;
        }

        /* Colores Sólidos para estados de asistencia */
        .premium-calendar .calendar-day.has-attendance {
            border-color: rgba(255, 255, 255, 0.1);
        }

        /* 🟢 Estado: Regular (Asistencia normal) */
        .premium-calendar .calendar-day.check-regular {
            background: #10b981 !important;
        }

        .premium-calendar .calendar-day.check-regular .day-number,
        .premium-calendar .calendar-day.check-regular .hours-dot {
            color: white !important;
        }

        /* 🔴 Estado: Horas insuficientes */
        .premium-calendar .calendar-day.check-undertime {
            background: #ef4444 !important;
        }

        .premium-calendar .calendar-day.check-undertime .day-number,
        .premium-calendar .calendar-day.check-undertime .hours-dot {
            color: white !important;
        }

        /* 🟣 Estado: Multi-posición */
        .premium-calendar .calendar-day.check-multiposition {
            background: #8b5cf6 !important;
        }

        .premium-calendar .calendar-day.check-multiposition .day-number,
        .premium-calendar .calendar-day.check-multiposition .hours-dot {
            color: white !important;
        }

        /* 🟡 Estado: Día Festivo */
        .premium-calendar .calendar-day.check-holiday {
            background: #f59e0b !important;
        }

        .premium-calendar .calendar-day.check-holiday .day-number,
        .premium-calendar .calendar-day.check-holiday .hours-dot {
            color: white !important;
        }

        /* 🔵 Estado: Horas Extras */
        .premium-calendar .calendar-day.check-overtime {
            background: #06b6d4 !important;
        }

        .premium-calendar .calendar-day.check-overtime .day-number,
        .premium-calendar .calendar-day.check-overtime .hours-dot {
            color: white !important;
        }

        /* 💰 Día de Pago (Marco Dorado Premium) */
        .calendar-payday {
            border: 2.5px solid #fbbf24 !important;
            background: rgba(251, 191, 36, 0.2) !important;
            box-shadow: 0 0 15px rgba(251, 191, 36, 0.3) !important;
            z-index: 2;
        }

        .calendar-payday .day-number {
            color: #fbbf24 !important;
            font-weight: 900;
        }

        /* 💰 Icono de Dinero */
        .money-badge {
            position: absolute;
            top: -6px;
            right: -6px;
            font-size: 0.9rem;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
            animation: bounce 2s infinite;
        }

        @keyframes bounce {

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

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

        /* 🎯 Marcador de Día Actual */
        .today-marker {
            position: absolute;
            top: -8px;
            left: -8px;
            font-size: 1rem;
            z-index: 10;
            filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
            animation: pulse-target 2s infinite ease-in-out;
            pointer-events: none;
        }

        @keyframes pulse-target {

            0%,
            100% {
                transform: scale(1) rotate(0deg);
            }

            50% {
                transform: scale(1.2) rotate(10deg);
            }
        }

        .payday-indicator {
            position: absolute;
            bottom: 4px;
            right: 4px;
            color: #fbbf24;
            opacity: 0.8;
        }

        /* ⚡ Indicador de Horas */
        .hours-dot {
            font-size: 0.6rem;
            font-weight: 800;
            padding: 2px 4px;
            border-radius: 4px;
            margin-top: 2px;
            background: rgba(255, 255, 255, 0.05);
            color: #94a3b8;
        }

        .calendar-position-dots {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            margin-top: 3px;
            min-height: 7px;
        }

        .calendar-position-dot {
            width: 6px;
            height: 6px;
            border-radius: 999px;
            background: var(--pos-color, #94a3b8);
            border: 1px solid rgba(255, 255, 255, 0.72);
            box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.24);
            flex: none;
        }

        .calendar-position-more {
            color: #ffffff;
            font-size: 0.52rem;
            font-weight: 900;
            line-height: 1;
            text-shadow: 0 1px 2px rgba(15, 23, 42, 0.55);
        }

        /* 💡 Botón de ayuda contextual (HelpTooltip) */
        .help-tooltip-btn {
            transition: all 0.15s ease;
        }
        .help-tooltip-btn:hover {
            background: rgba(6, 182, 212, 0.2) !important;
            border-color: #06b6d4 !important;
            color: #06b6d4 !important;
            transform: scale(1.1);
        }
        .help-tooltip-btn:focus-visible {
            outline: 2px solid #06b6d4;
            outline-offset: 2px;
            background: rgba(6, 182, 212, 0.2) !important;
            color: #06b6d4 !important;
        }
        .help-tooltip-btn:active {
            transform: scale(0.95);
        }

        .has-attendance.present .hours-dot {
            background: #10b981;
            color: #000;
        }

        .has-attendance.absent .hours-dot {
            background: #ef4444;
            color: #fff;
        }

        .has-attendance.holiday .hours-dot {
            background: #f59e0b;
            color: #000;
        }
