/* =========================================
   ZYREX PULSE - ULTRA PREMIUM AUTH UI (FINAL v3)
   Estética: Dark Mode, Minimalist Glass, Electric Cyan
   Correcciones: Layout Flexbox, Fix Autofill, Padding Inputs
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@600;700;800&display=swap');

/* --- 1. CONTENEDOR PRINCIPAL (ESTRUCTURA VERTICAL) --- */
.zyrex-auth-wrap {
    display: flex;
    flex-direction: column;         
    justify-content: space-between; 
    align-items: center;            
    min-height: 100vh;              
    width: 100%;
    position: relative;
    background-color: #000000; /* Negro profundo */
    background: radial-gradient(circle at 50% 0%, #0c0c0e 0%, #000000 70%);
    font-family: 'Inter', -apple-system, sans-serif;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden; 
    color: #FAFAFA;
}

/* Orbes Decorativos (Fondo - Cyberpunk/Fintech Vibe) */
.zyrex-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}
.orb-1 {
    top: -10%; left: -10%; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(6, 204, 180, 0.15) 0%, transparent 70%);
}
.orb-2 {
    bottom: -10%; right: -10%; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
}

/* --- 2. HEADER Y FOOTER (POSICIÓN FLUIDA) --- */
.zyrex-auth-header {
    width: 100%;
    display: flex;
    justify-content: flex-start; 
    z-index: 10;
    margin-bottom: 20px;
    padding-left: 20px;
}

.zyrex-auth-footer {
    width: 100%;
    text-align: center;
    z-index: 10;
    margin-top: 30px;
    padding-bottom: 10px;
}

/* Estilo Botón Volver */
.zyrex-back-link {
    text-decoration: none;
    color: #A1A1AA;
    font-weight: 600;
    font-size: 13px;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    transition: all 0.3s ease;
}
.zyrex-back-link:hover { 
    background: rgba(255, 255, 255, 0.08); 
    color: #FAFAFA; 
    border-color: rgba(6, 204, 180, 0.3);
}
.zyrex-back-link .dashicons { font-size: 16px; line-height: 16px; width: 16px; height: 16px; }

