/* Grapt web: shared styles. Reads only tokens.css. */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{background:var(--surface-canvas);color:var(--text-primary);font-family:"Inter",system-ui,sans-serif;font-size:var(--type-body-size);line-height:var(--type-body-lh)}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;cursor:pointer}
.shell{display:grid;grid-template-columns:var(--layout-sidebar) minmax(0,1fr);min-height:100vh}
.sidebar{background:var(--surface-default);border-right:var(--border-width) solid var(--border-default);display:flex;flex-direction:column;padding:var(--space-12)}
/* Figma sidebar: the divider sits 4 px lower and the mark 4 px higher than the plain brand row. */
.brand{height:calc(var(--layout-brand-h) + var(--space-4));padding-bottom:var(--space-12);border-bottom:var(--border-width) solid var(--border-default);display:flex;align-items:center;justify-content:center;margin:0 var(--space-4) var(--space-20)}
/* Logo: the Figma wordmark is a raster image cropped by a frame (token values). --k scales the whole crop. */
.logo-frame{--k:1;position:relative;width:calc(var(--logo-frame-w) * var(--k));height:calc(var(--logo-frame-h) * var(--k));overflow:hidden}
.logo-frame img{position:absolute;left:calc(var(--logo-left) * var(--k));top:calc(var(--logo-top) * var(--k));width:calc(var(--logo-width) * var(--k));height:calc(var(--logo-height) * var(--k))}
.nav a .ico{display:inline-flex;width:var(--size-icon);height:var(--size-icon);flex:none;color:var(--text-secondary)}
.nav a .ico .icon{width:var(--size-icon);height:var(--size-icon)}
.nav a[aria-current="page"] .ico{color:var(--text-action)}
.bell{display:inline-flex;align-items:center;justify-content:center;width:var(--size-40);height:var(--size-40);color:var(--text-secondary)}
/* Figma top bar: the bell to avatar and avatar to name gaps are 10 px (the flex gap is 12). */
.topbar .bell,.topbar .avatar{margin-right:calc(var(--space-4) / -2)}
.bell .icon{width:var(--size-icon);height:var(--size-icon)}
.nav{display:flex;flex-direction:column;gap:var(--space-4);flex:1}
.nav a{display:flex;align-items:center;gap:var(--space-12);height:var(--size-44);padding:0 var(--space-16);border-radius:var(--radius-8);font-size:var(--type-body-size);font-weight:400}
.nav a[aria-current="page"]{background:var(--color-orangeSoft);color:var(--text-action);font-weight:600}
.sidebar .who{border-top:var(--border-width) solid var(--border-default);margin:0 var(--space-4);padding:var(--space-16) var(--space-8) 0;font-size:var(--type-body-small-size);color:var(--text-secondary)}
.sidebar .who strong{display:block;color:var(--text-primary);font-size:var(--type-body-size);margin-top:var(--space-4)}
.topbar{height:var(--layout-topbar);background:var(--surface-default);display:flex;align-items:center;gap:var(--space-12);padding:0 var(--layout-topbar-end) 0 var(--layout-topbar-start)}
.content{min-width:0}
.sr-only{position:absolute;width:var(--border-width);height:var(--border-width);overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Units and pricing top bar (Figma): the bell, avatar and name sit further in from the right edge */
.topbar.is-units-inset{padding-right:var(--layout-units-topbar-inset)}
.topbar.is-units-inset .crumb{font-weight:400}
.topbar .crumb{font-weight:600;font-size:var(--type-body-size)}
.topbar .user-name{font-size:var(--type-label-small-size);font-weight:600;color:var(--text-secondary);margin-right:var(--space-24)}
.placeholder{padding:var(--space-24);color:var(--text-secondary)}
.empty-block{background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-48) var(--space-24);text-align:center}
.empty-block h2{font-family:var(--type-h3-family);font-size:var(--type-h3-size);line-height:var(--type-h3-lh);font-weight:var(--type-h3-weight)}
.empty-block p{color:var(--text-secondary);margin-top:var(--space-8);margin-bottom:var(--space-16)}
/* Toast: bottom right, 24 from the bottom, dismissed with its close button */
.toast{position:fixed;right:var(--layout-gutter);bottom:var(--space-64);display:flex;align-items:center;gap:var(--space-12);background:var(--color-ink);color:var(--color-white);border-radius:var(--radius-8);padding:var(--space-12) var(--space-16);font-weight:600;z-index:30}
.toast .toast-icon{display:inline-flex;width:var(--space-16);height:var(--space-16);color:var(--color-white)}
.toast .toast-icon .icon{width:var(--space-16);height:var(--space-16)}
/* WCAG 2.5.8: the dismiss button is at least 32 px high; the toast's own padding is unchanged. */
.toast-close{background:none;border:0;color:var(--color-white);font-size:var(--type-body-size);line-height:1;padding:0 var(--space-16);min-height:var(--control-32);display:inline-flex;align-items:center}
.toast.is-static{position:static;transform:none;display:inline-block}
/* Phone: the toast is part of the page, above the heading (the toast slot sits at the top of the main area), so it covers nothing. */
@media (max-width:600px){.toast:not(.is-static){position:static;transform:none;display:flex;margin-bottom:var(--space-16)}}
/* Dropdown (shared dropdown standard): trigger 40, menu 8 below the trigger, options 40 */
.toolbar .dd{width:var(--size-160)}
.dd{position:relative}
.dd-trigger{width:100%;height:var(--control-40);display:flex;align-items:center;justify-content:space-between;gap:var(--space-8);padding:0 var(--space-24) 0 var(--space-16);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-8);background:var(--surface-default);font-weight:600;text-align:left}
/* Dropdown arrow: a small solid triangle, 8 wide and 4 tall (Figma filter and date controls) */
.dd-trigger::after{content:"";flex:none;width:0;height:0;border-left:var(--space-4) solid transparent;border-right:var(--space-4) solid transparent;border-top:var(--space-4) solid var(--text-primary)}
.dd-trigger[aria-expanded="true"]{border-color:var(--text-action)}
/* Figma unit picker: the trigger keeps its normal border while its radio menu is open. */
.dd:has(.dd-menu.is-radio:not([hidden])) .dd-trigger[aria-expanded="true"]{border-color:var(--border-default)}
.dd-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dd-menu{position:absolute;top:calc(100% + var(--space-8));left:0;min-width:var(--size-280);width:max(100%,var(--size-280));list-style:none;padding:calc(var(--size-9) + var(--border-width));background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);box-shadow:var(--shadow-menu);z-index:10}
.dd-menu[hidden]{display:none}
/* Figma unit picker: each option has a radio mark; the chosen one is filled. */
.dd-menu.is-radio [role="option"]::before{content:"";flex:none;width:var(--space-16);height:var(--space-16);margin-right:var(--space-8);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-16)}
.dd-menu.is-radio [role="option"][aria-selected="true"]::before{border:calc(var(--border-width) * 4) solid var(--text-action)}
.dd-menu [role="option"]{height:var(--control-40);display:flex;align-items:center;padding:0 var(--space-12);border-radius:var(--radius-8);cursor:pointer;white-space:nowrap}
.dd-menu [role="option"]:hover{background:var(--surface-subtle)}
.dd-menu [role="option"][aria-selected="true"]{background:var(--color-orangeSoft);color:var(--text-action);font-weight:600}
.dd-menu [role="option"]:focus-visible{outline:var(--stroke-width) solid var(--focus-ring);outline-offset:calc(var(--stroke-width) * -1)}
.gallery-section{margin-bottom:var(--space-32)}
.gallery-section h2{font-family:var(--type-h3-family);font-size:var(--type-h3-size);margin-bottom:var(--space-16)}
.row-of{display:flex;gap:var(--space-8);flex-wrap:wrap;align-items:center}
.gallery-dd{width:var(--size-240);min-height:var(--control-40)}
.gallery-form{display:grid;gap:var(--space-24);max-width:var(--size-360)}
.form-card{background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-24);display:grid;gap:var(--space-16)}
.form-card.is-narrow{max-width:var(--size-528)}
.form-footer{display:flex;justify-content:space-between;align-items:center;gap:var(--space-8);margin-top:var(--space-24)}
.related-slot:not(:empty){margin-top:var(--space-24)}
/* The primary button with the reason it is disabled (when it is): the reason sits under the button, on the same right edge. */
.footer-primary{display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-8)}
.form-footer:has(.footer-primary){align-items:flex-start}
/* Form pages (Figma add stock frame): the two columns are 38 apart, and a field in a row is centred on the row */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-16) var(--layout-form-col-gap);align-items:start}
.form-grid.is-center{align-items:center}
.form-page{margin-top:calc(var(--layout-form-top) - var(--size-40))}
.form-page .page-head h1{margin-top:0}
.form-footer.is-inset-wide .btn-primary{margin-right:var(--layout-footer-inset)}
.form-footer.is-inset-narrow .btn-primary{margin-right:var(--layout-footer-inset-narrow)}
/* Figma review import: the primary action sits 72 px in from the edge (64 + 8 of the spacing scale). */
.form-footer.is-inset-review .btn-primary{margin-right:calc(var(--space-64) + var(--space-8))}
/* Figma duplicate-barcode footer: the primary action sits 48 px in from the edge. */
.form-footer.is-inset-dup .btn-primary{margin-right:var(--space-48)}
.form-footer.is-inset-approve .btn-primary{margin-right:calc(var(--space-64) + var(--space-20))}
/* Form pages: the batch summary card above the form card, and a line of text under a card title */
.lead-card{background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-24);margin-bottom:var(--space-24)}
.lead-card .kicker{font-size:var(--type-label-small-size);color:var(--text-secondary);line-height:var(--space-16)}
.lead-card .value{font-weight:600;margin-top:var(--space-16);line-height:var(--space-20)}
.card-text{color:var(--text-secondary)}
/* Product detail (Figma): three facts across the card, two metric cards, rows that space out, three section buttons */
.facts.facts-3{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:0}
.cards.two{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:0}
/* A spread row wraps when its two sides do not fit the card (only then), so a button never runs past the card's padding. */
.spread{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--space-16)}
.spread .strong{font-weight:600}
.stack{display:grid;gap:var(--space-24)}
.stack.start-items > *{justify-self:start}
/* Units home (Figma): label and value rows, 284 for the label column, 18 between rows */
.kv{display:grid;grid-template-columns:minmax(0,284fr) minmax(0,810fr);row-gap:var(--space-16)}
.page-head.is-tight{margin-bottom:var(--space-24)}
.kv dt{color:var(--text-primary)}
.kv dd{font-weight:600}
/* Figma read-only facts in a form: a regular label over a bold value; a full-width item in a two-column grid. */
.form-field.is-readonly .field-label{font-weight:400}
.field-value{font-weight:600}
.item-name{font-weight:600;font-size:inherit;line-height:inherit}
/* Figma units list card: the name, code and description lines are 4 px apart. */
.item-body{display:grid;gap:var(--space-4)}
.helper-space{padding-bottom:var(--space-20)}
.form-grid .span-all{grid-column:1 / -1}
/* Figma forms: the items in a column are 16 px apart. */
.form-grid > .stack{gap:var(--space-16)}
/* Figma flow 28 forms: the two columns are 24 px apart (the right column starts at x 844). */
.form-grid.tight-cols{column-gap:var(--space-24)}
/* Figma: the text links sit 32 px below the footer buttons. */
.link-row{display:flex;gap:var(--space-48);margin-top:var(--space-32);padding-left:var(--space-16)}
.action-inset{margin-right:var(--layout-detail-action-inset)}
.section-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-16)}
.card-title{font-family:var(--type-h3-family);font-size:var(--type-h3-size);line-height:var(--type-h3-lh);font-weight:var(--type-h3-weight)}
.field-label{display:block;font-weight:600;line-height:var(--space-20);margin-bottom:var(--space-8)}
.crumbs ol{display:flex;align-items:center;gap:var(--space-16);list-style:none;margin-bottom:var(--space-8);font-size:var(--type-body-size);color:var(--text-secondary)}
.crumbs li+li::before{content:"›";margin-right:var(--space-16)}
.crumbs a:hover{color:var(--text-primary)}
.crumbs li[aria-current="page"]{color:var(--text-primary);font-weight:600}
/* WCAG 2.5.8: breadcrumb links are at least 24 px high (the minimum; the crumb row keeps its height). */
.crumbs a{display:inline-flex;align-items:center;min-height:var(--space-24)}
/* Alert: a failed or invalid action at the top of a form. Entered values stay. */
.alert{background:var(--color-redSoft);border-radius:var(--radius-12);padding:var(--space-24);margin-bottom:var(--space-24)}
.alert-title{color:var(--status-danger);font-weight:600}
.alert-text{margin-top:var(--space-16)}
.btn-danger{background:var(--status-danger);color:var(--color-white)}
.btn-danger:hover{background:var(--color-dangerHover)}
/* Date field and calendar (menu surface of the dropdown family) */
.dd-value.is-placeholder{color:var(--text-secondary);font-weight:400}
/* Figma calendar popover is about 341 px wide: the 360 px token less one space-16 step (344 px). */
.dd-cal-menu{width:min(calc(var(--size-360) - var(--space-16)),100%);padding:var(--space-16)}
/* Date field (NN/g date input): the typed date is the main control; the Calendar button opens the picker beside it. */
.date-entry{display:flex;align-items:center;gap:var(--space-8)}
.date-entry .date-text{flex:1;min-width:0}
.date-entry .date-open{width:auto;flex:none;padding:0 var(--space-16);justify-content:center;font-weight:600}
.cal-head{font-weight:600;margin-bottom:var(--space-8)}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));row-gap:0;column-gap:var(--space-4);text-align:center}
.cal-wd{color:var(--text-secondary);font-size:var(--type-label-small-size);height:var(--size-44);display:grid;place-items:center}
.cal-day{height:var(--size-44);padding:0;border-radius:var(--radius-8);background:none;border:0;font-size:var(--type-label-small-size)}
.cal-day:hover{background:var(--surface-subtle)}
.cal-day[aria-current="date"]{background:var(--color-orangeSoft);color:var(--text-action);font-weight:600}
/* Searchable product picker with radio marks */
.dd-heading{font-weight:600;padding:var(--space-8) 0 0}
.dd-search{padding:var(--space-8) 0 var(--space-12)}
.dd-list{list-style:none}
.dd-menu [role="option"][hidden]{display:none}
.dd-menu [role="option"][aria-disabled="true"]{color:var(--text-secondary);cursor:not-allowed}
.dd-menu [role="option"][aria-disabled="true"]:hover{background:none}
.dd-menu .mark{width:var(--space-16);height:var(--space-16);border:var(--border-width) solid var(--border-default);border-radius:50%;flex:none;margin-right:var(--space-8)}
.dd-menu [role="option"][aria-selected="true"] .mark{background:var(--text-action);box-shadow:inset 0 0 0 var(--space-4) var(--surface-default);border-color:var(--text-action)}
/* Dialog */
/* Figma: the dialog is centred in the content area, to the right of the sidebar. */
/* The one column fills the backdrop's width, so a dialog's width (up to 600 px) is taken from the screen, not from its content (on phone it stays inside the 16 px gutter). */
.dialog-backdrop{position:fixed;inset:0;background:var(--scrim);display:grid;grid-template-columns:minmax(0,1fr);place-items:center;z-index:40;padding:var(--space-16) var(--space-16) var(--space-16) calc(var(--layout-sidebar) + var(--space-16))}
@media (max-width:600px){.dialog-backdrop{padding-left:var(--space-16)}}
.dialog-backdrop[hidden]{display:none}
.dialog{background:var(--surface-default);border-radius:var(--radius-12);padding:var(--space-24);width:min(var(--size-600),100%)}
.dialog h2{font-family:var(--type-h3-family);font-size:var(--type-h3-size);line-height:var(--type-h3-lh);font-weight:var(--type-h3-weight)}
.dialog-body{margin-top:var(--space-16);color:var(--text-secondary)}
/* Figma: two dialog actions sit at opposite ends (secondary left, primary right); a single action stays on the right. */
.dialog-actions{display:flex;flex-wrap:wrap;justify-content:space-between;gap:var(--space-8);margin-top:var(--space-24)}
.dialog-actions > :only-child{margin-left:auto}
/* Tabs */
.tablist{display:flex;gap:var(--space-8);border-bottom:var(--border-width) solid var(--border-default)}
.tab{height:var(--control-40);padding:0 var(--space-16);border:0;border-bottom:var(--stroke-width) solid transparent;background:none;font-weight:600;color:var(--text-secondary)}
.tab[aria-selected="true"]{color:var(--text-action);border-bottom-color:var(--text-action)}
.tabs [role="tabpanel"]{padding-top:var(--space-16)}
/* Form field: label above, helper or error below, error keeps the field in place */
.form-field{position:relative}
.form-field label{display:block;font-weight:600;line-height:var(--space-20);margin-bottom:var(--space-8)}
.form-field .field-icon{display:none}
.form-field.has-error .field-icon{display:inline-flex;position:absolute;right:var(--space-16);top:calc(var(--space-32) + var(--space-8));color:var(--status-danger)}
.form-field.has-error .input{padding-right:calc(var(--space-32) + var(--space-8))}
.form-field .field-icon .icon{width:var(--space-16);height:var(--space-16)}
.form-field .field-help,.form-field .field-error{margin-top:var(--space-4);font-size:var(--type-body-small-size)}
.form-field .field-help{color:var(--text-secondary)}
.form-field .field-error{color:var(--status-danger);font-weight:400}
.field-narrow{max-width:var(--size-528)}
.row-line{font-weight:600}
/* Figma import messages: an outlined one-line box (red for a file problem, neutral while checking). */
.notice-outline{background:var(--surface-canvas);border:var(--border-width) solid var(--status-danger);border-radius:var(--radius-12);padding:var(--space-16) var(--space-24);margin-bottom:var(--space-24)}
.notice-outline.is-neutral{border-color:var(--border-default)}
.form-field.has-error .input{border-color:var(--status-danger)}
.form-field.has-error .dd-trigger{border-color:var(--status-danger)}
.topbar .grow{flex:1}
.badge{display:inline-flex;align-items:center;justify-content:center;width:var(--size-176);height:calc(var(--space-16) + var(--space-12));margin-right:calc(var(--space-48) + var(--space-8));background:var(--color-orangeSoft);color:var(--text-action);font-size:var(--type-label-small-size);font-weight:600;border-radius:var(--radius-24)}
.topbar .menu-btn,.topbar .brand-mobile{display:none}
.avatar{width:var(--size-36);height:var(--size-36);border-radius:50%;background:var(--color-orangeSoft);color:var(--text-action);display:grid;place-items:center;font-weight:600}
.main{padding:var(--size-40) var(--layout-gutter) var(--space-48)}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:var(--space-32)}
.page-head h1{margin-top:var(--space-8)}
.page-head h1{font-family:var(--type-h2-family);font-size:var(--type-h2-size);line-height:var(--type-h2-lh);font-weight:var(--type-h2-weight)}
.page-head p{color:var(--text-secondary);margin-top:var(--space-8)}
/* Buttons: one line, centred, 16 side padding */
.btn{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;height:var(--control-40);padding:0 var(--space-16);border-radius:var(--radius-8);border:var(--border-width) solid transparent;font-weight:600;font-size:var(--type-label-size)}
.btn-primary{background:var(--action-primary);color:var(--text-primary)}
.btn-primary:hover{background:var(--action-hover)}
.btn-secondary{background:var(--surface-default);border-color:var(--border-default);min-width:var(--size-160)}
.btn-secondary.compact{min-width:0}
/* Tertiary (23 Nov 2026): a text link for the quiet action of a row, so an urgent row's secondary button outranks it. */
.btn-tertiary{background:transparent;border-color:transparent;color:var(--text-action);min-width:0}
.btn-tertiary:hover{text-decoration:underline}
.btn-tertiary:disabled{background:transparent}
.btn:disabled{background:var(--color-disabled);color:var(--text-secondary);cursor:not-allowed}
/* Figma: a disabled secondary button stays white with its outline; a busy primary (Saving…) keeps its orange. */
.btn-secondary:disabled{background:var(--surface-default)}
.btn-primary.is-busy:disabled{background:var(--action-primary);color:var(--text-primary);cursor:progress}
.btn:focus-visible,.input:focus-visible,select:focus-visible,a:focus-visible{outline:var(--stroke-width) solid var(--focus-ring);outline-offset:var(--stroke-width)}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-24);margin-bottom:var(--space-24)}
/* Inventory variant: metric cards 20 apart (Figma) */
.cards.gap-20{gap:var(--space-20)}
/* Header actions on the Inventory list sit 63 px in from the content edge (Figma) */
.page-actions{margin-right:var(--layout-header-inset)}
/* Scenario panel (review entry, web only): the sidebar button and the list in its dialog */
.scenario-trigger{display:block;width:100%;height:var(--control-40);margin-bottom:var(--space-16);padding:0 var(--space-16);text-align:center;background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-8);color:var(--text-action);font-weight:600;font-size:var(--type-body-size)}
.scenario-trigger:hover{background:var(--color-orangeSoft)}
.scenario-list{max-height:var(--size-480);overflow:auto;margin-top:var(--space-16)}
.scenario-area + .scenario-area{margin-top:var(--space-24)}
.scenario-area > h3{font-size:var(--type-label-size);font-weight:600;color:var(--text-secondary);margin-bottom:var(--space-4)}
.scenario-flow{border-bottom:var(--border-width) solid var(--border-default)}
.scenario-flow > summary{min-height:var(--control-40);padding:var(--space-8) 0;cursor:pointer;font-weight:600;color:var(--text-primary)}
.scenario-flow > summary:focus-visible{outline:var(--stroke-width) solid var(--focus-ring);outline-offset:calc(var(--stroke-width) * -1)}
.scenario-count{margin-left:var(--space-8);font-weight:400;font-size:var(--type-body-small-size);color:var(--text-secondary);white-space:nowrap}
.scenario-flow ul{list-style:none;margin:0 0 var(--space-8);padding:0;display:grid}
.scenario-flow li{display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--space-8);min-height:var(--control-40)}
.scenario-flow a{color:var(--text-action);font-weight:400;text-decoration:underline}
.scenario-note{font-size:var(--type-body-small-size);color:var(--text-secondary);white-space:nowrap}
@media (max-width:600px){.scenario-flow > summary,.scenario-flow li{min-height:var(--control-48)}}
.card{background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-24)}
.card .label{color:var(--text-secondary);font-weight:600;font-size:var(--type-label-size);line-height:var(--space-20)}
.card .metric{font-size:var(--type-metric-size);line-height:var(--type-metric-lh);font-weight:var(--type-metric-weight);margin-top:var(--space-8)}
.toolbar{display:flex;gap:var(--space-24);align-items:center;margin-bottom:var(--space-24)}
.toolbar .field{flex:1}
/* Inventory variant: a fixed-width search (Figma: 584 wide, 44 tall) followed by the filter dropdowns */
.toolbar[hidden]{display:none}
/* Loading skeleton (Figma inventory loading): grey bars in four columns, three rows */
.skeleton-row{display:grid;grid-template-columns:minmax(0,2.8fr) minmax(0,0.6fr) minmax(0,1.2fr) minmax(0,1fr);gap:var(--space-16);align-items:center}
.skeleton{display:block;height:var(--space-12);background:var(--surface-subtle);border-radius:var(--radius-8)}
.toolbar.fixed-search .field{flex:0 0 auto;width:calc(var(--size-560) + var(--space-24))}
.toolbar.fixed-search .input{height:var(--size-44)}
.toolbar.fixed-search{align-items:flex-start;padding-bottom:var(--space-8)}
.toolbar.fixed-search .field label{line-height:var(--space-20)}
/* Filter dropdowns (40 tall) sit centred on the 44 px search input: 1 px border + 1 px offset each side */
.toolbar.fixed-search .dd{margin-top:calc(var(--space-16) + var(--space-12) + var(--border-width) + var(--border-width))}
.field label{display:block;font-weight:600;margin-bottom:var(--space-8)}
.input,.select{width:100%;height:var(--size-44);border:var(--border-width) solid var(--color-controlBorder);border-radius:var(--radius-8);padding:0 var(--space-12);background:var(--surface-default);font:inherit}
.select{width:var(--size-160);font-weight:600;border-color:var(--border-default)}
.table{background:var(--surface-default);border-radius:var(--radius-12);padding:0 var(--space-24)}
.row{display:grid;grid-template-columns:3fr 1fr 1.6fr 1.8fr 1.8fr;align-items:center;padding:var(--size-14) 0;border-bottom:var(--border-width) solid var(--border-default)}
.row.head{color:var(--text-secondary);font-size:var(--type-label-small-size);font-weight:600;padding:var(--space-16) 0 var(--space-12);border-bottom:0}
/* Spaced variant (a table prop): columns are 16 px apart, so a long cell does not run into the next column. */
.table.spaced .row{column-gap:var(--space-16)}
.card-actions{display:flex;flex-wrap:wrap;gap:var(--space-12);align-items:center}
.row:last-child{border-bottom:0}
/* Inventory table variant (Figma Inventory table, 1096 content width): header 48, rows 72 with the divider inside */
.table.cols-inventory .row{grid-template-columns:minmax(0,414fr) minmax(0,110fr) minmax(0,234fr) minmax(0,178fr) minmax(0,160fr)}
/* Figma inventory list: the table card has a 1 px light border. */
.table.cols-inventory{border:var(--border-width) solid var(--border-default)}
.table.rows-fixed .row.head{height:var(--space-48);padding:0;align-items:center}
.table.rows-fixed .row:not(.head){height:calc(var(--space-64) + var(--space-8));padding:0}
/* Products table columns (Figma products list, 1096 content width) */
/* The action column is wide enough for a 160 px View product button (the secondary minimum), so it stays inside its row. */
.table.wide.cols-products .row{grid-template-columns:minmax(0,288fr) minmax(0,244fr) minmax(0,172fr) minmax(0,112fr) minmax(0,120fr) minmax(0,160fr)}
.phone-only{display:none}
.toolbar.search-products .field{width:calc(var(--size-560) + var(--size-160))}
.toolbar.search-products .dd{width:var(--size-240)}
.dd.dd-full{width:var(--size-528)}
/* Active filter (Figma): orange text and border on a light orange fill */
.dd-trigger.is-active{color:var(--text-action);border-color:var(--text-action);background:var(--color-orangeSoft)}
/* Long dropdown values end with an ellipsis, as in the Figma filter controls */
.dd-trigger .dd-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dd-trigger.is-active .dd-value{color:var(--text-action);font-weight:600}
/* Removable filter chips shown under the toolbar */
#filter-chips{display:flex;flex-wrap:wrap;gap:var(--space-8);margin-bottom:var(--space-24)}
#filter-chips:empty{display:none}
.filter-chip{display:inline-flex;align-items:center;gap:var(--space-8);height:var(--control-32);padding:0 var(--space-16);border:var(--border-width) solid var(--text-action);border-radius:var(--radius-badge);background:var(--color-orangeSoft);color:var(--text-action);font-size:var(--type-label-small-size);font-weight:600}
/* Product picker (Figma): its placeholder reads as dark, semibold text */
.dd.dd-full .dd-value.is-placeholder{color:var(--text-primary);font-weight:600}
.dd.dd-full .dd-menu{width:100%}
/* Inline list (Figma product picker): the menu sits in the page flow and pushes the content below it down */
.dd.dd-inline .dd-menu{position:static;box-shadow:none;margin-top:var(--space-8)}
.toolbar.search-products{padding-bottom:0}
#header-action{display:flex;gap:var(--space-12)}
.row .name{font-weight:600}
.row .sub{color:var(--text-secondary);font-size:var(--type-body-small-size)}
.row .qty{font-weight:700}
.row .date{color:var(--text-secondary)}
/* Status badge (Figma Status / Badge): 32 tall, 12 side padding, 8 gap, 16 icon, badge radius */
.chip{display:inline-flex;align-items:center;gap:var(--space-8);height:var(--control-32);border-radius:var(--radius-badge);padding:0 var(--space-12);font-size:var(--type-label-small-size);font-weight:600;white-space:nowrap}
.chip .status-icon{width:var(--space-16);height:var(--space-16);flex:none}
.chip.warning{background:var(--color-amberSoft);color:var(--status-warning)}
.chip.success{background:var(--color-greenSoft);color:var(--status-success)}
.chip.danger{background:var(--color-redSoft);color:var(--status-danger)}
.chip.neutral{background:var(--surface-subtle);color:var(--text-secondary)}
.chip.info{background:var(--color-blueSoft);color:var(--status-info)}
.pager{display:flex;align-items:center;justify-content:space-between;background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-12) var(--space-4) var(--space-12) var(--space-24);height:calc(var(--space-64) + var(--space-4));margin-top:var(--space-24)}
.pager:empty{display:none}
.pager .pages{display:flex;gap:var(--space-8);align-items:center}
.pager .page{min-width:var(--control-40);height:var(--control-40);display:grid;place-items:center;border:var(--border-width) solid var(--border-default);border-radius:var(--radius-8)}
.pager .page[aria-current="page"]{border-color:var(--text-action);color:var(--text-action);font-weight:600}
@media (max-width:600px){
  .shell{grid-template-columns:minmax(0,1fr)}
  .sidebar{display:none}
  .topbar{padding:0 var(--space-16);justify-content:space-between}
  .topbar .crumb,.topbar .badge,.topbar .avatar,.topbar .user-name,.topbar .grow,.topbar .bell{display:none}
  .topbar .brand-mobile{display:block}
  .topbar .brand-mobile .logo-frame{--k:0.84}
  /* Figma phone: buttons and the Menu button are 48 px high (touch targets). */
  .btn{height:var(--control-48)}
  .topbar .menu-btn{height:var(--control-48);width:var(--control-48)}
  /* Figma phone list pages: the title block sits lower, and the header buttons share the row. */
  .list-page{margin-top:calc(var(--space-32) + var(--space-8))}
  #header-action{display:flex;gap:var(--space-12);width:100%}
  #header-action .btn{flex:1;min-width:0}
  /* A button row in the header (Tasks and Handovers on the dashboard) takes the full width, so its buttons share it. */
  #header-action > .btn-row{flex:1;min-width:0}
/* Figma products page: the header actions sit 8 px lower; Import products and Add product are at least 160 px wide. */
.list-page.products-page #header-action{margin-top:var(--space-8)}
.list-page.products-page #header-action .btn{min-width:var(--size-160)}
  .pager .btn-secondary{min-width:0}
  .toolbar.fixed-search .field{width:100%}
  .toolbar.fixed-search{align-items:stretch}
  .toolbar.fixed-search .dd{margin-top:0}
  .page-actions{margin-right:0}
  .table.cols-inventory .row{grid-template-columns:minmax(0,1fr) auto}
  .table.rows-fixed .row:not(.head){height:auto;padding:var(--size-14) 0}
  .table.wide.cols-products .row{grid-template-columns:minmax(0,1fr)}
  /* Phone product card (Figma 375): category and batches cells are folded into the lines above; the batch line comes before the barcode */
  .table.wide.cols-products .row > div:nth-child(3),
  .table.wide.cols-products .row > div:nth-child(4){display:none}
  .table.wide.cols-products .row > div:nth-child(5){order:2}
  .table.wide.cols-products .row > div:nth-child(2){order:3}
  .table.wide.cols-products .row > div:nth-child(6){order:4}
  /* Figma phone product list: each product is a card of 24 px padding; no header row; the pager is the count with Previous and Next. */
  .table.wide.cols-products{background:none;padding:0}
  .table.wide.cols-products .row.head{display:none}
  .table.wide.cols-products .row:not(.head){height:auto;background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-24);margin-bottom:var(--space-16)}
  .pager{background:none;border:0;padding:0;margin-top:var(--space-24)}
  .pager .pages{width:100%;justify-content:space-between}
  .pager .page{display:none}
  .phone-only{display:inline}
  .cards.gap-20{gap:var(--space-16)}
  .pager{height:auto}
  .form-grid{gap:var(--space-16)}
  .form-page{margin-top:0}
  .dd.dd-full{width:100%}
  .facts.facts-3{grid-template-columns:minmax(0,1fr)}
  /* Phone product detail (Figma 375): metric cards side by side; actions and section buttons stacked at their label width */
  .cards.two{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cards.two{gap:var(--space-24)}
  /* Figma phone product detail: each batch line stacks (name, date, status, then the review button). */
  .batch-row{flex-direction:column;align-items:flex-start}

  /* Phone product list: the View product button keeps the 48 px phone touch height and is sized to its label. */
  .table.wide.cols-products .btn{min-width:0}
  .action-inset{margin-right:0}
  .action-row{flex-direction:column;align-items:flex-start;gap:calc(var(--space-24) + var(--space-4))}
  .action-row .btn,.section-buttons .btn,.back-row .btn{min-width:0}
  .section-buttons{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-16)}
  .topbar .menu-btn{display:inline-flex}
  .main{padding:var(--space-16)}
  .page-head{flex-direction:column;gap:var(--space-16);margin-bottom:var(--space-24)}
  .cards{grid-template-columns:1fr;gap:var(--space-16)}
  .toolbar{flex-direction:column;align-items:stretch;gap:var(--space-16)}
  .select,.toolbar .dd{width:100%}
  .row{grid-template-columns:minmax(0,1fr) auto;row-gap:var(--space-8)}
  .row > div{min-width:0}
  .row.head{display:none}
  .row .date,.row .qty{grid-column:1}
  .pager{flex-direction:column;gap:var(--space-16);align-items:stretch}
  .form-grid{grid-template-columns:minmax(0,1fr)}
  .table.wide .row{grid-template-columns:minmax(0,1fr) auto}
  .table.wide .row > div:last-child{grid-column:1 / -1}
  /* Phone (375 px) touch sizes and card rows, from the dropdown standard and the 375 Figma screens */
  .table.wide{background:none;padding:0}
  .table.wide .row{background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-24);margin-bottom:var(--space-16);row-gap:var(--space-12)}
  .table.wide .row.head{display:none}
  .desktop-only{display:none}
  .dd-trigger{height:var(--control-48)}
  .dd-menu{min-width:var(--size-293)}
  .dd-menu [role="option"]{height:var(--control-48)}
  /* Phone footer (Figma 375): the primary action comes first, both actions size to their labels, one per line */
  .form-footer{flex-direction:column-reverse;align-items:flex-start;gap:var(--space-24)}
  /* A primary with its reason on a phone: the button and the reason start on the same left edge, like the other phone actions. */
  .footer-primary{align-items:flex-start}
  /* Figma phone forms: text inputs and dropdown triggers are 48 px high. */
  .input{height:var(--control-48)}
  .form-footer .btn{min-width:0}
  .form-footer.is-inset-wide .btn-primary,.form-footer.is-inset-narrow .btn-primary,.form-footer.is-inset-review .btn-primary,.form-footer.is-inset-dup .btn-primary,.form-footer.is-inset-approve .btn-primary{margin-right:0}
  .form-page.no-phone-crumbs .crumbs{display:none}
  .form-page.no-phone-crumbs{margin-top:var(--space-48)}
  .shell[data-menu="open"] .sidebar{display:flex;position:fixed;top:0;bottom:0;left:0;width:min(var(--size-280),85vw);z-index:20;background:var(--surface-default)}
}
/* Batch facts (review batch): five in a row on desktop, two per row on phones */
.facts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--space-16);margin-top:0}
.fact dt{color:var(--text-secondary);font-size:var(--type-label-small-size);margin-bottom:var(--space-8)}
.fact dd{font-weight:600}
/* Figma product detail facts: the label sits 12 px above its value. */
.facts.facts-3 .fact dt{margin-bottom:var(--space-12)}
.action-stack{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-8);margin-top:var(--space-24)}
.notice{background:var(--color-blueSoft);border-radius:var(--radius-12);padding:var(--space-24);margin-bottom:var(--space-24)}
.notice.is-warning{background:var(--color-amberSoft)}
.notice .alert-title{color:var(--status-info)}
.notice.is-warning .alert-title{color:var(--status-warning)}
.notice .alert-text{margin-top:var(--space-16)}
.notice .alert-text{line-height:var(--space-20)}
.form-card + .notice{margin-top:var(--space-24)}
.action-stack.spaced{gap:var(--space-24)}
/* WCAG 2.5.8: a text link is at least 24 px high; 32 px keeps the hit area clear of the text around it. */
.text-link{color:var(--text-action);font-weight:600;text-decoration:none;display:inline-flex;align-items:center;min-height:var(--control-32)}
.text-link[aria-disabled="true"]{color:var(--text-secondary);text-decoration:none;cursor:not-allowed}
.preview-note{background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-16) var(--space-24);margin-bottom:var(--space-24)}
.table.wide .row{grid-template-columns:2.4fr 1.4fr 1.2fr 0.8fr 0.8fr 1.4fr}
/* Five columns with a row action (Customer orders, Customers): every track is minmax(0, fr), so the action button does not
   change the widths of the rows only. The header row uses the same tracks, so each heading sits over its column. */
