:root {
  --brand-950: #04132f;
  --brand-900: #061a44;
  --brand-850: #082351;
  --brand-800: #0a2c63;
  --brand-700: #0755b8;
  --brand-600: #087cfa;
  --brand-500: #0aa8f0;
  --brand-400: #08c7ee;
  --ink: #08162f;
  --text: #182b48;
  --muted: #5c6e87;
  --subtle: #667991;
  --canvas: #f4f8fd;
  --surface: #ffffff;
  --soft-blue: #eaf4ff;
  --line: #d9e5f2;
  --line-strong: #bfd2e6;
  --success: #087f5b;
  --success-soft: #e6f6f0;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --focus: #ffbf47;
  --shadow-card: 0 24px 70px rgba(6, 26, 68, .11);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --font: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button { border: 0; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; border-radius: 9px; color: #fff; background: var(--brand-900); font-size: .78rem; font-weight: 800; transform: translateY(-150%); transition: transform .2s; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.auth-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(400px, .84fr) minmax(540px, 1.16fr); }
.auth-brand { position: sticky; top: 0; min-height: 100svh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; padding: clamp(28px, 3.2vw, 50px); color: #fff; background: linear-gradient(145deg, var(--brand-950), var(--brand-900) 55%, #07377e); isolation: isolate; }
.auth-brand::after { content: ""; position: absolute; z-index: -1; width: 430px; height: 430px; right: -265px; bottom: -210px; border: 1px solid rgba(8, 199, 238, .25); border-radius: 50%; box-shadow: 0 0 0 74px rgba(8, 199, 238, .035), 0 0 0 148px rgba(8, 199, 238, .018); }
.auth-brand__grid { position: absolute; z-index: -2; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.auth-brand__route { position: absolute; z-index: -1; width: min(770px, 115%); height: auto; right: -19%; bottom: -13%; color: var(--brand-400); opacity: .23; }
.auth-brand__route path { stroke-width: 2; stroke-dasharray: .025 .025; }
.brand { position: relative; z-index: 2; width: fit-content; display: inline-flex; align-items: center; }
.brand-crop { position: relative; display: block; width: 158px; height: 42px; overflow: hidden; border-radius: 4px; background: #fff; }
.brand-crop img { position: absolute; width: 190px; height: 95px; max-width: none; left: -13px; top: -26px; object-fit: contain; }
.auth-brand__content { width: min(100%, 570px); margin: auto 0; padding: clamp(42px, 6vh, 76px) 0; }
.brand-kicker, .form-kicker { margin: 0; color: #9eeaff; font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brand-kicker { display: flex; align-items: center; gap: 10px; }
.brand-kicker span { width: 22px; height: 1px; background: var(--brand-400); }
.auth-brand h2 { max-width: 610px; margin: 19px 0 0; font-size: clamp(2.4rem, 4vw, 4.7rem); line-height: .99; letter-spacing: -.055em; text-wrap: balance; }
.auth-brand__intro { max-width: 540px; margin: 23px 0 0; color: #b8cbe3; font-size: clamp(.9rem, 1.3vw, 1.04rem); }
.service-route { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: clamp(34px, 5vh, 58px); }
.service-route__line { position: absolute; width: 52%; height: 1px; left: 24%; top: 50%; background: linear-gradient(90deg, transparent, rgba(8,199,238,.4), transparent); transform: rotate(-12deg); }
.service-route__item { position: relative; z-index: 1; min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(255,255,255,.11); border-radius: var(--radius-sm); background: rgba(3,18,46,.58); backdrop-filter: blur(8px); }
.service-route__icon { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #78e3ff; background: rgba(8,199,238,.12); }
.service-route__icon svg { width: 18px; height: 18px; }
.service-route__item strong, .service-route__item small { display: block; }
.service-route__item strong { font-size: .75rem; }
.service-route__item small { margin-top: 2px; color: #829aba; font-size: .61rem; }
.auth-brand__footer { display: flex; align-items: center; gap: 10px; color: #8ea6c4; font-size: .68rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-400); box-shadow: 0 0 0 5px rgba(8,199,238,.1); }

.auth-main { min-width: 0; min-height: 100svh; display: flex; flex-direction: column; padding: 34px clamp(28px, 6vw, 90px) 20px; }
.mobile-brand-row { display: none; }
.auth-main__inner { width: min(100%, 720px); margin: auto; padding: 34px 0; }
.auth-card--login { max-width: 540px; margin: 0 auto; }
.auth-card { padding: clamp(30px, 4.4vw, 54px); border: 1px solid rgba(191,210,230,.9); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.auth-card__header { margin-bottom: 30px; }
.form-kicker { color: var(--brand-700); }
.auth-card h1 { margin: 10px 0 0; color: var(--ink); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; }
.auth-card__header > p:last-child { max-width: 570px; margin: 14px 0 0; color: var(--muted); font-size: .85rem; }
.auth-main__footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; padding-top: 22px; color: var(--subtle); font-size: .65rem; }
.auth-main__footer a { min-height: 24px; display: inline-flex; align-items: center; }
.auth-main__footer a:hover { color: var(--brand-700); text-decoration: underline; }

.notice-stack { width: min(100%, 720px); margin: 0 auto 14px; }
.notice { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid #9dd9c6; border-radius: var(--radius-sm); color: #075e45; background: var(--success-soft); font-size: .75rem; font-weight: 700; }
.notice > svg { width: 20px; height: 20px; }
.notice button { width: 32px; height: 32px; display: grid; place-items: center; color: inherit; background: transparent; border-radius: 8px; cursor: pointer; font-size: 1.2rem; }
.notice button:hover { background: rgba(0,0,0,.05); }
.notice--error { color: var(--danger); border-color: #f0b1ac; background: var(--danger-soft); }
.form-alert { display: grid; grid-template-columns: 22px 1fr; gap: 12px; margin: -4px 0 24px; padding: 15px 16px; border: 1px solid #efb5b0; border-radius: var(--radius-sm); color: #8f1b13; background: var(--danger-soft); }
.form-alert > svg { width: 22px; height: 22px; margin-top: 1px; }
.form-alert strong { display: block; font-size: .78rem; }
.form-alert p { margin: 3px 0 0; font-size: .72rem; }

.auth-form { display: grid; gap: 20px; }
.field-group { min-width: 0; }
.field-group > label, .field-label-row label { display: inline-block; margin-bottom: 8px; color: var(--text); font-size: .72rem; font-weight: 800; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.field-label-row a { min-height: 24px; display: inline-flex; align-items: center; margin-bottom: 4px; color: var(--brand-700); font-size: .69rem; font-weight: 750; }
.field-label-row a:hover { text-decoration: underline; }
.optional-label { margin-bottom: 8px; color: var(--subtle); font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.input-shell { position: relative; }
.field-icon { position: absolute; z-index: 1; width: 18px; height: 18px; left: 16px; top: 50%; color: #71849c; pointer-events: none; transform: translateY(-50%); }
.input-shell input { width: 100%; min-height: 52px; padding: 12px 48px 12px 46px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); background: #fbfdff; font-size: .82rem; font-weight: 600; outline: none; transition: border-color .18s, box-shadow .18s, background-color .18s; }
.input-shell:not(.input-shell--password) input { padding-right: 15px; }
.input-shell input::placeholder { color: #8292a7; font-weight: 500; }
.input-shell input:hover { border-color: #8eabc8; }
.input-shell input:focus { border-color: var(--brand-600); background: #fff; box-shadow: 0 0 0 4px rgba(8,124,250,.11); }
.input-shell input[readonly] { color: var(--brand-800); background: var(--soft-blue); cursor: not-allowed; }
.field-group--error .input-shell input, .input-shell input[aria-invalid="true"] { border-color: #d24b42; background: #fffafa; }
.field-help, .field-error { margin: 7px 2px 0; font-size: .65rem; line-height: 1.45; }
.field-help { color: var(--subtle); }
.field-error { color: var(--danger); font-weight: 700; }
.password-toggle { position: absolute; z-index: 2; width: 40px; height: 40px; right: 6px; top: 50%; display: grid; place-items: center; border-radius: 9px; color: #5d7189; background: transparent; cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { color: var(--brand-700); background: var(--soft-blue); }
.password-toggle svg { width: 19px; height: 19px; grid-area: 1 / 1; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.form-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-section + .form-section { margin-top: 8px; padding-top: 27px; border-top: 1px solid var(--line); }
.form-section legend { width: 100%; margin: 0 0 19px; padding: 0; color: var(--ink); font-size: .78rem; font-weight: 800; }
.form-section legend span { display: inline-grid; width: 29px; height: 29px; margin-right: 9px; place-items: center; border-radius: 9px; color: var(--brand-700); background: var(--soft-blue); font-size: .6rem; letter-spacing: .04em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field-group--wide { grid-column: 1 / -1; }
.signup-form { gap: 24px; }
.terms-check { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 10px; padding: 2px 0; color: var(--muted); font-size: .72rem; }
.terms-check input { appearance: none; width: 20px; height: 20px; display: grid; margin: 1px 0 0; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; cursor: pointer; }
.terms-check input::before { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .16s var(--ease); }
.terms-check input:checked { border-color: var(--brand-700); background: var(--brand-700); }
.terms-check input:checked::before { transform: rotate(-45deg) scale(1); }
.terms-check a { min-height: 24px; display: inline-flex; align-items: center; color: var(--brand-700); font-weight: 800; }
.terms-check a:hover { text-decoration: underline; }

.submit-button { position: relative; width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 18px; border-radius: var(--radius-sm); color: #fff; background: var(--brand-700); box-shadow: 0 12px 26px rgba(7,85,184,.2); cursor: pointer; font-size: .78rem; font-weight: 800; transition: background-color .2s, transform .2s var(--ease), box-shadow .2s; }
.submit-button > svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.submit-button:hover { background: #064a9e; box-shadow: 0 14px 30px rgba(7,85,184,.25); transform: translateY(-1px); }
.submit-button:hover > svg { transform: translateX(3px); }
.submit-button:disabled { background: #54769f; box-shadow: none; cursor: wait; transform: none; }
.button-spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.submit-button.is-loading > svg { display: none; }
.submit-button.is-loading .button-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-switch { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 22px; color: var(--muted); font-size: .72rem; }
.auth-switch a { min-height: 24px; display: inline-flex; align-items: center; color: var(--brand-700); font-weight: 800; }
.auth-switch a:hover { text-decoration: underline; }
.app-link { display: grid; grid-template-columns: 24px 1fr 18px; align-items: center; gap: 12px; margin-top: 28px; padding: 15px 16px; border-top: 1px solid var(--line); color: var(--text); font-size: .69rem; font-weight: 750; transition: color .2s, background-color .2s; }
.app-link > svg { width: 22px; height: 22px; color: var(--brand-700); }
.app-link span, .app-link small { display: block; }
.app-link small { margin-bottom: 1px; color: var(--subtle); font-size: .58rem; font-weight: 650; }
.app-link .app-link__arrow { width: 16px; height: 16px; color: #75869a; }
.app-link:hover { color: var(--brand-700); background: var(--canvas); }

@media (max-width: 1050px) {
  .auth-layout { grid-template-columns: minmax(350px, .72fr) minmax(500px, 1fr); }
  .auth-brand { padding: 32px; }
  .auth-brand h2 { font-size: clamp(2.35rem, 4.7vw, 3.65rem); }
  .auth-main { padding-inline: 34px; }
}

@media (max-width: 880px) {
  .auth-layout { display: block; }
  .auth-brand { position: relative; width: 100%; min-height: 310px; height: auto; padding: 28px clamp(24px, 7vw, 58px) 32px; }
  .auth-brand__content { width: 100%; margin: 34px 0 0; padding: 0; }
  .auth-brand h2 { max-width: 650px; font-size: clamp(2.35rem, 7vw, 4.1rem); }
  .auth-brand__intro { max-width: 610px; }
  .service-route { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px; }
  .service-route__item { min-height: 64px; }
  .service-route__item small { display: none; }
  .auth-brand__footer { display: none; }
  .auth-brand__route { width: 630px; right: -11%; bottom: -78%; }
  .auth-main { min-height: auto; padding: 46px clamp(24px, 7vw, 58px) 22px; }
  .auth-main__inner { padding: 0; }
}

@media (max-width: 620px) {
  body { background: #fff; }
  .auth-brand { display: none; }
  .auth-main { min-height: 100svh; padding: 0 18px 18px; }
  .mobile-brand-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
  .mobile-brand-row .brand-crop { width: 132px; height: 36px; }
  .mobile-brand-row .brand-crop img { width: 164px; height: 82px; left: -13px; top: -23px; }
  .back-home { min-height: 44px; display: flex; align-items: center; gap: 6px; padding-inline: 8px; color: var(--muted); font-size: .68rem; font-weight: 750; }
  .back-home svg { width: 16px; height: 16px; }
  .auth-main__inner { margin: 0 auto; padding: 30px 0 20px; }
  .auth-card { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .auth-card__header { margin-bottom: 27px; }
  .auth-card h1 { font-size: clamp(2.05rem, 10vw, 2.8rem); }
  .form-grid { grid-template-columns: 1fr; }
  .field-group--wide { grid-column: auto; }
  .auth-main__footer { margin-top: auto; }
  .app-link { padding-inline: 8px; }
}

@media (max-width: 360px) {
  .auth-main { padding-inline: 14px; }
  .auth-card h1 { font-size: 2rem; }
  .auth-card__header > p:last-child { font-size: .78rem; }
  .input-shell input { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
