/* ============================================================
   NEOFINANCE - ESTILOS AUTH (Login / Registro)
   ============================================================ */

:root {
    --bg-dark: #0a0e27;
    --bg-darker: #050816;
    --cyan: #00F0FF;
    --cyan-dim: rgba(0, 240, 255, 0.3);
    --cyan-glow: rgba(0, 240, 255, 0.6);
    --orange: #FF7B00;
    --orange-dim: rgba(255, 123, 0, 0.3);
    --green: #00FF88;
    --red: #FF2E4D;
    --text-primary: #E0E7FF;
    --text-secondary: #94A3B8;
    --border: rgba(0, 240, 255, 0.2);
    --border-bright: rgba(0, 240, 255, 0.5);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    min-height: 100vh;
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Fondo grid animado */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 50px 50px, 50px 50px; }
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ============ CONTENEDOR AUTH ============ */
.auth-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--cyan-dim);
    animation: containerIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes containerIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    to { left: 100%; }
}

/* ============ LOGO ============ */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--cyan), var(--orange));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--bg-dark);
    box-shadow: 0 0 30px var(--cyan-glow);
    animation: logoPulse 2.5s ease-in-out infinite;
    position: relative;
}

.auth-logo-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    border: 2px solid var(--cyan);
    opacity: 0.3;
    animation: ringExpand 2.5s ease-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 30px var(--cyan-glow); }
    50% { box-shadow: 0 0 50px var(--cyan-glow), 0 0 80px var(--cyan-dim); }
}

@keyframes ringExpand {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.3); opacity: 0; }
}

.auth-logo-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--cyan);
    text-shadow: 0 0 20px var(--cyan-glow);
    margin-bottom: 6px;
}

.auth-logo-subtitle {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-secondary);
    font-family: 'Orbitron', sans-serif;
}

/* ============ TÍTULO DE ACCIÓN ============ */
.auth-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    letter-spacing: 1px;
}

/* ============ FORMULARIO ============ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-secondary);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cyan);
    font-size: 16px;
    pointer-events: none;
    transition: var(--transition);
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    min-height: 48px;
}

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

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--cyan);
}

/* ============ PASSWORD STRENGTH ============ */
.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.active {
    display: block;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.strength-text {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-family: 'Orbitron', sans-serif;
}

/* ============ BOTÓN PRINCIPAL ============ */
.btn-auth {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--cyan), #0099cc);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-dark);
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 52px;
    text-transform: uppercase;
    box-shadow: 0 0 20px var(--cyan-dim);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:hover {
    box-shadow: 0 0 30px var(--cyan-glow);
    transform: translateY(-2px);
}

.btn-auth:active {
    transform: translateY(0) scale(0.98);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-auth .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: var(--bg-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* ============ LINKS ============ */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s;
    display: inline-block;
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cyan);
    transition: width 0.3s;
    box-shadow: 0 0 8px var(--cyan);
}

.auth-link:hover::after {
    width: 100%;
}

.auth-link:hover {
    text-shadow: 0 0 10px var(--cyan-glow);
}

/* ============ ALERTAS ============ */
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 10px;
    animation: alertIn 0.3s;
}

@keyframes alertIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-alert.show {
    display: flex;
}

.auth-alert.error {
    background: rgba(255, 46, 77, 0.1);
    border: 1px solid rgba(255, 46, 77, 0.4);
    color: var(--red);
}

.auth-alert.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.4);
    color: var(--green);
}

.auth-alert i {
    font-size: 16px;
}

/* ============ TOAST ============ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--cyan);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    color: var(--cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    box-shadow: 0 0 20px var(--cyan-dim);
    animation: toastIn 0.4s;
    min-width: 250px;
    text-align: center;
}

.toast.success { border-color: var(--green); color: var(--green); box-shadow: 0 0 20px rgba(0,255,136,0.3); }
.toast.error { border-color: var(--red); color: var(--red); box-shadow: 0 0 20px rgba(255,46,77,0.3); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════════════════
   OPCIONES DE LOGIN (Recordarme + Olvidé contraseña)
   ═══════════════════════════════════════════════════════ */

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 4px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Checkbox futurista */
.checkbox-futurista {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-futurista input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--cyan-dim);
    border-radius: 4px;
    background: rgba(0, 240, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid var(--bg-dark);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s;
    margin-top: -2px;
}

.checkbox-futurista input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 12px var(--cyan-glow);
}

.checkbox-futurista input[type="checkbox"]:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-futurista:hover .checkbox-custom {
    border-color: var(--cyan);
    box-shadow: 0 0 8px var(--cyan-dim);
}

.checkbox-label {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.checkbox-futurista:hover .checkbox-label {
    color: var(--cyan);
}

/* Enlace "Olvidé contraseña" */
.auth-link-small {
    font-size: 12px;
    color: var(--orange);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.auth-link-small i {
    font-size: 11px;
}

.auth-link-small:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan-glow);
}

/* Info de zona horaria */
.auth-timezone {
    margin-top: 20px;
    padding: 10px 14px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    font-family: 'Orbitron', sans-serif;
}

.auth-timezone i {
    color: var(--cyan);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 400px) {
    .auth-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
    }
    .auth-logo-title {
        font-size: 20px;
        letter-spacing: 3px;
    }
}

/* ═══════════════════════════════════════════════════════
   ESTILO EXCLUSIVO PARA EL GRUPO DE CELULAR EN REGISTRO
   (No afecta a login ni a otros campos)
   ═══════════════════════════════════════════════════════ */

/* Quitamos el padding del wrapper para que el select e input lo manejen internamente */
.celular-group {
    display: flex;
    align-items: center;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.05); /* Mismo fondo que tus otros inputs */
}

/* El select ocupa un ancho fijo a la izquierda */
.celular-group .codigo-pais-select {
    appearance: none;
    -webkit-appearance: none;
    width: 105px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    height: 100%;
    min-height: 45px; /* Ajusta este valor si tus inputs son más altos o bajos */
    cursor: pointer;
    outline: none;
    /* Flecha cian personalizada */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%2300F0FF' d='M5 6L0 0h10z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* El input ocupa el resto del espacio. 
   Mantiene el padding derecho para el icono, pero ajustamos el izquierdo */
.celular-group .celular-input {
    flex: 1;
    border: none;
    background: transparent;
    padding-left: 15px !important; 
    padding-right: 40px !important; /* Espacio para el icono de celular a la derecha */
}

/* Opciones del desplegable en oscuro */
.celular-group .codigo-pais-select option {
    background: #0a0e27;
    color: #ffffff;
}