:root {
  --bg: #f7f2e9;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(243, 249, 255, 0.7);
  --text: #1f3047;
  --muted: #61708a;
  --line: rgba(110, 145, 201, 0.18);
  --primary: #3f6fe0;
  --secondary: #5dc7a8;
  --accent: #0f9f70;
  --accent-strong: #0a7f58;
  --danger: #b42318;
  --shadow: 0 28px 70px rgba(92, 120, 168, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: 'Sora', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(132, 240, 207, 0.28), transparent 26%),
    radial-gradient(circle at top right, rgba(140, 168, 255, 0.2), transparent 30%),
    radial-gradient(circle at bottom center, rgba(255, 214, 153, 0.14), transparent 28%),
    linear-gradient(180deg, #f8f3eb 0%, #edf4f7 48%, #eef3fb 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 28rem;
  height: 28rem;
  top: -6rem;
  left: -5rem;
  background: radial-gradient(circle, rgba(120, 227, 193, 0.32), transparent 62%);
}

body::after {
  width: 32rem;
  height: 32rem;
  right: -8rem;
  top: 4rem;
  background: radial-gradient(circle, rgba(143, 173, 255, 0.28), transparent 64%);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

.auth-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 26px;
  padding: 28px;
}

.auth-layout-simple {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  align-content: center;
}

.auth-panel {
  border-radius: 38px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.auth-panel-brand {
  padding: 42px;
  background:
    radial-gradient(circle at top left, rgba(132, 240, 207, 0.16), transparent 32%),
    radial-gradient(circle at right, rgba(140, 168, 255, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(244, 250, 255, 0.74));
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
  background:
    radial-gradient(circle at top right, rgba(140, 168, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(248, 250, 255, 0.74));
}

.auth-panel-form-simple {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  margin-bottom: 34px;
}

.auth-brand-card {
  margin-bottom: 28px;
}

.auth-brand img {
  width: 56px;
  height: 56px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.auth-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(88, 124, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 242, 255, 0.72));
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(92, 120, 168, 0.08);
}

.auth-panel-brand h1,
.auth-card h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #1b2d44;
}

.auth-panel-brand h1 {
  max-width: 10ch;
  font-size: clamp(2.5rem, 4.9vw, 4.7rem);
  line-height: 0.92;
}

.auth-copy,
.auth-card-copy,
.auth-list,
.auth-alt,
.feedback {
  font-size: 1rem;
  line-height: 1.75;
}

.auth-copy {
  max-width: 58ch;
  margin: 22px 0 0;
  color: var(--muted);
}

.auth-list {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 14px;
}

.auth-list li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
  color: #28405f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.auth-card {
  width: min(100%, 560px);
  padding: 40px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background:
    radial-gradient(circle at top left, rgba(132, 240, 207, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 255, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  margin: 0 auto;
}

.auth-card h2 {
  font-size: clamp(2.3rem, 3.1vw, 3.3rem);
  line-height: 0.95;
}

.auth-card-copy {
  color: var(--muted);
  margin: 14px 0 26px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #27405d;
}

.auth-form input,
.auth-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.phone-input-group {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 8px;
}

.phone-input-group select {
  flex: 0 0 142px;
  width: 142px;
  min-width: 142px;
  padding-left: 12px;
  padding-right: 30px;
  border-radius: 18px;
}

.phone-input-group input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.auth-form select {
  min-height: 54px;
  padding-right: 48px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2361708a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: 2px solid rgba(63, 111, 224, 0.16);
  border-color: rgba(63, 111, 224, 0.34);
}

.auth-field-error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  padding: 8px 12px;
  border: 1px solid rgba(180, 35, 24, 0.16);
  border-radius: 14px;
  color: var(--danger);
  background: linear-gradient(135deg, rgba(255, 248, 246, 0.98), rgba(255, 255, 255, 0.94));
  box-shadow: 0 8px 20px rgba(92, 120, 168, 0.08);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.4;
}

.auth-field-error::before {
  content: "!";
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--danger);
  font-size: 0.7rem;
  font-weight: 800;
}

.auth-field-invalid > input:not([type="radio"]):not([type="checkbox"]),
.auth-field-invalid > select {
  border-color: rgba(180, 35, 24, 0.45);
}

.auth-field-invalid > input[type="checkbox"] {
  outline: 2px solid rgba(180, 35, 24, 0.38);
  outline-offset: 2px;
}

.auth-plan-fieldset.auth-field-invalid .auth-plan-option {
  border-color: rgba(180, 35, 24, 0.34);
}

.auth-plan-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-plan-fieldset legend {
  margin-bottom: 10px;
  color: #27405d;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-plan-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-plan-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-plan-option {
  display: flex !important;
  align-items: center;
  gap: 14px !important;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-plan-option:has(input:checked) {
  border-color: rgba(63, 111, 224, 0.48);
  background: rgba(132, 240, 207, 0.2);
  box-shadow: 0 0 0 3px rgba(63, 111, 224, 0.08);
}

.auth-plan-option:focus-within {
  outline: 2px solid rgba(63, 111, 224, 0.22);
  outline-offset: 2px;
}

.auth-plan-option input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  box-shadow: none;
}

.auth-plan-option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.auth-plan-option-copy strong {
  color: var(--text);
  font-size: clamp(0.74rem, 1.1vw, 0.8rem);
  line-height: 1.35;
}

.waitlist-plan-options .auth-plan-option {
  padding-right: 32px;
}

.waitlist-plan-options .auth-plan-option-copy strong {
  font-size: clamp(0.7rem, 0.96vw, 0.76rem);
}

.auth-plan-option-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.5;
}