.table.wide.cols-5 .row{grid-template-columns:minmax(0,2.4fr) minmax(0,1.4fr) minmax(0,1.2fr) minmax(0,0.9fr) minmax(0,1.5fr);column-gap:var(--space-16)}
@media (max-width:600px){.table.wide.cols-5 .row{grid-template-columns:minmax(0,1fr)}}
.row .barcode{color:var(--text-primary)}
.chips-row{display:flex;align-items:center;gap:var(--space-12);margin:calc(var(--space-16) * -1) 0 var(--space-16)}
.chip-x{background:none;border:0;padding:0 var(--space-16);font-size:var(--type-body-size);line-height:1;color:inherit}
.text-button{background:none;border:0;color:var(--text-action);font-weight:600;padding:0 var(--space-16);height:var(--control-40)}
.batch-line{display:flex;align-items:center;gap:var(--space-16);flex-wrap:wrap;margin-top:var(--space-16)}
.preview-row{padding:var(--space-12) 0;border-bottom:var(--border-width) solid var(--border-default)}
.preview-row:last-child{border-bottom:0}
.file-line{margin-top:var(--space-8);font-weight:400}
/* Figma import page: a smaller heading (the card title size) and a dark subtitle. */
.page-head.is-compact h1{font-family:var(--type-h3-family);font-size:var(--type-h3-size);line-height:var(--type-h3-lh);font-weight:var(--type-h3-weight)}
.page-head.is-compact p{color:var(--text-primary)}
.latest-import{margin-top:var(--space-24)}
.table.wide .chip{white-space:normal;height:auto;min-height:var(--control-32);padding:var(--space-4) var(--space-12);text-align:left}
/* Sidebar items with no built screen: visible, not a link */
.nav .nav-item{display:flex;align-items:center;gap:var(--space-12);height:var(--size-44);padding:0 var(--space-16);border-radius:var(--radius-8);font-size:var(--type-body-size);font-weight:400}
.nav .nav-item .ico{display:inline-flex;width:var(--size-icon);height:var(--size-icon);flex:none;color:var(--text-secondary)}
.nav .nav-item.is-disabled{color:var(--text-primary);cursor:not-allowed}
/* Inside a card, rows are 16 px apart (measured in Figma). The card gap sets that, so the action block adds no margin of its own there. */
.form-card .action-stack{margin-top:0}

