/* The owner's and the partner's screens (Accueil, Commandes, Stock, Argent, Réglages, ＋ Saisir).
   Tokens come from ops.css / visual.css; no new colours. Restrained: tinted neutrals, ink for
   actions, a status colour only next to a word. Full borders or tints, never side stripes. */

/* ------------------------------------------------------------- basics --- */
.ow-page { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ow-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ow-head h1 { font-size: 1.375rem; font-weight: 680; letter-spacing: -0.015em; margin: 0; line-height: 1.2; }
.ow-muted { color: var(--ink-3); }
.ow-small { font-size: 0.8125rem; }
.ow-strong { font-weight: 600; }
.ow-center { text-align: center; }
.ow-pad { padding: 12px 14px; margin: 0; }
.ow-num { font-weight: 650; font-variant-numeric: tabular-nums; }
.ow-sub { font-size: 0.875rem; font-weight: 650; margin: 16px 0 6px; color: var(--ink-2); }
.ow-red { color: var(--bad); font-weight: 600; font-size: 0.8125rem; }

/* Text in a status colour (always next to a word). Dots and bars use --tone. */
:is(.ow-page, .o-sheet) :is(p, b, small, h3, td, strong, span).tone-red { color: var(--bad); }
:is(.ow-page, .o-sheet) :is(p, b, small, h3, td, strong, span).tone-amber { color: var(--warn); }
:is(.ow-page, .o-sheet) :is(p, b, small, h3, td, strong, span).tone-green { color: var(--ok); }
:is(.ow-page, .o-sheet) :is(p, b, small, h3, td, strong, span).tone-blue { color: var(--info); }
.ow-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--c-grey)); flex: 0 0 auto; }

.ow-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.ow-block-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ow-block-titles { flex: 1; min-width: 0; }
.ow-block-head h2 { font-size: 1rem; font-weight: 650; margin: 0; letter-spacing: -0.005em; }
.ow-block-head p { margin: 2px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.ow-more { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8125rem; font-weight: 560; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.ow-more:hover { color: var(--ink); text-decoration: underline; }

.ow-grid-21, .ow-grid-2, .ow-grid-3 { display: grid; gap: 14px; min-width: 0; }
@media (min-width: 760px) { .ow-grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .ow-grid-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .ow-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}

.ow-plain { list-style: none; margin: 0; padding: 0; }
.ow-plain > li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.ow-plain > li:first-child { border-top: 0; padding-top: 2px; }
.ow-plain > li > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.ow-plain > li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ow-pay > li.red > b { color: var(--bad); }

.ow-kv { margin: 0; display: flex; flex-direction: column; }
.ow-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.ow-kv > div:first-child { border-top: 0; }
.ow-kv dt { color: var(--ink-3); font-weight: 500; }
.ow-kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ow-kv-total { font-weight: 700; }
.ow-kv-total dt { color: var(--ink); font-weight: 650; }

.ow-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 0.875rem; }
.ow-note svg { flex: 0 0 auto; margin-top: 2px; }
.ow-note.tone-amber { background: var(--warn-bg); }
.ow-note.tone-red { background: var(--bad-bg); }
.ow-note.tone-blue { background: var(--info-bg); }
:is(.ow-page, .o-sheet) .ow-note:is(.tone-red, .tone-amber, .tone-blue, .tone-green) { color: var(--ink); }

.ow-alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); }
.ow-alert.tone-red { background: var(--bad-bg); border-color: transparent; }
.ow-alert > svg { color: var(--bad); flex: 0 0 auto; margin-top: 2px; }
.ow-alert p { margin: 4px 0 0; font-size: 0.875rem; }
.ow-btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }

.ow-empty { display: flex; align-items: center; gap: 12px; padding: 6px 2px; color: var(--ink-2); }
.ow-empty > svg { color: var(--ok); flex: 0 0 auto; }
.ow-empty strong { display: block; font-weight: 600; color: var(--ink); }
.ow-empty p { margin: 2px 0 0; font-size: 0.875rem; color: var(--ink-3); }
.ow-hero { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

.ow-skel { border-radius: var(--radius); background: var(--surface-2); animation: ow-pulse 1.4s ease-in-out infinite; }
@keyframes ow-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .ow-skel { animation: none; } }
.ow-errorline { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--bad-bg); color: var(--ink); }

