/* Orvia Experience System — application components (3.73.0).
 *
 * Built from tokens.css and the primitives in primitives.css, nothing else. The drift check
 * holds this file to ZERO raw colours, type sizes, radii, spacing and shadows: if a value is
 * missing, it is added to tokens.css with a reason, not written here.
 *
 * Screens do not use these yet. Phase 1 applies the workspace/record architecture and Phase 2
 * migrates Product and Inventory onto it; a screen half on the old system and half on this one
 * is the interim state the migration rule forbids.
 *
 * Layout uses logical properties throughout (inline-start/end, block-start/end), so RTL is a
 * direction, not a second stylesheet.
 */

/* ------------------------------------------------------------------ page */
.o-page { padding: var(--sp-6); max-width: 100%; }
.o-page--record { max-width: var(--width-record); }
.o-page--form { max-width: var(--width-form-wide); }
@media (max-width: 720px) { .o-page { padding: var(--sp-4); } }

/* Reset explicitly: the admin's stylesheet paints every bare `nav` as a dark bar, and a
   breadcrumb is a <nav> for good reason (3.76.0, first real screen). */
.o-crumbs { background: none; border: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-bottom: var(--sp-2);
  font: var(--type-small); color: var(--text-muted); }
.o-crumbs a { color: var(--text-muted); text-decoration: none; }
.o-crumbs a:is(:hover, :focus-visible) { color: var(--text); text-decoration: underline; }
.o-crumbs [aria-current="page"] { color: var(--text-secondary); }
.o-crumbs__group { cursor: pointer; }   /* 11.82.2: a heading of the trail opens the menu there */
/* 11.82.2 (R82-UX-013): ‹ Up — the trail's parent; on a list it shows on a phone only */
.o-up { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 28px; margin-bottom: var(--sp-1); padding-inline-end: var(--sp-2);
  font: var(--type-small); font-weight: 600; color: var(--text-secondary); text-decoration: none; max-inline-size: 100%; }
.o-up:is(:hover, :focus-visible) { color: var(--text); text-decoration: underline; }
.o-up__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-up--phone { display: none; }
@media (max-width: 720px) { .o-up--phone { display: inline-flex; } .o-up { min-height: 44px; } }

/* ------------------------------------------------------------------ workspace header */
.o-wshead { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.o-wshead__top { display: flex; align-items: flex-start; gap: var(--sp-4); }
/* 10.66.0: the actions never take more than three-fifths of the row, and wrap inside it, so the title keeps the rest.
   This rule used to sit BELOW the phone block and say `flex: none` — which won over the phone's `flex: 1 1 auto` by
   coming later, so on a phone the actions refused to wrap and pushed the page wider than the screen. */
.o-wshead__primary { flex: 0 1 auto; max-inline-size: 60%; justify-content: flex-end; }
/* 4.55: on a phone the actions took the row and squeezed the title to a column of single words —
   the screenshot showed "Manage / and / sell / the / products" beside a clipped "Pro". The
   actions wrap under the title instead: a heading that cannot be read is not a heading. */
@media (max-width: 700px) {
  .o-wshead__top { flex-wrap: wrap; }
  .o-wshead__titles { flex: 1 0 100%; }
  .o-wshead__primary { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: var(--sp-2); max-inline-size: none; justify-content: flex-start; }
  .o-wshead__primary .o-btn { flex: 1 1 auto; }
}
.o-wshead__titles { flex: 1; min-width: 0; }
.o-wshead__title { font: var(--type-page); margin: 0; letter-spacing: -.01em; overflow-wrap: anywhere; }
.o-wshead__desc { font: var(--type-small); color: var(--text-muted); margin: var(--sp-1) 0 0; }
/* Whose data this is, where the header would otherwise imply the selected company. */
.o-wshead__scope { display: inline-flex; align-items: center; gap: var(--sp-1);
  font: var(--type-label); color: var(--text-muted); margin: var(--sp-2) 0 0; }

/* ------------------------------------------------------------------ filter bar */
.o-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.o-filterbar__search { position: relative; flex: 1 1 calc(var(--sidebar-expanded) * 1.2); min-width: 0; }
.o-filterbar__search .o-icon { position: absolute; inset-inline-start: var(--sp-3); inset-block-start: 50%;
  transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.o-filterbar__search .o-input { padding-inline-start: calc(var(--sp-3) + var(--icon-md) + var(--sp-2)); }
.o-filterbar__spacer { flex: 1; }
@media (max-width: 720px) {
  .o-filterbar__search { flex-basis: 100%; }
  .o-filterbar__io { width: var(--control-md); padding: 0; }
  .o-filterbar__io .o-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.o-filterbar__count { display: inline-flex; align-items: center; justify-content: center; min-width: var(--icon-md);
  height: var(--icon-md); padding: 0 var(--sp-1); border-radius: var(--radius-pill);
  background: var(--accent-subtle); color: var(--brand-strong); font: var(--type-caption); font-weight: var(--fw-semibold); }
.o-quickviews { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.o-quickviews .o-tabs { border-bottom: 0; }
.o-quickviews::-webkit-scrollbar { display: none; }
.o-activefilters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.o-activefilters .o-chip { cursor: default; }
.o-activefilters .o-chip button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; display: inline-flex; }

/* ------------------------------------------------------------------ data grid */
.o-grid { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.o-grid__scroll { overflow-x: auto; }
.o-grid table { width: 100%; border-collapse: collapse; font: var(--type-body); }
.o-grid thead th { position: sticky; inset-block-start: 0; z-index: var(--z-sticky); height: var(--row-compact);
  padding: 0 var(--sp-3); background: var(--surface-subtle); border-bottom: 1px solid var(--border);
  font: var(--type-label); color: var(--text-muted); text-align: start; white-space: nowrap; }
.o-grid thead th[data-sortable="true"] { cursor: pointer; user-select: none; }
.o-grid thead th[data-sortable="true"]:is(:hover, :focus-visible) { color: var(--text); outline: none; }
.o-grid thead th .o-icon { vertical-align: middle; margin-inline-start: var(--sp-1); }
.o-grid tbody td { height: var(--row-normal); padding: 0 var(--sp-3); border-bottom: 1px solid var(--border); color: var(--text); }
/* ONE LINE PER CELL, AT EVERY WIDTH (8.25). With the extra columns switched on, a tablet squeezed
   every text column and "QA Automation Trading Company" wrapped into four lines: one row four times
   the height of the next. A value stays on one line, a long one ends in "…" at a readable width,
   and the table scrolls sideways when the columns do not fit. A cell holding a control is left
   alone — an input or a menu must not be clipped. */
.o-grid tbody td { white-space: nowrap; }
.o-grid tbody td:not(:has(input, select, textarea, .o-btn, .o-badge, .o-status)) { max-width: 36ch; overflow: hidden; text-overflow: ellipsis; }
.o-grid tbody td.o-grid__lead { max-width: 42ch; }
.o-grid tbody td .o-grid__primary, .o-grid tbody td .o-grid__sub { overflow: hidden; text-overflow: ellipsis; }
.o-grid--compact tbody td { height: var(--row-compact); }
/* Touch (7.18): a tablet is used standing up, often one-handed, and a 40px row is a row somebody
   mis-taps. The chooser offers it everywhere, and a tablet gets it without being asked. */
.o-grid--touch tbody td { height: var(--row-touch); }
.o-grid tbody tr:last-child td { border-bottom: 0; }
.o-grid tbody tr[data-clickable="true"] { cursor: pointer; }
.o-grid tbody tr[data-clickable="true"]:is(:hover, :focus-visible) td { background: var(--surface-subtle); }
.o-grid tbody tr:focus-visible { outline: none; box-shadow: var(--focus-ring-inset); }
.o-grid tbody tr[aria-selected="true"] td { background: var(--accent-subtle); }
.o-grid .o-grid__num { text-align: right; font-variant-numeric: var(--num-figures); white-space: nowrap; }
/* RIGHT, NOT END (7.97.9). Found in the first RTL pass through a real browser: `end` is the LEFT
   in Arabic, so a column of prices lined up on their first digit and 18 sat under the 1 of 128.5.
   Place values only line up on the right, in both languages — the contract app.css has kept since
   the RTL work (`.num { text-align: right; direction: ltr }`) and this grid never followed. */
.o-grid__primary { unicode-bidi: plaintext; }
.o-grid__sub { unicode-bidi: plaintext; }
[dir="rtl"] .o-grid__sub { text-align: right; }
[dir="ltr"] .o-grid__sub { text-align: left; }
/* A name is DATA, in whichever language somebody typed it. In an Arabic screen an English name
   ending in a full stop drew as ".Almond Danish". plaintext takes the direction from the text
   itself. On the sub-line, which is a block, plaintext also moves the ALIGNMENT to follow the
   text — "CR-001" went to the left of an Arabic cell. `match-parent` was meant to prevent that and
   does not in Chromium, so the side is pinned to the page's direction instead; seen in the
   before/after screenshot, now asserted in scripts/browser/rtl.test.mjs (7.97.9). */
.o-grid .o-grid__sel, .o-grid .o-grid__act { width: var(--control-md); padding: 0; text-align: center; }
/* 11.43.0 (DW4, measured): the tick box's label fills its cell, so what can be pressed is the cell (WCAG 2.2 target
   size, 24 px) and not the 16 px box — the audit found it on every list with selection, on a phone. */
.o-grid .o-grid__sel .o-check { display: inline-flex; align-items: center; justify-content: center; min-inline-size: var(--control-sm); min-block-size: var(--control-sm); cursor: pointer; }
/* The row's ··· is quiet until the row is looked at; five bordered buttons down a column is noise. */
.o-grid__act .o-btn { border-color: transparent; background: none; color: var(--text-muted); }
.o-grid__act .o-btn:is(:hover, :focus-visible) { color: var(--text); background: var(--surface); }
.o-grid__primary { font-weight: var(--fw-medium); }
.o-grid__sub { display: block; font: var(--type-caption); color: var(--text-muted); }
.o-grid__foot { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--border); font: var(--type-small); color: var(--text-muted); }
.o-grid__foot:empty { display: none; }

/* ------------------------------------------------------------------ arranging a grid (6.58)
 * A frozen column, a draggable edge, and a row height. Everything here is a token: the grid is
 * the densest surface in the product and the one most likely to be looked at all day.
 */
/* Pinned columns are sticky against the horizontal scroller. They need their own background,
   because a transparent cell over scrolling content is unreadable the moment it overlaps — and
   the header's is deliberately the header's, so the frozen corner still reads as a header. */
.o-grid__pinned { position: sticky; z-index: var(--z-sticky); background: var(--surface); }
.o-grid thead th.o-grid__pinned { z-index: calc(var(--z-sticky) + 1); background: var(--surface-subtle); }
/* The last frozen column carries the seam. A border would move the cells; an inset shadow marks
   where the scrolling starts without changing a single width. */
.o-grid__pinned--edge { box-shadow: var(--seam-pin); }
.o-grid tbody tr[data-clickable="true"]:is(:hover, :focus-visible) td.o-grid__pinned { background: var(--surface-subtle); }
.o-grid tbody tr[aria-selected="true"] td.o-grid__pinned { background: var(--accent-subtle); }

/* The draggable edge. Wider than it looks: the visible line is 1px and the target is the
   padding around it, because a three-pixel target is a mouse-only target and unusable on glass. */
/* 11.72.0 (A11Y-08, WCAG 2.5.8): a 24 px target */
.o-grid__resize { position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: var(--sp-6);
  cursor: col-resize; touch-action: none; }
.o-grid__resize::after { content: ""; position: absolute; inset-block: 25%; inset-inline-end: calc(var(--sp-6) / 2);
  inline-size: 1px; background: var(--border); }
.o-grid__resize:is(:hover, :focus-visible, .is-dragging)::after { inset-block: 0; inline-size: 2px; background: var(--brand); }
.o-grid__resize:focus-visible { outline: none; }
.o-grid thead th { position: sticky; }   /* already sticky vertically; named again so the handle can anchor to it */

/* The arrangement drawer's list. */
.o-collist { list-style: none; margin: 0; padding: 0; }
.o-collist__item { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) 0;
  border-bottom: 1px solid var(--border); }
.o-collist__item:last-child { border-bottom: 0; }
.o-collist__item .o-check { flex: 1; min-width: 0; }
.o-collist__item[data-pinned="true"] { background: var(--accent-subtle); border-radius: var(--radius-sm); padding-inline: var(--sp-2); }
.o-collist__acts { display: flex; gap: var(--sp-1); }
.o-collist__acts .o-btn { border-color: transparent; background: none; color: var(--text-muted); }
.o-collist__acts .o-btn[aria-pressed="true"] { color: var(--brand-strong); }
.o-collist__hint { margin: 0; font: var(--type-caption); color: var(--text-muted); }

/* Row height, as two options rather than a slider: there are two answers and a slider implies
   there is a spectrum somebody should tune. */
.o-density { display: inline-flex; padding: var(--sp-1); gap: var(--sp-1);
  background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-md); }
.o-density__opt { border: 0; background: none; padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-sm);
  font: var(--type-label); color: var(--text-muted); cursor: pointer; }
.o-density__opt[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--elev-1); }
.o-density__opt:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ------------------------------------------------------------------ object editor (6.60)
 * One component, three representations. The JS decides only phone-or-not; the rail becoming a
 * sticky tab strip on a tablet is CSS, so there is no second breakpoint to keep in step.
 */
.o-editpanel .o-drawer__body { padding: 0; }
.o-oe { display: grid; grid-template-columns: var(--oe-rail-w) 1fr; min-block-size: 100%; }
.o-oe__rail { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3);
  border-inline-end: 1px solid var(--border); background: var(--surface-subtle); }
.o-oe__railitem { display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 0; background: none; text-align: start; cursor: pointer;
  padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md);
  font: var(--type-body); color: var(--text-muted); }
.o-oe__railitem:hover { color: var(--text); background: var(--surface); }
.o-oe__railitem[aria-selected="true"] { background: var(--surface); color: var(--text); font: var(--type-body-strong); }
.o-oe__railitem:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* Said on the section itself, because "why did that save when I pressed nothing" is the question
   an independently-saving section provokes exactly once per person. */
.o-oe__own { font: var(--type-caption); color: var(--text-muted); }
.o-oe__pane { padding: var(--sp-4); overflow-y: auto; }
.o-oe__help { margin: 0; font: var(--type-caption); color: var(--text-muted); }
.o-oe__check { display: flex; flex-direction: column; gap: var(--sp-1); }
.o-oe__color { display: flex; align-items: center; gap: var(--sp-2); }
/* A section that saves itself carries its own footer, inside the pane rather than in the panel's
   one — the panel's bar belongs to the shared draft, and two Save buttons meaning different
   things in the same place is the confusion this whole split exists to avoid. */
/* A sticky surface must say what it sits above, or the browser decides — and on a phone, where
   the section body scrolls under it, what it decided was that the ingredient rows won (6.89).
   Its own background too: sticky over transparent shows the content sliding beneath the buttons. */
.o-oe__ownfoot { position: sticky; inset-block-end: var(--kb); z-index: var(--z-sticky);
  background: var(--surface); border-top: 1px solid var(--border);
  padding-block: var(--sp-2);
  margin: var(--sp-3) calc(var(--sp-4) * -1) calc(var(--sp-4) * -1); }
