:root {
  --navy: #0a2540;
  --navy-deep: #07192c;
  --blue: #155da8;
  --gold: #f59e0b;
  --gold-deep: #d97706;
  --ink: #10243b;
  --muted: #66768a;
  --font-heading: "Outfit", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--ink);
  font-family: var(--font-body);
  background: #fbfcfe;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: radial-gradient(#c8d3e1 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}
.orb {
  position: fixed;
  border: 1px solid rgba(10, 37, 64, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.orb-one {
  width: 150px;
  height: 150px;
  top: 6vh;
  left: 4vw;
}
.orb-two {
  width: 180px;
  height: 180px;
  right: 7vw;
  top: 20vh;
}
.orb-three {
  width: 70px;
  height: 70px;
  right: 20vw;
  bottom: 17vh;
}
.auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 1fr);
  width: min(1010px, calc(100% - 40px));
  min-height: 590px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(10, 37, 64, 0.13);
  border-radius: 21px;
  box-shadow: 0 25px 55px rgba(10, 37, 64, 0.14);
  overflow: hidden;
  animation: arrive 0.65s ease both;
}
.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 50px;
  background: linear-gradient(145deg, #f5f8fc 0%, #edf3fa 100%);
}
.logo {
  width: min(270px, 100%);
  height: auto;
  margin-bottom: 70px;
  object-fit: contain;
  object-position: left center;
}
.brand-panel h1 {
  max-width: 410px;
  margin: 0 0 16px;
  color: var(--navy-deep);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.brand-panel p {
  max-width: 400px;
  margin: 0;
  color: #536579;
  font-size: 0.96rem;
  line-height: 1.75;
}
.accent-line {
  width: 56px;
  height: 4px;
  margin-top: 28px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
}
.form-panel {
  padding: 56px 50px;
  background: #fff;
}
.form-header {
  margin-bottom: 34px;
}
.form-header h2 {
  margin: 0 0 5px;
  color: #0c1520;
  font-family: var(--font-heading);
  font-size: 1.85rem;
  line-height: 1.15;
}
.form-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.form-view {
  display: none;
}
.form-view.active {
  display: block;
  animation: fade-in 0.3s ease both;
}
.field {
  margin-bottom: 17px;
}
.field label {
  display: block;
  margin-bottom: 7px;
  color: #1c2c3f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.signup-form .field label::after {
  content: " *";
  color: #dc2626;
}
.input-wrap {
  position: relative;
}
.input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 17px;
  height: 17px;
  color: #75869a;
  transform: translateY(-50%);
  pointer-events: none;
}
input,
select {
  width: 100%;
  height: 47px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd8e2;
  border-radius: 10px;
  font: inherit;
  font-size: 0.86rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310243b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  appearance: none;
}
.input-wrap input {
  padding-left: 44px;
}
input::placeholder {
  color: #9aa6b2;
}
input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 93, 168, 0.13);
  outline: none;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.phone-row {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 8px;
}
.phone-row select {
  padding: 0 34px 0 8px;
  background-position: right 10px center;
}
.state-autocomplete {
  position: relative;
}
.state-suggestions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  display: none;
  max-height: 190px;
  margin: 0;
  padding: 5px;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid #cfd8e2;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(10, 37, 64, 0.14);
}
.state-suggestions.is-open {
  display: block;
}
.state-suggestions button {
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-align: left;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.state-suggestions button:hover,
.state-suggestions button:focus-visible {
  color: var(--navy);
  background: #eef4fa;
  outline: none;
}
.password-wrap input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #718297;
  background: transparent;
  border: 0;
  outline: 0;
  appearance: none;
  cursor: pointer;
  transform: translateY(-50%);
}
.password-toggle:focus-visible {
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(21, 93, 168, 0.16);
}
.password-toggle svg {
  width: 17px;
}
.password-toggle .eye-slash {
  display: none;
}
.password-toggle.is-visible .eye-open {
  display: none;
}
.password-toggle.is-visible .eye-slash {
  display: block;
}
.submit-btn {
  width: 100%;
  height: 47px;
  margin-top: 7px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  border: 0;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(10, 37, 64, 0.18);
  font: 600 0.9rem var(--font-body);
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.submit-btn:hover:not(:disabled) {
  box-shadow: 0 11px 22px rgba(10, 37, 64, 0.26);
  transform: translateY(-2px);
}
.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.submit-btn .btn-text {
  display: inline-block;
}
.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.submit-btn.is-loading .btn-text {
  display: none;
}
.submit-btn.is-loading .spinner {
  display: block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.form-footer {
  margin: 24px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}
.form-footer button {
  padding: 0;
  color: var(--blue);
  background: none;
  border: 0;
  font: 600 inherit;
  cursor: pointer;
}
.form-footer button:hover {
  color: var(--gold-deep);
}
.home-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  margin-top: 22px;
  padding: 10px 16px;
  color: var(--navy);
  background: transparent;
  border: 1px solid #cfd8e2;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.brand-panel .home-button {
  width: fit-content;
  min-width: 150px;
  margin-top: 24px;
}
.home-button:hover {
  color: var(--blue);
  background: #f4f8fc;
  border-color: var(--blue);
}
.home-button svg {
  width: 16px;
  height: 16px;
}
.forgot {
  display: block;
  margin: -3px 0 20px;
  color: var(--blue);
  text-align: right;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
}
.notice {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--gold-deep);
  text-align: center;
  font-size: 0.78rem;
}
.required-note {
  margin: -3px 0 18px;
  color: var(--muted);
  font-size: 0.73rem;
}
.otp-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}
.otp-modal.is-open {
  visibility: visible;
  opacity: 1;
}
.otp-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(7, 25, 44, 0.52);
  backdrop-filter: blur(4px);
}
.otp-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 410px);
  padding: 34px 32px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(10, 37, 64, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(7, 25, 44, 0.28);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}
