/* Weekly orders — shared styles. Colors and fonts come from theme.json (see common.js). */
:root {
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --text: #15171C;
  --muted: #6A6F7A;
  --accent: #15171C;
  --accent-text: #FFFFFF;
  --border: #E4E4DF;
  --ok: #157A55;
  --warn: #A15C00;
  --danger: #B42318;
  --accent-soft: color-mix(in srgb, var(--accent) 7%, transparent);
  --border-strong: color-mix(in srgb, var(--text) 18%, var(--border));
  --warn-soft: color-mix(in srgb, var(--warn) 10%, var(--surface));
  --danger-soft: color-mix(in srgb, var(--danger) 8%, var(--surface));
  --ok-soft: color-mix(in srgb, var(--ok) 10%, var(--surface));

  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;
  --shadow: 0 1px 2px rgba(16, 18, 24, .04), 0 4px 16px rgba(16, 18, 24, .05);
  --shadow-lift: 0 2px 4px rgba(16, 18, 24, .06), 0 12px 32px rgba(16, 18, 24, .10);
  --wrap: 640px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 16px; }
.page { padding-bottom: 120px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-heading); letter-spacing: -0.02em; margin: 0; }
h1 { font-weight: 800; font-size: clamp(28px, 6vw, 36px); line-height: 1.1; }
h2 { font-weight: 700; font-size: 20px; line-height: 1.25; }
h3 { font-weight: 700; font-size: 17px; line-height: 1.3; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.label {
  font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.site-header { padding: 28px 0 8px; }
.site-header .logo { height: 44px; width: auto; margin-bottom: 14px; }
.site-header .label { margin-bottom: 10px; }
.site-header p { margin-top: 8px; color: var(--muted); max-width: 46ch; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 20px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 500 12px/1 var(--font-body); padding: 6px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text); border: 1px solid transparent;
}
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.outline { background: transparent; border-color: var(--border-strong); color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- menu day ---------- */
.day { padding: 0; overflow: hidden; }
.day-top { padding: 20px 20px 4px; }
.day-top .label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-top h2 { margin-top: 10px; }
.day-top .desc { margin-top: 6px; color: var(--muted); font-size: 15px; }
.day.closed .day-top h2, .day.closed .option-name { color: var(--muted); }
.options { padding: 8px 8px 8px; }
.option {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md);
  transition: background .15s ease;
}
.option + .option { border-top: 1px solid var(--border); border-radius: 0; }
.option.in-cart { background: var(--accent-soft); border-radius: var(--r-md); }
.option.in-cart + .option { border-top-color: transparent; }
.option.highlight { box-shadow: inset 0 0 0 2px var(--warn); border-radius: var(--r-md); }
.option-info { flex: 1; min-width: 0; }
.option-name { font-weight: 600; }
.option-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.price { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; }

/* stepper */
.stepper {
  display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); height: 44px; flex: none;
}
.stepper button {
  width: 44px; height: 42px; border: 0; background: none; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; font-size: 20px; line-height: 1;
}
.stepper button:disabled { color: var(--border-strong); cursor: default; }
.stepper button:not(:disabled):hover { background: var(--accent-soft); }
.stepper output { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.add-btn {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: 44px; min-width: 76px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface);
  font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1; color: var(--text); cursor: pointer; flex: none;
}
.cust-preview .add-btn { cursor: default; }
.add-btn:hover:not(:disabled) { border-color: var(--text); }
.add-btn:disabled { color: var(--muted); cursor: default; background: transparent; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: var(--r-md); border: 1px solid var(--border-strong);
  background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.12); }
.btn.block { width: 100%; }
.btn.sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }

/* ---------- cart ---------- */
.cart-day + .cart-day { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border-strong); }
.cart-day .label { margin-bottom: 8px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.line .qty { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
.totals { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.totals .line.total { font-weight: 700; font-size: 18px; padding-top: 8px; }
.empty { padding: 8px 0; color: var(--muted); }

/* ---------- forms ---------- */
.field + .field { margin-top: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); }
.input, .clover-field {
  width: 100%; height: 50px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease;
}
.clover-field { padding: 0; display: flex; align-items: center; overflow: hidden; }
.clover-field iframe { width: 100%; height: 48px !important; }
.clover-field:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Clover's footer (moved under the Pay button by order.js) */
.clover-footer { background: transparent !important; padding: 14px 0 0 !important; border-radius: 0 !important;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; }
.clover-footer .clover-secure-payments, .clover-footer .clover-privacy-link {
  font-family: var(--font-body) !important; font-size: 12.5px !important; font-weight: 500 !important; line-height: 1.4 !important;
  color: var(--muted) !important; }
.clover-footer .clover-secure-payments { display: inline-flex; align-items: center; }
.clover-footer .clover-secure-payments b { font-weight: 600; margin-left: 3px; }
.clover-footer img { display: inline-block !important; margin: 0 6px !important; max-width: 14px !important; height: auto; opacity: .7; }
.clover-footer .clover-privacy-link { text-decoration: underline; text-underline-offset: 2px; }
.input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 14px; margin-top: 6px; min-height: 0; }
.err:empty { display: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.consent {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); cursor: pointer;
}
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.consent strong { display: block; font-size: 15px; }
.consent span { font-size: 13.5px; color: var(--muted); }

.notice {
  padding: 12px 14px; border-radius: var(--r-md); background: var(--danger-soft); color: var(--danger);
  font-size: 15px; border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent);
}
.notice.info { background: var(--accent-soft); color: var(--text); border-color: var(--border); }
.notice.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.notice + .notice { margin-top: 8px; }

.test-box {
  border: 1px dashed var(--border-strong); border-radius: var(--r-md); padding: 14px; display: flex; gap: 12px; align-items: flex-start;
}
.secure { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 12px; }

/* ---------- sticky checkout bar ---------- */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); transform: translateY(110%); transition: transform .25s ease;
}
.cartbar:not(.show) { visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.cartbar.show { transform: none; }
.cartbar .btn { max-width: var(--wrap); margin: 0 auto; display: flex; width: 100%; justify-content: space-between; box-shadow: var(--shadow-lift); }
.cartbar .count {
  background: color-mix(in srgb, var(--accent-text) 18%, transparent); border-radius: 999px; padding: 2px 9px; font-size: 13px;
}

/* ---------- test mode bar ---------- */
.testbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 8px 10px 8px 12px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-md); font-size: 13.5px; color: var(--muted);
}
.testbar select { margin-left: auto; height: 34px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); padding: 0 8px; font-size: 13.5px; }

/* ---------- confirmation ---------- */
.confirm-hero { text-align: center; padding: 36px 20px 28px; }
.check {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ok-soft); color: var(--ok);
}
.confirm-hero p { margin-top: 8px; color: var(--muted); }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { position: relative; }
.tl-item + .tl-item { margin-top: 20px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--text); }
.tl-item h3 { margin-bottom: 2px; }

/* ---------- skeleton ---------- */
.skel { background: linear-gradient(90deg, var(--border) 25%, color-mix(in srgb, var(--border) 50%, var(--surface)) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- staff app ---------- */
.staff .page { padding-bottom: 64px; }
.staff .wrap { max-width: 920px; }
.appbar {
  position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.appbar-top { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; }
.appbar-top .brand { flex: 1; min-width: 0; }
.appbar-top .brand .label { margin-bottom: 4px; }
.appbar-top h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 4px; margin-bottom: -1px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  height: 42px; padding: 0 14px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.tabs button .count:empty { display: none; }
.tabs button .count { margin-left: 6px; font: 500 11px/1 var(--font-mono); background: var(--accent-soft); padding: 3px 6px; border-radius: 999px; color: var(--muted); }

.datebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.datebar .day-title { flex: 1; min-width: 180px; }
.datebar .day-title h2 { font-size: 24px; font-weight: 800; }
.datebar .day-title .label { margin-bottom: 4px; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; font-size: 18px; flex: none;
}
.iconbtn:hover { border-color: var(--text); }
.datebar input[type="date"] { height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); padding: 0 10px; font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 18px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: var(--surface); padding: 14px 16px; }
.stat .big { font: 800 26px/1.1 var(--font-heading); letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.progress { height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .3s ease; }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.search { position: relative; flex: 1 1 220px; }
.search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); padding: 0 12px 0 36px; }
.search svg { position: absolute; left: 11px; top: 11px; color: var(--muted); }
.fchip { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); }
.fchip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }

