:root {
  --mhs-auth-navy-950: #06172f;
  --mhs-auth-navy-900: #071f45;
  --mhs-auth-navy-800: #0b2d5c;
  --mhs-auth-accent: #d9a520;
  --mhs-auth-accent-light: #f1cc68;
  --mhs-auth-accent-rgb: 217, 165, 32;
  --mhs-auth-ink: #172033;
  --mhs-auth-muted: #667085;
  --mhs-auth-border: #d8e0eb;
  --mhs-auth-danger: #b42318;
  --mhs-auth-danger-bg: #fef3f2;
  --mhs-auth-success: #067647;
  --mhs-auth-success-bg: #ecfdf3;
}

* {
  box-sizing: border-box;
}

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

body.mhs-auth-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 40px 24px;
  overflow-x: hidden;
  color: var(--mhs-auth-ink);
  background:
    linear-gradient(115deg, rgba(4, 19, 43, 0.9), rgba(7, 31, 69, 0.6)),
    var(--mhs-auth-background) center / cover no-repeat fixed;
  font-family: "Inter", "Segoe UI", sans-serif;
}

body.mhs-auth-page.is-member {
  --mhs-auth-accent: #ef7d22;
  --mhs-auth-accent-light: #ffb65c;
  --mhs-auth-accent-rgb: 239, 125, 34;
}

body.mhs-auth-page::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(var(--mhs-auth-accent-rgb), 0.18), transparent 34%),
    linear-gradient(180deg, rgba(4, 15, 34, 0.06), rgba(4, 15, 34, 0.42));
}

.mhs-auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(390px, 1.08fr);
  width: min(980px, 100%);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(2, 13, 32, 0.4);
}

.mhs-auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 48px 44px 40px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(6, 23, 47, 0.97), rgba(11, 45, 92, 0.94)),
    var(--mhs-auth-background) center / cover no-repeat;
}

.mhs-auth-brand-panel::after {
  position: absolute;
  right: -120px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(var(--mhs-auth-accent-rgb), 0.24);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 42px rgba(var(--mhs-auth-accent-rgb), 0.06),
    0 0 0 84px rgba(var(--mhs-auth-accent-rgb), 0.035);
}

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

.mhs-auth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.mhs-auth-brand-logo {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.2));
}

.mhs-auth-brand-name {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mhs-auth-brand-name span {
  display: block;
  margin-top: 4px;
  color: var(--mhs-auth-accent-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.mhs-auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #9a7415;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mhs-auth-brand-panel .mhs-auth-eyebrow {
  color: var(--mhs-auth-accent-light);
}

.mhs-auth-brand-panel h1 {
  max-width: 360px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.mhs-auth-brand-description {
  max-width: 370px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.94rem;
  line-height: 1.75;
}

.mhs-auth-points {
  display: grid;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.mhs-auth-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.84rem;
  font-weight: 500;
}

.mhs-auth-points i {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid rgba(var(--mhs-auth-accent-rgb), 0.38);
  border-radius: 50%;
  color: var(--mhs-auth-accent-light);
  font-size: 0.7rem;
}

.mhs-auth-brand-footer {
  padding-top: 32px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.73rem;
  line-height: 1.6;
}

.mhs-auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 48px 64px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--mhs-auth-accent-rgb), 0.08), transparent 30%),
    #fff;
}

.mhs-auth-content {
  width: 100%;
  max-width: 410px;
}

.mhs-auth-mobile-brand {
  display: none;
}

.mhs-auth-header {
  margin-bottom: 26px;
}