.o-avail { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.o-avail__days { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.o-avail__time { display: flex; align-items: center; gap: var(--sp-2); }
.o-avail__time .o-input { inline-size: auto; }
.o-oe__swatch { inline-size: var(--control-md); block-size: var(--control-sm);
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.o-oe__color .o-btn[aria-pressed="true"] { color: var(--text); font: var(--type-body-strong); }
/* The count sits at the START of the bar and the actions at the end, so the sentence and the
   buttons do not compete for the same corner. */
/* `min-width: 0` because a flex item will not shrink below its content by default, so the count
   held its full width and pushed the buttons off the end of a narrow screen rather than
   letting them stay put (7.01). It is the label that should give way, not Save. */
.o-oe__count { flex: 1 1 auto; min-width: 0; font: var(--type-small); color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-editpanel .o-drawer__foot { justify-content: flex-start; align-items: center;
  flex-wrap: wrap; row-gap: var(--sp-2);
  /* Clear of the home indicator, and of nothing else: the keyboard sits above this, not over it,
     once the panel is sized in dvh. */
  /* The home indicator AND the keyboard. `--kb` is 0 when there is no keyboard, so this is the
     same rule it was (7.02). */
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px) + var(--kb)); }
.o-editpanel .o-drawer__foot .o-btn { flex: 0 0 auto; }

/* Tablet: the rail becomes a strip above the body, sticky so it survives a long section. */
@media (max-width: 1024px) {
  .o-oe { grid-template-columns: 1fr; }
  .o-oe__rail { flex-direction: row; gap: var(--sp-2); overflow-x: auto; position: sticky;
    inset-block-start: 0; z-index: var(--z-sticky);
    border-inline-end: 0; border-block-end: 1px solid var(--border); }
  .o-oe__railitem { flex: 0 0 auto; white-space: nowrap; }
  .o-oe__own { display: none; }
}

/* Phone: a full-screen editor that rises rather than a narrow panel sliding in from the side —
   there is nothing beside it to slide over. */
/* 100vw IS WIDER THAN THE SCREEN WHEN A SCROLLBAR EXISTS, and on iOS it is wider than the
   visual viewport while the keyboard is up — which is how the Save button ended up off the right
   edge of a phone with the keyboard open (7.01). `100%` of an inset-anchored element is the
   viewport, without that trap.
   `dvh` rather than `vh` for the same family of reason: `vh` is the LARGEST viewport, so a panel
   sized in it hides its own footer behind the keyboard and the address bar. */
.o-editpanel--full { inline-size: 100%; inset-inline: 0; max-inline-size: 100%;
  block-size: 100dvh; max-block-size: 100dvh;
  transform: translateY(100%); }
[dir="rtl"] .o-editpanel--full { transform: translateY(100%); }
.o-editpanel--full[data-open="true"] { transform: none; }

/* The saved-view control names the view it is showing, and truncates rather than pushing the
   search box off a narrow screen. */
.o-filterbar__views { max-inline-size: 14rem; }
.o-filterbar__viewname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-filterbar__dot { inline-size: var(--sp-2); block-size: var(--sp-2); border-radius: var(--radius-pill);
  background: var(--brand); flex: none; }

/* ------------------------------------------------------------------ the structure tree
 *
 * 6.8 added rules here for a tree that already had some, in the inline block on `admin.html` —
 * I read the shared stylesheets, found nothing, and said there was nothing. What was genuinely
 * missing is the part that made a long shop name wrap around its own cost centre, so that is
 * what stays: the row is a grid, the name takes a line of its own where there is no room beside
 * it, and the actions wrap as a row rather than as running text. The rest is not repeated here.
 */
.struct-row { display: grid; gap: var(--sp-2); }
.struct-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.struct-name { flex: 1 1 100%; font: var(--type-body); }
@media (min-width: 720px) { .struct-name { flex: 0 1 auto; } }
.struct-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ONE ROW, ONE TARGET (6.25). The explorer's rows are buttons: a whole row is the tap area, the
   name is what you read first, and the facts under it are quiet. Nothing else on the row can be
   pressed, because six links in a row is how somebody presses Delete reaching for Edit. */
.struct-co { display: grid; gap: var(--sp-1); margin-bottom: var(--sp-4); }
.struct-rowbtn { display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  /* 44px: a finger, not a cursor. */
  min-height: 44px; padding: var(--sp-3) var(--sp-4); text-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text); font: var(--type-body); cursor: pointer; }
.struct-rowbtn:hover { border-color: var(--brand); }
.struct-rowbtn--head { background: var(--surface-2); font-weight: var(--fw-semibold); }
.struct-rowbtn__main { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.struct-rowbtn__title { font: var(--type-body); }
.struct-rowbtn__sub { font: var(--type-small); color: var(--text-muted); }
.struct-rowbtn__go { color: var(--text-muted); flex: 0 0 auto; }
[dir="rtl"] .struct-rowbtn__go { transform: scaleX(-1); }

/* The name stays in view while the columns scroll under it — at every width, since 8.25 lets a
   tablet table scroll too. Before the tick box's width when there is one. */
.o-grid .o-grid__sel { position: sticky; inset-inline-start: 0; z-index: var(--z-sticky); background: var(--surface);
  /* 8.69: never narrower than the width the lead column's offset assumes. A table wider than its
     scroller squeezed the tick-box column (to 16px) while the sticky lead still sat --sp-12 in, so
     the lead slid over the column after it — the second column read "…ange juice" on Movements. */
  min-width: var(--sp-12); box-sizing: border-box; }
.o-grid thead .o-grid__sel { z-index: calc(var(--z-sticky) + 1); background: var(--surface-subtle); }
.o-grid .o-grid__lead { position: sticky; inset-inline-start: 0; z-index: var(--z-sticky); background: var(--surface);
  border-inline-end: 1px solid var(--border); }
.o-grid--sel .o-grid__lead { inset-inline-start: var(--sp-12); } /* the width `.o-grid__selcol` gives the tick-box column */
.o-grid thead .o-grid__lead { z-index: calc(var(--z-sticky) + 1); background: var(--surface-subtle); }
.o-grid tbody tr[aria-selected="true"] .o-grid__lead, .o-grid tbody tr[aria-selected="true"] .o-grid__sel { background: var(--accent-subtle); }
.o-grid tbody tr[data-clickable="true"]:is(:hover, :focus-visible) .o-grid__lead { background: var(--surface-subtle); }
/* A PHONE KEEPS THE TABLE (8.25), scrolled sideways, not squeezed. Every cell stays on one line so
   a row is a row, the name column (and the tick box before it) stays pinned while the figures
   scroll under it, and the name is capped so the first figure is always in view. Compact rows are
   the opt-in now: `mobile: 'rows'`. */
.o-grid__cards { display: none; }
@media (max-width: 720px) {
  .o-grid--rows .o-grid__scroll { display: none; }
  .o-grid--rows .o-grid__cards { display: block; }
  .o-grid:not(.o-grid--rows) .o-grid__scroll { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .o-grid:not(.o-grid--rows) table { width: max-content; min-width: 100%; }
  /* Not the tick box: its width is the offset the pinned name sits at. */
  .o-grid:not(.o-grid--rows) thead th:not(.o-grid__sel), .o-grid:not(.o-grid--rows) tbody td:not(.o-grid__sel) { padding-inline: var(--sp-2); }
  .o-grid:not(.o-grid--rows) tbody td { height: var(--row-compact); white-space: nowrap; }
  .o-grid:not(.o-grid--rows) tbody td .o-grid__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .o-grid:not(.o-grid--rows) .o-grid__lead { max-width: 44vw; }
  /* 10.89.0 (register ORV-P2-STOCK-PHONE-FROZEN-COLUMNS-001): the tick box AND the name were both pinned, leaving 190 of
     the 324px for the figures — scrolled to the end, the unit cost sat under the name and could not be read beside the
     value. On a phone only the name stays pinned (the tick box scrolls with the row), and the name is capped narrower,
     so the last figures are readable together at the end of the scroll. */
  .o-grid:not(.o-grid--rows) .o-grid__sel { position: static; }
  .o-grid--sel:not(.o-grid--rows) .o-grid__lead { inset-inline-start: 0; }
  .o-grid:not(.o-grid--rows) .o-grid__lead { max-width: 23vw; }
  .o-grid:not(.o-grid--rows) .o-grid__act { inline-size: 44px; min-inline-size: 44px; max-inline-size: 44px; }
  /* 11.82.2 (outside QA ORVIA-001): the pinned name WRAPS (up to three lines) instead of being cut to "Butter cr…" — the
     name is what a row is found by; the row grows a little, the figures stay on one line. */
  .o-grid:not(.o-grid--rows) tbody td.o-grid__lead { white-space: normal; min-width: 7rem; }
  .o-grid:not(.o-grid--rows) .o-grid__lead .o-grid__primary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: break-word; white-space: normal; }
  .o-grid:not(.o-grid--rows) thead th.o-grid__num, .o-grid:not(.o-grid--rows) tbody td.o-grid__num { padding-inline: var(--sp-1); }
  /* 11.84 (ORV-P2-STOCK-PHONE-FROZEN-COLUMNS-001 again): a register of figures (`pin: 'narrow'`, the stock list) keeps the
     10.89 cap — the name at 23vw, no 7rem minimum — so its last figures sit beside it, not under it; the name wraps to more
     lines instead of being cut (ORVIA-001). */
  .o-grid--narrowpin:not(.o-grid--rows) tbody td.o-grid__lead { min-width: 0; }
  .o-grid--narrowpin:not(.o-grid--rows) .o-grid__lead .o-grid__primary { -webkit-line-clamp: 6; line-clamp: 6; }
  .o-grid:not(.o-grid--rows) thead th.o-grid__num { white-space: normal; }   /* "Unit cost" may take two lines; the figure under it may not */
}
/* COMPACT ROWS (7.100): two lines for most objects, three at most. Figures end their line and
   line up down the list, as they do in the desktop grid; ··· is a full tap target at the end. */
.o-grid__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 0 var(--sp-1); padding: var(--sp-2) var(--sp-4); padding-inline-end: var(--sp-2);
  border-block-end: 1px solid var(--border); cursor: pointer; }
.o-grid__row:last-child { border-block-end: 0; }
.o-grid__row:is(:hover, :focus-visible) { background: var(--surface-subtle); outline: none; }
.o-grid__lines { min-inline-size: 0; display: grid; gap: var(--sp-1); }
.o-grid__line { display: flex; align-items: baseline; gap: var(--sp-3); min-inline-size: 0; }
.o-grid__ls { flex: 1 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-grid__le { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: var(--sp-2);
  font-variant-numeric: var(--num-figures); white-space: nowrap; }
.o-grid__line--1 { font: var(--type-body); }
.o-grid__line--1 .o-grid__ls { font: var(--type-body-strong); }
.o-grid__line--2, .o-grid__line--3 { font: var(--type-small); color: var(--text-muted); }
.o-grid__line--3 { font: var(--type-caption); }
.o-grid__dot { color: var(--text-disabled); }
/* A state that needs attention reads as one, without a badge the size of the row. */
.o-grid__warn { color: var(--danger-text); font-weight: 600; }
.o-grid__rowact .o-btn { border-color: transparent; background: none; color: var(--text-muted); }

/* ------------------------------------------------------------------ property list */
.o-props { margin: 0; max-width: var(--width-settings); }
.o-props__dl { margin: 0; }   /* 11.82.1: the list inside the wrapper (R82-S-011) */
.o-props + .o-props { margin-top: var(--sp-6); }
.o-props__head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2);
  font: var(--type-label); font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.o-props__head .o-btn { margin-inline-start: auto; }
.o-props__row { display: grid; grid-template-columns: var(--property-label-w) 1fr auto; align-items: baseline;
  gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.o-props__row:last-child { border-bottom: 0; }
.o-props dt { font: var(--type-small); color: var(--text-muted); }
.o-props dd { margin: 0; font: var(--type-body); color: var(--text); min-width: 0; overflow-wrap: anywhere; }
/* Tabular figures line numbers up; start-aligned so a number and a word in the same list sit
   in the same column instead of one of them drifting to the far edge. */
.o-props dd.o-props__num { font-variant-numeric: var(--num-figures); }
.o-props dd.o-props__empty { color: var(--text-disabled); }
@media (max-width: 560px) {
  /* The label keeps its own width and the value wraps in what is left (8.26): with `1fr auto` a
     long value — a sentence explaining how a figure was estimated — grew over its own label. */
  /* 11.43.0 (DW4, measured): a label longer than the screen ("Refunds given today (1) — already taken off the sales
     above") took every pixel at max-content and left the amount a zero-width column, one digit per line. The label now
     wraps in what the value leaves, and the value keeps at least 40% — a figure is never broken. */
  .o-props__row { grid-template-columns: minmax(0, max-content) minmax(40%, 1fr); }
  .o-props dt { overflow-wrap: normal; min-width: 0; }
  .o-props dd.o-props__num { white-space: nowrap; overflow-wrap: normal; }
  .o-props dd { text-align: end; }
  .o-props__row > .o-props__act:empty, .o-props__row > div:empty { display: none; }
  .o-props__row > .o-props__act:not(:empty), .o-props__row > div:not(:empty) { grid-column: 1 / -1; justify-self: end; }
}

/* ------------------------------------------------------------------ record header */
.o-rechead { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.o-rechead__main { display: flex; align-items: flex-start; gap: var(--sp-4); }
.o-rechead__media { flex: none; width: calc(var(--control-lg) + var(--sp-4)); height: calc(var(--control-lg) + var(--sp-4));
  border-radius: var(--radius-md); background: var(--surface-subtle); border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden; color: var(--text-muted); }
.o-rechead__media img { width: 100%; height: 100%; object-fit: cover; }
.o-rechead__titles { flex: 1; min-width: 0; }
.o-rechead__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
/* 10.89.0 (register ORV-P2-CUSTOMER-LONG-NAME-LAYOUT-001, ORV-P2-PRODUCT-LONG-TEXT-LIMIT-LAYOUT-001): a name with no spaces
   in it wraps at any letter, at every width — a 300-character one pushed the desktop page to 3,900px wide. */
.o-rechead__title { font: var(--type-record); margin: 0; letter-spacing: -.01em; min-width: 0; max-inline-size: 100%; overflow-wrap: anywhere; }
.o-rechead__title-row > * { min-inline-size: 0; }
.o-grid__primary, .o-grid__sub, .o-card h4, .o-crumbs, .o-props__head { overflow-wrap: anywhere; }
.o-rechead__meta { font: var(--type-small); color: var(--text-muted); margin-top: var(--sp-1); }
.o-rechead__actions { flex: none; display: flex; align-items: center; gap: var(--sp-2); }
.o-rechead__kpis { display: flex; flex-wrap: wrap; gap: var(--sp-6); }
.o-rechead__kpi-value { font: var(--type-body-strong); font-size: var(--fs-kpi-sm); line-height: var(--lh-tight);
  font-variant-numeric: var(--num-figures); }
.o-rechead__kpi-label { font: var(--type-caption); color: var(--text-muted); }
@media (max-width: 720px) {
  .o-rechead__main { flex-wrap: wrap; }
  .o-rechead__actions { width: 100%; }
  .o-rechead__actions .o-btn:not(.o-btn--icon) { flex: 1; }
  .o-rechead__kpis { gap: var(--sp-4); }
}

/* ------------------------------------------------------------------ empty state */
.o-emptystate { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-12) var(--sp-4); text-align: center; }
.o-emptystate__icon { color: var(--text-muted); margin-bottom: var(--sp-2); }
.o-emptystate__icon .o-icon { width: var(--icon-lg); height: var(--icon-lg); }
.o-emptystate__title { font: var(--type-section); margin: 0; }
.o-emptystate__text { font: var(--type-small); color: var(--text-muted); margin: 0; max-width: var(--dialog-sm); }
.o-emptystate__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.o-emptystate--error .o-emptystate__icon { color: var(--danger-text); }

/* ------------------------------------------------------------------ skeletons */
.o-skel { display: block; border-radius: var(--radius-sm); background: var(--surface-subtle);
  background-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent);
  background-size: 200% 100%; animation: o-skel 1.2s linear infinite; }
@keyframes o-skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.o-skel--line { height: var(--sp-3); }
.o-skel--title { height: var(--sp-6); width: 40%; }
.o-skel--kpi { height: var(--sp-8); width: calc(var(--sidebar-collapsed) * 1.5); }
.o-skel-stack { display: grid; gap: var(--sp-3); }
.o-skel-row { display: flex; gap: var(--sp-4); align-items: center; height: var(--row-normal); padding: 0 var(--sp-3);
  border-bottom: 1px solid var(--border); }
.o-skel-row .o-skel { flex: 1; }
.o-skel-row .o-skel:first-child { flex: 2; }
@media (prefers-reduced-motion: reduce) { .o-skel { animation: none; } }

/* ------------------------------------------------------------------ stacks
   Vertical rhythm between independent blocks, from the scale — instead of a margin written on
   each block, which is where 19px and 27px come from. */
.o-stack > * + * { margin-top: var(--sp-4); }
.o-stack--lg > * + * { margin-top: var(--sp-8); }
.o-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }
/* 11.73: a branch's opening hours, one day per fieldset (admin/finder.js, the branch page) */
.o-bh-day { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-2); min-inline-size: 0; }
.o-bh-day > legend { padding-inline: var(--sp-1); font: var(--type-label); }
/* The folded import/export buttons carry a tooltip; unfolded, their label is already visible. */
@media (min-width: 721px) { .o-filterbar__io.o-tip::after { display: none; } }

/* ======================================================================== shell (3.74.0)
   One sidebar. Expanded 240, collapsed 64, one transition between them on the shared curve.
   Leaves are text under their domain; collapsed shows domains only, as icons with a name.
   On a phone or a portrait tablet it is a drawer from the inline start. */
.o-sidebar { flex: 0 0 var(--sidebar-expanded); width: var(--sidebar-expanded); box-sizing: border-box;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden auto; overscroll-behavior: contain;
  padding: var(--sp-3) var(--sp-2); gap: var(--sp-1);
  background: var(--surface); border-inline-end: 1px solid var(--border);
  transition: width var(--dur-nav) var(--ease-standard), flex-basis var(--dur-nav) var(--ease-standard); }

.o-sidebar__top { display: flex; align-items: center; gap: var(--sp-2); padding-bottom: var(--sp-2); margin-bottom: var(--sp-1);
  border-bottom: 1px solid var(--border); }
.o-sidebar__pos { flex: 1; min-width: 0; }
.o-sidebar__collapse { flex: none; display: inline-grid; place-items: center; width: var(--control-md); height: var(--control-md);
  border: 0; border-radius: var(--radius-md); background: none; color: var(--text-muted); cursor: pointer; }
.o-sidebar__collapse:is(:hover, :focus-visible) { background: var(--surface-subtle); color: var(--text); outline: none; }

/* Domain heading. Hover, focus, open and current are four distinct states, each one rule. */
.o-navgroup__head { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--control-md);
  padding: 0 var(--sp-3); border: 0; border-radius: var(--radius-md); background: none; cursor: pointer;
  font: var(--type-body); font-weight: var(--fw-semibold); color: var(--text-secondary); text-align: start; white-space: nowrap; }
