.auth-login-page {
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at 12% 12%, rgba(37, 99, 235, 0.14), transparent 30%),
    #0c0f14;
}

.auth-product-shell {
  width: min(1120px, 100%);
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #252c36;
  border-radius: 12px;
  background: #10141b;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.auth-story,
.auth-entry-card {
  min-width: 0;
  padding: clamp(32px, 5vw, 68px);
}

.auth-story {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #252c36;
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.12), transparent 44%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  font-size: 15px;
  font-weight: 850;
}

.auth-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-story-copy {
  margin: auto 0;
  padding: 72px 0;
}

.auth-story-copy h1 {
  max-width: 620px;
  margin-top: 10px;
  font-size: clamp(38px, 4.3vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.auth-story-copy > p:last-child {
  max-width: 560px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.75;
}

.auth-flow-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-flow-summary li {
  display: grid;
  gap: 8px;
  padding: 0 14px;
  border-left: 1px solid #2b3440;
}

.auth-flow-summary li:first-child {
  padding-left: 0;
  border-left: 0;
}

.auth-flow-summary span {
  color: #7699ff;
  font-size: 11px;
  font-weight: 900;
}

.auth-flow-summary strong {
  color: #dce3ef;
  font-size: 12px;
  line-height: 1.4;
}

.auth-entry-card {
  align-self: center;
}

.auth-preview-label {
  width: fit-content;
  margin-bottom: 30px;
  border: 1px solid rgba(240, 200, 117, 0.36);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 850;
}

.auth-entry-heading h2,
.auth-code-heading h2,
.auth-admin-heading h2 {
  margin-top: 7px;
  font-size: 25px;
  line-height: 1.2;
}

.auth-entry-heading > p:last-child,
.auth-code-heading p,
.auth-admin-heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 11px;
  margin-top: 28px;
}

.auth-form label {
  color: #c3cad6;
  font-size: 12px;
  font-weight: 850;
}

.auth-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #343d49;
  border-radius: 8px;
  padding: 0 14px;
  background: #0d1117;
  color: var(--ink);
  outline: none;
}

.auth-input::placeholder {
  color: #858e9c;
}

.auth-input:focus {
  border-color: #4f7df3;
  box-shadow: 0 0 0 3px rgba(79, 125, 243, 0.18);
}

.auth-input[aria-invalid="true"] {
  border-color: var(--red);
}

.auth-code-input {
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0.42em;
  text-align: center;
}

.auth-field-help,
.auth-phone-note {
  color: #858e9c;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
}

.auth-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.auth-status.is-error {
  color: var(--red);
}

.auth-status.is-success {
  color: var(--green);
}

.auth-primary-button,
.auth-secondary-button,
.auth-admin-toggle,
.auth-text-button,
.auth-human-button {
  border: 0;
  font: inherit;
}

.auth-primary-button,
.auth-secondary-button {
  min-height: 52px;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 900;
}

.auth-primary-button {
  background: #3266e8;
  color: #fff;
}

.auth-primary-button:hover:not(:disabled) {
  background: #3e72ee;
}

.auth-secondary-button {
  border: 1px solid #343d49;
  background: #171d26;
  color: #e9edf5;
}

.auth-primary-button:focus-visible,
.auth-secondary-button:focus-visible,
.auth-admin-toggle:focus-visible,
.auth-text-button:focus-visible,
.auth-human-button:focus-visible {
  outline: 3px solid rgba(79, 125, 243, 0.46);
  outline-offset: 3px;
}

.auth-primary-button:disabled,
.auth-secondary-button:disabled {
  cursor: wait;
  opacity: 0.52;
}

.auth-text-button {
  margin-bottom: 20px;
  padding: 0;
  background: transparent;
  color: #88a5ff;
  font-size: 12px;
  font-weight: 800;
}

.auth-human-check {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #343d49;
  border-radius: 8px;
  padding: 12px 13px;
  background: #0d1117;
}

.auth-human-check strong,
.auth-human-check small {
  display: block;
}

.auth-human-check strong {
  color: #dce3ef;
  font-size: 12px;
  font-weight: 850;
}

.auth-human-check small {
  max-width: 250px;
  margin-top: 4px;
  color: #858e9c;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.45;
}

.auth-human-check[data-state="checking"] {
  border-color: rgba(240, 200, 117, 0.44);
}

.auth-human-check[data-state="verified"] {
  border-color: rgba(112, 214, 159, 0.48);
  background: rgba(112, 214, 159, 0.055);
}

.auth-human-button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid #3b4654;
  border-radius: 7px;
  padding: 0 11px;
  background: #1a2230;
  color: #e9edf5;
  font-size: 11px;
  font-weight: 850;
}

.auth-human-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.auth-human-check[data-state="verified"] .auth-human-button {
  cursor: default;
}

.auth-human-status {
  margin-top: -5px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 30px 0 18px;
  color: #737d8b;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: #29313b;
  content: "";
}

.auth-admin-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #2d3641;
  border-radius: 8px;
  padding: 15px 16px;
  background: #121820;
  color: #e8ecf3;
  text-align: left;
}

.auth-admin-toggle strong,
.auth-admin-toggle small {
  display: block;
}

.auth-admin-toggle strong {
  font-size: 12px;
}

.auth-admin-toggle small {
  margin-top: 4px;
  color: #858e9c;
  font-size: 10px;
  font-weight: 650;
}

.auth-admin-toggle > span:last-child {
  color: #8ca8ff;
  font-size: 11px;
  font-weight: 800;
}

.auth-admin-panel {
  margin-top: 12px;
  border: 1px solid #2d3641;
  border-radius: 8px;
  padding: 18px;
  background: #0f141b;
}

.auth-admin-heading h2 {
  font-size: 15px;
}

.auth-phone-note {
  margin-top: 20px;
  text-align: center;
}

@media (max-width: 820px) {
  .auth-login-page {
    padding: 14px;
  }

  .auth-product-shell {
    min-height: calc(100vh - 28px);
    grid-template-columns: 1fr;
  }

  .auth-story,
  .auth-entry-card {
    padding: 28px;
  }

  .auth-story {
    border-right: 0;
    border-bottom: 1px solid #252c36;
  }

  .auth-story-copy {
    padding: 46px 0 32px;
  }

  .auth-story-copy h1 {
    max-width: 520px;
    font-size: clamp(34px, 10vw, 48px);
  }

  .auth-flow-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .auth-flow-summary li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .auth-entry-card {
    align-self: start;
  }
}

@media (max-width: 460px) {
  .auth-login-page {
    padding: 0;
  }

  .auth-product-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .auth-story {
    padding: 24px 20px;
  }

  .auth-story-copy {
    padding: 34px 0 12px;
  }

  .auth-story-copy h1 {
    font-size: 34px;
  }

  .auth-story-copy > p:last-child,
  .auth-flow-summary {
    display: none;
  }

  .auth-entry-card {
    padding: 28px 20px 36px;
  }

  .auth-human-check {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

/* Managed-challenge (Turnstile) host + hidden helper */
.auth-turnstile {
  margin-top: 12px;
  min-height: 0;
}
.auth-turnstile:not([hidden]) {
  min-height: 66px;
}
[hidden] { display: none !important; }
