/* ============================================
   BASE (Variables, Tipografía y Utilidades)
   ============================================ */

:root {
    /* Fondos principales */
    --bg-dark: #1f2940;
    --bg-darker: #141b2d;

    /* Colores de Componentes */
    --input-bg: #2a3447;
    --card-bg: #1f2940;
    --bg-main-surface: #1a2235;

    /* Colores de Texto */
    --color-light: #cbd5e1;    /* ✅ Gris plata, súper legible pero sin ser blanco puro */
    --color-muted: #94a3b8;    /* Gris medio para textos secundarios */
    --color-nav-muted: #94a3b8;

    /* Marca y Acciones */
    --brand-primary: #4fb3ff;
    --btn-primary-bg: #2563eb;
    --btn-primary-hover: #1d4ed8;
    --btn-primary-text: #ffffff;
    --btn-active-alpha: rgba(37, 99, 235, 0.15);

    /* Botón Secundario */
    --btn-secondary-bg: #475569;
    --btn-secondary-hover: #64748b;
    --btn-secondary-text: var(--color-light);

    /* Layout */
    --sidebar-width: 260px;
    --navbar-height: 60px;
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --shadow-light: rgba(0, 0, 0, 0.2);
    --border-dark: #334155;

    /* COLORES SEMÁNTICOS */
    --color-success: #34d399;
    --color-success-bg: rgba(16, 185, 129, 0.12);
    --color-success-border: rgba(16, 185, 129, 0.25);
    --color-success-alert: rgba(16, 185, 129, 0.30);
    --color-success-alert-border: rgba(16, 185, 129, 0.5);



        --color-danger: #fb7185; /* O prueba con #fca5a5 si quieres aún más luz */
        --color-danger-bg: rgba(251, 113, 133, 0.12); /* Ajustado al nuevo rojo */
        --color-danger-border: rgba(251, 113, 133, 0.25);
        --color-danger-alert: rgba(251, 113, 133, 0.30);
        --color-danger-alert-border: rgba(251, 113, 133, 0.5);



    --color-warning: #fbbf24;
    --color-warning-bg: rgba(245, 158, 11, 0.12);
    --color-warning-border: rgba(245, 158, 11, 0.25);
    --color-warning-alert: rgba(245, 158, 11, 0.30);
    --color-warning-alert-border: rgba(245, 158, 11, 0.5);

    --color-info: #60a5fa;
    --color-info-bg: rgba(59, 130, 246, 0.12);
    --color-info-border: rgba(59, 130, 246, 0.25);
    --color-info-alert: rgba(59, 130, 246, 0.30);
    --color-info-alert-border: rgba(59, 130, 246, 0.5);

    --color-inactive: #94a3b8;
    --color-inactive-bg: rgba(148, 163, 184, 0.08);
    --color-inactive-border: rgba(148, 163, 184, 0.15);
    --color-inactive-alert: rgba(148, 163, 184, 0.15);
    --color-inactive-alert-border: rgba(148, 163, 184, 0.25);



    /* ============================================
       SOBREESCRITURA DE TEXTOS SEMÁNTICOS
       ============================================ */
    .text-success { color: var(--color-success) !important; }
    .text-danger { color: var(--color-danger) !important; }
    .text-warning { color: var(--color-warning) !important; }
    .text-info { color: var(--color-info) !important; }


}



/* SOBREESCRITURA DE UTILIDADES BOOTSTRAP */
.bg-secondary { background-color: var(--btn-secondary-bg) !important; }
.text-secondary { color: var(--color-muted) !important; }

/* BASE */
* { font-family: 'Nunito', sans-serif; }
html, body { height: 100%; margin: 0; padding: 0; font-size: 0.94rem; }

/* CAMPOS OBLIGATORIOS */
.required-field::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}
.text-danger { color: #dc3545 !important; }

/* =========================
   RESPONSIVE BASE
========================= */
@media (max-width: 768px) {
    body { font-size: 1rem; }
}




/* ✅ Animación suave para el contenido principal */
.fade-in-content {
    /* Aumentamos a 0.5s y usamos una curva de velocidad más elegante */
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        /* Hacemos que suba desde un poco más abajo para que se note */
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); } /* Se achica un poquito */
}
.btn:active {
    transform: scale(0.97);
    transition: transform 0.1s;
}