/* Figma phone product filters (after the desktop chip rules): "Clear all" sits on its own row above the category chip, left at the gutter. */
@media (max-width:600px){
  .chips-row{flex-direction:column;align-items:flex-start;gap:var(--space-8)}
  .chips-row .text-button{order:-1;margin-left:calc(var(--space-16) * -1)}
}

/* Figma phone forms with a lead card: the card sits about 44 px below the subtitle (add product at 375). */
@media (max-width:600px){
  .page-head:has(+ .lead-card),.page-head:has(+ .form-card),.page-head:has(+ .stack > .card:first-child){margin-bottom:calc(var(--space-32) + var(--space-12))}
  /* Figma phone metric cards: the label is the small label size, so "Batches in stock" stays on one line. */
  .card .label{font-size:var(--type-label-small-size)}
}

/* Figma phone facts: two columns (the desktop five-column rule comes later in the sheet, so this sits at the end). */
@media (max-width:600px){
  .facts{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:var(--space-12)}
  .fact dt{line-height:var(--space-20)}
  /* Figma phone batch card: the title sits 24 px line-high, and the facts follow the subtitle 4 px closer. */
  .form-card:has(.facts) .card-title{line-height:var(--space-24)}
  .form-card:has(.facts) .field-help + .facts{margin-top:calc(var(--space-4) * -1)}
}

