.auth-page {
  --auth-navy: #082b4f;
  --auth-navy-deep: #051f38;
  --auth-teal: #087f8a;
  --auth-teal-bright: #0cacba;
  --auth-seafoam: #eaf6f6;
  --auth-canvas: #f3f8f8;
  --auth-ink: #17313a;
  --auth-muted: #62777d;
  --auth-border: #d7e5e7;
  min-height: 100%;
  margin: 0;
  color: var(--auth-ink);
  background: var(--auth-canvas);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
  box-sizing: border-box;
}

.auth-page button,
.auth-page input,
.auth-page select {
  font: inherit;
}

.auth-page a,
.auth-page button {
  -webkit-tap-highlight-color: transparent;
}

.auth-page :focus-visible {
  outline: 3px solid rgba(12, 172, 186, .36);
  outline-offset: 3px;
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(520px, 52%) minmax(420px, 48%);
  background: #fff;
}

.auth-brand-panel {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background-image:
    linear-gradient(180deg, rgba(5, 31, 56, .03) 10%, rgba(5, 31, 56, .16) 50%, rgba(5, 31, 56, .78) 100%),
    url("../img/backgrounds/auth-hero.jpeg");
  background-position: center, 10% center;
  background-repeat: no-repeat;
  background-size: cover;
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, rgba(8, 43, 79, .28), transparent 54%);
}

.auth-brand-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 34px 42px;
}

.auth-brand-logo {
  display: inline-flex;
  width: auto;
  min-height: 37px;
  align-items: flex-end;
  gap: 5px;
  color: #fff;
  text-decoration: none;
}

.auth-brand-logo img {
  display: block;
  width: 160px;
  height: auto;
  filter: drop-shadow(0 2px 16px rgba(5, 31, 56, .28));
}

.auth-brand-logo span {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, .9);
  font-family: "Outfit", "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(5, 31, 56, .28);
}

.auth-brand-logo:hover {
  color: #fff;
  text-decoration: none;
}

.auth-route-line {
  position: absolute;
  right: -42px;
  bottom: 138px;
  width: min(72%, 620px);
  opacity: .78;
  filter: drop-shadow(0 2px 8px rgba(5, 31, 56, .16));
}

.auth-brand-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 650px;
  padding: 70px 48px 48px;
}

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.auth-eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: #7ee5eb;
}

.auth-brand-copy h2 {
  max-width: 570px;
  margin: 0 0 20px;
  color: #fff;
  font-family: "Outfit", "Roboto", sans-serif;
  font-size: clamp(36px, min(4.2vw, 7vh), 68px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -2.7px;
  text-wrap: balance;
}

.auth-brand-copy h2 span {
  color: #7ee5eb;
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  line-height: 1.5;
}

.auth-benefits li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-benefits svg {
  flex: 0 0 auto;
}

.auth-form-panel {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-column: 1;
  grid-row: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 36px clamp(34px, 5vw, 86px);
  background:
    radial-gradient(circle at 88% 8%, rgba(12, 172, 186, .08), transparent 26%),
    #fff;
}

.auth-form-wrap {
  min-width: 0;
  max-width: 100%;
  width: min(100%, 520px);
  margin: auto;
  animation: auth-enter .42s cubic-bezier(.2, .7, .2, 1) both;
}

.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 46px;
}

