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

/* Variables personalizadas para mantener consistencia y facilitar cambios */
:root {
    --primary-color: #2563eb; /* Azul corporativo */
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background-light: #f9fafb;
    --sidebar-width-expanded: 16rem; /* 64 en tailwind (w-64) */
    --sidebar-width-collapsed: 4rem; /* 16 en tailwind (w-16) */
    --header-height: 4rem; /* 16 en tailwind (h-16) */
}

/* Reset básico y configuración global */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Evita scroll en el body, lo manejamos en contenedores internos */
}

/* Clases utilitarias personalizadas que extienden Tailwind */
.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

/* Transiciones suaves para la interactividad */
.transition-all-300 {
    transition: all 0.3s ease-in-out;
}

/* Estilos específicos para el Sidebar */
#sidebar {
    transition: width 0.3s ease-in-out;
}

/* Indicador de módulo activo */
.active-module {
    background-color: #eff6ff; /* blue-50 */
    color: var(--primary-color);
    font-weight: 500;
}

.active-module i {
    color: var(--primary-color);
}

/* Estilos para el scrollbar personalizado (opcional pero mejora UX) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Estilos responsive específicos */
@media (max-width: 768px) {
    /* En pantallas pequeñas el sidebar permanece siempre visible y compacto,
       mostrando solo iconos y el logo, tal como se espera en móviles/tablets. */
    #sidebar {
        position: relative;
        width: var(--sidebar-width-collapsed);
        height: 100vh;
    }
}

/* Estilos para tarjetas de dashboard y módulos */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

/* Estados de carga (Skeleton loading) */
.skeleton {
    background-color: #e2e8f0;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    border-radius: 0.25rem;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}
