:root {
    /* Valores por defecto (Tech Elite) */
    --solvix-navy: #020c1b;
    --solvix-navy-light: #0a192f;
    --solvix-cyan: #30bfe3;
    --solvix-cyan-glow: rgba(48, 191, 227, 0.4);
    --solvix-glass: rgba(16, 24, 39, 0.85);
    --solvix-silver: #e2e8f0;
    --solvix-silver-dark: #94a3b8;
    --solvix-circuit: rgba(48, 191, 227, 0.03);
    --solvix-metal: linear-gradient(135deg, #7b7b7b 0%, #d8d8d8 20%, #b0b0b0 40%, #f0f0f0 60%, #a0a0a0 80%, #7b7b7b 100%);
    --solvix-blue-G: linear-gradient(135deg, #0f4c75 0%, #1b2735 100%);
    --solvix-metal-border: rgba(0, 0, 0, 0.15);
    --solvix-metal-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    --theme-panel-header-bg: var(--solvix-metal);
    --theme-panel-header-text: #020c1b;
    --solvix-bg-image: none;

    /* Mapeo de variables antiguas */
    --corp-primary: var(--solvix-navy);
    --corp-accent: var(--solvix-cyan);

    /* Variable dinámica para texto en cabeceras */
    --solvix-header-text: #020c1b;

    /* Variables de Inyección Dinámica (Componentes Home) */
    --status-blocked: #8B5CF6;
    --theme-hero-bg: linear-gradient(135deg, var(--solvix-navy) 0%, var(--solvix-navy-light) 100%), radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    --theme-card-title-bg: transparent;
    --theme-card-title-margin: 0 0 20px 0;
    --theme-card-title-padding: 0 0 12px 0;
    --theme-card-title-radius: 0;
    --theme-card-title-border: 1px solid rgba(255, 255, 255, 0.1);
    --theme-card-title-shadow: none;

    --theme-footer-bg: transparent;
    --theme-footer-radius: 0;
    --theme-footer-padding: 15px 0 0 0;
    --theme-footer-border: 1px solid rgba(255, 255, 255, 0.2);

    --theme-chart-bg: transparent;
    --theme-chart-color: inherit;

    /* Variables Dinámicas AI Window (Tech Elite Default) */
    --theme-ai-bg: var(--solvix-glass);
    --theme-ai-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
    --theme-ai-border: 1px solid rgba(255, 255, 255, 0.1);
    --theme-ai-header-bg: var(--solvix-metal);
    --theme-ai-header-color: var(--solvix-header-text);
    --theme-ai-msg-assistant-bg: rgba(0, 0, 0, 0.3);
    --theme-ai-msg-user-bg: rgba(48, 191, 227, 0.1);
    --theme-ai-msg-user-border: 1px solid rgba(48, 191, 227, 0.3);
    --theme-ai-input-bg: var(--solvix-navy);
    --theme-ai-input-border: 1px solid rgba(255, 255, 255, 0.2);
    --theme-ai-text-main: #ffffff;
    --theme-ai-text-sub: rgba(255, 255, 255, 0.7);

    /* Estilos dinámicos para tablas (Tech Elite) */
    --theme-table-bg: rgba(16, 24, 39, 0.6);
    --theme-table-border: rgba(255, 255, 255, 0.1);
    --theme-table-hover: rgba(48, 191, 227, 0.05);
    --theme-table-text: #e2e8f0;

    /* VARIABLES ESPECÍFICAS ADMIN PANEL (Comodidad Visual) */
    --admin-bg: #020c1b;
    --admin-card-bg: rgba(255, 255, 255, 0.03);
    --admin-card-border: rgba(48, 191, 227, 0.1);
    --admin-text-main: #e2e8f0;
    --admin-text-dim: #94a3b8;
    --modal-bg: var(--form-bg, #0a192f);
    --modal-text: var(--form-text, #e2e8f0);
}

::placeholder {
    color: var(--solvix-silver-dark);
    filter: brightness(1.1);
    opacity: 1;
}

/* TEMA: SOLVENTA CORPORATIVO (Classic) */
[data-theme="solvix-corp"] {
    --solvix-navy: #ffffff;
    /* Fondo blanco puro */
    --solvix-navy-light: #f8f9fa;
    /* Fondo gris claro para paneles */
    --solvix-cyan: #007bff;
    /* Azul corporativo */
    --solvix-cyan-glow: rgba(0, 123, 255, 0.25);
    --solvix-glass: #ffffff;
    /* Fondo sólido blanco para modales */
    --solvix-silver: #333333;
    /* Texto principal */
    --solvix-silver-dark: #6c757d;
    /* Texto secundario */
    --solvix-circuit: none;
    --solvix-metal-border: transparent;
    --solvix-metal-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --solvix-header-text: #ffffff;
    /* Texto blanco sobre header azul */
    --solvix-bg-image: none;
    --theme-panel-header-bg: var(--solvix-blue-G);
    --theme-panel-header-text: #ffffff;

    /* Variables de Inyección Dinámica (Solventa Corp) */
    --theme-hero-bg: var(--solvix-blue-G);
    --theme-card-title-bg: var(--solvix-blue-G);
    --theme-card-title-margin: -20px -20px 20px -20px;
    --theme-card-title-padding: 15px 20px;
    --theme-card-title-radius: 16px 16px 0 0;
    --theme-card-title-border: none;
    --theme-card-title-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);

    --theme-footer-bg: var(--solvix-blue-G);
    --theme-footer-radius: 15px;
    --theme-footer-padding: 20px;
    --theme-footer-border: none;

    --theme-chart-bg: var(--solvix-blue-G);
    --theme-chart-color: #ffffff;

    /* Variables Dinámicas AI Window (Solventa Corp Default) */
    --theme-ai-bg: var(--rec-bg-light);
    --theme-ai-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    --theme-ai-border: 1px solid var(--rec-border);
    --theme-ai-header-bg: var(--solvix-blue-G);
    --theme-ai-header-color: #ffffff;
    --theme-ai-msg-assistant-bg: #ffffff;
    --theme-ai-msg-user-bg: #e6f2ff;
    --theme-ai-msg-user-border: 1px solid #b3d7ff;
    --theme-ai-input-bg: var(--solvix-navy);
    --theme-ai-input-border: 1px solid var(--rec-border);
    --theme-ai-text-main: var(--rec-text-main);
    --theme-ai-text-sub: var(--rec-text-sub);

    /* Estilos dinámicos para tablas (Solventa Corp) */
    --theme-table-bg: #ffffff;
    --theme-table-border: #e1e5e9;
    --theme-table-hover: #f1f5f9;
    --theme-table-text: #333333;

    /* Variables de referencia Solventa Corp */
    --rec-primary: #007bff;
    --rec-secondary: #357ABD;
    --rec-bg-light: #f8f9fa;
    --rec-border: #e1e5e9;
    --rec-success: #28a745;
    --rec-danger: #dc3545;
    --rec-warning: #ffc107;
    --rec-text-main: #333;
    --rec-text-sub: #6c757d;

    /* SOBREESCRITURA ADMIN (Corporate but comfortable) */
    /* Evitamos el blanco, usamos tonos Slate profesionales */
    --admin-bg: #0f172a; 
    --admin-card-bg: #1e293b;
    --admin-card-border: rgba(255, 255, 255, 0.05);
    --admin-text-main: #f8fafc;
    --admin-text-dim: #94a3b8;

    /* Variables de modales (tema claro) */
    --modal-bg: #f8fafc;
    --modal-text: #333333;
}

#home-settings-header {
    background: var(--solvix-metal);
    color: var(--solvix-header-text);
    border-bottom: 1px solid var(--solvix-metal-border);
}

#home-settings-header h3,
#home-settings-header .fas {
    color: var(--solvix-header-text);
}

/* Footer dinámico: Metal en Corp, Vidrio en Tech */
.app-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

[data-theme="corporate"] .app-footer {
    background: var(--solvix-metal) !important;
    border-top: 1px solid var(--solvix-metal-border) !important;
    color: var(--solvix-header-text) !important;
}

[data-theme="corporate"] .app-footer .footer-item,
[data-theme="corporate"] .app-footer .footer-icon {
    color: var(--solvix-header-text) !important;
}

/* COMPONENTES ASISTENCIA ADMIN (Sincronización con Admin Panel) */
.att-monitor-card {
    background: var(--admin-card-bg) !important;
    border: 1px solid var(--admin-card-border) !important;
    border-radius: 12px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--admin-text-main) !important;
}

