/* ================================================================
   Pinksheet — Elite Dance of Tulsa registration form
   Ported from design_handoff_pinksheet/Pinksheet.html prototype.
   Source of truth for tokens/components: design_handoff_pinksheet/README.md
   ================================================================ */

:root {
  /* Warm neutrals — matched to Studio Manager */
  --bg:            #FAF7F2;
  --bg-sunken:     #F2EEE6;
  --surface:       #FFFFFF;
  --surface-2:     #F7F3EC;
  --border:        #E6DFD2;
  --border-strong: #D4CBB8;
  --ink:           #1A1714;
  --ink-2:         #3D3730;
  --ink-3:         #6B6257;
  --ink-4:         #9A8F80;

  /* Pink — hot accent on soft tint */
  --pink:        #EC4899;
  --pink-hover:  #DB2777;
  --pink-ink:    #9D174D;
  --pink-soft:   #FCE7F3;
  --pink-softer: #FDF2F8;
  --pink-tint:   #FBE3ED;

  /* Dark estimator */
  --ink-dark:   #1A1714;
  --ink-dark-2: #26221D;

  --good: oklch(0.62 0.10 150);
  --warn: oklch(0.68 0.11 75);
  --bad:  oklch(0.58 0.13 25);

  --font-ui:      "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino", Georgia, serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", "Menlo", monospace;

  --r-sm: 4px;
  --r:    6px;
  --r-md: 8px;
  --r-lg: 12px;

  --shadow-xs:   0 1px 0 rgba(26,23,20,.04), 0 1px 2px rgba(26,23,20,.04);
  --shadow:      0 1px 0 rgba(26,23,20,.04), 0 4px 14px -6px rgba(26,23,20,.12);
  --shadow-lg:   0 1px 0 rgba(26,23,20,.05), 0 24px 48px -20px rgba(26,23,20,.25);
  --shadow-pink: 0 20px 50px -24px rgba(236, 72, 153, 0.35), 0 1px 0 rgba(26,23,20,.04);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--pink-tint);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  min-height: 100vh;
}
button { font-family: inherit; font-size: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--pink-soft); color: var(--pink-ink); }

/* =========================================================
   Page shell — two-column with sticky estimator
   Pink intensity = full (approved variant)
   ========================================================= */
.page {
  min-height: 100vh;
  background:
    radial-gradient(1400px 700px at 50% -300px, rgba(236,72,153,0.55), transparent 65%),
    linear-gradient(180deg, #F9B4D1 0%, #F7A3C6 100%);
  padding: 40px 20px 80px;
}
.page .wrap {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
.page .sticky-side {
  position: sticky;
  top: 24px;
}
.page .main-col { min-width: 0; }

@media (max-width: 960px) {
  .page .wrap { grid-template-columns: 1fr; }
  .page .sticky-side { position: static; }
}

/* Single-column auth screens (login / verify / success) */
.page.page-narrow .wrap {
  max-width: 500px;
  grid-template-columns: 1fr;
}
.page.page-narrow .sticky-side { display: none; }

/* =========================================================
   Masthead
   ========================================================= */
.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.logo-lockup { display: flex; align-items: center; gap: 14px; }
.logo-lockup img.full-logo {
  height: 64px;
  width: auto;
  display: block;
}
.masthead-center {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.masthead-title {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.masthead-title.italic-pink {
  font-size: 22px;
  color: var(--pink);
  font-style: italic;
  margin-top: 2px;
}
.season-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--pink-soft);
  color: var(--pink-ink);
  border: 1px solid color-mix(in oklab, var(--pink) 25%, transparent);
  letter-spacing: 0.02em;
}
.season-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }

.masthead .program-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--pink);
  font-weight: 500;
  margin-bottom: 4px;
}
.season-pill.muted {
  background: var(--bg-sunken);
  color: var(--ink-3);
  border-color: var(--border-strong);
}
.season-pill.muted .dot { background: var(--ink-4); }

/* Narrow (auth) pages: masthead collapses to 2 columns (no right pill slot) */
.page-narrow .masthead {
  grid-template-columns: auto 1fr;
  padding: 14px 18px;
}
.page-narrow .masthead .logo-lockup img.full-logo { height: 48px; }
.page-narrow .masthead-title { font-size: 26px; }
.page-narrow .masthead-title.italic-pink { font-size: 17px; }

