/* ═══════════════════════════════════════════════════════════════
   Jeloda — Login Dark Glass Edition
   Mismo lenguaje visual que el registro wizard
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ────────────────────────────────── */
:root {
    --wizard-bg-1: #0a0a0f;
    --wizard-bg-2: #0d0d18;
    --wizard-bg-3: #0a0a12;
    --accent: #2a1fbc;
    --accent-light: #60a5fa;
    --accent-glow: rgba(42, 31, 188, 0.4);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --danger: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --card-bg: rgba(24, 24, 30, 0.85);
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-border: rgba(255, 255, 255, 0.14);
    --input-focus: rgba(42, 31, 188, 0.6);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.wizard-body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--wizard-bg-1);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Background ───────────────────────────────────────────── */
.wizard-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(42, 31, 188, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(14, 165, 233, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, #0a0a0f 0%, #0d0d18 50%, #0a0a12 100%);
    background-attachment: fixed;
}

.wizard-bg::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(42, 31, 188, 0.18) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

.wizard-bg::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.10) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

/* Particles: capa decorativa detrás del hero (columna derecha en desktop) */
#particles-js {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

body.wizard-body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, #000 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, #000 20%, transparent 80%);
}

/* ─── Main Container ───────────────────────────────────────── */
.wizard-container.login-container {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 1.5rem;
}

/* Logo */
.wizard-logo {
    text-align: center;
    margin: 0;
}

.wizard-logo img {
    max-height: 52px;
    width: auto;
    filter: drop-shadow(0 4px 16px rgba(42, 31, 188, 0.35));
    transition: var(--transition);
}

.wizard-logo img:hover {
    transform: scale(1.04);
}

/* Desktop: 2 columnas (form izquierda, hero derecha) */
@media (min-width: 980px) {
    .wizard-container.login-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 4rem;
        align-items: center;
        padding: 2.5rem;
    }
    .wizard-hero {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }
    .login-card {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }
    .wizard-footer {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* ─── Hero ─────────────────────────────────────────────────── */
.wizard-hero {
    display: block;
    text-align: center;
    padding: 0.5rem 0 1rem;
}

.wizard-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 0.75rem;
}

.wizard-hero p {
    font-size: 1rem;
    line-height: 1.5;
    color: #a1a1aa;
    margin: 0 auto 1.25rem;
    max-width: 520px;
}

.wizard-hero .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.wizard-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #d4d4d8;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

.wizard-hero .hero-badge:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(42, 31, 188, 0.4);
}

.wizard-hero .hero-badge i {
    color: #60a5fa;
    font-size: 0.85rem;
}

@media (min-width: 980px) {
    .wizard-hero {
        text-align: right;
        padding: 0;
    }
    .wizard-hero h1 {
        font-size: 3rem;
        margin-bottom: 1.25rem;
    }
    .wizard-hero p {
        font-size: 1.05rem;
        margin: 0 0 1.5rem;
        margin-left: auto;
    }
    .wizard-hero .hero-badges {
        justify-content: flex-end;
    }
}

/* ─── Login Card ───────────────────────────────────────────── */
.login-card {
    width: 100%;
    background: linear-gradient(180deg, rgba(24, 24, 30, 0.85) 0%, rgba(18, 18, 24, 0.85) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    padding: 2rem 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.08) inset,
        0 0 0 1px rgba(0, 0, 0, 0.40),
        0 30px 80px -20px rgba(0, 0, 0, 0.7),
        0 0 80px -30px rgba(42, 31, 188, 0.25);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    pointer-events: none;
}

/* Logo dentro de la card (encima del título) */
.card-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-logo img {
    max-height: 56px;
    width: auto;
    filter: drop-shadow(0 4px 16px rgba(42, 31, 188, 0.35));
    transition: var(--transition);
}

.card-logo img:hover {
    transform: scale(1.04);
}

