/* Theme tokens come from shell global.css via html[data-theme]. */

* {
  box-sizing: border-box;
}

.auth-mfe {
  min-height: 100%;
}

.auth-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 28px 16px 38px;
  background: #0a0a0a;
}

.auth-surface {
  width: min(980px, 100%);
  margin: 0 auto;
  min-height: min(620px, calc(100dvh - 36px));
  border-radius: 22px;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) 1.4fr;
  border: 1px solid rgba(212,160,23,0.2);
  box-shadow: var(--shadow-strong);
  background: rgba(20,20,20,0.96);
  backdrop-filter: blur(16px);
}

.auth-surface--single {
  width: min(720px, 100%);
  min-height: auto;
  overflow: visible;
  grid-template-columns: 1fr;
  background: #141414;
  border: 1px solid rgba(212,160,23,0.2);
}
.auth-panel {
  background: #141414;
  padding: clamp(22px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: visible;
  border-radius: 22px;
}

.auth-badge {
  width: fit-content;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--theme-accent);
  background: rgba(212,160,23,0.12);
  padding: 8px 12px;
  border-radius: 999px;
}

.auth-back-btn {
  width: fit-content;
  border: 1px solid rgba(212,160,23,0.3);
  background: #1c1c1c;
  color: var(--theme-accent);
  border-radius: 999px;
  min-height: 38px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(212,160,23,0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.auth-back-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(212,160,23,0.18);
}

.auth-back-btn--status {
  margin: 0 auto 12px;
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.25rem);
  line-height: 1.1;
  color: var(--text-strong);
}

.auth-panel p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-form--account {
  gap: 12px;
}

.auth-form--business {
  gap: 12px;
}

.auth-section-label {
  margin: 2px 0 2px;
  font-size: 0.73rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--theme-accent);
  font-weight: 800;
}

.auth-plan-badge {
  margin: 0;
  border: 1px solid rgba(212,160,23,0.45);
  background: rgba(212,160,23,0.12);
  color: var(--theme-accent);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
}

.auth-request-note {
  margin: 0;
  border: 1px solid rgba(212,160,23,0.2);
  background: rgba(212,160,23,0.06);
  color: var(--theme-accent);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.auth-request-meta {
  border: 1px solid rgba(212,160,23,0.2);
  background: #1c1c1c;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}

.auth-request-meta h3 {
  margin: 0;
  font-size: 0.84rem;
  color: var(--theme-accent);
}

.auth-request-meta ul {
  margin: 0.45rem 0 0;
  padding-left: 1.05rem;
  color: #a3a3a3;
  display: grid;
  gap: 0.34rem;
  font-size: 0.82rem;
}

.auth-request-meta li {
  line-height: 1.3;
}

.auth-request-meta strong {
  color: #f5f5f5;
}
.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--theme-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-field input,
.auth-field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(212,160,23,0.3);
  border-radius: 999px;
  background: #1c1c1c;
  color: #f5f5f5;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: 2px solid rgba(212,160,23,0.25);
  border-color: var(--theme-accent);
}

.auth-submit {
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--theme-accent);
  color: #000;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-submit[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
  overflow: visible;
}

.auth-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 calc(50% - 8px);
  min-width: 0;
  min-height: 34px;
  color: var(--theme-accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.8rem;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  border: 1px solid rgba(212,160,23,0.3);
  background: #1c1c1c;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
}

.auth-actions a:nth-child(3) {
  flex-basis: 100%;
}

.auth-actions a:hover {
  text-decoration: underline;
}

.auth-account-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.auth-account-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(212,160,23,0.3);
  background: #1c1c1c;
  color: var(--theme-accent);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  padding: 0.28rem 0.6rem;
}

.auth-account-links a:last-child {
  grid-column: 1 / -1;
}

.auth-account-links--single {
  grid-template-columns: 1fr;
}

.auth-account-links--single a:last-child {
  grid-column: auto;
}

.auth-account-links a:hover {
  background: #242424;
}

.auth-form--login {
  gap: 12px;
}

.auth-helper {
  margin-top: 2px;
  border: 1px solid rgba(212,160,23,0.15);
  border-radius: 14px;
  background: #1a1a1a;
  padding: 0.8rem;
  display: grid;
  gap: 0.65rem;
}

.auth-helper__title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--theme-accent);
}

.auth-helper__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #a3a3a3;
}

.auth-helper__support {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #a3a3a3;
}

.auth-helper__support a {
  color: var(--theme-accent);
  font-weight: 700;
  text-decoration: none;
}

.auth-helper__support a:hover {
  text-decoration: underline;
}

.auth-hero {
  position: relative;
  isolation: isolate;
  background: #0a0a0a;
  border-left: 1px solid rgba(212,160,23,0.15);
  color: #f5f5f5;
  padding: clamp(28px, 4vw, 46px);
  display: flex;
  align-items: end;
}

.auth-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 15%, rgba(212,160,23,0.18), transparent 38%),
    radial-gradient(circle at 30% 70%, rgba(212,160,23,0.08), transparent 40%);
  opacity: 1;
  z-index: -3;
}