@media (max-width: 620px) {
  .masthead { grid-template-columns: 1fr; text-align: center; }
  .logo-lockup { justify-content: center; }
  .page-narrow .masthead { grid-template-columns: 1fr; }
}

/* =========================================================
   Form heading strip
   ========================================================= */
.form-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px 12px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 20px;
}
.form-heading h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  line-height: 1;
}
.form-heading h1 em {
  font-style: italic;
  color: var(--pink);
}
.form-heading .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-align: right;
}
.form-heading .meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.form-heading .meta strong { color: var(--ink); font-weight: 500; }
/* Match the field-label `.req` solid pink circle so the legend tracks the
   actual marker the user sees on every required field. */
.form-heading .meta .req-dot {
  display: inline-block;
  vertical-align: middle;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--pink-soft);
  font-size: 0;
  color: transparent;
  margin: 0 4px;
}

/* Reset-form action bar — sits between masthead and heading. Discreet
   surface tone, but the button itself is sized + bordered to be obvious
   so a parent looking at autosave-restored fields can find it fast. */
.reset-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 4px 0;
  margin-bottom: -6px;
}
.reset-bar > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
  font-style: italic;
}
.reset-form-btn {
  background: var(--surface);
  border: 1.5px solid var(--pink);
  color: var(--pink-ink);
  padding: 8px 18px;
  border-radius: var(--r);
  font-size: 12.5px;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 180ms cubic-bezier(.2,.6,.2,1);
  font-style: normal;
  box-shadow: var(--shadow-xs);
}
.reset-form-btn:hover {
  background: var(--pink);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.reset-form-btn:active {
  transform: translateY(0);
}

/* =========================================================
   Program selector (when both programs are open)
   ========================================================= */
.program-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.program-selector label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  transition: all 180ms cubic-bezier(.2,.6,.2,1);
}
.program-selector label:hover {
  border-color: var(--pink);
  background: var(--pink-softer);
}
.program-selector input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.program-selector label:has(input:checked) {
  border-color: var(--pink);
  background: var(--pink-softer);
  color: var(--pink-ink);
  box-shadow: 0 0 0 3px var(--pink-soft);
}

/* =========================================================
   Section cards
   ========================================================= */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 180ms cubic-bezier(.2,.6,.2,1), border-color 180ms;
}
.section:hover { border-color: var(--border-strong); }
.section:focus-within { box-shadow: var(--shadow); }

.section-hd {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 22px 6px;
}
.section-num {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--pink);
  font-weight: 400;
  letter-spacing: -0.02em;
  min-width: 32px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}
.section-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
  font-family: var(--font-ui);
}
.section-bd { padding: 8px 22px 22px; }

/* Stack rows inside a section body — matches the prototype which inlined
   `margin-bottom: 14px` on each row. Keeps the first row flush to the section
   header and puts ~14px between every subsequent row (grid-2, field, toggle-group, …). */
.section-bd > * + * { margin-top: 14px; }

/* =========================================================
   Fields
   ========================================================= */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 520px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.field-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Required-field marker — render as a real solid pink circle instead of
   relying on the middle-dot character, which was nearly invisible at 10px.
   `font-size: 0` hides the inline "·" text so only the styled circle shows. */
.field-label .req {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--pink-soft);
  font-size: 0;
  color: transparent;
  flex-shrink: 0;
}
.field-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  font-style: italic;
  line-height: 1.4;
  /* Extra breathing room so the hint isn't glued to the input border above.
     .field already uses `gap: 6px`; this brings the visual spacing to ~12px. */
  margin-top: 6px;
}
.field-hint.inline {
  display: inline-flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  background: var(--pink-softer);
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--pink-ink);
  font-style: normal;
  font-size: 12.5px;
  line-height: 1.5;
}
.info-icon {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--pink-soft); color: var(--pink-ink);
  display: inline-grid; place-items: center;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  cursor: help;
  border: 1px solid color-mix(in oklab, var(--pink) 25%, transparent);
}