.att-monitor-card.working {
    border-color: var(--solvix-cyan) !important;
    box-shadow: 0 0 15px var(--solvix-cyan-glow);
}

.att-mon-name {
    color: var(--solvix-cyan) !important;
    font-weight: 700;
}

.att-mon-timer {
    font-family: 'Inter', monospace;
    font-size: 1.2rem;
    color: #fff;
    margin: 10px 0;
}

.att-view-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--admin-card-border);
    color: var(--admin-text-dim);
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.att-view-btn.active {
    background: var(--solvix-cyan-glow);
    color: var(--solvix-cyan);
    border-color: var(--solvix-cyan);
}

.att-tab-btn {
    color: var(--admin-text-dim) !important;
    border-bottom: 2px solid transparent;
    padding: 10px 15px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

.att-tab-btn.active {
    color: var(--solvix-cyan) !important;
    border-bottom-color: var(--solvix-cyan) !important;
}


body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    background-color: var(--solvix-navy);
    cursor: auto;
    color: var(--solvix-silver);
    line-height: 1.6;
    position: relative;
    transition: background 0.5s ease, color 0.5s ease;

}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(var(--solvix-circuit) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: -1;
}

.hidden-view {
    display: none !important;
}

.active-view {
    display: block !important;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===========================================
   UTILITY CLASSES (SOLVENTA TECH ELITE)
   =========================================== */

.glass-panel {
    background: var(--solvix-glass);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--solvix-silver);
}

.btn-solventa {
    padding: 12px 24px;
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: white !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-solventa:hover {
    filter: brightness(110%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.input-solventa {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white !important;
    font-size: 0.95rem;
    transition: all 0.3s;
}

/* Solo en tema corporativo los inputs son oscuros con el borde sutil solicitado */
[data-theme="corporate"] .input-solventa,
[data-theme="corporate"] .form-input {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: white !important;
}




.logo-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}



/* Transition out */
.loading-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* Main Content Blur Transition */
.app-loading {
    filter: blur(10px);
    transition: filter 0.8s ease;
}

.app-loading.loaded {
    filter: blur(0);
}

/* ===========================================
   LOGIN
   =========================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

}

/* --- LEGACY: se conservan para posibles reutilizaciones en otros módulos --- */
.login-card {
    background: var(--solvix-glass);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border: 1px solid var(--solvix-cyan-glow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.company-logo {
    width: 100px;
    height: 100px;
}

.login-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--solvix-cyan);
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px var(--solvix-cyan-glow);
}

.login-subtitle {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 16px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--solvix-cyan);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px var(--solvix-cyan-glow);
}

.login-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    filter: brightness(110%);
}

.error-message {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    display: none;
    font-size: 0.88rem;
    text-align: center;
}

/* ===========================================
   LOGIN PORTAL — BRUSHED METAL SECURE CARD
   =========================================== */