/* Tabs keep one line each. On phone the tabs wrap onto further lines rather than scrolling sideways (no sideways scroll at 375, AGENTS). */
.tablist .tab{white-space:nowrap}
/* A section row under the page title (components/section-nav.js) keeps the same gap to the content as the page's own stack. */
#sections:not([hidden]){margin-bottom:var(--space-24)}
@media (max-width:600px){
  .tablist{flex-wrap:wrap;row-gap:var(--space-8)}
}
/* Figma expiry queue: the search field sits 24 px below the tab row. */
#tabs + .toolbar{margin-top:var(--space-24)}

/* Discount request (Figma 43:144682): preset cards, the price line, and four facts in a row. */
.preset-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-16)}
.preset{display:grid;gap:var(--space-8);text-align:left;padding:var(--space-24);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);background:var(--surface-default);color:var(--text-primary)}
.preset.is-selected{border-color:var(--text-action);background:var(--color-orangeSoft);color:var(--text-action)}
.preset-pct{font-weight:600}
.preset-price{font-weight:600}
.preset-gp{color:var(--text-secondary);font-size:var(--type-body-small-size)}
.preset-top{display:flex;align-items:center;justify-content:space-between;gap:var(--space-8)}
.preset-check{width:var(--space-20);height:var(--space-20);flex:none;color:var(--text-action)}
.check-row{display:flex;gap:var(--space-12);align-items:flex-start;cursor:pointer}
.check-box{width:var(--space-20);height:var(--space-20);flex:none;display:grid;place-items:center;border:var(--border-width) solid var(--border-default);border-radius:var(--radius-4);background:var(--surface-default)}
.check-row[aria-checked="true"] .check-box{background:var(--text-action);border-color:var(--text-action)}
.check-tick{width:var(--space-16);height:var(--space-16)}
.check-tick path,.preset-check path{stroke:var(--surface-default)}
.check-label{display:block;font-weight:600}
.price-line{margin-top:var(--space-16)}
.facts-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:600px){
  .preset-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .facts-4{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
.stack.gap-16{gap:var(--space-16)}
[hidden]{display:none!important}
.btn-row{display:flex;flex-wrap:wrap;gap:var(--space-8)}
.preset.is-selected .preset-price{color:var(--text-primary)}
.stack.end-items > *{justify-self:end}
.action-links{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--space-16)}
.row-meta{color:var(--text-secondary);font-size:var(--type-body-small-size)}
.notice.is-success{background:var(--color-greenSoft)}
.notice.is-success .alert-title{color:var(--status-success)}
.notice.is-danger{background:var(--color-redSoft)}
.notice.is-danger .alert-title{color:var(--status-danger)}
.field-reason{max-width:calc(var(--size-600) + var(--space-32) + var(--space-8))}
.field .field-help{color:var(--text-secondary);font-size:var(--type-body-small-size);margin-top:var(--space-4)}
.field .field-error{color:var(--status-danger);font-size:var(--type-body-small-size);margin-top:var(--space-4)}
/* The footer buttons wrap on a narrow card, so the card keeps its 24 px padding and nothing crosses the 16 px phone gutter. */
.card-footer{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--space-8)}
.card-rule{border:0;border-top:var(--border-width) solid var(--border-default);margin:0}
.count-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-16);align-items:start}
.stepper{display:grid;grid-template-columns:var(--control-48) 1fr var(--control-48);width:var(--size-280);max-width:100%;height:var(--control-48);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-8);background:var(--surface-default);overflow:hidden}
.stepper-btn{border:0;background:none;font-size:var(--type-body-size);font-weight:600;color:var(--text-primary);padding:0 var(--space-16)}
.stepper-btn:disabled{color:var(--text-secondary)}
.stepper-value{display:grid;place-items:center;font-weight:600}
.count-match{color:var(--status-success);font-weight:600}
.count-off{color:var(--status-danger);font-weight:600}
.form-footer.is-inset-return .btn-primary{margin-right:calc(var(--space-96) + var(--space-12))}
@media (max-width:600px){.count-grid{grid-template-columns:minmax(0,1fr)}.form-footer.is-inset-return .btn-primary{margin-right:0}}
.stack .notice,.stack .alert{margin-bottom:0}
.filter-row{display:flex;flex-wrap:wrap;gap:var(--space-24)}
.cards.cards-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.stack > .cards{margin-bottom:0}
@media (max-width:600px){.cards.cards-4{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.dash-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:var(--space-24);align-items:start}
.dash-group{display:grid;gap:var(--space-16)}
.dash-row{display:flex;justify-content:space-between;align-items:center;gap:var(--space-16);padding:var(--space-16) 0;border-top:var(--border-width) solid var(--border-default)}
/* WCAG 2.5.8: a standalone link is at least 24 px high; 32 px keeps the hit area clear of its neighbours. */
.link-action{color:var(--text-action);font-weight:600;text-decoration:none;display:inline-flex;align-items:center;min-height:var(--control-32)}
@media (max-width:600px){.dash-grid{grid-template-columns:minmax(0,1fr)}.dash-row{flex-direction:column;align-items:flex-start}}
.dash-actions{display:flex;align-items:center;gap:var(--space-16);flex-wrap:wrap;justify-content:flex-end}
.record-facts{display:grid;gap:var(--space-16);margin:0}
.record-row{display:grid;grid-template-columns:var(--size-280) minmax(0,1fr);gap:var(--space-16);align-items:baseline}
.record-row dt{color:var(--text-secondary)}
.record-row dd{margin:0;font-weight:600}
/* A picture (the business logo, the listing photo): one tile for the form and the review. The image fits inside it; the placeholder shows the initials. */
.picture-tile{width:var(--space-96);height:var(--space-96);flex:0 0 auto;display:grid;place-items:center;overflow:hidden;border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);background:var(--surface-subtle)}
.picture-tile img{width:100%;height:100%;object-fit:contain;display:block}
.picture-tile.is-empty{background:var(--color-orangeSoft);color:var(--text-action);font-weight:600;font-size:var(--type-h3-size)}
.picture-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-16)}
/* A listing row: the listing photo beside its details. The text takes the rest of the row and may wrap. */
.listing-main{display:flex;align-items:flex-start;gap:var(--space-16);min-width:0}
.record-media{margin-bottom:var(--space-16)}
/* The amount due: the one figure a cashier reads first, set apart from the subtotal and tax above it. */
.record-row.is-total{padding-top:var(--space-16);border-top:var(--border-width) solid var(--border-default)}
.record-row.is-total dt{color:var(--text-primary);font-weight:600}
.record-row.is-total dd{font-family:var(--type-h3-family);font-size:var(--type-h3-size);line-height:var(--type-h3-lh);font-weight:var(--type-h3-weight)}
/* A variant for a table inside a card (the checkout basket): on a phone each line is a plain row, not a second card. */
@media (max-width:600px){.table.wide.plain-rows .row{background:none;border:0;border-bottom:var(--border-width) solid var(--border-default);border-radius:0;padding:var(--space-12) 0;margin-bottom:0}}
.toolbar-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--space-16)}
.toolbar-search{flex:1 1 var(--size-360);min-width:0}
.toolbar-row .dd{width:var(--size-160)}
@media (max-width:600px){.record-row{grid-template-columns:minmax(0,1fr);gap:var(--space-4)}.toolbar-search{flex-basis:100%}.toolbar-row .dd{width:100%}}
.link-row{display:flex;flex-wrap:wrap;gap:var(--space-48);margin-top:var(--space-24);padding-left:var(--space-16)}
/* The links at the bottom of a screen are ink, underlined, so they still read as links without the orange. */
.link-row .link-action,.link-row .text-link{color:var(--text-primary);text-decoration:underline}
.field.is-error .input{border-color:var(--status-danger)}

