.auth-screen { min-height: 100dvh; background: radial-gradient(circle at 50% -10%, #e6eafa 0, #f6f7fc 42%, #fafafb 100%); }
.auth-page { width: min(100% - 32px, 460px); min-height: 100dvh; margin: 0 auto; padding: 32px 0 max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: center; }
.auth-hero { margin: 0 0 22px; text-align: center; }
.auth-hero h1 { margin: 0; color: #252d4d; font-size: clamp(25px, 5vw, 30px); }
.auth-card { display: grid; gap: 14px; align-content: start; box-sizing: border-box; min-height: 360px; padding: 26px; border: 1px solid #d9deed; border-radius: 18px; box-shadow: 0 18px 52px #39477f12; background: #fff; }
.auth-methods { position: relative; z-index: 1; align-self: stretch; display: flex; gap: 5px; margin: 0 14px -1px; }
.auth-method { flex: 1; min-width: 0; min-height: 46px; margin-top: 8px; padding: 9px 8px; border: 1px solid #d9deed; border-radius: 13px 13px 0 0; background: #e8ecf7; color: #56617d; font-size: 16px; font-weight: 600; box-shadow: inset 0 -3px 6px #39477f0d; }
.auth-method:hover { background: #f0f2fa; }
.auth-method:active { transform: none; }
.auth-method.is-active { min-height: 54px; margin-top: 0; border-bottom-color: #fff; background: #fff; color: #354a9c; box-shadow: inset 0 3px 0 #596bb7; }
.auth-method.is-active:hover { background: #fff; }
.auth-method:focus-visible { outline: 3px solid #c4cdf9; outline-offset: 2px; }
.auth-method:disabled { opacity: .5; cursor: not-allowed; }
.auth-intro h2 { margin: 0 0 5px; color: #263354; font-size: 20px; }
.auth-intro p { margin: 0; color: #6d7486; font-size: 13px; line-height: 1.55; }
.auth-form { display: grid; gap: 8px; }
.auth-form-step { display: grid; gap: 8px; }
.auth-form h3 { margin: 0 0 2px; font-size: 18px; }
.auth-form label { margin-top: 6px; color: #36405f; font-size: 13px; font-weight: 600; }
.auth-form input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 13px; border: 1px solid #cfd4e7; border-radius: 11px; background: #fff; font: inherit; font-size: 16px; }
.auth-form input:focus { border-color: #6172bc; outline: 3px solid #dfe5ff; }
.auth-form input::placeholder { color: #a0a7b6; }
.phone-entry { display: flex; min-width: 0; gap: 8px; }
.phone-entry input { min-width: 0; flex: 1; }
.phone-entry button { flex: none; min-height: 46px; padding: 8px 13px; border-radius: 11px; background: #edf0fc; color: #4359a4; font-size: 13px; white-space: nowrap; }
.phone-entry button:disabled { opacity: .65; }
.auth-form .auth-primary { width: 100%; min-height: 48px; margin-top: 12px; border-radius: 11px; background: #596bb7; color: #fff; font-weight: 650; }
.auth-form .auth-primary:hover { background: #485ba8; }
.auth-text-button { justify-self: start; padding: 3px 0; background: transparent; color: #4b61b4; font-size: 13px; text-align: left; }
.auth-text-button:hover { background: transparent; text-decoration: underline; }
.auth-inline-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.auth-form-note, .auth-info, .password-hint { margin: 0; font-size: 12px; line-height: 1.5; }
.auth-agreement{display:flex;align-items:flex-start;gap:8px;margin:4px 0 0;color:#526078;font-size:12px;line-height:1.6;cursor:pointer}.auth-agreement input{flex:none;width:17px;height:17px;min-height:0;margin:1px 0 0;accent-color:#596bb7}.auth-agreement a{color:#4359a4;text-decoration:none}.auth-agreement a:hover{text-decoration:underline}.auth-agreement input:focus-visible{outline:2px solid #596bb7;outline-offset:2px}
.auth-form-note, .password-hint { color: #687188; }
.auth-info { color: #087f5b; }
.auth-skip { margin: 12px 0 0; text-align: center; font-size: 13px; }
.auth-screen[data-auth-mode="reset"] .auth-intro p { display: none; }
.password-field { position: relative; min-width: 0; }
.auth-form .password-field input, .stack-form .password-field input { width: 100%; box-sizing: border-box; padding-right: 48px; }
.auth-form .password-toggle, .stack-form .password-toggle { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 9px; color: #665b82; background: transparent; }
.auth-form .password-toggle:hover { background: #f1eef8; }
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle[aria-pressed="true"] .eye-slash { display: none; }
.caps-lock-hint { display: block; margin: 4px 2px 0; color: #ad5a12; font-size: 12px; }
.account-page { justify-content: flex-start; padding-top: 60px; }
.account-page .brand { margin-bottom: 14px; }
.account-page section + section { margin-top: 14px; }
.account-page .auth-card h2 { margin: 0; font-size: 18px; }
.account-page .auth-form { margin-top: 5px; }
.account-page .notice { margin-top: 14px; }
.register-page { justify-content: flex-start; padding-top: 36px; }
.register-page .auth-card { min-height: 0; }
.register-form h2 { margin: 12px 0 3px; color: #263354; font-size: 18px; }
.register-form h2:first-child { margin-top: 0; }
.register-form h2:not(:first-child) { padding-top: 18px; border-top: 1px solid #e5e8f2; }
.register-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; }
@media (max-width: 560px) {
  .auth-page { width: min(100% - 28px, 460px); padding-top: 20px; justify-content: flex-start; }
  .auth-hero { margin-bottom: 16px; }
  .auth-card { gap: 12px; padding: 19px; border-radius: 17px; }
}
@media (max-height: 600px) {
  .auth-page { justify-content: flex-start; }
}