.otp-modal.is-open .otp-dialog {
  transform: translateY(0) scale(1);
}
.otp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  color: #718297;
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.otp-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: var(--blue);
  background: #edf4fc;
  border-radius: 50%;
  font-size: 1.35rem;
}
.otp-dialog h2 {
  margin: 0 0 8px;
  color: #0c1520;
  font: 700 1.5rem var(--font-heading);
}
.otp-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}
.otp-copy strong {
  color: var(--ink);
  font-weight: 700;
}
.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  margin: 23px 0 8px;
}
.otp-input {
  width: 100%;
  height: 58px;
  padding: 0;
  color: var(--navy);
  border: 2px solid #bfc9d4;
  border-radius: 7px;
  text-align: center;
  font: 600 1.35rem var(--font-heading);
}
.otp-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 93, 168, 0.13);
}
.otp-notice {
  min-height: 20px;
  margin: 7px 0 4px;
  color: #c2410c;
  font-size: 0.76rem;
}
.otp-notice.is-success {
  color: #15803d;
}
.otp-submit {
  margin-top: 4px;
}
.otp-resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  margin-top: 14px;
  color: #5f6872;
  font-size: 0.77rem;
}
.otp-resend-row button {
  padding: 0;
  color: var(--blue);
  background: transparent;
  border: 0;
  font: 600 inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.otp-resend-row button:disabled {
  color: #9aa6b2;
  cursor: not-allowed;
}
.otp-resend-row button .spinner {
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid #9aa6b2;
  border-top-color: var(--blue);
}
.otp-resend-row button.is-loading .btn-text {
  display: none;
}
.otp-resend-row button.is-loading .spinner {
  display: block;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 0;
}
.success-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  border-radius: 50%;
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  animation: scale-in 0.5s ease both;
}
.welcome-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  text-align: center;
  line-height: 1.6;
}
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  body {
    padding: 16px;
  }

  .auth-shell {
    width: min(760px, calc(100% - 8px));
  }

  .brand-panel,
  .form-panel {
    padding: 42px 30px;
  }
}

@media (max-width: 760px) {
  .orb {
    display: none;
  }

  .auth-shell {
    display: block;
    width: min(520px, calc(100% - 16px));
    margin: 0 auto;
  }

  .brand-panel {
    padding: 28px 24px 18px;
  }

  .logo {
    width: 200px;
    margin-bottom: 20px;
  }

  .brand-panel h1 {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
  }

  .brand-panel p,
  .accent-line {
    display: none;
  }

  .brand-panel .home-button {
    width: 100%;
    min-width: 0;
  }

  .form-panel {
    padding: 30px 24px 32px;
  }

  .form-header {
    margin-bottom: 20px;
  }
}

@media (max-width: 520px) {
  body {
    padding: 12px;
  }

  .phone-row,
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .phone-row {
    row-gap: 8px;
  }

  .submit-btn,
  .home-button {
    min-height: 46px;
  }

  .forgot {
    text-align: left;
  }

  .form-footer {
    margin-top: 18px;
  }
}

@media (max-width: 420px) {
  .brand-panel,
  .form-panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  .field label {
    letter-spacing: 0.06em;
  }

  .otp-dialog {
    padding: 30px 18px 23px;
  }

  .otp-inputs {
    gap: 6px;
  }

  .otp-input {
    height: 52px;
  }
}
