/* ============================================================
   JUMA - Login.css
   Pantallas de sesión (Login, Recuperar, Verificar, Nueva/Cambiar
   contraseña) en MODO OSCURO ÚNICO. Tarjeta glass horizontal con
   fondo mesh-gradient animado y reactivo al cursor.
   Carga: theme.css -> componentes.css -> Login.css (este archivo).
   Reutiliza .field / .btn del kit (componentes.css).
   ============================================================ */

* { box-sizing: border-box; }

.auth-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-900);
    overflow: hidden;
}

/* ============================================================
   FONDO MESH-GRADIENT animado + parallax (--px/--py los fija auth.js)
   ============================================================ */
.auth-bg {
    position: fixed;
    inset: -10%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.mesh {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
    transition: transform 600ms var(--ease);
}
.mesh-1 {
    width: 46vw; height: 46vw;
    top: -8vw; left: -6vw;
    background: radial-gradient(circle, var(--brand) 0%, transparent 70%);
    transform: translate(calc(var(--px, 0) * 26px), calc(var(--py, 0) * 26px));
    animation: meshFloat1 18s var(--ease) infinite alternate;
}
.mesh-2 {
    width: 40vw; height: 40vw;
    bottom: -10vw; right: -6vw;
    background: radial-gradient(circle, var(--brand-accent) 0%, transparent 70%);
    transform: translate(calc(var(--px, 0) * -32px), calc(var(--py, 0) * -22px));
    animation: meshFloat2 22s var(--ease) infinite alternate;
}
.mesh-3 {
    width: 32vw; height: 32vw;
    top: 30%; left: 40%;
    background: radial-gradient(circle, #5e120c 0%, transparent 70%);
    opacity: 0.4;
    transform: translate(calc(var(--px, 0) * 18px), calc(var(--py, 0) * -28px));
    animation: meshFloat3 26s var(--ease) infinite alternate;
}
@keyframes meshFloat1 { to { translate: 6vw 4vw; } }
@keyframes meshFloat2 { to { translate: -5vw -3vw; } }
@keyframes meshFloat3 { to { translate: -4vw 5vw; } }

/* ============================================================
   TARJETA glass horizontal
   ============================================================ */
.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
}
.auth-card {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(23,20,26,0.66);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 80px rgba(0,0,0,0.55), var(--glass-inner);
}
/* Spotlight reutilizando la variable que fija auth.js */
.auth-card[data-spotlight]::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%),
                rgba(184,51,58,0.16), transparent 60%);
    transition: opacity var(--dur) var(--ease);
}
.auth-card:hover[data-spotlight]::before { opacity: 1; }

/* ===== Panel de marca ===== */
.auth-aside {
    position: relative;
    z-index: 1;
    padding: 40px 34px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background:
        linear-gradient(150deg, rgba(140,28,19,0.55), rgba(95,18,12,0.25)),
        rgba(255,255,255,0.02);
    border-right: 1px solid var(--glass-border);
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-mark { display: grid; place-items: center; filter: drop-shadow(0 3px 12px var(--brand-glow)); }
.auth-brand-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 2px;
}
.auth-tagline {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    margin: 8px 0 0;
    color: #fff;
}
.auth-sub { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 0; }
.auth-points { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 10px; }
.auth-points li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.auth-points i { color: var(--brand-soft); font-size: 16px; }

/* ===== Panel del formulario ===== */
.auth-main {
    position: relative;
    z-index: 1;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-form { width: 100%; }
.auth-title {
    font-family: var(--font-display);
    font-size: 26px;
    margin: 0 0 4px;
    color: var(--text);
}
.auth-hint { color: var(--text-muted); font-size: 13px; margin: 0 0 22px; }

.auth-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--brand-soft);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--dur-fast) var(--ease);
}
.auth-link:hover { color: var(--brand-accent); text-decoration: underline; }

/* Mensajes de error/éxito y validación */
.auth-alert {
    border-radius: var(--radius-sm);
    padding: 10px 13px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.auth-alert--err { background: rgba(248,113,113,0.14); color: #fecaca; border-color: rgba(248,113,113,0.35); }
.auth-alert--ok  { background: rgba(52,211,153,0.14); color: #bbf7d0; border-color: rgba(52,211,153,0.35); }
.field-error { display: block; color: var(--err); font-size: 12px; margin: -12px 0 12px; }

/* Reglas de contraseña */
.rules {
    list-style: none;
    padding: 12px 14px;
    margin: 0 0 16px;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--brand-accent);
    font-size: 12.5px;
    color: var(--text-muted);
    display: grid;
    gap: 5px;
}
.rules li { display: flex; align-items: center; gap: 8px; }
.rules li::before { content: "\F26A"; font-family: "bootstrap-icons"; color: var(--brand-soft); font-size: 13px; }

/* Caja de código demo (Verificar) */
.auth-demo {
    background: rgba(96,165,250,0.12);
    border: 1px solid rgba(96,165,250,0.35);
    color: #cfe2ff;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
}
.auth-demo .code { font-size: 20px; font-weight: 700; letter-spacing: 3px; color: #fff; }

/* Input de código OTP centrado */
.field-input.otp { text-align: center; font-size: 20px; letter-spacing: 8px; font-weight: 600; }

/* ============================================================
   RESPONSIVE: en móvil la tarjeta se apila y el aside se condensa
   ============================================================ */
@media (max-width: 720px) {
    .auth-card { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .auth-aside {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 26px 26px 22px;
        gap: 10px;
    }
    .auth-points { display: none; }
    .auth-tagline { font-size: 22px; }
    .auth-main { padding: 28px 26px 34px; }
}

/* ============================================================
   FALLBACK sin backdrop-filter
   ============================================================ */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .auth-card { background: var(--bg-800); }
}
