/* Layout for the reception app, on top of the Monet ERP design system (tokens.css + bundle.css). */

[x-cloak], [hidden] { display: none !important; }
a { color: var(--accent-ink); }
h1, h2, h3 { margin: 0; }

/* ---------- Gestion: sidebar + content ---------- */
.is-gestion { font-size: 15px; }
.app-gestion { display: flex; gap: var(--space-6); padding: var(--space-6); min-height: 100vh; align-items: flex-start; }
.app-side { position: sticky; top: var(--space-6); max-height: calc(100vh - 2 * var(--space-6)); overflow: auto; flex-shrink: 0; }
.app-side__foot { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.app-side__user { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 600; }
.app-side__foot { padding-left: var(--space-3); }
.app-side__actions { display: flex; flex-direction: column; align-items: flex-start; margin-left: calc(-1 * var(--space-3)); }
.app-mark-sm { width: 36px; height: 36px; border-radius: var(--radius-md); }
.app-mark-sm .mn-ico { width: 20px; height: 20px; }

/* ---------- Accueil ---------- */
.app-h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.app-home-section { display: flex; flex-direction: column; gap: var(--space-3); }
.app-todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: var(--space-3); }
.app-todo { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon value" "label label" "hint hint"; grid-template-rows: 40px; align-content: start; align-items: center; column-gap: var(--space-3); row-gap: 2px; padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); color: var(--ink); text-decoration: none; }
.app-todo:hover { background: var(--surface-hover); border-color: var(--border-control); }
.app-todo:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.app-todo__icon { grid-area: icon; width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: var(--surface-sunken); color: var(--ink-muted); }
.app-todo__icon .mn-ico { width: 20px; height: 20px; }
.app-todo__value { grid-area: value; font-size: 32px; font-weight: 700; line-height: 38px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.app-todo__label { grid-area: label; margin-top: var(--space-2); font-size: 15px; font-weight: 600; }
.app-todo__hint { grid-area: hint; font-size: 13px; color: var(--ink-muted); }
.app-todo.is-due .app-todo__icon { background: var(--warning-tint); color: var(--warning-ink); }
.app-todo.is-due .app-todo__value { color: var(--ink); }
.app-wip { display: flex; align-items: center; gap: var(--space-3); min-width: 240px; }
.app-wip__icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-wip__icon .mn-ico { width: 18px; height: 18px; }
.app-module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-4); }
/* Each card spans four rows of the grid (icon, title, text, links): cards side by side share row heights, so their buttons line up. */
.app-module { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: var(--space-2); align-content: start; padding: var(--space-6); background: var(--surface); border-radius: var(--radius-2xl); }
.app-module__icon { width: 44px; height: 44px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-2); }
.app-module-grid { row-gap: 0; }
.app-module-grid > .app-module { margin-bottom: var(--space-4); }
.app-module__icon .mn-ico { width: 22px; height: 22px; }
.app-module__title { font-size: 18px; font-weight: 700; }
.app-module__text { margin: 0; font-size: 15px; color: var(--ink-muted); max-width: 52ch; }
.app-module__links { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding-top: var(--space-3); }
.app-module__more { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.app-module__more a { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; font-weight: 600; color: var(--accent-ink); text-decoration: none; border-radius: var(--radius-sm); padding: 2px 0; }
.app-module__more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.app-module__more a:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.app-module__more .mn-ico { width: 16px; height: 16px; }

/* ---------- Module navigation: drawer (workstations, narrow screens) ---------- */
.app-nav .mn-side__brand { min-height: 52px; }
.app-nav > * { flex-shrink: 0; } /* a short screen scrolls the list instead of squeezing the links */
.app-nav__dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--warning-ink); flex-shrink: 0; }

/* ---------- Module tabs: the current module's pages, above the page title ---------- */
/* One strip: on a narrow screen it scrolls sideways, tools included, instead of wrapping. */
.app-tabs { display: flex; align-items: center; gap: var(--space-6); border-bottom: 1px solid var(--border); margin-bottom: calc(-1 * var(--space-1)); overflow-x: auto; scrollbar-width: none; }
.app-tabs__list, .app-tabs__tools { display: flex; gap: var(--space-1); flex-shrink: 0; }
.app-tabs__tools { margin-left: auto; }
.app-tab { display: inline-flex; align-items: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-3); margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--ink-muted); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.app-tab:hover { color: var(--ink); background: var(--surface-hover); }
.app-tab:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: -3px; }
.app-tab[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.app-tab--tool { font-weight: 500; font-size: 14px; }
.app-tab .mn-nav__count { margin-left: 0; }
.app-nav__close { display: none; margin-left: auto; width: 36px; height: 36px; }
.app-nav__close .mn-ico { width: 20px; height: 20px; }
.app-nav--drawer .app-nav__close { display: inline-flex; }
.app-nav--drawer { position: fixed; z-index: 45; top: var(--space-3); bottom: var(--space-3); left: var(--space-3); width: 288px; max-width: calc(100vw - 2 * var(--space-3)); overflow: auto; box-shadow: var(--shadow-overlay); transform: translateX(calc(-100% - 2 * var(--space-3))); visibility: hidden; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s; }
.is-nav-open .app-nav--drawer { transform: none; visibility: visible; transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.app-modules-btn__keys { display: inline-flex; gap: 4px; }
.app-nav-scrim { position: fixed; inset: 0; z-index: 44; background: var(--scrim); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s linear .2s; }
.is-nav-open .app-nav-scrim { opacity: 1; visibility: visible; transition: opacity .2s; }
.app-nav__notice { margin-bottom: var(--space-2); font-size: 14px; line-height: 20px; align-items: flex-start; }
.app-nav__notice .mn-ico { width: 20px; height: 20px; }
.app-topbar { display: none; position: sticky; top: 0; z-index: 30; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-6); background: var(--surface); border-bottom: 1px solid var(--border); }
.app-topbar__brand { display: flex; align-items: center; gap: var(--space-2); font-size: 16px; font-weight: 700; margin-right: auto; }
.app-topbar .app-mark-sm { width: 32px; height: 32px; border-radius: 10px; }
.app-topbar .app-mark-sm .mn-ico { width: 18px; height: 18px; }
.app-main { flex: 1; min-width: 0; max-width: 1440px; display: flex; flex-direction: column; gap: var(--space-5); }
.app-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.app-pagehead__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.app-pagehead > div:first-child { flex: 1 1 480px; min-width: 0; } /* a long subtitle wraps instead of pushing the buttons below */
.app-h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.app-sub { color: var(--ink-muted); margin-top: 4px; }
.app-messages { display: flex; flex-direction: column; gap: var(--space-2); }
.is-poste .app-messages { padding: 24px 48px 0; } /* the app bar has no bottom padding */
.app-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: var(--space-5); align-items: start; }
.app-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.app-form { display: flex; flex-direction: column; gap: var(--space-4); max-width: 640px; }
.app-form .mn-field { max-width: 520px; }
.app-form .app-grid-2 .mn-field { max-width: none; } /* the grid column already bounds the field */
.app-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.mn-table .is-actions .app-actions { flex-wrap: nowrap; } /* the column is sized to its content (width: 1%): wrapping would stack the buttons */
.app-decision { min-width: 312px; width: 100%; } /* the table squeezes it otherwise: the longest choice, and the usual buttons under it, fit on one line. The PO field and the old-edition list under the choice take its width */
.app-decision-note { max-width: 360px; } /* a long resolution wraps instead of widening the column and squeezing the titles */
.app-pre { white-space: pre-wrap; word-break: break-word; font: 13px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-sunken); border-radius: var(--radius-md); padding: var(--space-3); max-height: 420px; overflow: auto; margin: 0; }
.app-table-scroll { overflow-x: auto; position: relative; } /* keeps absolutely placed labels (.mn-sr) inside the scroll */
.mn-table td .mn-input { height: 40px; }
.app-qty-input { width: 84px; text-align: right; }
.is-num > .app-qty-input { margin-left: auto; } /* a block: text-align does not move it under its right-aligned header */
.app-qty-input input { text-align: right; -moz-appearance: textfield; }
.app-qty-input input::-webkit-inner-spin-button, .app-qty-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } /* the arrows sat on top of the number */
.app-muted-small { font-size: 13px; color: var(--ink-muted); }
/* Waiting customer orders on a reception line (A2): text and an icon, never colour alone */
.app-line-orders { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 13px; color: var(--ink); }
.app-line-orders__icon svg { width: 15px; height: 15px; display: block; color: var(--accent-ink); }
.app-line-orders__lead { color: var(--ink-muted); }
.app-line-order { display: inline-flex; align-items: baseline; gap: 4px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border, currentColor); background: var(--surface); max-width: 100%; }
.app-line-order strong { font-weight: 700; }
.app-line-order__to { color: var(--ink-muted); }
.app-line-orders__more { color: var(--ink-muted); font-style: italic; }
/* The Fidelio reception number (REC…), written on the paper invoice: easy to spot and to copy */
.app-rec { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 4px 10px; border-radius: var(--radius-md); background: var(--accent-tint); color: var(--accent-ink); font-size: 15px; user-select: text; }
.app-rec svg { width: 18px; height: 18px; flex: none; }
.app-rec strong { font-size: 17px; letter-spacing: .02em; }
.app-link-row { cursor: pointer; }
.app-textarea { width: 100%; min-height: 160px; padding: var(--space-3); border-radius: var(--radius-md); border: 1.5px solid var(--border-control); background: var(--surface); color: var(--ink); font: 15px/1.5 var(--font-sans); resize: vertical; }
.app-textarea:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; border-color: var(--accent); }
.app-login { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6); }
.app-login__card { width: 420px; max-width: 100%; display: flex; flex-direction: column; gap: var(--space-4); }

