 /* Variables CSS inspiradas en Clínica Pasteur */
 :root {
     --primary-color: #2c5aa0;
     --secondary-color: #f8f9fa;
     --accent-color: #17a2b8;
     --success-color: #28a745;
     --warning-color: #ffc107;
     --danger-color: #dc3545;
     --dark-color: #343a40;
     --light-color: #ffffff;
     --border-radius: 12px;
     --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
     --transition: all 0.3s ease;
 }

 /* Reset y estilos base */
 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }

 body {
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
     min-height: 100vh;
 }

 /* Logo styles - Mantener colores originales */
 .logo-login {
     height: 80px;
     width: auto;
     margin-right: 0.75rem;
     /* Sin filtros para mantener colores originales */
 }

 .navbar-logo {
     height: 60px;
     width: auto;
     margin-right: 0.5rem;
     /* Sin filtros para mantener colores originales */
 }

 /* Página de Login */
 .login-page {
     display: flex;
     align-items: center;
     justify-content: center;
     min-height: 100vh;
     padding: 20px;
 }

 .login-container {
     position: relative;
     width: 100%;
     max-width: 400px;
 }

 .login-card {
     background: var(--light-color);
     border-radius: var(--border-radius);
     box-shadow: var(--box-shadow);
     padding: 2rem;
     backdrop-filter: blur(10px);
     border: 1px solid rgba(255, 255, 255, 0.2);
 }

 .login-header {
     text-align: center;
     margin-bottom: 2rem;
 }

 .logo-container {
     display: flex;
     align-items: center;
     justify-content: center;
     margin-bottom: 1rem;
 }

 .logo-text {
     color: var(--primary-color);
     font-weight: 600;
     margin: 0;
 }

 .login-subtitle {
     color: #6c757d;
     font-size: 0.9rem;
     margin: 0;
 }

 .login-form {
     margin-bottom: 1.5rem;
 }

 .form-floating>label {
     color: #6c757d;
 }

 .form-control {
     border-radius: 8px;
     border: 2px solid #e9ecef;
     transition: var(--transition);
 }

 .form-control:focus {
     border-color: var(--primary-color);
     box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
 }

 .btn-login {
     background: linear-gradient(135deg, var(--primary-color) 0%, #1e4080 100%);
     border: none;
     border-radius: 8px;
     padding: 0.75rem;
     font-weight: 600;
     transition: var(--transition);
 }

 .btn-login:hover {
     transform: translateY(-2px);
     box-shadow: 0 6px 20px rgba(44, 90, 160, 0.3);
 }

 .login-footer {
     text-align: center;
     padding-top: 1rem;
     border-top: 1px solid #e9ecef;
 }

 .loading-overlay {
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: rgba(255, 255, 255, 0.9);
     display: flex;
     align-items: center;
     justify-content: center;
     border-radius: var(--border-radius);
     z-index: 1000;
 }

 /* Dashboard */
 .dashboard-page {
     background: #f8f9fa;
 }

 .navbar {
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
     z-index: 1030;
     min-height: 80px;
 }

 .navbar-brand {
     font-weight: 600;
     font-size: 1.25rem;
     display: flex;
     align-items: center;
 }

 /* Selector de reporte en el header (visible con un reporte de Qlik abierto) */
 .selector-reporte {
     min-width: 0;
     padding-left: 1rem;
     border-left: 1px solid rgba(255, 255, 255, 0.35);
 }

 .selector-reporte-btn {
     display: flex;
     align-items: center;
     max-width: 40vw;
     color: #fff;
     font-weight: 500;
     text-decoration: none;
 }

 .selector-reporte-btn:hover,
 .selector-reporte-btn:focus,
 .selector-reporte-btn.show {
     color: rgba(255, 255, 255, 0.85);
 }

 #selectorReporteNombre {
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }

 .selector-reporte-menu {
     min-width: 260px;
     max-height: 70vh;
     overflow-y: auto;
 }

 .dashboard-container {
     padding-top: 80px;
 }

 .sidebar {
     position: fixed;
     top: 80px;
     bottom: 0;
     left: 0;
     z-index: 100;
     padding: 0;
     box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
     overflow-y: auto;
 }

 .dashboard-container.sidebar-collapsed .sidebar {
     left: -250px;
 }

 .sidebar .nav-link {
     color: #333;
     padding: 0.75rem 1rem;
     border-radius: 0;
     transition: var(--transition);
 }

 .sidebar {
     width: 250px;
     transition: left 0.3s ease-in-out;
 }

 .sidebar .nav-link:hover {
     background-color: rgba(44, 90, 160, 0.1);
     color: var(--primary-color);
 }

 .sidebar .nav-link.active {
     background-color: var(--primary-color);
     color: white;
 }

 .sidebar-heading {
     font-size: 0.75rem;
     text-transform: uppercase;
     font-weight: 600;
 }

 .main-content {
     width: 100%;
     padding-top: 1rem;
     transition: padding-left 0.3s ease-in-out;
 }

 @media (min-width: 768px) {
     .main-content {
         padding-left: 250px;
     }

     .dashboard-container.sidebar-collapsed .main-content {
         padding-left: 0;
     }
 }



 /* Cards y componentes */
 .welcome-card {
     background: linear-gradient(135deg, var(--primary-color) 0%, #1e4080 100%);
     color: white;
     padding: 2rem;
     border-radius: var(--border-radius);
     margin-bottom: 2rem;
 }

 .welcome-card h3 {
     margin-bottom: 1rem;
     font-weight: 600;
 }

 .stat-card {
     background: white;
     border-radius: var(--border-radius);
     padding: 1.5rem;
     box-shadow: var(--box-shadow);
     display: flex;
     align-items: center;
     margin-bottom: 1rem;
     transition: var(--transition);
 }

 .stat-card:hover {
     transform: translateY(-2px);
     box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
 }

 .stat-icon {
     width: 60px;
     height: 60px;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     margin-right: 1rem;
     font-size: 1.5rem;
     color: white;
 }

 .stat-content h4 {
     margin: 0;
     font-size: 2rem;
     font-weight: 700;
     color: var(--dark-color);
 }

 .stat-content p {
     margin: 0;
     color: #6c757d;
     font-size: 0.9rem;
 }

 .quick-action-card {
     display: flex;
     align-items: center;
     background: white;
     border-radius: var(--border-radius);
     padding: 1rem;
     text-decoration: none;
     color: inherit;
     transition: var(--transition);
     border: 2px solid transparent;
 }

 .quick-action-card:hover {
     color: inherit;
     transform: translateY(-2px);
     box-shadow: var(--box-shadow);
     border-color: var(--primary-color);
 }

 .quick-action-icon {
     width: 50px;
     height: 50px;
     border-radius: 8px;
     display: flex;
     align-items: center;
     justify-content: center;
     margin-right: 1rem;
     font-size: 1.25rem;
     color: white;
 }

 .quick-action-content h6 {
     margin: 0 0 0.25rem 0;
     font-weight: 600;
 }

 .quick-action-content p {
     margin: 0;
     font-size: 0.85rem;
 }

 /* Tablas */
 .table {
     background: white;
     border-radius: var(--border-radius);
     overflow: hidden;
 }

 .table th {
     background: var(--dark-color);
     color: white;
     border: none;
     font-weight: 600;
     text-transform: uppercase;
     font-size: 0.85rem;
     letter-spacing: 0.5px;
 }

 .table td {
     vertical-align: middle;
     border-color: #e9ecef;
 }

 .table-hover tbody tr:hover {
     background-color: rgba(44, 90, 160, 0.05);
 }

 /* Botones */
 .btn {
     border-radius: 8px;
     font-weight: 500;
     transition: var(--transition);
     border: none;
 }

 .btn-primary {
     background: linear-gradient(135deg, var(--primary-color) 0%, #1e4080 100%);
 }

 .btn-primary:hover {
     transform: translateY(-1px);
     box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
 }

 .btn-success {
     background: linear-gradient(135deg, var(--success-color) 0%, #1e7e34 100%);
 }

 .btn-danger {
     background: linear-gradient(135deg, var(--danger-color) 0%, #bd2130 100%);
 }

 .btn-sm {
     padding: 0.375rem 0.75rem;
     font-size: 0.875rem;
 }

 /* Modales */
 .modal-content {
     border-radius: var(--border-radius);
     border: none;
     box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
 }

 .modal-header {
     border-bottom: 1px solid #e9ecef;
     background: linear-gradient(135deg, var(--primary-color) 0%, #1e4080 100%);
     color: white;
 }

 .modal-header .btn-close {
     filter: invert(1);
 }

 .modal-footer {
     border-top: 1px solid #e9ecef;
 }

 /* Alertas */
 .alert {
     border-radius: var(--border-radius);
     border: none;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
 }

 .alert-success {
     background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
     color: #155724;
 }

 .alert-danger {
     background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
     color: #721c24;
 }

 .alert-info {
     background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
     color: #0c5460;
 }

 /* Inputs y formularios */
 .form-control,
 .form-select {
     border-radius: 8px;
     border: 2px solid #e9ecef;
     transition: var(--transition);
 }

 .form-control:focus,
 .form-select:focus {
     border-color: var(--primary-color);
     box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
 }

 /* Responsive */
 @media (max-width: 767.98px) {
     .sidebar {
         position: static;
         height: auto;
     }

     .main-content {
         margin-left: 0;
     }

     .stat-card {
         margin-bottom: 1rem;
     }

     .login-card {
         margin: 1rem;
         padding: 1.5rem;
     }

     .logo-login {
         height: 40px;
     }

     .navbar-logo {
         height: 45px;
     }

     .selector-reporte {
         padding-left: 0.5rem;
     }

     .selector-reporte-btn {
         max-width: 50vw;
     }
 }

 /* Animaciones */
 @keyframes fadeIn {
     from {
         opacity: 0;
         transform: translateY(20px);
     }

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

 .fade-in {
     animation: fadeIn 0.5s ease-out;
 }

 /* Scrollbar personalizado */
 ::-webkit-scrollbar {
     width: 8px;
 }

 ::-webkit-scrollbar-track {
     background: #f1f1f1;
 }

 ::-webkit-scrollbar-thumb {
     background: var(--primary-color);
     border-radius: 4px;
 }

 ::-webkit-scrollbar-thumb:hover {
     background: #1e4080;
 }

 /* Estados de carga */
 .loading {
     opacity: 0.6;
     pointer-events: none;
 }

 .skeleton {
     background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
     background-size: 200% 100%;
     animation: loading 1.5s infinite;
 }

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

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

 /* Mejoras de accesibilidad */
 .sr-only {
     position: absolute;
     width: 1px;
     height: 1px;
     padding: 0;
     margin: -1px;
     overflow: hidden;
     clip: rect(0, 0, 0, 0);
     white-space: nowrap;
     border: 0;
 }

 /* Focus visible para mejor accesibilidad */
 .btn:focus-visible,
 .form-control:focus-visible,
 .form-select:focus-visible {
     outline: 2px solid var(--primary-color);
     outline-offset: 2px;
 }

 /* Report Browser Styles */
 .report-card {
     transition: var(--transition);
     cursor: pointer;
 }

 .report-card:hover {
     transform: translateY(-5px);
     box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
 }

 .report-card-icon {
     opacity: 0.8;
     transition: var(--transition);
 }

 .report-card:hover .report-card-icon {
     opacity: 1;
     transform: scale(1.1);
 }

 .op-75 {
     opacity: 0.75;
 }

 .bg-light-hover:hover {
     background-color: #f0f4f8 !important;
     transform: translateX(5px);
     transition: var(--transition);
 }

 .list-group-item-action:active {
     background-color: var(--primary-color) !important;
     color: white !important;
 }

 .list-group-item-action:active i {
     color: white !important;
 }

 /* Qlik Iframe Full Height */
 .iframe-container-qlik {
     overflow: hidden;
     background-color: #f8f9fa;
 }

 .modal-content {
     border-radius: 20px;
 }

/* Document Cards */
.doc-card {
    transition: var(--transition);
}

.doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1) !important;
}

.doc-card-expired {
    filter: grayscale(1);
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none; /* Desactiva interacción base */
}

.doc-card-expired .btn, .doc-card-expired a {
    pointer-events: auto; /* Permite el clic para que salte la alerta */
}


/* ============================================
   TUTORIAL STYLES
   ============================================ */

.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: auto;
}

.tutorial-tooltip {
    position: fixed;
    z-index: 10002;
    pointer-events: auto;
}

.tutorial-tooltip-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    border: 2px solid var(--primary-color);
}

.tutorial-tooltip-animate {
    animation: tutorialPopIn 0.3s ease;
}

@keyframes tutorialPopIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.tutorial-step-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}

.tutorial-highlight {
    position: relative;
    z-index: 10001 !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.5), 0 0 20px rgba(13, 110, 253, 0.3) !important;
    border-radius: 8px;
    animation: tutorialPulse 1.5s ease-in-out infinite;
}

@keyframes tutorialPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.5), 0 0 20px rgba(13, 110, 253, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(13, 110, 253, 0.25), 0 0 30px rgba(13, 110, 253, 0.2);
    }
}

/* Modo Mantenimiento de Tableros */
.tablero-mantenimiento {
    background: #fdfaf6 !important;
    border: 1px dashed #d97706 !important;
    opacity: 0.88;
    transition: var(--transition);
}

.tablero-mantenimiento:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.25) !important;
}

.tablero-mantenimiento .report-card-icon i {
    color: #d97706 !important;
}

.maintenance-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.maintenance-card {
    max-width: 620px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    padding: 3rem 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border: 1px solid #fde68a;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.maintenance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #f59e0b, #d97706, #b45309);
}

.maintenance-icon-badge {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #fef3c7;
    color: #d97706;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 0 10px rgba(254, 243, 199, 0.6);
    animation: wrenchWiggle 2.5s ease-in-out infinite;
}

@keyframes wrenchWiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-15deg); }
    40% { transform: rotate(15deg); }
    60% { transform: rotate(-5deg); }
    80% { transform: rotate(5deg); }
}