/* The preparer's screens (screens/preparer/). Tokens from ops.css, shared pieces from
   live.css (status word, thread, live list, sheets, undo, .o-abar). Wet fingers, phone
   propped up: 56 px targets, the primary action in the thumb zone, big numbers.
   Rules: full borders or tints, never side stripes; one family; 150–250 ms motion. */

.o-content-prep { padding: 0; max-width: none; }
.o-staff-prep .o-main { padding-bottom: 0; }
.o-prep { min-height: 100dvh; background: var(--bg); padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 20px); }
.o-prep.in-card { padding-bottom: calc(var(--abar-h) + env(safe-area-inset-bottom) + 28px); }
.o-prep:not(.standalone) { min-height: 0; margin: -16px; }
.o-ppad { padding: 14px 16px; }
.o-pmain { min-width: 0; }

/* Top bar (phone) */
.o-pbar { display: flex; align-items: center; gap: 4px; min-height: var(--cbar-h); padding: 4px 6px 4px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.o-pbar.sticky { position: sticky; top: 0; z-index: var(--z-sticky); padding-top: calc(4px + env(safe-area-inset-top)); }
.o-pbar .o-btn.o-cbar-icon:first-child { margin-left: -10px; }
.o-pbar-title { flex: 1; min-width: 0; margin: 0; font-size: 1.125rem; font-weight: 680; letter-spacing: -0.01em; white-space: normal; overflow-wrap: anywhere; }
.o-pline { border-bottom: 1px solid var(--line); }

/* Bottom tabs (phone): Aujourd'hui · Jus · Remplir · Colis · Livreur */
.o-ptabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-tabs); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; }
.o-ptab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; font-size: 0.72rem; font-weight: 580; color: var(--ink-3); text-decoration: none; }
.o-ptab svg { width: 23px; height: 23px; }
.o-ptab[aria-current='page'] { color: var(--ink); }
.o-ptab[aria-current='page']::before { content: ''; position: absolute; top: 0; left: 24%; right: 24%; height: 3px; border-radius: 0 0 3px 3px; background: var(--ink); }
.o-ptab-badge { position: absolute; top: 7px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.o-ptab-badge.red { background: var(--bad); color: #fff; }
/* The owner covering from Postes: his own tab bar stays at the bottom, the preparer's steps go on top. */
.o-prep:not(.standalone) .o-ptabs { position: static; height: 60px; padding: 0; border-top: 0; border-bottom: 1px solid var(--line); }
.o-prep:not(.standalone) .o-ptab[aria-current='page']::before { top: auto; bottom: 0; border-radius: 3px 3px 0 0; }

/* Day strip (laptop): the tiles are the tabs, Prochaine action on the right. */
.o-pstrip { background: var(--surface); border-bottom: 1px solid var(--line); }
.o-pstrip { position: sticky; top: 0; z-index: var(--z-sticky); }
.o-prep:not(.standalone) .o-pstrip { top: 57px; }
.o-pstrip-in { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px 0 20px; }
.o-pstrip-tabs { display: flex; gap: 4px; flex: 0 1 auto; min-width: 0; }
.o-pstrip-tab { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; border: 1px solid transparent; transition: background-color 150ms var(--ease); }
.o-pstrip-tab[aria-current='page'] { background: var(--ink); color: var(--bg); }
.o-pstrip-tab[aria-current='page'] .o-muted { color: color-mix(in oklch, var(--bg) 70%, transparent); }
.o-pstrip-tab.done:not([aria-current='page']) { color: var(--ok); }
.o-pstrip-tab svg { align-self: center; }
.o-pstrip-n { font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.o-pstrip-end { margin-left: auto; display: flex; align-items: center; gap: 4px; min-width: 0; }

/* Aujourd'hui */
.o-ptoday { display: flex; flex-direction: column; gap: 14px; }
.o-ptoday-date { margin: 0; color: var(--ink-3); font-size: 0.875rem; font-weight: 560; }
.o-ptiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.o-ptile { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 88px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.o-ptile-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 0.9375rem; font-weight: 620; color: var(--ink-2); }
.o-ptile-n { font-size: 1.875rem; font-weight: 720; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.o-ptile-of { font-size: 1.125rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.o-ptile.done { background: var(--ok-bg); border-color: color-mix(in oklch, var(--ok) 30%, transparent); }
.o-ptile.done .o-ptile-name svg { color: var(--ok); }
.o-ptiles.muted .o-ptile { background: var(--surface-2); }
.o-ptiles.muted .o-ptile-n { font-size: 1.375rem; }
.o-skel-tile { pointer-events: none; }

.o-pnext { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 76px; padding: 12px 18px; border-radius: 14px; text-align: left; }
.o-pnext > svg { width: 24px; height: 24px; margin-left: auto; flex: 0 0 auto; }
.o-pnext-label { display: block; font-size: 0.78rem; font-weight: 560; opacity: 0.72; }
.o-pnext-text { display: block; font-size: 1.0625rem; font-weight: 680; line-height: 1.25; }
.o-pnext > span:first-of-type:not(.o-pnext-text) + .o-pnext-text { margin-top: 0; }
.o-pnext:not(.compact) { flex-wrap: wrap; row-gap: 0; }
.o-pnext:not(.compact) .o-pnext-label { flex: 1 0 100%; order: -1; }
.o-pnext:not(.compact) .o-pnext-text { flex: 1; min-width: 0; }
.o-pnext.compact { min-height: 40px; width: auto; max-width: 360px; padding: 6px 12px 6px 14px; border-radius: 10px; }
.o-pnext.compact .o-pnext-text { font-size: 0.875rem; font-weight: 640; white-space: normal; overflow-wrap: anywhere; }
.o-pnext.compact > svg { width: 18px; height: 18px; }
.o-pnext-done { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--ok-bg); font-weight: 620; }
.o-pnext-done svg { color: var(--ok); }

.o-pstart { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.o-pstart-n { margin: 0; font-size: 1.25rem; font-weight: 680; letter-spacing: -0.01em; }
.o-pstart .o-small { margin: 0; }
.o-pempty { margin: 12px 0; padding: 28px 16px; text-align: center; color: var(--ink-3); font-size: 0.9375rem; }
.o-pempty svg { color: var(--ok); }

.o-plines { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.o-plines:empty { display: none; }
.o-pline-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-weight: 560; text-align: left; cursor: pointer; }
.o-pline-row:first-child { border-top: 0; }
.o-pline-row > svg { color: var(--ink-3); flex: 0 0 auto; }
.o-pline-row.warn { background: var(--warn-bg); }
.o-pline-row.warn > svg:first-child { color: var(--warn); }
.o-pline-text { flex: 1; min-width: 0; }
.o-pline-act { flex: 0 0 auto; padding: 6px 12px; border-radius: 9px; background: var(--ink); color: var(--bg); font-size: 0.875rem; font-weight: 650; }
.o-plinks { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.o-plinks .o-btn { min-height: 48px; }

.o-pnew { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 20px; border: 0; border-top: 1px solid var(--line); background: var(--info-bg); color: var(--ink); font: inherit; font-weight: 620; cursor: pointer; }
.o-pnew svg { color: var(--info); }

/* Section heads inside a screen */
.o-phead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.o-phead-text { margin: 0; font-size: 1rem; font-weight: 650; }
.o-psub { margin: 18px 0 8px; font-size: 0.875rem; font-weight: 650; color: var(--ink-2); }
.o-psub:first-child { margin-top: 0; }
.o-psub-red { color: var(--bad); }
.o-plist { display: flex; flex-direction: column; gap: 8px; }
.o-plist-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.o-plist-plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.o-pbig { width: 100%; min-height: 56px; font-size: 1rem; border-radius: 12px; }
.o-pbig svg { width: 20px; height: 20px; }
.o-link { padding: 6px 2px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 0.875rem; font-weight: 560; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); cursor: pointer; min-height: 40px; }

/* Scent tile: the label number he reads on the bottle. */
.o-ptile-no { width: 40px; height: 40px; font-size: 0.875rem; color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.o-ptile-no.big { width: 52px; height: 52px; font-size: 1.125rem; border-radius: 10px; }
.o-ptile-no.mix { font-size: 0.72rem; color: var(--ink-2); background: var(--surface-2); }

/* Jus */
.o-pbatch { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.o-pbatch-head { display: flex; align-items: center; gap: 12px; }
.o-pbatch-title h2 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.o-pbatch-title p { margin: 0; font-size: 0.875rem; }
.o-chip-change { align-self: flex-start; min-height: 40px; padding: 6px 14px; border-radius: 99px; border: 1px solid color-mix(in oklch, var(--warn) 40%, transparent); background: var(--warn-bg); color: var(--ink); font: inherit; font-weight: 620; font-size: 0.875rem; cursor: pointer; }
.o-pbatch-litres { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.o-pstep { min-width: 56px; min-height: 56px; padding: 0; border-radius: 12px; background: var(--surface); }
.o-pstep svg { width: 22px; height: 22px; }
.o-pbatch-l { display: flex; flex-direction: column; align-items: center; }
.o-pbatch-l-n { font-size: 2rem; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.o-pbatch-l-sub { font-size: 0.8125rem; color: var(--ink-3); }
.o-pamounts { margin: 0; display: flex; flex-direction: column; }
.o-pamount { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 2px; border-top: 1px solid var(--line); }
.o-pamount:first-child { border-top: 0; }
.o-pamount dt { font-weight: 560; color: var(--ink-2); }
.o-pamount dd { margin: 0; font-size: 1.375rem; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.o-pamount.oil dt { color: var(--ink); font-weight: 680; }
.o-pbatch-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: -4px; }
.o-pyield { display: flex; align-items: center; gap: 10px; font-weight: 580; font-size: 0.875rem; }
.o-pyield .o-input { max-width: 140px; }
.o-pbatch-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.o-pbatch-row-main { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.o-pbatch-row-l { font-weight: 700; font-variant-numeric: tabular-nums; }
.o-pbatch-row > svg { color: var(--ink-3); }
.o-pbatch-done { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px; border-radius: var(--radius); background: var(--ok-bg); font-size: 0.9375rem; }
.o-pbatch-done > svg { color: var(--ok); }
.o-pjus .o-note { display: block; margin: 0 0 12px; }

/* Remplir */
.o-pfill { border-top: 1px solid var(--line); }
.o-pfill:first-child { border-top: 0; }
.o-pfill-row { display: flex; align-items: stretch; }
.o-pfill-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 6px 10px 14px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color 150ms var(--ease); }
.o-pfill-main[disabled] { cursor: default; }
.o-pfill-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.o-pfill-title { font-weight: 600; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.o-pfill-sub { font-size: 0.8125rem; color: var(--ink-3); }
.o-pfill-count { flex: 0 0 auto; min-width: 56px; text-align: right; font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.o-pfill-count b { font-weight: 720; }
.o-pfill-count svg { color: var(--ok); }
.o-pfill-more { flex: 0 0 52px; min-height: 68px; padding: 0; border-radius: 0; }
.o-pfill.done .o-pfill-main { opacity: 0.55; }
.o-pfill-extra { margin: 0 14px 8px 66px; font-size: 0.8125rem; font-weight: 600; color: var(--warn); }
.o-pfill-menu { display: flex; flex-direction: column; gap: 10px; padding: 10px 14px 14px 66px; background: var(--surface-2); }
.o-pshelf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 10px 10px 66px; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); }
.o-pshelf.answered { background: var(--surface-2); }
.o-pshelf-text { flex: 1 1 180px; font-size: 0.875rem; font-weight: 600; }
/* Pris / Introuvable / Abîmé: three equal parts that always fit the box. */
.o-pshelf .o-seg, .o-punit-shelf .o-seg { display: flex; width: 100%; max-width: 360px; }
.o-pshelf .o-seg button, .o-punit-shelf .o-seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 6px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.o-pfill-cols { display: flex; flex-direction: column; gap: 6px; }

/* Colis list */
.o-pcolis-list { padding: 14px 16px; position: relative; }
.o-prow { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 100%; min-height: 72px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color 150ms var(--ease); }
.o-plist-rows > :first-child.o-prow, .o-plist-rows > .o-prow:first-child { border-top: 0; }
.o-prow.sel { background: color-mix(in oklch, var(--info-bg) 75%, var(--surface)); }
.o-prow-l1, .o-prow-l2 { display: flex; align-items: center; gap: 8px; min-width: 0; width: 100%; }
.o-prow-no { font-weight: 680; font-variant-numeric: tabular-nums; }
.o-prow-flags { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); }
.o-prow-who { flex: 1; min-width: 0; color: var(--ink-2); font-size: 0.9rem; white-space: normal; overflow-wrap: anywhere; }
.o-prow-units { flex: 0 0 auto; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.o-pcolis-list .o-q-folds { padding: 14px 0 8px; }
.o-pcolis-list .o-live-pill-wrap { top: 8px; }

/* Pack card */
.o-pcard { min-width: 0; }
.o-pcard-head { display: flex; align-items: center; gap: 8px; min-height: var(--cbar-h); padding: 4px 6px 4px 6px; background: var(--bg); border-bottom: 1px solid var(--line); }
.o-pcard-head.sticky { position: sticky; top: 0; z-index: var(--z-sticky); padding-top: calc(4px + env(safe-area-inset-top)); }
.o-prep:not(.standalone) .o-pcard-head.sticky { top: 57px; padding-top: 4px; }
.o-pcard-title { margin: 0 4px 0 0; font-size: 1.25rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.o-pcard-head .o-word { margin-right: auto; }
.o-pcard-body { display: flex; flex-direction: column; gap: 14px; padding: 12px 16px 0; }
.o-pcard-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.o-pcard-who { margin: 0; font-size: 1.0625rem; font-weight: 620; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.o-pban { display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 12px; border-radius: 10px; font-size: 0.9375rem; font-weight: 580; color: var(--ink); background: var(--surface-2); }
.o-pban > svg { flex: 0 0 auto; width: 20px; height: 20px; }
.o-pban > span { flex: 1; min-width: 0; }
.o-pban.red { background: var(--bad-bg); }
.o-pban.red > svg { color: var(--bad); }
.o-pban.amber { background: var(--warn-bg); }
.o-pban.amber > svg { color: var(--warn); }
.o-pban.info { background: var(--info-bg); font-size: 0.875rem; }
.o-pban.info > svg { color: var(--info); }
.o-pban.grey > svg { color: var(--ink-3); }
.o-punits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.o-punit { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.o-punit:first-child { border-top: 0; }
.o-punit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.o-punit-title { font-size: 1rem; }
.o-punit-title b { font-weight: 640; }
.o-punit-sub { font-size: 0.8125rem; color: var(--ink-3); }
.o-punit-shelf { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--warn-bg); }
.o-punit-take { font-weight: 640; font-size: 0.9375rem; }
.o-punit-shelf-done { font-size: 0.8125rem; font-weight: 600; color: var(--ok); }
.o-pbox { padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.o-pbox p { margin: 0; }
.o-pbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.o-pbox-head .o-h { margin: 0; }
.o-pbox-name { font-size: 1.125rem; font-weight: 680; }
.o-pbox-phone { font-size: 1.5rem; font-weight: 720; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; margin: 2px 0 4px !important; }
.o-pbox-city { font-weight: 620; }
.o-pbox-addr { color: var(--ink-2); }
.o-pbox-collect { margin: 10px 0 6px !important; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.125rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.o-pbox-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.o-pnotes .o-input { resize: vertical; }
.o-psource { margin: 0; }

/* The action bar (.o-abar from live.css: fixed in the thumb zone on the phone). */
.o-pabar { display: flex; flex-direction: column; gap: 8px; }
.o-pabar-btns { display: flex; gap: 8px; }
.o-pabar-why { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.o-pabar-why.bad { color: var(--bad); }
.o-pabar-out { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 640; }
.o-pabar-out svg { width: 20px; height: 20px; color: var(--ok); }
.o-pabar-out.queued { color: var(--ink-2); font-weight: 560; }
.o-pabar-out.queued svg { color: var(--ink-3); }
.o-pnext-card { justify-content: space-between; }
.o-prep:not(.standalone) .o-pcard .o-abar { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }

/* Livreur */
.o-pliv-screen { position: relative; }
.o-pliv-strip { position: sticky; top: calc(var(--cbar-h) + env(safe-area-inset-top)); z-index: 3; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px; background: var(--info-bg); border-bottom: 1px solid var(--line); font-weight: 620; }
.o-pliv-strip .o-word { font-size: 0.9375rem; background: var(--surface); }
.o-pliv-strip .o-btn { margin-left: auto; }
.o-pliv { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.o-pliv.armed { border-color: color-mix(in oklch, var(--info) 35%, transparent); background: color-mix(in oklch, var(--info-bg) 55%, var(--surface)); }
.o-pliv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.o-pliv-l1 { display: flex; align-items: center; gap: 8px; }
.o-pliv-no { font-weight: 700; font-variant-numeric: tabular-nums; }
.o-pliv-who { color: var(--ink-2); font-size: 0.9rem; white-space: normal; overflow-wrap: anywhere; }
.o-pliv-res { font-size: 0.8125rem; font-weight: 620; }
.o-pliv-res.ok { color: var(--ok); }
.o-pliv-res.warn { color: var(--warn); }
.o-pliv-res.bad { color: var(--bad); }
.o-pliv-res.muted { color: var(--ink-3); font-weight: 560; }
.o-pliv-end { flex: 0 0 auto; display: flex; align-items: center; }
.o-pliv-end > svg { color: var(--ok); margin-right: 8px; }
.o-pliv-tick { min-height: 56px; min-width: 112px; padding: 0 14px; gap: 10px; font-size: 0.9375rem; border-radius: 12px; border-color: var(--line-strong); }
.o-pliv-box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink-2); background: var(--surface); }
.o-pliv-cancel { min-height: 52px; padding: 0 14px; border-radius: 12px; }
.o-pliv-bar { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
.o-pliv-screen .o-ppad { padding-bottom: calc(var(--abar-h) + 24px); }
.o-pcheck { cursor: pointer; }
.o-pcheck input { width: 24px; height: 24px; accent-color: var(--ink); flex: 0 0 auto; }

/* "#8452 ANNULÉE — reprends le colis": interrupts every screen. */
.o-palarms { position: sticky; top: 0; z-index: calc(var(--z-sticky) + 1); display: flex; flex-direction: column; }
.o-palarm { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px 8px 16px; background: var(--bad); color: #fff; font-size: 1rem; animation: toast-in 200ms var(--ease); }
.o-palarm b { flex: 1; min-width: 0; letter-spacing: 0.01em; }
.o-palarm .o-btn { background: #fff; color: var(--bad); border-color: #fff; min-height: 44px; }

/* Sheets */
.o-pcasse-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.o-pcasse-tile { min-height: 56px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 0.9rem; text-align: left; cursor: pointer; }
.o-pcasse-tile[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.o-pchoice[aria-pressed='true'] { background: color-mix(in oklch, var(--info-bg) 75%, var(--surface)); }
.o-pqty { justify-content: space-between; padding: 8px 0; }
.o-pstepper .o-stepper-in { width: 76px; min-height: 52px; text-align: center; font-size: 1.125rem; font-weight: 700; padding: 4px; }
.o-pcasse-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 8px 6px 14px; border-top: 1px solid var(--line); }
.o-pcasse-row:first-child { border-top: 0; }
.o-pcasse-what { flex: 1; min-width: 0; font-weight: 560; }
.o-pmanque-btns { display: flex; flex-direction: column; gap: 8px; }
.o-parr { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.o-parr .o-small { margin: 0; }
.o-parr-line { display: grid; grid-template-columns: 1fr 96px 96px; gap: 6px 10px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.o-parr-name { align-self: center; font-weight: 620; }
.o-parr-f { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; font-weight: 580; color: var(--ink-2); }
.o-parr-f .o-input { min-height: 48px; text-align: center; font-weight: 650; }
.o-parr-f.wide { grid-column: 1 / -1; }
.o-parr-extra { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.o-parr-extra > .o-btn { align-self: flex-start; }
.o-pbench { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); }
.o-pbench:first-child { border-top: 0; }
.o-pbench-name { flex: 1; min-width: 0; font-weight: 600; }

/* Chercher */
.o-psearch-in { padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.o-psearch-in svg { left: 27px; }
.o-psearch-in .o-input { min-height: 52px; font-size: 1rem; }
.o-psr { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.o-psr p { margin: 0; }
.o-psr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.o-psr-head .o-btn { margin-left: auto; }
.o-psr-no { font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.o-psr-phone { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.o-psr-collect { margin-top: 6px !important; font-weight: 700; }

/* Laptop (≥ 900 px) */
@media (min-width: 900px) {
  .o-prep { padding-bottom: 32px; }
  .o-prep:not(.standalone) { margin: -24px -28px; }
  .o-ppad { padding: 18px 24px; }
  .o-pjus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .o-pfill-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .o-pfill-cols .o-psub { margin-top: 0; }
  .o-pcolis-split { display: grid; grid-template-columns: minmax(320px, 40%) minmax(0, 1fr); align-items: start; }
  .o-pcolis-left { position: sticky; top: 57px; height: calc(100dvh - 57px); overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg); }
  .o-prep:not(.standalone) .o-pcolis-left { top: 114px; height: calc(100dvh - 114px); }
  .o-pcolis-right { min-width: 0; }
  .o-pcard.laptop .o-pcard-head { padding: 10px 24px; position: sticky; top: 57px; z-index: 3; }
  .o-prep:not(.standalone) .o-pcard.laptop .o-pcard-head { top: 114px; }
  .o-pcard.laptop .o-pcard-body { padding: 16px 24px 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .o-pcard.laptop .o-abar { position: sticky; bottom: 0; left: auto; right: auto; margin-top: 16px; padding: 12px 24px 14px; border-top: 1px solid var(--line); background: var(--bg); flex-direction: row; align-items: center; justify-content: flex-end; }
  .o-pcard.laptop .o-pabar .o-pbig, .o-pcard.laptop .o-pabar-btns { width: auto; min-width: 240px; }
  .o-pcard.laptop .o-pabar-why, .o-pcard.laptop .o-pabar-out { margin-right: auto; }
  .o-pliv-screen { max-width: 920px; }
  .o-pliv-strip { top: 57px; }
  .o-prep:not(.standalone) .o-pliv-strip { top: 114px; }
  .o-pliv-bar { position: sticky; bottom: 0; padding: 12px 24px; align-items: flex-end; }
  .o-pliv-bar .o-pbig { width: auto; min-width: 320px; }
  .o-pliv-screen .o-ppad { padding-bottom: 24px; }
  .o-pjus, .o-premplir { max-width: 1180px; }
  .o-ptoday { max-width: 640px; }
  .o-psearch { max-width: 760px; }
  .o-palarms { top: 57px; }
  /* On the laptop the Annuler toast and the toasts go bottom left: the action buttons (Préparé, Suivant,
     Le livreur a tout pris) sit bottom right and must stay reachable while a toast is up. */
  body:has(.o-prep-laptop) .o-undo, body:has(.o-prep-laptop) .o-toasts { left: 20px; right: auto; bottom: 20px; width: 400px; transform: none; }
}
.o-print { display: none; }

a.o-ptab, a.o-ptab:hover, a.o-ptile, a.o-ptile:hover, a.o-pstrip-tab, a.o-pstrip-tab:hover { text-decoration: none; }
.o-btn.o-pcopied { color: var(--ok); border-color: color-mix(in oklch, var(--ok) 40%, transparent); }

/* Hover only where there is a real pointer (a finger leaves no sticky highlight). */
@media (hover: hover) {
  .o-pstrip-tab:hover { background: var(--surface-2); }
  .o-ptile:hover { border-color: var(--line-strong); }
  .o-pline-row:hover { background: var(--surface-2); }
  .o-link:hover { color: var(--ink); }
  .o-pbatch-row:hover { background: var(--surface-2); }
  .o-pfill-main:hover:not([disabled]) { background: var(--surface-2); }
  .o-prow:hover { background: var(--surface-2); }
}

/* Imprimer (Jus, Remplir): the A4 sheet for the wet bench. */
@media print {
  body * { visibility: hidden; }
  .o-print, .o-print * { visibility: visible; }
  .o-print { display: block; position: absolute; inset: 0 auto auto 0; width: 100%; padding: 0; color: #000; background: #fff; font-size: 12pt; }
  .o-print h1 { margin: 0 0 12px; font-size: 16pt; color: #000; }
  .o-print table { width: 100%; border-collapse: collapse; }
  .o-print th, .o-print td { padding: 8px 6px; border-bottom: 1px solid #999; text-align: left; vertical-align: top; }
  .o-print td:last-child, .o-print th:last-child { text-align: center; }
  .o-print td:first-child { font-size: 13pt; }
  .o-ptabs, .o-pstrip, .o-pbar, .o-abar, .o-undo, .o-toasts { display: none !important; }
}

/* Étapes (screens/preparer/etapes.js): one guided page, big tap targets. */
.et-summary { margin: 4px 0 0; font-size: 1.05rem; }
.et-step-h { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.et-n { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: 0.9rem; flex: none; }
.et-step.done .et-n { background: var(--ok-bg); color: var(--ok); }
.et-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.et-row:last-child { border-bottom: 0; }
.et-box { width: 26px; height: 26px; flex: none; border-radius: 7px; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.et-row.on .et-box { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.et-row.on .et-row-main { color: var(--ink-3); }
.et-row-main { flex: 1; min-width: 0; }
.et-warn { flex: none; font-size: 0.8rem; font-weight: 650; color: var(--bad); }
.et-no { font-variant-numeric: tabular-nums; }
.et-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.et-line .et-row { border-bottom: 0; flex: 1 1 220px; }
.et-fill { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.et-fill:last-child { border-bottom: 0; }
.et-fill .o-btn { align-self: flex-start; min-height: 44px; }
.et-dose { margin: 0; font-size: 1rem; font-variant-numeric: tabular-nums; }
.et-tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); font-size: 0.75rem; font-weight: 650; }
.et-tag.ok { background: var(--ok-bg); color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  .o-palarm { animation: none; }
}

/* « Jour » (screens/preparer/jour.js): the day's run on one page. Colour dots are the colorant to add, not decoration. */
.jr-top { display: grid; gap: 6px; }
.jr-lead { margin: 0; font-size: 1.0625rem; }
.jr-lead2 { margin: 0; font-weight: 650; }
.jr-counter { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; }
.jr-counter b { font-size: 1.25rem; }
.jr-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.jr-bar > span { display: block; height: 100%; background: var(--ok); transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.jr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jr-warn { margin: 4px 0; font-size: 0.9375rem; }
.jr-warn.bad { color: var(--bad); font-weight: 600; }
.jr-warn.hard { font-weight: 600; }
.jr-list { list-style: none; margin: 0; padding: 0; }
.jr-row { display: grid; grid-template-columns: 34px auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
/* Many bottles of one perfume: the boxes go on their own line under the name, the name keeps its width. */
.jr-row.many .jr-boxes { grid-column: 3 / -1; justify-content: flex-start; }
.jr-row:last-child { border-bottom: 0; }
.jr-row.ready { background: color-mix(in oklch, var(--ok) 8%, transparent); }
.jr-row.hard { background: var(--warn-bg); }
.jr-row.fresh { background: var(--info-bg); }
.jr-no { flex: none; min-width: 2.6ch; font-size: 1.5rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.jr-no.sm { font-size: 1rem; min-width: 2.2ch; }
.jr-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.jr-name { font-weight: 600; overflow-wrap: anywhere; }
.jr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.jr-tag { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 0.75rem; font-weight: 650; background: var(--surface-2); color: var(--ink); }
.jr-tag.ready { background: var(--ok-bg); color: var(--ok); }
.jr-tag.hard, .jr-tag.bad { background: var(--warn-bg); color: var(--warn); }
.jr-tag.new { background: var(--ok); color: var(--bg); }
.jr-boxes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.jr-box { width: 40px; height: 40px; border-radius: 9px; border: 2px solid var(--line-strong); background: none; color: var(--bg); display: grid; place-items: center; cursor: pointer; }
.jr-box.on { background: var(--ok); border-color: var(--ok); }
.jr-box.new:not(.on) { border-color: var(--ok); }
.jr-dots { flex: none; display: inline-flex; align-items: center; gap: 3px; width: 34px; }
.jr-dot { width: 18px; height: 18px; border-radius: 99px; border: 1px solid color-mix(in oklch, var(--ink) 25%, transparent); }
.jr-dot.half { width: 11px; height: 11px; }
.jr-dot.none { background: none; border-style: dashed; }
.jr-dot.red { background: #d7263d; }
.jr-dot.orange { background: #f08c00; }
.jr-dot.yellow { background: #f2c200; }
.jr-dot.green { background: #2f9e44; }
.jr-shelf { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.jr-shelf li { display: flex; align-items: center; gap: 8px; }
.jr-shelf-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.jr-shelf-add { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.jr-mix { padding: 8px 0; border-bottom: 1px solid var(--line); }
.jr-mix:last-of-type { border-bottom: 0; }
.jr-mix-h { margin: 0 0 6px; font-size: 1rem; }
.jr-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.jr-tbl th, .jr-tbl td { padding: 4px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.jr-tbl th { font-weight: 600; color: var(--ink-3); font-size: 0.8125rem; }
.jr-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jr-orders li.fresh { background: var(--info-bg); padding: 4px 8px; border-radius: 8px; }
.jr-b { padding: 6px 0; border-bottom: 1px solid var(--line); }
.jr-b p { margin: 0 0 4px; }
.jr-b-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; }
.jr-b-row > span:first-child { min-width: 9ch; font-weight: 650; }
.jr-b-q { color: var(--ink-3); font-size: 0.875rem; }
@media print {
  .o-ptabs, .o-pbar, .o-pstrip, .jr-actions, .jr-shelf-add, .o-status-line, #jr-orders, #jr-b { display: none !important; }
  .jr .o-panel { box-shadow: none; border: 0; padding: 0; }
  .jr-box { width: 22px; height: 22px; border-color: #000; }
  .jr-row { break-inside: avoid; }
  .jr-dot { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* 50 ml rows have no big number: the name takes its column. */
.jr-row.no50 { grid-template-columns: 34px minmax(0, 1fr) auto; }
.jr-row.no50.many .jr-boxes { grid-column: 2 / -1; }