/* -------------------------------------------------------------- cards --- */
.ow-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .ow-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.ow-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 96px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: default; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
a.ow-card, button.ow-card { cursor: pointer; }
a.ow-card:hover, button.ow-card:hover { border-color: var(--line-strong); background: color-mix(in oklch, var(--surface) 70%, var(--surface-2)); }
.ow-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--ink-3); }
.ow-card-label { font-size: 0.8125rem; font-weight: 560; color: var(--ink-2); white-space: normal; overflow-wrap: anywhere; }
.ow-card-value { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
.ow-card-sub { font-size: 0.8125rem; color: var(--ink-3); white-space: normal; overflow-wrap: anywhere; }
.ow-card-cta { display: inline-flex; align-items: center; gap: 2px; margin-top: auto; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.ow-wordbig { display: inline-flex; align-items: center; gap: 8px; }
.ow-wordbig::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--tone, var(--c-grey)); }
@media (max-width: 420px) { .ow-card { padding: 10px 12px; } .ow-card-value { font-size: 1.1875rem; } }

/* ------------------------------------------------------------- À vous --- */
.ow-av-list { list-style: none; margin: 0; padding: 0; }
.ow-av { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); transition: opacity 200ms var(--ease); }
.ow-av:first-child { border-top: 0; padding-top: 2px; }
.ow-av-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ow-av-text { margin: 0; font-size: 0.9375rem; line-height: 1.4; overflow-wrap: anywhere; }
.ow-av-age { font-size: 0.75rem; color: var(--ink-3); }
.ow-av-btn { flex: 0 0 auto; }
.ow-av.ghost { opacity: 0.5; }
.ow-av.ghost .ow-av-text { text-decoration: line-through; text-decoration-color: var(--line-strong); }

.ow-todayline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; font-size: 0.875rem; }
.ow-todayline b { color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
.ow-todayline > svg { margin-left: auto; color: var(--ink-3); }
.ow-todayline:hover { background: color-mix(in oklch, var(--surface-2) 80%, var(--line)); }
.ow-colcounts { list-style: none; margin: 10px 0 0; padding: 0; }
.ow-colcounts a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ow-colcounts li:first-child a { border-top: 0; }
.ow-colcounts a:hover { background: var(--surface-2); }
.ow-col-name { flex: 1; min-width: 0; }
.ow-colcounts b { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }

/* --------------------------------------------------------- forecast ---- */
.ow-forecast-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.ow-forecast-figs div { display: flex; flex-direction: column; min-width: 0; }
.ow-forecast-figs span { font-size: 0.75rem; color: var(--ink-3); }
.ow-forecast-figs b { font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ow-forecast-figs small { font-size: 0.75rem; color: var(--ink-3); }

.ow-runs { display: flex; flex-direction: column; gap: 2px; }
.ow-run { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(64px, 1fr) 3.5em; align-items: center; gap: 10px; padding: 7px 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ow-run[disabled] { cursor: default; }
.ow-run-name { font-size: 0.875rem; white-space: normal; overflow-wrap: anywhere; }
.ow-run-track { position: relative; height: 8px; border-radius: 99px; background: var(--surface-2); }
.ow-run-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--tone, var(--c-grey)); }
.ow-run-lead { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); }
.ow-run-days { font-size: 0.8125rem; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.ow-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; font-size: 0.75rem; color: var(--ink-3); }
.ow-lg-tick { display: inline-block; width: 2px; height: 12px; background: var(--ink-2); border-radius: 1px; }

/* ----------------------------------------------------------------- tabs - */
.ow-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-top: -4px; }
.ow-tabs::-webkit-scrollbar { display: none; }
.ow-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-3); font-weight: 600; font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
.ow-tabs a:hover { color: var(--ink); }
.ow-tabs a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--ink); }
.ow-tabn { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 0.75rem; text-align: center; }
.ow-tabn.red { background: var(--bad-bg); color: var(--bad); }
.o-coarse .ow-tabs a { min-height: 48px; }