.mhs-auth-header h2 {
  margin: 0 0 10px;
  color: var(--mhs-auth-navy-950);
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.mhs-auth-header p {
  margin: 0;
  color: var(--mhs-auth-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.mhs-auth-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.mhs-auth-step {
  position: relative;
  padding-top: 13px;
  color: #98a2b3;
  font-size: 0.67rem;
  font-weight: 650;
  text-align: center;
}

.mhs-auth-step::before {
  position: absolute;
  top: 0;
  right: 3px;
  left: 3px;
  height: 4px;
  border-radius: 999px;
  content: "";
  background: #e4e7ec;
}

.mhs-auth-step.is-active,
.mhs-auth-step.is-complete {
  color: var(--mhs-auth-navy-800);
}

.mhs-auth-step.is-active::before,
.mhs-auth-step.is-complete::before {
  background: var(--mhs-auth-accent);
}

.mhs-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.55;
}

.mhs-auth-alert.is-error {
  border-color: #fecdca;
  color: var(--mhs-auth-danger);
  background: var(--mhs-auth-danger-bg);
}

.mhs-auth-alert.is-success {
  border-color: #abefc6;
  color: var(--mhs-auth-success);
  background: var(--mhs-auth-success-bg);
}

.mhs-auth-alert i {
  margin-top: 3px;
}

.mhs-auth-field {
  margin-bottom: 20px;
}

.mhs-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.mhs-auth-label {
  margin: 0;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 650;
}

.mhs-auth-label-note {
  color: #98a2b3;
  font-size: 0.7rem;
  font-weight: 500;
}

.mhs-auth-input-wrap {
  position: relative;
}

.mhs-auth-input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 1;
  color: #7c899d;
  font-size: 0.88rem;
  pointer-events: none;
  transform: translateY(-50%);
}

.mhs-auth-control {
  width: 100%;
  min-height: 50px;
  padding: 12px 46px 12px 43px;
  border: 1px solid var(--mhs-auth-border);
  border-radius: 10px;
  outline: none;
  color: var(--mhs-auth-ink);
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.mhs-auth-control.is-otp {
  padding-right: 20px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.mhs-auth-control::placeholder {
  color: #98a2b3;
  font-weight: 400;
  letter-spacing: normal;
}

.mhs-auth-control:focus {
  border-color: var(--mhs-auth-accent);
  box-shadow: 0 0 0 4px rgba(var(--mhs-auth-accent-rgb), 0.14);
}

.mhs-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #667085;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.mhs-auth-password-toggle:hover,
.mhs-auth-password-toggle:focus-visible {
  color: var(--mhs-auth-navy-800);
  background: #f1f5f9;
  outline: none;
}

.mhs-auth-primary,
.mhs-auth-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.mhs-auth-primary {
  width: 100%;
  border: 1px solid var(--mhs-auth-navy-900);
  color: #fff;
  background: var(--mhs-auth-navy-900);
  box-shadow: 0 10px 24px rgba(7, 31, 69, 0.18);
}

.mhs-auth-primary:hover,
.mhs-auth-primary:focus-visible {
  color: #fff;
  background: var(--mhs-auth-navy-800);
  box-shadow: 0 12px 28px rgba(7, 31, 69, 0.25);
  outline: 3px solid rgba(var(--mhs-auth-accent-rgb), 0.3);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.mhs-auth-primary:disabled,
.mhs-auth-secondary:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.mhs-auth-secondary {
  border: 1px solid var(--mhs-auth-border);
  color: var(--mhs-auth-navy-800);
  background: #fff;
}

.mhs-auth-secondary:hover,
.mhs-auth-secondary:focus-visible {
  border-color: #b8c4d4;
  color: var(--mhs-auth-navy-950);
  background: #f8fafc;
  outline: none;
}

.mhs-auth-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 10px;
  margin-top: 4px;
}

.mhs-auth-actions .mhs-auth-primary,
.mhs-auth-actions .mhs-auth-secondary {
  width: 100%;
}

.mhs-auth-resend {
  margin: 16px 0 0;
  color: var(--mhs-auth-muted);
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: center;
}

.mhs-auth-text-button {
  padding: 0;
  border: 0;
  color: var(--mhs-auth-navy-800);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.mhs-auth-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #eaecf0;
  color: #7b8494;
  font-size: 0.72rem;
  line-height: 1.6;
}

.mhs-auth-notice i {
  margin-top: 3px;
  color: #9a7415;
}

.mhs-auth-portal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 17px 0 0;
  font-size: 0.75rem;
}

.mhs-auth-portal-links a {
  color: var(--mhs-auth-navy-800);
  font-weight: 650;
  text-decoration: none;
}

.mhs-auth-portal-links a:hover,
.mhs-auth-portal-links a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 900px) {
  body.mhs-auth-page {
    align-items: flex-start;
    padding: 24px;
  }

  .mhs-auth-shell {
    grid-template-columns: 1fr;
    width: min(560px, 100%);
    min-height: 0;
  }

  .mhs-auth-brand-panel {
    display: none;
  }

  .mhs-auth-form-panel {
    padding: 42px;
  }

  .mhs-auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
  }

  .mhs-auth-mobile-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
  }

  .mhs-auth-mobile-brand strong,
  .mhs-auth-mobile-brand span {
    display: block;
  }

  .mhs-auth-mobile-brand strong {
    color: var(--mhs-auth-navy-950);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .mhs-auth-mobile-brand span {
    margin-top: 3px;
    color: #9a7415;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
}

@media (max-width: 520px) {
  body.mhs-auth-page {
    padding: 0;
    background: #fff;
  }

  body.mhs-auth-page::before {
    display: none;
  }

  .mhs-auth-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mhs-auth-form-panel {
    align-items: flex-start;
    padding: 30px 22px;
  }

  .mhs-auth-mobile-brand {
    margin-bottom: 28px;
  }

  .mhs-auth-header h2 {
    font-size: 1.55rem;
  }

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

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