/* =========================================
   ZYREX PULSE - ULTRA PREMIUM AUTH UI (FINAL v5 - Web3 Glassmorphism)
   Estética: Dark Mode, Advanced Glass, Electric Cyan Glows, Custom Background
   Modificaciones: Isotipo centrado/grande, Botón Píldora centrado
   ========================================= */

@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 Y FONDO) --- */
.zyrex-auth-wrap {
    display: flex;
    flex-direction: column;         
    justify-content: space-between; 
    align-items: center;            
    min-height: 100vh;              
    width: 100%;
    position: relative;
    font-family: 'Inter', -apple-system, sans-serif;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden; 
    color: #FAFAFA;
    
    /* NUEVO FONDO: Imagen + Capa de oscurecimiento para legibilidad */
    background-color: #000000;
    background-image: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8)), /* Overlay oscuro */
        url('https://zyrexlabs.net/wp-content/uploads/2026/04/fondo_identity-scaled.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Orbes Decorativos (Resplandores de fondo) */
.zyrex-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px); /* Mayor blur para fundirse mejor con la imagen */
    z-index: 0;
    opacity: 0.5; /* Ligeramente más intensos */
    pointer-events: none;
}
.orb-1 {
    top: -5%; left: -5%; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(6, 204, 180, 0.25) 0%, transparent 70%); /* Cyan más brillante */
}
.orb-2 {
    bottom: -5%; right: -5%; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

/* --- 2. HEADER Y FOOTER --- */
.zyrex-auth-header {
    width: 100%;
    display: flex;
    justify-content: center; /* Modificado: Centrado */
    align-items: center;
    z-index: 10;
    margin-bottom: 20px;
    padding-left: 0; /* Modificado: Sin padding para centrado perfecto */
}

/* Añadido: Isotipo más grande */
.zyrex-auth-header img, 
.zyrex-auth-header svg,
.zyrex-auth-header .custom-logo {
    height: 75px !important; /* Tamaño aumentado */
    width: auto !important;
    object-fit: contain;
}

.zyrex-auth-footer {
    width: 100%;
    text-align: center;
    z-index: 10;
    margin-top: 30px;
    padding-bottom: 10px;
}

/* Estilo Botón Volver (Glassmorphism sutil) */
.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.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: absolute; /* Para que no interfiera con el centrado del logo */
    left: 20px;
    top: 20px;
}
.zyrex-back-link:hover { 
    background: rgba(6, 204, 180, 0.1); 
    color: #FAFAFA; 
    border-color: rgba(6, 204, 180, 0.4);
    box-shadow: 0 0 15px rgba(6, 204, 180, 0.2);
}
.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; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.zyrex-legal-links a:hover { color: #06CCB4; text-shadow: 0 0 8px rgba(6, 204, 180, 0.5); }
.zyrex-legal-links .sep { margin: 0 10px; color: #555; font-size: 10px; }
.zyrex-auth-footer p { margin: 0; font-size: 11px; color: #888; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }

/* --- 3. TARJETA (ADVANCED GLASSMORPHISM & GLOW) --- */
.zyrex-auth-card {
    /* Fondo más transparente para dejar pasar la imagen */
    background: rgba(10, 12, 16, 0.45); 
    backdrop-filter: blur(32px); /* Desenfoque extremo estilo Dashboard */
    -webkit-backdrop-filter: blur(32px);
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    /* Sombras y resplandores combinados */
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.8), /* Sombra de caída */
        0 0 40px rgba(6, 204, 180, 0.08), /* Resplandor cyan externo */
        inset 0 0 20px rgba(255, 255, 255, 0.02); /* Luz interna */
    /* Borde semi-transparente cyan */
    border: 1px solid rgba(6, 204, 180, 0.15);
    position: relative;
    z-index: 1;
    margin: auto; 
    overflow: hidden; /* Para contener el brillo superior */
}
.zyrex-auth-card.wide { max-width: 520px; }

/* Resplandor superior eléctrico en la tarjeta */
.zyrex-auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #06CCB4, transparent);
    box-shadow: 0 0 15px rgba(6, 204, 180, 0.8);
    opacity: 0.8;
}

/* --- 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; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.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 (Glass Effect) --- */
.input-group input, .zyrex-select, .form-grid input, .phone-group input {
    width: 100%; height: 52px !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 12px !important;
    /* Fondo input translúcido */
    background: rgba(255, 255, 255, 0.03) !important; 
    font-size: 15px; color: #FAFAFA;
    box-sizing: border-box; transition: all 0.3s ease;
    font-family: inherit; line-height: 52px;
    
    padding-left: 48px !important; 
    padding-right: 20px !important;
}

.input-group input[type="password"],
.input-group.has-eye input {
    padding-right: 48px !important;
}

/* Inputs enfocados (Glow Dashboard) */
.input-group input:focus, .zyrex-select:focus { 
    border-color: #06CCB4 !important; 
    outline: none; 
    background: rgba(6, 204, 180, 0.05) !important;
    box-shadow: 
        0 0 0 1px rgba(6, 204, 180, 0.5) inset,
        0 0 15px rgba(6, 204, 180, 0.2) !important; 
}

/* --- FIX AUTOFILL --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0a0c10 inset !important;
    -webkit-text-fill-color: #FAFAFA !important;
    transition: background-color 5000s ease-in-out 0s;
    border-radius: 12px !important;
}

/* --- ICONOS --- */
.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: all 0.3s ease;
}
.input-group input:focus + i,
.input-group input:focus ~ i {
    color: #06CCB4 !important;
    filter: drop-shadow(0 0 5px rgba(6, 204, 180, 0.5)); /* Icono brilla al enfocar */
}
#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; filter: drop-shadow(0 0 5px rgba(6,204,180,0.5)); }