.auth-back-link,
.auth-language-badge {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.auth-back-link:hover {
  color: var(--auth-navy);
  text-decoration: none;
}

.auth-language-badge {
  min-width: 44px;
  padding: 0 12px;
  border: 1px solid var(--auth-border);
  border-radius: 999px;
  background: #fff;
}

.auth-heading {
  margin: 0 0 8px;
  color: var(--auth-navy);
  font-family: "Outfit", "Roboto", sans-serif;
  font-size: clamp(32px, 3.1vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.35px;
}

.auth-intro {
  margin: 0 0 30px;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.65;
}

.auth-account-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 26px;
  padding: 4px;
  border: 1px solid var(--auth-border);
  border-radius: 13px;
  background: var(--auth-canvas);
  list-style: none;
}

.auth-account-switch .nav-item {
  min-width: 0;
}

.auth-account-switch .nav-link {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  color: var(--auth-muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.auth-account-switch .nav-link.active,
.auth-account-switch .show > .nav-link {
  color: var(--auth-navy);
  background: #fff;
  box-shadow: 0 5px 18px rgba(8, 43, 79, .08);
}

.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}

.auth-field {
  min-width: 0;
}

.auth-field--full,
.auth-form-actions,
.auth-agreement,
.auth-section-divider {
  grid-column: 1 / -1;
}

.auth-field label {
  display: block;
  margin: 0 0 8px;
  color: var(--auth-ink);
  font-size: 13px;
  font-weight: 700;
}

.auth-required {
  color: var(--auth-teal);
}

.auth-input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-page .auth-field .form-control,
.auth-page .auth-field select {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid #bfd0d3;
  border-radius: 12px;
  outline: 0;
  color: var(--auth-ink);
  background: #fff;
  box-shadow: none;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.auth-page .auth-field .form-control::placeholder {
  color: #8da0a5;
  opacity: 1;
}

.auth-page .auth-field .form-control:hover,
.auth-page .auth-field select:hover {
  border-color: #8ea9ae;
}

.auth-page .auth-field .form-control:focus,
.auth-page .auth-field select:focus {
  border-color: var(--auth-teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 138, .15);
}

.auth-page .auth-password-input {
  padding-right: 54px;
}

.auth-page .auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--auth-muted);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-page .auth-password-toggle:hover {
  color: var(--auth-navy);
  background: var(--auth-seafoam);
}

.auth-phone-row {
  display: grid;
  grid-template-columns: minmax(118px, .38fr) minmax(0, 1fr);
  gap: 10px;
}

.auth-field-help {
  margin: 7px 0 0;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-options {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.auth-quiet-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--auth-teal);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.auth-quiet-link:hover {
  color: var(--auth-navy);
  text-decoration: underline;
}

.auth-agreement {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 4px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-agreement .form-check-input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border-color: #9eb4b8;
  accent-color: var(--auth-teal);
}

.auth-page .auth-primary-button {
  width: 100%;
  min-height: 54px;
  margin-top: 2px;
  padding: 14px 22px;
  border: 1px solid var(--auth-teal);
  border-radius: 12px;
  color: #fff;
  background: var(--auth-teal);
  box-shadow: 0 12px 26px rgba(8, 127, 138, .20);
  font-family: "Outfit", "Roboto", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .15px;
  text-transform: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.auth-page .auth-primary-button:hover {
  color: #fff;
  background: #006c78;
  border-color: #006c78;
  box-shadow: 0 15px 32px rgba(8, 127, 138, .26);
  transform: translateY(-1px);
}

.auth-page .auth-primary-button:active {
  transform: translateY(0);
}

.auth-page .auth-primary-button:disabled {
  cursor: wait;
  opacity: .75;
  transform: none;
}

.auth-switch-copy {
  margin: 24px 0 0;
  color: var(--auth-muted);
  text-align: center;
  font-size: 13px;
}

.auth-switch-copy a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  color: var(--auth-teal);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch-copy a:hover {
  color: var(--auth-navy);
  text-decoration: underline;
}

.auth-recaptcha-note {
  max-width: 440px;
  margin: 28px auto 0;
  color: #52686e;
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
}

.auth-recaptcha-note a,
.auth-agreement a {
  color: var(--auth-teal);
}

.auth-notice {
  grid-column: 1 / -1;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid #cbe2e4;
  border-radius: 12px;
  color: var(--auth-muted);
  background: #f3fafa;
  font-size: 13px;
  line-height: 1.55;
}

.auth-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 -1px;
  color: var(--auth-navy);
  font-family: "Outfit", "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.auth-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.auth-page .select2-container {
  width: 100% !important;
}

.auth-page .select2-container--default .select2-selection--single {
  min-height: 52px;
  border: 1px solid #bfd0d3;
  border-radius: 12px;
  background: #fff;
}

.auth-page .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 11px 36px 11px 14px;
  color: var(--auth-ink);
  font-size: 15px;
  line-height: 28px;
}

.auth-page .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 13px;
  right: 8px;
}

.auth-page .select2-container--default.select2-container--focus .select2-selection--single,
.auth-page .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--auth-teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 138, .15);
}

@keyframes auth-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .auth-shell {
    grid-template-columns: minmax(500px, 58%) minmax(340px, 42%);
  }

  .auth-brand-top {
    padding: 28px 30px;
  }

  .auth-brand-copy {
    padding: 62px 32px 38px;
  }

  .auth-benefits {
    display: grid;
  }
}

@media (min-width: 1600px) {
  .auth-shell {
    grid-template-columns: clamp(680px, 44vw, 960px) minmax(0, 1fr);
  }

  .auth-brand-panel {
    background-position: center, center 18%;
  }

  .auth-form-panel {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
    padding-inline: clamp(64px, 6vw, 112px);
  }
}