/* Settings area: auth screens (sign up and sign in, flows 18 and 19). No shell: the mark sits above one centred card. */
.auth-page{min-height:100vh;display:flex;flex-direction:column;align-items:center;padding:calc(var(--space-32) + var(--space-4)) var(--space-16) var(--space-48);background:var(--surface-canvas)}
.auth-brand{margin-bottom:var(--space-24)}
.auth-brand .logo-frame{--k:0.84}
.auth-card{width:100%;max-width:var(--size-480);background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-24);display:grid;gap:var(--space-16);align-content:start}
.auth-card .card-title{margin:0}
.auth-text{color:var(--text-primary)}
.auth-footer{display:grid;gap:var(--space-24);justify-items:start;margin-top:var(--space-8)}
/* Auth: the label row holds a link on the right ("Forgot password?"); the line under the primary button holds the sign-in or create link. */
.field-label-row{display:flex;justify-content:space-between;align-items:center;gap:var(--space-16);margin-bottom:var(--space-8)}
.field-label-row label{margin-bottom:0}
.auth-line{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-8)}
.auth-line .link-action,.field-label-row .link-action{color:var(--text-primary);text-decoration:underline;min-height:var(--control-40)}
/* Settings activity history: a search field 760 wide on desktop (Figma list frame); full width on phone. */
.toolbar-row .activity-search{flex:0 0 auto;width:calc(var(--size-600) + var(--size-160))}
@media (max-width:600px){.toolbar-row .activity-search{width:100%}}
/* Outlined message inside a card (Settings forms and auth cards): the card's gap sets the spacing, so no bottom margin. */
.notice-outline.is-in-card{margin-bottom:0}
.tab.is-active{color:var(--text-action);border-bottom-color:var(--text-action)}
.tab[aria-disabled="true"]{color:var(--text-secondary)}
#tabs{min-width:0}
#tabs{display:grid;grid-template-columns:minmax(0,1fr)}
#tabs>.tablist{min-width:0}
.page-stack{grid-template-columns:minmax(0,1fr)}