/* ------------------------------------------------------------ pipeline - */
.ow-pl-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ow-pl-item + .ow-pl-item { border-top: 1px solid var(--line); }
.ow-pl-row { display: grid; grid-template-columns: 2.6ch minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ow-pl-row:disabled { cursor: default; opacity: 0.6; }
.ow-pl-row:not(:disabled):hover { background: var(--surface-2); }
.ow-pl-row > svg { color: var(--ink-3); }
.ow-pl-n { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ow-pl-item.red .ow-pl-n, .ow-pl-step.red .ow-pl-n { color: var(--bad); }
.ow-pl-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.ow-pl-meta { font-size: 0.8125rem; color: var(--ink-3); white-space: nowrap; }
.ow-pl-item .ow-rows { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.ow-pl-flow { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.ow-pl-step { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ow-pl-step:hover { border-color: var(--line-strong); }
.ow-pl-step[aria-selected='true'] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ow-pl-step .ow-pl-n { text-align: left; font-size: 1.5rem; }
.ow-pl-step .ow-pl-name { font-size: 0.8125rem; }
.ow-pl-step .ow-pl-meta { white-space: normal; font-size: 0.75rem; }

.ow-rows { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; min-width: 0; }
.ow-pl-flow + .ow-rows, .ow-pl-flow + .ow-empty { margin-top: 2px; }
.ow-orow { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ow-rows > .ow-orow:first-child, .ow-rows > :first-child .ow-orow, .ow-rows > .o-live-pill-wrap + .ow-orow { border-top: 0; }
.ow-orow:hover { background: var(--surface-2); }
.ow-orow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ow-orow-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ow-orow-name { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-weight: 560; }
.ow-orow-l1 .o-word { flex: 0 0 auto; }
.ow-orow-l2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.8125rem; color: var(--ink-3); }
.ow-orow.ghost { opacity: 0.45; pointer-events: none; }
.ow-orow.red .ow-orow-l2 { color: var(--bad); }
.ow-flag { padding: 0 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.ow-age { font-size: 0.8125rem; color: var(--ink-3); white-space: nowrap; }

/* ------------------------------------------------------------ Chez Livo - */
.ow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ow-toolbar p { margin: 0; font-size: 0.875rem; }
.ow-group h3 { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 8px; font-size: 0.875rem; font-weight: 650; color: var(--ink-2); }
.ow-selrow { display: flex; align-items: center; min-width: 0; border-top: 1px solid var(--line); }
.ow-rows > .ow-selrow:first-child { border-top: 0; }
.ow-selrow .ow-orow { border-top: 0; padding-left: 4px; }
.ow-selrow.on { background: color-mix(in oklch, var(--info-bg) 60%, var(--surface)); }
.ow-check { display: inline-flex; align-items: center; justify-content: center; align-self: stretch; padding: 0 4px 0 14px; cursor: pointer; }
.ow-check input { width: 22px; height: 22px; accent-color: var(--ink); }
.ow-dots { flex: 0 0 auto; margin-right: 6px; }
.ow-bulkbar { position: fixed; z-index: var(--z-toast); left: 12px; right: 12px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 10px); display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); animation: toast-in 200ms var(--ease); }
.ow-bulkbar > span { flex: 1; font-weight: 600; font-size: 0.9rem; }
@media (min-width: 900px) { .ow-bulkbar { left: auto; right: 24px; bottom: 24px; width: 480px; } }
.ow-livo { display: flex; flex-direction: column; gap: 12px; padding-bottom: 72px; }

/* --------------------------------------------------------------- sheets - */
.ow-lead { margin: 0 0 10px; color: var(--ink-2); }
.ow-effects { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.ow-effects li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
:is(.ow-page, .o-sheet) .ow-effects li > span { color: var(--ink); }
.ow-effects li > svg { flex: 0 0 auto; margin-top: 1px; color: var(--tone, var(--ink-3)); }
.ow-runrows { margin-top: 12px; }
.ow-runrows h3 { font-size: 0.875rem; margin: 12px 0 4px; }
.ow-run-list { list-style: none; margin: 0; padding: 0; }
.ow-run-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.875rem; }
.ow-run-list li > span:last-child { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-align: right; }
.ow-when { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }

.ow-choice { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ow-choice button { min-height: 40px; padding: 7px 14px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-weight: 560; font-size: 0.875rem; cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.ow-choice button:first-child { border-left: 0; }
.ow-choice button:hover { background: var(--surface-2); }
.ow-choice button[aria-checked='true'] { background: var(--ink); color: var(--bg); }
.ow-choice button.tone-red[aria-checked='true'] { background: var(--bad); color: #fff; }
.ow-choice.sm button { min-height: 36px; padding: 5px 11px; font-size: 0.8125rem; }
.o-coarse .ow-choice button { min-height: 48px; }

.ow-form { display: flex; flex-direction: column; gap: 14px; }
.ow-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ow-field-label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.ow-help { font-size: 0.8125rem; color: var(--ink-3); }
.ow-error { font-size: 0.8125rem; color: var(--bad); }
.ow-money-in { display: flex; align-items: center; gap: 8px; }
.ow-money-in input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.ow-money-in span { color: var(--ink-3); font-weight: 600; font-size: 0.875rem; }
.ow-textarea { width: 100%; font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace; font-size: 0.8125rem; resize: vertical; }
.ow-effect-box { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 0.9rem; }
.ow-effect-box p { margin: 0; }
.ow-effect-total { display: flex; justify-content: space-between; font-size: 1rem; }
.ow-effect-total b { font-variant-numeric: tabular-nums; }

.ow-polines { display: flex; flex-direction: column; }
.ow-poline { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: end; gap: 8px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ow-poline:first-child { border-top: 0; }
.ow-poline-name { grid-column: 1 / -1; display: flex; flex-direction: column; min-width: 0; }
.ow-poline-cost { font-weight: 650; font-variant-numeric: tabular-nums; padding-bottom: 8px; white-space: nowrap; }
.ow-mini { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 0.75rem; color: var(--ink-3); }
.ow-mini input { width: 100%; }

.ow-ticks { display: flex; flex-direction: column; }
.ow-tick { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 0.875rem; }
.ow-tick input { width: 22px; height: 22px; accent-color: var(--ink); flex: 0 0 auto; }
.ow-tick span { flex: 1; min-width: 0; }

.ow-paste-in { display: flex; flex-direction: column; gap: 10px; }
.ow-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
:is(.ow-page, .o-sheet) .ow-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 0.8125rem; font-weight: 600; }
.ow-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--c-grey)); }
.ow-pgroup { margin-top: 12px; }
.ow-pgroup h3 { display: flex; gap: 8px; align-items: baseline; margin: 0; font-size: 0.9375rem; font-weight: 650; }
.ow-pgroup > p { margin: 2px 0 6px; }
.ow-plist { list-style: none; margin: 0; padding: 0; }
.ow-plist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.ow-plist .ow-check { padding: 0 2px; align-self: center; }
.ow-pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 0.875rem; }
.ow-pmain select { margin-top: 4px; max-width: 320px; }

/* ------------------------------------------------------------- returns -- */
.ow-searchbox { display: flex; align-items: center; gap: 8px; padding: 0 0 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.ow-searchbox > svg { color: var(--ink-3); flex: 0 0 auto; }
.ow-searchbox input { flex: 1; min-width: 0; border: 0; background: none; box-shadow: none; }
.ow-searchbox input:focus { outline: none; }
.ow-searchbox:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in oklch, var(--focus) 22%, transparent); }
.ow-searchbox.big input { min-height: 52px; font-size: 1.0625rem; }
.ow-search { display: flex; flex-direction: column; gap: 12px; }
.ow-retrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ow-rows > .ow-retrow:first-child, .ow-rows > .ow-oldrow:first-child .ow-retrow { border-top: 0; }
.ow-retrow:hover, .ow-retrow.on { background: var(--surface-2); }
.ow-retrow > svg { color: var(--ink-3); flex: 0 0 auto; }
.ow-retrow.red .ow-age { color: var(--bad); font-weight: 600; }
.ow-oldrow + .ow-oldrow { border-top: 1px solid var(--line); }
.ow-oldrow-btns { display: flex; gap: 8px; padding: 0 14px 12px; }
.ow-split { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.ow-split-l { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ow-split-r { position: sticky; top: 76px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.ow-panel-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 10px; color: var(--ink-3); text-align: center; }
.ow-receive { display: flex; flex-direction: column; gap: 8px; }
.ow-receive h2 { font-size: 1.125rem; margin: 0 0 4px; }
.ow-units { list-style: none; margin: 0; padding: 0; }
.ow-units li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.ow-unit-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ow-rcode { align-self: flex-start; margin-top: 2px; padding: 2px 8px; border-radius: 6px; background: var(--warn-bg); color: var(--ink); font-size: 0.8125rem; font-weight: 650; }

/* -------------------------------------------------------------- detail -- */
.ow-back { display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; color: var(--ink-2); font-size: 0.875rem; font-weight: 560; text-decoration: none; margin-left: -4px; }
.ow-back:hover { color: var(--ink); }
.ow-dhead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ow-dhead-main { min-width: 0; flex: 1 1 260px; }
.ow-dhead h1 { font-size: 1.375rem; font-weight: 680; margin: 0; line-height: 1.25; overflow-wrap: anywhere; }
.ow-dhead p { margin: 2px 0 8px; }
.ow-dhead-word { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ow-dhead-act { display: flex; gap: 8px; align-items: center; }
.ow-bottles > li { align-items: flex-start; }
.ow-bottles > li > span { white-space: nowrap; }
.ow-tl { list-style: none; margin: 0; padding: 0; }
.ow-tl li { display: grid; grid-template-columns: 16px 6.5em minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 0.875rem; }
.ow-tl li:first-child { border-top: 0; }
.ow-tl li > svg { color: var(--ink-3); align-self: center; }
.ow-tl-at { font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ow-tl-text { overflow-wrap: anywhere; }
.ow-tl .ow-tl-more { display: block; border-top: 0; }
.ow-fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ow-fold-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; width: 100%; min-height: 52px; padding: 8px 14px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: var(--radius); }
.ow-fold-head:hover { background: var(--surface-2); }
.ow-fold-title { font-weight: 600; }
.ow-fold-sub { flex: 1 1 9rem; min-width: 0; font-size: 0.8125rem; color: var(--ink-3); white-space: normal; overflow-wrap: anywhere; }
.ow-fold-head > svg { color: var(--ink-3); flex: 0 0 auto; margin-left: auto; }
.ow-fold-body { padding: 0 14px 14px; }

/* --------------------------------------------------------------- stock -- */
.ow-supplier { padding: 12px 0; border-top: 1px solid var(--line); }
.ow-supplier:first-of-type { border-top: 0; padding-top: 0; }
.ow-supplier-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ow-supplier-head > div { display: flex; flex-direction: column; min-width: 0; }
.ow-buylines > li { padding: 6px 0; font-size: 0.875rem; }
.ow-buylines > li > span:last-child { white-space: nowrap; }
.ow-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ow-table th { padding: 6px 8px; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ow-table td { padding: 7px 8px; border-top: 1px solid var(--line); }
.ow-table tr:first-child td { border-top: 0; }
.ow-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.ow-enroute > li > div { display: flex; flex-direction: column; min-width: 0; }
.ow-problems > li { justify-content: flex-start; font-size: 0.9rem; }
.ow-shelf > li > span:last-child { white-space: nowrap; }
.ow-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.ow-tile { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 32px; border-radius: 8px; font-size: 0.75rem; font-weight: 650; font-variant-numeric: tabular-nums; background: color-mix(in oklch, var(--tone, var(--c-grey)) 22%, var(--surface)); color: var(--ink); }
.ow-recipe > li { font-size: 0.875rem; padding: 6px 0; }
.ow-openlines { list-style: none; margin: 0; padding: 0; }
.ow-openlines li { display: grid; grid-template-columns: minmax(0, 1fr) 104px 2.4em; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--line); }
.ow-openlines li.unknown { background: color-mix(in oklch, var(--warn-bg) 70%, var(--surface)); border-radius: 8px; }
.ow-open-name { display: flex; flex-direction: column; min-width: 0; font-size: 0.875rem; }
.ow-open-name > span { font-weight: 400; }
.ow-openlines input { width: 100%; font-variant-numeric: tabular-nums; }
.ow-unit { text-align: left; }
.ow-invrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ow-cta { margin-top: 4px; }
.ow-opening { display: flex; flex-direction: column; gap: 14px; }

/* --------------------------------------------------------------- money -- */
.ow-flows { list-style: none; margin: 0; padding: 0; }
.ow-flows li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.ow-flows li:first-child { border-top: 0; padding-top: 2px; }
.ow-flow-name { flex: 1; min-width: 0; }
.ow-flows b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ow-flow-total { font-weight: 700; border-top: 1px solid var(--line-strong) !important; }
.ow-twoways { margin: -4px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.ow-apports { display: grid; gap: 10px; }
@media (min-width: 600px) { .ow-apports { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ow-apport { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.ow-apport-who { font-weight: 650; }
.ow-apport-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.9rem; }
.ow-apport-row b { font-variant-numeric: tabular-nums; }
.ow-apport-total { padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--line-strong); font-weight: 650; }
.ow-months { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.ow-months div { display: flex; flex-direction: column; }
.ow-months span { font-size: 0.75rem; color: var(--ink-3); }
.ow-months b { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- settings - */
.ow-team { list-style: none; margin: 0; padding: 0; }
.ow-team > li { padding: 12px 0; border-top: 1px solid var(--line); }
.ow-team > li:first-child { border-top: 0; padding-top: 2px; }
.ow-team-head { display: flex; align-items: center; gap: 10px; }
.ow-team-head .o-avatar { flex: 0 0 auto; }
.ow-team-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ow-devices { list-style: none; margin: 8px 0 0; padding: 0 0 0 42px; display: flex; flex-direction: column; gap: 6px; }
.ow-devices li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ow-dev-label { flex: 1; min-width: 0; font-size: 0.875rem; white-space: normal; overflow-wrap: anywhere; }
.ow-setlist { display: flex; flex-direction: column; margin-bottom: 12px; }
.ow-setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ow-setrow:first-child { border-top: 0; }
.ow-setrow-name { display: flex; flex-direction: column; min-width: 0; font-weight: 560; }
.ow-setrow-in { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.ow-setrow-in input { width: 96px; font-variant-numeric: tabular-nums; }
.ow-maptable input, .ow-maptable select { width: 100%; }
.ow-maptable td:last-child { width: 44px; }
.ow-runbook { margin: 0; padding-left: 20px; font-size: 0.9rem; }
.ow-runbook li { margin: 6px 0; }
.ow-journal > li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; gap: 10px; font-size: 0.875rem; }
.ow-j-main { white-space: normal; overflow-wrap: anywhere; }
.ow-settings { max-width: 860px; }
.ow-posts { max-width: 560px; }

/* ------------------------------------------------------------- saisir --- */
.ow-saisir-side { margin: 0 6px 12px; justify-content: flex-start; }
.o-side .ow-saisir-side { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.o-side .ow-saisir-side:hover { background: color-mix(in oklch, var(--lime) 85%, white); }
.ow-saisir-top { gap: 4px; padding: 6px 10px; }
@media (min-width: 900px) { .ow-saisir-top { display: none; } }
@media (max-width: 899px) { .ow-saisir-side { display: none; } }
@media (max-width: 459px) { .ow-saisir-top span { display: none; } }
/* Mon compte: the two-step key and the recovery codes, readable and copyable */
.ow-code-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; word-break: break-all; user-select: all; }
.ow-code-big { font-size: 1rem; letter-spacing: 0.04em; }
.ow-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 16px; margin: 0; padding-left: 1.4em; }
.ow-account-form, .ow-totp, .ow-recovery { margin-top: 14px; }
/* Réglages → Fournisseurs: the pay controls drop under a long name on a phone */
.ow-sup > li { flex-wrap: wrap; }
.ow-sup > li b { white-space: normal; }
.ow-sup .ow-setrow-in { margin-left: auto; }
.ow-sup .ow-setrow-in input { width: 64px; }

/* Bilan (screens/simple.js, docs/SIMPLE-ERP-PLAN.md): one page, five tabs, plain lines. */
.sp { display: flex; flex-direction: column; gap: 14px; }
.sp-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tabs a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
.sp-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sp-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sp-lines li:last-child { border-bottom: 0; }
.sp-lines li > span { min-width: 0; }
.sp-lines li > b { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.sp-sub { display: block; margin-top: 2px; }
.sp-result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; }
.sp-result .sp-total { border-top: 2px solid var(--ink); border-bottom: 0; font-size: 1.0625rem; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.8125rem; font-weight: 560; cursor: pointer; }
.sp-chip span { color: var(--ink-2); margin-left: 4px; font-variant-numeric: tabular-nums; }
.sp-chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sp-chip.on span { color: var(--surface); opacity: 0.8; }
.sp-orders li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sp-o-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.sp-o-total { margin-left: auto; font-variant-numeric: tabular-nums; }
.sp-o-state { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.875rem; }
.sp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-grey); }
.sp-dot.tone-green { background: var(--ok); } .sp-dot.tone-amber { background: var(--warn); } .sp-dot.tone-red { background: var(--bad); } .sp-dot.tone-blue { background: var(--info); }
.sp-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.sp-table th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 6px 4px; border-bottom: 1px solid var(--line-strong); }
.sp-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.sp-table tr.off td { color: var(--ink-2); }
.sp-hist li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sp-hist li.sp-day { justify-content: flex-start; background: var(--surface-2, transparent); padding-top: 14px; border-bottom: 1px solid var(--line-strong); }
.sp-hist li > b { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.sp-old { text-align: center; font-size: 0.8125rem; }
.sp-old a { color: var(--ink-2); }
.sp .ow-choice { display: flex; flex-wrap: nowrap; }
.sp .ow-choice button { flex: 1 1 0; padding: 7px 6px; white-space: nowrap; font-size: 0.8125rem; }

/* Bilan · Jour par jour (screens/fil.js) */
.fil { display: flex; flex-direction: column; gap: 10px; }
.fil-day { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 30px; }
.fil-day > b { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.fil-tag { padding: 2px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.75rem; font-weight: 600; color: var(--ink-2); }
.fil-tag.fc { background: var(--info-bg); border-color: transparent; color: var(--ink); }
.fil-back { margin-left: auto; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; }
.fil-strip { position: relative; height: 22px; }
.fil-strip span { position: absolute; top: 0; height: 22px; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; border-radius: 6px; background: var(--line); color: var(--ink-2); font-size: 0.6875rem; font-weight: 700; box-shadow: inset 0 0 0 1px var(--surface); }
.fil-strip span.on { background: var(--ink); color: var(--surface); }
.fil-strip span.fc { background: var(--info-bg); color: var(--ink); }
.fil-strip span.fc.on { background: var(--c-blue); color: #fff; }
.fil-charts { position: relative; display: flex; flex-direction: column; gap: 10px; touch-action: pan-y; user-select: none; -webkit-user-select: none; padding-bottom: 20px; }
.fil-panel header { display: flex; align-items: baseline; gap: 8px; }
.fil-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.875rem; }
.fil-name i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fil-panel header b { margin-left: auto; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.fil-delta { min-width: 64px; text-align: right; font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fil-sub { margin: 1px 0 4px; font-size: 0.75rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.fil-dash { width: 14px; height: 0; border-top: 2px dashed var(--c-amber); display: inline-block; }
.fil-panel svg { display: block; overflow: visible; }
.fil-band { fill: transparent; }
.fil-band.odd { fill: var(--line); opacity: 0.45; }
.fil-band.fc { fill: var(--info-bg); opacity: 1; }
.fil-grid line { stroke: var(--line); stroke-width: 1; }
.fil-grid text { fill: var(--ink-3, var(--ink-2)); font-size: 10px; text-anchor: end; font-variant-numeric: tabular-nums; }
.fil-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fil-line.fc { stroke-dasharray: 4 4; }
.fil-ghost { fill: none; stroke: var(--c-amber); stroke-width: 1.5; stroke-dasharray: 3 3; }
.fil-area.up { fill: var(--c-green); opacity: 0.22; }
.fil-area.down { fill: var(--c-red); opacity: 0.22; }
.fil-zero { stroke: var(--ink-2); stroke-width: 1; }
.fil-today { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.fil-cross { stroke: var(--ink); stroke-width: 1; opacity: 0.55; }
.fil-dot { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.fil-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 16px; }
.fil-axis span { position: absolute; transform: translateX(-50%); font-size: 0.6875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fil-axis span.now { color: var(--ink); font-weight: 700; }
.fil-legend { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.75rem; color: var(--ink-2); }
.fil-legend b { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; border-radius: 4px; background: var(--line); color: var(--ink-2); font-size: 0.6875rem; }
.fil-legend li.on { color: var(--ink); }
.fil-legend li.on b { background: var(--ink); color: var(--surface); }
.fil-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; }
.fil-detail h3 { margin: 4px 0 2px; font-size: 0.875rem; }
.fil-eq { margin: 8px 0 2px; color: var(--ink-2); line-height: 1.45; }
.fil-notes { display: flex; flex-direction: column; gap: 6px; }
