:root {
  /* Palette taken from the product catalog: forest-green labels on warm wood and cream. */
  --bg: #f6f0e6;
  --card: #fffdf9;
  --ink: #2a2118;
  --muted: #6b5c48;
  --focus: #1a5fd6;
  --line: #e7dccb;
  --brand: #0e4331;
  --brand-ink: #fdf8ee;
  --brand-soft: #e3eee7;
  --wood: #8b5a2b;
  --ok: #2f7d4f;
  --ok-soft: #e4f3ea;
  --danger: #b3261e;
  --warn: #8a4b00;
  --warn-soft: #fff1d2;
  --warn-line: #f0cf8a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(60, 35, 15, .06), 0 4px 16px rgba(60, 35, 15, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
a { color: var(--brand); }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

.muted { color: var(--muted); }
.center { text-align: center; }
/* Honeypot. Not offset with left:-9999px — in RTL that creates a 10000px horizontal scroll. */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* ---------- public ---------- */
body.public { padding: 0 16px 120px; max-width: 560px; margin: 0 auto; }

.hero { text-align: center; padding: 28px 8px 20px; }
.hero-strip { display: flex; justify-content: center; margin-bottom: 16px; }
.hero-strip img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--bg); box-shadow: 0 2px 8px rgba(60, 35, 15, .18);
  margin-inline-start: -14px;
}
.hero-strip img:first-child { margin-inline-start: 0; }
.hero-strip img:nth-child(3) { width: 76px; height: 76px; margin-top: -6px; z-index: 1; }
.brand-line { margin: 0 0 4px; color: var(--wood); font-weight: 700; letter-spacing: .02em; }
.hero-mark {
  width: 64px; height: 64px; margin: 0 auto 12px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 50%; font-size: 30px; font-weight: 800;
}
.hero h1 { font-size: 1.85rem; font-weight: 800; color: var(--brand); }
.hero p { margin: 6px 0 0; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
}

.field { display: block; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > span { display: block; font-weight: 500; font-size: .95rem; margin-bottom: 6px; }
.field b { color: var(--brand); font-weight: 700; }
.field i { color: var(--muted); font-style: normal; font-weight: 400; font-size: .85rem; }
.field input, .field textarea, .add-product input, .rename input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 16px; /* prevents iOS zoom on focus */
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s;
}
.field input[dir="ltr"] { text-align: right; }
.field input:focus, .field textarea:focus, .add-product input:focus, .rename input:focus { border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 72px; }
.err { display: block; color: var(--danger); font-style: normal; font-size: .88rem; margin-top: 4px; }
.err.block { margin: 0 0 10px; }