/* Phone: a wide table is one card per row, its values in one column (Registers, Sales history). Placed here, after the desktop
   .table.wide rule, so it wins at 375 px. */
@media (max-width:600px){.table.wide .row{grid-template-columns:minmax(0,1fr)}}
@media (max-width:600px){.table.wide .row > div[data-label]::before{content:attr(data-label);display:block;color:var(--text-secondary);font-size:var(--type-label-small-size);font-weight:600}}

/* Hub lists (designed pages): the action column sits at the right edge, as in the other list pages. */
.table.hub .row{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
.table.hub .row > div:last-child{justify-self:end}

/* Designed card lists (Inventory hub): one card per row, as in Figma. Tokens only. */
.hub-cards{display:grid;gap:var(--space-24)}
.hub-card{display:flex;align-items:center;justify-content:space-between;gap:var(--space-24);background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-12);padding:var(--space-24)}
.hub-card-body{display:grid;gap:var(--space-4)}
.hub-card-title{font-family:var(--type-h3-family);font-size:var(--type-h3-size);line-height:var(--type-h3-lh);font-weight:var(--type-h3-weight)}
.hub-card-meta{font-size:var(--type-body-small-size);color:var(--text-secondary)}
.hub-card-text{font-size:var(--type-body-size);font-weight:600}
@media (max-width:600px){.hub-card{flex-direction:column;align-items:stretch}}

