* { box-sizing: border-box }
body { margin: 0; color: #17233d; font: 14px/1.6 "PingFang SC","Microsoft YaHei",system-ui,sans-serif }
a { color: #285ad9; text-decoration: none }
a:hover { text-decoration: underline }
button,input { font: inherit }
button { cursor: pointer }
.shell { display: flex; min-height: 100vh; min-height: 100svh }
.brand { flex: 0 0 46%; padding: clamp(40px,5vw,76px) clamp(36px,4.6vw,72px); background: #071626 url(brand.jpg) center/cover no-repeat }
.brand a { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 10px; color: #b0bdcc; font-size: 13px; line-height: 1.4; letter-spacing: 4px }
.brand img { display: block; width: 132px; height: auto }
.brand h1 { margin: clamp(54px,8vh,88px) 0 0; color: white; font-size: clamp(30px,3.1vw,50px); font-weight: 600; line-height: 1.55; letter-spacing: 2px; text-shadow: 0 2px 14px rgba(3,13,24,.4) }
.brand em { color: #b5e6f3; font-style: normal }
main { flex: 1; min-width: 0; position: relative; display: grid; place-items: center; padding: 96px 48px 40px }
.tabs { position: absolute; right: 36px; top: 28px; display: flex; gap: 4px; padding: 4px; background: #f4f6fa; border: 1px solid #e7ecf4; border-radius: 11px }
.tabs a { display: grid; place-items: center; min-width: 68px; min-height: 36px; padding: 6px 18px; font-size: 13px; color: #586880; border-radius: 7px }
.tabs a[aria-current] { background: white; color: #285ad9; box-shadow: 0 2px 7px #17233d18 }
.card { width: 100%; max-width: 400px; min-height: 580px }
h2 { font-size: 26px; font-weight: 600; line-height: 1.4; letter-spacing: .5px; margin: 0 }
.intro { margin: 10px 0 30px; color: #5a6b8c; font-size: 13.5px; line-height: 1.7 }

.field { margin-bottom: 18px }
.field label { display: block; color: #5a6b8c; font-size: 13px; letter-spacing: .3px; margin-bottom: 8px }
.field input { width: 100%; min-width: 0; height: 46px; padding: 0 14px; font-size: 14.5px; border: 1px solid #c9d3e4; border-radius: 10px; background: #fbfcfe; color: inherit }
.field input::placeholder { color: #94a3bd }
.field input:focus { border-color: #2e5bff; background: white }
input:focus-visible,button:focus-visible,a:focus-visible { outline: 2px solid #5585ed; outline-offset: 2px }
input[type=checkbox] { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: #2e5bff; vertical-align: middle }
.turnstile-wrapper { min-height: 65px; margin-bottom: 20px }
.turnstile-wrapper [role=status] { display: block; border: 1px solid #e4e9f2; background: #f8fafc; padding: 18px; border-radius: 7px; color: #52677f }
.turnstile-wrapper [hidden] { display: none }
.options,.social,.dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px }
.options { justify-content: space-between; font-size: 13px; margin: 4px 0 22px }
.options label,.agreement { display: flex; gap: 8px; align-items: center; color: #5a6b8c }
.option-links { display: flex; flex-wrap: wrap; gap: 6px 14px }
.option-links a { color: #5a6b8c }
.agreement { align-items: flex-start; font-size: 12.5px; margin-bottom: 20px }
.agreement input { margin-top: 2px }
.primary,.secondary { width: 100%; min-height: 48px; border-radius: 10px; padding: 10px 14px; text-align: center; font-size: 15.5px }
.primary { display: block; border: 0; background: #2e5bff; color: white; font-weight: 600 }
.primary:hover:not(:disabled) { background: #1f49e0 }
.primary:disabled { background: #b9c8f2; cursor: not-allowed }
.card[data-page="login"] .primary,.card[data-page="register"] .primary { letter-spacing: 6px; text-indent: 6px }
.secondary { display: grid; place-items: center; min-height: 46px; margin-top: 14px; border: 1px solid #c9d3e4; color: #5a6b8c; background: white; font-size: 14px }
.secondary:hover { border-color: #2e5bff; color: #2e5bff; text-decoration: none }
.switch { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid #e4e9f2; text-align: center; color: #5a6b8c; font-size: 13.5px }
.switch .sep { margin: 0 10px; color: #c9d3e4 }
.social-title { display: flex; align-items: center; gap: 14px; margin: 30px 0 16px; color: #94a3bd; font-size: 12px }
.social-title::before,.social-title::after { content: ""; flex: 1; height: 1px; background: #e4e9f2 }
.social { justify-content: center; gap: 24px }
.social a { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #607b9d; background: #edf3fa; border: 1px solid #dce6f2 }
.social a:hover { background: #e4edfc; border-color: #b9cdef }
.notice { background: #eff7ff; color: #31527e; border: 1px solid #bfd4f6; padding: 13px 15px; border-radius: 9px; overflow-wrap: anywhere }
.notice.error,.notice.alert { background: #fff4f4; color: #983534; border-color: #f2c5c5 }
ul.notice { padding-left: 30px }

.password-control { position: relative; display: flex; align-items: center }
.password-control input { padding-right: 48px }
.password-toggle { position: absolute; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #7889a4 }
.password-toggle:hover,.password-toggle[aria-pressed="true"] { color: #5a6b8c; background: #f0f3f9 }
.password-rules { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 9px 0 0; list-style: none }
.password-rules[hidden] { display: none }
.password-rules li { border-radius: 99px; padding: 3px 9px; background: #f2f5fa; color: #66758a; font-size: 11.5px }
.password-rules .rule-met { background: #e9f7ef; color: #277357 }
.field-hint { margin: 10px 0 0; color: #66758a; font-size: 12px; line-height: 1.8 }
.captcha-row { display: flex; align-items: center; gap: 12px }
.captcha-row input { flex: 1 }
.captcha-image { display: grid; place-items: center; flex: 0 0 130px; height: 46px; padding: 0; overflow: hidden; border: 1px solid #e4e9f2; border-radius: 10px; background: #f1f5ff }
.captcha-image img { display: block; width: 100%; height: 44px; object-fit: contain }

.account-footer { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 204px; padding: 30px 28px 26px; background: #f8fafc; border-top: 1px solid #e8edf4; color: #66758a; text-align: center; font-size: 12px }
.account-footer a { color: inherit }
.contacts,.account-footer nav,.footer-legal { display: flex; flex-wrap: wrap; justify-content: center }
.contacts { gap: 12px 32px; max-width: 1120px; margin: 0 0 20px; line-height: 1.9 }
.contacts a { white-space: nowrap }
.contacts span { margin-right: 8px; color: #8b96a6 }
.footer-address { margin: 0; text-wrap: pretty }
.account-footer nav { gap: 28px; margin-bottom: 14px; color: #52677f }
.footer-legal { gap: 7px 20px; font-size: 11px; line-height: 1.8; color: #78869a }

dialog { width: min(92vw,480px); max-height: 92vh; overflow: auto; border: none; padding: 24px; color: inherit; border-radius: 16px; box-shadow: 0 16px 60px #17233d44 }
dialog::backdrop { background: #17233d77 }
dialog h2 { padding-right: 40px; font-size: 21px }
dialog iframe { display: block; width: 100%; height: min(400px,48vh); margin-bottom: 14px; border: 1px solid #e4e9f2; border-radius: 12px }
.close-dialog { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: none; border-radius: 8px; font-size: 24px; line-height: 1; background: none; color: #66758a }
.close-dialog:hover { background: #f0f3f9 }
.dialog-actions button { border: 1px solid #c9d3e4; border-radius: 6px; padding: 4px 12px; background: white }
body.modal-open { overflow: hidden }

@media (min-width: 901px) and (max-width: 1100px) {
  .brand { padding: 42px 32px }
  .brand h1 { font-size: 32px }
  main { padding-inline: 30px }
}
@media (max-width: 900px) {
  .shell { flex-direction: column }
  .brand { flex: none; padding: 24px; background: #071626 }
  .brand img { width: 100px }
  .brand a { gap: 5px; font-size: 10px; letter-spacing: 2px }
  .brand h1 { display: none }
  main { display: block; min-height: calc(100svh - 108px); padding: 88px 24px 32px }
  .tabs { right: 24px; top: 18px }
  .tabs a { min-width: 64px }
  .card { max-width: 432px; min-height: 0; margin: auto }
  .intro { margin: 8px 0 26px }
  .field input { height: 48px; font-size: 16px }
  .account-footer { min-height: 230px; padding: 26px 20px calc(24px + env(safe-area-inset-bottom)) }
  .contacts { gap: 7px 20px; margin-bottom: 18px }
  .footer-address { flex-basis: 100%; max-width: 540px }
  .footer-legal a { flex-basis: 100% }
}
@media (max-width: 480px) {
  .contacts { flex-direction: column; gap: 7px }
  .footer-address { max-width: 310px }
  .footer-legal { max-width: 330px }
}
@media (max-width: 360px) {
  .brand { padding: 20px 16px }
  main { padding-inline: 16px }
  .tabs { right: 16px }
  .captcha-image { flex-basis: 106px }
}
