/* ============================================================
   ESTILOS ORDENADOS - MÓDULO DE LOGIN Y AUTENTICACIÓN
   ============================================================ */

/* ============================================================
   ESTILOS GLOBALES BASE (Variables, Fondos, Glass Card)
   ============================================================ */

:root {
    --glass-bg: rgba(255, 255, 255, 0.033);
    --glass-border: rgba(255, 255, 255, 0.2);
    --accent-color: #38bdf8;
    /* Imagen de fondo global: /fondo-plataforma sirve la personalizada (subida
       desde /configuracion/fondo) o la de fábrica (fondo.png). Los velos de
       cada tema van aparte en las reglas de body.bg-immersive::before. */
    --fondo-plataforma: url('/fondo-plataforma');
}

body {
    position: relative;
    min-height: 100vh;
    color: white;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
    background: #0f172a;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Fondos Inmersivos */
body.bg-immersive::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8)), var(--fondo-plataforma);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    filter: saturate(0.8) contrast(1.1);
    transition: background-image 0.5s ease, filter 0.5s ease;
}

/* Glass Card Global */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Ocultar/Mostrar Logos según Tema */
.logo-dark {
    display: inline-block !important;
}

.logo-light {
    display: none !important;
}

/* Theme Button Global */
.theme-top-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1;
    transition: all 0.3s ease;
}

.theme-top-btn:hover {
    background: rgba(0, 213, 255, 0.911);
    transform: scale(1.1);
}

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

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

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

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

/* Modo Claro Globales */
body.light-mode {
    background: #f8fafc !important;
    color: #1e293b !important;
}

body.bg-immersive.light-mode::before {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.5)), var(--fondo-plataforma);
    filter: contrast(1.1) saturate(1.1);
}

body.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px);
}

body.light-mode .logo-dark {
    display: none !important;
}

body.light-mode .logo-light {
    display: inline-block !important;
}

body.light-mode .text-white-50,
body.light-mode .text-white {
    color: #1e293b !important;
}

.d-none {
    display: none !important;
}

small {
    font-size: 0.75rem;
    display: block;
    opacity: 0.5;
}
/* ============================================================
   ESTILOS ORDENADOS - MÓDULOS ESPECÍFICOS
   ============================================================ */

/* --- INVENTARIO --- */
#vistaDetalleOrden .glass-card {
    margin-left: 0;
    margin-right: 0;
}

.animacion-entrada,
#contenedorUsuarios>div,
#lista-inventario-optima-app>div,
#contenedorOrdenes>div,
#gridProductos>div {
    opacity: 0;
    animation: slideInDown 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: var(--delay, 0s);
}

.animate-slide-up {
    animation: slideUp 0.6s ease forwards;
}

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

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

