
@import url('https://fonts.googleapis.com/css2?family=Righteous&family=Work+Sans:wght@100;300;400;600;800&display=swap');

/* ==========================================================================
   MÓDULO 1: VARIABLES Y TEMAS
   ========================================================================== */

::-moz-selection{
    background:#b3d4fc;
    text-shadow:none
}




::selection{
    background:#b3d4fc;
    text-shadow:none
}


:root {
    --bg-body: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);

    --glass-blur: blur(9px);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text: #1a1a1a;
    --border: #e2e8f0;
    --input-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --nav-height: 70px;
    --sidebar-width: 260px;
    --sidebar-collapsed: 75px;
    --radius-lg: 20px;
    --radius-md: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.98);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --input-bg: #0f172a;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --glass: rgba(18, 18, 18, 0.9);
}

/* ==========================================================================
   MÓDULO 2: RESET Y BASE
   ========================================================================== */

* {
    box-sizing: border-box;
}


    html {
    height: 100%;
    overflow-y: auto; /* 👈 scroll siempre visible */
}

body {
    width: 100%;
    min-height: 10vh;

    margin: 0;
    padding: 0;

    font-size: 16px;
    font-family: 'Work Sans';

    color: var(--text-main);

    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;

    transition: 0.3s;

    overflow-x: hidden; /* 👈 evita scroll horizontal feo */

}


/* ==========================================================================  
   ✨ TIPOGRAFÍA PRO SYSTEM (ULTRA REFINADO)
   ========================================================================== */