.auth-hero__curve {
  position: absolute;
  width: 120%;
  height: 56%;
  bottom: 14%;
  border-radius: 56% 44% 55% 45% / 56% 44% 56% 44%;
  background: rgba(212,160,23,0.04);
  filter: blur(2px);
  z-index: -2;
}

.auth-hero__curve--soft {
  width: 132%;
  height: 62%;
  left: -7%;
  bottom: -18%;
  border-radius: 54% 46% 46% 54% / 52% 48% 52% 48%;
  background: rgba(212,160,23,0.03);
  z-index: -1;
}

.auth-hero__content {
  margin-left: auto;
  max-width: 380px;
  text-align: right;
}

.auth-hero__content small {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.auth-hero__content h2 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4.1vw, 3.4rem);
  line-height: 1;
}

.auth-hero__content p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.88;
}

.auth-status {
  width: min(460px, 92vw);
  margin: 12vh auto;
  padding: 28px;
  background: #141414;
  border-radius: 18px;
  border: 1px solid rgba(212,160,23,0.2);
  box-shadow: var(--shadow-soft);
  text-align: center;
  color: var(--theme-accent);
}

span[role="alert"] {
  display: block;
  margin-top: 2px;
  color: #d21f4b;
  font-size: 0.82rem;
  line-height: 1.2;
}

@media (max-width: 920px) {
  .auth-page {
    padding-bottom: 28px;
  }

  .auth-surface {
    grid-template-columns: 1fr;
    min-height: auto;
    overflow: visible;
  }

  .auth-hero {
    display: none;
  }

  .auth-hero__content {
    text-align: left;
    margin-left: 0;
  }

  .auth-panel {
    overflow: visible;
  }
}

@media (min-width: 760px) {
  .auth-form--account {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }

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

  .auth-form--account .auth-submit,
  .auth-form--account .auth-account-links {
    grid-column: 1 / -1;
  }

  .auth-form--business {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }

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

  .auth-form--business .auth-request-note,
  .auth-form--business .auth-section-label,
  .auth-form--business .auth-submit,
  .auth-form--business .auth-request-meta,
  .auth-form--business .auth-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .auth-page {
    padding: 8px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 132px);
  }

  .auth-panel {
    padding: 16px;
    gap: 14px;
  }

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

  .auth-form--account .auth-field,
  .auth-form--business .auth-field,
  .auth-form--account .auth-submit,
  .auth-form--business .auth-submit,
  .auth-form--account .auth-account-links,
  .auth-form--business .auth-request-meta,
  .auth-form--business .auth-actions {
    grid-column: auto;
  }

  .auth-actions {
    flex-direction: row;
    align-items: center;
  }

  .auth-actions a {
    flex-basis: 100%;
  }

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

  .auth-account-links a:last-child {
    grid-column: auto;
  }

  .auth-panel h1 {
    font-size: 1.55rem;
  }

  .auth-request-meta {
    margin-bottom: 8px;
  }
}

/* ─── Light theme overrides (data-theme set on <html> by shell) ───────────── */
/* Hardcoded background overrides — auth MFE */
[data-theme="light"] .auth-page {
  background: #f8f5f0;
}

[data-theme="light"] .auth-surface {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(180, 83, 9, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .auth-surface--single {
  background: #ffffff;
}

[data-theme="light"] .auth-panel {
  background: #ffffff;
}

[data-theme="light"] .auth-field input,
[data-theme="light"] .auth-field select {
  background: #f8f5f0;
  color: #111827;
  border-color: rgba(180, 83, 9, 0.25);
}

[data-theme="light"] .auth-field input:focus,
[data-theme="light"] .auth-field select:focus {
  outline-color: rgba(180, 83, 9, 0.25);
  border-color: var(--theme-accent);
}

[data-theme="light"] .auth-back-btn,
[data-theme="light"] .auth-actions a,
[data-theme="light"] .auth-account-links a {
  background: #f0ece4;
  color: var(--theme-accent);
  border-color: rgba(180, 83, 9, 0.25);
}

[data-theme="light"] .auth-account-links a:hover {
  background: #e8e0d6;
}

[data-theme="light"] .auth-helper {
  background: #f8f5f0;
  border-color: rgba(180, 83, 9, 0.12);
}

[data-theme="light"] .auth-helper__text,
[data-theme="light"] .auth-helper__support {
  color: #6b7280;
}

[data-theme="light"] .auth-helper__support a {
  color: var(--theme-accent);
}

[data-theme="light"] .auth-request-meta {
  background: #f8f5f0;
  border-color: rgba(180, 83, 9, 0.15);
}

[data-theme="light"] .auth-request-meta h3 {
  color: var(--theme-accent);
}

[data-theme="light"] .auth-request-meta ul {
  color: #6b7280;
}

[data-theme="light"] .auth-request-meta strong {
  color: #111827;
}

[data-theme="light"] .auth-hero {
  background: #f0ece4;
  border-color: rgba(180, 83, 9, 0.15);
  color: #111827;
}

[data-theme="light"] .auth-hero__glow {
  background:
    radial-gradient(circle at 78% 15%, rgba(180, 83, 9, 0.12), transparent 38%),
    radial-gradient(circle at 30% 70%, rgba(180, 83, 9, 0.06), transparent 40%);
}

[data-theme="light"] .auth-status {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  color: var(--theme-accent);
}