/* Analytics (flow 10): the reconciliation bar and the loading skeleton. Tokens only. */
.analytics-bar{height:var(--space-8);background:var(--surface-subtle);border-radius:var(--radius-4);overflow:hidden;margin-top:var(--space-16)}
.analytics-bar span{display:block;height:100%;background:var(--action-primary)}
.skeleton-card .skeleton-line{height:var(--space-16);width:100%;background:var(--surface-subtle);border-radius:var(--radius-4);margin-top:var(--space-8)}
.skeleton-card .skeleton-line.is-label{width:40%;margin-top:0}
.skeleton-card .skeleton-line.is-value{height:var(--space-32);width:60%}
.skeleton-card .skeleton-line.is-short{width:25%}

/* Analytics: filter captions, the sold and remaining legend, the closed-batch table and the measurement list. Tokens only. */
.filter-field{display:grid;gap:var(--space-8)}
.filter-caption{color:var(--text-secondary);font-size:var(--type-label-small-size);line-height:var(--type-label-small-lh);font-weight:600}
.analytics-legend{display:flex;flex-wrap:wrap;gap:var(--space-8) var(--space-24);margin-top:var(--space-16)}
.analytics-legend p{display:flex;align-items:center;gap:var(--space-8)}
.swatch{width:var(--space-12);height:var(--space-12);border-radius:var(--radius-4);flex:none}
.swatch.is-sold{background:var(--action-primary)}
.swatch.is-left{background:var(--surface-subtle);border:var(--border-width) solid var(--border-default)}
.table.wide.cols-batches{background:none;padding:0}
.table.wide.cols-batches .row{grid-template-columns:minmax(0,2.2fr) minmax(0,0.8fr) minmax(0,0.8fr) minmax(0,1.8fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr) minmax(0,0.8fr);column-gap:var(--space-16);align-items:center}
@media (min-width:601px){.table.wide.cols-batches .row > :nth-child(2),.table.wide.cols-batches .row > :nth-child(3),.table.wide.cols-batches .row > :nth-child(5),.table.wide.cols-batches .row > :nth-child(6),.table.wide.cols-batches .row > :nth-child(7){text-align:right}}
@media (max-width:600px){.table.wide.cols-batches .row{grid-template-columns:minmax(0,1fr);row-gap:var(--space-8)}}
@media (max-width:600px){.cards.cards-stack-phone{grid-template-columns:minmax(0,1fr)}}
.measure-list{display:grid;grid-template-columns:minmax(0,var(--size-240)) minmax(0,1fr);gap:var(--space-12) var(--space-24);margin:0}
.measure-list dt{font-weight:600}
.measure-list dd{margin:0;color:var(--text-secondary)}
@media (max-width:600px){.measure-list{grid-template-columns:minmax(0,1fr);gap:var(--space-4) 0}.measure-list dd{margin-bottom:var(--space-12)}}

