.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--dur) var(--ease);
}

.auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-2xl);
    padding: 40px;
    transform: translateY(24px) scale(0.96);
    transition: all var(--dur) var(--ease);
    position: relative;
}

.auth-overlay.active .auth-panel {
    transform: translateY(0) scale(1);
}

.auth-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-surface-raised);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}

.auth-close:hover { background: var(--c-surface-hover); }
.auth-close svg { width: 16px; height: 16px; stroke: var(--c-ink-muted); }

.auth-head {
    text-align: center;
    margin-bottom: 32px;
}

.auth-head img { height: 30px; margin: 0 auto 24px; filter: brightness(0) invert(1); }

.auth-head h3 {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    margin-bottom: 6px;
    color: var(--c-ink);
}

.auth-head p {
    font-size: var(--text-sm);
    color: var(--c-ink-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--c-ink-faint);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--c-border);
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: var(--c-surface-raised);
    border: 1.5px solid var(--c-border-strong);
    border-radius: var(--r-md);
    font-family: var(--ff-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--c-ink);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
}

.auth-social-btn:hover {
    border-color: var(--c-brand);
    background: var(--c-brand-light);
}

.auth-social-btn img { width: 18px; height: 18px; }

.auth-foot {
    text-align: center;
    margin-top: 24px;
    font-size: var(--text-sm);
    color: var(--c-ink-muted);
}

.auth-foot a {
    color: var(--c-brand);
    font-weight: var(--weight-semibold);
    cursor: pointer;
}

.auth-forgot {
    text-align: end;
    margin-top: -8px;
}

.auth-forgot a {
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--c-brand);
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--text-xs);
    color: var(--c-ink-muted);
}

.auth-terms input { accent-color: var(--c-brand); margin-top: 2px; }

@media (max-width: 640px) {
    .auth-panel {
        max-width: 100%;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
        max-height: 85vh;
    }
    .auth-overlay { align-items: flex-end; }
}