/* HEADINGS BASE */
h1, h2, h3, h4 {
    font-family: 'Work Sans', sans-serif;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

/* H1 */
h1 {
    font-size: clamp(1.8rem, 2.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

/* H2 */
h2 {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    font-weight: 700;
    letter-spacing: -0.6px;
    margin-bottom: 10px;
}

/* H3 */
h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* H4 */
h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* TEXTO BASE */
p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0 0 16px;
    max-width: 65ch; /* 👈 lectura cómoda */
}

/* TEXTO PEQUEÑO */
span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* LABELS PRO (MEJORADOS) */
label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* TEXTO DESTACADO */
.text-strong {
    font-weight: 700;
    color: var(--text-main);
}

/* TEXTO MUTED */
.text-muted {
    color: var(--text-muted);
}

/* LINKS PRO */
a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
}


/* =========================================
   🎯 SECCIÓN PRO
========================================= */

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* =========================================
   🧠 TEXTO ESPECIAL DASHBOARD
========================================= */

.text-xl {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.text-lg {
    font-size: 1.2rem;
    font-weight: 600;
}

.text-sm {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =========================================
   🌗 AJUSTES DARK MODE (DETALLE FINO)
========================================= */

[data-theme="dark"] h4 {
    color: #cbd5f5;
}

[data-theme="dark"] p {
    color: #94a3b8;
}

[data-theme="dark"] span {
    color: #94a3b8;
}


.title-gradient {
    background: linear-gradient(90deg, var(--primary), #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   MÓDULO 3: NAVBAR SUPERIOR
   ========================================================================== */


.logo {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.navbar{
    position:fixed;
    top:0;
    left:0;

    width:100%;
    height:var(--nav-height);

    display:flex;
    align-items:center;

    background:var(--bg-card);
    backdrop-filter: var(--glass-blur); /* Aplica el desenfoque */
    -webkit-backdrop-filter: var(--glass-blur); /* Soporte para Safari */

    border-bottom:1px solid var(--border);

    box-shadow:0 2px 8px rgba(0,0,0,0.05);

    z-index:1100;
}

/* 🔥 CONTENEDOR (arriba izquierda REAL) */
.swal-toast-container-pro {
    z-index: 999999 !important;
    padding: 0 !important;
    
    top: 10px !important;
    left: 0 !important;
    right: auto !important;

    justify-content: flex-start !important;
    align-items: flex-start !important;
}

/* 🔥 TARJETA */
.swal-toast-pro {
    border-left: 4px solid var(--primary) !important;
    padding: 12px !important;
    backdrop-filter: blur(8px);

    width: 320px !important;
    margin: 0 !important; /* 🔥 clave para pegarlo al borde */

    border-radius: 0 12px 12px 0 !important;
}

/* 🔥 BOTÓN CERRAR (mejor posicionado) */
.swal2-close {
    position: absolute !important;
    top: 6px;
    right: 8px;

    font-size: 16px !important;
    color: #aaa !important;
}

.swal2-close:hover {
    color: #fff !important;
}

/* 🚀 ANIMACIÓN */
.slide-in-left {
    animation: slideInFromLeft 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* CONTENEDOR */

.nav-container{

    width:100%;
    max-width:1300px;

    margin:auto;

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:0 20px;
}


/* LOGO */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    height: 46px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}





.brands{
    overflow:hidden;
    padding:10px 0;
    background:var(--bg-card);
    margin:4px 0.4%;
    border-radius:var(--radius-md);
    white-space:nowrap;
}

.track{
    display:flex;
    align-items:center;
    gap:80px;
    animation:scroll 25s linear infinite;
}

.track img{
    height:70px;
    filter:grayscale(1);
    opacity:0.5;
    transition:var(--transition);
}

.track img:hover{
    filter:grayscale(0);
    opacity:1;
}

[data-theme="dark"] .track img{
    filter:grayscale(1) invert(1);
}

@keyframes scroll{
    from{
        transform:translateX(0);
    }
    to{
        transform:translateX(-50%);
    }
}

   /* Aseguramos que el contenedor no bloquee clics si es muy grande */
            #fabWassap {
                pointer-events: auto !important;
            }

            @keyframes bounceIn {
                0% {
                    opacity: 0;
                    transform: scale(0.3) translateY(20px);
                }
                70% {
                    transform: scale(1.05) translateY(-5px);
                }
                100% {
                    opacity: 1;
                    transform: scale(1) translateY(0);
                }
            }


/* MENU LINKS */

.nav-menu{


    display:flex;

    align-items:center;

    list-style:none;

    gap:8px;

    margin:0;
}

/* acciones derecha */

.nav-actions{

    display:flex;

    align-items:center;

    gap:12px;

}

/* botón usuario */

.btn-user{

    background:none;

    border:none;

    font-size:1.5rem;

    cursor:pointer;

    color:var(--text-main);

    display:flex;
    align-items:center;
    justify-content:center;

    width:38px;
    height:38px;

    border-radius:50%;

    transition:0.2s;

}

.btn-user:hover{

    background:rgba(37,99,235,0.08);

    color:var(--primary);

}


/* LINKS */

.nav-link{


    text-decoration:none;

    color:var(--text-muted);

    font-weight:500;

    padding:10px 18px;

    border-radius:var(--radius-md);

    display:flex;
    align-items:center;

    gap:8px;

    transition:.2s;
}

.nav-link:hover{

    color:var(--primary);

    background:rgba(37,99,235,0.05);
}

.nav-link.active{

    background:var(--primary);

    color:#fff;
}


/* BOTON MENU */

.menu-toggle{

    display:none;

    background:none;

    border:none;

    font-size:1.4rem;

    color:var(--text-main);

    cursor:pointer;
}



/* ==========================================================================
   MÓDULO 6: RESPONSIVE (Móvil - Derecha + Glassmorphism)
   ========================================================================== */
@media (max-width: 850px){

    /* botón hamburguesa */
    .menu-toggle{
        display:block;
        position:relative;
        z-index:1200; /* siempre arriba */
    }

    /* SIDEBAR / MENÚ */
    .nav-menu{

        position:fixed;

        top:var(--nav-height); /* evita tapar navbar */

        right:-280px; /* oculto */

        width:280px;

        height:calc(100vh - var(--nav-height));

        display:flex;
        flex-direction:column;

        padding:25px 20px;

        gap:8px;

        overflow-y:auto;

        /* efecto glass */
        background:rgba(255,255,255,.85);
        backdrop-filter:blur(12px);
        -webkit-backdrop-filter:blur(12px);

        border-left:1px solid var(--border);

        box-shadow:-12px 0 30px rgba(0,0,0,.1);

        transition:var(--transition);

        z-index:1;
    }

    /* dark mode */
    [data-theme="dark"] .nav-menu{
        background:rgba(30,41,59,.9);
    }

    /* menú abierto */
    .nav-menu.open{
        right:0;
    }

    /* links */
    .nav-link{

        width:100%;

        padding:14px 16px;

        font-size:1rem;

        display:flex;
        align-items:center;

        border-radius:var(--radius-md);

        justify-content:flex-start;
    }

    /* overlay */
    .overlay{

        position:fixed;

        top:0;
        left:0;

        width:100%;
        height:100%;

        background:rgba(0,0,0,.35);

        backdrop-filter:blur(3px);

        opacity:0;
        pointer-events:none;

        transition:.3s;

        z-index:2;
    }

    .overlay.active{

        opacity:1;
        pointer-events:auto;
    }

}