/* =============================================================================
   SleepGuardian — Auth / Login Styles
   Full-screen centered login with animated background
   ============================================================================= */

/* ── Animated Background ───────────────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-md);
}

.auth-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.auth-bg .aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: aurora-drift 12s ease-in-out infinite alternate;
}

.auth-bg .aurora-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    right: -100px;
    animation-duration: 14s;
}

.auth-bg .aurora-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    left: -80px;
    animation-duration: 10s;
    animation-delay: -3s;
}

.auth-bg .aurora-3 {
    width: 300px;
    height: 300px;
    background: #B388FF;
    top: 40%;
    left: 50%;
    animation-duration: 16s;
    animation-delay: -6s;
}

@keyframes aurora-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -20px) scale(1.1); }
    100% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Login Card ────────────────────────────────────────────────────────────── */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    box-shadow: var(--shadow-lg);
    animation: slideUp var(--transition-slow);
}

.auth-logo {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.auth-logo svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
}

.auth-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo .auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Error Message ─────────────────────────────────────────────────────────── */
.auth-error {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--poor-bg);
    border: 1px solid rgba(255, 82, 82, 0.2);
    border-radius: var(--radius-md);
    color: var(--poor);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
}

.auth-error.visible {
    display: flex;
    animation: shake 400ms ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card {
        padding: var(--space-xl) var(--space-lg);
        border-radius: var(--radius-lg);
    }

    .auth-logo h1 {
        font-size: 1.5rem;
    }
}