.o-navgroup__head:hover { background: var(--surface-subtle); color: var(--text); }
.o-navgroup__head:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.o-navgroup[data-current="true"] > .o-navgroup__head { color: var(--text); }
.o-navgroup[data-current="true"] > .o-navgroup__head .o-icon { color: var(--brand-strong); }
.o-navgroup__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.o-navgroup__chev { display: inline-flex; color: var(--text-muted); transition: transform var(--dur-state) var(--ease-standard); }
.o-navgroup[data-open="true"] .o-navgroup__chev { transform: rotate(180deg); }

/* Height animates by the grid-row trick — 0fr to 1fr — so a domain opens at its own height
   without measuring it in script, and closes the same way. */
.o-navgroup__items { display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows var(--dur-menu) var(--ease-standard), opacity var(--dur-menu) var(--ease-standard); }
.o-navgroup[data-open="true"] .o-navgroup__items { grid-template-rows: 1fr; opacity: 1; }
.o-navgroup__inner { min-height: 0; overflow: hidden; display: grid; gap: var(--sp-1); }
.o-navgroup[data-open="true"] .o-navgroup__inner { padding: var(--sp-1) 0 var(--sp-2); }

/* Leaf. Indented to sit under the domain's label, not its icon. */
.o-navitem { display: flex; align-items: center; min-height: var(--control-sm); border-radius: var(--radius-sm);
  padding-inline: calc(var(--sp-3) + var(--icon-md) + var(--sp-3)) var(--sp-3);
  font: var(--type-small); color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.o-navitem__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 11.81.0 (navigation by activity): on a touch screen or a phone-width window the menu's entries, its headings and its
   bands are 44px targets, as every other control a finger presses (9.99.2) — the activity groups made the menu a place
   people tap through on a tablet at the counter. Desktop with a mouse keeps its denser rows. */
@media (pointer: coarse), (max-width: 760px) {
  .o-navitem, .o-navgroup__head, .o-navsection { min-block-size: 44px; }
}
/* 11.40.0 (DW1): a tile counter on its menu item — how many wait (approvals). */
.o-navitem__count { margin-inline-start: auto; min-width: 1.5em; padding: 0 var(--sp-1); border-radius: var(--radius-sm); text-align: center;
  font: var(--type-small); background: var(--surface-2); color: var(--text); }
.o-navitem__count[data-tone="attention"] { background: var(--brand); color: var(--on-brand); }
/* 11.48.9 (QA3-PPL-002): a record tab says how many it holds (Documents 2), as the phone's section chooser did. */
.o-tab__count { margin-inline-start: var(--sp-2); min-width: 1.5em; padding: 0 var(--sp-1); border-radius: var(--radius-sm); text-align: center;
  font: var(--type-small); background: var(--surface-2); color: var(--text); }
.o-navitem:hover { background: var(--surface-subtle); color: var(--text); }
.o-navitem:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.o-navitem[aria-current="page"] { background: var(--accent-subtle); color: var(--brand-strong); font-weight: var(--fw-semibold); }

/* The list of groups in the sidebar. Written since the shell existed and styled by nothing, so it
   was laid out by whatever a plain div does inside a flex column (6.19). */
.o-sidebar__groups { display: grid; gap: var(--sp-1); }

.o-sidebar__foot { margin-top: auto; padding-top: var(--sp-3); border-top: 1px solid var(--border); display: grid; gap: var(--sp-2); }

/* Collapsed: icons only, each keeping its name as a tooltip to the side. Labels fade rather
   than vanish, so the width transition does not show text being cut mid-letter. */
/* The collapse control sits at the end of its row. It used to be pushed there by the POS link
   beside it (flex: 1); with that link gone the row has one child, and without this it would sit
   at the start, under the drawer's edge. */
.o-sidebar:not([data-collapsed="true"]) .o-sidebar__top .o-sidebar__collapse { margin-inline-start: auto; }
.o-sidebar .o-tip::after { display: none; }
/* A band inside a domain. Quiet on purpose: it groups the rows below it and is not one of
   them — a heading that looks like a link is a link people click. */
/* The heading is a button on a phone and a label on a desktop: narrow screens need to fold a
   nineteen-leaf domain away, wide ones have the room and are better off showing the grouping. */
.o-navsection { display: flex; align-items: center; gap: var(--sp-2); width: 100%;
  font: var(--type-label); font-weight: var(--fw-semibold); letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted); text-align: start;
  background: none; border: 0; cursor: default;
  /* Indented to the leaves it names (5.64). Flush against the rail it read as a heading for the
     whole domain rather than for the rows under it. */
  padding: var(--sp-3) var(--sp-3) var(--sp-1) var(--sp-4); }
.o-navsection .o-icon { margin-inline-start: auto; opacity: 0; transition: transform var(--dur-state) var(--ease-standard); }
.o-navband { display: block; }
@media (max-width: 720px) {
  .o-navsection { cursor: pointer; }
  .o-navsection .o-icon { opacity: 1; }
  .o-navsection[aria-expanded="false"] .o-icon { transform: rotate(-90deg); }
  .o-navband[data-open="false"] { display: none; }
}
.o-navgroup__label, .o-navgroup__chev, .o-sidebar__pos { transition: opacity var(--dur-state) var(--ease-standard); }

/* The content region: the only thing a navigation replaces. A short fade, no slide. */
.o-content { transition: opacity var(--dur-state) var(--ease-standard); }
.o-content[data-leaving="true"] { opacity: 0; }

/* Phone and portrait tablet: a drawer from the inline start, at its expanded width. */
/* COLLAPSED IS A DESKTOP LAYOUT (8.58). The icon rail exists only beside the content, above the phone
   breakpoint; on a phone the sidebar is a drawer and always expanded. These rules used to apply at every
   width and were undone one by one inside the phone block below — and lost: `.o-sidebar__foot >
   :not(.o-sidebar__keep)` out-ranked the phone's `> *`, and two rules came AFTER the phone block. So a
   phone that had ever saved "collapsed" showed a drawer with an empty footer (no Sign out, theme or
   version), could not scroll it, and squeezed the top row to nothing. Scoped here, a phone never sees them. */
@media (min-width: 901px) {
  .o-sidebar[data-collapsed="true"] { flex-basis: var(--sidebar-collapsed); width: var(--sidebar-collapsed); }
  .o-sidebar[data-collapsed="true"] .o-navgroup__label,
  .o-sidebar[data-collapsed="true"] .o-navgroup__chev,
  .o-sidebar[data-collapsed="true"] .o-sidebar__pos,
  .o-sidebar[data-collapsed="true"] .o-sidebar__foot > :not(.o-sidebar__keep) { opacity: 0; pointer-events: none; width: 0; overflow: hidden; }
  .o-sidebar[data-collapsed="true"] .o-navgroup__head { justify-content: center; padding: 0; gap: 0; }
  .o-sidebar[data-collapsed="true"] .o-sidebar__top { justify-content: center; }
  .o-sidebar[data-collapsed="true"] .o-tip:is(:hover, :focus-visible)::after { display: block;
    inset-block-start: 50%; inset-inline-start: calc(100% + var(--sp-2)); transform: translateY(-50%); }
  .o-sidebar[data-collapsed="true"] { overflow: visible; }
  .o-sidebar[data-collapsed="true"] .o-sidebar__top { gap: 0; }
  .o-sidebar[data-collapsed="true"] .o-sidebar__pos { flex: 0 0 0; padding: 0; border: 0; }
}

/* 11.72.0 (navigation wave 1): THE HEADINGS EXPAND IN PLACE. The 8.60 panel beside the sidebar is gone — a domain's
   screens open under its heading (`hidden` when closed: out of the Tab order too). The collapsed rail shows headings only;
   pressing one widens the sidebar and opens it. */
.o-navgroup__items[hidden] { display: none; }
.o-navgroup[data-open="true"] > .o-navgroup__head { color: var(--text); }
@media (min-width: 901px) { .o-sidebar[data-collapsed="true"] .o-navgroup__items { display: none; } }

/* Phone and tablet (900 px and below): the side panel — 11.84.1, at the end of this file. */
/* 10.89.0 (register ORV-P2-TABLET-NAVIGATION-UNAVAILABLE-001): the sidebar becomes a drawer at 900px and below, but the
   button that opens it was shown only to 700px — so between 701 and 900 (a portrait tablet, 820 wide) the navigation was
   off screen with nothing to open it. The button is shown wherever the drawer is.
   ORV-P2-MOBILE-HEADER-TAP-TARGETS-001: and it is a 44px target, the size a finger needs (it was 40). */
#navToggle.hamburger { min-inline-size: 44px; min-block-size: 44px; }
@media (max-width: 900px) { #navToggle.hamburger { display: inline-flex; align-items: center; justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  .o-sidebar, .o-navgroup__items, .o-navgroup__chev, .o-content, .o-navgroup__label { transition: none; }
}
/* Collapsed, nine icons always fit, so the tooltips may escape the rail instead of being clipped. */

/* ======================================================================== screens (3.75.0) */
.o-recbody { min-height: calc(var(--row-normal) * 4); }
.o-sections { display: grid; border-top: 1px solid var(--border); background: none; padding: 0; gap: 0; }   /* a <nav>: see .o-crumbs */
.o-sections__item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: var(--control-lg);
  padding: var(--sp-2) var(--sp-1); border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font: var(--type-body); }
.o-sections__item:is(:hover, :focus-visible) { background: var(--surface-subtle); outline: none; }
.o-sections__sum { display: block; font: var(--type-caption); color: var(--text-muted); }
.o-back { display: inline-flex; align-items: center; gap: var(--sp-1); margin-bottom: var(--sp-3); font: var(--type-small); color: var(--text-muted); text-decoration: none; }

/* Activity timeline */
.o-timeline__day + .o-timeline__day { margin-top: var(--sp-6); }
.o-timeline__date { margin: 0 0 var(--sp-2); font: var(--type-label); font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.o-timeline ol { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--border); }
.o-timeline__item { display: grid; grid-template-columns: calc(var(--sp-12) + var(--sp-2)) 1fr; gap: var(--sp-3); padding: var(--sp-2) 0 var(--sp-2) var(--sp-4); position: relative; }
.o-timeline__item::before { content: ""; position: absolute; inset-inline-start: calc(var(--sp-1) * -1); inset-block-start: var(--sp-3);
  width: var(--sp-2); height: var(--sp-2); border-radius: var(--radius-pill); background: var(--border-strong); }
.o-timeline__time { font: var(--type-small); color: var(--text-muted); font-variant-numeric: var(--num-figures); }
.o-timeline__title { font: var(--type-body-strong); }
.o-timeline__change { font: var(--type-small); color: var(--text-secondary); font-variant-numeric: var(--num-figures); }
.o-timeline__detail, .o-timeline__by { font: var(--type-caption); color: var(--text-muted); }

/* Import wizard */
.o-drawer--wide { width: min(var(--dialog-lg), 100vw); }
.o-wizard { display: grid; gap: var(--sp-4); }
.o-wizard__foot { display: flex; align-items: center; gap: var(--sp-2); width: 100%; }
.o-wizard__lead { margin: 0; font: var(--type-small); color: var(--text-muted); }
.o-steps { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.o-steps li { counter-increment: step; display: inline-flex; align-items: center; gap: var(--sp-1); font: var(--type-small); color: var(--text-muted); }
.o-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: var(--icon-md); height: var(--icon-md);
  border-radius: var(--radius-pill); border: 1px solid var(--border); font: var(--type-caption); font-weight: var(--fw-semibold); }
.o-steps li[aria-current="step"] { color: var(--text); font-weight: var(--fw-semibold); }
.o-steps li[aria-current="step"]::before { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.o-steps li[data-done="true"]::before { background: var(--accent-subtle); border-color: var(--accent-subtle); color: var(--brand-strong); }
.o-drop { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-12) var(--sp-4); cursor: pointer; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-muted); background: var(--surface-subtle); }
.o-drop:is(:hover, :focus-visible), .o-drop[data-over="true"] { border-color: var(--brand); color: var(--brand-strong); outline: none; }
.o-drop .o-icon { width: var(--icon-lg); height: var(--icon-lg); }
.o-drop__title { font: var(--type-body-strong); color: var(--text); }
.o-drop__hint { font: var(--type-small); }
.o-maprows { display: grid; gap: var(--sp-2); }
.o-maprow { display: grid; grid-template-columns: var(--property-label-w) 1fr; align-items: center; gap: var(--sp-3); }
.o-maprow__to { font: var(--type-body); }
.o-maprow__req { color: var(--danger-text); }
@media (max-width: 560px) { .o-maprow { grid-template-columns: 1fr; gap: var(--sp-1); } }
.o-counts { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.o-count { flex: 1 1 calc(var(--sidebar-collapsed) * 2); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-md); }
.o-count__n { font: var(--type-kpi); font-size: var(--fs-kpi-sm); font-variant-numeric: var(--num-figures); }
.o-count__l { font: var(--type-caption); color: var(--text-muted); }
.o-count--success .o-count__n { color: var(--success-text); }
.o-count--warning .o-count__n { color: var(--warning-text); }
.o-count--danger .o-count__n { color: var(--danger-text); }
.o-issues { list-style: none; margin: 0; padding: 0; max-height: calc(var(--row-normal) * 8); overflow: auto; }
.o-issues li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); font: var(--type-small); }
.o-issues__line { color: var(--text-muted); font-variant-numeric: var(--num-figures); }
.o-confirm { display: grid; gap: var(--sp-2); }
.o-confirm__row { display: flex; align-items: baseline; gap: var(--sp-3); font: var(--type-body); }
.o-confirm__n { min-width: var(--sp-12); text-align: right; font: var(--type-body-strong); font-size: var(--fs-kpi-sm); font-variant-numeric: var(--num-figures); }
.o-quickviews .o-tab { white-space: nowrap; flex: none; }
.o-bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); background: var(--accent-subtle); }
.o-bulkbar[hidden] { display: none; }
/* 10.85.0: a line a list screen puts under its header (Social → Inbox: the accounts it cannot read, and why). */
.o-wsnotice { margin: 0 0 var(--sp-3); color: var(--text-secondary); }
/* 11.47.0: a paged list's next page — below the grid, with how many are shown of how many match. */
.o-wsmore { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-3); margin-block: var(--sp-3); }
.o-wsmore:empty { display: none; }
.o-wsmore__n { color: var(--text-secondary); font: var(--type-caption); }
.o-bulkbar__count { font: var(--type-body-strong); margin-inline-end: var(--sp-2); }

/* A signed quantity — a count difference, a stock movement. Coloured by direction, never
   uppercased: a status badge is for a state, and "-1.5 KG" is not one. */
.o-delta { font-variant-numeric: var(--num-figures); font-weight: var(--fw-semibold); white-space: nowrap; }
.o-delta--pos { color: var(--success-text); }
.o-delta--neg { color: var(--danger-text); }
.o-delta--zero { color: var(--text-muted); font-weight: var(--fw-regular); }

/* ======================================================================== board (3.83.0)
   The operational board: watched, not searched. Lanes side by side on a wide screen, stacked on
   a phone; tickets read from across a kitchen in wall mode. */
.o-board-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.o-board-head .o-select { width: auto; min-width: calc(var(--sidebar-collapsed) * 3); }
.o-board-sync { font: var(--type-small); color: var(--text-muted); margin-top: var(--sp-1); min-height: var(--sp-4); }
.o-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; }
@media (max-width: 900px) { .o-board { grid-template-columns: 1fr; } }
.o-lane { background: var(--surface-subtle); border-radius: var(--radius-lg); padding: var(--sp-3); min-height: calc(var(--row-normal) * 3); }
.o-lane__head { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); font: var(--type-label);
  font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.o-lane__count { display: inline-grid; place-items: center; min-width: var(--icon-md); height: var(--icon-md); padding: 0 var(--sp-1);
  border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font-variant-numeric: var(--num-figures); }
.o-lane--ready .o-lane__count { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success-text); }
.o-lane__body { display: grid; gap: var(--sp-3); }
.o-ticket { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--border-strong); border-radius: var(--radius-md);
  padding: var(--sp-3); display: grid; gap: var(--sp-2); box-shadow: var(--elev-1); }
.o-ticket--warn { border-top-color: var(--warning); }
.o-ticket--late { border-top-color: var(--danger); }
.o-lane--ready .o-ticket { border-top-color: var(--success); }
.o-ticket__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.o-ticket__id { font: var(--type-body-strong); font-size: var(--fs-section); }
.o-ticket__age { font: var(--type-small); font-variant-numeric: var(--num-figures); color: var(--text-muted); }
/* 11.64.0: a virtual brand's ticket, and where the order came from (kiosk, call centre) */
.o-ticket__brand, .o-ticket__src { font: var(--type-small); font-weight: var(--fw-semibold); padding: 0 var(--sp-2); border-radius: var(--radius-sm); background: var(--surface-subtle); color: var(--text); }
.o-ticket__head { flex-wrap: wrap; }
.o-ticket--warn .o-ticket__age { color: var(--warning-text); font-weight: var(--fw-semibold); }
.o-ticket--late .o-ticket__age { color: var(--danger-text); font-weight: var(--fw-semibold); }
.o-ticket__items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.o-ticket__item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--control-md);
  padding: var(--sp-1) var(--sp-2); border: 1px solid transparent; border-radius: var(--radius-sm); background: none; cursor: pointer;
  font: var(--type-body); color: var(--text); text-align: start; }
