.auth-page { min-height: calc(100vh - 64px); overflow: hidden; background: radial-gradient(ellipse at 50% 0, #ffede6, #fff8f5 72%); }
.auth-layout { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 64px); padding-block: 56px; }
.auth-panel { width: 460px; min-width: 0; }
.auth-box { padding: 40px 38px; border: 1px solid #eee5df; border-radius: 16px; background: #fff; box-shadow: 0 18px 60px #8c573c0a; }
.auth-heading { margin-bottom: 30px; text-align: center; }
.auth-heading .brand-mark { width: 64px; height: 64px; margin-bottom: 20px; }
.auth-heading h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; white-space: nowrap; }
.auth-heading h1 span { color: var(--accent); }
.auth-heading p { margin-top: 9px; color: var(--muted); font-size: 14px; }
.auth-account { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -10px; margin-bottom: 25px; padding: 10px 12px; border: 1px solid #f3e7e1; border-radius: 7px; background: #fff8f5; font-size: 12px; }
.auth-account[hidden] { display: none; }
.auth-account > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #687281; }
.auth-step { display: none; min-height: 207px; }
.auth-step.active { display: block; }
.auth-step.is-entering { animation: auth-step-in .22s ease both; }
.auth-label { display: block; margin-bottom: 10px; color: #384452; font-size: 14px; font-weight: 600; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.auth-input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #e0e4ea; border-radius: 7px; background: #fcfcfd; color: var(--ink); font: inherit; font-size: 14px; outline: 0; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.auth-input::placeholder { color: #a0a7b2; }
.auth-input:focus { border-color: #ff9e89; background: #fff; box-shadow: 0 0 0 3px #fff0eb; }
.auth-button { width: 100%; height: 48px; margin-top: 12px; }
.auth-button:disabled { opacity: .65; transform: none; }
.auth-hint { margin-top: 16px; color: #929aa5; font-size: 12px; text-align: center; }
.auth-text-button { padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; white-space: nowrap; }
.auth-text-button:hover { color: var(--accent-hover); }
.auth-text-button:disabled { color: #a0a7b2; cursor: wait; }
.auth-password-field { position: relative; }
.auth-password-field .auth-input { padding-right: 46px; }
.auth-password-toggle { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 48px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #929ba7; }
.auth-password-toggle .icon { width: 19px; height: 19px; }
.auth-password-toggle:hover { color: var(--accent); }
.auth-eye-line { display: none; }
.auth-password-toggle[aria-pressed="true"] .auth-eye-line { display: block; }
.code-line { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; }
.send-button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 1px solid #ffc3b5; border-radius: 7px; background: #fff5f1; color: var(--accent); font-size: 12px; font-weight: 500; transition: background .18s ease, border-color .18s ease; }
.send-button:hover { border-color: var(--accent); background: #fff0e9; }
.send-button:disabled { border-color: #e9ebef; background: #f7f8fa; color: #929aa5; cursor: default; }
.auth-error { min-height: 28px; padding-top: 7px; color: #df4753; font-size: 12px; line-height: 1.75; }
.auth-spinner { display: inline-block; width: 14px; height: 14px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: auth-spin .7s linear infinite; }
.auth-remember-account { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; border: 1px solid #f3e7e1; border-radius: 8px; background: #fff8f5; color: #687281; font-size: 14px; }
.auth-remember-account .icon { width: 18px; height: 18px; color: var(--accent); }
.auth-remember-account > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-remember-switch { margin-top: 22px; text-align: center; }
@keyframes auth-spin {
    to { transform: rotate(360deg); }
}
@keyframes auth-step-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-step.is-entering { animation: none; }
}
@media (max-width: 1024px) {
    .auth-page,
    .auth-layout {
        min-height: calc(100vh - var(--site-header-height, 64px));
        min-height: calc(100svh - var(--site-header-height, 64px));
    }

    .auth-layout { padding-block: 40px; }
    .auth-panel { width: min(460px, 100%); }
}

@media (max-width: 768px) {
    .auth-layout { padding-block: 32px; }
    .auth-box { padding: 30px 24px; border-radius: 12px; }
    .auth-heading { margin-bottom: 24px; }
    .auth-heading .brand-mark { width: 56px; height: 56px; margin-bottom: 16px; }
    .auth-heading h1 { font-size: 24px; letter-spacing: 0; }
    .auth-heading p { overflow-wrap: anywhere; }
    .auth-input { padding-inline: 12px; font-size: 16px; }
    .auth-text-button { min-height: 36px; padding-block: 6px; font-size: 13px; }
    .auth-account { margin-bottom: 20px; padding: 8px 10px; }
    .auth-account > span { font-size: 13px; }
    .code-line { grid-template-columns: minmax(0, 1fr) 106px; gap: 8px; }
    .send-button { padding-inline: 8px; font-size: 13px; }
    .auth-hint { font-size: 13px; }
    .auth-remember-account { padding: 12px; }
    .auth-remember-switch { margin-top: 16px; }
}

@media (max-width: 360px) {
    .auth-box { padding-inline: 20px; }
    .auth-heading h1 { font-size: 22px; }
}