.products { list-style: none; margin: 0; padding: 0; }
.product {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 12px;
  transition: background .15s;
}
.product + .product { border-top: 1px solid var(--line); }
.product.picked { background: var(--brand-soft); border-top-color: transparent; }
.product.picked + .product { border-top-color: transparent; }
.pname { font-weight: 500; flex: 1; min-width: 0; }
.pimg {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; object-fit: cover;
  background: var(--line);
}
.pimg.sm { width: 40px; height: 40px; border-radius: 8px; }
.pimg.ph { display: grid; place-items: center; color: var(--wood); font-weight: 800; font-size: 1.2rem; }
.with-img { display: inline-flex; align-items: center; gap: 10px; }
.with-img img { border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.product.picked .pname { font-weight: 700; color: var(--brand); }
.product.picked .pimg { box-shadow: 0 0 0 2px var(--brand); }

.stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; direction: ltr; }
.stepper input {
  width: 36px; height: 40px; text-align: center;
  border: none; background: transparent; font-weight: 700; font-size: 17px;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: var(--brand);
  font-size: 22px; font-weight: 500; line-height: 1;
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.step:active { transform: scale(.94); }
.step[data-d="1"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.submit-bar {
  position: fixed; inset: auto 0 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  max-width: 560px; margin: 0 auto;
}
.count { color: var(--muted); }
.count strong { color: var(--ink); font-size: 1.2rem; }

.primary {
  background: var(--brand); color: var(--brand-ink);
  border: none; border-radius: 12px;
  min-height: 48px; padding: 0 22px; font-weight: 700; font-size: 1rem;
}
.primary:disabled { opacity: .6; }
.primary.wide { width: 100%; margin-top: 8px; }
.ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px;
  min-height: 40px; padding: 0 14px; font-weight: 500;
}
.ghost.small { min-height: 40px; padding: 0 12px; white-space: nowrap; }
.danger-link { background: none; border: none; color: var(--danger); padding: 8px; font-size: .9rem; }

.summary { list-style: none; margin: 0; padding: 0; }
.summary li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.summary li:last-child { border-bottom: none; }
.link { font-weight: 500; }

.login { max-width: 380px; margin: 12vh auto 0; }
.login h1 { font-size: 1.4rem; margin-bottom: 16px; color: var(--brand); }

/* ---------- admin ---------- */
body.admin { background: var(--bg); }
.admin-nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 4px;
  padding: 8px 16px;
  background: var(--brand);
}
.admin-nav a {
  color: #cfe0d6; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500;
}
.admin-nav a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-nav { flex-wrap: wrap; justify-content: space-between; }
.nav-links, .nav-user { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-user a { font-size: .9rem; }
.admin-nav .logout button { background: none; border: none; color: #a9c4b5; padding: 8px; }

.flash { max-width: 960px; margin: 12px auto 0; padding: 0 16px; }
.flash p { margin: 0; padding: 10px 14px; background: var(--ok-soft); color: var(--ok); border-radius: 10px; font-weight: 500; }

.wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }
.wrap > h1, .page-head h1 { font-size: 1.5rem; font-weight: 800; }
.wrap > h1 { margin-bottom: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-title { margin: 24px 0 12px; font-size: 1.15rem; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat span { display: block; color: var(--muted); font-size: .85rem; }
.stat strong { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.totals { width: 100%; border-collapse: collapse; }
.totals th { text-align: start; color: var(--muted); font-weight: 500; font-size: .85rem; padding: 6px 0; border-bottom: 1px solid var(--line); }
.totals td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.totals .num, .totals th:last-child { text-align: end; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals tfoot td { border-bottom: none; font-weight: 800; padding-top: 12px; }

.orders { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.order-card { margin: 0; display: flex; flex-direction: column; }
.order-card header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.order-card h3 { font-size: 1.1rem; }
.order-card .phone, .order-card .email { display: block; font-size: .9rem; text-decoration: none; }
.order-card .email { color: var(--muted); }
.order-card time { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.order-card .notes { background: var(--brand-soft); padding: 8px 10px; border-radius: 8px; margin: 8px 0 0; font-size: .92rem; }
.order-card footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; }
.order-card.done { background: var(--ok-soft); border-color: #bfe0cc; }
.order-card.done h3::after { content: " ✓"; color: var(--ok); }
.archive { margin-top: 28px; text-align: center; }

.add-product { display: flex; flex-wrap: wrap; gap: 8px; }
.add-product input[name="name"] { flex: 1 1 200px; }
.file-pick {
  position: relative; display: inline-flex; align-items: center; min-height: 48px;
  max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
}
.file-pick span { overflow: hidden; text-overflow: ellipsis; }
.file-pick input, .photo-pick input {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0;
}
.file-pick:focus-within, .photo-pick:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.photo-form { display: contents; }
.photo-pick { position: relative; display: block; cursor: pointer; flex-shrink: 0; border-radius: 8px; }
.photo-pick .pimg.sm { width: 48px; height: 48px; }
.photo-pick .cam {
  position: absolute; inset-inline-end: -6px; bottom: -6px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); font-size: 11px; box-shadow: 0 0 0 2px var(--card);
}
.photo-form.busy .photo-pick { opacity: .45; pointer-events: none; }
.link-btn { background: none; border: none; color: var(--muted); padding: 8px; font-size: .9rem; text-decoration: underline; }
.product-admin { list-style: none; padding: 4px 16px; }
.product-admin li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.product-admin li:last-child { border-bottom: none; }
.product-admin li.inactive .rename input { color: var(--muted); text-decoration: line-through; }
.rename { display: flex; gap: 6px; flex: 1 1 220px; }
.rename input { min-height: 40px; padding: 6px 10px; }
.row-actions {
  /* wrap: on a phone these buttons are wider than the row and used to overflow off-screen,
     taking the reorder arrows with them */
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 4px;
}
.icon { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.toggle { min-width: 70px; height: 36px; border-radius: 18px; border: 1px solid var(--line); background: #f2ece5; color: var(--muted); font-weight: 500; font-size: .88rem; }
.toggle.on { background: var(--ok-soft); color: var(--ok); border-color: #bfe0cc; }

.qr-page { text-align: center; }
.qr-sheet { background: #fff; border-radius: var(--radius); padding: 32px 16px; margin-bottom: 16px; border: 1px solid var(--line); }
.qr-sheet h1 { font-size: 2rem; font-weight: 800; color: var(--brand); }
.qr-sheet p { color: var(--muted); margin: 6px 0 0; }
.qr svg { width: min(320px, 80vw); height: auto; margin: 20px auto 8px; display: block; }
.qr-url { font-size: .95rem; word-break: break-all; }
.warn { color: var(--danger); max-width: 480px; margin: 12px auto 0; font-size: .92rem; }

@media (max-width: 520px) {
  .stat strong { font-size: 1.3rem; }
  .row-actions { width: 100%; justify-content: flex-start; }  /* wrapped rows start at the same edge */
}

@media print {
  .admin-nav, .no-print, .flash { display: none !important; }
  body { background: #fff; }
  .card, .stat, .qr-sheet { box-shadow: none; border-color: #ccc; }
  .print-break { break-before: page; }
  .order-card { break-inside: avoid; }
  .qr-sheet { border: none; }
}

/* ---------- previous order ---------- */
.prev-order { margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--line); }
.prev-order .ghost { width: 100%; min-height: 44px; color: var(--brand); border-color: var(--brand); font-weight: 700; }
.prev-order .ghost:disabled { opacity: .6; }
.prev-msg { margin: 8px 0 0; font-size: .92rem; color: var(--muted); }
.prev-msg:empty { display: none; }
.prev-msg.ok { color: var(--ok); }
.prev-msg.bad { color: var(--danger); }

/* ---------- account / users ---------- */
.wrap.narrow { max-width: 560px; }
.small { font-size: .85rem; }
.badge { background: var(--brand-soft); color: var(--brand); border-radius: 10px; padding: 1px 8px; font-size: .8rem; font-weight: 700; }
.user-list { list-style: none; padding: 4px 16px; }
.user-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-list li:last-child { border-bottom: none; }
.user-head { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; }
.user-list details { flex: 1; }
.user-list summary { cursor: pointer; color: var(--brand); font-size: .9rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.inline-form input { flex: 1 1 120px; min-height: 40px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; }

/* ---------- archive ---------- */
.archive-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 12px 0 14px; }
.tabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.tabs a { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 500; }
.tabs a.on { background: var(--brand); color: var(--brand-ink); }
#archiveSearch { flex: 1 1 220px; max-width: 360px; min-height: 42px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 16px; background: #fff; }
.arch-group { padding: 0; overflow: hidden; }
.arch-group summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.arch-group summary::-webkit-details-marker { display: none; }
.arch-group summary::before { content: "◂"; color: var(--muted); transition: transform .15s; }
.arch-group[open] summary::before { transform: rotate(-90deg); }
.arch-title { font-weight: 800; font-size: 1.05rem; }
.arch-totals { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 16px 10px; }
.arch-totals span { background: var(--bg); border-radius: 8px; padding: 2px 8px; font-size: .88rem; }
.arch-email { margin: 0 16px 6px; }
.arch-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.arch-table th { text-align: start; color: var(--muted); font-weight: 500; font-size: .82rem; padding: 6px 16px; border-top: 1px solid var(--line); }
.arch-table td { padding: 8px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.nowrap { white-space: nowrap; }
@media (max-width: 640px) {
  .arch-table thead { display: none; }
  .arch-table tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px 16px; border-top: 1px solid var(--line); }
  .arch-table td { border: none; padding: 0; }
  .arch-table td:nth-child(n+3) { grid-column: 1 / -1; }
}

/* ---------- ordering cutoff ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--warn-soft); color: var(--warn);
  border: 1.5px solid var(--warn-line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; line-height: 1.45;
}
.notice strong { color: #6b3a00; }
.notice-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.notice-now { display: block; margin-top: 4px; font-weight: 700; }
.notice.is-late { background: #ffe4c2; border-color: #e8a85a; }

.late-dialog {
  width: min(420px, calc(100vw - 32px)); padding: 24px 20px 20px;
  border: none; border-radius: 20px; background: var(--card); color: var(--ink);
  box-shadow: 0 20px 60px rgba(40, 25, 10, .35); text-align: center;
}
.late-dialog::backdrop { background: rgba(35, 25, 15, .55); }
.late-icon {
  width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px; background: var(--warn-soft);
}
.late-dialog h2 { font-size: 1.2rem; margin-bottom: 8px; color: var(--warn); }
.late-dialog p { margin: 0 0 16px; color: var(--ink); }
.late-dialog .check {
  display: flex; gap: 10px; align-items: flex-start; text-align: start; cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px;
  font-weight: 500;
}
.late-dialog .check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.dialog-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.dialog-actions .primary:disabled { opacity: .45; cursor: not-allowed; }
.dialog-actions .ghost { min-height: 44px; }
.late-badge {
  display: inline-block; background: var(--warn-soft); color: var(--warn);
  border: 1px solid var(--warn-line); border-radius: 8px;
  padding: 0 6px; font-size: .78rem; font-weight: 700; white-space: nowrap;
}

/* ---------- accessibility basics ---------- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; top: -100px; inset-inline-start: 12px; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
#main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.site-footer { text-align: center; padding: 8px 0 24px; font-size: .9rem; color: var(--muted); }
.site-footer a { color: var(--muted); margin: 0 4px; }

.legal { line-height: 1.7; }
.legal h1 { font-size: 1.5rem; color: var(--brand); margin-bottom: 12px; }
.legal h2 { font-size: 1.1rem; margin: 20px 0 6px; }
.legal ul { padding-inline-start: 20px; margin: 6px 0; }
.legal li { margin-bottom: 4px; }
.legal p { margin: 6px 0; }
.legal code { background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.contact-list { list-style: none; padding: 0 !important; }
body.public > main { display: block; padding-top: 1px; }

/* ---------- accessibility toolbar ---------- */
.a11y { position: fixed; left: 0; top: 12px; z-index: 60; }
.a11y-toggle {
  display: grid; place-items: center; width: 46px; height: 46px;
  background: #1a5fd6; color: #fff; border: none; border-radius: 0 12px 12px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.a11y-panel {
  position: absolute; left: 52px; top: 0;
  width: 240px; max-height: 80vh; overflow: auto;
  background: #fff; color: #1c1c1c; border: 2px solid #1a5fd6; border-radius: 14px;
  padding: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; gap: 6px;
}
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.a11y-head h2 { margin: 0; font-size: 1rem; }
.a11y-close { background: none; border: none; font-size: 1.1rem; padding: 4px 8px; color: #1c1c1c; }
.a11y-size { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #f1f4fa; border-radius: 10px; }
.a11y-size span { flex: 1; font-weight: 500; }
.a11y-size button { width: 40px; height: 36px; border: 1px solid #b9c6de; border-radius: 8px; background: #fff; font-weight: 800; color: #1c1c1c; }
.a11y-size output { min-width: 42px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.a11y-opt, .a11y-reset {
  text-align: start; min-height: 40px; padding: 6px 10px;
  border: 1px solid #d4dbe8; border-radius: 10px; background: #fff; color: #1c1c1c; font-weight: 500;
}
.a11y-opt span { display: inline-block; width: 22px; text-align: center; }
.a11y-opt[aria-pressed="true"] { background: #1a5fd6; border-color: #1a5fd6; color: #fff; }
.a11y-reset { text-align: center; background: #f1f4fa; }
.a11y-link { text-align: center; font-size: .9rem; color: #1a5fd6; padding: 4px; }

/* text size (CSS zoom re-flows the layout, unlike a transform) */
html[data-a11y-size="1"] body { zoom: 1.15; }
html[data-a11y-size="2"] body { zoom: 1.3; }
html[data-a11y-size="3"] body { zoom: 1.5; }
/* grayscale: on the root element a filter doesn't break position: fixed */
html.a11y-gray { filter: grayscale(1); }
/* highlight links */
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px dashed currentColor; outline-offset: 2px; }
/* readable font */
html.a11y-font body, html.a11y-font input, html.a11y-font button, html.a11y-font textarea {
  font-family: Arial, "Segoe UI", sans-serif !important; letter-spacing: .02em; word-spacing: .08em;
}
html.a11y-font body { line-height: 1.75; }
/* stop animations */
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
/* high contrast: black background, white text, yellow accents */
html.a11y-contrast {
  --bg: #000; --card: #000; --ink: #fff; --muted: #fff; --line: #fff;
  --brand: #ffe600; --brand-ink: #000; --brand-soft: #333; --wood: #ffe600;
  --ok: #7dff9a; --ok-soft: #002b0f; --danger: #ff8a80;
  --warn: #ffe600; --warn-soft: #000; --warn-line: #ffe600; --focus: #00e5ff;
}
html.a11y-contrast body, html.a11y-contrast .card, html.a11y-contrast .submit-bar,
html.a11y-contrast .notice, html.a11y-contrast .late-dialog, html.a11y-contrast .cookie-bar { background: #000 !important; color: #fff !important; }
html.a11y-contrast input, html.a11y-contrast textarea, html.a11y-contrast .step,
html.a11y-contrast .ghost, html.a11y-contrast .tabs, html.a11y-contrast #archiveSearch { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast .step[data-d="1"], html.a11y-contrast .primary { background: #ffe600 !important; color: #000 !important; }
html.a11y-contrast a { color: #ffe600; }
html.a11y-contrast .a11y-panel a { color: #1a5fd6; }  /* the panel keeps its own white theme */
html.a11y-contrast .notice strong, html.a11y-contrast .late-dialog h2 { color: #ffe600; }
html.a11y-contrast .product.picked { background: #333; }

/* ---------- cookie notice ---------- */
.cookie-bar {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: center;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: #1f2a24; color: #f3efe6; box-shadow: 0 -4px 20px rgba(0, 0, 0, .25);
}
.cookie-bar p { margin: 0; flex: 1 1 280px; max-width: 640px; font-size: .92rem; line-height: 1.5; }
.cookie-bar a { color: #bfe3cf; }
.cookie-bar .primary { min-height: 44px; padding: 0 28px; background: #f3efe6; color: #0e4331; }
body.has-cookie-bar.public { padding-bottom: 200px; }

/* Author display rules (e.g. the mobile grid rows above) would otherwise override the hidden attribute. */
[hidden] { display: none !important; }

/* ---------- email notifications (users page) ---------- */
.notify-form { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.notify-email { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; }
.notify-email span { font-size: .9rem; font-weight: 500; }
.notify-email input { flex: 1; min-height: 40px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff; text-align: left; }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; cursor: pointer; margin: 4px 0; }
.check-line input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }
.notify-actions { margin-inline-start: auto; }
.card > .check-line { display: flex; }
p.notice { margin-top: 0; }

/* ---------- customer phone: WhatsApp + call ---------- */
.phone-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wa {
  display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-weight: 700;
  color: #0b6b3a; background: #e3f7ea; border: 1px solid #a8dfbd; border-radius: 16px; padding: 2px 10px;
}
.wa:hover { background: #d2f1dd; }
.call {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  text-decoration: none; background: var(--bg); border: 1px solid var(--line); font-size: .85rem;
}
.order-card .phone-line { margin: 4px 0 2px; }
html.a11y-contrast .wa { background: #000; color: #7dff9a; border-color: #7dff9a; }

/* ---------- editing / cancelling orders ---------- */
.illus-note { margin: -6px 0 10px; }
.edit-notice { background: var(--brand-soft); color: var(--brand); border-color: #b9d3c3; }
.open-order { background: var(--brand-soft); color: var(--ink); border-color: #b9d3c3; }
.open-order a { font-weight: 700; }
.cancel-order { text-align: center; margin: 4px 0 20px; }
.danger-outline { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); border-radius: 12px; min-height: 44px; padding: 0 20px; font-weight: 700; }
.edit-link-card .edit-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; margin: 10px 0; }
.edit-share { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.edit-share .ghost { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.edited-badge { display: inline-block; background: var(--brand-soft); color: var(--brand); border-radius: 8px; padding: 0 6px; font-size: .78rem; font-weight: 700; }
.cancelled-list summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.cancelled-list .summary { margin-top: 8px; }
.is-cancelled td { color: var(--muted); text-decoration: line-through; }
.is-cancelled td:last-child { text-decoration: none; }

/* ---------- customers ---------- */
.export-btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.cust-card { padding: 0; overflow-x: auto; }
.cust-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cust-table th { text-align: start; color: var(--muted); font-weight: 500; font-size: .82rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cust-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cust-table tr:last-child td { border-bottom: none; }
.cust-table .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.cust-name { font-weight: 700; }
.danger-link.small { font-size: .82rem; padding: 4px; white-space: nowrap; }
@media (max-width: 720px) {
  .cust-table thead { display: none; }
  .cust-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  .cust-table td { border: none; padding: 0; }
  .cust-table td:nth-child(3), .cust-table td:nth-child(8) { grid-column: 1 / -1; }
  .cust-table td:nth-child(4)::before { content: "הזמנות: "; font-weight: 400; color: var(--muted); }
  .cust-table td:nth-child(5)::before { content: "פריטים: "; font-weight: 400; color: var(--muted); }
  .cust-table td:nth-child(6)::before { content: "ראשונה: "; color: var(--muted); }
  .cust-table td:nth-child(7)::before { content: "אחרונה: "; color: var(--muted); }
}

/* ---------- roles ---------- */
.role-tag { display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 8px; padding: 0 7px; background: #eceae6; color: #4a4036; }
.role-tag.is-manager { background: var(--brand-soft); color: var(--brand); }
.admin-nav .role-tag { background: rgba(255, 255, 255, .18); color: #fff; }
.role-form { flex: 1 1 100%; font-size: .92rem; }
.role-form select, .field select { min-height: 40px; padding: 4px 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff; }
.field select { width: 100%; min-height: 48px; }
.product-admin.readonly li { flex-wrap: nowrap; }
.product-admin.readonly .pname { flex: 1; }

/* ---------- Friday orders ---------- */
.when-card { padding-top: 14px; padding-bottom: 14px; }
.switch-line { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch-line input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; border-radius: 15px; background: #cfc5b6; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.switch-line input:checked + .switch { background: var(--brand); }
.switch-line input:checked + .switch::after { inset-inline-start: 23px; }
.switch-line input:focus-visible + .switch { outline: 3px solid var(--focus); outline-offset: 2px; }
.when-line { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.friday-badge { display: inline-block; font-size: .72rem; font-weight: 700; color: #6b3fa0; background: #efe6fa; border-radius: 8px; padding: 0 6px; vertical-align: middle; }
.product.unavailable { opacity: .45; filter: grayscale(1); }
.product.unavailable .step { cursor: not-allowed; }
.date-tabs { display: flex; flex-wrap: wrap; margin-bottom: 14px; }
.tab-count { display: inline-block; min-width: 20px; margin-inline-start: 4px; padding: 0 6px; border-radius: 10px; background: rgba(0,0,0,.08); font-size: .8rem; text-align: center; }
.tabs a.on .tab-count { background: rgba(255,255,255,.25); }
.friday-check { font-size: .85rem; margin: 0 4px; }
.add-friday { margin: 0 4px; }
html.a11y-contrast .friday-badge { background: #000; color: #e0c3ff; border: 1px solid #e0c3ff; }

/* ---------- delivery choices / holidays ---------- */
.when-card h2 { margin-bottom: 10px; }
.when-options { display: grid; gap: 8px; }
.when-opt {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff;
}
.when-opt input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.when-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.when-opt:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.when-text { display: flex; flex-direction: column; }
.when-sub { font-size: .85rem; color: var(--muted); }
.when-opt.special strong::after { content: " ✦"; color: #6b3fa0; }
.holiday-notice { background: #f3ecfb; color: #3f2466; border-color: #d9c7f0; }
.holiday-list li { align-items: center; }
html.a11y-contrast .when-opt, html.a11y-contrast .holiday-notice { background: #000 !important; color: #fff !important; border-color: #fff; }

/* ---------- products: visibility ---------- */
.hidden-badge { flex: 1 1 100%; font-size: .8rem; font-weight: 700; color: var(--danger); }
.visibility-btn { min-height: 36px; font-size: .88rem; white-space: nowrap; }
.primary.small { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.product-admin li.inactive { background: #f4efe8; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }

/* ---------- days without pre-orders ---------- */
.no-order-notice { background: #fdecea; color: #7a1c14; border-color: #f2c4bf; }
.no-order-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
html.a11y-contrast .no-order-notice { background: #000 !important; color: #fff !important; border-color: #fff; }

/* ---------- what's coming out of the oven ---------- */
.oven-live { margin-bottom: 14px; }
.oven-live[hidden] { display: none; }
.oven-title { font-size: 1.05rem; font-weight: 800; color: var(--brand); margin: 0 0 8px; }
.oven-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.oven-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff4e2; border: 1.5px solid #f0c98a; border-radius: var(--radius);
  padding: 12px 14px; font-size: .97rem;
}
.oven-card.done { background: var(--ok-soft); border-color: #bfe0cc; }
.oven-card.pita { background: #f3ecfb; border-color: #d9c7f0; font-weight: 700; margin-bottom: 8px; }
.oven-card.pita[hidden] { display: none; }
.oven-emoji { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.oven-text { display: flex; flex-direction: column; }
.oven-when { color: var(--muted); font-size: .9rem; }
.oven-card.done .oven-when { color: var(--ok); font-weight: 700; }

/* admin */
.oven-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.oven-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; text-align: start;
}
.oven-btn.running { border-color: var(--brand); background: var(--brand-soft); }
.oven-btn .oven-name { flex: 1; font-weight: 700; }
.oven-btn .oven-min { color: var(--muted); font-size: .85rem; }
.tray-list { list-style: none; margin: 0; padding: 0; }
.tray { border-bottom: 1px solid var(--line); padding: 12px 0; }
.tray:last-child { border-bottom: none; }
.tray.done .tray-when { color: var(--ok); font-weight: 700; }
.tray-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.tray-when { color: var(--muted); }
.tray-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.pita-live { background: #f3ecfb; border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
html.a11y-contrast .oven-card, html.a11y-contrast .oven-btn { background: #000 !important; color: #fff !important; border-color: #fff; }