.o-ticket__item:is(:hover, :focus-visible) { border-color: var(--border); background: var(--surface-subtle); outline: none; }
.o-ticket__qty { font-weight: var(--fw-semibold); font-variant-numeric: var(--num-figures); }
.o-ticket__st { font: var(--type-caption); color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.o-ticket__item--preparing { background: color-mix(in srgb, var(--info) 8%, transparent); }
.o-ticket__item--preparing .o-ticket__st { color: var(--info-text); }
.o-ticket__item--ready .o-ticket__name { text-decoration: line-through; color: var(--text-muted); }
/* 11.48.34 (QA-117): what the guest chose with the dish, under its name */
.o-ticket__mods { display: block; font: var(--type-caption); color: var(--text-muted); font-weight: var(--fw-semibold); }
/* 11.86.0: an included item taken off ("NO onion") stands out on the ticket — bold, in the danger text colour */
.o-ticket__no { color: var(--danger-text); font-weight: var(--fw-bold); text-transform: none; }
.o-ticket__mods > bdi, .o-ticket__no { white-space: nowrap; }
/* 11.87.1: a catering order's own ticket on its production day — marked apart from a sale's */
.o-ticket--catering { border-inline-start: var(--sp-1) solid var(--info); }
.o-ticket__src--catering { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info-text); }
.o-ticket__meta { margin: 0; font: var(--type-small); color: var(--text-muted); }
/* 11.85.0 (Till 2.0): the till's note on the order, under the ticket's head */
.o-ticket__note { margin: 0; padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); background: var(--warning); color: var(--on-warning); font: var(--type-small); font-weight: var(--fw-semibold); }
.o-ticket__item--ready .o-ticket__st { color: var(--success-text); }
.o-ticket__bump { width: 100%; }
/* Wall mode: read from the pass. */
.o-board--wall .o-ticket__id { font-size: var(--fs-page); }
.o-board--wall .o-ticket__item { font-size: var(--fs-section); min-height: var(--control-lg); }
.o-board--wall .o-ticket__age { font-size: var(--fs-body); }
/* Four lanes — the online pipeline has one more step than the kitchen. */
.o-board--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .o-board--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .o-board--four { grid-template-columns: 1fr; } }

/* Tables: the floor board. A free table is quiet; a busy one carries the brand edge and its bill.
   10.91.0 (register ORV-P2-OPENING-FORM-PRESENTATION-001): a restaurant table is a BUTTON with this class, and a data
   table (primitives.css) is a <table> with the same class. Unscoped, these rules turned every data table into a grid of
   bordered cards — headers no longer over their columns, a pointer cursor over figures — on opening stock, the fixed-
   asset and the supplier and customer statements. They are the floor's only. */
.o-floor__sec + .o-floor__sec { margin-top: var(--sp-6); }
.o-floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--sidebar-collapsed) * 2), 1fr)); gap: var(--sp-3); }
.o-table:not(table) { display: grid; gap: var(--sp-1); align-content: start; min-height: calc(var(--control-lg) * 2); padding: var(--sp-3); text-align: start; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font: var(--type-body); }
.o-table:not(table):is(:hover, :focus-visible) { border-color: var(--border-strong); outline: none; box-shadow: var(--focus-ring); }
.o-table--busy:not(table) { border-color: var(--brand); background: var(--accent-subtle); }
/* 11.82.2 (admin UX-002): a table's cell — its tile (opens the bill when busy) and, when busy, Edit table under it */
.o-table-cell { display: grid; gap: var(--sp-1); align-content: start; min-width: 0; }
.o-table-cell .o-table__edit { justify-self: start; min-height: 44px; }
.o-table__name { font: var(--type-body-strong); font-size: var(--fs-section); }
.o-table__seats { font: var(--type-caption); color: var(--text-muted); }
.o-table__bill { font: var(--type-small); font-weight: var(--fw-semibold); color: var(--brand-strong); font-variant-numeric: var(--num-figures); }

/* A day's punches: time, what, where from — a superseded one struck through, never removed. */
.o-punches { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.o-punch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); font: var(--type-body); }
.o-punch__time { font: var(--type-body-strong); font-variant-numeric: var(--num-figures); min-width: var(--sp-12); }
.o-punch--gone > span:not(.hint) { text-decoration: line-through; color: var(--text-muted); }

/* Finance: KPI tiles that wrap, and two property lists side by side where there is room. */
.o-fin-kpis { margin: var(--sp-4) 0 var(--sp-6); }
.o-fin-bar { margin-bottom: var(--sp-2); }
.o-fin-bar .o-field { min-width: calc(var(--sidebar-collapsed) * 3); }
.o-fin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(var(--property-label-w) * 2), 1fr)); gap: var(--sp-8); }
.o-fin-cols .o-props + .o-props { margin-top: 0; }
.o-fin-save { justify-content: flex-end; margin-top: var(--sp-3); }

/* Month close and statements: a checklist of gates, and statement tables with heads and totals. */
.o-mc-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.o-gates { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: grid; gap: var(--sp-2); }
.o-gate { display: flex; align-items: flex-start; gap: var(--sp-2); font: var(--type-body); }
.o-gate > span { display: grid; }
.o-gate--ok .o-icon { color: var(--success-text); }
.o-gate--no .o-icon { color: var(--danger-text); }
.mc-closed { margin-top: var(--sp-8); }
.o-stmt__head td { font: var(--type-label); font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-subtle); }
.o-stmt__total td { font-weight: var(--fw-semibold); border-top: 1px solid var(--border-strong); }
.o-stmt__code { font: var(--type-caption); color: var(--text-muted); font-variant-numeric: var(--num-figures); }

/* Reports: two charts side by side where there is room. */
.o-rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--property-label-w) * 2)), 1fr));   /* 11.82.2 (the 320 px sweep): a card never wider than the screen */ gap: var(--sp-4); margin-bottom: var(--sp-8); }
.o-rep-card { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }

/* Dashboard: what needs somebody, as tappable rows; the lead figure larger than the rest. */
.o-needs { margin-bottom: var(--sp-6); }
.o-needs__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.o-needs__list li + li { border-top: 1px solid var(--border); }
.o-needs__item { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--row-normal); padding: 0 var(--sp-4);
  border: 0; background: none; cursor: pointer; font: var(--type-body); color: var(--text); text-align: start; }
.o-needs__item > span:not(.o-status) { flex: 1; }
.o-needs__item:is(:hover, :focus-visible) { background: var(--surface-subtle); outline: none; }
.o-kpi-lead .o-rechead__kpi-value { font-size: var(--fs-kpi); color: var(--brand-strong); }
/* Explore: the query as a row of fields that wraps, Apply at its end. */
.o-querybar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.o-querybar .o-field { min-width: calc(var(--sidebar-collapsed) * 2.5); }
.o-querybar__go { display: flex; gap: var(--sp-2); }

/* Intelligence: findings and actions as a numbered list, each with why it ranks where it does. */
.o-brief { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.o-brief__item { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); }
.o-brief__item + .o-brief__item { border-top: 1px solid var(--border); }
.o-brief__title { font: var(--type-body); }
.o-brief__why { font: var(--type-small); color: var(--text-muted); margin-top: var(--sp-1); }
.o-ask { margin-bottom: var(--sp-6); padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.o-ask__q { flex: 1; min-width: calc(var(--sidebar-expanded) * 1.2); }
.o-ask__answer { margin-top: var(--sp-3); font: var(--type-body); white-space: pre-wrap; }

/* Roles: permissions in their groups, as columns of checkboxes. */
.o-perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--property-label-w) * 1.6), 1fr)); gap: var(--sp-4); }
.o-perm-group { margin: 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); display: grid; gap: var(--sp-2); align-content: start; align-self: start; }
/* A read-only permission: a tick or a dash, not a control that refuses to be operated (6.4). */
.o-permrow { display: flex; align-items: center; gap: var(--sp-2); font: var(--type-body); color: var(--text-muted); }
.o-permrow.is-on { color: var(--text); }
.o-permrow__mark { width: var(--icon-sm); text-align: center; color: var(--text-muted); }
.o-permrow.is-on .o-permrow__mark { color: var(--brand-strong); font-weight: var(--fw-semibold); }

.o-perm-group legend { padding: 0 var(--sp-1); font: var(--type-label); font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.o-gates--card { padding: var(--sp-2) var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); gap: 0; }
.o-gates--card .o-gate { padding: var(--sp-3) 0; }
.o-gates--card .o-gate + .o-gate { border-top: 1px solid var(--border); }
.o-gate--warn .o-icon { color: var(--warning); }

/* The online store: a logo well, and one card per branch. */
.o-sf-logo { width: var(--control-lg); height: var(--control-lg); border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--surface-subtle) center/cover no-repeat; flex: none; }
.o-sf-branch + .o-sf-branch { margin-top: var(--sp-6); }
/* A map is a canvas, not a card: it takes the width it is given and a workable height. */
.o-map { height: 56vh; min-height: calc(var(--control-lg) * 6); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--sp-3); }


/* THE WEEK AS A WEEK (6.40). One row a day, the whole cycle visible, and the detail a tap away —
   a schedule is a repeating shape, and a flat list of forty fields hides the shape it is. */
.sch-week { display: grid; gap: var(--sp-1); }
.sch-day { display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  min-height: 44px; padding: var(--sp-2) var(--sp-3); text-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text); font: var(--type-body); cursor: pointer; }
.sch-day:hover { border-color: var(--brand); }
/* The name column is fixed so the days line up as a column of days rather than as ragged text. */
.sch-day__name { flex: 0 0 4.5em; font-weight: var(--fw-semibold); }
.sch-day__detail { flex: 1 1 auto; min-width: 0; font: var(--type-small); color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-day__hours { flex: 0 0 auto; font: var(--type-small); color: var(--text); }
.sch-day__go { flex: 0 0 auto; color: var(--text-muted); }
[dir="rtl"] .sch-day__go { transform: scaleX(-1); }
.sch-total { display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--sp-3) var(--sp-3) 0; font: var(--type-small); color: var(--text-muted); }

/* The palette (6.77) — one place to type a name.
   Fixed rather than centred in a flex parent: it sits above every screen, and a screen that
   happens to be scrolled must not move it. Every value is a token — the scrim is mixed the same
   way the drawer's is, so the two agree in both appearances without either naming a colour. */
.o-pal { position: fixed; inset: 0; z-index: var(--z-sheet);
  background: color-mix(in srgb, var(--inverse-surface) 40%, transparent);
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(var(--sp-6) + env(safe-area-inset-top, 0px)) var(--sp-4)
           calc(var(--sp-4) + var(--kb)); }
.o-pal__box { width: min(var(--dialog-md, 640px), 100%); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--elev-3); overflow: hidden; }
.o-pal__input { width: 100%; box-sizing: border-box; border: 0; outline: 0;
  padding: var(--sp-4); font: var(--type-section); background: transparent; color: inherit;
  border-bottom: 1px solid var(--border); }
.o-pal__list { max-height: min(60vh, 420px); overflow-y: auto; }
.o-pal__group { padding: var(--sp-2) var(--sp-4) var(--sp-1);
  font: var(--type-caption); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.o-pal__row { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1);
  width: 100%; text-align: start; border: 0; background: transparent; color: inherit; cursor: pointer;
  padding: var(--sp-2) var(--sp-4); }
.o-pal__row.is-active, .o-pal__row:hover { background: var(--surface-2); }
.o-pal__title { font-weight: 600; }
.o-pal__sub { font: var(--type-caption); color: var(--text-muted); }
.o-pal__empty { padding: var(--sp-4); color: var(--text-muted); }

/* Home's all-clear (6.78). A line that says nothing is waiting, rather than a gap that could
   equally mean the call failed. */
.o-needs__clear { display: flex; align-items: center; gap: var(--sp-2); margin: 0;
  padding: var(--sp-2) 0; color: var(--text-muted); font: var(--type-body); }
.o-needs__figures { margin-top: var(--sp-6); }

/* A value that is shown rather than edited (6.82). */
.o-oe__readonly { margin: 0; font: var(--type-body); color: var(--text); }
/* 9.99.2: a choice of many in the object editor — a list that scrolls, each row a full-height touch target. */
.o-oe__multi { display: flex; flex-direction: column; gap: var(--sp-2); }
.o-oe__multilist { max-block-size: 14rem; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-1) var(--sp-2); }
.o-oe__multiitem { display: flex; align-items: center; gap: var(--sp-2); min-block-size: 44px; font: var(--type-body); color: var(--text); cursor: pointer; }
.o-oe__multiitem[hidden] { display: none; }

/* THE TWO COLUMNS A GRID ADDS ITSELF (6.89).
   `dataGrid` emits a `<col>` for the checkbox column and one for the row menu, and neither had a
   rule — so both were sized by content, and a grid whose first row had no menu drew its action
   column two pixels wide while the next page drew it thirty. A `<col>` exists to carry a width;
   these carry one. */
.o-grid__selcol { width: var(--sp-12); }
.o-grid__actcol { width: var(--sp-12); }

/* The record's section selector on a phone (6.98). Sticky, because it is how somebody moves
   between sections and a long section should not make them scroll back up to leave it. */
/* Below the shell's own sticky bar (8.00): `--app-bar` is its measured height, set by the shell
   that has one — the admin — and absent elsewhere, where the safe area is the edge. */
.o-secsel { position: sticky; top: var(--app-bar, env(safe-area-inset-top, 0px)); z-index: var(--z-sticky);
  display: flex; align-items: baseline; gap: var(--sp-2); width: 100%;
  padding: var(--sp-3) var(--sp-4); border: 0; border-block: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; text-align: start; }
.o-secsel__label { font: var(--type-section); }
/* INSIDE THE EDIT PANEL (8.25). The panel covers the page, top bar included, and scrolls on its
   own; the page's bar offset put the selector 60px down the panel, over the Name field. */
.o-editpanel .o-secsel, .o-drawer .o-secsel { top: 0; }
.o-secsel__sum { font: var(--type-caption); color: var(--text-muted); }
.o-secsel .o-icon { margin-inline-start: auto; color: var(--text-muted); }

/* Overview blocks (6.99). Four zones in one stack — identity, facts, what needs somebody, what
   happened. Spacing is the only thing separating them: a border between every group turns an
   Overview into a form. */
.o-ovw { display: grid; gap: var(--sp-6); }
.o-mg__row { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6); padding: var(--sp-2) 0; }
.o-mg__item { display: flex; flex-direction: column; min-width: 0; }
.o-mg__val { font: var(--type-kpi); color: var(--text); }
.o-mg__lab { font: var(--type-caption); color: var(--text-muted); }
/* Stated once for the group rather than beside every figure, which would turn a glance into
   reading. */
.o-mg__asof { margin: 0; font: var(--type-caption); color: var(--text-muted); }
.o-att__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.o-att__item { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border); }
.o-att__item:last-child { border-bottom: 0; }
.o-att__item .o-icon { flex: 0 0 auto; }
.o-att__item--warn .o-icon { color: var(--warning); }
.o-att__item--danger .o-icon { color: var(--danger-text); }
.o-att__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.o-att--clear { display: flex; align-items: center; gap: var(--sp-2);
  color: var(--text-muted); font: var(--type-body); }

/* Severity is never colour alone (7.00) — each level carries its own word, and the colour only
   reinforces it. */
.o-att__lvl { font: var(--type-caption); text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); }
.o-att__item--info .o-icon { color: var(--text-muted); }
.o-att__item--warning .o-icon { color: var(--warning); }
.o-att__item--critical .o-icon { color: var(--danger-text); }
.o-att__item--critical .o-att__lvl { color: var(--danger-text); }

/* An editable cell (7.17). Looks like the cell it replaces until somebody touches it — a grid of
   visible input boxes reads as a form, and this is still a list. */
.o-cellinput { width: 100%; box-sizing: border-box; border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: var(--sp-1) var(--sp-2);
  background: transparent; color: inherit; font: inherit; }
.o-cellinput:hover { border-color: var(--border); }
.o-cellinput:focus { border-color: var(--brand); background: var(--surface); outline: none; }
.o-cellinput:disabled { opacity: .6; }
.o-grid__num .o-cellinput { text-align: right; }

/* A menu entry that explains itself (7.20). */
.o-menu__text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.o-menu__detail { font: var(--type-caption); color: var(--text-muted); white-space: normal; }

/* ---- The record as its own editor (7.99) ----
 * The fields sit where the record's facts sat. The footer belongs to the whole record and sticks
 * to the bottom of the page, clear of the home indicator and of the keyboard (`--kb`, 7.02). */
.o-recedit { max-inline-size: 40rem; }
.o-recedit + .o-recextra:not(:empty) { margin-block-start: var(--sp-6); }
.o-recbar { position: sticky; inset-block-end: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  margin-block-start: var(--sp-4); padding: var(--sp-3) var(--sp-4);
  padding-block-end: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px) + var(--kb, 0px));
  background: var(--surface-raised); border-block-start: 1px solid var(--border); }