.list { margin-top: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.row + .row { border-top: 1px solid var(--border); }
.row .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font: 700 14px/1 var(--font-heading); flex: none; }
.row .who { flex: 1; min-width: 0; }
.row .who .name { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .who .meta { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.row .who .items { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.qtychip { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; padding: 4px 9px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); }
.qtychip b { font-family: var(--font-mono); font-weight: 600; }
.row.done { background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
.row.done .name, .row.done .items { opacity: .55; }
.row .act { flex: none; }
.pickbtn { min-width: 128px; height: 46px; }
.pickbtn.is-done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.list .empty-row { padding: 28px 16px; text-align: center; color: var(--muted); }

/* kitchen */
.kgrid { display: grid; gap: 14px; margin-top: 18px; }
.kcard { padding: 0; overflow: hidden; }
.kcard-head { padding: 18px 20px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--border); }
.kcard-body { display: grid; grid-template-columns: 1.1fr 1fr; }
.kmake { padding: 16px 20px; }
.kmake .mrow { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; }
.kmake .mrow + .mrow { border-top: 1px dashed var(--border-strong); }
.kmake .mrow .n { font: 800 30px/1 var(--font-heading); font-variant-numeric: tabular-nums; }
.kpools { padding: 16px 20px; background: var(--bg); border-left: 1px solid var(--border); display: grid; gap: 14px; align-content: start; }
.bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--text); border-radius: inherit; }
.bar.full > span { background: var(--danger); }
.bar.near > span { background: var(--warn); }
.comp-row { display: flex; justify-content: space-between; font-size: 14px; gap: 8px; }

/* menu builder */
.weekbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.weekbar .wk { flex: 1; min-width: 200px; }
.weekbar .wk h2 { font-size: 24px; font-weight: 800; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.slots { display: grid; gap: 14px; margin-top: 18px; }
.slot { padding: 0; overflow: hidden; }
.slot-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg); }
.slot-head .label { flex: 1; }
.slot-body { padding: 18px; }
.slot-empty { padding: 26px 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; text-align: center; }
.slot-empty p { width: 100%; color: var(--muted); margin-bottom: 4px; }
.slot h3 { font-size: 19px; }
.opt-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15px; }
.opt-table th { text-align: left; padding: 6px 0; border-bottom: 1px solid var(--border); }
.opt-table td { padding: 10px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.opt-table tr:last-child td { border-bottom: 0; }
.opt-table .r { text-align: right; }
.pools { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.pool { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pool .pname { flex: 1; min-width: 120px; }
.limit-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); height: 40px; }
.limit-stepper button { width: 38px; height: 38px; border: 0; background: none; cursor: pointer; font-size: 18px; border-radius: 9px; }
.limit-stepper button:hover { background: var(--accent-soft); }
.limit-stepper input { width: 56px; border: 0; text-align: center; font: 600 16px/1 var(--font-body); background: none; height: 38px; -moz-appearance: textfield; }
.limit-stepper input::-webkit-outer-spin-button, .limit-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.slot-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.linkbtn:hover { color: var(--text); }
.publishbar {
  position: sticky; bottom: 0; z-index: 20; margin-top: 18px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); display: flex; gap: 12px; align-items: center;
}
.publishbar .info { flex: 1; font-size: 14px; color: var(--muted); }

