/* ═══════════════════════════════════════════════════════════════
   SAIYAN AUTH PAGES — auth-pages.css
   Login y registro. Extiende public-site.css (variables --l-*).
   Tema: mismo sistema que el index público (data-public-theme="dark").
   ═══════════════════════════════════════════════════════════════ */

/* Toggle de tema al borde derecho del menú (solo icono, ver public-site.css) */
body.is-auth-page .l-topnav-inner .auth-topnav-theme {
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Cuerpo de la página ── */
body.is-auth-page {
    background: var(--l-bg);
    min-height: 100dvh;
}

/* ── Contenedor principal del formulario ──
   Nav fija: solo un poco de aire bajo la barra; sin centrar en vertical (evita el “hueco”
   de pantallas altas). */
main.auth-public-v2 {
    min-height: calc(100dvh - var(--l-nav-h));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: calc(var(--l-nav-h) + 1.1rem) 1.25rem 2.5rem;
    background: var(--l-bg);
    box-sizing: border-box;
}

.auth-v2-inner {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Cabecera del formulario ── */
.auth-v2-title {
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--l-heading);
    text-align: center;
    margin: 0 0 0.45rem;
    line-height: 1.15;
}
.auth-v2-sub {
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--l-text-muted);
    text-align: center;
    margin: 0 0 1.35rem;
}

/* ── Botón Google ── */
.auth-v2-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.78rem 1rem;
    background: var(--l-surface);
    border: 1.5px solid var(--l-border);
    border-radius: 10px;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--l-text);
    text-decoration: none;
    transition: background var(--l-t), border-color var(--l-t), box-shadow var(--l-t);
    cursor: pointer;
    margin-bottom: 1.25rem;
}
.auth-v2-social-btn:hover {
    background: var(--l-bg-subtle);
    border-color: rgba(0,0,0,.18);
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
html[data-public-theme="dark"] .auth-v2-social-btn:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.18);
}

/* ── Divisor "O con una cuenta" ── */
.auth-v2-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--l-text-dim);
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.auth-v2-divider::before,
.auth-v2-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--l-border);
}

/* ── Mensajes ── */
.auth-v2-msg {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.87rem;
    margin-bottom: 1rem;
}
.auth-v2-msg--ok {
    background: rgba(22,163,74,.1);
    color: var(--l-green);
    border: 1px solid rgba(22,163,74,.25);
}
.auth-v2-msg--err {
    background: rgba(220,38,38,.08);
    color: var(--l-red);
    border: 1px solid rgba(220,38,38,.2);
}

/* ── Formulario: campo+label sin tarjeta ── */
.auth-v2-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.auth-v2-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}
.auth-v2-label {
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--l-text-muted);
    letter-spacing: 0.01em;
}
.auth-v2-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.72rem 0.9rem;
    background: var(--l-surface);
    border: 1.5px solid var(--l-border);
    border-radius: 10px;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.97rem;
    color: var(--l-text);
    outline: none;
    transition: border-color var(--l-t), box-shadow var(--l-t), background var(--l-t);
    -webkit-appearance: none;
}
.auth-v2-input::placeholder {
    color: var(--l-text-dim);
}
.auth-v2-input:focus {
    border-color: var(--l-accent);
    box-shadow: 0 0 0 3px var(--l-accent-glow);
}

/* ── Botón principal ── */
.auth-v2-submit {
    width: 100%;
    padding: 0.82rem 1rem;
    background: var(--l-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background var(--l-t), transform 80ms, box-shadow var(--l-t);
}
.auth-v2-submit:hover {
    background: var(--l-accent-light);
    box-shadow: 0 4px 18px rgba(234,88,12,.35);
}
.auth-v2-submit:active {
    transform: scale(.985);
}

.auth-v2-forgot-wrap {
    margin: 0.35rem 0 0;
    text-align: center;
}

.auth-v2-forgot-link {
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--l-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-v2-forgot-link:hover {
    color: var(--l-accent-light);
}

/* ── Pie del formulario ── */
.auth-v2-legal-notice {
    margin: 1.25rem 0 0;
    text-align: center;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--l-text-muted);
}

.auth-v2-legal-link {
    color: var(--l-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-v2-legal-link:hover {
    color: var(--l-accent-light);
}

.auth-v2-foot {
    margin-top: 1.6rem;
    text-align: center;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--l-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.auth-v2-foot a {
    color: var(--l-accent);
    text-decoration: none;
    font-weight: 600;
}
.auth-v2-foot a:hover {
    text-decoration: underline;
}
.auth-v2-home-link {
    color: var(--l-text-dim) !important;
    font-weight: 400 !important;
    font-size: 0.82rem;
}

/* ── Dark mode: superficie y campos ── */
html[data-public-theme="dark"] .auth-v2-input {
    background: rgba(255,255,255,.06);
}
html[data-public-theme="dark"] .auth-v2-social-btn {
    background: rgba(255,255,255,.06);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    main.auth-public-v2 {
        padding-top: calc(var(--l-nav-h) + 0.85rem);
        padding-bottom: 2rem;
    }
    .auth-v2-title {
        font-size: 1.7rem;
    }
}