/* ---------- Poste de travail: app bar + task screen ---------- */
.app-appbar { padding: 24px 48px 0; }
.app-brandlink { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; border-radius: var(--radius-lg); }
.app-task { display: flex; flex-wrap: wrap; gap: 32px; padding: 24px 48px 40px; align-items: flex-start; }
.app-task__lines { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.app-task__aside { flex: 1 1 400px; display: flex; flex-direction: column; gap: var(--space-4); position: sticky; top: var(--space-4); }
.app-lines { display: flex; flex-direction: column; gap: var(--space-3); }
.app-lines .mn-line { cursor: pointer; transition: background-color 150ms, border-color 150ms; }
.mn-line.is-selected, .mn-line[aria-selected="true"] { border-color: var(--accent); }
.mn-line.is-complete .mn-line__end .mn-line__value { color: var(--success-ink); }
.mn-line.is-flash { background: var(--accent-tint); }
.app-line__counts { display: flex; flex-direction: column; align-items: flex-end; min-width: 120px; }
.app-line__scanned { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.app-line__scanned small { font-size: 15px; color: var(--ink-muted); font-weight: 500; }
.app-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.app-filters { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* The big instruction under the scan field */
.app-instruction { background: var(--surface); border-radius: var(--radius-2xl); padding: var(--space-5) var(--space-6); display: flex; gap: var(--space-4); align-items: flex-start; border: 2px solid transparent; min-height: 104px; }
.app-instruction__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-tint); color: var(--accent-ink); }
.app-instruction__icon .mn-ico { width: 28px; height: 28px; }
.app-instruction__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.app-instruction__title { font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.app-instruction__sub { font-size: 17px; color: var(--ink-muted); }
.app-instruction__isbn { font-size: 15px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.app-instruction.is-reception .app-instruction__icon { background: var(--surface-sunken); color: var(--ink); }
.app-instruction.is-set_aside, .app-instruction.is-return { border-color: var(--warning-ink); }
.app-instruction.is-set_aside .app-instruction__icon, .app-instruction.is-return .app-instruction__icon { background: var(--warning-tint); color: var(--warning-ink); }
.app-instruction.is-keep .app-instruction__icon { background: var(--info-tint); color: var(--info-ink); }
.app-instruction.is-error { border-color: var(--danger-ink); }
.app-instruction.is-error .app-instruction__icon { background: var(--danger-tint); color: var(--danger-ink); }
.app-instruction.is-idle .app-instruction__title { color: var(--ink-muted); font-size: 22px; font-weight: 600; }
.app-instruction__warn { display: flex; gap: 8px; align-items: center; color: var(--warning-ink); font-weight: 600; font-size: 16px; }
.mn-summary__row > span:first-child { white-space: nowrap; } /* a long value (a client's location) wraps, not its label */
.mn-summary__row > span:last-child { text-align: right; }
.app-instruction__offer { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; margin-top: 4px; padding: var(--space-3); border-radius: var(--radius-lg); background: var(--pending-tint); color: var(--pending-ink); font-weight: 600; }

.app-qtybadge { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; }
.app-hints { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); color: var(--ink-muted); font-size: 14px; }

/* ---------- Overlays (Modal, SidePanel, Toast) ---------- */
.app-overlay { position: fixed; inset: 0; z-index: 50; border-radius: 0; }
.app-overlay.mn-scrim { padding: var(--space-6); }
.app-overlay--panel { justify-content: flex-end; align-items: stretch; padding: 0 !important; }
.app-overlay--panel .mn-panel { max-height: 100vh; }
.app-overlay--panel .mn-panel__body { overflow: auto; flex: 1; }
.app-overlay--panel .mn-panel__foot { flex-wrap: wrap; } /* two actions don't fit side by side in the panel's width */
.app-overlay .mn-modal { max-height: calc(100vh - 48px); }
.app-overlay .mn-modal__body { overflow: auto; }
.app-modal-wide { width: 760px; }
/* Before integrating: where each title's copies go (orders: a location; the floor: Oui / Non) */
.app-places { display: flex; flex-direction: column; gap: var(--space-2); max-height: 300px; overflow: auto; }
.app-place { display: flex; gap: var(--space-3); align-items: flex-start; justify-content: space-between; padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg); border: 1.5px solid var(--border); }
.app-place__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-place__title { font-weight: 700; font-size: 15px; }
.app-place__retail { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.app-place__retail svg { width: 15px; height: 15px; flex: none; }
.app-place__to { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; width: 260px; flex: none; }
.app-place__to .mn-input { width: 100%; }
.app-place__answer { display: flex; gap: var(--space-2); }
.app-place__error { font-size: 13px; color: var(--danger-ink, #b42318); }
.app-toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; pointer-events: none; }
.app-toasts > * { pointer-events: auto; }
.app-order { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3); border-radius: var(--radius-lg); border: 1.5px solid var(--border); }
.app-order.is-current { border-color: var(--accent); background: var(--accent-tint); }
.app-order__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-order__title { font-weight: 700; font-size: 16px; }
.app-order__meta { font-size: 13px; color: var(--ink-muted); }
.app-steps { display: flex; flex-direction: column; gap: var(--space-2); }
.app-step { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); border-radius: var(--radius-lg); background: var(--surface-sunken); font-size: 15px; }
.app-step__body { flex: 1; min-width: 0; }
.app-step__msgs { margin: 4px 0 0; padding-left: 18px; color: var(--danger-ink); }

/* Density: under 860px tall, compact lines and summary (design-system rule). */
@media (max-height: 860px) {
  .app-task .mn-line { padding: 8px var(--space-5) 8px 8px; }
  .app-task .mn-line__title { font-size: 18px; }
  .app-task .mn-book { width: 40px; height: 52px; font-size: 18px; }
  .app-task .mn-summary { padding: 20px; }
  .app-task .mn-summary__figure-value { font-size: 44px; }
  .app-instruction { min-height: 88px; padding: var(--space-4) var(--space-5); }
  .app-instruction__title { font-size: 26px; }
}
/* Narrow management pages: a compact top bar, and the sidebar becomes the same drawer as on the workstations. */
@media (max-width: 1099.98px) {
  .app-topbar { display: flex; }
  .app-side { position: fixed; z-index: 45; top: var(--space-3); bottom: var(--space-3); left: var(--space-3); width: 288px; max-width: calc(100vw - 2 * var(--space-3)); max-height: none; overflow: auto; box-shadow: var(--shadow-overlay); transform: translateX(calc(-100% - 2 * var(--space-3))); visibility: hidden; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s; }
  .is-nav-open .app-side { transform: none; visibility: visible; transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
  .app-side .app-nav__close { display: inline-flex; }
  .app-modules-btn__keys, .app-appbar .mn-brand__name { display: none; }
}
@media (max-width: 700px) {
  .app-appbar, .app-task, .is-poste .app-messages { padding-left: 16px; padding-right: 16px; }
  .app-gestion { padding: 16px; }
  .app-topbar { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-lines .mn-line { transition: none; }
  .app-nav--drawer, .app-side, .app-nav-scrim { transition: none !important; }
}

/* Native checkbox inside the design-system box (keyboard and forms keep working) */
.mn-check input.mn-sr:checked + .mn-check__box { background: var(--accent); border-color: var(--accent); }
.mn-check input.mn-sr:checked + .mn-check__box::after { content: ""; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2.6px 2.6px 0; transform: translateY(-1px) rotate(45deg); }
.mn-check input.mn-sr:focus-visible + .mn-check__box { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
/* A radio choice shows the option actually checked (no server-side class to go stale) */
.mn-choice:has(> input.mn-sr:checked) { background: var(--accent-tint); border-color: var(--accent); border-width: 2px; color: var(--accent-ink); }
.mn-choice:has(> input.mn-sr:checked) .mn-choice__sub { color: var(--accent-ink); }
.mn-choice:has(> input.mn-sr:focus-visible) { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.mn-choice:has(> input.mn-sr:disabled) { cursor: not-allowed; opacity: .7; }
/* A native select styled as a design-system field */
select.mn-input { appearance: auto; font: inherit; color: var(--ink); width: 100%; padding-right: 12px; cursor: pointer; }
select.mn-input:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; border-color: var(--accent); }

/* Keep the primary action's label clear of its F12 badge in the 400px aside */
.app-task__aside .mn-cta { padding: 0 76px 0 24px; font-size: clamp(22px, 2vw, 30px); }
.mn-chip { text-decoration: none; }
a.mn-btn, a.mn-nav, a.mn-cta { text-decoration: none; }

/* ---------- Prénotés ---------- */
.app-form--wide { max-width: none; }
.app-form--wide .mn-field { max-width: none; }
.app-header-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4) var(--space-5); align-items: start; }
.app-header-grid .app-span-2 { grid-column: span 2; }
.app-header-grid .mn-input, .app-header-grid select.mn-input { width: 100%; }
@media (max-width: 1100px) { .app-header-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .app-header-grid { grid-template-columns: minmax(0, 1fr); } .app-header-grid .app-span-2 { grid-column: auto; } }
.app-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.app-choice-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.app-choice-row .mn-choice { flex: 1 1 180px; cursor: pointer; }
.app-pct-input { max-width: 140px; }
.app-pct-input input { text-align: right; }
.app-details { padding: var(--space-4) var(--space-5); }
.app-details__summary { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; font-weight: 600; flex-wrap: wrap; }
.app-details__summary .app-muted-small { font-weight: 400; }
.app-details[open] .app-details__summary { margin-bottom: var(--space-2); }
.app-list { margin: 4px 0 0; padding-left: 18px; }
.app-list--small { font-size: 13px; color: var(--ink-muted); margin: 0; }
.app-grid-status { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
[data-save-status][data-kind="error"] { color: var(--danger-ink); font-weight: 600; }
[data-save-status][data-kind="busy"] { color: var(--pending-ink); }
.app-grid-hint .mn-kbd { font-size: 11px; }

/* Tabulator on the design system's tokens (light and dark). Anchored on #grid: tabulator.min.css loads after this file. */
#grid.tabulator { border: 0; border-top: 1px solid var(--border); background: var(--surface); font: 14px/1.35 var(--font-sans); color: var(--ink); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
#grid.tabulator .tabulator-header { background: var(--surface-sunken); border-bottom: 1px solid var(--border); color: var(--ink-muted); font-weight: 600; font-size: 13px; }
#grid.tabulator .tabulator-header .tabulator-col { background: transparent; border-right: 1px solid var(--border); }
#grid.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 8px 10px; }
#grid.tabulator .tabulator-tableholder { background: var(--surface); }
#grid.tabulator .tabulator-row { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--border); min-height: 36px; }
#grid.tabulator .tabulator-row.tabulator-row-even { background: var(--surface); }
#grid.tabulator .tabulator-row .tabulator-cell { border-right: 1px solid var(--border); padding: 7px 10px; }
#grid.tabulator .tabulator-row .tabulator-cell.tabulator-editing { border: 2px solid var(--accent); padding: 0; background: var(--surface); }
#grid.tabulator .tabulator-row .tabulator-cell.tabulator-editing input { padding: 6px 9px !important; font: inherit; color: var(--ink); background: var(--surface); }
#grid.tabulator .tabulator-row .tabulator-cell.tabulator-range-selected:not(.tabulator-range-only-cell-selected):not(.tabulator-range-row-header) { background: var(--accent-tint); }
#grid.tabulator .tabulator-row .tabulator-cell.tabulator-range-only-cell-selected { outline: 2px solid var(--accent); outline-offset: -2px; }
#grid.tabulator .tabulator-row.tabulator-range-selected .tabulator-cell.tabulator-range-row-header,
#grid.tabulator .tabulator-header .tabulator-col.tabulator-range-highlight { background: var(--accent-tint); color: var(--accent-ink); }
#grid.tabulator .tabulator-row .tabulator-cell.tabulator-range-highlight.tabulator-range-row-header { background: var(--accent-tint); color: var(--accent-ink); }
#grid.tabulator .app-grid-rownum, #grid.tabulator .tabulator-cell.tabulator-row-header { background: var(--surface-sunken); color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#grid.tabulator .tabulator-row.is-placeholder .tabulator-cell { background: var(--surface-sunken); }
#grid.tabulator .tabulator-row.is-placeholder .app-grid-rownum { color: var(--accent-ink); font-weight: 700; }
#grid.tabulator .app-grid-computed { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
#grid.tabulator .app-grid-total { font-weight: 700; font-variant-numeric: tabular-nums; }
#grid.tabulator .app-grid-muted { color: var(--ink-muted); }
#grid.tabulator .app-grid-suggested { color: var(--info-ink); display: inline-flex; align-items: center; gap: 4px; font-style: italic; min-width: 0; max-width: calc(100% - 34px); vertical-align: middle; }
#grid.tabulator .app-grid-suggested__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#grid.tabulator .app-grid-confirm { display: inline-flex; align-items: center; justify-content: center; margin-left: 6px; width: 24px; height: 22px; padding: 0; border-radius: var(--radius-pill); border: 1px solid var(--accent); background: var(--surface); color: var(--accent-ink); font: 600 12px/1 var(--font-sans); cursor: pointer; vertical-align: middle; }
#grid.tabulator .app-grid-confirm:hover { background: var(--accent-tint); }
#grid.tabulator .app-grid-confirm .mn-ico { width: 13px; height: 13px; }
#grid.tabulator .app-grid-confirm:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 1px; }
#grid.tabulator .app-grid-suggested .mn-ico { width: 14px; height: 14px; flex-shrink: 0; }
#grid.tabulator .app-grid-state .mn-badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#grid.tabulator .tabulator-placeholder-contents { color: var(--ink-muted); font-size: 15px; font-weight: 400; }
body .tabulator-edit-list { background: var(--surface-raised); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); font: 14px/1.35 var(--font-sans); }
body .tabulator-edit-list .tabulator-edit-list-item { color: var(--ink); padding: 6px 10px; }
body .tabulator-edit-list .tabulator-edit-list-item.active, .tabulator-edit-list .tabulator-edit-list-item.focused, .tabulator-edit-list .tabulator-edit-list-item:hover { background: var(--accent-tint); color: var(--accent-ink); outline: 0; }
body .tabulator-edit-list .tabulator-edit-list-notice { color: var(--ink-muted); }
.app-grid-card { overflow: hidden; }
#send-panel { display: contents; } /* its banners and table are items of the page's column; empty, it takes no gap */

.app-search-wide { width: min(420px, 100%); }
.app-grid-card { position: relative; }
.app-dropzone { display: none; position: absolute; inset: 0; z-index: 5; align-items: center; justify-content: center; gap: var(--space-3); border: 2px dashed var(--accent); border-radius: var(--radius-xl); background: color-mix(in srgb, var(--accent-tint) 88%, transparent); color: var(--accent-ink); font-size: 20px; font-weight: 700; pointer-events: none; }
.app-dropzone .mn-ico { width: 28px; height: 28px; }
.app-grid-card.is-dropping .app-dropzone { display: flex; }

/* Long work on the whole grid (the AI reads a file, looks for series): the grid waits under a panel. */
.app-busy { position: absolute; inset: 0; z-index: 6; display: flex; justify-content: center; align-items: flex-start; padding: 120px var(--space-4) var(--space-4); background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(2px); }
.app-busy[hidden] { display: none; }
.app-busy__card { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); width: min(440px, 100%); padding: var(--space-6) var(--space-6) var(--space-5); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-overlay); text-align: center; }
.app-busy__card .mn-spin { color: var(--accent); margin-bottom: var(--space-2); }
.app-busy__title { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.app-busy__text { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.app-busy__time { min-height: 18px; font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Searchable list over a <datalist> field (app.js) */
.app-combo { position: relative; }
.app-combo__list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; max-height: 320px; overflow: auto; }
.app-combo__list .mn-option { justify-content: space-between; gap: var(--space-3); padding: 8px var(--space-3); }
.app-combo__sub { font-size: 13px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; }
.app-combo__list .mn-option.is-active .app-combo__sub { color: var(--accent-ink); }
.app-combo__empty { color: var(--ink-muted); font-size: 13px; cursor: default; }
.app-combo__empty:hover { background: none; }

/* ---------- Picking ---------- */
/* Book cover: the real cover from Les Libraires over the BookTile stand-in (same size and radius), which shows
   when the image is missing. */
.app-cover { position: relative; flex-shrink: 0; width: 56px; height: 80px; border-radius: var(--radius-md); overflow: hidden; display: grid; place-items: center; font-weight: 700; font-size: 24px; }
.app-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } /* no ground: the tile shows until the cover loads */
.app-cover > img.is-missing { opacity: 0; } /* not display:none: a lazy image Alpine reuses for another book must still load */
.app-cover--xs { width: 32px; height: 46px; font-size: 15px; border-radius: 8px; }
.app-cover--sm { width: 44px; height: 64px; font-size: 18px; border-radius: 10px; }
.app-cover--md { width: 84px; height: 120px; font-size: 32px; }
.app-cover > .mn-ico { width: 40%; height: auto; }
.app-cover--lg { width: 172px; height: 248px; font-size: 64px; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--border); }