/* modal / sheet */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(15, 17, 22, .38); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.modal {
  background: var(--surface); width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lift); animation: up .2s ease; display: flex; flex-direction: column;
}
@media (min-width: 700px) { .modal-back { align-items: center; } .modal { border-radius: var(--r-xl); } }
.modal-head { position: sticky; top: 0; background: var(--surface); padding: 18px 20px 12px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; z-index: 1; }
.modal-head .t { flex: 1; }
.modal-body { padding: 18px 20px; flex: 1; }
.modal-foot { position: sticky; bottom: 0; background: var(--surface); padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.pick-list { display: grid; gap: 8px; margin-top: 12px; }
.pick { text-align: left; width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-md); padding: 14px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; }
.pick:hover { border-color: var(--text); }
.pick .pk-main { flex: 1; min-width: 0; }
.pick .pk-main strong { display: block; }
.pick .pk-opts { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.edit-grid { display: grid; grid-template-columns: 1fr 100px 136px 40px; gap: 8px; align-items: end; }
.edit-grid .input { height: 44px; }
.edit-grid.multi { grid-template-columns: 1fr 100px 40px; }
.edit-grid.head { font-size: 13px; font-weight: 600; color: var(--muted); }
.edit-grid + .edit-grid { margin-top: 8px; }
.input.sm { height: 44px; }
.toggle { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 14.5px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); font-size: 14px; color: var(--muted); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lift); font-size: 14.5px; display: flex; gap: 12px; align-items: center; animation: up .2s ease; max-width: calc(100% - 32px); }
.toast button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; }
.key-card { max-width: 420px; margin: 48px auto 0; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .row { flex-wrap: wrap; }
  .row .act { width: 100%; padding-left: 54px; }
  .pickbtn { width: 100%; }
  .kcard-body { grid-template-columns: 1fr; }
  .kpools { border-left: 0; border-top: 1px solid var(--border); }
  .edit-grid { grid-template-columns: 1fr 78px 112px 40px; gap: 6px; }
  .edit-grid.multi { grid-template-columns: 1fr 90px 40px; }
  .datebar .day-title { flex: 1 1 100%; }
  .datebar input[type="date"] { flex: 1; min-width: 0; }
  .search { flex: 1 1 100%; }
  .appbar-top h1 { font-size: 17px; white-space: normal; }
  .stat { padding: 12px 14px; }
  .stat .big { font-size: 22px; }
  .row .act { padding-left: 0; }
  .pickbtn { height: 44px; }
  .datebar .day-title h2, .weekbar .wk h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  .appbar, .datebar button, .datebar input, .filters button, #toast-root, #modal-root { display: none !important; }
  body { background: #fff; }
  .card, .list { box-shadow: none; }
}

/* menu builder: several dishes per day */
.dish-block { padding: 18px; }
.dish-block + .dish-block { border-top: 1px solid var(--border); }
.dish-title { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.day-add { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px 18px; border-top: 1px dashed var(--border-strong); background: color-mix(in srgb, var(--bg) 50%, var(--surface)); }
.slot-empty + .day-add { border-top: 0; justify-content: center; background: none; padding-top: 4px; }
.pick:disabled { opacity: .5; cursor: default; }
.pick:disabled:hover { border-color: var(--border); }

/* order page: several dishes under one pickup day */
.dish-sec + .dish-sec { border-top: 1px solid var(--border); }
.dish-sec .dish-head { padding: 16px 20px 4px; }
.dish-sec .dish-head h2 { font-size: 19px; }
.dish-sec .dish-head .desc { margin-top: 4px; color: var(--muted); font-size: 15px; }
.dish-sec.closed .dish-head h2, .dish-sec.closed .option-name { color: var(--muted); }

/* ---------- several menus at once (weekly + holiday) ---------- */
.menu-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 10px 0;
  margin: -10px 0 4px; background: var(--bg); scrollbar-width: none; }
.menu-nav::-webkit-scrollbar { display: none; }
.menu-pill { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  font-family: var(--font-heading); font-weight: 700; font-size: 15px; line-height: 1.2; box-shadow: var(--shadow); }
.menu-pill:hover { border-color: var(--border-strong); }
.menu-pill-sub { font-family: var(--font-body); font-weight: 500; font-size: 12px; opacity: .7; }
.menu-sec { scroll-margin-top: 80px; }
.menu-sec + .menu-sec { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }
.menu-head { padding: 0 4px; }
.menu-head h2 { font-size: 26px; margin-top: 4px; }
.menu-head p { margin-top: 6px; }
.menu-kind { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- staff: menus (weekly, holiday, special) ---------- */
.menus-area { margin-top: 20px; }
.menus-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.menu-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.mcard { flex: 0 0 auto; width: 200px; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  font: inherit; box-shadow: var(--shadow); }
.mcard:hover { border-color: var(--border-strong); }
.mcard.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text), var(--shadow); }
.mcard.past-toggle { width: 160px; background: transparent; box-shadow: none; border-style: dashed; }
.mc-kind { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mc-name { font-family: var(--font-heading); font-weight: 700; font-size: 16px; line-height: 1.25; }
.mc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 2px; }
.menu-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 22px; }
.menu-detail-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.add-day { width: 100%; padding: 16px; border-radius: var(--r-lg); border: 1px dashed var(--border-strong); background: transparent;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.add-day:hover { background: var(--accent-soft); }
.type-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.tile span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tile.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
@media (max-width: 480px) { .type-tiles { grid-template-columns: 1fr; } }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.preset { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  font: inherit; font-size: 14px; cursor: pointer; }
.preset.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.daychips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 36px; }
.daychip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--accent-soft);
  font-size: 14px; font-weight: 600; }
.daychip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
.daychip button:hover { background: var(--border); color: var(--text); }
.adddate { display: flex; gap: 8px; margin-top: 10px; }
.adddate .input { max-width: 200px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border);
  margin-bottom: 8px; cursor: pointer; }