/* 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 {
    display: block !important;
    width: 100%; 
    max-width: 260px !important; /* Modificado: Ancho restringido para forma de píldora */
    margin: 30px auto 0 auto !important; /* Modificado: Centrado horizontalmente */
    background: #06CCB4 !important; 
    color: #000000 !important;
    padding: 16px 32px !important; 
    border: none; 
    border-radius: 50px !important; /* Modificado: Forma de píldora */
    font-family: 'Manrope', sans-serif; font-weight: 800 !important; font-size: 15px !important;
    cursor: pointer; transition: all 0.3s ease;
    text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(6, 204, 180, 0.3);
    text-align: center;
}
.btn-auth:hover { 
    background: #00F0D3 !important; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(6, 204, 180, 0.5), 0 0 10px rgba(6, 204, 180, 0.3) inset !important; 
}

/* --- 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: all 0.2s; }
.auth-links a:hover { color: #06CCB4; text-shadow: 0 0 8px rgba(6, 204, 180, 0.5); }

.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; text-shadow: 0 0 5px rgba(6, 204, 180, 0.4); }

.captcha-notice { font-size: 10px; color: #777; 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; backdrop-filter: blur(10px); }
.zyrex-alert.success { background: rgba(16, 185, 129, 0.15); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 0 10px rgba(16, 185, 129, 0.1); }
.zyrex-alert.error { background: rgba(239, 68, 68, 0.15); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.3); box-shadow: 0 0 10px rgba(239, 68, 68, 0.1); }
.zyrex-alert.info { background: rgba(59, 130, 246, 0.15); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.3); box-shadow: 0 0 10px rgba(59, 130, 246, 0.1); }

/* --- 6. RESPONSIVE (MÓVIL) --- */
@media (max-width: 600px) {
    .zyrex-auth-wrap { padding: 15px; background-attachment: scroll; } /* Mejor rendimiento en móvil */
    .zyrex-auth-card { padding: 35px 25px; margin: 20px auto; border-radius: 20px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(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; 
        position: relative; 
    }
    
    .zyrex-back-link { /* Ajuste en móvil para el botón volver */
        position: static;
        margin-bottom: 15px;
        align-self: flex-start;
        display: inline-flex;
    }
}