/* ── AUTH PAGES (Login / Register) ── */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -200px; left: 50%; transform: translateX(-50%);
    width: 900px; height: 900px;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, rgba(139,92,246,0.05) 40%, transparent 70%);
    pointer-events: none;
}

.auth-page .hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(148,163,184,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148,163,184,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

[data-theme="light"] .auth-card {
    box-shadow: 0 20px 60px rgba(0,0,0,.06);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    font-size: 1.4rem;
    font-weight: 800;
}

.auth-logo svg { width: 36px; height: 36px; }
.auth-logo span {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

/* Form elements */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-input.error {
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 3px rgba(244,63,94,0.1);
}

/* Password toggle */
.input-wrapper {
    position: relative;
}

.input-wrapper .form-input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color .2s;
}

.toggle-password:hover { color: var(--text-primary); }
.toggle-password .icon { width: 18px; height: 18px; }

/* Error / success alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert .icon { width: 18px; height: 18px; flex-shrink: 0; }

.alert-error {
    background: rgba(244,63,94,0.1);
    border: 1px solid rgba(244,63,94,0.2);
    color: var(--accent-rose);
}

.alert-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    color: var(--accent-emerald);
}

.field-error {
    font-size: 0.78rem;
    color: var(--accent-rose);
    margin-top: 4px;
}

/* Submit button */
.auth-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
    margin-top: 4px;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    background: var(--bg-card);
    padding: 0 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer links */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-blue);
    font-weight: 600;
    transition: color .2s;
}

.auth-footer a:hover {
    color: var(--accent-purple);
}

/* Back to home */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 20px;
    text-align: center;
    width: 100%;
    justify-content: center;
    transition: color .2s;
}

.auth-back:hover { color: var(--text-primary); }
.auth-back .icon { width: 16px; height: 16px; }

/* Theme toggle for auth pages */
.auth-theme-toggle {
    position: fixed;
    top: 20px; right: 24px;
    z-index: 50;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
    }
}
