/* Swirl World fundraising orders — shared UI for the order form and the board.
   Same tokens as version-8: deep purple page, cream card stock, sage/forest
   accents, Luckiest Guy display over Century Gothic/Jost text. */

@font-face {
  font-family: 'Luckiest Guy';
  src: url('/fonts/luckiest-guy-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  src: url('/fonts/jost-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --purple: #522394;
  --purple-deep: #3B1769;
  --purple-lift: #632CAF;
  --sage: #92D66F;
  --forest: #195E1C;
  --forest-deep: #0E3A10;
  --coral: #F15B40;
  --amber: #FFC53D;
  --amber-ink: #6b4d00;
  --cream: #FFF4E4;
  --ink: #23103F;
  --card: #FFFFFF;
  --display: 'Luckiest Guy', 'Arial Black', sans-serif;
  --text: 'Century Gothic', 'Jost', system-ui, sans-serif;
  --r-pill: 999px;
  --r-card: 24px;
  --r-soft: 14px;
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--purple);
  color: var(--cream);
  font-family: var(--text);
  font-size: 16.5px;
  line-height: 1.5;
}
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 18px 16px 140px; }

.top { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; }
.top a { display: flex; flex: none; border-radius: 12px; }
.top img { width: 74px; height: auto; }
.top h1 {
  font-family: var(--display); font-weight: 400; margin: 0;
  font-size: clamp(1.5rem, 6vw, 2.2rem); line-height: 1; letter-spacing: 0.01em;
}
.top .sub { margin: 2px 0 0; opacity: 0.85; font-size: 0.92rem; }

/* cards */
.card {
  background: var(--card); color: var(--ink);
  border-radius: var(--r-card); padding: 20px; margin: 0 0 16px;
}
.card h2 {
  font-family: var(--display); font-weight: 400; margin: 0 0 4px;
  font-size: 1.35rem; line-height: 1.1; text-transform: uppercase;
}
.card .hint { margin: 0 0 14px; font-size: 0.92rem; opacity: 0.75; }