.input, .select, .textarea {
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  outline: none;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  transition: border-color 180ms, box-shadow 180ms, background 180ms;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-soft);
  background: #FFFDFC;
}
.input[readonly] { background: var(--bg-sunken); color: var(--ink-3); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B6257' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 32px;
}
.select[multiple] {
  appearance: auto;
  background-image: none;
  padding-right: 12px;
  height: auto;
  min-height: 120px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* =========================================================
   Toggle group — "Dance Interest" / "Uniform" tiles
   ========================================================= */
.toggle-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.toggle-tile {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: all 180ms cubic-bezier(.2,.6,.2,1);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.toggle-tile:hover {
  border-color: var(--pink);
  background: var(--pink-softer);
}
.toggle-tile input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-tile .tile-mark {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: grid; place-items: center;
  transition: all 180ms;
  flex-shrink: 0;
}
.toggle-tile .tile-mark.radio { border-radius: 50%; }
.toggle-tile .tile-mark svg { opacity: 0; transform: scale(0.6); transition: all 180ms; }
.toggle-tile .tile-body { min-width: 0; }
.toggle-tile .tile-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.1;
}
.toggle-tile .tile-desc {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.3;
}
.toggle-tile .tile-aside {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  text-align: right;
}
.toggle-tile:has(input:checked),
.toggle-tile.is-checked {
  border-color: var(--pink);
  background: var(--pink-softer);
  box-shadow: 0 0 0 3px var(--pink-soft);
}
.toggle-tile:has(input:checked) .tile-mark,
.toggle-tile.is-checked .tile-mark {
  background: var(--pink);
  border-color: var(--pink);
}
.toggle-tile:has(input:checked) .tile-mark svg,
.toggle-tile.is-checked .tile-mark svg { opacity: 1; transform: scale(1); }
.toggle-tile:has(input:checked) .tile-aside,
.toggle-tile.is-checked .tile-aside { color: var(--pink-ink); }

/* Radio variant: filled dot instead of checkmark */
.toggle-tile .tile-mark.radio::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: all 180ms;
}
.toggle-tile:has(input:checked) .tile-mark.radio::after,
.toggle-tile.is-checked .tile-mark.radio::after { opacity: 1; transform: scale(1); }
.toggle-tile .tile-mark.radio svg { display: none; }

/* Disabled tiles (e.g. locked "base" selection like POM) */
.toggle-tile.is-locked {
  cursor: default;
  opacity: 0.92;
}
.toggle-tile.is-locked:hover {
  border-color: var(--pink);
  background: var(--pink-softer);
}

.tile-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--pink-soft);
  color: var(--pink-ink);
  border: 1px solid color-mix(in oklab, var(--pink) 20%, transparent);
  font-weight: 500;
}

/* Empty-state card for the dance-interest section when team is unset */
.toggle-empty {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 13px;
}

/* =========================================================
   Quantity stepper (Company sections: solo/duo/groups counts)
   ========================================================= */
.qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  height: 40px;
}
.qty button {
  width: 34px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.qty button:hover { background: var(--pink-softer); color: var(--pink-ink); }
.qty button:disabled { color: var(--ink-4); cursor: not-allowed; background: transparent; }
.qty input {
  width: 44px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  background: transparent;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* =========================================================
   Estimator
   ========================================================= */
.estimator {
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.estimator[data-style="light"] {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.estimator[data-style="dark"] {
  background: linear-gradient(170deg, var(--ink-dark) 0%, #0E0C0A 100%);
  color: #F1EEE8;
  border: 1px solid #2A2520;
}
.estimator-hd {
  padding: 20px 22px 6px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.estimator-body { padding: 6px 22px 22px; }
.estimator[data-style="dark"] .section-title { color: #F7F3EC; }
.estimator[data-style="dark"] .section-sub { color: #A89E8D; }

.estimator .note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.28);
  border-radius: var(--r);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}
/* Bottom-of-estimator note (the "no deposits" reassurance) renders inside
   #estimator-results immediately after the .totals grid, which has no own
   margin-bottom — give the note breathing room above and drop its trailing
   margin since nothing follows it inside the estimator card. */
.estimator .totals + .note {
  margin-top: 14px;
  margin-bottom: 0;
}
.estimator[data-style="light"] .note {
  background: var(--pink-softer);
  border-color: color-mix(in oklab, var(--pink) 25%, transparent);
  color: var(--pink-ink);
}
.estimator[data-style="dark"] .note { color: #FCE7F3; }
.estimator .note .note-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--pink);
  color: #fff;
  flex-shrink: 0;
  font-weight: 600;
}

.comp-list {
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.estimator[data-style="light"] .comp-list {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
}
.estimator[data-style="dark"] .comp-list {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.comp-list-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 8px;
}
.comp-list ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
}
.comp-list ul li::marker { color: var(--pink); }

.fee-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 13px;
}
.fee-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.fee-list li:last-child { border-bottom: none; }
.fee-list .fee-label { color: var(--ink-2); }
.fee-list .fee-cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-right: 8px;
}
.fee-list .fee-amt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
}
.estimator[data-style="dark"] .fee-list .fee-label { color: #D4CBB8; }
.estimator[data-style="dark"] .fee-list .fee-cat { color: #8A8174; }
.estimator[data-style="dark"] .fee-list .fee-amt { color: #F1EEE8; }
.estimator[data-style="dark"] .fee-list li { border-color: rgba(255,255,255,0.06); }

.totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.total-tile {
  padding: 14px 14px 16px;
  border-radius: var(--r-md);
}
.estimator[data-style="light"] .total-tile {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
}
.estimator[data-style="dark"] .total-tile {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}
.total-tile.emph {
  background: var(--pink);
  color: #fff;
  border: none;
}
.estimator[data-style="light"] .total-tile.emph {
  background: linear-gradient(180deg, var(--pink) 0%, var(--pink-hover) 100%);
}
.total-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 6px;
}
.total-value {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.total-value small {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.6;
  margin-left: 4px;
  letter-spacing: 0;
}
.total-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0.7;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* Sticky-side variant (compact) */
.sticky-side .estimator { margin-bottom: 0; }
.sticky-side .estimator-hd { padding: 18px 20px 4px; }
.sticky-side .estimator-body { padding: 6px 20px 20px; }
.sticky-side .section-num { font-size: 26px; }
.sticky-side .section-title { font-size: 19px; }
.sticky-side .totals { grid-template-columns: 1fr; gap: 8px; }
.sticky-side .total-tile {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 14px;
}
.sticky-side .total-label { margin-bottom: 0; }
.sticky-side .total-value { font-size: 22px; }
.sticky-side .comp-list { padding: 10px 12px; }
.sticky-side .comp-list ul { font-size: 12px; line-height: 1.55; }

/* =========================================================
   Progress bar
   ========================================================= */
.progress-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 16px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  box-shadow: var(--shadow-xs);
}
.progress-bar .pb-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.progress-bar .pb-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}
.progress-bar .pb-count em { color: var(--pink); font-style: normal; font-weight: 600; }
.pb-track {
  height: 6px;
  background: var(--bg-sunken);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink) 0%, var(--pink-hover) 100%);
  border-radius: 99px;
  transition: width 300ms cubic-bezier(.2,.6,.2,1);
  width: 0%;
}

/* =========================================================
   Validation states
   ========================================================= */
.input.is-valid, .select.is-valid, .textarea.is-valid {
  border-color: color-mix(in oklab, var(--good) 60%, transparent);
  padding-right: 34px;
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid {
  border-color: color-mix(in oklab, var(--bad) 60%, transparent);
  background: color-mix(in oklab, var(--bad) 4%, var(--surface));
  padding-right: 34px;
}
.field .v-mark {
  position: absolute;
  right: 10px;
  bottom: 11px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: none;
  place-items: center;
  pointer-events: none;
  font-size: 11px;
  font-weight: 700;
}
.field.has-valid .v-mark.valid { display: grid; background: var(--good); color: #fff; }
.field.has-invalid .v-mark.invalid { display: grid; background: var(--bad); color: #fff; }
.field .v-err {
  font-size: 11.5px;
  color: var(--bad);
  margin-top: 2px;
  display: none;
  line-height: 1.3;
}
.field.has-invalid .v-err { display: block; }
.field:has(.field-hint) .v-mark { bottom: auto; top: 34px; }

/* =========================================================
   Autosave toast
   ========================================================= */
.autosave {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 150;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms, transform 200ms;
  pointer-events: none;
}
.autosave.visible { opacity: 1; transform: translateY(0); }
.autosave .as-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  animation: as-pulse 1.4s ease-in-out infinite;
}
.autosave.saving .as-dot { background: var(--warn); }
@keyframes as-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* =========================================================
   Footer row + submit button
   ========================================================= */
.footer-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.captcha-stub {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 12.5px;
  color: var(--ink-3);
  flex: 1;
}
.captcha-check {
  width: 16px; height: 16px; border-radius: 3px;
  background: var(--good); display: grid; place-items: center;
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2,.6,.2,1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(236,72,153,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 400ms;
}
.btn-submit:hover {
  background: #0F0D0B;
  box-shadow: var(--shadow-pink);
}
.btn-submit:hover::before { transform: translateX(100%); }
.btn-submit svg { transition: transform 180ms; }
.btn-submit:hover svg { transform: translateX(3px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms;
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--pink);
  background: var(--pink-softer);
  color: var(--pink-ink);
}

/* =========================================================
   Error box (form-level error surface)
   ========================================================= */
.error-box {
  background: color-mix(in oklab, var(--bad) 10%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--bad) 45%, transparent);
  color: var(--bad);
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
}

/* =========================================================
   Auth cards (login, verify, success)
   ========================================================= */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-card h2, .auth-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
}
.auth-card h2 { font-size: 28px; }
.auth-card h3 { font-size: 22px; }
.auth-card p { color: var(--ink-3); margin: 0 0 12px; font-size: 13.5px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.auth-card .code-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 8px;
  font-weight: 600;
  font-family: var(--font-mono);
  height: 52px;
}
.auth-card .resend {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-3);
}

/* =========================================================
   Company qty rows (Solo / Duo / Groups / Production)
   Each row is a 2-up grid: stepper on the left, style selectors stacked
   on the right. Top-aligned so adding a style dropdown grows the row
   downward and pushes the next dance type down by exactly one row's worth.
   ========================================================= */
.qty-row {
  align-items: start;
}
.qty-row > .field:first-child {
  align-self: start;
}
.qty-row [id^="style-container-"] {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: start;
  /* Match the qty cell's height when empty so the row never collapses
     awkwardly above the next dance type. */
  min-height: 40px;
}
/* Note: do NOT add a `> div` gap override here — the readonly Extended Line
   container holds a `.field` div directly, and overriding its gap would
   push the Style input below the qty input. generate_style_dropdowns sets
   its own inline gap on its wrapper Div, so no rule is needed for the
   non-readonly Solo/Duet/Trio/Groups paths. */

/* =========================================================
   Tom Select — themed against Pinksheet pink tokens.
   Mirrors editors.css overrides but scoped to pinksheet's design system.
   The CDN ships a vanilla theme; these rules retake the cascade so the
   chip input matches our .input/.select chrome.
   ========================================================= */
.ts-wrapper { font-family: var(--font-ui); font-size: 14px; }

/* TomSelect copies source-select classes onto .ts-wrapper. Reset any
   .select chrome the wrapper inherited so only .ts-control is styled. */
.ts-wrapper.select,
.ts-wrapper.input,
.ts-wrapper.textarea,
.ts-wrapper.tom-target {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Hide the source <select> in every state TomSelect cycles through. */
select.tom-target,
select.tomselected,
select.ts-hidden-accessible,
.ts-wrapper > select,
.ts-wrapper + select,
.ts-wrapper ~ select {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ts-wrapper .ts-control {
  min-height: 40px;
  padding: 5px 10px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  box-shadow: none;
  transition: border-color 180ms, box-shadow 180ms, background 180ms;
}
.ts-wrapper.multi .ts-control { padding: 4px 6px; }
.ts-wrapper .ts-control:hover { border-color: var(--ink-4); }
.ts-wrapper.focus .ts-control,
.ts-wrapper .ts-control.focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-soft);
  background: #FFFDFC;
  outline: 0;
}
.ts-wrapper .ts-control input { color: var(--ink); }
.ts-wrapper .ts-control input::placeholder { color: var(--ink-4); }

.ts-dropdown {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--r) !important;
  box-shadow: var(--shadow-lg) !important;
  margin-top: 4px !important;
  z-index: 1080 !important;
  font-size: 14px;
}
.ts-dropdown .ts-dropdown-content {
  background: var(--surface) !important;
  color: var(--ink) !important;
}
.ts-dropdown .option,
.ts-dropdown .no-results {
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
}
.ts-dropdown .option.active,
.ts-dropdown .active {
  background: var(--pink-softer);
  color: var(--pink-ink);
}
.ts-dropdown .option.selected {
  background: var(--pink-soft);
  color: var(--pink-ink);
}