/* Analytics: the units-by-week bar chart (components/charts.js). One hue; each value is printed as text; the tooltip adds detail only. Tokens only. */
.bar-chart{display:grid;gap:var(--space-8)}
.bar-row{position:relative;display:grid;grid-template-columns:minmax(0,var(--size-240)) minmax(0,1fr) minmax(0,var(--space-96));grid-template-areas:"name track value";column-gap:var(--space-16);align-items:center;padding:var(--space-8);border-radius:var(--radius-8)}
.bar-row:hover,.bar-row:focus-visible{background:var(--surface-subtle)}
.bar-row:focus-visible{outline:var(--stroke-width) solid var(--focus-ring);outline-offset:calc(var(--stroke-width) * -1)}
.bar-name{grid-area:name;margin:0;font-weight:600}
.bar-detail{display:block;font-weight:400;color:var(--text-secondary);font-size:var(--type-label-small-size);line-height:var(--type-label-small-lh)}
.bar-track{grid-area:track;height:var(--space-16);background:var(--surface-subtle);border-radius:0 var(--radius-4) var(--radius-4) 0}
.bar-fill{display:block;height:100%;background:var(--action-primary);border-radius:0 var(--radius-4) var(--radius-4) 0}
.bar-value{grid-area:value;margin:0;text-align:right;font-weight:600;font-variant-numeric:tabular-nums}
.bar-tip{display:none;position:absolute;z-index:1;left:var(--size-240);bottom:100%;margin-bottom:var(--space-4);padding:var(--space-8) var(--space-12);background:var(--surface-default);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-8);color:var(--text-primary);font-size:var(--type-label-small-size);line-height:var(--type-label-small-lh);white-space:nowrap}
.bar-row:hover .bar-tip,.bar-row:focus-visible .bar-tip{display:block}
@media (max-width:600px){.bar-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name name" "track value";row-gap:var(--space-8)}.bar-tip{left:0}}

/* Between cards and the next section 24 px (the spacing rule); the Branches page had its metric cards touching the list (23 Nov 2026). */
.list-page #metrics + #body{margin-top:var(--space-24)}
