/* Shop preview, "And on your side?" (backoffice.js): the bakery's day as the Panilo app shows it, over its page.
   Same world as the app: cream ground, paper panels without borders, Archivo for titles and numbers, blue topbar,
   pale badges with dark text. Flat surfaces, no gradient. */
.bo-lock, .bo-lock body { overflow: hidden; }
.bo { position: fixed; inset: 0; z-index: 100; overflow-y: auto; overscroll-behavior: contain; background: var(--cream);
  color: var(--charcoal); -webkit-overflow-scrolling: touch; animation: bo-in 0.32s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes bo-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* yellow strip and blue topbar, as in the app with example data */
.bo-strip { display: flex; align-items: center; justify-content: space-between; gap: 0 16px; flex-wrap: wrap; padding: 4px 16px;
  background: var(--yellow); color: var(--charcoal); font-size: 0.9375rem; line-height: 1.3; }
.bo-strip p { margin: 0; padding: 8px 0; font-weight: 500; }
.bo-back .ic { width: 18px; height: 18px; }
.bo-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--charcoal); font: inherit; font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.bo-top { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px; background: var(--blue); color: #fff; }
.bo-logo { height: 24px; width: auto; display: block; filter: brightness(0) invert(1); }
.bo-top-name { margin-left: auto; font-weight: 600; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bo-main { max-width: 760px; margin: 0 auto; padding: 24px 16px 56px; }
.bo-sec + .bo-sec { margin-top: 40px; }
.bo-head { margin-bottom: 16px; }
.bo-h1 { margin: 0; font-family: var(--sign); font-stretch: 108%; font-weight: 800; color: var(--blue);
  font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.08; letter-spacing: -0.015em; }
.bo-sub { margin: 6px 0 0; color: var(--muted); font-size: 1.0625rem; }
.bo-sub::first-letter { text-transform: uppercase; }
.bo-h2 { margin: 0 0 14px; font-family: var(--sign); font-stretch: 108%; font-weight: 800; font-size: 1.375rem; line-height: 1.15; letter-spacing: -0.01em; }
.bo-h2::first-letter { text-transform: uppercase; }

.bo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: var(--r); background: var(--blue); color: #fff; font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer; }
.bo-btn:hover { background: var(--blue-dark); }
.bo-btn .ic { width: 22px; height: 22px; }
.bo-print-btn { margin-bottom: 16px; }
@media (min-width: 640px) { .bo-sec:first-child { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: end; }
  .bo-print-btn { width: auto; }
  .bo-sec:first-child > .bo-prod, .bo-sec:first-child > .bo-note { grid-column: 1 / -1; } }

/* production list: paper panel, one row per product, big number on the right */
.bo-prod, .bo-orders { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(37, 36, 35, 0.05); }
.bo-prow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 76px;
  padding: 12px 16px 12px 12px; border-bottom: 1px solid var(--line); }
.bo-prow:last-child { border-bottom: 0; }
.bo-box { width: 44px; height: 44px; border: 2px solid var(--line-strong); border-radius: 10px; background: var(--paper); }
.bo-pname { display: grid; gap: 3px; justify-items: start; min-width: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.bo-porders { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.bo-qty { display: grid; justify-items: end; line-height: 1; }
.bo-qty b { font-family: var(--sign); font-weight: 800; font-size: 2.25rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.bo-qty small { margin-top: 4px; font-size: 0.875rem; color: var(--muted); }
.bo-prow.is-mine, .bo-orow.is-mine { background: var(--yellow-soft); }

/* badges, as in the app: pale ground, dark text, always a word */
.bo-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.bo-badge-you { margin-top: 3px; background: var(--yellow); color: var(--charcoal); font-weight: 700; }
.bo-badge-new { background: var(--blue); color: #fff; font-weight: 700; }
.bo-ch-online { background: var(--blue-soft); color: var(--blue); }
.bo-ch-phone { background: var(--warn-soft); color: var(--warn); }
.bo-ch-counter { background: var(--ok-soft); color: var(--ok); }
.bo-ch-pro { background: var(--paper-2); color: var(--charcoal); box-shadow: inset 0 0 0 1px var(--line); }

/* orders of the day: one block per order, the products as a list, the pickup code at the foot */
.bo-orders { display: grid; gap: 10px; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.bo-orow { padding: 14px 16px 12px; border-radius: 16px; background: var(--paper); box-shadow: 0 1px 2px rgba(37, 36, 35, 0.05); }
.bo-otop { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.bo-time { font-family: var(--sign); font-weight: 800; font-size: 1.125rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.bo-time.no-time { font-family: var(--font); font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.bo-who { font-size: 1.125rem; font-weight: 700; margin-right: auto; }
.bo-when { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); }
.bo-items { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.bo-item { display: grid; grid-template-columns: 40px 2.4em minmax(0, 1fr); align-items: center; gap: 10px; }
.bo-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--blue); }
.bo-iq { font-family: var(--sign); font-weight: 800; font-size: 1.25rem; color: var(--blue); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bo-iq::after { content: "×"; margin-left: 2px; font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.bo-iname { font-size: 1.0625rem; line-height: 1.25; overflow-wrap: anywhere; }
.bo-code { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: 0.875rem; }
.bo-code .ic { width: 20px; height: 20px; color: var(--charcoal); }
.bo-code-v { font-family: var(--sign); font-weight: 800; font-size: 1rem; letter-spacing: 0.08em; color: var(--charcoal); }
.bo-qr { width: 56px; height: 56px; border-radius: 6px; background: #fff; padding: 3px; box-shadow: 0 0 0 1px var(--line); }
.is-mine .bo-code { border-top-color: #e2c77f; }

.bo-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 2px 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; color: var(--charcoal); }
.bo-note .ic { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; color: var(--ok); }
.bo-sample { margin: 6px 2px 0 34px; font-size: 0.875rem; color: var(--muted); }

/* the way out: keep the page */
.bo-end { margin-top: 44px; padding: 26px 20px 22px; border-radius: 20px; background: var(--blue); color: #fff; }
.bo-end-h { margin: 0; font-family: var(--sign); font-stretch: 108%; font-weight: 800; font-size: clamp(1.5rem, 5vw, 1.875rem); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.bo-end-t { margin: 10px 0 20px; font-size: 1.0625rem; line-height: 1.45; color: #e6ecf5; }
.bo-keep { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; padding: 0 24px; border: 0; border-radius: var(--r);
  background: var(--yellow); color: var(--charcoal); font: inherit; font-size: 1.125rem; font-weight: 800; cursor: pointer; }
.bo-keep:hover { background: #f0c45a; }
.bo-keep:disabled { opacity: 0.7; cursor: progress; }
.bo-end-note { margin: 12px 0 0; text-align: center; font-size: 0.9375rem; color: #e6ecf5; }
.bo-end .pv-err { margin: 10px 0 0; }
@media (min-width: 640px) { .bo-end { padding: 30px 32px 26px; } .bo-keep { width: auto; min-width: 280px; } .bo-end-note { text-align: left; } }

.bo :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.bo-end :focus-visible, .bo-top :focus-visible { outline-color: #fff; }

/* the authored moment: the client's order lands, its lines light up once */
@media (prefers-reduced-motion: no-preference) {
  .bo-orow.is-mine { animation: bo-land 0.7s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .bo-prow.is-mine { animation: bo-glow 1.4s 0.35s ease-out both; }
}
@keyframes bo-land { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes bo-glow { from { background-color: var(--yellow); } to { background-color: var(--yellow-soft); } }

/* the test-order button of the preview's checkout */
.pv-send { margin: 8px 0 24px; }
.pv-try { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 68px; padding: 14px 22px;
  border: 0; border-radius: var(--r-lg); background: var(--blue); color: #fff; font: inherit; font-size: 1.1875rem; font-weight: 700;
  line-height: 1.25; text-align: left; cursor: pointer; box-shadow: 0 10px 24px -14px rgba(22, 62, 120, 0.7); }
.pv-try:hover { background: var(--blue-dark); }
.pv-try:hover .pv-plane { transform: translate(3px, -3px); }
.pv-try:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pv-plane { flex: 0 0 auto; width: 28px; height: 28px; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }

/* The printed production list: only the sheet, on A4 */
.bo-sheet { display: none; }
@media print {
  @page { size: A4; margin: 16mm; }
  body.shop > *:not(.bo) { display: none !important; }
  .bo { position: static; overflow: visible; background: #fff; animation: none; }
  .bo > *:not(.bo-sheet) { display: none !important; }
  .bo-sheet { display: block; color: #000; font-size: 13pt; }
  .bo-sheet-shop { margin: 0; font-weight: 700; font-size: 12pt; }
  .bo-sheet-h { margin: 2mm 0 6mm; font-size: 20pt; }
  .bo-sheet-h::first-letter { text-transform: uppercase; }
  .bo-sheet-t { width: 100%; border-collapse: collapse; }
  .bo-sheet-t td { border-bottom: 1px solid #999; padding: 3mm 2mm; }
  .bo-sheet-t td.q { text-align: right; font-weight: 800; font-size: 16pt; width: 25mm; }
  .bo-sheet-t td.box { width: 10mm; } .bo-sheet-t td.box::after { content: ""; display: inline-block; width: 6mm; height: 6mm; border: 1.5px solid #000; }
  .bo-sheet-foot { margin-top: 8mm; font-size: 10pt; color: #444; }
}
