:root {
  color-scheme: light;
  --auth-blue: #024260;
  --auth-ink: #193343;
  --auth-muted: #637681;
  --auth-line: #dbe4e8;
}

/* The existing homepage changes its root font size; use pixels for this layer. */
body.has-login-dock { height: auto; min-height: 100%; padding-bottom: 108px; }
.login-dock, .login-dock * { box-sizing: border-box; }
.login-dock {
  position: fixed; inset: auto 0 0; z-index: 1000;
  padding: 18px 28px calc(18px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .87);
  border-top: 1px solid rgba(2, 66, 96, .12);
  box-shadow: 0 -6px 28px rgba(2, 38, 56, .08);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  color: var(--auth-ink); font: 16px/1.5 Arial, sans-serif;
}
.login-dock__inner { max-width: 1200px; margin: auto; display: flex; align-items: center; gap: 18px; }
.login-dock__icon { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 50%; background: #e9f1f4; color: var(--auth-blue); }
.login-dock__copy { flex: 1; }
.login-dock__copy strong { display: block; font-size: 18px; font-weight: 700; line-height: 1.4; }
.login-dock__copy p { margin: 3px 0 0; color: #506574; font-size: 14px; line-height: 1.5; }
.login-dock__button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 50px; padding: 12px 28px; border-radius: 8px; background: var(--auth-blue); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; }
.login-dock__button:hover { background: #075777; color: #fff; }
.login-dock a:focus-visible { outline: 3px solid #e0a900; outline-offset: 4px; }

.auth-page, .auth-page * { box-sizing: border-box; }
.auth-page { margin: 0; min-height: 100vh; min-height: 100svh; color: var(--auth-ink); background: #f3f6f6; font: 16px/1.5 Arial, sans-serif; display: flex; flex-direction: column; }
.auth-page button, .auth-page input { font: inherit; }
.auth-page a { color: var(--auth-blue); text-underline-offset: 4px; }
.auth-header { min-height: 92px; padding: 22px max(24px, calc((100vw - 1200px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #e4e9eb; background: #fff; }
.auth-brand { display: inline-flex; max-width: 380px; width: 45%; }
.auth-brand img { width: 100%; height: auto; }
.auth-back { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; font-size: 14px; text-decoration: none; }
.auth-back:hover { text-decoration: underline; }
.auth-main { width: 100%; max-width: 1128px; padding: 48px 24px; margin: auto; }
.auth-shell { display: grid; grid-template-columns: .9fr 1fr; background: #fff; border: 1px solid #e0e8eb; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 60px rgba(21, 50, 65, .07); }
.auth-story { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 44px 40px 0; overflow: hidden; background: #e8f0f3; }
.auth-eyebrow { margin: 0 0 20px; color: var(--auth-blue); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.auth-story h2 { margin: 0; max-width: 320px; font-size: 38px; font-weight: 600; line-height: 1.16; letter-spacing: -1.2px; }
.auth-story h2 span { color: var(--auth-blue); }
.auth-story > p:not(.auth-eyebrow) { max-width: 310px; margin: 20px 0 16px; font-size: 15px; color: #526b79; }
.auth-story__image { display: block; width: 88%; max-width: 310px; height: 275px; object-fit: contain; align-self: center; margin-top: auto; padding-top: 12px; }
.auth-story__accent { display: block; width: 46px; height: 5px; border-radius: 8px; background: #ffbd02; margin-top: 8px; }
.auth-panel { min-width: 0; padding: 40px 44px; }
.auth-panel h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.2; letter-spacing: -.7px; }
.auth-intro { margin: 0 0 26px; color: var(--auth-muted); font-size: 14px; }
.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.auth-field input { display: block; width: 100%; min-height: 49px; border: 1px solid #cbd8de; border-radius: 8px; padding: 12px 14px; outline: none; background: #fff; color: var(--auth-ink); font-size: 16px; }
.auth-field input::placeholder { color: #81919b; opacity: 1; }
.auth-field input:focus { border-color: var(--auth-blue); box-shadow: 0 0 0 3px rgba(2, 66, 96, .09); }
.auth-help { margin: 6px 0 0; color: var(--auth-muted); font-size: 12px; }
.auth-otp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.auth-send-otp { min-height: 49px; padding: 11px 13px; border: 1px solid var(--auth-blue); border-radius: 8px; color: var(--auth-blue); background: #edf4f6; font-size: 13px !important; font-weight: 600 !important; white-space: nowrap; cursor: pointer; }
.auth-send-otp:hover { background: #e1edf1; }
.auth-send-otp:disabled { opacity: .55; cursor: default; }
.auth-sms-status { margin: 10px 0 0; color: #a33329; font-size: 13px; line-height: 1.5; }
.auth-sms-status[hidden] { display: none; }
.auth-field input[aria-invalid="true"] { border-color: #b3473b; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; min-height: 50px; padding: 12px 18px; border: 0; border-radius: 8px; background: var(--auth-blue); color: white; font-size: 15px; font-weight: 700 !important; cursor: pointer; }
.auth-submit:hover { background: #075777; }
.auth-submit:disabled { opacity: .55; cursor: default; }
.auth-error { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #efcbc6; border-radius: 8px; background: #fff4f2; color: #a33329; font-size: 14px; line-height: 1.5; }
.auth-error[hidden] { display: none; }
.auth-switch { margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--auth-line); text-align: center; font-size: 14px; color: var(--auth-muted); }
.auth-switch a { display: inline-block; margin-left: 4px; font-weight: 700; }
.auth-footer { padding: 0 24px 24px; color: #71828c; text-align: center; font-size: 11px; }
.auth-page :is(a, button, input):focus-visible { outline: 3px solid #dca500; outline-offset: 3px; }
.auth-page .auth-field input:focus-visible { outline: none; }
.auth-page noscript { display: block; margin-bottom: 16px; color: #a33329; }

@media (max-width: 767px) {
  body.has-login-dock { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  .login-dock { padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .login-dock__inner { gap: 12px; }
  .login-dock__icon { display: none; }
  .login-dock__copy strong { font-size: 15px; }
  .login-dock__copy p { font-size: 12px; max-width: 180px; }
  .login-dock__button { padding: 12px 17px; font-size: 14px; gap: 10px; flex-shrink: 0; }
  .auth-header { min-height: 76px; padding: 20px; gap: 16px; }
  .auth-brand { width: 58%; max-width: 300px; }
  .auth-back { font-size: 12px; gap: 4px; }
  .auth-back span { display: none; }
  .auth-main { max-width: 540px; padding: 24px 16px; }
  .auth-shell { display: block; border-radius: 14px; }
  .auth-story { display: none; }
  .auth-panel, .auth-page--register .auth-panel { padding: 28px 24px; }
  .auth-panel h1 { font-size: 28px; }
  .auth-intro { margin-bottom: 24px; }
  .auth-footer { font-size: 10px; padding-bottom: 18px; }
}
@media (max-width: 360px) {
  .login-dock { padding-left: 12px; padding-right: 12px; }
  .login-dock__copy p { display: none; }
  .login-dock__button { padding: 12px; }
  .auth-panel, .auth-page--register .auth-panel { padding: 26px 18px; }
  .auth-otp-row { grid-template-columns: 1fr; }
  .auth-send-otp { width: 100%; }
}