@media (max-width: 860px) {
  .auth-shell {
    display: block;
  }

  .auth-brand-panel {
    position: relative;
    height: auto;
    min-height: clamp(240px, 36vh, 320px);
    background-position: center, center 32%;
  }

  .auth-brand-top {
    padding: 22px 24px;
  }

  .auth-route-line {
    right: -20px;
    bottom: 44px;
    width: 52%;
  }

  .auth-brand-copy {
    padding: 42px 24px 26px;
  }

  .auth-brand-copy h2 {
    max-width: 430px;
    margin-bottom: 0;
    font-size: 40px;
    letter-spacing: -1.5px;
  }

  .auth-eyebrow,
  .auth-benefits {
    display: none;
  }

  .auth-form-panel {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    place-items: start center;
    padding: 34px 24px 48px;
  }

  .auth-form-meta {
    margin-bottom: 34px;
  }
}

@media (max-width: 640px) {
  .auth-brand-top {
    display: none;
  }

  .auth-brand-panel {
    min-height: clamp(250px, 32vh, 300px);
    background-image:
      linear-gradient(180deg, rgba(5, 31, 56, .02) 10%, rgba(5, 31, 56, .10) 55%, rgba(5, 31, 56, .62) 100%),
      url("../img/backgrounds/auth-hero.jpeg");
    background-position: center, clamp(20px, 5vw, 30px) 25%;
    background-repeat: no-repeat;
    /* Preserve the mobile portrait crop while covering wider phone screens. */
    background-size: cover, auto max(230%, 116vw);
  }

  .auth-brand-panel::before {
    background: linear-gradient(90deg, rgba(5, 31, 56, .62) 0%, rgba(5, 31, 56, .28) 50%, transparent 78%);
  }

  .auth-brand-copy {
    top: clamp(70px, 9vh, 90px);
    right: auto;
    bottom: auto;
    width: min(72%, 290px);
    padding: 0 18px;
  }

  .auth-brand-copy h2 {
    max-width: none;
    font-size: clamp(30px, 6.6vw, 34px);
    line-height: .96;
    letter-spacing: -1.4px;
    text-shadow: 0 2px 16px rgba(5, 31, 56, .26);
  }

  .auth-route-line {
    display: none;
  }
}

@media (max-width: 560px) {
  .auth-brand-panel {
    min-height: clamp(250px, 32vh, 300px);
  }

  .auth-brand-copy {
    width: min(72%, 290px);
    padding: 0 18px;
  }

  .auth-brand-copy h2 {
    max-width: none;
    font-size: clamp(29px, 8.2vw, 33px);
  }

  .auth-form-panel {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
    padding: 28px 18px 42px;
  }

  .auth-form-meta {
    margin-bottom: 28px;
  }

  .auth-heading {
    font-size: 31px;
  }

  .auth-form-grid {
    grid-template-columns: 1fr;
  }

  .auth-field--full,
  .auth-form-actions,
  .auth-agreement,
  .auth-section-divider {
    grid-column: 1;
  }

  .auth-phone-row {
    grid-template-columns: 118px minmax(0, 1fr);
  }
}

@media (max-width: 360px) {
  .auth-brand-copy {
    top: 60px;
  }

  .auth-form-panel {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
    padding-inline: 14px;
  }

  .auth-phone-row {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 8px;
  }
}

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

/* Language selection stays on the same account flow. */
.auth-language-picker { position: relative; flex: none; }
.auth-language-picker summary { display:flex; align-items:center; gap:6px; list-style:none; cursor:pointer; min-height:44px; padding:8px 12px; border:1px solid var(--auth-line, #d7e5e7); border-radius:8px; font-size:14px; color:var(--auth-navy); }
.auth-language-picker summary::-webkit-details-marker { display:none; }
.auth-language-picker nav { height:auto; position:absolute; inset-inline-end:0; top:calc(100% + 8px); min-width:160px; padding:6px; background:#fff; border:1px solid #d7e5e7; border-radius:8px; box-shadow:0 8px 24px #123e491a; z-index:5; }
.auth-language-picker a { display:flex; align-items:center; min-height:44px; padding:8px 12px; color:var(--auth-navy); text-decoration:none; }
.auth-language-picker a:hover, .auth-language-picker a[aria-current] { background:#eaf5f5; }
.auth-language-picker :focus-visible { outline:3px solid #027581; outline-offset:3px; }
.auth-phone-row { grid-template-columns:minmax(130px, .85fr) minmax(0, 1.4fr); }
@media(max-width:360px) { .auth-phone-row { grid-template-columns:minmax(0,1fr); } }