/* Links del Footer */
.zyrex-legal-links { margin-bottom: 10px; }
.zyrex-legal-links a { color: #A1A1AA; text-decoration: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.2s; }
.zyrex-legal-links a:hover { color: #06CCB4; }
.zyrex-legal-links .sep { margin: 0 10px; color: #333; font-size: 10px; }
.zyrex-auth-footer p { margin: 0; font-size: 11px; color: #555; }

/* --- 3. TARJETA (CENTRADO AUTOMÁTICO) --- */
.zyrex-auth-card {
    background: rgba(12, 12, 14, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05); /* Borde sutil vía shadow para mejor glassmorphism */
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
    margin: auto; 
}
.zyrex-auth-card.wide { max-width: 520px; }

/* Resplandor superior en la tarjeta */
.zyrex-auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(6, 204, 180, 0.3), transparent);
}

/* --- 4. ELEMENTOS DEL FORMULARIO --- */
.auth-header { text-align: center; margin-bottom: 40px; }
.auth-header h2 { margin: 0; color: #FAFAFA; font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -0.03em; }
.auth-header p { color: #A1A1AA; font-size: 12px; margin: 10px 0 0; font-weight: 500; letter-spacing: 0.5px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 0; }
.input-group { position: relative; margin-bottom: 22px; }

.input-group label, .form-grid label {
    display: block; font-size: 11px; font-weight: 600; color: #A1A1AA;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; margin-left: 4px;
}

/* --- INPUTS & CAMPOS --- */
.input-group input, .zyrex-select, .form-grid input, .phone-group input {
    width: 100%; height: 52px !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 12px !important; /* Bordes más modernos, menos redondeados */
    background: rgba(0,0,0,0.4) !important;
    font-size: 15px; color: #FAFAFA;
    box-sizing: border-box; transition: all 0.3s ease;
    font-family: inherit; line-height: 52px;
    
    /* Padding Definitivo */
    padding-left: 48px !important; 
    padding-right: 20px !important;
}

/* Fix para inputs que TIENEN el ojo de contraseña a la derecha */
.input-group input[type="password"],
.input-group.has-eye input {
    padding-right: 48px !important;
}

/* Inputs enfocados */
.input-group input:focus, .zyrex-select:focus { 
    border-color: #06CCB4 !important; 
    outline: none; 
    background: rgba(6, 204, 180, 0.03) !important;
    box-shadow: 0 0 0 3px rgba(6, 204, 180, 0.15) !important; 
}

/* --- FIX AUTOFILL (Adaptado a Dark Mode) --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0c0c0e inset !important;
    -webkit-text-fill-color: #FAFAFA !important;
    transition: background-color 5000s ease-in-out 0s;
    border-radius: 12px !important;
}

/* --- ICONOS --- */
/* Icono Izquierda */
.input-group i {
    position: absolute; left: 16px !important; top: 38px !important;
    color: #64748B !important; font-size: 18px !important; pointer-events: none; z-index: 10;
    transition: color 0.3s ease;
}
/* Cambiar color del icono al hacer focus en el input */
.input-group input:focus + i,
.input-group input:focus ~ i {
    color: #06CCB4 !important;
}
/* Ajuste específico para login */
#zyrex-login-form .input-group i { top: 40px !important; }

/* Icono Derecha (Ojo Password) */
.zyrex-toggle-pass {
    position: absolute; 
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 16px !important;
    margin-top: 2px !important; 
    cursor: pointer; 
    color: #64748B; 
    z-index: 100;
    display: flex; align-items: center;
    transition: color 0.2s;
}
.zyrex-toggle-pass:hover { color: #06CCB4; }

/* Selector País */
.zyrex-select {
    padding-left: 16px !important; padding-right: 36px !important;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 14px;
    cursor: pointer; text-overflow: ellipsis;
}
.zyrex-select option { background: #0c0c0e; color: #FAFAFA; }

/* Botón Principal (Electric Cyan) */
.btn-auth {
    width: 100%; 
    background: #06CCB4 !important; 
    color: #000000 !important; /* Texto negro para contraste máximo */
    padding: 16px !important; border: none; border-radius: 12px !important;
    font-family: 'Manrope', sans-serif; font-weight: 800 !important; font-size: 15px !important;
    cursor: pointer; transition: all 0.3s ease; margin-top: 25px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-auth:hover { 
    background: #00F0D3 !important; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(6, 204, 180, 0.3); 
}

/* --- 5. GOOGLE & EXTRAS --- */
.google-btn-wrap {
    margin-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 25px;
    width: 100%;
    display: flex;             
    justify-content: center;   
    align-items: center;       
}

.g_id_signin, .g_id_signin iframe, .g_id_signin > div {
    margin: 0 auto !important;
    display: block !important;
    border-radius: 12px !important;
}

.auth-links { text-align: center; margin-top: 25px; display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.auth-links a { color: #A1A1AA; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.auth-links a:hover { color: #06CCB4; }

.terms-check { font-size: 12px; color: #A1A1AA; margin: 18px 0; display: flex; align-items: center; gap: 10px; }
.terms-check input { accent-color: #06CCB4; width:16px; height:16px; cursor:pointer; }
.terms-check a { color: #06CCB4; font-weight: 600; text-decoration: none; }
.terms-check a:hover { text-decoration: underline; }

.captcha-notice { font-size: 10px; color: #555; text-align: center; margin-top: -10px; margin-bottom: 15px; }

/* Alertas */
.zyrex-alert { padding: 14px; border-radius: 8px; font-size: 13px; text-align: center; margin-bottom: 24px; font-weight: 500; }
.zyrex-alert.success { background: rgba(16, 185, 129, 0.1); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.zyrex-alert.error { background: rgba(239, 68, 68, 0.1); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.zyrex-alert.info { background: rgba(59, 130, 246, 0.1); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.2); }

/* --- 6. RESPONSIVE (MÓVIL) --- */
@media (max-width: 600px) {
    .zyrex-auth-wrap { padding: 15px; }
    .zyrex-auth-card { padding: 35px 25px; margin: 20px auto; border-radius: 20px; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .input-group, .form-grid .input-group { margin-bottom: 18px; }
    .zyrex-auth-header { justify-content: center; padding-left: 0; } 
}