.o-recbar[hidden], .o-recbar .o-btn[hidden] { display: none; }
.o-recbar__count { flex: 1 1 auto; min-width: 0; font: var(--type-small); color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A phone: the count on its own line, the two actions sharing the next — never one button left
   alone on a line of its own. */
@media (max-width: 480px) {
  .o-recbar__count { flex-basis: 100%; }
  .o-recbar .o-btn { flex: 1 1 0; }
}
/* A FOCUSED FIELD LANDS CLEAR OF WHAT STICKS (8.00). The browser scrolls a focused field into
   view against the viewport, not against the bars drawn over it — so a field could come to rest
   under the section selector at the top, or under the record's footer (and the keyboard) at the
   bottom. Scroll padding tells it where the visible part actually is. */
html:has(.o-secsel) { scroll-padding-block-start: calc(var(--app-bar, 0px) + var(--row-touch) + var(--sp-2)); }
html:has(.o-recbar:not([hidden])) { scroll-padding-block-end: calc(var(--control-lg) * 2 + var(--kb, 0px)); }
/* The record's picture as a button (8.03): the same tile, a pointer, and a small upload mark in its
   corner so it reads as something to tap, not only something to look at. */
.o-rechead__media--action { position: relative; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.o-rechead__media--action:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.o-rechead__mediahint { position: absolute; inset-block-end: var(--sp-1); inset-inline-end: var(--sp-1);
  display: inline-flex; padding: var(--sp-1); border-radius: var(--radius-sm); background: var(--surface-raised);
  color: var(--text-muted); box-shadow: var(--elev-1); }

/* Set-up instructions (8.12): numbered, one under another, each with its command or button. */
.o-howto { list-style: none; margin: 0 0 var(--sp-4); padding: 0; counter-reset: howto; display: grid; gap: var(--sp-3); }
.o-howto > li { counter-increment: howto; display: grid; grid-template-columns: var(--icon-md) minmax(0, 1fr); gap: var(--sp-2); align-items: start; }
.o-howto > li::before { content: counter(howto); display: inline-grid; place-items: center; inline-size: var(--icon-md); block-size: var(--icon-md);
  border-radius: var(--radius-pill); background: var(--accent-subtle); color: var(--accent); font: var(--type-small); font-weight: var(--fw-semibold); }
.o-howto .o-cluster { margin-block-start: var(--sp-2); }
.o-code { margin: var(--sp-2) 0 0; padding: var(--sp-2) var(--sp-3); overflow-x: auto; border-radius: var(--radius-sm);
  background: var(--surface-subtle); border: 1px solid var(--border); font: var(--type-small); font-family: var(--font-mono); white-space: pre; }

/* Two things side by side that are compared — pre-production and production (8.14). Stacks on a phone. */
.o-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--sp-4); margin-block-end: var(--sp-4); }
.o-card { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-raised); }

/* 8.82: a printed document (the partner statement) — its own page in a frame, read on paper or as a PDF:
   the type and spacing tokens, no colour beyond the ink. */
.o-printdoc { font: var(--type-caption); margin: var(--sp-6); }
.o-printdoc h1 { font: var(--type-page); margin: 0 0 var(--sp-1); }
.o-printdoc h2 { font: var(--type-section); margin: var(--sp-4) 0 var(--sp-2); }
.o-printdoc p { margin: var(--sp-1) 0; }
.o-printdoc table { width: 100%; border-collapse: collapse; }
.o-printdoc th, .o-printdoc td { border-bottom: 1px solid; padding: var(--sp-1) var(--sp-2); text-align: start; }
.o-printdoc .n { text-align: end; }
.o-printdoc .t td { font-weight: 600; }

/* 8.85: sections a screen places below its list (the Real Estate overview) — kept clear of the grid above. */
.o-below-list { margin-top: var(--sp-8); }

/* 9.99.2 (QA 9.90.3 P2 — 23 of 129 pages overflowed at 390px, 32 at 360px; controls clipped). THE PAGE NEVER SCROLLS
   SIDEWAYS ON A PHONE: whatever is wider than the screen scrolls inside its own box, and nothing in a flex row
   refuses to shrink. One set of rules for every screen, old and new — not a fix per page. */
@media (max-width: 760px) {
  #content, .admincard, .o-stack, .o-field, .erow > *, .o-wshead, .o-wshead__top, .o-wshead__titles, .o-rechead, .o-rechead__titles, .o-recbody, .o-props, .o-drawer__body { min-inline-size: 0; }
  #content img, #content video, #content canvas, #content iframe, #content pre { max-inline-size: 100%; }
  #content input, #content select, #content textarea, .o-input, .o-select, .o-textarea { max-inline-size: 100%; }
  #content table:not(.o-grid table) { display: block; max-inline-size: 100%; overflow-x: auto; }
  #content pre, #content code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .erow, .o-drawer__foot, .o-wshead__top, .o-wshead__primary, .o-recbar, .o-rechead__actions { flex-wrap: wrap; }
  .o-drawer__foot .o-btn { flex: 1 1 auto; }
  .o-quickviews, .o-tabs { max-inline-size: 100%; overflow-x: auto; }
  /* A long title ("Journal · 2026-10") takes the whole line and wraps; its actions go below it, never beside it squeezed. */
  .o-wshead__titles, .o-rechead__titles { flex: 1 1 100%; }
  .o-wshead__title, .o-rechead__title { overflow-wrap: anywhere; }
}

/* 10.77.0 — the social calendar: a month, week or day of posts, each a chip that can be dragged to another day. */
.o-socal__bar { flex-wrap: wrap; gap: var(--sp-2); }
.o-socal__title { font: var(--type-section); }
.o-socal__head, .o-socal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.o-socal__head > div { font: var(--type-label); color: var(--text-muted); padding: var(--sp-1) var(--sp-2); }
.o-socal__grid { background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.o-socal__grid--day { grid-template-columns: minmax(0, 1fr); }
.o-socal__day { background: var(--surface); min-height: calc(var(--control-lg) * 2.5); padding: var(--sp-1); display: flex; flex-direction: column; gap: var(--sp-1); }
.o-socal__grid--week .o-socal__day, .o-socal__grid--day .o-socal__day { min-height: calc(var(--control-lg) * 8); }
.o-socal__day--out { background: var(--surface-subtle); }
.o-socal__day--today .o-socal__num { color: var(--brand-strong); font-weight: var(--fw-semibold); }
.o-socal__day--drop { background: var(--accent-subtle); }
.o-socal__num { font: var(--type-caption); color: var(--text-muted); }
.o-socal__add { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0 var(--sp-1); border-radius: var(--radius-sm);
  min-inline-size: var(--sp-6); min-block-size: var(--sp-6); }   /* 11.43.0 (DW4, measured): a day's "new post" was a 16 px target on a phone */
.o-socal__add:is(:hover, :focus-visible) { background: var(--accent-subtle); outline: none; }
.o-socal__chip { display: block; width: 100%; text-align: start; border: 1px solid var(--border); border-inline-start: 3px solid var(--status-neutral); background: var(--surface-raised);
  border-radius: var(--radius-sm); padding: var(--sp-1) var(--sp-2); font: var(--type-caption); color: var(--text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-socal__chip[draggable="true"] { cursor: grab; }
.o-socal__chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.o-socal__chip--scheduled, .o-socal__chip--approved, .o-socal__chip--publishing { border-inline-start-color: var(--info); }
.o-socal__chip--awaiting_approval, .o-socal__chip--partially_published { border-inline-start-color: var(--warning); }
.o-socal__chip--published { border-inline-start-color: var(--success); }
.o-socal__chip--failed { border-inline-start-color: var(--danger); }
.o-socal__chip--cancelled { text-decoration: line-through; color: var(--text-muted); }
.o-socal__time { font-variant-numeric: var(--num-figures); color: var(--text-muted); }
.o-socal__nets { display: block; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.o-socal__row { cursor: pointer; }
.o-socal__accts { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); display: grid; gap: var(--sp-1); }
.o-socal__accts legend { font: var(--type-label); color: var(--text-muted); padding: 0 var(--sp-1); }
.o-socal__variants summary { cursor: pointer; font: var(--type-body-strong); }
/* 10.84.0: each network's own words and images, set apart from the next network's. */
.o-socal__variants [data-vnet] { border-top: 1px solid var(--border); padding-top: var(--sp-3); margin-top: var(--sp-3); }
.o-socal__problems { border: 1px solid var(--warning); background: var(--surface-subtle); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); font: var(--type-small); }
.o-socal__problems ul { margin: var(--sp-1) 0 0; padding-inline-start: var(--sp-4); }
.o-socal__sub { font: var(--type-card); margin: var(--sp-4) 0 var(--sp-2); }
.o-socal__dl { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.o-socal__rule { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-3); display: grid; gap: var(--sp-2); }
.o-socal__settings { max-width: var(--width-settings); }
.o-socq__text { white-space: pre-wrap; font: var(--type-small); background: var(--surface-subtle); border-radius: var(--radius-sm); padding: var(--sp-2); margin-top: var(--sp-1); max-width: 60ch; }
/* 10.84.0: the images or video a person posting by hand opens, for that network. */
.o-socq__media { font: var(--type-small); margin-top: var(--sp-1); }
/* 10.85.0: the social inbox — a comment's words in the list, its thread, accounts that cannot be read. */
.o-socin__text { white-space: pre-wrap; font: var(--type-small); margin-top: var(--sp-1); max-width: 60ch; }
.o-socin__thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.o-socin__msg { padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); background: var(--surface-subtle); max-width: 90%; }
.o-socin__msg--own { margin-inline-start: auto; border: 1px solid var(--border); background: transparent; }
.o-socin__msg--this { outline: 2px solid var(--border-strong); }
.o-socin__who { font: var(--type-small); }
.o-socin__body { white-space: pre-wrap; margin-top: var(--sp-1); }
.o-socin__blocked { font: var(--type-small); margin: 0 0 var(--sp-3); padding-inline-start: var(--sp-4); }
.o-socin__found { list-style: none; margin: 0; padding: 0; }
/* 10.86.0: direct messages — a conversation not yet opened, what came with a message, a thread that scrolls. */
.o-socin__unread { font-weight: var(--fw-semibold); }
.o-socin__att { font: var(--type-small); margin-top: var(--sp-1); }
.o-socin__thread--scroll { max-height: 50vh; overflow-y: auto; }
.o-socal__ttpreview { display: flex; flex-wrap: wrap; gap: var(--sp-1); align-items: flex-start; }
.o-socal__ttpreview .o-socq__text, .o-socal__ttpreview .hint { flex-basis: 100%; }
.o-socal__ttpreview img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
@media (max-width: 720px) {
  .o-socal__head { display: none; }
  .o-socal__grid { grid-template-columns: minmax(0, 1fr); }
  .o-socal__day--out { display: none; }
  .o-socal__day { min-height: 0; }
}
.o-socal__bar .o-select { width: auto; max-width: 100%; }
/* 10.91.0: opening stock — a table that scrolls sideways on a phone rather than pushing the page; a lot's figure and
   its own small group in the lots drawer. */
.o-op__wrap { max-inline-size: 100%; overflow-x: auto; }
.o-op td { vertical-align: top; }
.o-op .o-input, .o-op .o-select { min-inline-size: 8ch; }
.o-op__lotsum { display: inline-block; padding-block: var(--sp-2); font-variant-numeric: var(--num-figures); }
.o-op__lot { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-3); margin: 0; display: grid; gap: var(--sp-2); }
.o-op__lot legend { font: var(--type-label); padding-inline: var(--sp-1); }
/* 10.91.0: on a phone the opening table stacks (primitives.css) — the on-hand figure keeps its own left-to-right run, and
   its column name sits on the reading side in Arabic, not on the far side of the number. */
@media (max-width: 720px) {
  .o-op td.num { direction: inherit; text-align: start; }
}

/* 10.92.0: an email address or a phone number is Latin text in either language. In Arabic the box took the page's
   direction, so "qa@" was drawn "@qa" and "+966 50…" with the plus at the far end. It reads left to right now, still
   aligned to the start of an Arabic form. */
/* 11.82.2 (ORVIA-003 sweep): and every phone or email typed into a field marked so only by its keyboard (inputmode) or autofill */
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[inputmode="tel"], [dir="rtl"] input[inputmode="email"], [dir="rtl"] input[autocomplete="tel"], [dir="rtl"] input[autocomplete="email"] { direction: ltr; text-align: right; unicode-bidi: isolate; }

/* 11.14.0 — A LABEL-AND-FIGURE ROW in a drawer or a card: the label at the start, the figure at the end. About two hundred
   such rows (`<div class="row"><span>label</span><span>figure</span></div>`) across the finance, HR, real estate and
   promotion screens had no style at all, so the figure ran into its label ("Revenue2,007,999.05", "2026-10-3196.77"). */
.o-drawer .row, .o-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; padding-block: 2px; }
.o-drawer .row > :last-child:not(:first-child), .o-card .row > :last-child:not(:first-child) { margin-inline-start: auto; text-align: end; }

/* ------------------------------------------------------------------ the Modern Workspace (11.41.0, DW2)
 * Tiles drawn from the application registry; the same applications as the menu. In workspace mode the sidebar steps
 * aside on wide screens (the home is the way round); on a phone the drawer is still there behind the menu button. */
.btn.hdr-icon { width: auto; flex: 0 0 auto; padding: var(--sp-2); margin-inline-end: var(--sp-2); display: inline-flex; align-items: center; }
.btn.hdr-icon[hidden] { display: none; }
@media (min-width: 900px) { body.ws-mode #side { display: none; } }
/* 11.46.0 (WS2): THE WORKSPACE HOME of the approved Design Pack r2 — a greeting with the context it reads; My Work as
 * action cards (most urgent first, the urgency in words as well as colour); my applications as tiles with a solid domain
 * colour and a white glyph; new suggestions to add or dismiss; recently used; insights from the reports. Phone: one
 * column of cards, three tiles a row, and a bottom bar. Every value a token; RTL by logical properties. */
.ws-home { --ws-gap: var(--sp-8); display: flex; flex-direction: column; gap: var(--ws-gap); padding-block-end: var(--sp-6); }
.ws-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); }
.ws-hero__text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.ws-hello { margin: 0; font-size: var(--fs-kpi); line-height: var(--lh-tight); font-weight: var(--fw-bold); letter-spacing: -0.01em; }
.ws-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font: var(--type-small); color: var(--text-muted); }
.ws-scope { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--control-sm); padding: 0 var(--sp-3); border-radius: var(--radius-pill); background: var(--brand-soft); color: var(--brand-strong);
  border: 0; font: var(--type-small); font-weight: var(--fw-semibold); cursor: pointer; }
.ws-scope[data-all="true"] { background: color-mix(in srgb, var(--warning) 18%, var(--surface)); color: var(--warning-text); }
.ws-scope[disabled] { cursor: default; }
.ws-scope .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
.ws-scope:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ws-hero__acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ws-sec { display: flex; flex-direction: column; gap: var(--sp-3); margin: 0; }
.ws-sec__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.ws-sec__title { font-size: var(--fs-heading); font-weight: var(--fw-bold); margin: 0; }
.ws-sec__title--small { font-size: var(--fs-small); color: var(--text-muted); }
.ws-sec__note, .ws-from { font: var(--type-small); color: var(--text-muted); }
.ws-sec__link { margin-inline-start: auto; font: var(--type-card); color: var(--brand-strong); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; }
.ws-sec__link:hover { text-decoration: underline; }
.ws-find { min-width: 220px; flex: 1 1 260px; max-width: 420px; }
/* My Work cards */
.ws-work { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.ws-card { position: relative; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); border-radius: var(--radius-lg); border: 1px solid var(--border);
  border-inline-start: 4px solid var(--brand); background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; }