/* Chips — match the pink-soft tag look on the Pinksheet brand */
.ts-wrapper.multi .ts-control > div.item {
  background: var(--pink-softer);
  color: var(--pink-ink);
  border: 1px solid color-mix(in oklab, var(--pink) 25%, transparent);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.6;
  margin: 2px;
}
.ts-wrapper.multi .ts-control > div.item.active {
  background: var(--pink-soft);
  color: var(--pink-ink);
  border-color: color-mix(in oklab, var(--pink) 45%, transparent);
}
.ts-wrapper .ts-control > div.item .remove,
.ts-wrapper.multi .ts-control > div.item .remove {
  border-left: 1px solid color-mix(in oklab, var(--pink) 25%, transparent);
  color: var(--pink-ink);
  margin-left: 6px;
  padding-left: 6px;
  opacity: 0.75;
}
.ts-wrapper .ts-control > div.item .remove:hover {
  opacity: 1;
  color: var(--pink-hover);
}

/* The .field's positioned ✓/× marks would land on top of the chip input.
   The TomSelect wrapper handles its own visual state, so suppress them. */
.field:has(.ts-wrapper) .v-mark { display: none !important; }

/* =========================================================
   Multi-student cards (Company family registration)
   The card is a lightweight wrapper: a pink banner labels the group of
   sections that follow ("Student N" + Remove). Sections inside stack
   with their normal margin/border so they look identical to a single-
   student form — no flush-stacked borders, no wrapper background.
   Extra trailing margin separates one student's group from the next.
   ========================================================= */