.auth-message-volume {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
}

.auth-message-volume[hidden] {
  display: none;
}

.auth-message-volume-label {
  color: #27405d;
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-volume-picker {
  display: grid;
  grid-template-columns: 46px minmax(90px, 1fr) 46px;
  align-items: center;
  gap: 10px;
  width: min(100%, 340px);
}

.auth-volume-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.auth-volume-picker input {
  min-width: 0;
  height: 56px;
  padding: 8px;
  border-radius: 18px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-message-volume > small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 721px) {
  .auth-plan-option-copy small {
    display: none;
  }
}

@media (max-width: 720px) {
  .auth-plan-options {
    grid-template-columns: 1fr;
  }
}

.auth-consent {
  display: flex !important;
  align-items: flex-start;
  gap: 10px !important;
  color: var(--muted) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  line-height: 1.6;
}

.auth-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--primary);
  box-shadow: none;
}

.auth-consent a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-form button {
  border: 0;
  border-radius: 999px;
  padding: 15px 22px;
  font-weight: 700;
  color: #12302b;
  background: linear-gradient(135deg, rgba(132, 240, 207, 0.9), rgba(200, 235, 175, 0.9));
  box-shadow: 0 18px 34px rgba(112, 179, 149, 0.18);
  cursor: pointer;
}

.feedback {
  min-height: 28px;
  margin: 16px 0 0;
  color: var(--muted);
}

.feedback[data-state="error"] {
  color: var(--danger);
}

.feedback[data-state="success"] {
  color: #067647;
}

.auth-alt {
  margin: 18px 0 0;
  color: var(--muted);
}

.waitlist-page #authFeedback:empty {
  display: none;
}

.waitlist-page .auth-alt {
  margin-top: 8px;
}

.auth-link-row {
  margin: 16px 0 0;
}

.auth-alt a {
  color: var(--text);
  font-weight: 700;
}

.auth-link-row a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-panel-brand h1 {
    max-width: 12ch;
  }
}

@media (max-width: 720px) {
  .auth-layout {
    padding: 16px;
    gap: 18px;
  }

  .auth-panel-brand,
  .auth-panel-form,
  .auth-card {
    padding: 26px;
  }

  .auth-panel-brand h1 {
    font-size: clamp(2.2rem, 10vw, 3.4rem);
  }

  .auth-form input,
  .auth-form select {
    font-size: 16px;
  }
}