.ws-card:hover { border-color: var(--border-strong); }
.ws-card:focus-visible, .ws-tile2:focus-visible, .ws-chip:focus-visible, .ws-wg__open:focus-visible, .ws-row:focus-visible, .ws-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ws-card[data-urgency="blocking"] { border-inline-start-color: var(--danger); }
.ws-card[data-urgency="attention"] { border-inline-start-color: var(--warning); }
.ws-card__urg { font: var(--type-label); font-weight: var(--fw-bold); color: var(--brand-strong); }
.ws-card[data-urgency="blocking"] .ws-card__urg { color: var(--danger-text); }
.ws-card[data-urgency="attention"] .ws-card__urg { color: var(--warning-text); }
.ws-card__main { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; }
.ws-card__n { font-size: var(--fs-kpi); line-height: 1; font-weight: var(--fw-bold); font-variant-numeric: var(--num-figures); }
.ws-card__label { font: var(--type-card); font-size: var(--fs-body); }
.ws-card__cta { display: flex; align-items: center; gap: var(--sp-1); font: var(--type-small); font-weight: var(--fw-semibold); color: var(--brand-strong); }
.ws-card__cta .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
.ws-calm { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--radius-lg); border: 1px dashed var(--border-strong); color: var(--text-muted); }
/* Application tiles */
.ws-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-3); }
.ws-tiles--auto { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ws-tile { position: relative; display: flex; min-width: 0; }
.ws-tile2 { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); min-height: var(--ws-tile-h); box-sizing: border-box; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--elev-1); }
.ws-tile2:hover { border-color: var(--brand); }
.ws-tile--ro .ws-tile2 { opacity: .8; }
.ws-tile--more .ws-tile2 { border-style: dashed; border-color: var(--border-strong); background: transparent; box-shadow: var(--elev-0); color: var(--brand-strong); }
.ws-glyph { flex: none; width: var(--ws-glyph); height: var(--ws-glyph); border-radius: var(--radius-md); background: var(--dom, var(--dom-neutral)); color: var(--on-dom); display: flex; align-items: center; justify-content: center; }
.ws-glyph .o-icon { width: var(--icon-lg); height: var(--icon-lg); }
.ws-tile--more .ws-glyph { background: var(--brand-soft); color: var(--brand-strong); }
.ws-tile__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-tile__label { font: var(--type-card); font-size: var(--fs-body); overflow-wrap: anywhere; }
.ws-tile__where { font: var(--type-caption); color: var(--text-muted); }
.ws-tile__count { position: absolute; inset-block-start: var(--sp-2); inset-inline-end: var(--sp-2); min-width: var(--ws-glyph-xs); height: var(--ws-glyph-xs); padding: 0 var(--sp-1); box-sizing: border-box; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text); font: var(--type-label); font-weight: var(--fw-bold); display: flex; align-items: center; justify-content: center; }
.ws-tile__count[data-tone="attention"], .ws-tile__count[data-tone="blocking"] { background: var(--brand); color: var(--on-brand); }
.ws-tile__lock { position: absolute; inset-block-end: var(--sp-2); inset-inline-end: var(--sp-2); display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-micro); color: var(--text-muted); }
.ws-tile__lock .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
.ws-tile__edit { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2); }
.ws-act { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-1); color: var(--text-muted); cursor: pointer; display: inline-flex; min-width: var(--control-sm); min-height: var(--control-sm); align-items: center; justify-content: center; }
.ws-act[aria-pressed="true"] { color: var(--brand-strong); border-color: var(--brand); }
/* New suggestions */
.ws-suggest { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ws-sug { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-2); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); }
.ws-sug .ws-glyph { width: var(--ws-glyph-sm); height: var(--ws-glyph-sm); border-radius: var(--radius-sm); }
.ws-sug .ws-glyph .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
.ws-sug__label { font: var(--type-card); }
/* Recently used */
.ws-recent { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ws-chip { flex: none; min-height: var(--control-md); display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: var(--type-body); text-decoration: none; }
.ws-chip .ws-glyph { width: var(--ws-glyph-xs); height: var(--ws-glyph-xs); border-radius: var(--radius-sm); }
.ws-chip .ws-glyph .o-icon { width: var(--fs-caption); height: var(--fs-caption); }
/* Insights */
.ws-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.ws-wg { padding: var(--sp-4); border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; min-height: var(--ws-widget-h); box-sizing: border-box; }
.ws-wg__head { display: flex; align-items: center; gap: var(--sp-2); }
.ws-wg__title { font: var(--type-card); font-size: var(--fs-small); margin: 0; }
.ws-wg__scope { margin-inline-start: auto; font-size: var(--fs-micro); color: var(--text-muted); text-align: end; }
.ws-wg__body { flex: 1; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.ws-wg__fig { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-2); }
.ws-wg__value { font-size: var(--fs-page); font-weight: var(--fw-bold); font-variant-numeric: var(--num-figures); }
.ws-wg__delta { font: var(--type-label); font-weight: var(--fw-semibold); }
.ws-wg__delta[data-dir="up"] { color: var(--success-text); }
.ws-wg__delta[data-dir="down"] { color: var(--danger-text); }
.ws-wg__note { font: var(--type-caption); color: var(--text-muted); }
.ws-spark { width: 100%; height: var(--ws-spark-h); direction: ltr; display: block; }
.ws-spark__area { fill: var(--brand-soft); }
.ws-spark__now { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ws-spark__then { fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.ws-bands { display: flex; height: var(--sp-3); border-radius: var(--radius-sm); overflow: hidden; gap: 2px; direction: ltr; background: var(--surface-2); }
.ws-bands span { min-width: 2px; }
.ws-bands__legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-1); }
.ws-band { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ws-band__label { display: flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-micro); color: var(--text-muted); }
.ws-band__label i, .ws-row__dot { width: var(--sp-2); height: var(--sp-2); border-radius: var(--radius-sm); flex: none; }
.ws-band__amt { font: var(--type-label); font-weight: var(--fw-semibold); font-variant-numeric: var(--num-figures); overflow-wrap: anywhere; }
.ws-b0 { background: var(--info); } .ws-b1 { background: var(--warning); } .ws-b2 { background: var(--danger); } .ws-b3 { background: var(--danger-text); } .ws-b4 { background: var(--text); }
.ws-rows { display: flex; flex-direction: column; }
.ws-row { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; font: var(--type-small); }
.ws-row:hover .ws-row__label { text-decoration: underline; }
.ws-row__dot { border-radius: var(--radius-pill); background: var(--info); }
.ws-row__dot[data-tone="critical"] { background: var(--danger); }
.ws-row__dot[data-tone="warning"] { background: var(--warning); }
.ws-row__label { flex: 1 1 auto; min-width: 0; }
.ws-row__value { font-weight: var(--fw-semibold); font-variant-numeric: var(--num-figures); }
.ws-wg__foot { display: flex; align-items: center; gap: var(--sp-1); font: var(--type-caption); color: var(--text-muted); border-top: 1px solid var(--line); padding-top: var(--sp-2); }
.ws-wg__open { margin-inline-start: auto; color: var(--brand-strong); font-weight: var(--fw-semibold); text-decoration: none; }
.ws-wg__state { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--sp-2); color: var(--text-muted); font: var(--type-small); }
.ws-skel { display: block; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: ws-shimmer 1.2s linear infinite; }
.ws-skel--hero { width: min(280px, 80%); height: var(--fs-display); } .ws-skel--card { height: calc(var(--ws-tile-h) + var(--sp-8)); }
.ws-skel--fig { width: 50%; height: var(--fs-kpi); } .ws-skel--spark { width: 100%; height: var(--ws-spark-h); } .ws-skel--band { width: 100%; height: var(--sp-3); } .ws-skel--row { width: 100%; height: var(--sp-8); }
.ws-hidden-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes ws-shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .ws-skel { animation: none; } }
/* Domain identity — the tokens of tokens.css, one per business domain. */
.ws-dom-home, .ws-dom-administration, .ws-dom-configuration { --dom: var(--dom-neutral); }
.ws-dom-sales { --dom: var(--dom-sales); } .ws-dom-purchasing { --dom: var(--dom-purchasing); } .ws-dom-inventory { --dom: var(--dom-inventory); }
.ws-dom-finance { --dom: var(--dom-finance); } .ws-dom-people { --dom: var(--dom-people); } .ws-dom-insights { --dom: var(--dom-insights); }
.ws-dom-operations { --dom: var(--dom-operations); } .ws-dom-service { --dom: var(--dom-service); } .ws-dom-club { --dom: var(--dom-club); }
.ws-dom-hospitality { --dom: var(--dom-hospitality); } .ws-dom-realestate { --dom: var(--dom-realestate); } .ws-dom-signagedomain { --dom: var(--dom-signage); } .ws-dom-integrations { --dom: var(--dom-integrations); }
/* The phone's bottom bar (workspace mode only) */
.ws-tabbar { display: none; }
@media (max-width: 1100px) { .ws-work { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ws-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ws-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ws-home { --ws-gap: var(--sp-6); }
  .ws-hello { font-size: var(--fs-page); }
  .ws-work, .ws-insights { grid-template-columns: minmax(0, 1fr); }
  .ws-card { padding: var(--sp-3) var(--sp-4); }
  .ws-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
  .ws-tile2 { flex-direction: column; text-align: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-1); min-height: var(--ws-tile-h-phone); }
  .ws-tile__label { font-size: var(--fs-small); }
  .ws-tile__where, .ws-tile__lock span { display: none; }
  .ws-tile__lock { inset-block-end: auto; inset-inline-end: auto; inset-block-start: var(--sp-2); inset-inline-start: var(--sp-2); }
  .ws-recent { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ws-bands__legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.ws-mode .ws-tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-sticky);
    border-top: 1px solid var(--border); border-bottom: 0; background: var(--surface); padding: var(--sp-1) var(--sp-1) calc(var(--sp-2) + env(safe-area-inset-bottom)); }
  body.ws-mode #content { padding-block-end: var(--ws-tabbar-h); }
}
.ws-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); padding: var(--sp-1) 0; font-size: var(--fs-micro); font-weight: var(--fw-semibold); color: var(--text-muted); text-decoration: none; background: none; border: 0; font-family: inherit; cursor: pointer; min-height: var(--control-lg); }
.ws-tab[aria-current="page"] { color: var(--brand-strong); }
.ws-tab .o-icon { width: var(--icon-lg); height: var(--icon-lg); }
.ws-tab__n { position: absolute; inset-block-start: 2px; inset-inline-start: calc(50% + var(--sp-1)); min-width: var(--fs-heading); height: var(--fs-heading); padding: 0 var(--sp-1); box-sizing: border-box; border-radius: var(--radius-pill); background: var(--danger); color: var(--on-danger); font-size: var(--fs-micro); font-weight: var(--fw-bold); display: flex; align-items: center; justify-content: center; }
.ws-space { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-3); margin-bottom: var(--sp-3); background: var(--surface); }
.ws-space summary { cursor: pointer; font-weight: 600; }
.ws-page { margin-top: var(--sp-3); }
.ws-page__title { font: var(--type-small); color: var(--text-muted); text-transform: uppercase; margin-bottom: var(--sp-2); }
.ws-hidden { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ws-order { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) 0; border-bottom: 1px solid var(--border); }
.ws-order span { flex: 1; }
.ws-checks { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-2); }
.ws-check { display: flex; gap: var(--sp-2); align-items: center; padding: var(--sp-1) 0; }
.ws-check[hidden] { display: none; }

/* 11.42.0 (DW3): My Work — the totals that wait, one per currency (never added across currencies). */
.mw-totals { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: baseline; margin-block-end: var(--sp-2); }
.mw-total { font-variant-numeric: tabular-nums; }

/* 11.46.0 (WS3): THE WORKSPACE'S OWN SCREENS — Explorer, Personalise, Workspace defaults (Design Pack r2). A rail of
 * domains (roles) beside the content on a desktop, a row of chips above it on a tablet or a phone; a save bar that
 * stays in view and says how much is unsaved. Every value a token; right to left by logical properties. */
.ws-explorer, .ws-pers, .ws-defs { display: flex; flex-direction: column; gap: var(--sp-6); padding-block-end: var(--sp-16); }
.ws-xhead { display: flex; flex-direction: column; gap: var(--sp-1); }
.ws-xhead--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); }
.ws-back { display: inline-flex; align-items: center; gap: var(--sp-1); font: var(--type-card); color: var(--brand-strong); text-decoration: none; }
.ws-back .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
.ws-crumb { font: var(--type-small); color: var(--text-muted); }
.ws-xbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.ws-xfind { flex: 1 1 320px; min-width: 0; min-height: var(--control-lg); display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); border-radius: var(--radius-md);
  border: 2px solid var(--brand); background: var(--surface); color: var(--text-muted); }
.ws-xfind--sm { min-height: var(--control-md); border-width: 1px; border-color: var(--border-strong); flex-basis: auto; }
.ws-xfind input { border: 0; outline: 0; background: transparent; font: var(--type-body); font-size: var(--fs-section); color: var(--text); flex: 1 1 auto; min-width: 0; }
.ws-xfind:focus-within { box-shadow: var(--focus-ring); }
.ws-xfind .o-icon { width: var(--icon-md); height: var(--icon-md); flex: none; }
.ws-xfound { font: var(--type-small); white-space: nowrap; }
.ws-seg { display: inline-flex; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 2px; background: var(--surface-2); }
.ws-seg__b { min-height: var(--control-sm); padding: 0 var(--sp-3); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); font: var(--type-label); font-weight: var(--fw-semibold); cursor: pointer; display: inline-flex; align-items: center; gap: var(--sp-1); }
.ws-seg__b[aria-pressed="true"], .ws-seg__b[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--elev-1); }
.ws-seg__b:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ws-xbody, .ws-defs__body { display: flex; gap: var(--sp-6); align-items: flex-start; }
.ws-rail { flex: 0 0 230px; display: flex; flex-direction: column; gap: 2px; background: none; padding: 0; border: 0; position: sticky; inset-block-start: var(--sp-4); z-index: var(--z-base); }
.ws-rail__i { min-height: var(--control-md); display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); border-radius: var(--radius-md); color: var(--text); text-decoration: none; font: var(--type-body); white-space: nowrap; }
.ws-rail__i span { margin-inline-start: auto; font: var(--type-caption); color: var(--text-muted); }
.ws-rail__i:hover { background: var(--surface-2); }
.ws-rail__i[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); font-weight: var(--fw-bold); }
.ws-rail__i:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ws-dot { width: var(--sp-2); height: var(--sp-2); border-radius: var(--radius-sm); background: var(--dom, var(--text-muted)); flex: none; }
.ws-dot--warn { background: var(--warning); border-radius: var(--radius-pill); }
.ws-xgroups, .ws-defs__main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-6); }
.ws-xgroup { display: flex; flex-direction: column; gap: var(--sp-2); }
.ws-xgroup__h { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); font-size: var(--fs-section); font-weight: var(--fw-bold); }
.ws-glyph--sm { width: var(--ws-glyph-sm); height: var(--ws-glyph-sm); border-radius: var(--radius-sm); }
.ws-glyph--sm .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
.ws-glyph--xs { width: var(--ws-glyph-xs); height: var(--ws-glyph-xs); border-radius: var(--radius-sm); }
.ws-glyph--xs .o-icon { width: var(--fs-caption); height: var(--fs-caption); }
.ws-xgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.ws-xapp { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); min-width: 0; position: relative; }
.ws-xapp .ws-glyph { width: var(--control-md); height: var(--control-md); border-radius: var(--radius-md); }
.ws-xapp .ws-glyph .o-icon { width: var(--icon-md); height: var(--icon-md); }
.ws-xapp__go { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.ws-xapp__go:hover .ws-tile__label { text-decoration: underline; }
.ws-xapp__go:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.ws-xapp__lock { position: static; }
.ws-xapp__acts { display: flex; gap: 2px; flex: none; }
.ws-star { flex: none; width: var(--control-md); height: var(--control-md); border-radius: var(--radius-md); border: 0; background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ws-star:hover { background: var(--surface-2); color: var(--text); }
.ws-star[aria-pressed="true"] { color: var(--brand-strong); background: var(--brand-soft); }
.ws-star:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ws-star .o-icon { width: var(--icon-md); height: var(--icon-md); }
.ws-xact[hidden] { display: none; }
/* Personalise */
.ws-pers__body { display: flex; gap: var(--sp-6); align-items: flex-start; }
.ws-pers__main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.ws-pers__aside { flex: 0 0 340px; display: flex; flex-direction: column; gap: var(--sp-3); position: sticky; inset-block-start: var(--sp-4); z-index: var(--z-base); }
.ws-card2 { padding: var(--sp-4); border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.ws-radios { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ws-radio { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--control-md); padding: 0 var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; font: var(--type-body); }
.ws-radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ws-note { padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); background: color-mix(in srgb, var(--info) 12%, var(--surface)); color: var(--text); font: var(--type-small); border-inline-start: 3px solid var(--info); }
.ws-order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.ws-orow { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); }
.ws-orow--locked { background: var(--surface-2); }
.ws-orow--drag { opacity: .5; }
.ws-grip { color: var(--text-muted); cursor: grab; padding-inline: var(--sp-1); }
.ws-orow__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-orow__text b { font: var(--type-card); }
.ws-orow__text span { font: var(--type-caption); color: var(--text-muted); }
.ws-orow .ws-tile__lock { position: static; }
.ws-orow__acts { display: flex; gap: var(--sp-1); align-items: center; flex: none; }
.ws-act[disabled] { opacity: .4; cursor: default; }
.ws-unpin, .ws-unhide { flex: none; }
.ws-addapp { display: flex; flex-direction: column; gap: var(--sp-1); position: relative; }
.ws-addlist { list-style: none; margin: 0; padding: var(--sp-1); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--elev-2); display: flex; flex-direction: column; gap: 2px; }
.ws-addone { width: 100%; display: flex; align-items: center; gap: var(--sp-2); min-height: var(--control-md); padding: 0 var(--sp-2); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: var(--type-body); cursor: pointer; text-align: start; }
.ws-addone:hover, .ws-addone:focus-visible { background: var(--surface-2); outline: none; }
.ws-addone .ws-sec__note { margin-inline-start: auto; }
.ws-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.ws-check2 { display: flex; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; min-width: 0; }
.ws-check2 > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ws-check2 b { font: var(--type-card); }
.ws-check2:has(input:checked) { border-color: var(--brand); }
.ws-check2 input { margin-block-start: var(--sp-1); }
.ws-ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.ws-ladder li { display: flex; gap: var(--sp-2); align-items: flex-start; font: var(--type-small); }
.ws-ladder__n { flex: none; width: var(--ws-glyph-xs); height: var(--ws-glyph-xs); border-radius: var(--radius-pill); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font: var(--type-label); font-weight: var(--fw-bold); }
.ws-ladder--first .ws-ladder__n { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.ws-wide { width: 100%; justify-content: center; }
.ws-savebar { position: sticky; inset-block-end: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); margin-inline: calc(-1 * var(--sp-4));
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--elev-2); }
.ws-savebar__n { flex: 1 1 auto; display: inline-flex; align-items: center; gap: var(--sp-2); font: var(--type-small); color: var(--text-muted); }
/* Workspace defaults */
.ws-rail--roles { flex-basis: 220px; }
.ws-rolepick { display: none; }
.ws-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.ws-deftiles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.ws-deftile { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.ws-dkind .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
.ws-drm { flex: none; }
.ws-auditline { display: flex; align-items: center; gap: var(--sp-2); font: var(--type-small); color: var(--text-muted); }
.ws-auditline .o-icon { width: var(--icon-sm); height: var(--icon-sm); flex: none; }
.ws-preview { border-color: var(--brand); }
.ws-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); margin: 0; font: var(--type-small); }
.ws-dl dt { color: var(--text-muted); }
.ws-dl dd { margin: 0; }
.ws-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.ws-chips .ws-chip { min-height: var(--control-sm); font: var(--type-small); }
@media (max-width: 1100px) {
  .ws-xbody, .ws-defs__body, .ws-pers__body { flex-direction: column; align-items: stretch; }
  .ws-rail { position: static; flex: none; flex-direction: row; flex-wrap: wrap; gap: var(--sp-1); }
  .ws-rail__i { border: 1px solid var(--border); border-radius: var(--radius-pill); }
  .ws-rail__i span { padding-inline-start: var(--sp-2); }
  .ws-xgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-pers__aside { position: static; flex: none; }
}
@media (max-width: 640px) {
  .ws-rail { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ws-rail--roles { display: none; }
  .ws-rolepick { display: flex; }
  .ws-xgrid, .ws-checklist, .ws-pair { grid-template-columns: minmax(0, 1fr); }
  .ws-savebar { padding-inline: var(--sp-3); margin-inline: calc(-1 * var(--sp-3)); }
  body.ws-mode .ws-savebar { inset-block-end: var(--ws-tabbar-h); }
  .ws-savebar .o-btn { flex: 1 1 0; justify-content: center; }
  .ws-savebar__n { flex-basis: 100%; }
  .ws-savebar { flex-wrap: wrap; }
  .ws-orow__acts .ws-unpin { padding-inline: var(--sp-2); }
}
/* 11.46.0: THE HEADER AT TABLET WIDTH (721–1100 px). Between the phone's layout (identity and actions in the drawer's foot)
 * and a desktop's, the header carried the wordmark, both pickers (at least 16 characters each, 8.25), the workspace
 * buttons, the email address and three worded buttons in one row — on an 820 px tablet "Sign out" ran off the screen
 * (seen in 11.45.0's own tablet pictures). Here the email address steps aside (it is on the Security dialog) and Security
 * and Sign out keep their icon, their word staying as the button's name. */
#pwBtn, #logoutBtn { display: inline-flex; align-items: center; gap: var(--sp-1); }
#pwBtn .o-icon, #logoutBtn .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
@media (min-width: 721px) and (max-width: 1100px) {
  .admin-header .who { display: none; }
  .admin-header .hdr-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* The narrowest tablets: the wordmark keeps its mark and the bar's gaps close up. */
@media (min-width: 721px) and (max-width: 860px) {
  .admin-header { gap: var(--sp-1); }
  /* 11.72.0: the header's Search button (one navigation model) needs its room — the pickers give a little, still readable */
  .admin-header #companySel, .admin-header #branchSel { min-inline-size: 0; max-inline-size: calc(var(--sp-16) * 2); }
  .admin-header .brand { inline-size: var(--icon-lg); overflow: hidden; flex: none; }
  /* 12.10.0 chain: 12.00's life-buoy (Report an issue) took the last room — at 721 px "Exit" ran off the screen. The buttons'
     own end margins step aside; the bar's gap still parts them. */
  .admin-header .btn.hdr-icon, .admin-header #pwBtn, .admin-header #langBtn { margin-inline-end: 0 !important; }
}

/* 11.46.0 (WS4): MY WORK of Design Pack r2 — totals per currency, the views as tabs with counts, a list of requests and,
 * on a wide screen, the open request beside it (facts, "checked again", history, the buttons); on a phone or a narrow
 * tablet the request opens as a sheet over the list with its buttons at the foot. Every value a token. */
.mw2 { display: flex; flex-direction: column; gap: var(--sp-4); padding-block-end: var(--sp-8); }
.mw2-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); }
.mw2-totals { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.mw2-total { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); min-width: 180px; }
.mw2-total__n { font: var(--type-small); color: var(--text-muted); }
.mw2-total__amt { font-size: var(--fs-kpi-sm); font-weight: var(--fw-bold); font-variant-numeric: var(--num-figures); }
.mw2-tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.mw2-tab { flex: none; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--control-md); padding: 0 var(--sp-3); border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-muted); font: var(--type-card); cursor: pointer; }
.mw2-tab[aria-selected="true"] { color: var(--brand-strong); border-bottom-color: var(--brand); }
.mw2-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mw2-tab__n { min-width: var(--ws-glyph-xs); padding: 0 var(--sp-1); border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); font: var(--type-label); text-align: center; }
.mw2-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.mw2-bar .ws-xfind { flex: 1 1 260px; }
.mw2-co { flex: 0 1 260px; min-width: 0; }
.mw2-body { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.mw2-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.mw2-item { width: 100%; display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg); border: 1px solid var(--border); border-inline-start: 4px solid var(--brand);
  background: var(--surface); color: var(--text); text-align: start; cursor: pointer; font: var(--type-body); }
