/* Shared auth page styles */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top left, rgba(64, 158, 255, 0.1), transparent 22%),
    radial-gradient(circle at bottom right, rgba(64, 158, 255, 0.06), transparent 18%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

.auth-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 228px) minmax(0, 1fr);
  gap: 16px;
  width: min(100%, 700px);
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  min-height: 428px;
  align-items: stretch;
  overflow: hidden;
}

.auth-card::before,
.auth-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
}

.auth-card::before {
  width: 180px;
  height: 180px;
  top: -68px;
  right: -72px;
  background: radial-gradient(circle, rgba(64, 158, 255, 0.16), transparent 70%);
}

.auth-card::after {
  width: 170px;
  height: 170px;
  bottom: -84px;
  left: -66px;
  background: radial-gradient(circle, rgba(64, 158, 255, 0.12), transparent 72%);
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 18px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(64, 158, 255, 0.2), transparent 40%),
    linear-gradient(180deg, #f9fbff 0%, #eef5ff 100%);
  border: 1px solid rgba(64, 158, 255, 0.12);
}

.auth-card--with-switch .auth-brand {
  grid-row: 1 / span 2;
}

.auth-brand .eyebrow {
  color: #409eff;
}

.auth-brand h1 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(30px, 3.2vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.auth-copy {
  margin: 6px 0 0;
  color: #5f6b7a;
  line-height: 1.7;
  font-size: 13px;
}

.auth-brand::after {
  content: "ABBA Web";
  display: inline-flex;
  align-self: center;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #3559b7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-level-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
  position: relative;
  z-index: 1;
  grid-column: 2;
  align-self: start;
  padding: 3px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  background: #f6f8fb;
}

.auth-tab-button {
  flex: 1 1 160px;
  min-height: 36px;
  background: transparent;
  color: #667085;
  border: 1px solid transparent;
  box-shadow: none;
}

.auth-tab-button.active {
  background: #ffffff;
  color: #1f2937;
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.auth-step,
.auth-step.active,
.auth-step.auth-step-static {
  grid-column: 2;
}

.auth-step {
  display: none;
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
  align-self: stretch;
  max-height: 394px;
  overflow-y: auto;
}

.auth-step.active,
.auth-step.auth-step-static {
  display: block;
}

.auth-step-head {
  display: block;
}

.auth-step-head h2 {
  margin: 0;
  color: #1f2937;
  font-size: 22px;
}

.auth-link-button {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #409eff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.auth-link-button:hover {
  opacity: 0.8;
  transform: none;
}

.auth-step .helper-text {
  margin-top: 6px;
  color: #7a8796;
  font-size: 13px;
}

.auth-choice-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-choice-card {
  min-height: 0;
  text-align: left;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f9fbff;
  color: #1f2937;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: none;
}

.auth-choice-card strong {
  display: block;
  font-size: 15px;
}

.auth-choice-card span {
  display: block;
  margin-top: 4px;
  line-height: 1.5;
  color: #6b7280;
  font-size: 13px;
}

.auth-step-links {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.hidden {
  display: none !important;
}

.auth-text-link {
  color: #5b6472;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.auth-text-link:hover {
  color: #1f2937;
}

.auth-card label {
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.auth-card input {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 11px 12px;
  background: #f9fbff;
  color: #111827;
}

.auth-card input::placeholder {
  color: #9aa3af;
}

.auth-card button:not(.auth-link-button):not(.auth-choice-card):not(.auth-tab-button) {
  background: #409eff;
  min-height: 42px;
}

.auth-card .feedback {
  min-height: 0;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 13px;
}

.auth-card .feedback.error {
  color: #c2410c;
}

.auth-card .stack {
  gap: 12px;
}

.auth-card .stack button {
  width: 100%;
}

@media (max-width: 900px) {
  .auth-card {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
    overflow: visible;
  }

  .auth-brand,
  .auth-level-switch,
  .auth-step,
  .auth-step.active,
  .auth-step.auth-step-static {
    grid-column: 1;
  }

  .auth-card--with-switch .auth-brand {
    grid-row: auto;
  }

  .auth-brand {
    min-height: 220px;
  }
}

@media (max-width: 560px) {
  .auth-screen {
    padding: 18px 12px;
  }

  .auth-card {
    padding: 16px;
    border-radius: 22px;
  }

  .auth-brand,
  .auth-step {
    padding: 18px;
    border-radius: 18px;
  }

  .auth-level-switch {
    padding: 4px;
  }

  .auth-choice-grid {
    grid-template-columns: 1fr;
  }

  .auth-step-links {
    align-items: flex-start;
    flex-direction: column;
  }
}
