:root {
  color-scheme: light;
  --navy: #0b1739;
  --navy-soft: #142653;
  --accent: #315cfd;
  --accent-dark: #2448d8;
  --ink: #172033;
  --muted: #697386;
  --line: #d9dfeb;
  --danger: #b42318;
  --danger-bg: #fff1f0;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background: #f5f7fb;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(36px, 6vw, 76px);
  background:
    radial-gradient(circle at 10% 92%, rgba(65, 105, 225, .35), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(29, 178, 163, .18), transparent 32%),
    linear-gradient(145deg, var(--navy), var(--navy-soft));
  color: #fff;
}

.brand-panel::after {
  position: absolute;
  right: -150px;
  bottom: 12%;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 120px rgba(255,255,255,.018);
  content: "";
}

.brand-content, .brand-footer { position: relative; z-index: 1; }

.brand-mark {
  display: flex;
  align-items: end;
  gap: 5px;
  width: 46px;
  height: 46px;
  margin-bottom: 54px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 13px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
}

.brand-mark span { width: 7px; border-radius: 5px; background: #fff; }
.brand-mark span:nth-child(1) { height: 12px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 20px; opacity: .75; }
.brand-mark span:nth-child(3) { height: 28px; }

.eyebrow {
  margin: 0 0 12px;
  color: #8090ad;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand-panel .eyebrow { color: #a9b9dc; }
.brand-panel h1 { margin: 0; font-size: clamp(42px, 5vw, 68px); line-height: 1; letter-spacing: -.045em; }
.brand-copy { max-width: 480px; margin: 24px 0 0; color: #cbd5eb; font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }
.brand-footer { margin: 0; color: #91a2c8; font-size: 13px; }

.form-panel { display: grid; place-items: center; padding: clamp(28px, 7vw, 96px); }
.login-card { width: min(100%, 430px); }
.mobile-brand { display: none; }
.login-card h2 { margin: 0; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; letter-spacing: -.035em; }
.intro { margin: 13px 0 34px; color: var(--muted); font-size: 15px; line-height: 1.55; }

.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(49,92,253,.11); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.password-field { position: relative; }
.password-field input { padding-right: 50px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #667085;
  cursor: pointer;
}
.password-toggle:hover { background: #f0f3f9; }
.password-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.password-toggle .eye-closed, .password-toggle.showing .eye-open { display: none; }
.password-toggle.showing .eye-closed { display: block; }

.field-error { display: none; margin: 6px 0 0; color: var(--danger); font-size: 12px; }
.field-error.visible { display: block; }
.form-alert {
  display: none;
  margin: 4px 0 16px;
  padding: 11px 12px;
  border: 1px solid #f3b7b2;
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
}
.form-alert.visible { display: block; }
.hidden { display: none !important; }

.form-link-row { display: flex; justify-content: flex-end; margin: -7px 0 18px; }
.form-link-row a, .auth-back-link a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.form-link-row a:hover, .auth-back-link a:hover { text-decoration: underline; }
.auth-back-link { margin-top: 20px; text-align: center; }
.field-help { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.verification-code { font-size: 22px !important; font-weight: 750 !important; letter-spacing: .28em; text-align: center; }
.success-note {
  margin: 0 0 20px;
  padding: 11px 12px;
  border: 1px solid #a6e3c2;
  border-radius: 8px;
  background: #ecfdf3;
  color: #067647;
  font-size: 13px;
  line-height: 1.45;
}
.text-button {
  display: block;
  margin: 16px auto 0;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.text-button:hover { text-decoration: underline; }
.reset-success { text-align: center; }
.reset-success h2 { margin-top: 8px; }
.reset-success p:not(.eyebrow) { margin: 16px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.success-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #dcfae6;
  color: #079455;
  font-size: 30px;
  font-weight: 800;
}
.button-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }

.login-button {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 9px 24px rgba(49,92,253,.22);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.login-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--accent-dark); box-shadow: 0 12px 28px rgba(49,92,253,.28); }
.login-button:disabled { cursor: wait; opacity: .78; }
.button-loading { display: none; align-items: center; justify-content: center; gap: 9px; }
.login-button.loading .button-label { display: none; }
.login-button.loading .button-loading { display: flex; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.42); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.secure-note { display: flex; justify-content: center; gap: 7px; margin-top: 22px; color: #7b8495; font-size: 12px; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-panel { min-height: 100vh; padding: 38px 22px; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 50px; color: var(--navy); font-size: 17px; font-weight: 800; }
  .mobile-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 12px; letter-spacing: .04em; }
}

@media (max-width: 430px) {
  .form-panel { align-items: start; padding-top: 26px; }
  .mobile-brand { margin-bottom: 42px; }
  .login-card h2 { font-size: 30px; }
}

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