.app-phases { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.app-phase { display: inline-flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink-muted); font-weight: 600; font-size: 16px; }
.app-phase__n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); color: var(--ink-muted); font-size: 14px; font-weight: 700; }
.app-phase.is-current { background: var(--accent-tint); color: var(--accent-ink); }
.app-phase.is-current .app-phase__n { background: var(--accent); color: var(--on-accent); }
.app-phase.is-done { color: var(--success-ink); }
.app-phase.is-done .app-phase__n { background: var(--success-tint); color: var(--success-ink); }

/* The title to take now */
.app-pickcard { display: flex; gap: var(--space-6); padding: var(--space-6); background: var(--surface); border-radius: var(--radius-2xl); border: 2px solid transparent; transition: border-color 150ms, background-color 150ms; }
.app-pickcard.is-flash { background: var(--accent-tint); }
.app-pickcard.is-multi { border-color: var(--event-ink); }
.app-pickcard.is-complete { border-color: var(--success-ink); }
.app-pickcard.is-error { border-color: var(--danger-ink); }
.app-pickcard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.app-pickcard__section { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--surface-sunken); font-size: 15px; font-weight: 600; color: var(--ink); }
.app-pickcard__section .mn-ico { width: 16px; height: 16px; color: var(--ink-muted); }
.app-pickcard__title { font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.app-pickcard__author { font-size: 21px; font-weight: 500; color: var(--ink); }
.app-pickcard__meta { display: flex; flex-wrap: wrap; gap: 4px var(--space-4); font-size: 16px; color: var(--ink-muted); }
.app-pickcard__isbn { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.app-pickcard__isbn strong { color: var(--ink); font-weight: 700; }
.app-pickcard__take { display: flex; align-items: flex-end; gap: var(--space-5); flex-wrap: wrap; margin-top: auto; padding-top: var(--space-3); }
.app-pickcard__count { display: flex; flex-direction: column; }
.app-pickcard__count-label { font-size: 15px; font-weight: 600; color: var(--ink-muted); }
.app-pickcard__count-value { font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.app-pickcard__count-value small { font-size: 24px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0; }
.app-pickcard.is-complete .app-pickcard__count-value { color: var(--success-ink); }
/* More than one copy to take: an orange block the eye can't skip */
.app-pickcard__count.is-multi { padding: var(--space-3) var(--space-5); border-radius: var(--radius-xl); background: var(--event-tint); }
.app-pickcard__count.is-multi .app-pickcard__count-label, .app-pickcard__count.is-multi .app-pickcard__count-value, .app-pickcard__count.is-multi .app-pickcard__count-value small { color: var(--event-ink); }
.app-pickcard__count.is-multi .app-pickcard__count-value { font-size: 72px; }
.app-pickcard__count-unit { font-size: 15px; font-weight: 700; color: var(--event-ink); }
.app-multi { display: inline-flex; align-items: center; gap: var(--space-2); align-self: flex-start; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--event-tint); color: var(--event-ink); font-size: 18px; font-weight: 700; }
.app-multi .mn-ico { width: 18px; height: 18px; }
.app-pickcard__orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: var(--ink-muted); }
.app-pickcard__orders strong { color: var(--ink); font-weight: 600; }
.app-pickcard__stock { font-size: 14px; color: var(--ink-muted); }
.app-pickcard__stock-head { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.app-pickcard__stock table { border-collapse: collapse; }
.app-pickcard__stock th { font-weight: 500; text-align: left; padding: 2px 16px 2px 0; }
.app-pickcard__stock td { color: var(--ink); padding: 2px 16px 2px 0; }
.app-pickcard__stock .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.app-pickcard__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.app-pickcard__state { display: flex; align-items: center; gap: var(--space-2); font-size: 18px; font-weight: 700; }
.app-pickcard__state.is-ok { color: var(--success-ink); }
.app-pickcard__state.is-error { color: var(--danger-ink); }
.app-pickcard__state.is-warn { color: var(--warning-ink); }

/* The next titles on the route */
.app-upnext { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--space-3); }
.app-upnext__item { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); border-radius: var(--radius-xl); background: var(--surface); border: 1.5px solid transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.app-upnext__item:hover { border-color: var(--border-control); }
.app-upnext__item:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.app-upnext__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-upnext__title { font-size: 15px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-upnext__sub { font-size: 13px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-upnext__qty { font-size: 13px; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.app-upnext__qty.is-multi { align-self: flex-start; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--event-tint); color: var(--event-ink); }

/* The route, by section */
.app-route-head { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); font-size: 16px; font-weight: 700; color: var(--ink-muted); }
.app-route-head .mn-ico { width: 16px; height: 16px; }
.mn-line.is-done { opacity: .62; }
.app-line__take { display: flex; flex-direction: column; align-items: flex-end; min-width: 96px; font-variant-numeric: tabular-nums; }
.app-line__take b { font-size: 22px; font-weight: 700; }
.app-line__take span { font-size: 13px; color: var(--ink-muted); }
.app-line__take.is-multi b { color: var(--event-ink); }

/* Place: where the copy in hand goes */
.app-dest { display: flex; gap: var(--space-6); align-items: center; padding: var(--space-6); background: var(--surface); border-radius: var(--radius-2xl); border: 2px solid transparent; min-height: 200px; }
.app-dest.is-pending { border-color: var(--accent); }
.app-dest.is-placed { border-color: var(--success-ink); }
.app-dest.is-error { border-color: var(--danger-ink); }
.app-dest__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.app-dest__label { font-size: 17px; font-weight: 600; color: var(--ink-muted); }
.app-dest__code { font-size: 76px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.app-dest__code.is-long { font-size: 40px; line-height: 1.1; }
.app-dest.is-placed .app-dest__code { color: var(--success-ink); }
.app-dest__title { font-size: 20px; font-weight: 600; }
.app-dest__sub { font-size: 16px; color: var(--ink-muted); }
.app-dest__hint { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); font-size: 17px; font-weight: 600; color: var(--accent-ink); }
.app-dest.is-placed .app-dest__hint { color: var(--success-ink); }
.app-dest.is-error .app-dest__hint { color: var(--danger-ink); }
.app-dest__idle { font-size: 22px; font-weight: 600; color: var(--ink-muted); }
.app-dest__actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
/* The book in hand goes on another shelf than the one the employee stands at: impossible to miss. */
.app-dest.is-elsewhere { border-color: var(--warning-ink); border-width: 4px; background: var(--warning-tint); }
.app-dest.is-elsewhere .app-dest__label, .app-dest.is-elsewhere .app-dest__code, .app-dest.is-elsewhere .app-dest__hint { color: var(--warning-ink); }
.app-dest__why { font-size: 17px; font-weight: 600; }
.app-here { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-xl); background: var(--surface); }
.app-here__label { color: var(--ink-muted); font-weight: 600; }
.app-here__code { font-size: 28px; font-weight: 800; }
.app-here__code.is-none { font-size: 18px; font-weight: 600; color: var(--ink-muted); }
.app-here .mn-btn { margin-left: auto; }

/* Place: choosing another shelf from the list */
.app-shelfpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--space-2); max-height: 40vh; overflow: auto; }
.app-shelfpick__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: var(--space-2); border-radius: var(--radius-lg); border: 1.5px solid var(--border-control); background: var(--surface); color: var(--ink); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.app-shelfpick__item:hover { background: var(--accent-tint); border-color: var(--accent); }
.app-shelfpick__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-shelfpick__item.is-suggested { border-color: var(--accent); }
.app-shelfpick__item small { font-size: 12px; font-weight: 600; color: var(--accent-ink); }