.mw2-item[data-edge="blocking"] { border-inline-start-color: var(--danger); }
.mw2-item[data-edge="attention"] { border-inline-start-color: var(--warning); }
.mw2-item[aria-current="true"] { border-color: var(--brand); box-shadow: var(--elev-1); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.mw2-item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mw2-item__top { display: flex; align-items: baseline; gap: var(--sp-2); }
.mw2-item__doc { flex: 1 1 auto; min-width: 0; font: var(--type-card); overflow-wrap: anywhere; }
.mw2-item__amt { flex: none; font-weight: var(--fw-semibold); font-variant-numeric: var(--num-figures); }
.mw2-item__where { font: var(--type-caption); color: var(--text-muted); }
.mw2-item__tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.mw2-tag { font: var(--type-label); padding: 0 var(--sp-2); border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); }
.mw2-tag[data-intent="danger"] { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger-text); }
.mw2-tag[data-intent="warning"] { background: color-mix(in srgb, var(--warning) 18%, var(--surface)); color: var(--warning-text); }
.mw2-tag[data-intent="info"] { background: color-mix(in srgb, var(--info) 14%, var(--surface)); color: var(--info-text); }
.mw2-tag[data-intent="success"] { background: color-mix(in srgb, var(--success) 14%, var(--surface)); color: var(--success-text); }
.mw2-empty { grid-column: 1 / -1; }
.mw2-detail { position: sticky; inset-block-start: var(--sp-4); z-index: var(--z-base); display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.mw2-detail__top { display: none; align-items: center; gap: var(--sp-2); }
.mw2-detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.mw2-detail__tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.mw2-facts { grid-template-columns: max-content minmax(0, 1fr); }
.mw2-checked { display: flex; gap: var(--sp-2); align-items: flex-start; }
.mw2-checked .o-icon { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
.mw2-hist { display: flex; flex-direction: column; gap: var(--sp-2); }
.mw2-hist__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); font: var(--type-small); }
.mw2-hist__list li { display: flex; gap: var(--sp-2); align-items: baseline; }
.mw2-hist__dot { flex: none; width: var(--sp-2); height: var(--sp-2); border-radius: var(--radius-pill); background: var(--border-strong); }
.mw2-refusal { padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.mw2-refusal[hidden] { display: none; }
.mw2-why { display: flex; flex-direction: column; gap: var(--sp-2); }
.mw2-why textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.mw2-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.mw2-acts__sp { flex: 1 1 auto; }
.mw2-row { display: flex; gap: var(--sp-2); align-items: center; }
@media (max-width: 1100px) {
  .mw2-body { grid-template-columns: minmax(0, 1fr); }
  .mw2-detail { display: none; }
  .mw2-sheet-open .mw2-detail { display: flex; position: fixed; inset: 0; z-index: var(--z-sheet); border-radius: unset; border: 0; overflow-y: auto; padding-block-end: 0; }
  .mw2-sheet-open .mw2-detail__top { display: flex; position: sticky; inset-block-start: 0; z-index: var(--z-sticky); background: var(--surface); padding-block: var(--sp-2); margin-block-start: calc(-1 * var(--sp-4)); border-bottom: 1px solid var(--border); }
  .mw2-sheet-open .mw2-acts { position: sticky; inset-block-end: 0; z-index: var(--z-sticky); background: var(--surface); padding-block: var(--sp-3) calc(var(--sp-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); margin-block-start: auto; }
  .mw2-sheet-open .mw2-acts #mwApp { flex: 1 1 100%; justify-content: center; }
  .mw2-sheet-open .mw2-acts .o-btn--secondary { flex: 1 1 0; justify-content: center; }
  .mw2-sheet-open .mw2-acts__sp { display: none; }
}
.mw2-back .o-icon { width: var(--icon-sm); height: var(--icon-sm); }
.mw2-pos { margin-inline-start: auto; }

/* ===================================================================== 11.46.0 (WS3, Nabil 17 Oct 13:30) — spaces, and a
   role's workspace (Administration › Roles › a role › Workspace). Tokens only. */
.ws-glyph { position: relative; }
.ws-glyph__mark { position: absolute; inset-block-end: calc(var(--sp-1) * -1); inset-inline-end: calc(var(--sp-1) * -1); width: var(--ws-glyph-xs); height: var(--ws-glyph-xs); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--brand-strong); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; box-shadow: var(--elev-1); }
.ws-glyph__mark .o-icon { width: var(--sp-3); height: var(--sp-3); }
.ws-tile--action .ws-tile__where { color: var(--brand-strong); }
.ws-spaces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.ws-spacecard { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); min-height: var(--ws-tile-h); box-sizing: border-box; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--elev-1); color: var(--text); text-decoration: none; min-width: 0; }
.ws-spacecard:hover { border-color: var(--border-strong); }
.ws-spacecard:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ws-space { display: flex; flex-direction: column; gap: var(--sp-4); }
/* A <nav>: the menu's dark background (nav { background: var(--nav) }) must not reach it — the Explorer's rail lesson. */
.ws-spacenav { display: flex; flex-wrap: wrap; gap: var(--sp-2); background: none; padding: 0; border: 0; }
.ws-spacenav .ws-chip[aria-current="page"] { border-color: var(--brand-strong); color: var(--brand-strong); font-weight: var(--fw-semibold); }
.ws-pagetabs { display: flex; gap: var(--sp-1); border-block-end: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.ws-pagetab { flex: none; min-height: var(--control-md); padding: 0 var(--sp-4); border: 0; border-block-end: 2px solid transparent; background: transparent; color: var(--text-muted); font: var(--type-label); font-weight: var(--fw-semibold); cursor: pointer; }
.ws-pagetab[aria-selected="true"] { color: var(--text); border-block-end-color: var(--brand-strong); }
.ws-pagetab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ws-group { margin-block-start: var(--sp-2); }
.rw { display: flex; flex-direction: column; gap: var(--sp-4); padding-block-end: var(--sp-16); }
.rw-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.rw-cols { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.rw-spacecol { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.rw-spacelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.rw-spacerow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); padding: var(--sp-1); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); }
.rw-spacerow.is-on { border-color: var(--brand-strong); background: var(--brand-soft); }
.rw-space { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); padding: var(--sp-2); border: 0; background: transparent; color: var(--text); text-align: start; cursor: pointer; border-radius: var(--radius-sm); font: var(--type-body); }
.rw-space span { color: var(--text-muted); font: var(--type-caption); }
.rw-space:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.rw-acts { display: inline-flex; align-items: center; gap: var(--sp-1); margin-inline-start: auto; }
.rw-main { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.rw-pages { display: flex; flex-wrap: wrap; gap: var(--sp-1); padding: var(--sp-1); border-radius: var(--radius-md); background: var(--surface-subtle); }
.rw-pagehead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.rw-group { margin: 0; padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.rw-group legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-1); font: var(--type-label); font-weight: var(--fw-semibold); }
.rw-tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.rw-tile { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); }
.rw-req { display: inline-flex; align-items: center; gap: var(--sp-1); font: var(--type-caption); color: var(--text-muted); min-height: var(--control-sm); cursor: pointer; }
.rw-req input { margin: 0; }
.rw-rename { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-2); width: 100%; }
.rw-rename .o-field { flex: 1 1 160px; min-width: 0; }
.rw-pv { display: flex; flex-direction: column; gap: var(--sp-1); padding-block: var(--sp-2); border-block-start: 1px solid var(--border); }
.rw-pv__page { display: flex; flex-direction: column; gap: var(--sp-1); padding-inline-start: var(--sp-3); }
.rw-pv__group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding-inline-start: var(--sp-3); }
@media (max-width: 1100px) { .ws-spaces { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .rw-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .ws-spaces { grid-template-columns: minmax(0, 1fr); } .rw-tile .ws-orow__text { flex: 1 1 100%; } .rw-acts { margin-inline-start: 0; } }

/* 11.48.28: the credit/debit note's lines on a phone — the grid fits the width and wraps, so every column (the quantity
   box, a goods-returned line's condition under its description) is on screen without a sideways scroll. */
.nt-cond { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-top: var(--sp-1); }
.nt-cond .o-input { width: auto; min-width: 0; }
@media (max-width: 720px) {
  .nt-lines .o-grid:not(.o-grid--rows) table { width: 100%; min-width: 0; table-layout: auto; }
  .nt-lines .o-grid:not(.o-grid--rows) tbody td { white-space: normal; height: auto; }
  .nt-lines .o-grid:not(.o-grid--rows) .o-grid__lead { max-width: none; }
  .nt-lines .o-input { min-width: 0; width: 100%; }
}

/* ======================================================================== 11.72.0 — ONE NAVIGATION MODEL
 * Nabil, 30 Oct: one model for the business app and the console. Desktop: the side menu, its headings expanding in place;
 * ☰ only below 900 px (the drawer). Phone (700 px and below): a bottom bar — Home · Needs you · Search · Menu — in every
 * view; Menu opens the same side menu, so ☰ steps aside there. One Home: Needs you, the pins, today. */
.hdr-search { gap: var(--sp-1); }
.hdr-search .hdr-kbd { font: var(--type-caption); color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 var(--sp-1); }
@media (max-width: 1100px) { .hdr-search .hdr-kbd { display: none; } }
@media (max-width: 700px) {
  .ws-tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-sticky);
    border-top: 1px solid var(--border); border-bottom: 0; background: var(--surface); padding: var(--sp-1) var(--sp-1) calc(var(--sp-2) + env(safe-area-inset-bottom)); }
  #content { padding-block-end: calc(var(--ws-tabbar-h) + var(--sp-4)); }
  #navToggle.hamburger, .hdr-search { display: none !important; }
  .ws-savebar { inset-block-end: var(--ws-tabbar-h); }
  /* 11.82.2 (outside QA ORVIA-006): a record's own action bar (Update, Cancel…) and an editor's footer stuck to the bottom of
     the window — UNDER the fixed bottom bar, so Update could not be tapped. They stick above it, as the save bar does. */
  /* … and every other bar that sticks to a page's foot (ORVIA-006 sweep): the booking actions, the guided setup's steps, an
     editor's buttons — on the page only; in a drawer or a dialog (over the bottom bar) they keep the window's foot. */
  #content .o-recbar, #content .bk-acts, #content .gd-nav { inset-block-end: var(--ws-tabbar-h); }
  #content .o-oe__ownfoot { inset-block-end: calc(var(--ws-tabbar-h) + var(--kb)); }
  #content .editor .rbtns { bottom: calc(var(--ws-tabbar-h) + var(--kb) - 22px); }
  /* WCAG 2.4.11 (A11Y-11): a focused row is never hidden under the fixed bottom bar or the fixed top bar. */
  html { scroll-padding-block-end: calc(var(--ws-tabbar-h) + var(--sp-2)); scroll-padding-block-start: calc(var(--hdr-h, var(--sp-16)) + var(--sp-2)); }
}
.ws-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-md); }
.ws-tab[aria-expanded="true"] { color: var(--brand-strong); }
/* Home: the pins section's own buttons, and the arrange controls on a tile. */
.ws-sec__acts { display: inline-flex; flex-wrap: wrap; gap: var(--sp-2); margin-inline-start: auto; }
.ws-tiles--arrange .ws-tile { flex-direction: column; align-items: stretch; }
.ws-tile__ed { display: flex; justify-content: center; gap: var(--sp-1); padding: var(--sp-1); border-top: 1px solid var(--border); }
.ws-tile__ed .ws-act { min-inline-size: var(--control-md); min-block-size: var(--control-md); }
.ws-pinrow { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.ws-pinrow__t { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.ws-pinrow__t > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.o-home .ws-work { margin-block-start: var(--sp-2); }
/* 11.72.0 (A11Y-07, WCAG 2.4.7): FOCUS YOU CAN SEE on every control that drew none — the "Needs you" rows, sortable column
   headers (outline:none and no change at all), rows, menu items, a record's section rows and the rest below. A rule that
   takes the outline away must give the ring instead (scripts/check-focus-ring.cjs). */
.o-grid thead th[data-sortable="true"]:focus-visible, .o-grid__row:focus-visible, .o-sections__item:focus-visible,
.o-needs__item:focus-visible, .o-menu__item:focus-visible, .o-ticket__item:focus-visible, .o-socal__add:focus-visible,
.o-drop:focus-visible, .ws-addone:focus-visible, .o-sidebar__collapse:focus-visible, .o-grid__resize:focus-visible,
.o-cellinput:focus-visible { box-shadow: var(--focus-ring); }
/* 11.72.0 (A11Y-12, WCAG 1.4.10): at 320 px nothing scrolls sideways — the property cards, report cards and attendance cards
   shrink to the screen, and their long rows wrap. */
.o-props, .o-rep-card, .o-att, .o-props > *, .o-rep-card > *, .o-att > * { min-width: 0; }
.o-props .o-props__row, .o-props dd, .o-props dt { overflow-wrap: anywhere; }
@media (max-width: 400px) { .o-fin-cols, .o-rechead__kpis { grid-template-columns: minmax(0, 1fr); } }
.o-home > div:empty { display: none; }
.admin-header .btn { white-space: nowrap; }
@media (max-width: 1440px) { .hdr-search .hdr-kbd { display: none; } }
/* 11.72.0 (WCAG 2.4.1): the skip link — out of sight until it has the keyboard's focus, then at the top of the page */
.o-skip { position: absolute; inset-inline-start: var(--sp-2); inset-block-start: calc(-1 * var(--sp-16)); z-index: var(--z-toast); padding: var(--sp-2) var(--sp-3); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); font: var(--type-body-strong); }
.o-skip:focus { inset-block-start: var(--sp-2); }
/* 11.81.0 (compliance wave 1): the AML register's screening, case and DPMSR drawers — a warning said in words (an old list, a
   rule not yet verified against its official text), a case's "never shown to the customer", long free text that wraps. */
.sc-warn { margin: 0; padding: var(--sp-2) var(--sp-3); border-inline-start: 4px solid var(--warning); border-radius: var(--radius-md); background: var(--surface-subtle); color: var(--warning-text); }
.sc-unverified { color: var(--warning-text); font: var(--type-caption); }
.sc-private { margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); background: var(--surface-subtle); font: var(--type-body-strong); }
.sc-summary { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sc-row .o-cluster { flex-wrap: wrap; }

/* 11.82.1 — TOUCH TARGETS, AFTER EVERY COMPONENT'S OWN SIZE (written last so it wins over the sizes above). */
@media (pointer: coarse), (max-width: 760px) {
  /* 11.82.1 (R82-S-008/009/010): the rest of what a finger presses — a list's Export and Import (they were 40 px wide),
     its quick-view tabs and chips ("All · 5" 38 px wide), a segmented control ("Whole business" 32 px high), the grid's
     tick-box cells (the label is the target: the cell, 44 px square), and steppers and day pickers drawn as buttons. */
  .o-filterbar__io { inline-size: auto; min-inline-size: 44px; }
  .o-tab, .o-chip, .o-segmented > button, .o-density__opt, [role="tab"], [role="radio"]:not(input), summary { min-block-size: 44px; }
  .o-tab, .o-chip, [role="tab"] { min-inline-size: 44px; justify-content: center; }
  .o-grid .o-grid__sel { inline-size: 44px; }
  .o-grid .o-grid__sel .o-check, .o-grid__card .o-check { min-inline-size: 44px; min-block-size: 44px; }
  .o-check > input { inline-size: 22px; block-size: 22px; }
  /* (the demo window's own small label at the top, #orviaWindowChip, keeps its size: it is a label first, drawn over the page) */
  button:not(.btn.link):not(.o-btn--link):not(.toast-link):not(.toast-x):not(.toast-copy):not(.toast-next):not(#orviaWindowChip) { min-block-size: 44px; }
  button.o-btn--icon, button[aria-label]:not([class*="o-btn"]):not(.toast-x):not(#orviaWindowChip) { min-inline-size: 44px; }
}

/* ======================================================================== 11.84.1 — THE SIDE PANEL (phone and tablet)
 * Nabil, 13 Nov (replacing the 11.83 bottom sheet): at 900 px and below the menu is a panel at the leading edge that the PAGE
 * SLIDES ASIDE TO REVEAL, as the Claude iPhone app's sidebar does — the page moves toward the trailing edge by the panel's
 * width (80 %, at most 360 px), stays in view there, dimmed, its leading corners rounded; a tap on it or a swipe of it back
 * closes the panel (admin/core.js, patterns.js panelSwipe). In Arabic everything mirrors: the panel at the right, the page
 * slides left. The panel and #navBackdrop are children of the body here (core.js navPlace), so the sliding frame (#app)
 * does not carry them. With reduced motion nothing slides: the panel and the dimming fade in over the page.
 * Inside: a plain title row (the Orvia mark, the business's name, Search, ✕); the groups as large rows with their outline
 * icons — no boxes; the open group's screens smaller and indented under it; one group open at a time (shell.js). The foot:
 * the company and the branch, the language and Security, the appearance, then Sign out. */
.o-menupanel__head, .o-menupanel__findrow, .o-menupanel__none { display: none; }
.o-sidebar[data-filtering] [data-miss] { display: none !important; }
.o-sidebar[data-filtering] .o-navband { display: block !important; }
.o-sidebar[data-filtering] .o-navsection, .o-sidebar[data-filtering] .bo-quick { display: none; }
@media (max-width: 900px) {
  /* 11.84.2: the business app's panel is sized to its content too — its longest heading ("Kitchen & production", 279 px with
     icon, chevron and padding) plus the panel's padding is 303 px, so it keeps its own width (the console's is 288) */
  :root { --navpanel-w: min(80vw, 320px); }
  .o-sidebar, .o-sidebar[data-collapsed="true"] {
    position: fixed; inset-block: 0; inset-inline-start: 0; inset-inline-end: auto; z-index: var(--z-drawer);
    width: var(--navpanel-w); max-width: none; flex-basis: auto; gap: 0; border: 0; box-shadow: none; background: var(--surface);
    padding: calc(var(--sp-2) + env(safe-area-inset-top, 0px)) var(--sp-3) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
    touch-action: pan-y; transform: translateX(calc(-1 * var(--sp-6))); opacity: 0; visibility: hidden;
    transition: transform var(--dur-nav) var(--ease-standard), opacity var(--dur-nav) var(--ease-standard), visibility 0s linear var(--dur-nav); }
  [dir="rtl"] .o-sidebar { transform: translateX(var(--sp-6)); }
  body.nav-open .o-sidebar { transform: none; opacity: 1; visibility: visible;
    transition: transform var(--dur-nav) var(--ease-standard), opacity var(--dur-nav) var(--ease-standard), visibility 0s; }
  .o-sidebar__collapse, .o-sidebar .o-sidebar__top { display: none; }
  /* the page slides aside (and the bottom bar with it), and stays where it is scrolled */
  #app, .ws-tabbar { transition: transform var(--dur-nav) var(--ease-standard); }
  body.nav-open #app, body.nav-open .ws-tabbar, body.nav-open #navBackdrop { transform: translateX(calc(var(--navpanel-w) - var(--nav-drag, 0px))); }
  [dir="rtl"] body.nav-open #app, [dir="rtl"] body.nav-open .ws-tabbar, [dir="rtl"] body.nav-open #navBackdrop { transform: translateX(calc(var(--nav-drag, 0px) - var(--navpanel-w))); }
  html:has(body.nav-open) { overflow: hidden; }
  body.nav-open { overflow-x: clip; }   /* the slid page never widens the document (a phone would zoom out to show it) */
  html.o-navdrag #app, html.o-navdrag .ws-tabbar, html.o-navdrag #navBackdrop { transition: none; }
  /* the visible edge of the page: dimmed, its leading corners rounded (the spread paints the panel's colour round them) */
  #navBackdrop { display: block; position: fixed; inset: 0; z-index: var(--z-backdrop); background: var(--scrim-nav);
    border-start-start-radius: var(--radius-xl); border-end-start-radius: var(--radius-xl); box-shadow: 0 0 0 100vmax var(--surface);
    touch-action: pan-y; opacity: 0; visibility: hidden; cursor: pointer;
    transition: transform var(--dur-nav) var(--ease-standard), opacity var(--dur-nav) var(--ease-standard), visibility 0s linear var(--dur-nav); }
  body.nav-open #navBackdrop { opacity: 1; visibility: visible;
    transition: transform var(--dur-nav) var(--ease-standard), opacity var(--dur-nav) var(--ease-standard), visibility 0s; }

  /* the title row: the mark and the business's name, Search and ✕ (44 px each) */
  .o-menupanel__head { display: flex; align-items: center; gap: var(--sp-1); min-block-size: var(--sp-16); flex: none; }
  .o-menupanel__brand { flex: 1; min-inline-size: 0; display: flex; align-items: center; gap: var(--sp-3); padding-inline-start: var(--sp-1); }
  .o-menupanel__mark { inline-size: 28px; block-size: 28px; flex: none; }
  .o-menupanel__name { min-inline-size: 0; unicode-bidi: plaintext; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--type-page); font-size: var(--fs-heading); color: var(--text); }
  .o-menupanel__btn { flex: none; display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; padding: 0; border: 0;
    border-radius: var(--radius-pill); background: none; color: var(--text-secondary, var(--text-muted)); cursor: pointer; }
  .o-menupanel__btn:hover, .o-menupanel__btn[aria-expanded="true"] { background: var(--surface-subtle); color: var(--text); }
  .o-menupanel__btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
  .o-menupanel__findrow:not([hidden]) { display: block; padding-block: var(--sp-1) var(--sp-2); flex: none; }
  .o-menupanel__find { display: flex; align-items: center; gap: var(--sp-2); min-block-size: 44px; padding-inline: var(--sp-3);
    border-radius: var(--radius-md); background: var(--surface-subtle); color: var(--text-muted); }
  .o-menupanel__find:focus-within { box-shadow: var(--focus-ring); }
  .o-menupanel__q { flex: 1; min-inline-size: 0; border: 0; background: none; font: var(--type-body); font-size: var(--fs-section); color: var(--text); outline: none; padding: 0; }
  .o-menupanel__none:not([hidden]) { display: grid; gap: var(--sp-3); justify-items: start; padding: var(--sp-4) var(--sp-2); color: var(--text-muted); font: var(--type-body); }
  .o-menupanel__none p { margin: 0; }

  /* two levels: a group is a large row with its outline icon; its screens smaller, indented under the group's name */
  .o-sidebar__groups { gap: var(--sp-1); padding-block: var(--sp-2); }
  .o-navgroup__head { min-block-size: var(--control-lg); gap: var(--sp-4); padding-inline: var(--sp-2); border-radius: var(--radius-md);
    font: var(--type-section); font-size: var(--fs-heading); color: var(--text); }
  .o-navgroup__head .o-icon { inline-size: var(--icon-lg); block-size: var(--icon-lg); flex: none; color: var(--text-secondary, var(--text-muted)); }
  .o-navgroup[data-open="true"] > .o-navgroup__head { background: none; }
  .o-navgroup[data-current="true"] > .o-navgroup__head .o-icon { color: var(--brand-strong); }
  .o-navgroup__inner { gap: 0; }
  .o-navgroup[data-open="true"] .o-navgroup__inner { padding-block: 0 var(--sp-2); }
  .o-navitem { min-block-size: 44px; padding-inline: calc(var(--sp-2) + var(--icon-lg) + var(--sp-4)) var(--sp-2); border-radius: var(--radius-md);
    font: var(--type-body); font-size: var(--fs-section); color: var(--text-secondary, var(--text-muted)); white-space: normal; }
  .o-navitem[aria-current="page"] { background: var(--accent-subtle); color: var(--brand-strong); font-weight: var(--fw-semibold); }
  .o-navsection { padding-inline-start: calc(var(--sp-2) + var(--icon-lg) + var(--sp-4)); min-block-size: 44px; }
  .bo-quick__item { min-block-size: var(--control-lg); }

  /* the foot: where you are, the language and Security, the appearance, then Sign out */
  .o-sidebar__foot { gap: var(--sp-3); padding-block-start: var(--sp-4); }
  .o-sidebar__foot .side-foot { display: contents; }
  .o-sidebar__foot .bo-pctx { order: 1; display: grid; gap: var(--sp-2); }
  .o-sidebar__foot .who { order: 2; }
  .o-sidebar__foot .side-foot-btns { order: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .o-sidebar__foot .o-appearance { order: 4; }
  .o-sidebar__foot .bo-pout { order: 5; color: var(--danger-text); }
  .o-sidebar__foot .o-version { order: 6; }
  .o-sidebar__foot .o-btn { min-block-size: 44px; justify-content: center; }
  .bo-pctx__row { display: grid; gap: var(--sp-1); font: var(--type-label); color: var(--text-muted); }
  .bo-pctx__row[hidden] { display: none; }
  .bo-pctx__row select { min-block-size: 44px; inline-size: 100%; font: var(--type-body); font-size: var(--fs-section); color: var(--text); }
}
@media (min-width: 701px) and (max-width: 900px) { .side-foot { display: grid; } }
/* a finger leaves no hover behind: the row last touched does not stay shaded */
@media (max-width: 900px) and (hover: none) {
  .o-navgroup__head:hover, .o-navitem:not([aria-current]):hover, .o-menupanel__btn:not([aria-expanded="true"]):hover { background: none; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  /* no slide: the panel and the dimming fade in over the page, which stays where it is */
  body.nav-open #app, body.nav-open .ws-tabbar, body.nav-open #navBackdrop,
  [dir="rtl"] body.nav-open #app, [dir="rtl"] body.nav-open .ws-tabbar, [dir="rtl"] body.nav-open #navBackdrop { transform: none; }
  .o-sidebar, [dir="rtl"] .o-sidebar, body.nav-open .o-sidebar { transform: none; }
  #navBackdrop { border-start-start-radius: 0; border-end-start-radius: 0; box-shadow: none; }
  .o-sidebar, #navBackdrop { transition: opacity var(--dur-state) linear, visibility 0s linear var(--dur-state); }
  body.nav-open .o-sidebar, body.nav-open #navBackdrop { transition: opacity var(--dur-state) linear, visibility 0s; }
}

/* 11.84.1 (Nabil, 13 Nov — pin apps to Home): a screen's Pin to Home, beside its name */
.bo-pinbtn { display: inline-flex; align-items: center; gap: var(--sp-1); min-block-size: 44px; padding-inline: var(--sp-2); margin-block: var(--sp-1);
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-secondary, var(--text-muted)); font: var(--type-label); cursor: pointer; }
.bo-pinbtn[aria-pressed="true"] { background: var(--accent-subtle); border-color: transparent; color: var(--brand-strong); }
.bo-pinbtn:hover { color: var(--text); }
.bo-pinbtn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.bo-pinbtn:disabled { cursor: default; opacity: .7; }

/* 12.05.0 (Maintenance): the maintenance calendar — a month of days, seven columns; a request's photo. Tokens only. */
.o-mntcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-1); }
.o-mntcal__dow { font-weight: 600; padding: var(--sp-1) var(--sp-2); color: var(--text-secondary); }
.o-mntcal__day { min-block-size: 6rem; padding: var(--sp-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: var(--sp-1); }
.o-mntcal__day--out { opacity: .55; }
.o-mntcal__day--today { outline: 2px solid var(--accent); }
.o-mntcal__num { font-variant-numeric: tabular-nums; }
.o-mntcal__item { display: block; padding: var(--sp-1); border-radius: var(--radius-sm); text-decoration: none; overflow-wrap: anywhere; }
.o-mntcal__item--planned { border: 1px dashed var(--border); }
.o-mntcal__item--breakdown { border-inline-start: 3px solid var(--danger); }
.o-mntcal__item--preventive, .o-mntcal__item--corrective { border-inline-start: 3px solid var(--accent); }
.o-mntphoto { max-inline-size: 100%; max-block-size: 24rem; object-fit: contain; border-radius: var(--radius); }
@media (max-width: 640px) { .o-mntcal { grid-template-columns: 1fr; } .o-mntcal__dow, .o-mntcal__day--out { display: none; } }
/* 11.97.0 (E2): My time — the week grid. A cell is a short number box; the row's head carries the project and its WBS line. */
.o-pjweek .o-input { inline-size: 7ch; min-inline-size: 5ch; text-align: end; padding-inline: var(--sp-2); }
.o-pjweek th[scope="row"] { min-inline-size: 18ch; }
.o-pjweek .o-grid__sub { display: block; margin-block-start: var(--sp-1); }

/* 12.06.0 (HSE): the risk matrix — likelihood (rows, 5 at the top) by severity (columns, 1 to 5), each cell its score in its
   band's colour; the score is printed in the cell, so the colour is never the only signal. */
.o-hse-matrix { display: inline-flex; flex-direction: column; gap: var(--sp-1); }
.o-hse-matrix__axis { font-size: var(--fs-small); color: var(--text); margin-block-end: var(--sp-1); }
.o-hse-matrix__row { display: flex; gap: var(--sp-1); }
.o-hse-cell { display: inline-flex; align-items: center; justify-content: center; inline-size: 2.75rem; block-size: 2.75rem; border-radius: var(--radius-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.o-hse-cell--low { background: var(--success); color: var(--text); }
.o-hse-cell--medium { background: var(--warning); color: var(--text); }
.o-hse-cell--high { background: var(--danger); color: var(--on-danger); }
.o-hse-cell--vhigh { background: var(--danger-text); color: var(--on-danger); }