.login-kicker {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    margin: 0 auto 1rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.08);
    color: var(--accent-light);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.login-kicker span {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

@media (min-width: 768px) {
    .login-card {
        padding: 2.5rem;
    }
}

@media (min-width: 980px) {
    .login-card {
        padding: 2.5rem 2.25rem;
        max-width: 480px;
        margin-left: auto;
        width: 100%;
    }
}

/* ─── Step Header ──────────────────────────────────────────── */
.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.step-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ─── Form Fields ──────────────────────────────────────────── */
.wizard-form-group {
    margin-bottom: 1.25rem;
}

.wizard-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.wizard-body .wizard-input-wrap {
    position: relative !important;
    display: block !important;
}

body.wizard-body .wizard-input-wrap .field-icon {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
    pointer-events: none;
    z-index: 5;
    line-height: 1;
    margin: 0 !important;
    padding: 0 !important;
    width: 1em !important;
    height: 1em !important;
    overflow: visible !important;
}

body.wizard-body .wizard-input {
    width: 100% !important;
    padding: 0.85rem 1rem 0.85rem 2.75rem !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 400;
    transition: all 0.2s ease;
    outline: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    box-shadow: none;
}

body.wizard-body .wizard-input::placeholder {
    color: #71717a !important;
    font-weight: 300;
}

body.wizard-body .wizard-input:focus {
    border-color: rgba(42, 31, 188, 0.6) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(42, 31, 188, 0.18) !important;
}

body.wizard-body .wizard-input:focus ~ .field-icon {
    color: var(--accent-light);
}

/* Password toggle */
body.wizard-body .btn-password-toggle {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px !important;
    font-size: 0.95rem;
    transition: var(--transition);
    z-index: 5;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    line-height: 1;
}

body.wizard-body .btn-password-toggle:hover {
    color: var(--accent-light);
}

/* ─── Form Options ──────────────────────────────────────────── */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-options.single {
    justify-content: flex-end;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.forgot-password {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ─── Submit Button ────────────────────────────────────────── */
body.wizard-body .btn-wizard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

body.wizard-body .btn-wizard:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

body.wizard-body .btn-next,
body.wizard-body .btn-submit-wizard {
    background: linear-gradient(135deg, #2a1fbc 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(42, 31, 188, 0.35);
}

body.wizard-body .btn-next:hover:not(:disabled),
body.wizard-body .btn-submit-wizard:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(42, 31, 188, 0.50);
}

body.wizard-body .btn-wizard .spinner-icon {
    display: none;
    animation: spin 1s linear infinite;
}

body.wizard-body .btn-wizard.loading .btn-text { display: none; }
body.wizard-body .btn-wizard.loading .spinner-icon { display: inline-block; }
body.wizard-body .btn-wizard.loading i:not(.spinner-icon) { display: none; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Divider ──────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.10);
}

.divider span {
    padding: 0 1rem;
}

/* ─── Register Link ────────────────────────────────────────── */
.text-center {
    text-align: center;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.register-link {
    color: var(--accent-light);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.register-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ─── Footer ───────────────────────────────────────────────── */
.wizard-footer {
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.wizard-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.wizard-footer a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

.wizard-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.login-link-footer {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ─── WhatsApp FAB ─────────────────────────────────────────── */
.fab-whatsapp {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    animation: fabPulse 2s infinite;
}

.fab-whatsapp:hover {
    transform: scale(1.1);
    animation: none;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
    color: #fff;
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0.1); }
}

/* ─── Override global OneUI styles ─────────────────────────── */
body.wizard-body #main-container {
    padding: 0 !important;
    margin: 0 !important;
}

body.wizard-body #page-footer {
    display: none !important;
}

/* Hide Yros Chat Widget */
#yros-floating-btn,
#yros-chat-window,
#yros-welcome-popup {
    display: none !important;
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .wizard-container.login-container {
        margin: 1rem auto;
        width: 100%;
        padding: 0 0.75rem;
        min-height: auto;
    }

    .login-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-lg);
    }

    .form-options {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    /* En móvil las partículas quedan detrás del fondo dark */
    #particles-js {
        opacity: 0.5;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 1.25rem 1rem;
    }
    .step-header h2 {
        font-size: 1.25rem;
    }
}

@media (min-width: 768px) and (max-width: 979px) {
    .wizard-container.login-container {
        max-width: 720px;
        margin: 1.5rem auto;
    }
    .login-card {
        padding: 2rem 1.75rem;
    }
}

@media (min-width: 980px) and (max-width: 1199px) {
    .wizard-container.login-container {
        gap: 1.5rem 2rem;
        max-width: 1000px;
    }
    .wizard-hero h1 {
        font-size: 2.4rem;
    }
    .wizard-hero p {
        font-size: 1.05rem;
    }
}

@media (min-width: 1600px) {
    .wizard-container.login-container {
        max-width: 1320px;
    }
    .wizard-hero h1 {
        font-size: 3.4rem;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .wizard-container.login-container {
        max-width: 460px;
    }
    .login-card {
        padding: 1.75rem 1.5rem;
    }
    .step-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 767px) {
    .wizard-bg::before {
        filter: blur(30px);
        opacity: 0.85;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wizard-bg,
    .wizard-bg::before,
    .wizard-bg::after {
        animation: none !important;
    }
}