.app-destlist { display: flex; flex-direction: column; gap: var(--space-2); }
.app-destlist__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px var(--space-3); border-radius: var(--radius-lg); background: var(--surface-sunken); font-variant-numeric: tabular-nums; }
.app-destlist__row strong { font-size: 18px; }
.app-destlist__row > span { white-space: nowrap; }
.app-destlist__row.is-done { background: var(--success-tint); color: var(--success-ink); }

.app-progress { height: 8px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.app-progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s; }
.app-kbdlist { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--space-3); align-items: center; font-size: 14px; color: var(--ink-muted); }
.app-kbdlist > span:nth-child(odd) { display: inline-flex; gap: 4px; justify-content: flex-end; }

/* Ready orders, start page */
.app-group__head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-4) var(--space-5); }
.app-group__name { font-size: 17px; font-weight: 700; }
.app-group__head .app-group__action { margin-left: auto; }
.app-ready-table { table-layout: fixed; min-width: 1040px; } /* every group's columns line up */
.app-start { max-width: 820px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-5); padding: 24px 48px 40px; }
.app-start__card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface); border-radius: var(--radius-2xl); }
.app-start__steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-muted); }
.app-print-frame { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }
.app-section-tools { align-items: flex-start; }
.app-empty--sm { padding: var(--space-5); }