/* form controls */
.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field > span { font-weight: 700; font-size: 0.95rem; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=date], .field textarea, .field select {
  border: 2px solid rgba(35, 16, 63, 0.2); border-radius: var(--r-soft);
  padding: 12px 14px; background: #fff; color: var(--ink); width: 100%;
}
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--purple-lift); outline-offset: 2px;
}
.field .err { color: #B3261E; font-size: 0.88rem; font-weight: 700; }
.optional { opacity: 0.6; font-weight: 400; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 2px solid rgba(35, 16, 63, 0.25); background: #fff; color: var(--ink);
  border-radius: var(--r-pill); padding: 10px 18px; font-weight: 700;
}
.pill.is-on { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.pill.is-taken { opacity: 0.45; text-decoration: line-through; cursor: not-allowed; }
.pill .tag { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; }
.pill.is-rec:not(.is-on) { border-color: var(--forest); color: var(--forest); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.98rem; margin: 0 0 12px; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--forest); flex: none; }

/* flavour rows */
.frow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(35, 16, 63, 0.12);
}
.frow:last-child { border-bottom: 0; }
.frow .name { flex: 1; min-width: 0; font-weight: 700; }
.frow .name .sub { display: block; font-weight: 400; font-size: 0.78rem; opacity: 0.75; }
.star { font-size: 1.05rem; }
.star--red { color: #C4381F; }
.star--yellow { color: #B8860B; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--purple); color: var(--cream); font-weight: 700; font-size: 1.15rem;
}
.stepper button.minus { background: rgba(35, 16, 63, 0.15); color: var(--ink); }
.stepper input {
  width: 64px; text-align: center; border: 2px solid rgba(35, 16, 63, 0.2);
  border-radius: 10px; padding: 8px 4px; font-variant-numeric: tabular-nums; font-weight: 700;
}
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.quick button {
  border: 0; background: rgba(82, 35, 148, 0.1); color: var(--purple);
  border-radius: var(--r-pill); padding: 7px 14px; font-weight: 700; font-size: 0.85rem;
}

/* dates */
.daterow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.daterow input[type=date] { flex: 1; min-width: 10rem; }
.daterow .kill { border: 0; background: none; color: #B3261E; font-weight: 700; }

/* flags shown to the customer — always the same gentle line */
.gentle {
  background: #FFF3D6; color: var(--amber-ink); border-radius: var(--r-soft);
  padding: 12px 14px; font-size: 0.95rem; margin: 10px 0 0;
}

/* sticky live summary */
.summary {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--forest); color: var(--cream);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
}
.summary .in { max-width: 46rem; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.summary .nums { flex: 1; min-width: 12rem; line-height: 1.35; font-size: 0.95rem; }
.summary .keep b { font-family: var(--display); font-size: 1.25rem; color: var(--sage); letter-spacing: 0.02em; }
.summary .go {
  border: 0; border-radius: var(--r-pill); background: var(--sage); color: var(--forest-deep);
  font-family: var(--display); font-size: 1.15rem; letter-spacing: 0.03em;
  padding: 13px 26px 10px; white-space: nowrap;
}
.summary .go:disabled { opacity: 0.5; cursor: default; }

/* wizard nav */
.steps-nav { display: flex; gap: 6px; margin: 0 0 16px; }
.steps-nav span { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 244, 228, 0.25); }
.steps-nav span.done { background: var(--sage); }
.wiznav { display: flex; justify-content: space-between; gap: 10px; margin: 4px 0 0; }
.btn {
  border: 0; border-radius: var(--r-pill); padding: 13px 24px; font-weight: 700; font-size: 1rem;
  background: var(--cream); color: var(--ink);
}
.btn--primary { background: var(--sage); color: var(--forest-deep); }
.btn--ghost { background: rgba(255, 244, 228, 0.16); color: var(--cream); }
.btn--danger { background: #B3261E; color: #fff; }

/* dialog */
dialog {
  border: 0; border-radius: var(--r-card); padding: 0; max-width: 32rem; width: calc(100% - 32px);
  color: var(--ink);
}
dialog::backdrop { background: rgba(35, 16, 63, 0.6); }
/* The resale question: centred, the Yes unmistakably the main action,
   the page softly blurred behind it. */
#resale-dialog::backdrop {
  background: rgba(35, 16, 63, 0.45);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
#resale-dialog .dlg { text-align: center; }
#resale-dialog .btns {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}
#resale-dialog .btn--primary {
  font-size: 1.2rem;
  padding: 17px 28px;
  order: -1;              /* Yes on top, big */
}
#resale-dialog .btn { text-align: center; }
.dlg { padding: 22px; }
.dlg h3 { font-family: var(--display); font-weight: 400; font-size: 1.4rem; margin: 0 0 10px; line-height: 1.1; }
.dlg--red h3 { color: #C4381F; }
.dlg--yellow h3 { color: #8A6300; }
.dlg p { font-size: 0.95rem; }
.dlg .ack { display: flex; gap: 10px; align-items: flex-start; background: rgba(35,16,63,0.06); border-radius: var(--r-soft); padding: 12px; font-weight: 700; font-size: 0.93rem; }
.dlg .ack input { width: 22px; height: 22px; flex: none; accent-color: var(--forest); }
.dlg .btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: flex-end; }

/* confirmation */
.done-card { text-align: center; padding: 34px 22px; }
.done-card h2 { font-size: 2rem; }
.done-card .inv { font-family: var(--display); font-size: 1.6rem; color: var(--forest); letter-spacing: 0.02em; }

/* history */
.hist { border-bottom: 1px solid rgba(35,16,63,0.12); padding: 10px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hist .meta { flex: 1; min-width: 10rem; font-size: 0.92rem; }
.hist .meta b { display: block; }

/* ======================= board ======================= */
.board-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0 14px; }
.board-top .spacer { flex: 1; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button {
  border: 0; border-radius: var(--r-pill); padding: 9px 18px; font-weight: 700;
  background: rgba(255, 244, 228, 0.16); color: var(--cream);
}
.tabs button.is-on { background: var(--cream); color: var(--ink); }

.ocard { background: var(--card); color: var(--ink); border-radius: var(--r-card); margin: 0 0 14px; overflow: hidden; }
.ocard > header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; cursor: pointer;
}
.ocard .inv { font-family: var(--display); font-size: 1.15rem; letter-spacing: 0.02em; }
.ocard .who { flex: 1; min-width: 10rem; font-weight: 700; }
.ocard .who small { display: block; font-weight: 400; opacity: 0.7; }
.chip { border-radius: var(--r-pill); padding: 3px 12px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.chip--new { background: rgba(82, 35, 148, 0.12); color: var(--purple); }
.chip--accepted { background: rgba(25, 94, 28, 0.14); color: var(--forest); }
.chip--made { background: var(--forest); color: var(--cream); }
.chip--handed { background: rgba(35, 16, 63, 0.12); color: var(--ink); }
.chip--cancelled { background: rgba(35,16,63,0.08); color: rgba(35,16,63,0.5); text-decoration: line-through; }
.chip--paid { background: var(--sage); color: var(--forest-deep); }
.chip--unpaid { background: #FBE3DD; color: #C4381F; }
.chip--hold { background: #FBE3DD; color: #C4381F; }
.chip--flag { background: #FFF3D6; color: var(--amber-ink); }
.chip--due { background: #C4381F; color: #fff; }
.ocard .body { border-top: 1px solid rgba(35, 16, 63, 0.1); padding: 16px 18px; display: grid; gap: 14px; }
.ocard .cols2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .ocard .cols2 { grid-template-columns: 1fr 1fr; } }
.kv { font-size: 0.92rem; display: grid; gap: 3px; }
.kv b { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; }

.pack { border: 1px solid rgba(35, 16, 63, 0.14); border-radius: var(--r-soft); overflow: hidden; }
.pack .prow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid rgba(35,16,63,0.09); font-size: 0.95rem; }
.pack .prow:last-child { border-bottom: 0; }
.pack .prow .name { flex: 1; font-weight: 700; }
.pack .prow .name small { display: block; font-weight: 400; opacity: 0.65; }
.pack input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--forest); }
.pack .boxes-in { width: 60px; text-align: center; border: 2px solid rgba(35,16,63,0.2); border-radius: 8px; padding: 5px; font-weight: 700; }
.pack .head { background: rgba(35,16,63,0.05); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.75; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .btn { padding: 10px 18px; font-size: 0.92rem; }
.btn--forest { background: var(--forest); color: var(--cream); }
.btn--purple { background: var(--purple); color: var(--cream); }
.btn--soft { background: rgba(35, 16, 63, 0.08); color: var(--ink); }

.countdown { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.85rem; }
.countdown.is-close { color: #C4381F; }

table.stmt { width: 100%; border-collapse: collapse; font-size: 0.93rem; color: var(--ink); }
.stmt th, .stmt td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(35,16,63,0.1); }
.stmt td.num, .stmt th.num { text-align: right; font-variant-numeric: tabular-nums; }
.stmt tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }

.note { font-size: 0.88rem; opacity: 0.8; }
.center { text-align: center; }

/* --- round-eight refinements --------------------------------------------- */

/* Star indents only the flavour name line; the subline keeps the left edge. */
.frow .name .nline { display: block; }
.frow .name .sub { margin-left: 0; }

/* +25 hot key beside the stepper — fast lane to 50 / 75 / 125. */
.stepper .plus25 {
  width: auto; height: 40px; border-radius: 999px; padding: 0 12px;
  background: rgba(82, 35, 148, 0.12); color: var(--purple);
  font-size: 0.85rem; font-weight: 700; border: 0;
}
.quick button.is-open { background: var(--purple); color: var(--cream); }

/* Team-recommended slider */
.tslider { margin: 14px 0 0; display: grid; gap: 8px; }
.tslider label { font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.tslider output { font-family: var(--display); font-size: 1.3rem; color: var(--forest); font-variant-numeric: tabular-nums; }
.tslider input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px;
  border-radius: 999px; background: rgba(35, 16, 63, 0.15); cursor: pointer; outline-offset: 4px;
}
.tslider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.tslider input[type=range]::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Payment methods: Pay online leads, the rest stack beneath it. */
.pills--stack { flex-direction: column; align-items: stretch; }
.pills--stack .pill { text-align: left; }
.pill--hot { border-color: var(--forest); color: var(--forest); font-size: 1.05rem; }
.pill--hot.is-on { background: var(--forest); color: var(--cream); }

/* The summary bar holds one row on every phone: round back arrow, compact
   numbers, Next — no wrapping that eats the viewport. */
.summary .in { flex-wrap: nowrap; }
.summary .nums { min-width: 0; font-size: 0.88rem; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.summary .keep b { font-size: 1.1rem; }
.summary .go { font-size: 1.05rem; padding: 12px 20px 9px; }
.summary .back {
  flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%;
  font-size: 1.5rem; font-weight: 700; line-height: 1;
  background: rgba(255, 244, 228, 0.18); color: var(--cream);
}

/* The board runs on the store iPads and nothing else — tuned for 768–1024px
   landscape/portrait, comfortable touch targets throughout. */
@media (min-width: 768px) {
  .board-top h1 { font-size: 1.9rem; }
  .tabs button { padding: 11px 22px; font-size: 1.02rem; }
  .ocard > header { padding: 16px 22px; }
  .pack input[type=checkbox] { width: 27px; height: 27px; }
  .actions .btn { padding: 13px 24px; font-size: 1rem; }
}

/* catering builder sliders */
.profitish { margin: 0 0 16px; }
.crange {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px;
  border-radius: 999px; background: rgba(35, 16, 63, 0.15); cursor: pointer; outline-offset: 4px;
}
.crange::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.crange::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.profitish label { display: flex; justify-content: space-between; font-weight: 700; margin: 0 0 4px; }
