:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #152238;
  background: #f3f7fc;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #65a2ff; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 48px 24px; color: #fff; background: linear-gradient(160deg, #104c98 0%, #063b78 38%, #031f45 100%); }
.login-layout { display: flex; width: min(100%, 360px); flex-direction: column; align-items: stretch; text-align: center; }
.login-brand { display: flex; flex-direction: column; align-items: center; color: #fff; }
.login-mark { width: 56px; height: 64px; }
.login-brand-name { margin-top: 16px; font-size: 1.65rem; font-weight: 800; letter-spacing: -.03em; }
.login-tagline { margin-top: 3px; color: rgba(255,255,255,.9); font-size: .95rem; }
.login-form { display: grid; gap: 11px; margin-top: 25px; }
.login-form > input, .password-field input { width: 100%; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; color: #152238; background: #fff; font-size: .95rem; }
.login-form input::placeholder { color: #74839b; opacity: 1; }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 12px; display: grid; width: 28px; height: 32px; padding: 4px; transform: translateY(-50%); place-items: center; border: 0; border-radius: 6px; color: #71819a; background: transparent; cursor: pointer; }
.password-toggle:hover { color: #0866e8; }
.password-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-submit, .register-submit { min-height: 48px; border: 0; border-radius: 9px; color: #fff; background: #1d72ef; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s; }
.login-submit:hover, .register-submit:hover { transform: translateY(-1px); background: #0c5fd6; }
.forgot-link { justify-self: center; margin-top: 1px; color: #fff; font-size: .88rem; font-weight: 600; }
.forgot-link:hover, .support-prompt a:hover, .signup-prompt a:hover { text-decoration: underline; }
.support-prompt, .signup-prompt { color: rgba(255,255,255,.9); font-size: .88rem; }
.support-prompt { margin-top: 14px; }
.support-prompt a, .signup-prompt a { color: #fff; font-weight: 700; }
.signup-prompt { margin-top: 26px; }
.form-message { min-height: 0; color: #b7d5ff; font-size: .85rem; }
.form-message:not(:empty) { min-height: 1.3em; }

.register-page { display: grid; min-height: 100vh; place-items: start center; padding: 28px 16px; background: #f3f7fc; }
.register-card { width: min(100%, 460px); padding: 28px 32px; border: 1px solid #e8eef7; border-radius: 18px; background: #fff; box-shadow: 0 16px 38px rgba(20,54,94,.12); }
.register-brand { display: inline-flex; align-items: center; gap: 9px; color: #063b78; font-size: 1rem; font-weight: 800; }
.register-brand svg { width: 30px; height: 30px; color: #0866e8; }
.register-card h1 { margin-top: 16px; color: #102947; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.025em; }
.register-intro { margin-top: 5px; color: #708098; font-size: .9rem; }
.register-form { display: grid; gap: 7px; margin-top: 20px; }
.register-form > label:not(.terms-checkbox) { margin-top: 5px; color: #1b2c45; font-size: .82rem; font-weight: 650; }
.register-form > input, .register-form select, .register-password-field input, .address-row input { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #d6e0ee; border-radius: 7px; color: #263a57; background: #f9fbfe; font-size: .88rem; }
.register-form input::placeholder { color: #94a3b8; opacity: 1; }
.register-form select:invalid { color: #94a3b8; }
.address-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.address-row > div { display: grid; gap: 7px; }
.address-row label { margin-top: 5px; color: #1b2c45; font-size: .82rem; font-weight: 650; }
.register-password-field input { padding-right: 44px; }
.password-hint { margin-top: -1px; color: #8290a4; font-size: .74rem; }
.terms-checkbox { display: flex; align-items: flex-start; gap: 8px; margin-top: 7px; color: #52647e; font-size: .8rem; }
.terms-checkbox input { width: 15px; height: 15px; flex: none; margin: 2px 0 0; accent-color: #0866e8; }
.terms-checkbox a, .register-support a, .register-login a { color: #0866e8; font-weight: 700; }
.terms-checkbox a:hover, .register-support a:hover, .register-login a:hover { text-decoration: underline; }
.register-submit { min-height: 44px; margin-top: 5px; }
.register-form .register-error-message { padding: 12px; border-radius: 8px; color: #9c2c32; background: #fdecec; font-size: .82rem; line-height: 1.45; }
.register-error-message p + p { margin-top: 6px; }
.register-error-message a { color: #0866e8; font-weight: 700; text-decoration: underline; }
.register-support, .register-login { color: #718098; font-size: .8rem; }
.register-support { margin-top: 17px; }
.register-login { margin-top: 5px; }

@media (max-width: 480px) {
  .login-page { padding: 36px 22px; }
  .register-page { padding: 16px 12px; }
  .register-card { padding: 23px 20px; border-radius: 14px; }
  .register-card h1 { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