/* Waves: the bar that launches one, the cart's bins */
.app-wavebar { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-4) var(--space-5); position: sticky; top: var(--space-3); z-index: 2; }
.app-wavebar__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-wavebar__count { padding: 6px 14px; border-radius: var(--radius-pill); background: var(--surface-sunken); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-wavebar__count.is-over { background: var(--danger-tint); color: var(--danger-ink); }
.app-group.is-picked { box-shadow: inset 0 0 0 2px var(--accent); }
.app-bin { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px; background: var(--accent-tint); color: var(--accent-ink); font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }
.app-bin.is-done { background: var(--success-tint); color: var(--success-ink); }
.app-bin.is-closed { background: var(--surface-sunken); color: var(--ink-muted); }
.app-dest__bin { display: flex; align-items: baseline; gap: var(--space-3); }
.app-dest__bin .app-dest__code { font-size: 96px; }
.app-dest__shelf { font-size: 20px; font-weight: 700; color: var(--ink-muted); }
.app-dest.is-placed .app-dest__label { color: var(--success-ink); }
.app-dest__check { display: flex; align-items: center; gap: var(--space-2); font-size: 16px; font-weight: 600; color: var(--warning-ink); }
.app-binlist { display: flex; flex-direction: column; gap: var(--space-2); }
.app-binrow { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-3); border-radius: var(--radius-lg); background: var(--surface-sunken); font-variant-numeric: tabular-nums; min-width: 0; }
.app-binrow.is-flash { background: var(--accent-tint); }
.app-binrow.is-flash .app-bin, .mn-line.is-flash .app-bin { background: var(--accent); color: var(--on-accent); }
.app-binrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-binrow__name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-binrow__sub { font-size: 13px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-binrow__count { font-size: 17px; font-weight: 700; white-space: nowrap; }
.app-binrow a { color: inherit; }
.app-closelist { display: flex; flex-direction: column; gap: var(--space-2); max-height: 46vh; overflow: auto; }
.app-closelist__row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: 10px var(--space-3); border-radius: var(--radius-lg); background: var(--surface-sunken); }
.app-closelist__row .mn-input { width: 92px; }
.app-closelist__row label { font-size: 13px; color: var(--ink-muted); display: flex; align-items: center; gap: 6px; }

/* Missing titles: the second look */
.app-missing__actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.app-missing__count { display: flex; align-items: center; gap: var(--space-2); }
.app-missing__count .mn-input { width: 64px; }
.app-missing__note { max-width: 200px; white-space: normal; text-align: right; }
.app-where { display: flex; flex-wrap: wrap; gap: 4px; }

/* Expédition: the lot head's box count and print button, the invoices, the ship-to card (the label's content) */
.app-lot__end { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); }
.app-lot__end .mn-qty__val { color: var(--ink); }
.app-invoice .mn-line__title { font-weight: 700; }
.app-invoice .app-cover .mn-ico { width: 22px; height: 22px; }
.app-shipto { padding: var(--space-5); display: flex; flex-direction: column; gap: 2px; font-size: 16px; line-height: 1.35; }
.app-shipto .mn-section-title { margin: 0 0 var(--space-1); }
.app-shipto__name { font-size: 20px; line-height: 1.25; margin-bottom: var(--space-1); }
.app-praxedo { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.app-praxedo__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.app-praxedo__head .mn-section-title { margin: 0; }
.app-praxedo__line { margin: 0; display: flex; align-items: center; gap: var(--space-2); font-size: 15px; line-height: 1.35; }
.app-praxedo__number { margin: 0 0 2px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.app-praxedo__pick { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.app-praxedo__pick > .mn-input { width: 100%; }
.app-praxedo__results { display: flex; flex-direction: column; gap: 6px; width: 100%; max-height: 260px; overflow: auto; }
.app-praxedo__site { all: unset; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 8px var(--space-3); border-radius: var(--radius-lg); background: var(--surface-sunken); cursor: pointer; font-size: 14px; }
.app-praxedo__site:hover, .app-praxedo__site:focus-visible { background: var(--accent-tint); outline: none; }
.app-praxedo__site span { color: var(--ink-muted); font-size: 13px; }
.app-praxedo > .mn-btn { align-self: flex-start; }
.app-praxedo__choose { display: flex; flex-direction: column; gap: var(--space-5); }
.app-praxedo__new { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-sunken); }
.app-praxedo__new .mn-help { margin: calc(-1 * var(--space-2)) 0 0; }
.app-praxedo__new .mn-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
.app-praxedo__new .mn-field .mn-label { font-size: 13px; color: var(--ink-muted); margin: 0; }
.app-praxedo__new .mn-input { width: 100%; background: var(--surface); }
.app-praxedo__new > .mn-btn { align-self: flex-start; }
.app-praxedo__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-2); }
.app-praxedo__results:empty { display: none; }
.app-praxedo-reason { margin: var(--space-1) 0 0 30px; }
.app-praxedo-check { margin-top: var(--space-4); font-size: 16px; gap: var(--space-2); }
.app-praxedo-check .mn-kbd { margin-left: var(--space-1); }
.app-praxedo-check.app-rush-check { margin-top: var(--space-2); }

