/* Auth pages (login / register) — aligned with home / about style */

.auth-page {
    width: 100%;
    min-height: calc(100vh - 3rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 40px;
    box-sizing: border-box;
    font-family: 'Manrope', var(--font-inter), system-ui, sans-serif;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.02), 0 12px 28px rgba(37, 99, 235, 0.06);
    padding: 28px 24px 24px;
    animation: authSlideUp 0.28s ease;
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 1.75rem;
}

.auth-brand__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.auth-brand__sub {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a0b8;
    line-height: 1.4;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.01em;
}

.auth-field .input,
.auth-card .input {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 14px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #0f172a;
    box-sizing: border-box;
    transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}

.auth-field .input:focus,
.auth-card .input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a0b8;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    position: relative;
    transition: opacity 0.13s, transform 0.13s, box-shadow 0.13s, background 0.13s, border-color 0.13s;
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-btn--primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.auth-btn--primary:hover:not(:disabled) {
    opacity: 0.94;
}

.auth-btn--telegram {
    background: #0178ff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(1, 120, 255, 0.22);
}

.auth-btn--telegram:hover:not(:disabled) {
    opacity: 0.94;
}

.auth-btn--google {
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.auth-btn--google:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.auth-btn__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: block;
}

.auth-error {
    display: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.75rem 0.875rem;
    border-radius: 12px;
    background: var(--color-error-bg);
    color: var(--color-error);
}

.auth-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #94a0b8;
}

.auth-footer-row a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-row a:hover {
    text-decoration: underline;
}

.auth-link-muted {
    color: #94a0b8 !important;
    font-weight: 500 !important;
}

.auth-link-muted:hover {
    color: #2563eb !important;
}

.auth-footer-center {
    text-align: center;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #94a0b8;
}

.auth-footer-center a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-center a:hover {
    text-decoration: underline;
}

/* Reset / TG modals keep structure; polish surfaces */
.auth-card + .modal-overlay .modal-content,
#reset-modal .bg-surface {
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    font-family: 'Manrope', var(--font-inter), system-ui, sans-serif;
}

/* Dark theme */
body.dark-theme .auth-card {
    background: #111827;
    border-color: rgba(51, 65, 85, 0.7);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

body.dark-theme .auth-brand__title { color: #f8fafc; }
body.dark-theme .auth-brand__sub,
body.dark-theme .auth-footer-row,
body.dark-theme .auth-footer-center,
body.dark-theme .auth-divider,
body.dark-theme .auth-field label,
body.dark-theme .auth-link-muted { color: #94a3b8 !important; }

body.dark-theme .auth-divider::before,
body.dark-theme .auth-divider::after { background: #334155; }

body.dark-theme .auth-field .input,
body.dark-theme .auth-card .input {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-theme .auth-field .input:focus,
body.dark-theme .auth-card .input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

body.dark-theme .auth-btn--google {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-theme .auth-btn--google:hover:not(:disabled) {
    background: #243044;
    border-color: #475569;
}

@media (max-width: 768px), (max-height: 649px) {
    .auth-page {
        min-height: calc(100vh - 8rem);
        padding: 16px 12px 24px;
    }
    .auth-card {
        padding: 24px 18px 20px;
        border-radius: 16px;
    }
}
