:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-strong: #0d1830;
  --panel: rgba(17, 27, 46, 0.94);
  --panel-strong: rgba(11, 20, 37, 0.98);
  --panel-soft: rgba(28, 42, 70, 0.9);
  --line: rgba(120, 154, 231, 0.18);
  --line-strong: rgba(120, 154, 231, 0.28);
  --text: rgba(246, 248, 255, 0.96);
  --text-soft: rgba(204, 214, 235, 0.86);
  --text-muted: rgba(151, 170, 214, 0.74);
  --brand: #72a6ff;
  --brand-strong: #9ec0ff;
  --error: #ffd7dc;
  --error-bg: rgba(98, 23, 35, 0.44);
  --error-line: rgba(255, 128, 142, 0.2);
  --radius-lg: 2rem;
  --radius-md: 1.25rem;
  --radius-pill: 999px;
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
}

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

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

body {
  font-family: Inter, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

.auth-shell {
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.auth-topbar,
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--text);
}

.auth-brand__logo {
  width: 2.5rem;
  height: 2.5rem;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.auth-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.auth-main {
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 7vw, 5rem) 0;
}

.auth-card {
  max-width: 46rem;
  width: min(100%, 46rem);
  margin-inline: auto;
  display: grid;
  gap: 1.25rem;
  align-content: start;
  justify-items: stretch;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(120, 154, 231, 0.14);
  background: rgba(13, 24, 48, 0.76);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.auth-card--narrow {
  max-width: 38rem;
  width: min(100%, 38rem);
}

.auth-eyebrow {
  width: fit-content;
  justify-self: start;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.auth-description,
.auth-note,
.auth-footer__copy {
  color: var(--text-soft);
  line-height: 1.7;
}

.auth-description {
  max-width: 36rem;
  margin: 0;
  font-size: 1.08rem;
}

.auth-status {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-soft);
  font-weight: 600;
  line-height: 1.55;
}

.auth-status.is-error {
  padding-left: 0.9rem;
  border-left: 3px solid rgba(255, 128, 142, 0.5);
  color: var(--error);
}

.auth-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin: 0;
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

.auth-detail {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-height: auto;
  padding: 0;
  border: 0;
  background: none;
}

.auth-detail dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-detail dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.8rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.auth-actions .button,
.auth-form .button {
  width: 100%;
}

.auth-actions .button:first-child {
  grid-column: auto;
}

.button--primary {
  background: #2f6fdf;
  color: #fff;
}

.button--primary:hover {
  background: #417de7;
}

.button--secondary {
  border-color: rgba(120, 154, 231, 0.24);
  background: transparent;
  color: var(--text);
}

.auth-note {
  max-width: 36rem;
  margin: 0;
  font-size: 0.97rem;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding-top: 0.25rem;
}

.auth-form[hidden],
.auth-details[hidden] {
  display: none;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field span {
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
}

.auth-field input {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(10, 17, 31, 0.9);
  color: var(--text);
  font: inherit;
}

.auth-field input:focus {
  outline: 2px solid rgba(114, 166, 255, 0.22);
  border-color: rgba(114, 166, 255, 0.4);
}

.auth-form-message {
  margin: 0;
  color: var(--text-soft);
}

.auth-form-message.is-error {
  color: var(--error);
}

.auth-card--centered {
  justify-items: center;
  text-align: center;
}

.auth-card--centered .auth-eyebrow {
  margin-inline: auto;
}

.auth-card--centered .auth-description,
.auth-card--centered .auth-note {
  margin-inline: auto;
}

.auth-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 767px) {
  .auth-topbar,
  .auth-footer {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .auth-actions .button:first-child {
    grid-column: auto;
  }

  .button {
    width: 100%;
    white-space: normal;
  }
}
