/* ============================================================
   WISPA MKT v5.0 — Login Page  |  Dark Premium Theme
   ============================================================ */

:root {
    --navy:     #060d1f;
    --navy2:    #0b1630;
    --blue:     #3b82f6;
    --cyan:     #22d3ee;
    --indigo:   #6366f1;
    --glass-bg: rgba(255,255,255,0.05);
    --glass-border: rgba(255,255,255,0.12);
    --text-white: #f1f5f9;
    --text-muted: rgba(255,255,255,0.50);
    --text-soft:  rgba(255,255,255,0.75);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--navy);
    overflow: hidden;
    color: var(--text-white);
}

/* ── Barra de carga ─────────────────────────────────────────── */
#login-progress {
    position: fixed; top: 0; left: 0;
    width: 0; height: 3px; opacity: 0; z-index: 9999;
    background: linear-gradient(90deg, var(--blue), var(--cyan), var(--indigo));
    background-size: 300% 100%;
    box-shadow: 0 0 16px rgba(34,211,238,0.5);
    transition: opacity 0.2s;
}
#login-progress.is-loading {
    opacity: 1;
    animation: pgRun 1.8s ease-in-out infinite, pgShine 2s linear infinite;
}
@keyframes pgRun   { 0%{width:0} 70%{width:80%} 100%{width:100%} }
@keyframes pgShine { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ════════════════════════════════════════════════════════════
   CONTENEDOR PRINCIPAL
   ════════════════════════════════════════════════════════════ */
#page-container {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
    animation: fadeIn .5s ease both;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ── Fondo animado (blobs de color) ─────────────────────────── */
#page-container::before {
    content: '';
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 55% 55% at 15% 25%,  rgba(59,130,246,0.22) 0%, transparent 65%),
        radial-gradient(ellipse 45% 45% at 85% 75%,  rgba(99,102,241,0.18) 0%, transparent 65%),
        radial-gradient(ellipse 40% 35% at 70% 10%,  rgba(34,211,238,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 30% 85%,  rgba(59,130,246,0.10) 0%, transparent 60%),
        linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
    animation: blobShift 12s ease-in-out infinite alternate;
}
@keyframes blobShift {
    0%   { filter: blur(0px); }
    50%  { filter: blur(2px); }
    100% { filter: blur(0px); }
}

/* Grid de puntos */
#page-container::after {
    content: '';
    position: absolute; inset: 0; z-index: 1;
    background-image: radial-gradient(circle, rgba(148,163,184,0.10) 1px, transparent 1px);
    background-size: 32px 32px;
    animation: gridDrift 18s linear infinite;
    pointer-events: none;
}
@keyframes gridDrift {
    0%   { background-position: 0 0; }
    100% { background-position: 32px 32px; }
}

/* ════════════════════════════════════════════════════════════
   LADO IZQUIERDO — Branding
   ════════════════════════════════════════════════════════════ */
.login-brand-side {
    width: 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 72px 64px;
    position: relative;
    z-index: 10;
    background: transparent;
}

/* Línea vertical separadora */
.login-brand-side::after {
    content: '';
    position: absolute;
    right: 0; top: 10%; bottom: 10%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.10), transparent);
}

.brand-content { position: relative; z-index: 2; }

/* Badge versión */
.brand-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(34,211,238,0.08);
    border: 1px solid rgba(34,211,238,0.30);
    color: var(--cyan);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 30px;
    backdrop-filter: blur(8px);
}
.brand-version-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--cyan);
    animation: dot 2s ease-in-out infinite;
}
@keyframes dot { 0%,100%{opacity:1} 50%{opacity:0.25} }

/* Ícono wifi */
.brand-logo i {
    font-size: 40px;
    display: block;
    margin-bottom: 16px;
    color: var(--cyan);
    filter: drop-shadow(0 0 12px rgba(34,211,238,0.5));
}

/* Título sistema */
.brand-logo h1 {
    font-size: 58px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    color: #fff;
}
/* Efecto: primera palabra blanca, segunda cian */
.brand-logo h1 .word-accent {
    background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-system-slogan {
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--cyan);
    opacity: 0.75;
}

.brand-tagline {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-soft);
    margin-top: 24px;
    max-width: 300px;
    line-height: 1.7;
}

/* Features */
.brand-features {
    list-style: none;
    margin-top: 36px;
}
.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-soft);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    animation: slideIn .4s ease both;
}
.brand-features li:nth-child(1){animation-delay:.10s}
.brand-features li:nth-child(2){animation-delay:.20s}
.brand-features li:nth-child(3){animation-delay:.30s}
.brand-features li:nth-child(4){animation-delay:.40s}
.brand-features li:last-child { border-bottom: none; }
@keyframes slideIn { from{opacity:0;transform:translateX(-16px)} to{opacity:1;transform:none} }
.brand-features i {
    color: var(--cyan);
    font-size: 15px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(34,211,238,0.4));
}

/* Divisor */
.brand-divider {
    width: 50px; height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    border-radius: 999px;
    margin-top: 30px;
    box-shadow: 0 0 10px rgba(34,211,238,0.4);
}