@media (max-height: 860px) {
  .app-pickcard { padding: var(--space-5); gap: var(--space-5); }
  .app-cover--lg { width: 132px; height: 190px; }
  .app-pickcard__title { font-size: 28px; }
  .app-pickcard__count-value { font-size: 44px; }
  .app-pickcard__count.is-multi .app-pickcard__count-value { font-size: 56px; }
  .app-dest { min-height: 160px; padding: var(--space-5); }
  .app-dest__code { font-size: 60px; }
}
@media (max-width: 700px) {
  .app-pickcard, .app-dest { flex-direction: column; align-items: flex-start; }
  .app-start { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-pickcard, .app-progress > span { transition: none; }
}

/* The store plan (picking/_map.html, plan.html): the drawing imported from the inventory plan, in the theme's
   colours, and the walk drawn over it. Plan units are PDF points: the strokes are thin on purpose. */
.app-task__aside.has-map { flex-basis: 520px; }
.app-map-slot { display: flex; flex-direction: column; gap: var(--space-4); }
.app-map-slot:empty { display: none; }
.app-map { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.app-map__head { display: flex; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; }
.app-map__titles { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-map__title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 700; }
.app-map__caption { color: var(--ink-muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.app-map__tools { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.app-map__tools .mn-tab { white-space: nowrap; }
.app-map__frame { position: relative; width: 100%; overflow: hidden; border-radius: var(--radius-md); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--border); }
.app-map__stage { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 320ms ease; }
.app-map__drawing, .app-map__drawing > svg, .app-map__over { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.app-map__over { overflow: visible; }
.pl-shape { fill: var(--surface); stroke: var(--ink-disabled); stroke-width: 0.45; stroke-linejoin: round; }
.pl-shade { fill: var(--border); stroke: var(--ink-disabled); stroke-width: 0.45; }
.pl-wall { fill: var(--ink-muted); stroke: none; }
.pl-line { fill: none; stroke: var(--ink-disabled); stroke-width: 0.45; }
.pl-num, .pl-text { fill: var(--ink-muted); font-family: var(--font-sans); }
.pl-text { font-weight: 700; }
.app-map__fx { stroke-linejoin: round; }
.app-map__fx.is-current { fill: var(--accent); stroke: var(--accent-pressed); }
.app-map__fx.is-todo { fill: var(--accent-tint); stroke: var(--accent); }
.app-map__fx.is-done { fill: var(--success-tint); stroke: var(--success-ink); }
.app-map__walked, .app-map__ahead { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.app-map__walked { stroke: var(--success-ink); }
.app-map__ahead { stroke: var(--accent); opacity: 0.75; }
.app-map__stop circle { fill: var(--surface); stroke: var(--accent); }
.app-map__stop text { fill: var(--accent-ink); font-family: var(--font-sans); font-weight: 700; text-anchor: middle; font-variant-numeric: tabular-nums; }
.app-map__stop.is-current circle { fill: var(--accent); stroke: var(--surface); }
.app-map__stop.is-current .app-map__halo { fill: var(--accent); stroke: none; opacity: 0.22; }
.app-map__stop.is-current text { fill: var(--on-accent); }
.app-map__stop.is-done circle { fill: var(--success-tint); stroke: var(--success-ink); }
.app-map__stop path { fill: none; stroke: var(--success-ink); stroke-linecap: round; stroke-linejoin: round; }
.app-map__callout rect { fill: var(--ink); }
.app-map__callout text { fill: var(--bg); font-family: var(--font-sans); font-weight: 700; text-anchor: middle; }
.app-map__legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 14px; color: var(--ink-muted); }
.app-map__legend > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.app-map__key { width: 14px; height: 14px; border-radius: 4px; box-sizing: border-box; border: 1.5px solid; }
.app-map__key.is-current { background: var(--accent); border-color: var(--accent-pressed); }
.app-map__key.is-todo { background: var(--accent-tint); border-color: var(--accent); }
.app-map__key.is-done { background: var(--success-tint); border-color: var(--success-ink); }
.app-map__show { align-self: flex-start; }

/* The stop on the walk: its number (the map's marker) and its fixtures, on the title card and in the route list */
.app-stop { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; box-sizing: border-box; border-radius: var(--radius-pill); border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.app-stop.is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.app-stop.is-done { background: var(--success-tint); border-color: var(--success-ink); color: var(--success-ink); }
.app-place { align-self: stretch; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: var(--accent-tint); color: var(--ink); }
.app-place .app-stop { min-width: 40px; height: 40px; font-size: 18px; }
.app-place__body { display: flex; flex-direction: column; min-width: 0; }
.app-place__label { font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.app-place__code { font-size: 24px; line-height: 30px; font-weight: 700; }
.app-place__sub { font-size: 15px; color: var(--ink-muted); }
.app-route-head__place { font-weight: 600; color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .app-map__stage { transition: none; }
}

/* Plan du magasin (Gestion): the sections, and the plan to click their fixtures on */
.app-plan { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; }
.app-plan__list { flex: 1 1 340px; max-width: 460px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.app-plan__map { flex: 999 1 560px; min-width: 0; position: sticky; top: var(--space-4); }
.app-plan__rows { max-height: 70vh; overflow-y: auto; padding: var(--space-2); display: flex; flex-direction: column; gap: 2px; }
.app-plan__row { display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); border: 2px solid transparent; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.app-plan__row:hover { background: var(--surface-hover); }
.app-plan__row[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); }
.app-plan__row.is-child { padding-left: var(--space-8); }
.app-plan__row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.app-plan__row-name { font-weight: 600; }
.app-plan__row-sub { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.app-plan__row-count { font-size: 13px; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.app-plan .app-map__fx { cursor: pointer; }
.app-plan .app-map__fx.is-free { fill: var(--surface); fill-opacity: 0.01; stroke: transparent; }
.app-plan .app-map__fx.is-free:hover, .app-plan .app-map__fx.is-other:hover { stroke: var(--accent); stroke-width: 1.2; }
.app-plan .app-map__fx.is-other { fill: var(--tint-lilac); stroke: var(--tint-lilac-ink); }
.app-plan .app-map__fx.is-mine { fill: var(--accent); stroke: var(--accent-pressed); }
.app-plan .app-map__fx.is-start { stroke: var(--event-ink); stroke-width: 2; }
.app-plan__set { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; }
.app-plan__import { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-end; justify-content: center; }
.app-plan__import input[type="file"] { font: inherit; font-size: 15px; }
.app-plan__key-other { background: var(--tint-lilac); border-color: var(--tint-lilac-ink); }
.app-plan__key-free { background: var(--surface); border-color: var(--ink-disabled); }
.app-plan__key-start { background: transparent; border-color: var(--event-ink); border-width: 2.5px; }

/* Étiquettes: the list's order, the "× 12" waiting for the next book, each title's price, the last labels made */
.app-labels-sort { display: flex; align-items: center; gap: var(--space-2); }
.app-labels-sort .mn-label { margin: 0; }
.app-labels-times { flex-shrink: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.app-label-line__price { flex-shrink: 0; min-width: 96px; text-align: right; }
.app-label-line__qty { min-width: 56px; text-align: right; }
.app-labels-reset { margin-left: auto; }
.app-labels-recent { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.app-labels-recent .mn-section-title { margin: 0; }
.app-labels-recent__row { display: flex; align-items: center; gap: var(--space-3); justify-content: space-between; }
.app-labels-recent__row > div { display: flex; flex-direction: column; font-size: 15px; line-height: 1.35; }
.app-labels-recent__row .mn-muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-labels-recent__empty { margin: 0; font-size: 15px; line-height: 1.35; }

/* Short empty-state texts: no word left alone on the last line */
.mn-empty__text { text-wrap: balance; }

/* ---------- Tutorials (static/js/tutorial.js over Driver.js; its own stylesheet isn't used) ---------- */
.app-tutorial-btn__dot { align-self: flex-start; width: 8px; height: 8px; margin: 7px 0 0 -2px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.mn-btn--sm .app-tutorial-btn__dot { margin: 5px 0 0 -1px; }

/* What Driver.js needs: only the highlighted element and the bubble take the mouse. */
.driver-active .driver-overlay, .driver-active * { pointer-events: none; }
.driver-active .driver-active-element, .driver-active .driver-active-element *, .driver-popover, .driver-popover * { pointer-events: auto; }
.driver-no-interaction, .driver-no-interaction * { pointer-events: none !important; }
.driver-active-element-parent-no-scroll { overflow: hidden !important; }
.driver-fade .driver-overlay { animation: app-tour-in .25s ease-out; }
.driver-fade .driver-popover { animation: app-tour-in .2s ease-out; }
@keyframes app-tour-in { from { opacity: 0; } to { opacity: 1; } }

.driver-popover.app-tour { all: unset; box-sizing: border-box; position: fixed; top: 0; right: 0; z-index: 1000000000; display: flex; flex-direction: column; gap: var(--space-2); width: min(380px, calc(100vw - 32px)); padding: var(--space-3) var(--space-5) var(--space-4); background: var(--surface-raised); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-overlay); font: 400 15px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
.driver-popover.app-tour:focus { outline: none; }
.driver-popover.app-tour--wide { width: min(460px, calc(100vw - 32px)); }
.app-tour__progress { flex: 1; max-width: 72px; height: 4px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.app-tour__progress > span { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.app-tour__head { display: flex; align-items: center; gap: var(--space-2); margin-right: calc(-1 * var(--space-2)); }
.app-tour__eyebrow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--accent-ink); font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.app-tour__eyebrow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-tour__eyebrow .mn-ico { width: 16px; height: 16px; flex-shrink: 0; }
.app-tour .driver-popover-close-btn.mn-close { position: static; width: 32px; height: 32px; }
.app-tour .driver-popover-close-btn .mn-ico { width: 18px; height: 18px; }
.app-tour .driver-popover-title { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.app-tour .driver-popover-description { margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.app-tour__text { text-wrap: pretty; }
.app-tour__text p, .app-tour__text ul { margin: 0; }
.app-tour__text * + p, .app-tour__text * + ul { margin-top: var(--space-2); }
.app-tour__text ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.app-tour .mn-kbd { vertical-align: 1px; margin: 0 1px; }
.app-tour__combo { white-space: nowrap; }
.app-tour__keymap { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--space-3); align-items: center; margin: 0; }
.app-tour__keymap dt { justify-self: start; }
.app-tour__keymap dd { margin: 0; }
.app-tour__todo { display: flex; align-items: center; gap: var(--space-2); padding: 10px var(--space-3); border-radius: var(--radius-md); background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
.app-tour__todo.is-done { background: var(--success-tint); color: var(--success-ink); }
.app-tour__todo .mn-ico { width: 20px; height: 20px; flex-shrink: 0; }
.app-tour__pulse { position: relative; width: 10px; height: 10px; margin: 0 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.app-tour__pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: app-tour-pulse 1.6s ease-out infinite; }
@keyframes app-tour-pulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }
.app-tour .driver-popover-footer { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.app-tour .driver-popover-progress-text { display: none !important; }
.app-tour .driver-popover-navigation-btns { display: flex; gap: var(--space-1); margin-left: auto; }
.app-tour .driver-popover-btn-disabled { visibility: hidden; }
.app-tour .driver-popover-footer-btn:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.driver-popover-arrow { position: absolute; border: 8px solid var(--surface-raised); }
.driver-popover-arrow-side-over, .driver-popover-arrow-side-center, .driver-popover-arrow-none { display: none; }
.driver-popover-arrow-side-left { left: 100%; border-color: transparent transparent transparent var(--surface-raised); }
.driver-popover-arrow-side-right { right: 100%; border-color: transparent var(--surface-raised) transparent transparent; }
.driver-popover-arrow-side-top { top: 100%; border-color: var(--surface-raised) transparent transparent transparent; }
.driver-popover-arrow-side-bottom { bottom: 100%; border-color: transparent transparent var(--surface-raised) transparent; }
@media (prefers-reduced-motion: reduce) {
  .driver-fade .driver-overlay, .driver-fade .driver-popover, .app-tour__pulse::after { animation: none; }
}

/* ---------- Formation ---------- */
.app-training-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--space-4); align-items: start; }
.app-training { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-4); background: var(--surface); border-radius: var(--radius-2xl); }
.app-training__head { display: flex; align-items: center; gap: var(--space-3); }
.app-training__head .app-module__icon { margin: 0; }
.app-training__head .app-module__title { flex: 1; }
.app-training__count { font-variant-numeric: tabular-nums; }
.app-training__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.app-training__row { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 6px 0; border-top: 1px solid var(--border); }
.app-training__state { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--ink-muted); }
.app-training__state.is-done { color: var(--success); }
.app-training__state .mn-ico { width: 20px; height: 20px; }
.app-training__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.app-training__label { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.app-training__hint { font-size: 13px; font-weight: 400; color: var(--ink-muted); }
.app-training__row .mn-btn { flex-shrink: 0; }
.app-training__progress { display: flex; align-items: center; gap: var(--space-3); min-width: 200px; font-size: 14px; white-space: nowrap; }
.app-training__progress .app-progress { flex: 1; max-width: 160px; }
.app-training__todo { font-size: 14px; color: var(--ink-muted); }

/* Clés d'API */
.app-key-endpoints { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2) var(--space-4); margin-top: var(--space-3); }
.app-key-endpoints .mn-check { font-size: 15px; }
.app-fieldset > legend.mn-label { padding: 0; margin-bottom: var(--space-2); }
.app-key-secret { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.app-key-secret .mn-code { display: inline-flex; align-items: center; min-height: var(--size-control); padding: 0 var(--space-3); font-size: 15px; word-break: break-all; user-select: all; }
.app-key-endpoint-list { font-size: 13px; color: var(--ink-muted); max-width: 360px; }


/* ---------- Connexion (accounts): email code, shared computer's tiles, NIP keypad ---------- */
.app-login { grid-template-columns: minmax(0, 1fr); } /* a card never grows wider than the screen */
.app-login__card--wide { width: 760px; }
.app-login__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.app-login__title { font-size: 26px; }
.app-login__lead { margin: 6px 0 0; color: var(--ink-muted); }
.app-login__links { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; align-self: stretch; margin: 0 calc(-1 * var(--space-3)); }
.app-login__alt { align-self: center; }
.app-pin .app-login__links { justify-content: center; row-gap: 0; }
.app-code-input input { font-size: 28px; font-weight: 600; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.app-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.app-person { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); min-height: 150px; padding: var(--space-5) var(--space-3); border: 1.5px solid var(--border-control); border-radius: var(--radius-xl); background: var(--surface); color: var(--ink); font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.app-person:hover { background: var(--surface-hover); border-color: var(--ink-muted); }
.app-person:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.app-person__name { font-size: 17px; font-weight: 600; line-height: 1.2; }
.app-person__state { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-muted); }
.app-person__state.is-blocked { color: var(--warning-ink); font-weight: 600; }
.app-person__state .mn-ico { width: 14px; height: 14px; }
.app-pin__who { text-align: center; }
.app-pin__name { font-size: 22px; font-weight: 700; }
.app-pin__error { align-items: flex-start; max-width: 276px; } /* the width of the keys */
.app-pin__error .mn-ico { margin-top: 1px; }
@media (max-width: 480px) { .app-login { padding: var(--space-4); } .app-people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* ---------- Retours: lists, ramassage, credits, title lookup, old Monet ---------- */
.app-newlist { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; }
.app-newlist .mn-field { min-width: min(320px, 100%); max-width: none; }
.mn-card.app-form:has(.app-newlist) { max-width: 760px; }
.app-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; }
.app-menu { position: relative; }
.app-menu__list { display: flex; flex-direction: column; }
.app-menu__list button { all: unset; display: flex; align-items: center; gap: var(--space-2); padding: 9px var(--space-3); border-radius: var(--radius-md); font-size: 15px; cursor: pointer; }
.app-menu__list button:hover, .app-menu__list button:focus-visible { background: var(--surface-hover); }
.app-menu__list button.is-danger { color: var(--danger-ink); }
.app-menu__list .mn-ico { width: 18px; height: 18px; }

.app-rlist { display: flex; flex-direction: column; gap: var(--space-4); }
.app-rlist__add { padding: var(--space-5); }
.app-rlist__add .mn-field { max-width: none; }
.app-rlist__addrow { display: flex; gap: var(--space-3); align-items: flex-start; }
.app-rlist__addrow .app-textarea { min-height: 52px; flex: 1; }
.app-rlist__tools { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.app-rlist__filter { flex: 1 1 260px; max-width: 420px; }
.app-rlist__sort { display: inline-flex; align-items: center; gap: var(--space-2); }
.app-rlist__sort .mn-label { margin: 0; }
.app-rlist__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-left: auto; align-items: center; }
.app-rlist__fresh { margin: 0; padding: 0 var(--space-5) var(--space-3); font-size: 13px; }
.app-rlist__table td { vertical-align: top; }
.app-rlist__table tr.is-muted td { color: var(--ink-muted); }
.app-rlist__table tr.is-set td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.app-rlist__title { min-width: 220px; max-width: 300px; }
.app-rlist__section { min-width: 120px; max-width: 170px; }
.app-rlist__legend { font-size: 12px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; }
.app-rlist__salesrow { display: grid; grid-template-columns: repeat(3, 3ch); gap: var(--space-2); justify-content: end; font-variant-numeric: tabular-nums; }
.app-rlist__rights { min-width: 130px; max-width: 200px; }
.app-rlist__rights .mn-badge { margin: 0 4px 4px 0; white-space: nowrap; }
.app-rlist__due { opacity: .8; margin-left: 2px; }
.app-rlist__qtycell { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.app-rlist__bar { position: sticky; bottom: var(--space-4); z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-3) var(--space-5); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-overlay); }
.app-rlist__group { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.app-rlist__grouphead { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; align-items: flex-start; }
.app-rlist__groupfields { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.app-rlist__groupfields .mn-field { width: 200px; }
.app-rlist__grouplines { margin: 0; padding: 0; list-style: none; font-size: 14px; columns: 2 280px; column-gap: var(--space-5); }
.app-rlist__grouplines li { break-inside: avoid; padding: 2px 0; }
.app-rlist__shortfalls { margin: 6px 0 0; padding-left: 18px; }

.app-rpick__line { appearance: none; box-sizing: border-box; width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.app-rpick__line.is-done .mn-line__title { color: var(--ink-muted); }
.app-rpick__line:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.app-rpick__count { display: inline-flex; align-items: center; gap: var(--space-2); margin-left: auto; font-size: 16px; font-weight: 600; white-space: nowrap; }
.app-rpick__ok { color: var(--success-ink); display: inline-flex; }

.app-rdetail__kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4) var(--space-6); margin: 0; }
.app-rdetail__kv dt { font-size: 13px; font-weight: 600; color: var(--ink-muted); margin-bottom: 4px; }
.app-rdetail__kv dd { margin: 0; font-size: 15px; }
.app-kv-card { padding: var(--space-5) var(--space-6); }

.app-rcredit { display: flex; flex-direction: column; gap: var(--space-4); }
.app-rcredit .app-form { max-width: none; }
.app-rcredit__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.app-rcredit__fields .mn-field { max-width: none; }

.app-rsearch__head { display: flex; gap: var(--space-5); padding: var(--space-5); align-items: flex-start; flex-wrap: wrap; }
.app-rsearch__body { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.app-rsearch__title { margin: 0; font-size: 24px; }
.app-rsearch__stats { margin-top: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.app-rsearch__stats .mn-stat { background: var(--surface-sunken); padding: var(--space-4); }
.app-rsearch__stats .mn-stat__value { font-size: 26px; line-height: 30px; }
.app-rsearch__add { display: flex; gap: var(--space-2); align-items: flex-end; }
.app-rsearch__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: var(--space-4); align-items: start; }
.app-rsearch__note { margin: 0; padding: var(--space-3) var(--space-5) var(--space-4); font-size: 14px; }

.app-rlegacy__form { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: flex-end; }
.app-rlegacy__form .mn-field { flex: 1 1 150px; max-width: none; }
.mn-card.app-form:has(.app-rlegacy__form) { max-width: none; }
.app-rlegacy__history { max-height: 60vh; overflow: auto; }
@media (max-width: 720px) {
  .app-rlist__addrow { flex-direction: column; align-items: stretch; }
  .app-rsearch__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Modification en lot */
.app-bulk-new { display: flex; flex-direction: column; gap: var(--space-4); }
.app-bulk-new .mn-field { max-width: 640px; }
.app-bulk-file { font: inherit; }
.app-bulk-list > summary { cursor: pointer; color: var(--color-text-muted, inherit); }
.app-bulk-list[open] > summary { margin-bottom: var(--space-3); }
.app-bulk-changes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3) var(--space-4); }
.app-bulk-changes select, .app-bulk-changes input { width: 100%; }
.app-bulk-problems { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 2px; }
/* Détails de la réception: Déplacer opens a small form under the button */
.app-move > summary { list-style: none; cursor: pointer; }
.app-move > summary::-webkit-details-marker { display: none; }
.app-move__form { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; margin-top: var(--space-2); }
.app-move__form label { display: flex; flex-direction: column; gap: 2px; }

/* Modification en lot: a blank Monet PRO book filled on the batch page */
.app-site-fill{display:grid;gap:8px;margin-top:8px;max-width:640px}
.app-site-fill__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}

/* Service client: Achats des clients */
.app-svc__search { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; }
.app-svc__wide { flex: 1 1 220px; }
.app-svc__hint { margin: 0; }
.app-svc { display: flex; flex-direction: column; gap: var(--space-4); }
.app-svc__presets { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.app-svc__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.app-svc__filters { display: flex; flex-direction: column; gap: var(--space-4); position: sticky; top: var(--space-4); max-height: calc(100vh - 2 * var(--space-4)); overflow-y: auto; }
.app-svc__results { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.app-svc__totals { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.app-svc__group { display: flex; flex-direction: column; gap: var(--space-1); }
.app-svc__group-head { display: flex; justify-content: space-between; align-items: baseline; }
.app-svc__tree { max-height: 320px; overflow-y: auto; }
.app-svc__node { display: flex; align-items: center; gap: var(--space-1); min-height: 28px; }
.app-svc__node .mn-check { flex: 1; min-width: 0; }
.app-svc__twisty { width: 18px; flex: none; background: none; border: 0; padding: 0; color: var(--text-muted, inherit); cursor: pointer; font-size: 12px; }
.app-svc__count { font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .app-svc__layout { grid-template-columns: 1fr; } .app-svc__filters { position: static; max-height: none; } }
