@import url("theme.css");

.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(155deg, oklch(0.14 0.004 265 / 0.92), oklch(0.22 0.01 85 / 0.75)),
    var(--gradient-gold);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, oklch(0.93 0.06 95 / 0.25), transparent 40%),
    linear-gradient(180deg, transparent, oklch(0.12 0.004 265 / 0.55));
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  animation: auth-rise 0.55s ease-out both;
}

.auth-mark {
  width: 3rem;
  height: 3rem;
  border-radius: calc(var(--radius) + 4px);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  background-image: var(--gradient-gold);
  color: var(--primary);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-gold);
}

.auth-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
  font-weight: 600;
}

.auth-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-lead {
  margin: 0 0 1.75rem;
  color: oklch(0.92 0.02 90);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 26rem;
}

.auth-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.auth-points li {
  position: relative;
  padding-left: 1.35rem;
  color: oklch(0.95 0.01 90);
  font-size: 0.95rem;
}

.auth-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background-image: var(--gradient-gold);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--gradient-surface);
}

.auth-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 10px);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-panel);
  animation: auth-rise 0.55s ease-out 0.08s both;
}

.auth-card-head { margin-bottom: 1.25rem; }

.auth-card-brand {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  font-weight: 700;
}

.auth-card-head h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.auth-card-sub {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-steps {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.auth-steps-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-steps .is-active { color: var(--primary); }
.auth-steps .is-done { color: var(--foreground); }

.auth-alert {
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth-alert-error {
  background: oklch(0.97 0.02 25);
  color: var(--destructive);
  border: 1px solid oklch(0.85 0.08 25);
}

.auth-alert-success,
.auth-alert-info {
  background: oklch(0.97 0.02 150);
  color: var(--success);
  border: 1px solid oklch(0.85 0.08 150);
}

.auth-form { display: grid; gap: 1rem; }

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

.auth-field span {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--foreground);
}

.auth-field input {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) + 2px);
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: var(--card);
  color: var(--foreground);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px oklch(0.28 0.006 265 / 15%);
}

.auth-otp {
  letter-spacing: 0.35em;
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-display);
}

.auth-submit {
  border: 0;
  border-radius: calc(var(--radius) + 2px);
  padding: 0.9rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--primary);
  background-image: var(--gradient-gold);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.auth-submit:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.auth-submit:active { transform: translateY(0); }

.auth-resend {
  margin-top: 0.85rem;
  text-align: center;
}

.auth-resend button {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-alt {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.auth-alt a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 500;
}

.auth-alt a:hover { color: var(--primary); }

.auth-footnote {
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

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

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }

  .auth-brand {
    min-height: auto;
    padding: 1.75rem 1.35rem 1.5rem;
  }

  .auth-title { font-size: 1.65rem; }

  .auth-lead,
  .auth-points { display: none; }

  .auth-panel {
    padding: 1.25rem;
    align-items: start;
  }
}