/* Footer */
.brand-footer {
    position: absolute;
    bottom: 28px; left: 64px;
    font-size: 11px;
    color: var(--text-muted);
    z-index: 10;
}
.brand-footer a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
}
.brand-footer a:hover { color: #fff; }

/* ════════════════════════════════════════════════════════════
   LADO DERECHO — Formulario
   ════════════════════════════════════════════════════════════ */
.login-form-side {
    width: 52%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px;
    position: relative;
    z-index: 10;
    background: transparent;
}

/* ── Card glassmorphism ──────────────────────────────────────── */
.login-form-container {
    width: 100%;
    max-width: 410px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 24px;
    padding: 44px 40px;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05) inset,
        0 32px 80px rgba(0,0,0,0.45),
        0 8px 24px rgba(0,0,0,0.3);
    animation: cardUp .55s cubic-bezier(0.22,1,0.36,1) .1s both;
}
@keyframes cardUp { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:none} }

/* Línea brillante top */
.login-form-container::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--blue), transparent);
    border-radius: 999px;
    opacity: 0.8;
}

/* Corner glow */
.login-form-container::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%);
    pointer-events: none;
}

/* Logo */
.company-logo {
    text-align: center;
    margin-bottom: 28px;
}
.company-logo img {
    max-height: 65px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(1.1) drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

/* Título */
.login-title { text-align: center; margin-bottom: 28px; }
.login-title h2 {
    margin: 0 0 6px;
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.3px;
}
.login-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Labels ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
    position: relative;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    margin-bottom: 7px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.07);
    color: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    box-sizing: border-box;
    height: 48px;
    outline: none;
}
.form-control::placeholder { color: rgba(255,255,255,0.28); font-size: 14px; }
.form-control:hover {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.09);
}
.form-control:focus {
    border-color: var(--cyan);
    background: rgba(34,211,238,0.06);
    box-shadow: 0 0 0 4px rgba(34,211,238,0.10),
                0 0 16px rgba(34,211,238,0.08);
}

/* Show/hide password */
.showHidePw {
    position: absolute;
    right: 14px; top: 38px;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    font-size: 17px;
    transition: color .2s;
    user-select: none;
}
.showHidePw:hover { color: var(--cyan); }

/* ── Checkbox ────────────────────────────────────────────────── */
.checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
}
.checkbox input[type="checkbox"] {
    width: 16px; height: 16px;
    border-radius: 4px;
    accent-color: var(--cyan);
    cursor: pointer;
    flex-shrink: 0;
}
.checkbox label {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

/* ── Botón principal ─────────────────────────────────────────── */
.login-buttons { margin-top: 4px; }

.btn-success {
    width: 100%;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
    color: #fff;
    cursor: pointer;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
    box-shadow: 0 4px 20px rgba(34,211,238,0.28), 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}
.btn-success::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity .2s;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(34,211,238,0.40), 0 4px 12px rgba(0,0,0,0.3);
}
.btn-success:hover::before { opacity: 1; }
.btn-success:active  { transform: translateY(1px); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.btn-success:disabled{ opacity: .60; cursor: wait; transform: none; }

/* ── Links ───────────────────────────────────────────────────── */
.login-hint {
    margin: 14px 0 0;
    text-align: center;
    color: rgba(255,255,255,0.28);
    font-size: 12px;
}
.login-link,
.btn-link.login-link {
    display: block;
    width: 100%;
    margin-top: 10px;
    text-align: center;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: color .2s;
    opacity: 0.85;
}
.login-link:hover,
.btn-link.login-link:hover { color: #fff; opacity: 1; text-decoration: none; }

/* ── Formulario reset ────────────────────────────────────────── */
.login-reset-form          { display: none; }
.login-reset-form.is-visible {
    display: block;
    animation: cardUp .3s ease both;
}
.login-reset-title { margin-bottom: 16px; }

/* ── Modales ─────────────────────────────────────────────────── */
.modal-content {
    background: #141f35;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    color: #fff;
}
.modal-header  { border-bottom: 1px solid rgba(255,255,255,0.08); padding: 20px 24px; }
.modal-title   { color: var(--cyan); font-weight: 700; }
.modal-body    { padding: 24px; }
.modal-footer  { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 24px; background: rgba(255,255,255,0.03); border-radius: 0 0 18px 18px; }

/* ── jConfirm ───────────────────────────────────────────────── */
.jconfirm .jconfirm-box.jconfirm-type-success { border-top: 4px solid var(--cyan) !important; }
.jconfirm .jconfirm-box.jconfirm-type-success .jconfirm-title-c .jconfirm-icon-c { color: var(--cyan) !important; }
.jconfirm .jconfirm-box.jconfirm-type-info    { border-top: 4px solid var(--blue) !important; }
.jconfirm .jconfirm-box.jconfirm-type-info    .jconfirm-title-c .jconfirm-icon-c { color: var(--blue) !important; }

.toast-container { z-index: 99999 !important; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .login-brand-side::after { display: none; }
    .login-brand-side { display: none; }
    .login-form-side  { width: 100%; }
    .login-form-container { max-width: 440px; padding: 36px 28px; }
}
@media (max-width: 480px) {
    .login-form-side { padding: 16px; }
    .login-form-container { padding: 28px 20px; border-radius: 18px; }
}
