/* ═══════════════════════════════════════════════════════════
   iex-auth.css — Estilos Login / Registro / Auth
   Glassmorphism · Modo Día/Noche · Sprint 2
═══════════════════════════════════════════════════════════ */

/* ── LAYOUT PÁGINA AUTH ── */
.iex-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

/* Background con gradiente animado */
.iex-auth-page::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(212,175,55,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(124,77,255,0.1) 0%, transparent 50%),
        var(--iex-bg-primary, #0A0F1A);
    z-index: -1;
}

/* ── CARD AUTH ── */
.iex-auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--iex-glass-bg, rgba(255,255,255,0.05));
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--iex-glass-border, rgba(255,255,255,0.1));
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: iex-fadeSlideUp 0.4s ease;
}

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

/* ── LOGO / HEADER ── */
.iex-auth-logo {
    text-align: center;
    margin-bottom: 28px;
}
.iex-auth-logo img { height: 40px; width: auto; }
.iex-auth-logo-text {
    font-size: 1.6rem; font-weight: 800;
    background: linear-gradient(135deg, #D4AF37, #F5D77E);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.iex-auth-title {
    font-size: 1.4rem; font-weight: 700;
    color: var(--iex-text-primary, #F0F0F0);
    text-align: center; margin-bottom: 8px;
}
.iex-auth-subtitle {
    font-size: 0.9rem; color: var(--iex-text-secondary, #A0AEC0);
    text-align: center; margin-bottom: 28px;
}

/* ── TABS LOGIN / REGISTRO ── */
.iex-auth-tabs {
    display: flex; gap: 0;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}
.iex-auth-tab {
    flex: 1; padding: 10px; text-align: center;
    font-size: 0.9rem; font-weight: 600;
    color: var(--iex-text-secondary, #A0AEC0);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    border: none; background: transparent;
}
.iex-auth-tab.active {
    background: rgba(212,175,55,0.15);
    color: #D4AF37;
    box-shadow: 0 2px 8px rgba(212,175,55,0.2);
}

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

.iex-auth-field { display: flex; flex-direction: column; gap: 6px; }
.iex-auth-field label {
    font-size: 0.8rem; font-weight: 600;
    color: var(--iex-text-secondary, #A0AEC0);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.iex-auth-field input {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--iex-glass-border, rgba(255,255,255,0.1));
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--iex-text-primary, #F0F0F0);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 100%; box-sizing: border-box;
}
.iex-auth-field input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
.iex-auth-field input::placeholder { color: rgba(160,174,192,0.6); }

/* Modo luz */
body.light-mode .iex-auth-field input {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.15);
    color: #1A202C;
}

/* Select tipo promotor */
.iex-auth-field select {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--iex-glass-border, rgba(255,255,255,0.1));
    border-radius: 10px; padding: 12px 16px;
    color: var(--iex-text-primary, #F0F0F0);
    font-size: 0.95rem; font-family: inherit;
    width: 100%; cursor: pointer;
    transition: border-color 0.3s;
}
body.light-mode .iex-auth-field select { background: #fff; color: #1A202C; }

/* ── BOTÓN PRINCIPAL ── */
.iex-auth-btn-primary {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #D4AF37, #B8960C);
    border: none; border-radius: 10px;
    color: #0A0F1A; font-size: 1rem; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.iex-auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212,175,55,0.4);
}
.iex-auth-btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

/* ── DIVISOR ── */
.iex-auth-divider {
    display: flex; align-items: center; gap: 12px;
    color: var(--iex-text-secondary, #A0AEC0); font-size: 0.8rem;
}
.iex-auth-divider::before,
.iex-auth-divider::after {
    content: ''; flex: 1;
    height: 1px; background: var(--iex-glass-border, rgba(255,255,255,0.1));
}

/* ── BOTONES SOCIAL ── */
.iex-social-buttons { display: flex; flex-direction: column; gap: 12px; }
.iex-social-btn {
    width: 100%; padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--iex-glass-border, rgba(255,255,255,0.1));
    border-radius: 10px;
    color: var(--iex-text-primary, #F0F0F0);
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.iex-social-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}
.iex-social-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Google button override */
#iex-google-btn-container { width: 100%; }
#iex-google-btn-container > div { width: 100% !important; }

body.light-mode .iex-social-btn {
    background: #fff;
    border-color: rgba(0,0,0,0.15);
    color: #1A202C;
}

/* ── ERROR / ÉXITO ── */
.iex-auth-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px; padding: 12px 16px;
    font-size: 0.85rem;
    color: #FC8181;
    display: flex; align-items: center; gap: 8px;
}
.iex-auth-success {
    background: rgba(72,187,120,0.15);
    border: 1px solid rgba(72,187,120,0.3);
    border-radius: 8px; padding: 12px 16px;
    font-size: 0.85rem; color: #68D391;
    display: flex; align-items: center; gap: 8px;
}
.iex-hidden { display: none !important; }

/* ── SPINNER ── */
.iex-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: #0A0F1A;
    border-radius: 50%;
    animation: iex-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes iex-spin { to { transform: rotate(360deg); } }

/* ── LINK HELPER ── */
.iex-auth-footer {
    text-align: center; margin-top: 20px;
    font-size: 0.85rem; color: var(--iex-text-secondary, #A0AEC0);
}
.iex-auth-footer a {
    color: #D4AF37; font-weight: 600;
    text-decoration: none;
}
.iex-auth-footer a:hover { text-decoration: underline; }

/* ── OLVIDE CONTRASEÑA ── */
.iex-auth-forgot {
    text-align: right;
    font-size: 0.8rem;
}
.iex-auth-forgot a { color: #D4AF37; text-decoration: none; font-weight: 600; }

/* ── TÉRMINOS ── */
.iex-auth-terms {
    font-size: 0.78rem; color: var(--iex-text-secondary, #A0AEC0);
    text-align: center; line-height: 1.5;
}
.iex-auth-terms a { color: #D4AF37; text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    .iex-auth-card { padding: 28px 20px; border-radius: 16px; }
    .iex-auth-title { font-size: 1.2rem; }
}
