/* Grid container that centers auth panels within responsive bounds */
.auth-layout {
  max-width: min(68.75rem, 95vw);
  margin: clamp(3.5rem, 7vw, 5.5rem) auto clamp(2rem, 5vw, 4rem);
  padding: 0 clamp(1rem, 3vw, 1.5rem) clamp(1.5rem, 4vw, 2rem);
  display: grid;
  gap: 2.5rem;
}

/* Allow the layout to wrap panels based on available width */
.auth-layout--split {
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  align-items: stretch;
}

/* Card shell used for auth content blocks */
.auth-panel {
  background: rgba(8, 16, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  padding: 2.4rem 2.2rem;
  box-shadow: 0 18px 45px rgba(6, 10, 14, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hero panel with teal accent gradient */
.auth-panel--primary {
  background: radial-gradient(
    circle at 10% 20%,
    rgba(31, 200, 164, 0.35),
    rgba(8, 16, 20, 0.95)
  );
  border-color: rgba(31, 200, 164, 0.32);
  color: var(--nav-text);
}

/* Small pill badge for panel status labels */
.auth-panel__badge {
  align-self: flex-start;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(31, 200, 164, 0.18);
  color: var(--nav-text);
}

/* Ensure headings inside auth panels inherit brand color */
.auth-panel h1,
.auth-panel h2 {
  margin: 0;
  color: var(--nav-text);
}

/* Muted helper copy beneath the heading */
.auth-panel__subtitle {
  color: var(--nav-text-muted);
  margin-bottom: 0.5rem;
}

/* Footer text within panels */
.auth-panel__footer {
  color: var(--nav-text-muted);
}

/* Shared list styling for highlights and steps */
.auth-highlight-list,
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

/* Section titles inside highlight lists */
.auth-highlight-list h2,
.step-list h2 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

/* Paragraph styling within highlight lists */
.auth-highlight-list p,
.step-list p {
  margin: 0;
  color: var(--nav-text-muted);
  line-height: 1.6;
}

/* Align numbered steps with their descriptions */
.step-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: flex-start;
}

/* Circular badge for step numbers */
.step-badge {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  background: var(--accent);
  color: #02120d;
}

/* Highlight banner for plan recommendations */
.plan-banner {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 138, 61, 0.12);
  color: var(--nav-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Vertical stack for auth form fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Layout helper for grouped form fields */
.form-field,
.form-field-group,
.plan-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Horizontal grouping that wraps on narrow viewports */
.form-field-group {
  gap: 1rem;
}

/* Make child fields share space evenly */
.form-field-group .form-field {
  flex: 1 1 0%;
}

/* Bold labels for clarity */
.form-field label,
.plan-options legend {
  font-weight: 600;
  color: var(--nav-text);
}

/* Support text beneath inputs */
.form-field small {
  color: var(--nav-text-muted);
  display: block;
  line-height: 1.5;
}

/* Shared input styling for forms and plan selector */
.auth-form input,
.plan-options input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(244, 251, 248, 0.18);
  padding: 0.75rem 1rem;
  background: rgba(5, 10, 14, 0.65);
  color: var(--nav-text);
}

/* High-contrast focus outline for inputs */
.auth-form input:focus {
  outline: 2px solid rgba(31, 200, 164, 0.45);
  border-color: rgba(31, 200, 164, 0.45);
}

/* Align remember-me checkbox with its label */
.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--nav-text-muted);
}

/* Scale the checkbox to match the design system */
.form-checkbox input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.375rem;
}

/* Align remember-me and forgot password links */
.auth-form__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* Accent colored auth links */
.auth-link {
  color: var(--accent);
  text-decoration: none;
}

/* Underline auth links on interaction */
.auth-link:hover,
.auth-link:focus {
  text-decoration: underline;
}

/* Full-width submit buttons */
.btn--block {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Horizontal divider with flanking lines */
.auth-form__divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--nav-text-muted);
  font-size: 0.85rem;
}

/* Extend divider lines to fill available space */
.auth-form__divider::before,
.auth-form__divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(244, 251, 248, 0.18);
}

/* Grid of alternative auth providers */
.auth-form__actions--alt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
  gap: 0.75rem;
}

/* Style social login buttons */
.btn--social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--nav-text);
  border: 1px solid rgba(244, 251, 248, 0.18);
}

/* Size logos inside social buttons */
.btn--social img {
  width: 1.125rem;
  height: 1.125rem;
}

/* Container for plan selection radios */
.plan-options {
  padding: 1rem;
  border-radius: 1.125rem;
  border: 1px solid rgba(244, 251, 248, 0.18);
  background: rgba(5, 10, 14, 0.55);
  gap: 0.85rem;
}

/* Heading for plan selector */
.plan-options legend {
  font-size: 0.95rem;
}

/* Individual plan option row */
.plan-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.875rem;
  border: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

/* Size radio inputs to match rest of UI */
.plan-option input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
}

/* Emphasize the plan name */
.plan-option span strong {
  display: block;
  color: var(--nav-text);
}

/* Muted detail copy beneath plan name */
.plan-option span small {
  color: var(--nav-text-muted);
}

/* Highlight the chosen or hovered plan */
.plan-option:hover,
.plan-option:has(input[type="radio"]:checked) {
  border-color: rgba(31, 200, 164, 0.45);
  background: rgba(31, 200, 164, 0.08);
}

/* Tag badge for premium plan callouts */
.plan-tag {
  margin-left: auto;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 138, 61, 0.2);
  color: var(--nav-text);
}

/* Stack auth form meta content on small screens */
@media (max-width: 43.75rem) {
  .auth-form__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Reflow grouped inputs vertically on phones */
  .form-field-group {
    flex-direction: column;
  }
}

/* Disable motion for users who prefer reduced movement */
@media (prefers-reduced-motion: reduce) {
  .auth-form__divider::before,
  .auth-form__divider::after,
  .plan-option {
    transition: none;
  }
}