.student-card {
  position: relative;
  margin-bottom: 32px;
}
.student-card:last-of-type { margin-bottom: 14px; }

.student-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--pink-soft);
  border: 1px solid var(--pink-tint);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.student-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink-ink);
  font-weight: 600;
}
.student-remove-btn {
  background: transparent;
  border: 1px solid var(--pink);
  color: var(--pink-ink);
  padding: 4px 12px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-ui);
  letter-spacing: 0.04em;
  transition: all 180ms;
}
.student-remove-btn:hover {
  background: var(--pink);
  color: #fff;
}

.add-student-row {
  display: flex;
  justify-content: center;
  margin: 4px 0 22px;
}
.add-student-btn {
  background: var(--surface);
  color: var(--pink-ink);
  border: 1.5px dashed var(--pink);
  padding: 12px 28px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 180ms;
}
.add-student-btn:hover {
  background: var(--pink-softer);
  border-style: solid;
}

/* Per-student divider rows inside the family fee list (sticky estimator).
   Headers carry the "Student N" chip + the dancer's first name; subsequent
   item rows look like the legacy fee-list rows. */
.fee-list-family li.fee-student-hd {
  border-top: 1px solid var(--pink-tint);
  border-bottom: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}
.fee-list-family li.fee-student-hd:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 6px;
}
.fee-list-family li.fee-student-hd .fee-cat {
  background: var(--pink-soft);
  color: var(--pink-ink);
  padding: 2px 8px;
  border-radius: 999px;
}
.fee-list-family li.fee-student-hd .fee-label {
  font-weight: 600;
  color: var(--ink);
}
.fee-list-family li.fee-student-empty {
  padding: 4px 0 8px;
  border-bottom: 1px dashed var(--border);
}