.choice.on { border-color: var(--text); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-tiles + .field, .presets + .field, .choice + .field, .choice + .two { margin-top: 18px; }
.two .field + .field { margin-top: 0; }

/* Placeholder text over Clover's card boxes */
.clover-field { position: relative; }
.clover-field .ghost { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: #9A9EA6; font-size: 16px; transition: opacity .12s ease; white-space: nowrap; }
.clover-field:focus-within .ghost, .clover-field.filled .ghost { opacity: 0; }

/* Order-by pickers */
.cut-row { display: grid; grid-template-columns: 1fr 140px; gap: 8px; align-items: center; margin-bottom: 10px; }
.cut-row .cut-label { grid-column: 1 / -1; font-weight: 600; font-size: 14px; }
@media (min-width: 560px) { .cut-row { grid-template-columns: 150px 1fr 130px; } .cut-row .cut-label { grid-column: auto; } }
.cut-chip { cursor: pointer; text-transform: none; letter-spacing: 0; font-family: var(--font-body); }
.cut-chip:disabled { cursor: default; }
.slot-head { flex-wrap: wrap; row-gap: 8px; }
.slot-head > .label { white-space: nowrap; }
.slot-head .cut-chip { order: 3; flex-basis: auto; }
@media (max-width: 560px) { .slot-head .cut-chip { order: 4; margin-right: auto; } .slot-head::after { content: ''; order: 3; flex-basis: 100%; } }

/* ---------- menu builder on a phone: compact dishes, quick add, quick limits ---------- */
.dish-block.compact { padding: 0; }
.dish-sum { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-align: left;
  background: transparent; border: 0; font: inherit; color: var(--text); cursor: pointer; min-height: 64px; }
.dish-sum:hover { background: var(--accent-soft); }
.ds-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ds-name { font-family: var(--font-heading); font-weight: 700; font-size: 16px; line-height: 1.3; }
.ds-meta { font-size: 13.5px; color: var(--muted); }
.ds-limit { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.ds-limit-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.ds-limit-l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ds-chev { color: var(--muted); font-size: 14px; width: 14px; text-align: center; }
.ds-body { padding: 0 18px 16px; }
.dish-block.open .dish-sum { background: var(--accent-soft); }
.quick-add { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.quick-add::-webkit-scrollbar { display: none; }
.qadd { flex: 0 0 auto; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 42px; }
.qadd:hover { border-color: var(--text); }
.qadd.more { font-weight: 500; color: var(--muted); border-style: dashed; }
.day-add { display: block; }
.day-add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-limits { display: flex; gap: 6px; flex-wrap: wrap; }
.qbtn { min-width: 44px; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
  font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.qbtn.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.qbtn:disabled { opacity: .35; cursor: not-allowed; }
.pool { flex-wrap: wrap; row-gap: 10px; }
.pb-actions { display: flex; gap: 8px; }
.cust-preview { background: var(--bg); margin: -4px -4px 0; padding: 4px; border-radius: var(--r-md); }
.cust-preview .card + .card { margin-top: 14px; }

.opt-table th.r, .opt-table td.r { padding-left: 14px; }
@media (max-width: 560px) {
  .publishbar { flex-wrap: wrap; gap: 10px; }
  .publishbar .info { flex: 1 1 100%; font-size: 13.5px; }
  .publishbar .pb-actions { flex: 1 1 100%; }
  .publishbar .pb-actions > * { flex: 1; }
}

/* ---------- phones ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, .add-btn, .stepper button, .menu-pill, label.consent, .qadd, .qbtn, .dish-sum { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* Checkout lines: change quantity or remove without scrolling back up */
.cart-line { padding: 10px 0; }
.cart-line + .cart-line { border-top: 1px solid var(--border); }
.cl-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cl-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-total { font-weight: 600; white-space: nowrap; }
.cl-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.stepper.sm { height: 40px; }
.stepper.sm button { width: 40px; height: 38px; }
.cl-remove { color: var(--muted); font-size: 14px; min-height: 40px; padding: 0 4px; }
.cl-remove:hover { color: var(--danger); }
.site-header .logo[src*="automate-it-wordmark"] { height: 30px; }
.consent a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }

.brand-footer { text-align: center; font-size: 13px; color: var(--muted); padding: 8px 16px calc(96px + env(safe-area-inset-bottom)); }
.brand-footer a { color: var(--muted); text-decoration: none; font-weight: 500; }
.brand-footer a:hover { color: var(--text); text-decoration: underline; }
.staff .brand-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
