:root {
  color-scheme: light;
  --forest: #173e35;
  --forest-light: #24584b;
  --gold: #d5a85f;
  --ink: #1e2b27;
  --muted: #77817b;
  --paper: #f6f4ee;
  --white: #fffefa;
  --line: #e4e6dc;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 28px;
  background:
    radial-gradient(ellipse at 87% 7%, rgba(224, 211, 184, .36), transparent 34%),
    var(--paper);
  color: var(--ink);
}

button,
input { font: inherit; }
button { cursor: pointer; }

.onboarding-shell { width: min(100%, 960px); margin: 0 auto; }
.onboarding-topbar { display: flex; align-items: center; justify-content: space-between; }
.onboarding-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--forest); font-size: .72rem; font-weight: 850; letter-spacing: .18em; line-height: 1.15; text-decoration: none; }
.onboarding-brand img { width: 40px; height: 40px; border-radius: 12px; }
.signin-link { color: var(--muted); font-size: .78rem; text-decoration: none; }
.signin-link strong { margin-left: 4px; color: var(--forest); }

.onboarding-intro { padding: 38px 0 25px; text-align: center; }
.onboarding-eyebrow,
.step-kicker { color: #9d7537; font-size: .66rem; font-weight: 850; letter-spacing: .19em; }
.onboarding-intro h1 { margin: 9px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.35rem, 5vw, 3.5rem); font-weight: 400; letter-spacing: -.04em; line-height: 1.08; }
.onboarding-intro h1 em { color: #a47d41; font-weight: 400; }
.onboarding-intro > p:last-child { margin: 0; color: var(--muted); font-size: .92rem; }

.wizard-card { overflow: hidden; border: 1px solid rgba(23, 62, 53, .08); border-radius: 24px; background: var(--white); box-shadow: 0 25px 70px rgba(32, 51, 42, .12); }
.stepper { position: relative; padding: 25px 48px 19px; border-bottom: 1px solid var(--line); }
.stepper-track { position: absolute; top: 41px; right: 12%; left: 12%; height: 2px; background: #e8e8df; }
.stepper-track span { display: block; width: 0; height: 100%; background: var(--gold); transition: width .3s ease; }
.stepper ol { position: relative; display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
.stepper li { display: flex; min-width: 52px; flex-direction: column; align-items: center; gap: 6px; color: #a1a8a1; }
.stepper li > span { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #e1e4dc; border-radius: 50%; background: var(--white); font-size: .72rem; font-weight: 700; transition: .2s ease; }
.stepper li small { font-size: .65rem; }
.stepper li.is-current { color: var(--forest); }
.stepper li.is-current > span,
.stepper li.is-complete > span { border-color: var(--forest); background: var(--forest); color: #fff; box-shadow: 0 0 0 4px rgba(23, 62, 53, .08); }
.stepper li.is-complete small { color: var(--forest); }

.wizard-step { display: none; min-height: 350px; padding: 36px 52px 25px; animation: step-in .32s ease both; }
.wizard-step.is-visible { display: block; }
.step-kicker { margin: 0 0 10px; font-size: .62rem; }
.wizard-step h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 3vw, 2.15rem); font-weight: 400; letter-spacing: -.025em; }
.step-description { max-width: 630px; margin: 9px 0 24px; color: var(--muted); font-size: .84rem; line-height: 1.6; }

.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.package-card { position: relative; display: flex; min-height: 166px; flex-direction: column; align-items: flex-start; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); text-align: left; transition: .18s ease; }
.package-card:hover { transform: translateY(-2px); border-color: #9eb4a7; }
.package-card.is-selected { border-color: var(--forest); background: linear-gradient(145deg, #f8fbf8, #fffefa); box-shadow: 0 0 0 3px rgba(23, 62, 53, .08); }
.package-card .package-check { position: absolute; top: 13px; right: 13px; display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #dfe4dc; border-radius: 50%; color: transparent; font-size: .7rem; }
.package-card.is-selected .package-check { border-color: var(--forest); background: var(--forest); color: white; }
.package-card strong { max-width: 92%; margin: 3px 0 7px; color: var(--forest); font-size: .92rem; }
.package-card .package-subtitle { margin: -5px 0 7px; color: var(--muted); font-size: .61rem; line-height: 1.3; }
.package-card .package-description { min-height: 38px; color: var(--muted); font-size: .69rem; line-height: 1.45; }
.package-card .package-price { margin-top: auto; padding-top: 11px; color: var(--ink); font-size: .72rem; font-weight: 750; }
.package-card .package-price small { color: var(--muted); font-size: .64rem; font-weight: 500; }
.package-grid-compact .package-card { min-height: 121px; padding: 14px; }
.package-grid-compact .package-description { display: none; }
.package-grid-compact .package-price { padding-top: 5px; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; max-width: 720px; }
.field-grid label,
.staff-card label { display: flex; flex-direction: column; gap: 7px; color: #37443e; font-size: .75rem; font-weight: 700; }
.field-grid input,
.staff-card input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: white; color: var(--ink); font-size: .82rem; transition: border-color .16s ease, box-shadow .16s ease; }
.field-grid input:focus,
.staff-card input:focus { border-color: #6c9787; box-shadow: 0 0 0 3px rgba(54, 111, 88, .1); }
.field-grid small { color: var(--muted); font-size: .67rem; font-weight: 400; line-height: 1.4; }
.field-grid small.field-status { min-height: 1em; }
.field-grid small.field-status.is-error { color: #a6382d; }
.field-grid small.field-status.is-success { color: var(--forest); }
.field-wide { grid-column: 1 / -1; }

.upload-zone { display: flex; min-height: 185px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px dashed #b6c4b8; border-radius: 16px; background: #f8faf6; color: var(--forest); cursor: pointer; transition: .18s ease; }
.upload-zone:hover { border-color: var(--forest); background: #f1f6f0; }
.menu-photo-upload { margin-top: 12px; }
.upload-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: #e6eee6; font-size: 1.3rem; }
.upload-zone strong { font-size: .86rem; }
.upload-zone > span:last-of-type { color: var(--muted); font-size: .68rem; }
.upload-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.csv-hint { margin: 11px 0; color: var(--muted); font-size: .7rem; }
.csv-hint code { color: var(--forest); }
.menu-preview { max-height: 160px; overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; }
.menu-preview-row { display: grid; grid-template-columns: 1fr 1.3fr 70px; gap: 12px; padding: 8px 11px; border-bottom: 1px solid #eef0e9; font-size: .7rem; }
.menu-preview-row:last-child { border-bottom: 0; }
.menu-preview-row strong { text-align: right; }
.menu-preview-heading { background: #f5f6f0; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.staff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.staff-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.staff-card header { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.role-symbol { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: #f2eee4; color: #99763d; font-size: .88rem; }
.staff-card header strong { color: var(--forest); font-size: .79rem; }
.staff-card label + label { margin-top: 10px; }
.staff-card input { height: 40px; font-size: .75rem; }

.secure-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; padding: 13px 15px; border-radius: 11px; background: #f2f6f0; color: #58675d; font-size: .72rem; line-height: 1.5; }
.secure-note span { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; font-size: .64rem; }
.billing-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.billing-option { display: flex; flex-direction: column; gap: 5px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); text-align: left; }
.billing-option.is-selected { border-color: var(--forest); background: #f6faf6; box-shadow: 0 0 0 2px rgba(23, 62, 53, .08); }
.billing-option span { font-size: .78rem; font-weight: 750; }
.billing-option small { color: var(--muted); font-size: .66rem; }
.checkout-summary { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 16px 18px; border: 1px solid #e5e8df; border-radius: 13px; background: #fbfbf7; }
.checkout-summary span { display: flex; flex-direction: column; gap: 4px; }
.checkout-summary small { color: var(--muted); font-size: .66rem; }
.checkout-summary strong { font-size: .83rem; }
.checkout-summary .summary-price { color: var(--forest); font-size: 1.25rem; }
.inline-message { min-height: 18px; margin: 11px 0 0; color: var(--muted); font-size: .72rem; }
.inline-message.is-error { color: #a6382d; }
.inline-message.is-success { color: var(--forest); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--forest); font-size: .75rem; font-weight: 750; text-decoration: underline; }
.completion-mark { display: grid; width: 52px; height: 52px; margin: 0 0 22px; place-items: center; border-radius: 17px; background: var(--forest); color: white; font-size: 1.5rem; box-shadow: 0 0 0 8px rgba(23, 62, 53, .08); }
.login-now { display: inline-flex; align-items: center; gap: 12px; margin-top: 21px; padding: 13px 18px; border-radius: 10px; background: var(--forest); color: white; font-size: .76rem; font-weight: 750; text-decoration: none; }

.wizard-actions { display: flex; min-height: 79px; align-items: center; gap: 16px; padding: 14px 52px; border-top: 1px solid var(--line); }
.step-counter { margin-right: auto; color: var(--muted); font-size: .68rem; }
.back-button { padding: 11px 13px; border: 0; background: transparent; color: var(--muted); font-size: .79rem; font-weight: 700; }
.next-button { display: inline-flex; min-width: 154px; align-items: center; justify-content: center; gap: 13px; padding: 13px 19px; border: 0; border-radius: 10px; background: var(--forest); color: #fff; font-size: .76rem; font-weight: 750; box-shadow: 0 8px 17px rgba(23, 62, 53, .17); transition: background .16s ease, transform .16s ease; }
.next-button:hover { transform: translateY(-1px); background: var(--forest-light); }
.next-button:disabled { cursor: wait; opacity: .63; transform: none; }
.pay-button { min-width: 245px; }
.onboarding-footer { padding: 17px 0; color: #89928a; font-size: .67rem; text-align: center; letter-spacing: .04em; }

@keyframes step-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 700px) {
  body { padding: 16px; }
  .onboarding-intro { padding: 31px 0 21px; }
  .stepper { padding: 20px 14px 15px; }
  .stepper-track { top: 36px; right: 11%; left: 11%; }
  .stepper li { min-width: 40px; }
  .stepper li > span { width: 29px; height: 29px; }
  .stepper li small { font-size: .56rem; }
  .wizard-step { min-height: 355px; padding: 27px 22px 23px; }
  .package-grid { grid-template-columns: 1fr; gap: 9px; }
  .package-card { min-height: 112px; }
  .package-card .package-description { min-height: 0; }
  .package-card .package-price { padding-top: 7px; }
  .package-grid-compact { grid-template-columns: 1fr; }
  .package-grid-compact .package-card { min-height: 84px; }
  .wizard-actions { padding: 13px 20px; }
  .next-button { min-width: 126px; }
  .pay-button { min-width: 190px; }
}

@media (max-width: 520px) {
  .onboarding-topbar { align-items: flex-start; }
  .signin-link { max-width: 150px; padding-top: 7px; font-size: .65rem; text-align: right; }
  .onboarding-intro h1 { font-size: 2.35rem; }
  .onboarding-intro > p:last-child { max-width: 320px; margin: 0 auto; font-size: .8rem; }
  .wizard-card { border-radius: 18px; }
  .stepper { padding-right: 8px; padding-left: 8px; }
  .stepper li { min-width: 36px; }
  .stepper li small { font-size: .5rem; }
  .stepper-track { right: 10%; left: 10%; }
  .field-grid, .staff-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .wizard-actions { gap: 8px; padding-right: 14px; padding-left: 14px; }
  .step-counter { font-size: .61rem; }
  .next-button { min-width: 118px; gap: 8px; padding: 12px; font-size: .69rem; }
  .pay-button { min-width: 178px; }
  .back-button { padding: 10px 6px; font-size: .7rem; }
  .billing-choice { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
