* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: #263143; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #92b5ff; outline-offset: 2px; }
[hidden] { display: none !important; }
.auth-page { min-height: 100vh; background: #eaf3ff url("../assets/auth/login-bg.png") center center / cover no-repeat; }
.auth-topbar { max-width: 1260px; height: 76px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; }
.auth-brand { display: inline-flex; align-items: center; }
.auth-brand img { display: block; width: 140px; max-height: 46px; object-fit: contain; }
.auth-main { max-width: 1260px; margin: 0 auto; padding: 20px 28px 60px; }
.auth-heading { text-align: center; }
.auth-heading h1 { margin: 0; color: #1d2b40; font-size: 42px; line-height: 1.35; font-weight: 650; }
.auth-heading strong { color: #3977ed; font-weight: inherit; }
.auth-heading p { margin: 10px 0 0; color: #4c5d76; font-size: 21px; line-height: 1.5; }
.auth-heading p span { color: #2b74e8; }
.auth-stage { min-height: 560px; display: grid; grid-template-columns: minmax(0, 1fr) 390px; align-items: center; gap: 70px; }
.auth-illustration { min-width: 0; align-self: center; }
.auth-illustration img { display: block; width: min(100%, 760px); height: auto; margin: 0 auto; filter: drop-shadow(0 18px 18px rgba(21, 62, 142, .09)); }
.auth-card { width: 100%; background: #fff; border-radius: 6px; padding: 30px 31px 28px; box-shadow: 0 15px 40px rgba(24, 57, 100, .12); }
.auth-card h2 { margin: 0 0 23px; color: #263143; font-size: 21px; line-height: 1.35; font-weight: 600; }
.auth-field { margin-bottom: 15px; }
.auth-field > label { display: block; margin-bottom: 7px; color: #3d4c60; font-size: 13px; font-weight: 500; }
.auth-field input:not([type="checkbox"]), .auth-field select, .sms-dialog input { width: 100%; height: 42px; min-width: 0; border: 1px solid #d9e1ec; border-radius: 4px; padding: 0 12px; background: #fff; color: #263143; outline: none; transition: border-color .15s, box-shadow .15s; }
.auth-field input::placeholder, .sms-dialog input::placeholder { color: #a0aab8; }
.auth-field input:focus, .auth-field select:focus, .sms-dialog input:focus { border-color: #5b91e7; box-shadow: 0 0 0 3px rgba(75, 130, 228, .13); }
.auth-field.is-invalid input, .auth-field.is-invalid select { border-color: #d94044; }
.auth-field.is-invalid input:focus, .auth-field.is-invalid select:focus { box-shadow: 0 0 0 3px rgba(217, 64, 68, .12); }
.phone-row, .code-row, .captcha-row { display: flex; align-items: stretch; gap: 8px; }
.phone-row select { flex: 0 0 135px; width: 135px; padding: 0 8px; font-size: 12px; }
.phone-row input, .code-row input, .captcha-row input { flex: 1 1 auto; }
.code-button, .captcha-image { flex: 0 0 112px; width: 112px; height: 42px; border: 1px solid #d8e3f3; border-radius: 4px; background: #f4f8ff; color: #2868d8; font-size: 12px; white-space: nowrap; }
.code-button:hover:not(:disabled), .captcha-image:hover { border-color: #5d91e9; background: #eaf3ff; }
.code-button:disabled { color: #8f9eaf; cursor: not-allowed; }
.captcha-image { padding: 0; overflow: hidden; position: relative; }
.captcha-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.captcha-image .captcha-fallback { display: none; }
.captcha-image.is-unavailable img { display: none; }
.captcha-image.is-unavailable .captcha-fallback { display: inline; }
.field-error { display: none; margin-top: 5px; color: #d43f42; font-size: 12px; line-height: 1.35; }
.field-error:not(:empty) { display: block; }
.password-hint { display: block; margin-top: 5px; color: #8997a9; font-size: 11px; line-height: 1.35; }
.agreement-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin: 2px 0 0; color: #637185; font-size: 12px; line-height: 1.8; }
.agreement-row label { display: inline-flex; align-items: center; white-space: nowrap; cursor: pointer; }
.agreement-row input { width: 15px; height: 15px; margin: 0 6px 0 0; accent-color: #3479e8; }
.agreement-row a { color: #286fe4; }
.agreement-row a:hover, .auth-form-footer a:hover { text-decoration: underline; }
.agreement-error { margin-bottom: 10px; }
.auth-submit { display: block; width: 100%; height: 44px; margin-top: 19px; border: 0; border-radius: 4px; background: #3478e8; color: #fff; font-weight: 600; transition: background .15s; }
.auth-submit:hover:not(:disabled) { background: #2364cc; }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.auth-form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 17px; color: #8090a1; font-size: 12px; }
.auth-form-footer.end { justify-content: flex-end; }
.auth-form-footer a:last-child, .auth-form-footer.end a { color: #286fe4; }
.auth-toast { position: fixed; left: 50%; top: 32px; transform: translateX(-50%); z-index: 2502; display: flex; align-items: center; gap: 8px; width: max-content; max-width: min(92vw, 460px); padding: 12px 16px; border-radius: 4px; background: #fff; color: #333; box-shadow: 0 6px 24px rgba(20, 35, 60, .16); text-align: left; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.auth-toast::before { content: '!'; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; background: #e34d59; color: #fff; font: 700 12px/1 Arial, sans-serif; }
.auth-toast.is-success::before { content: '✓'; background: #2ba471; }
.sms-dialog { width: min(360px, calc(100vw - 32px)); max-width: none; border: 0; border-radius: 7px; padding: 25px; box-shadow: 0 20px 60px rgba(14, 40, 77, .22); color: #263143; }
.sms-dialog::backdrop { background: rgba(16, 32, 54, .45); }
.sms-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.sms-dialog p { margin: 0 0 18px; color: #6d7d92; font-size: 12px; }
.sms-dialog .dialog-close { position: absolute; top: 13px; right: 13px; width: 28px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: #718099; font-size: 22px; line-height: 1; }
.sms-dialog .dialog-close:hover { background: #f1f4fa; }
.sms-dialog .dialog-captcha { display: flex; gap: 8px; margin-bottom: 12px; }
.sms-dialog .dialog-captcha input { flex: 1; }
.sms-dialog .dialog-error { min-height: 18px; margin-bottom: 12px; color: #d43f42; font-size: 12px; }
.sms-dialog .dialog-confirm { width: 100%; height: 42px; border: 0; border-radius: 4px; background: #3478e8; color: #fff; }
.sms-dialog .dialog-confirm:disabled { opacity: .6; cursor: wait; }
.agreement-dialog { width: min(600px, calc(100vw - 32px)); max-width: none; max-height: min(80vh, 720px); border: 0; border-radius: 7px; padding: 24px; box-shadow: 0 20px 60px rgba(14, 40, 77, .22); color: #263143; }
.agreement-dialog::backdrop { background: rgba(16, 32, 54, .45); }
.agreement-dialog h2 { margin: 0 38px 15px 0; font-size: 19px; }
.agreement-dialog .dialog-close { position: absolute; top: 17px; right: 18px; width: 28px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: #718099; font-size: 22px; line-height: 1; }
.agreement-dialog .dialog-close:hover { background: #f1f4fa; }
.agreement-content { display: block; width: 100%; height: min(62vh, 600px); border: 0; background: #fff; }
@media (max-width: 980px) {
  .auth-stage { grid-template-columns: minmax(0, 1fr) 360px; gap: 25px; }
  .auth-heading h1 { font-size: 36px; }
  .auth-heading p { font-size: 18px; }
}
@media (max-width: 720px) {
  .auth-page { background-position: center top; }
  .auth-topbar { height: 60px; padding: 0 20px; }
  .auth-brand img { width: 120px; max-height: 40px; }
  .auth-main { padding: 18px 16px 38px; }
  .auth-heading { display: none; }
  .auth-stage { min-height: calc(100vh - 116px); display: flex; align-items: center; justify-content: center; }
  .auth-illustration { display: none; }
  .auth-card { width: min(100%, 420px); }
}
@media (max-width: 390px) {
  .auth-main { padding-left: 12px; padding-right: 12px; }
  .auth-card { padding: 25px 20px; }
  .phone-row select { flex-basis: 118px; width: 118px; }
  .code-button, .captcha-image { flex-basis: 102px; width: 102px; }
}

.auth-page dialog:not([open]) { display: none !important; }
.agreement-dialog { top: 10vh; bottom: auto; margin: 0 auto; max-height: 85vh; }
.agreement-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 16px; }
.agreement-actions button { padding: 7px 18px; border: 1px solid #dcdfe6; border-radius: 4px; background: #fff; color: #333; cursor: pointer; }
.agreement-actions button:hover { color: #286fe4; border-color: #286fe4; }
.agreement-actions [hidden] { display: none; }
