/* =====================================================================
   Login, registro y logout
   Se carga junto a dashboard.css; colores vía variables de BrandSettings.
   ===================================================================== */

body.auth-body {
    --auth-bg: color-mix(in srgb, var(--brand-bg-primary) 35%, #000);
    --auth-glow: color-mix(in srgb, var(--brand-accent) 55%, transparent);
    min-height: 100vh;
    /* Casi negro, con un halo tenue del acento detrás de la tarjeta */
    background:
        radial-gradient(ellipse 60% 45% at 50% 45%, color-mix(in srgb, var(--brand-accent) 7%, transparent), transparent 70%),
        var(--auth-bg);
    background-attachment: fixed;
    color: var(--brand-text);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 16px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--brand-text);
    text-decoration: none;
}
.auth-brand:hover { color: var(--brand-text); }
.auth-brand .dash-rail-btn { pointer-events: none; }
.auth-brand-name { font-weight: 800; font-size: 1.05rem; }

.auth-card-wrap { width: 100%; max-width: 420px; }
.auth-card-wrap.is-wide { max-width: 560px; }

/* Tarjeta con borde neón del color de acento */
.auth-card {
    background-color: color-mix(in srgb, var(--brand-bg-secondary) 80%, #000);
    border: 1px solid var(--brand-accent);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-accent) 35%, transparent),
        0 0 12px var(--auth-glow),
        0 0 36px color-mix(in srgb, var(--brand-accent) 25%, transparent),
        inset 0 0 18px color-mix(in srgb, var(--brand-accent) 10%, transparent);
    animation: auth-neon 4s ease-in-out infinite;
}
@keyframes auth-neon {
    0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-accent) 35%, transparent), 0 0 12px var(--auth-glow), 0 0 36px color-mix(in srgb, var(--brand-accent) 25%, transparent), inset 0 0 18px color-mix(in srgb, var(--brand-accent) 10%, transparent); }
    50%      { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-accent) 50%, transparent), 0 0 18px var(--auth-glow), 0 0 52px color-mix(in srgb, var(--brand-accent) 35%, transparent), inset 0 0 22px color-mix(in srgb, var(--brand-accent) 14%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-card { animation: none; }
}
.auth-brand .dash-rail-btn { box-shadow: 0 0 14px var(--auth-glow); }

.auth-card-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--brand-border-subtle);
}
.auth-card-header h1 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
}
.auth-card-header h1 i { color: var(--brand-accent); }
.auth-card-header p {
    margin: 0.25rem 0 0;
    color: var(--brand-text-muted);
    font-size: 0.875rem;
}
.auth-card-body { padding: 1.5rem; }

.auth-card .form-label { font-size: 0.85rem; font-weight: 600; }
.auth-card .form-text { color: var(--brand-text-muted); font-size: 0.78rem; }
.auth-card .invalid-feedback { font-size: 0.8rem; }

.auth-card .input-group .btn-outline-secondary { border-color: var(--brand-border-subtle); }

.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--brand-text-muted);
}
.auth-footer a,
.auth-card a:not(.btn) {
    color: var(--brand-accent);
    font-weight: 600;
    text-decoration: none;
}
.auth-footer a:hover,
.auth-card a:not(.btn):hover { text-decoration: underline; }

/* Nota informativa bajo la tarjeta */
.auth-note {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--brand-border-subtle);
    border-radius: var(--dash-radius);
    background-color: color-mix(in srgb, var(--brand-bg-secondary) 70%, #000);
    color: var(--brand-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}
.auth-note i { color: var(--brand-accent); margin-top: 0.15rem; }
.auth-note strong { color: var(--brand-text); }

/* Logout */
.auth-avatar-lg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    font-size: 1.6rem;
}
.auth-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}
.auth-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    border: 1px solid var(--brand-border-subtle);
    border-radius: var(--dash-radius);
    background-color: color-mix(in srgb, var(--brand-bg-secondary) 70%, #000);
    color: var(--brand-text);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.auth-link i { font-size: 1.1rem; color: var(--brand-accent); }
.auth-link:hover { border-color: var(--brand-accent); background-color: var(--dash-hover); color: var(--brand-text); box-shadow: 0 0 10px var(--auth-glow); }

/* Modales (recuperar contraseña, términos) */
.modal-body h6 { font-weight: 700; margin-top: 1rem; }
.modal-body h6:first-child { margin-top: 0; }
.modal-body p { color: var(--brand-text-muted); }
