.auth-page {
    min-height: calc(100vh - 68px - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}
.auth-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    border: 1.5px solid #f3f4f6;
    box-shadow: 0 8px 40px rgba(0,0,0,.06);
}
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}
.auth-logo-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--t-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.auth-logo-img {
    width: 40px; height: 40px; border-radius: 10px;
    object-fit: contain;
}
.auth-logo-text { font-size: .9rem; font-weight: 700; color: #111827; }
.auth-title { font-size: 1.4rem; font-weight: 800; color: #111827; text-align: center; margin-bottom: 6px; }
.auth-sub { font-size: .84rem; color: #9ca3af; text-align: center; margin-bottom: 28px; }
.auth-alert {
    display: flex; align-items: center; gap: 8px;
    border-radius: 10px; padding: 10px 14px;
    font-size: .84rem; margin-bottom: 16px;
}
.auth-alert-success { background: #d1fae5; color: #065f46; }
.auth-alert-error { background: #fee2e2; color: #991b1b; }
.auth-alert-error:empty { display: none; }
.auth-google-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 46px; border: 1.5px solid #e5e7eb; border-radius: 10px;
    background: #fff; color: #374151; font-size: .88rem; font-weight: 600;
    text-decoration: none; transition: background .15s, border-color .15s;
}
.auth-google-btn:hover { background: #f9fafb; border-color: #d1d5db; color: #374151; }
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    color: #9ca3af; font-size: .78rem; margin: 18px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ""; flex: 1; height: 1px; background: #e5e7eb;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .auth-row { grid-template-columns: 1fr; } }
.auth-label { font-size: .82rem; font-weight: 600; color: #374151; }
.auth-req { color: #ef4444; }
.auth-input-wrap { position: relative; }
.auth-input-icon {
    position: absolute; top: 50%; right: 14px; transform: translateY(-50%);
    color: #9ca3af; font-size: .8rem; pointer-events: none;
}
.auth-input {
    width: 100%; height: 44px; border: 1.5px solid #e5e7eb; border-radius: 10px;
    padding: 0 40px 0 14px; font-size: .88rem; font-family: inherit;
    color: #111827; background: #fafafa; outline: none; transition: border-color .15s;
}
.auth-input:focus {
    border-color: var(--t-primary); background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-primary) 8%, transparent);
}
.auth-err { font-size: .75rem; color: #ef4444; }
.auth-captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.auth-captcha-img { height: 46px; border-radius: 8px; cursor: pointer; border: 1.5px solid #e5e7eb; }
.auth-captcha-refresh {
    width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid #e5e7eb;
    background: #fff; color: #6b7280; cursor: pointer; font-size: .8rem;
    display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.auth-captcha-refresh:hover { border-color: var(--t-primary); color: var(--t-primary); }
.auth-remember { display: flex; align-items: center; justify-content: space-between; }
.auth-check-wrap { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.auth-checkbox { accent-color: var(--t-primary); }
.auth-check-label { font-size: .82rem; color: #374151; }
.auth-forgot { font-size: .82rem; color: var(--t-primary); text-decoration: none; }
.auth-forgot:hover { color: var(--t-primary-dark); text-decoration: underline; }
.auth-submit {
    width: 100%; height: 46px; border-radius: 10px; border: none;
    background: var(--t-primary); color: #fff; font-size: .95rem; font-weight: 700;
    cursor: pointer; transition: all .2s; display: flex; align-items: center;
    justify-content: center; gap: 8px; font-family: inherit;
}
.auth-submit:hover { background: var(--t-primary-dark); transform: translateY(-2px); }
.auth-footer { text-align: center; margin-top: 20px; font-size: .84rem; color: #6b7280; }
.auth-footer-link { color: var(--t-primary); font-weight: 700; text-decoration: none; }
.auth-footer-link:hover { color: var(--t-primary-dark); text-decoration: underline; }

/* ── تب‌های «رمز عبور» / «کد یکبارمصرف» ── */
.auth-tabs {
    position: relative;
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: .85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border-radius: 9px;
    transition: color .25s;
}
.auth-tab.active { color: var(--t-primary); }
.auth-tab-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: calc(50% - 4px);
    height: 40px;
    background: #fff;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.auth-tab-indicator.to-otp { transform: translateX(-100%); }

/* ── ورودی کد ۵ خانه‌ای ── */
.otp-sent-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: .82rem;
    color: #065f46;
    background: #d1fae5;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    text-align: center;
}
.otp-digit-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.otp-digit {
    width: 52px;
    height: 58px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: inherit;
    color: #111827;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
    outline: none;
    transition: border-color .15s, box-shadow .15s, transform .1s;
}
.otp-digit:focus {
    border-color: var(--t-primary);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-primary) 8%, transparent);
    transform: translateY(-1px);
}
.otp-digit.filled { border-color: var(--t-primary); }
@media (max-width: 380px) {
    .otp-digit { width: 44px; height: 52px; font-size: 1.25rem; }
    .otp-digit-row { gap: 7px; }
}
.auth-otp-resend {
    width: 100%;
    margin-top: 12px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: .8rem;
    color: var(--t-primary);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.auth-otp-resend:disabled { color: #9ca3af; cursor: not-allowed; }
.auth-otp-resend:not(:disabled):hover { text-decoration: underline; }