.login-card-img {
    position: relative;
    width: 100%;
    max-width: 550px;
    padding: 45px 90px 45px;
    border-radius: 90px;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;

    /* ✅ Fondo metálico */
    background-image: url('./Tarjeta_metalic4.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    

    animation: portalCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}



@keyframes portalCardIn {
    from { opacity: 0; transform: scale(0.93) translateY(20px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Scanlines overlay para efecto tech */
.portal-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        <i class="fas fa-brain"></i>rent 3px,
        rgba(0, 0, 0, 0.04) 3px,
        rgba(0, 0, 0, 0.04) 4px
    );
    pointer-events: none;
    z-index: 0;
    border-radius: 18px;
}

/* Reflejo de luz superior */
.login-card-portal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: 18px 18px 0 0;
    z-index: 1;
}

/* Asegurar que el contenido quede sobre los overlays */
.login-card-portal > *:not(.portal-scanlines) {
    position: relative;
    z-index: 2;
}

/* Logo wrapper */
.portal-logo-wrap {
    margin-bottom: 10px;
}

.portal-logo-img {
    height: 160px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* Headline / Subtítulo */
.portal-headline {
    font-family: 'Segoe UI', -apple-system, sans-serif;
    font-size: 1.82rem;
    font-weight: 1000;
    letter-spacing: 0.08em;
    color: #fff;
    text-transform: uppercase;
    margin: 0 0 24px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    line-height: 1.4;
}

/* CONTENEDORES DE INPUT SIN RECORTES */
.portal-form {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.portal-input-img-wrap {
    position: relative;
    width: 100%;
    height: 130px; /* Altura personalizada por el usuario */
    background-size: 100% 180%;
    background-position: center;
    backdrop-filter: blur(2px);

    
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.user-frontal-bg {
    background-image: url('../img/user_input_frontal.png');
}

.pass-frontal-bg {
    background-image: url('../img/pass_input_frontal.png');
}

/* Input invisible posicionado sobre el área de cristal frontal completa */
.portal-input-hidden {
    width: 100%;
    height: 60%; /* Ajustado para centrarse verticalmente en la nueva altura */
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 30px 0 130px; /* Ajuste <i class="fas ${icons[type]}" style="font-size: 4rem;"></i>de para la nueva altura */
    color: #020c1b;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
   
}

/* ELIMINAR EL CUADRO BLANCO DEL AUTOFILL */
.portal-input-hidden:-webkit-autofill,
.portal-input-hidden:-webkit-autofill:hover, 
.portal-input-hidden:-webkit-autofill:focus {
    -webkit-text-fill-color: #020c1b;
    -webkit-box-shadow: 0 0 0px 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
    background: transparent !important;
}

.portal-input-hidden::placeholder {
    color: rgba(2, 12, 27, 0.4);
}

/* Ajuste del botón ojo para imágenes frontales */
.portal-eye-btn-img {
    position: absolute;
    right: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(2, 12, 27, 0.5);
    display: flex;
    align-items: center;
}

.portal-eye-btn-img svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* BOTÓN SIGN IN BASADO EN IMAGEN (RESTAURADO) */
.portal-signin-btn-img {
    width: 100%;
    height: 85px;
    background: url('../img/Rectangular-submitbutton.png') no-repeat center;
    background-size: 115% 180%;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, filter 0.2s;
    margin-top: 5px;
    padding-bottom: 3px;
}

.portal-signin-btn-img:hover {
    filter: brightness(1.1);
}

.portal-signin-btn-img:active {
    transform: scale(0.97);
}

/* Efecto de barrido de luz (Glow Sweep) */
.portal-btn-glow {
    position: absolute;
    top: 0; left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    transform: skewX(-30deg);
    transition: left 0.7s ease-in-out;
    pointer-events: none;
    z-index: 2;
}

.portal-signin-btn:hover .portal-btn-glow {
    left: 200%;
}

/* Links secundarios */
.portal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.portal-link {
    font-size: 0.82rem;
    color: #1a2535;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
    cursor: pointer;
}

.portal-link:hover {
    color: rgba(0, 200, 240, 0.9);
}

.portal-link-sep {
    font-size: 0.82rem;
    color: var(--solvix-navy);
}

.portal-link-signup {
    font-weight: 700;
}

/* Footer copyright */
.portal-copyright {
    margin: 16px 0 0 0;
    font-size: 0.72rem;
    color: var(--solvix-navy);
    letter-spacing: 0.03em;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}


.demo-credentials {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.demo-credentials h4 {
    margin-bottom: 15px;
    color: #333;
}

.demo-credentials p {
    margin: 8px 0;
    font-family: monospace;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* ===========================================
   HEADER / NAV (MODERN TECH)
   =========================================== */

.dashboard {
    display: none;
    /* Hidden until logged */
    min-height: 100vh;
}

.header {
    background: var(--solvix-metal);
    color: var(--solvix-header-text);
    padding: 10px 30px;
    border-bottom: 2px solid var(--solvix-metal-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--solvix-metal-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 15px;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--solvix-header-text);
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-title p {
    font-size: 11px;
    color: var(--solvix-header-text);
    font-weight: 600;
    opacity: 0.8;
    margin: 0;
}

.header-title h1 {
    font-size: 22px;
    font-weight: 900;
    color: #020c1b;
    margin: 0;
    letter-spacing: 1.5px;
    text-shadow: none;
}

.header-title p {
    font-size: 11px;
    color: #020c1b;
    opacity: 0.6;
    margin: 0;
    font-weight: 700;
}

.header-logo-img {
    height: 100px;
    width: 190px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.1));
}


.nav-menu {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.1);
    padding: 5px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.2);
    align-items: center;
}

.nav-tab {
    padding: 8px 18px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--solvix-header-text);
    font-size: 13px;
    font-weight: 700;
    border-radius: 25px;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-tab:hover {
    background: #00f2ff54;
    transform: translateY(-1px);
}

.nav-tab.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

/* Header responsivo */
@media (max-width: 1200px) {
    .header {
        padding: 10px 20px;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-tab {
        font-size: 11px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }

    .nav-menu {
        gap: 4px;
        padding: 4px;
    }

    .nav-tab {
        font-size: 10px;
        padding: 4px 8px;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    order: 0;
}

.company-logo-contact {
    width: 80px;
    margin-bottom: 15px;
}

.company-logo {
    width: 50px;
    height: 50px;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--solvix-header-text);
    margin: 0;
}

.header-title p {
    font-size: 14px;
    color: var(--solvix-header-text);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    order: 2;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.user-role {
    font-size: 12px;
    color: #666;
}

.logout-button {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: #c82333;
}

/* ===========================================
   MAIN LAYOUT
   =========================================== */

.main-content {
    padding: 30px;
    max-width: 100%;
    width: 100%;
    margin: 0;
}

/* Responsive Design Global Overrides */
@media (max-width: 1024px) {
    .main-content {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 80px !important;
        /* Smaller footer space on mobile */
    }

    .main-content {
                <i class="fas fa-copy"></i> Copiar
                <i class="fas fa-sync"></i> Recargar
                <i class="fas fa-print"></i> Imprimirng: 10px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .header {
        padding: 10px;
        flex-direction: column;
        gap: 10px;
        position: relative;
        /* Unstick on mobile if content is tall, or keep sticky but compact */
    }

    .header-left {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .header-title h1 {
        font-size: 1.2rem;
    }

    .nav-menu {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 5px;
        justify-content: flex-start;
        /* Alignment for scroll */
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll iOS */
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .nav-tab {
        padding: 8px 15px;
        font-size: 0.9rem;
        flex-shrink: 0;
        /* Prevent squishing */
    }

    .header-right {
        order: -1;
        /* Move user info to top or hide? Let's keep it but compact */
        width: 100%;
        justify-content: space-between;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 5px;
    }

    .user-info {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .user-name {
        font-size: 0.9rem;
    }

    .user-role {
        display: none;
        /* Hide role on mobile to save space */
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .acciones-grid {
        grid-template-columns: 1fr;
    }

    .pedido-info {
        grid-template-columns: 1fr;
    }

    .checklist-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .progress-container {
        width: 100%;
    }

    .timer-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===========================================
   DASHBOARD SECTIONS
   =========================================== */

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    margin-bottom: 30px;
}

.dashboard-section {
    background: var(--solvix-navy-light);
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.dashboard-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.icon-movements {
    background: #007bff;
    color: white;
}

.icon-alerts {
    background: #dc3545;
    color: white;
}

.icon-chart {
    background: #28a745;
    color: white;
}

.icon-actions {
    background: #ffc107;
    color: #333;
}

/* Movimientos Table */
.table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
}

.movements-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.movements-table th {
    background: var(--solvix-cyan);
    color: var(--solvix-header-text);
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    position: sticky;
    top: 0;

}

.movements-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e1e5e9;
}

.cantidad-negativo {
    color: #dc3545;
    font-weight: bold;
}

.cantidad-entrante {
    color: #007bff;
    font-weight: bold;
}

.cantidad-saliente {
    color: #dc3545;
    font-weight: bold;
}

.movements-table tr:hover {
    background: rgba(108, 117, 125, 0.1)
}

.estado-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.estado-con-stock {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid #28a745;
}

.estado-sin-stock {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border: 1px solid #dc3545;
}

.estado-quiebre {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border: 1px solid #ffc107;
}

.estado-entrante {
    background: rgba(0, 123, 255, 0.1);
    color: #074198;
    border: 1px solid #007bff;
}

.estado-saliente {
    background: rgba(108, 117, 125, 0.1);
    color: #383d41;
    border: 1px solid #6c757d;
}

/* --- Estilos para el Encabezado Flexible --- */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* -------------------------------------------
   VIEW TOGGLE SWITCH
   ------------------------------------------- */
.view-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    /* Color del texto del switch */
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: #007bff;
    /* Azul al activar gráfico */
}

input:focus+.slider {
    box-shadow: 0 0 1px #007bff;
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Redondeado del slider */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* --- Lógica de Mostrar/Ocultar --- */
.hidden-view {
    display: none !important;
}

.active-view {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Chart Container */
.chart-container {
    height: 300px;
    margin-bottom: 20px;
    position: relative;
}

.chart-switch {
    position: relative;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 20px;

    z-index: 10;
}

.switch-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.switch {
    position: relative;
    width: 50px;
    height: 24px;
    background: #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.switch.active {
    background: rgba(0, 255, 255, 0.5);
}

.switch-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch.active .switch-slider {
    transform: translateX(26px);
}

.balance-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.balance-item {
    text-align: center;
}

.balance-item p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.balance-item strong {
    font-size: 18px;
    color: #333;
}




/* Acciones Rápidas */
.acciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;

}

.accion-card {
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.accion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-rojo {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.card-naranja {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: #333;
}

.card-azul {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.card-celeste {
    background: linear-gradient(45deg, #17a2b8, #138496);
}

.card-verde {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.card-cantidad {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 8px;
}

.card-titulo {
    font-size: 14px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===========================================
   TABLES
   =========================================== */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    background: #007bff;
    color: white;
}

/* ===========================================
   INVENTARIO
   =========================================== */

.inventario-table th {
    background: #357ABD;
    color: white;
    font-weight: 600;
}

.inventario-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===========================================
   FORMULARIOS
   =========================================== */

.form-row {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.btn-save {
    background: #28a745;
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* ===========================================
   MODALES BÁSICOS
   =========================================== */

.modal,
/* Modal Acerca De */
.modal-about {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.modal-about-content {
    background: var(--solvix-glass);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.modal-about-header {
    background: var(--solvix-metal);
    color: #020c1b;
    
    text-align: center;
    border-bottom: 2px solid var(--solvix-metal-border);
    box-shadow: var(--solvix-metal-shadow);
}

.modal-about-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.modal-about-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-about-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-about-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    color: var(--solvix-silver);
    
}

.about-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    
}

.about-content h4 {
    color: var(--solvix-cyan);
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 0 10px var(--solvix-cyan-glow);
}

.about-content p {
    font-size: 15px;
    line-height: 1.6;
    margin: 10px 0;
}

.about-content ul {
    margin: 10px 0;
}

.about-content li {
    margin: 5px 0;
    opacity: 0.8;
}

.modal-about-footer {
    background: var(--solvix-metal);
    padding: 15px;
    text-align: center;
    font-size: 13px;
    color: #020c1b;
    border-top: 2px solid var(--solvix-metal-border);
    font-weight: 600;
}

/* Modal Soporte Técnico */


/* Animación de entrada del modal */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

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

/* ===========================================
   FOOTER
   =========================================== */

.footer {
    position: fixed;
    /* Fijo en la pantalla */
    bottom: 0;
    /* Pegado al fondo */
    left: 0;
    /* Desde el borde izquierdo */
    height: 100px;
    /* Altura fija */
    width: 100%;
    /* Ancho completo */
    z-index: 1000;
    background: var(--solvix-metal);
    border-top: 1px solid var(--solvix-metal-border);
    color: var(--solvix-header-text);
    display: flex;
    align-items: center;
    /* Centrado vertical */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    margin-top: auto;
    flex-shrink: 0;
    overflow: visible !important;
}

.footer-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Sección Izquierda */
.footer-left {
    display: flex;
    align-items: center;
    gap: 15px;

}

.footer-logo-left {
    width: 70px;
    /* Tamaño controlado */
    height: 70px;
    flex-shrink: 0;
    /* No se encoge */
}

.footer-logo-left img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Mantiene proporción */
    border-radius: 8px;
}

.footer-about {
    display: flex;
    align-items: center;
}

.footer-about h3 {
    color: #3498db;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    /* No se rompe en varias líneas */
}

.footer-about h3:hover {
    color: #5dade2;
    text-decoration: underline;
}

/* Sección Central */
.footer-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.footer-logo {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Sección Derecha */
.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 1;
}

.footer-copyright {
    font-size: 12px;
    color: var(--solvix-header-text);
    opacity: 0.7;
    margin: 0;
    white-space: nowrap;
}

.footer-support {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 14px;
    border: 2px solid #3498db;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.footer-support:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .footer {
        height: auto;
        min-height: 100px;
        padding: 15px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-left {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }

    .footer-center {
        width: 100%;
    }

    .footer-right {
        align-items: center;
        width: 100%;
    }

    .footer-about h3,
    .footer-copyright,
    .footer-support {
        font-size: 12px;
    }

    .footer-logo-left {
        width: 30px;
        height: 30px;
    }

    .footer-logo {
        width: 60px;
        height: 60px;
    }

    body {
        padding-bottom: 140px;
    }

    .modal-about-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-about-body {
        padding: 20px;
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .footer-about h3 {
        font-size: 11px;
    }

    .footer-support {
        padding: 5px 10px;
        font-size: 11px;
    }

    .footer-copyright {
        font-size: 10px;
    }
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {
        top: -300px;
        opacity: 0
    }

    to {
        top: 0;
        opacity: 1
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5e9;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===========================================
   UTILIDADES
   =========================================== */

.loading,
.toast-container-bottom {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}



/* --- ESTILOS PARA LAS NOTIFICACIONES TOAST (VERSIÓN FINAL) --- */

.toast-container-bottom .toast.success {
    background-color: #28a745 !important;
    /* Verde forzado */
}

.toast-container-bottom .toast.error {
    background-color: #dc3545 !important;
    /* Rojo forzado */
}

.toast-container-bottom .toast.info {
    background-color: #007bff !important;
    /* Azul forzado */
}

.toast-container-bottom .toast.warning {
    background-color: #ffc107 !important;
    /* Amarillo forzado */
    color: #212529 !important;
    /* Texto oscuro forzado */
}

@keyframes slideInBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}




/* Estilos para la sección de Almacenaje */

.page-header {
    position: relative;
    /* Necesario para posicionar el contador */
}




.storage-container {
    background: linear-gradient(135deg, #4a90e2 0%, #357ABD 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
}

.storage-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    color: #ffffff;
}

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

.storage-form .form-label {
    color: #e1e5e9;
    font-weight: 500;
    margin-bottom: 10px;
}

.storage-form .form-input,
.storage-form .form-input.small {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cfd9e0;
    color: #333;
}

.storage-form .form-input::placeholder {
    color: #6c757d;
}

.position-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.btn-generate-qr {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-generate-qr:hover {
    background: white;
    color: #357ABD;
}

.btn-save {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Modal para Escáner */
.modal-content-scanner {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalopen 0.4s;
}

.modal-header-scanner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-scanner h2 {
    margin: 0;
    font-size: 20px;
}

.close-scanner {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-scanner:hover {
    opacity: 0.8;
}

.modal-body-scanner {
    padding: 20px;
}

.scanner-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.scanner-info {
    text-align: center;
}

.scanner-status {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.modal-footer-scanner {
    padding: 15px 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.btn-manual {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-manual:hover {
    background: #5a6268;
}

.btn-cancel {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #c82333;
}



/* Estilos para la sección de inventario */
.inventory-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.inventory-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.inventory-section .movements-table th {
    background: #357ABD;
}

/* Responsive Design para Almacenaje */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-generate-qr,
    .btn-save {
        width: 100%;
    }
}



/* Estilos para el Modal de Código QR */
.modal-content-qr {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    width: 400px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalopen 0.4s;
    text-align: center;
}

.modal-header-qr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-qr h2 {
    margin: 0;
    font-size: 20px;
}

.close-qr {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-qr:hover {
    opacity: 0.8;
}

.modal-body-qr {
    padding: 20px;
}

.modal-footer-qr {
    padding: 15px 20px;
    border-top: 1px solid #e1e5e9;
}

.btn-print {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-print:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Estilos para la impresión */
@media print {
    body * {
        visibility: hidden;
    }

    #qrModal,
    #qrModal *,
    #live-invoice-preview,
    #live-invoice-preview * {
        visibility: visible;
    }

    #qrModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        box-shadow: none;
    }

    #live-invoice-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 800px !important;
        min-width: 800px !important;
        max-width: 800px !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        transform: scale(0.88) !important;
        transform-origin: top left !important;
    }

    .modal-header-qr,
    .modal-footer-qr {
        display: none;
        /* Oculta botones y header al imprimir */
    }
}

/* Estilos para Control de Ubicación */
.position-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 8px;
}

.position-group {
    display: flex;
    flex-direction: column;
}

.position-label {
    color: #e1e5e9;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.position-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cfd9e0;
    color: #333;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.position-input:focus {
    border-color: #357ABD;
    box-shadow: 0 0 0 2px rgba(53, 122, 189, 0.2);
    outline: none;
}

.position-input::placeholder {
    color: #6c757d;
}

/* Responsive para Control de Ubicación */
@media (max-width: 768px) {
    .position-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}


/* ========================================
   ESTILOS PARA LA TABLA DE INVENTARIO (TU ESTILO ORIGINAL)
   ======================================== */

.inventario-table-container {
    margin-top: 30px;
}

.table-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

/* CONTROLES ACTUALIZADOS - MANTENIENDO TU ESTILO */
.table-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

/* Estilos para el buscador (MANTENIENDO TU ESTILO ORIGINAL) */
.search-box {
    position: relative;
    margin-bottom: 0;
    /* Cambiado de 15px a 0 para el nuevo diseño */
}

.search-box input {
    width: 90%;
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #357ABD;
    outline: none;
    box-shadow: 0 0 0 3px rgba(53, 122, 189, 0.1);
}

.search-box input::placeholder {
    color: #6c757d;
}

/* ========================================
   TABLA DE INVENTARIO (TU ESTILO ORIGINAL)
   ======================================== */

.inventario-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--theme-table-bg);
    color: var(--theme-table-text);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.inventario-table th {
    background: var(--solvix-metal);
    color: var(--solvix-header-text);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;

}


.inventario-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--theme-table-border);
    overflow: hidden;
    /* Oculta el texto que se sale */
    text-overflow: ellipsis;
    /* Añade puntos suspensivos */
    white-space: nowrap;
    /* Evita que el texto salte a la siguiente línea */
}

.inventario-table tbody tr:hover {
    background-color: var(--theme-table-hover);
}

/* Estilos para las columnas de ubicación */
.inventario-table th:nth-child(2),
.inventario-table th:nth-child(3),
.inventario-table th:nth-child(4) {
    background: #4a90e2;
    /* Un poco más claro que el resto */
    text-align: center;
    min-width: 80px;
}

.inventario-table td:nth-child(2),
.inventario-table td:nth-child(3),
.inventario-table td:nth-child(4) {
    text-align: center;
    font-weight: 500;
    color: #357ABD;
}


/* ========================================
   ESTILOS TRANSLÚCIDOS PARA TABLA DE INVENTARIO
   ======================================== */

/* ESTADOS TRANSLÚCIDOS PARA TABLA DE INVENTARIO */
.inventario-table-container .dashboard-section .inventario-table .estado-label.con-stock {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid #28a745;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.inventario-table-container .dashboard-section .inventario-table .estado-label.sin-stock {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border: 1px solid #dc3545;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.inventario-table-container .dashboard-section .inventario-table .estado-label.quiebre {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border: 1px solid #ffc107;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.inventario-table-container .dashboard-section .inventario-table .estado-label.entrante {
    background: rgba(0, 123, 255, 0.1);
    color: #074198;
    border: 1px solid #007bff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.inventario-table-container .dashboard-section .inventario-table .estado-label.saliente {
    background: rgba(108, 117, 125, 0.1);
    color: #383d41;
    border: 1px solid #6c757d;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}


/* CATEGORÍAS TRANSLÚCIDAS PARA TABLA DE INVENTARIO */
.inventario-table-container .dashboard-section .inventario-table .categoria-label {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.inventario-table-container .dashboard-section .inventario-table .categoria-label.ferreteria {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border: 1px solid #64748b;
}

.inventario-table-container .dashboard-section .inventario-table .categoria-label.iluminacion {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.inventario-table-container .dashboard-section .inventario-table .categoria-label.hogar {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
}

.inventario-table-container .dashboard-section .inventario-table .categoria-label.electronica {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.inventario-table-container .dashboard-section .inventario-table .categoria-label.telefonia,
.inventario-table-container .dashboard-section .inventario-table .categoria-label.instrumentos-musicales,
.inventario-table-container .dashboard-section .inventario-table .categoria-label.perifericos,
.inventario-table-container .dashboard-section .inventario-table .categoria-label.accesorios,
.inventario-table-container .dashboard-section .inventario-table .categoria-label.no-definido {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid #94a3b8;
}



/* Estilos para la sección del botón QR */
.qr-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qr-section .form-input {
    margin-bottom: 0;
}

/* Botones mini de escáner */
.btn-scanner-mini {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-scanner-mini:hover {
    background: #5a6fd8;
    transform: translateY(-50%) scale(1.1);
}

.btn-scanner-mini:active {
    transform: translateY(-50%) scale(0.95);
}

/* Hacer los inputs relativos para posicionar botones */
.form-group {
    position: relative;
}

.form-input {
    padding-right: 40px;
    /* Espacio para el botón */
}

/* Modal para Escáner */
.modal-content-scanner {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header-scanner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-scanner h2 {
    margin: 0;
    font-size: 20px;
}

.close-scanner {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-scanner:hover {
    opacity: 0.8;
}

.modal-body-scanner {
    padding: 20px;
}

.scanner-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.scanner-info {
    text-align: center;
}

.scanner-status {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.modal-footer-scanner {
    padding: 15px 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.btn-manual {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-manual:hover {
    background: #5a6268;
}

.btn-cancel {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #c82333;
}




/* ===========================================
   END
   =========================================== */

/* CONFIGURACIÓN DE TIEMPO - EDITA AQUÍ */
:root {
    --loading-duration: 2s;

    /* PALETA DE COLORES GLOBAL (EGL) */
    --rec-primary: #007bff;
    --rec-secondary: #357ABD;
    --rec-bg-light: #f8f9fa;
    --rec-border: #e1e5e9;
    --rec-success: #28a745;
    --rec-danger: #dc3545;
    --rec-warning: #ffc107;
    --rec-text-main: #333;
    --rec-text-sub: #6c757d;
}

/* Cursor restablecido a estándar por el sistema */

/* ... (Loading CSS remains same) ... */

/* ===========================================
   GENERIC UI COMPONENTS (STANDARDIZED)
   =========================================== */

/* Cards */
.card {
    background: var(--solvix-navy-light);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--rec-border);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    background: var(--rec-bg-light);
    padding: 15px 20px;
    border-bottom: 1px solid var(--rec-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-weight: 700;
    color: var(--rec-text-main);
    font-size: 16px;
}

/* Page Headers */
.page-header {
    margin-bottom: 25px;
    border-bottom: 2px solid var(--rec-border);
    padding-bottom: 15px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--rec-text-main);
    margin: 0 0 5px 0;
}

.page-subtitle {
    color: var(--rec-text-sub);
    margin: 0;
    font-size: 14px;
}

/* Buttons */
.btn-save {
    background: linear-gradient(135deg, var(--rec-success) 0%, #218838 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.btn-export {
    background: white;
    border: 1px solid var(--rec-border);
    color: var(--rec-text-main);
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-export:hover {
    background: var(--rec-bg-light);
    border-color: #d1d5db;
}

/* Utilities */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Global Tab Content Style */
.tab-content {
    background-color: var(--rec-bg-light);
    min-height: 85vh;
    padding: 20px;
    padding-bottom: 50px;
    /* Reducido para footer delgado de 30px */
    border-radius: 8px;
}

/* TOAST CONTAINER OVERRIDE - High Z-Index for Glassmorphism */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast,
.alerta-toast {
    pointer-events: auto;
}

/* Toast Variations - Tech Elite Style */
.toast.success,
.alerta-toast.success {
    border-left: 4px solid #10b981 !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, var(--solvix-glass) 100%) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2) !important;
}

.toast    .quick-btn .fas {
    color: #10b981;
}

.toast.error,
.alerta-toast.error {
    border-left: 4px solid #ef4444 !important;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, var(--solvix-glass) 100%) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2) !important;
}

.toast.priority-high .fas {
    color: #ef4444;
}

.toast.warning,
.alerta-toast.warning {
    border-left: 4px solid #f59e0b !important;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, var(--solvix-glass) 100%) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2) !important;
}

.toast.warning .alerta-icon {
    color: #f59e0b;
}

.toast.info,
.alerta-toast.info {
    border-left: 4px solid var(--solvix-cyan) !important;
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.15) 0%, var(--solvix-glass) 100%) !important;
    box-shadow: 0 0 15px var(--solvix-cyan-glow) !important;
}

.home-task-item .fas {
    color: var(--solvix-cyan);
}

.toast,
.alerta-toast {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    background: var(--solvix-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px 18px;
    border-radius: 12px;
    min-width: 300px;
    max-width: 400px;
    font-size: 14px;
    display: block;
    animation: slideInToast 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--solvix-silver);
}

/* --- ESTRUCTURA INTERNA DEL TOAST --- */
.alerta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.alerta-titulo {
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alerta-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.<i class="fas ${act.icon}" style="font-size:18px"></i>city: 0.9;
    margin-bottom: 4px;
}

.alerta-timestamp {
    font-size: 11px;
    opacity: 0.5;
    text-align: right;
    margin-top: 5px;
}

/* --- VARIACIONES DE ALERTA DE INVENTARIO (TECH ELITE GLASS) --- */
.alerta-toast.inventario-bajo {
    border-left: 4px solid #f59e0b !important;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, var(--solvix-glass) 100%) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2) !important;
}

.alerta-toast.sin-inventario {
    border-left: 4px solid #ef4444 !important;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, var(--solvix-glass) 100%) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2) !important;
}

.alerta-toast.no-inventariado {
    border-left: 4px solid #8b5cf6 !important;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, var(--solvix-glass) 100%) !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2) !important;
}

.alerta-toast.stock-negativo {
    border-left: 4px solid #b91c1c !important;
    background: linear-gradient(90deg, rgba(185, 28, 28, 0.3) 0%, var(--solvix-glass) 100%) !important;
    box-shadow: 0 0 15px rgba(185, 28, 28, 0.3) !important;
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

/* Scanner Button Style */
.btn-scanner-mini {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    margin-left: 5px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-scanner-mini:hover {
    background: #cbd5e1;
    transform: scale(1.05);
}

/* --- New Icon Styles --- */
.nav-icon-img {
    height: 41px;
    /* Reduced from 24px per user feedback "gigantic" assumption, normal size */
    width: auto;
    vertical-align: middle;
    transition: transform 0.2s ease;
    display: inline-block;
}

.nav-tab:hover .nav-icon-img {
    transform: scale(1.1);
}

.card-icon-img {
    height: 48px;
    /* Standard size for card icons */
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
    display: inline-block;
}


/* ===========================================
   CUSTOM CONTEXT MENU (TECH ELITE PROTECTION)
   =========================================== */

.custom-context-menu {
    position: fixed;
    z-index: 10000;
    min-width: 180px;
    background: var(--solvix-glass);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--solvix-cyan-glow);
    padding: 8px 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: none;
    animation: menuAppear 0.2s ease-out;
}

@keyframes menuAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

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

.context-menu-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--solvix-silver);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.context-menu-item:hover {
    background: rgba(0, 242, 255, 0.1);
    color: var(--solvix-cyan);
    padding-left: 20px;
}

.context-menu-item .fas {
    font-size: 18px;
    opacity: 0.8;
}

.context-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 6px 0;
}

/* Specific adjustment for header buttons if needed */
.header-right .nav-icon-img {
    height: 18px;
}

/* =============================================
   SIDEBAR LATERAL (Desktop ≥ 1024px)
   ============================================= */
.app-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--solvix-navy);
    border-right: 1px solid var(--solvix-metal-border);
    z-index: 200;
    flex-direction: column;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo {
    height: 90px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(0, 242, 255, 0.2));
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-tab,
.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--solvix-silver);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    width: 100%;
    letter-spacing: 0.3px;
}

.sidebar-tab:hover {
    background: rgba(0, 242, 255, 0.08);
    color: var(--solvix-cyan);
    transform: translateX(4px);
}

.sidebar-tab.active {
    background: rgba(0, 242, 255, 0.12);
    color: var(--solvix-cyan);
    box-shadow: inset 3px 0 0 var(--solvix-cyan);
    font-weight: 700;
}

.sidebar-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.sidebar-icon-img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    opacity: 0.85;
}

.sidebar-tab.active .sidebar-icon-img,
.sidebar-tab:hover .sidebar-icon-img {
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--solvix-cyan-glow));
}

.sidebar-label {
    white-space: nowrap;
}

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-outdoor-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--solvix-silver);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    width: 100%;
    letter-spacing: 0.3px;
}

.sidebar-outdoor-btn:hover {
    background: rgba(0, 242, 255, 0.08);
    color: var(--solvix-cyan);
    transform: translateX(4px);
}

.sidebar-logout-btn {
    color: #ef4444;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* =============================================
   MOBILE COMPACT HEADER (< 1024px)
   ============================================= */
.mobile-compact-header {
    display: none;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--solvix-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 150;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    gap: 8px;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: var(--solvix-cyan);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: rgba(0, 242, 255, 0.1);
}

.mobile-menu-btn .fas {
    font-size: 28px;
}

.mobile-header-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-header-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mobile-header-action-btn {
    background: none;
    border: none;
    color: var(--solvix-silver);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.mobile-header-action-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    color: var(--solvix-cyan);
}

.mobile-header-action-btn .fas {
    font-size: 24px;
}

/* =============================================
   BOTTOM NAVIGATION BAR (< 1024px)
   ============================================= */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 62px;
    background: var(--solvix-navy);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 300;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.bottom-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--solvix-silver-dark);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 12px;
    min-width: 56px;
    flex: 1;
    max-width: 80px;
    position: relative;
}

.bottom-nav-tab:hover {
    color: var(--solvix-cyan);
    background: rgba(0, 242, 255, 0.05);
}

.bottom-nav-tab.active {
    color: var(--solvix-cyan);
}

.bottom-nav-tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--solvix-cyan);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.5);
}

.bottom-nav-icon {
    font-size: 24px;
}

.bottom-nav-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* =============================================
   SLIDE-OUT DRAWER (Móvil < 1024px)
   ============================================= */
.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 400;
}

.mobile-drawer.open {
    display: block;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeOverlay 0.3s ease;
}

@keyframes fadeOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background: var(--solvix-navy);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideDrawer 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes slideDrawer {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-title {
    margin: 0;
    color: var(--solvix-cyan);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.drawer-close {
    background: none;
    border: none;
    color: var(--solvix-silver);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-tab {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: var(--solvix-silver);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.drawer-tab:hover {
    background: rgba(0, 242, 255, 0.08);
    color: var(--solvix-cyan);
    transform: translateX(4px);
}

.drawer-tab-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.drawer-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 8px 0;
}

.drawer-logout {
    color: #ef4444;
}

.drawer-logout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}

/* ===========================================
   BREAKPOINT: DESKTOP (≥ 1024px)
   =========================================== */
@media (min-width: 1024px) {
    .app-sidebar {
        display: flex;
    }

    .header {
        display: none !important;
    }

    .mobile-compact-header {
        display: none !important;
    }

    .bottom-nav {
        display: none !important;
    }

    .mobile-drawer {
        display: none !important;
    }

    .dashboard {
        margin-left: 260px;
        width: calc(100% - 260px);
        min-height: 100vh;
    }

    .main-content {
        padding: 30px;
        max-width: 100%;
    }

    .home-welcome-text h1 {
        font-size: 2.5rem;
    }
}

/* ===========================================
   BREAKPOINT: TABLETA Y MÓVIL (< 1024px)
   =========================================== */
@media (max-width: 1023px) {
    .app-sidebar {
        display: none !important;
    }

    .header {
        display: none !important;
    }

    .mobile-compact-header {
        display: flex;
    }

    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 72px;
    }

    .dashboard {
        margin-left: 0;
        width: 100%;
    }

    .main-content {
        padding: 12px;
    }

    /* Asegurar que el app-footer no compita con bottom-nav */
    .app-footer {
        display: none !important;
    }
}

/* ===========================================
   BREAKPOINT: MÓVIL PEQUEÑO / ZEBRA (< 480px)
   =========================================== */
@media (max-width: 480px) {
    .bottom-nav-tab {
        padding: 4px 6px;
        min-width: 44px;
    }

    .bottom-nav-icon {
        font-size: 20px;
    }

    .bottom-nav-label {
        font-size: 0.5rem;
    }

    .mobile-header-logo {
        height: 24px;
    }

    .mobile-compact-header {
        height: 44px;
        padding: 0 6px;
    }

    .main-content {
        padding: 8px;
    }

    .drawer-panel {
        width: 280px;
    }
}

/* =============================================
   MODO EXTERIOR / ALTO CONTRASTE (High Contrast Outdoor)
   ============================================= */
.high-contrast-outdoor {
    --solvix-navy: #ffffff;
    --solvix-navy-light: #f3f4f6;
    --solvix-glass: #ffffff;
    --solvix-bg-image: none;
    --solvix-silver: #000000;
    --solvix-silver-dark: #1f2937;
    --solvix-header-text: #000000;
    --solvix-metal-border: #000000;
    --solvix-cyan: #1d4ed8;
    --rec-success: #15803d;
    --rec-danger: #b91c1c;
    --rec-warning: #c2410c;
    --rec-border: #000000;
    --admin-card-bg: #ffffff;
    --admin-text-main: #000000;
    --theme-table-text: #000000;
    --theme-table-bg: #ffffff;
    --theme-table-border: #000000;
}

.high-contrast-outdoor body,
.high-contrast-outdoor .dashboard,
.high-contrast-outdoor .main-content {
    background: #ffffff !important;
}

.high-contrast-outdoor .elite-tech-card,
.high-contrast-outdoor .home-card,
.high-contrast-outdoor .att-checkin-card,
.high-contrast-outdoor .panel,
.high-contrast-outdoor .dispatch-header,
.high-contrast-outdoor .picking-module-header,
.high-contrast-outdoor .page-header {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.high-contrast-outdoor button,
.high-contrast-outdoor .btn,
.high-contrast-outdoor .nav-tab,
.high-contrast-outdoor .sidebar-tab,
.high-contrast-outdoor .bottom-nav-tab {
    border: 2px solid #000000 !important;
    font-weight: 800 !important;
    box-shadow: none !important;
}

.high-contrast-outdoor input,
.high-contrast-outdoor select,
.high-contrast-outdoor textarea {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

.high-contrast-outdoor .app-sidebar,
.high-contrast-outdoor .mobile-compact-header,
.high-contrast-outdoor .bottom-nav,
.high-contrast-outdoor .drawer-panel {
    background: #ffffff !important;
    border-color: #000000 !important;
}

.high-contrast-outdoor .sidebar-tab,
.high-contrast-outdoor .drawer-tab {
    color: #000000 !important;
}

.high-contrast-outdoor .sidebar-tab.active {
    background: #1d4ed8 !important;
    color: #ffffff !important;
}

.high-contrast-outdoor .sidebar-label,
.high-contrast-outdoor .sidebar-icon {
    color: inherit;
}

.high-contrast-outdoor .sidebar-icon-img {
    opacity: 1 !important;
    filter: none !important;
}

#sidebar-outdoor-icon-img {
    transition: transform 0.3s ease;
}

.high-contrast-outdoor #sidebar-outdoor-icon-img {
    transform: rotate(180deg);
}

#outdoor-mode-icon {
    transition: transform 0.3s ease;
}

.high-contrast-outdoor #outdoor-mode-icon {
    transform: rotate(180deg);
}

/* Movement Log Table Styles */
.movement-log-table tbody tr:hover {
    background: rgba(0, 242, 255, 0.03);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}