/* NEUXA portal — landing pública + login */
:root {
    --nx-orange: var(--neuxa-orange, #FF7300);
    --nx-navy: var(--neuxa-navy, #0B2340);
    --nx-navy-dark: var(--neuxa-navy-dark, #071A30);
    --nx-text: #F5F7FA;
    --nx-muted: #94A3B8;
    --nx-stroke: rgba(255, 255, 255, 0.12);
    --nx-radius: 12px;
    --nx-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    --nx-bg-photo: url("Imagen de WhatsApp 2025-11-20 a las 08.21.20_b337d827.jpg");
    --nx-font: var(--neuxa-font, "Inter", system-ui, sans-serif);
}

body.nx-portal {
    margin: 0;
    font-family: var(--nx-font);
    color: var(--nx-text);
    min-height: 100vh;
    background:
        linear-gradient(180deg,
            rgba(7, 26, 48, 0.82) 0%,
            rgba(11, 35, 64, 0.78) 42%,
            rgba(7, 26, 48, 0.86) 100%),
        var(--nx-bg-photo) center/cover fixed no-repeat;
}
body.nx-portal:not(.nx-login) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.nx-brand,
.nx-hero-title,
.nx-login-logo h1 {
    font-family: var(--nx-font);
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.18em;
}

.nx-brand { font-size: 1.05rem; }
.nx-brand .nx-u,
.nx-hero-title .nx-u,
.nx-login-logo .nx-u { color: var(--nx-orange); }

/* ── Header público ── */
.nx-site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 40px;
    background: rgba(7, 26, 48, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nx-header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nx-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background 180ms ease, border-color 180ms ease;
}
.nx-pill:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nx-pill.primary {
    background: var(--nx-orange);
    border-color: var(--nx-orange);
    color: #fff;
}
.nx-pill.primary:hover { background: #e86800; border-color: #e86800; color: #fff; }
.nx-pill.logout { border-color: rgba(252, 165, 165, 0.4); color: #fca5a5; }

/* ── Landing ── */
.nx-inicio-wrap {
    position: relative;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 118px 28px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nx-hero-block { text-align: center; margin-bottom: 48px; }

.nx-eyebrow {
    margin: 0 0 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--nx-orange);
}

.nx-hero-title {
    font-size: clamp(3.1rem, 9vw, 5.4rem);
    letter-spacing: 0.22em;
    line-height: 0.95;
    margin: 0 0 12px;
}

.nx-hero-sub {
    margin: 0 0 22px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.nx-hero-tagline {
    margin: 0 auto 16px;
    max-width: 720px;
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #fff;
}

.nx-hero-desc {
    max-width: 560px;
    margin: 0 auto 32px;
    font-size: 1rem;
    line-height: 1.6;
    color: #CBD5E1;
    font-weight: 400;
}

.nx-hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}
.nx-hero-cta .nx-btn-primary {
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 0.95rem;
    box-shadow: 0 10px 28px rgba(255, 115, 0, 0.28);
}

.nx-hero-note {
    margin: 0;
    font-size: 0.78rem;
    color: #94A3B8;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.nx-hero-note i { color: var(--nx-orange); font-size: 0.72rem; }

/* ── Módulos ── */
.nx-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.nx-module {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 20px 18px;
    border-radius: 16px;
    background: rgba(10, 18, 32, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: inherit;
    min-height: 188px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.nx-module:hover {
    background: rgba(10, 18, 32, 0.72);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.nx-module-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--nx-orange);
    background: rgba(255, 115, 0, 0.16);
    border: 1px solid rgba(255, 115, 0, 0.22);
}
.nx-module[data-accent="cyan"] .nx-module-icon {
    color: #60A5FA;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.28);
}
.nx-module[data-accent="violet"] .nx-module-icon {
    color: #A78BFA;
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(139, 92, 246, 0.28);
}
.nx-module[data-accent="emerald"] .nx-module-icon {
    color: #34D399;
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.28);
}

.nx-module h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    letter-spacing: -0.01em;
}

.nx-module p {
    font-size: 0.84rem;
    line-height: 1.55;
    color: #94A3B8;
    margin: 0;
    flex: 1;
}

.nx-module-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nx-orange);
}
.nx-module:hover .nx-module-cta { gap: 10px; }
.nx-module-cta i { font-size: 0.7rem; transition: transform 180ms ease; }
.nx-module:hover .nx-module-cta i { transform: translateX(3px); }

.nx-trust-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 36px;
    padding: 18px 24px 22px;
    margin-top: auto;
    background: rgba(5, 14, 28, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.nx-trust-bar span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #94A3B8;
    font-weight: 500;
}
.nx-trust-bar i { color: var(--nx-orange); font-size: 0.82rem; width: 14px; text-align: center; }

.nx-site-footer {
    padding: 20px 24px 32px;
    text-align: center;
    font-size: 0.72rem;
    color: #64748B;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Modal solicitar acceso ── */
.nx-dialog {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 28px 28px 22px;
    max-width: 420px;
    width: calc(100% - 32px);
    background: #0B2340;
    color: #F5F7FA;
    box-shadow: var(--nx-shadow);
}
.nx-dialog::backdrop { background: rgba(7, 26, 48, 0.72); }
.nx-dialog h2 { margin: 0 0 10px; font-size: 1.15rem; font-weight: 700; }
.nx-dialog p { margin: 0 0 20px; font-size: 0.9rem; line-height: 1.55; color: #94A3B8; }
.nx-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ── Login ── */
body.nx-login {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.nx-back-home {
    position: fixed;
    top: 22px;
    left: 28px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nx-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 180ms ease;
}
.nx-back-home:hover { color: #fff; }

.nx-login-shell {
    width: 100%;
    max-width: 400px;
    margin: 24px;
    padding: 40px 36px 28px;
    border-radius: 16px;
    background: rgba(7, 26, 48, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--nx-shadow);
}

.nx-login-logo { text-align: center; margin-bottom: 28px; }
.nx-login-logo h1 {
    font-size: 1.85rem;
    letter-spacing: 0.22em;
    margin: 0 0 10px;
}
.nx-login-kicker {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #CBD5E1;
}

.nx-portal-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 115, 0, 0.1);
    border: 1px solid rgba(255, 115, 0, 0.28);
    color: var(--nx-orange);
    font-size: 0.72rem;
    font-weight: 600;
}
.nx-portal-chip[hidden] { display: none !important; }

.nx-login-client {
    display: block;
    margin-top: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #64748B;
}

.nx-field { margin-bottom: 14px; text-align: left; }
.nx-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94A3B8;
    margin-bottom: 6px;
}
.nx-field-wrap { position: relative; }
.nx-field-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748B;
    font-size: 0.9rem;
    pointer-events: none;
}
.nx-field input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.nx-field input::placeholder { color: #64748B; }
.nx-field input:focus {
    outline: none;
    border-color: rgba(255, 115, 0, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 115, 0, 0.12);
}
.nx-field:focus-within i { color: var(--nx-orange); }

.nx-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 16px;
    font-size: 0.78rem;
    color: #94A3B8;
}
.nx-login-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.nx-login-row input[type="checkbox"] {
    accent-color: var(--nx-orange);
    width: 14px;
    height: 14px;
}
.nx-login-row a {
    color: #CBD5E1;
    text-decoration: none;
    font-weight: 500;
}
.nx-login-row a:hover { color: var(--nx-orange); }

.nx-btn-ingresar {
    width: 100%;
    padding: 13px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: var(--nx-orange);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.nx-btn-ingresar:hover:not(:disabled) {
    background: #e86800;
    box-shadow: 0 8px 20px rgba(255, 115, 0, 0.28);
    transform: translateY(-1px);
}
.nx-btn-ingresar:disabled { opacity: 0.85; cursor: wait; }

.nx-login-foot {
    text-align: center;
    margin-top: 22px;
    font-size: 0.75rem;
    color: #64748B;
}

.nx-spinner {
    width: 1.35rem;
    height: 1.35rem;
    border: 0.18em solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nxSpin 0.7s linear infinite;
}
@keyframes nxSpin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
    .nx-bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
    body.nx-portal { background-attachment: scroll; }
    .nx-site-header {
        padding: 14px 18px;
        background: rgba(7, 26, 48, 0.92);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
    .nx-inicio-wrap {
        justify-content: flex-start;
        padding: 96px 18px 28px;
    }
    .nx-hero-title {
        font-size: clamp(2.2rem, 12vw, 3.2rem);
        letter-spacing: 0.14em;
    }
    .nx-hero-block { margin-bottom: 28px; }
    .nx-hero-desc { font-size: 0.92rem; }
    .nx-bento { grid-template-columns: 1fr; }
    .nx-trust-bar {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
        padding: 14px 18px 20px;
    }
    .nx-login-shell { padding: 32px 22px 24px; }
    .nx-login-row { flex-wrap: wrap; }
}
