/* Webbership UI components. Flexbox only (old Safari), sentence case, no inline styles. */
.w-body { margin: 0; background: var(--w-ground); color: var(--w-ink); font-family: var(--w-font); font-size: var(--w-text-md); line-height: var(--w-leading-body); -webkit-text-size-adjust: 100%; }
.w-h1 { font-family: var(--w-font-display); font-size: var(--w-text-display); font-weight: var(--w-weight-bold); line-height: var(--w-leading-tight); margin: 0 0 var(--w-space-xs); }
.w-h2 { font-size: var(--w-text-input); font-weight: var(--w-weight-bold); margin: 0 0 var(--w-space-md); }
.w-h3 { font-size: var(--w-text-md); font-weight: var(--w-weight-bold); margin: var(--w-space-lg) 0 var(--w-space-sm); }
.w-muted { color: var(--w-ink-muted); margin: 0 0 var(--w-space-xl); }
.w-row { display: flex; flex-wrap: wrap; align-items: center; }
.w-row > * { margin: 0 var(--w-space-sm) var(--w-space-sm) 0; }
.w-panel { background: var(--w-surface); border: 1px solid var(--w-hairline); border-radius: var(--w-radius); padding: var(--w-pad-inset); margin-bottom: var(--w-space-lg); }

.w-btn { min-height: var(--w-touch); padding: 0 var(--w-pad-inset); border-radius: var(--w-radius); font: inherit; font-size: var(--w-text-input); font-weight: var(--w-weight-bold); cursor: pointer; border: 1px solid transparent; -webkit-appearance: none; }
.w-btn--primary { background: var(--w-accent); color: var(--w-on-accent); }
.w-btn--primary:active { background: var(--w-accent-press); }
.w-btn--secondary { background: var(--w-surface); color: var(--w-ink); border-color: var(--w-hairline-strong); }
.w-btn--quiet { background: transparent; color: var(--w-accent); }
.w-btn:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 2px; }
/* A key: the secondary control the POS taps all day (quantity chips, number grid, steppers, tip and cash buttons, PIN pad).
   One look; each block keeps its own size and states. */
.w-key { border: 1px solid var(--w-hairline-strong); background: var(--w-surface); color: var(--w-ink); font: inherit; cursor: pointer; }

.w-pill { display: inline-flex; align-items: center; height: 34px; padding: 0 var(--w-space-md); border-radius: var(--w-radius-pill); background: var(--w-strip); color: var(--w-strip-ink); font-size: var(--w-text-xs); }
.w-pill__dot { width: 8px; height: 8px; border-radius: var(--w-radius-pill); margin-right: var(--w-space-sm); }
.w-pill__dot--live { background: var(--w-live); }
.w-pill__dot--warn { background: var(--w-warn); }
.w-pill__dot--fault { background: var(--w-fault); }
.w-pill__dot--offline { background: var(--w-offline); }

.w-bo__mark { width: 28px; height: 28px; border-radius: var(--w-radius-sm); background: var(--w-accent); color: var(--w-on-accent); display: inline-flex; align-items: center; justify-content: center; font-weight: var(--w-weight-heavy); margin-right: var(--w-space-sm); }
.w-panel--flush { padding: 0; overflow: hidden; }
.w-panel__head { padding: var(--w-space-md) var(--w-pad-inset); margin: 0; border-bottom: 1px solid var(--w-hairline); }
.w-panel__body { padding: var(--w-space-md) var(--w-pad-inset); margin: 0; }
/* An empty state (templ emptyState) is muted text; inside a flush panel it takes the body's padding. */
.w-panel--flush > .w-empty { padding: var(--w-space-md) var(--w-pad-inset); margin: 0; }
.w-muted-inline { color: var(--w-ink-muted); font-weight: var(--w-weight-medium); font-size: var(--w-text-xs); margin-left: var(--w-space-xs); }
.w-table { width: 100%; border-collapse: collapse; font-size: var(--w-text-sm); }
.w-table th { text-align: left; font-size: var(--w-text-2xs); font-weight: var(--w-weight-semibold); color: var(--w-ink-muted); background: var(--w-inset); padding: var(--w-space-sm) var(--w-pad-inset); }
.w-table td { padding: var(--w-space-sm) var(--w-pad-inset); border-top: 1px solid var(--w-hairline); }
.w-num, .w-table .w-num { text-align: right; font-variant-numeric: tabular-nums; }

/* form fields and the alert box */
.w-field { display: block; margin-bottom: var(--w-space-lg); }
.w-field__label { display: block; font-size: var(--w-text-xs); font-weight: var(--w-weight-semibold); color: var(--w-ink-muted); margin-bottom: var(--w-space-xs); }
.w-input { box-sizing: border-box; width: 100%; min-height: var(--w-touch); padding: 0 var(--w-space-md); border: 1px solid var(--w-hairline-strong); border-radius: var(--w-radius); background: var(--w-surface); color: var(--w-ink); font: inherit; font-size: var(--w-text-input); -webkit-appearance: none; }
.w-input:focus { outline: 2px solid var(--w-accent); outline-offset: 1px; }
.w-btn--block { display: block; width: 100%; }
.w-alert { border: 1px solid var(--w-fault); border-left-width: 4px; border-radius: var(--w-radius); padding: var(--w-space-sm) var(--w-space-md); margin: 0 0 var(--w-space-lg); color: var(--w-ink); background: var(--w-surface); }

/* editors */
.w-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.w-link { color: var(--w-accent); text-decoration: none; }
.w-link:hover, .w-link:focus-visible { text-decoration: underline; }
.w-btn--link { display: inline-flex; align-items: center; text-decoration: none; box-sizing: border-box; }
.w-notice { border: 1px solid var(--w-live); border-left-width: 4px; border-radius: var(--w-radius); padding: var(--w-space-sm) var(--w-space-md); margin: 0 0 var(--w-space-lg); background: var(--w-surface); }
.w-subnav { display: flex; flex-wrap: wrap; margin: var(--w-space-sm) 0 var(--w-space-xl); border-bottom: 1px solid var(--w-hairline); }
.w-subnav__link { display: flex; align-items: center; min-height: var(--w-touch-min); padding: var(--w-space-sm) var(--w-space-md); margin-bottom: -1px; color: var(--w-ink-muted); text-decoration: none; font-weight: var(--w-weight-semibold); font-size: var(--w-text-sm); border-bottom: 2px solid transparent; }
.w-subnav__link--active { color: var(--w-ink); border-bottom-color: var(--w-accent); }
.w-form { margin-bottom: var(--w-space-lg); }
.w-form--inline { display: flex; flex-wrap: wrap; align-items: flex-end; }
.w-form--inline > * { margin: 0 var(--w-space-sm) 0 0; }
.w-fields { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.w-fields > .w-field { flex: 1 1 220px; margin: 0 8px 16px; min-width: 0; }
.w-field__hint { display: block; font-size: var(--w-text-xs); color: var(--w-ink-muted); margin-top: var(--w-space-xs); }
.w-field__hint--warn { color: var(--w-warn); font-weight: var(--w-weight-semibold); }
.w-field__error { display: block; font-size: var(--w-text-xs); color: var(--w-fault); font-weight: var(--w-weight-semibold); margin-top: var(--w-space-xs); }
.w-input[aria-invalid="true"] { border-color: var(--w-fault); }
select.w-input { padding-right: var(--w-space-2xl); }
.w-rows td { padding: var(--w-space-xs) var(--w-space-sm); vertical-align: top; }
.w-rows th { padding: var(--w-space-sm); }
.w-rows .w-input { min-width: 70px; }
/* A form's action buttons: a .w-row set apart from the fields above. */
.w-actions { margin-top: var(--w-space-md); }
.w-checks, .w-fieldset { border: 0; padding: 0; }
.w-checks { margin: 0 0 var(--w-space-sm); }
.w-check { display: inline-flex; align-items: center; min-height: var(--w-touch-min); margin: 0 var(--w-pad-inset) 0 0; font-size: var(--w-text-md); }
.w-check input { width: 20px; height: 20px; margin: 0 var(--w-space-sm) 0 0; accent-color: var(--w-accent); }
.w-checks--stack .w-check { display: flex; margin-right: 0; padding: var(--w-space-2xs) 0; }
.w-checks legend { padding: 0; margin-bottom: var(--w-space-xs); }
.w-danger { padding: 0; }
.w-danger__summary { padding: var(--w-space-md) var(--w-pad-inset); cursor: pointer; color: var(--w-fault); font-weight: var(--w-weight-semibold); }
.w-danger__body { padding: 0 var(--w-pad-inset) var(--w-pad-inset); }
.w-danger--inline { display: inline-block; border: 0; background: transparent; margin: 0; text-align: left; }

/* invoices: lists as cards (they read on a phone), totals, the CUI lookup row */
.w-list { list-style: none; margin: 0 0 var(--w-space-lg); padding: 0; }
.w-list__item { border-top: 1px solid var(--w-hairline); }
.w-list__item:first-child { border-top: 0; }
.w-list__link { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: var(--w-space-sm) var(--w-pad-inset); color: var(--w-ink); text-decoration: none; }
.w-list__link:hover, .w-list__link:focus-visible { background: var(--w-inset); }
.w-list__main { display: flex; flex-direction: column; min-width: 0; margin-right: var(--w-space-md); }
.w-list__sub { color: var(--w-ink-muted); font-size: var(--w-text-xs); overflow-wrap: anywhere; }
.w-list__side { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }
.w-list__side > * { margin-top: var(--w-space-2xs); }
.w-list--plain { margin: var(--w-space-sm) 0; }
.w-list__row { display: flex; justify-content: space-between; padding: var(--w-space-xs) 0; border-top: 1px solid var(--w-hairline); overflow-wrap: anywhere; }
.w-list__row:first-child { border-top: 0; }
/* A tag: a short state beside a name. Tones colour it; the POS sets it tighter (w-tag--compact, pos.css). */
.w-tag { display: inline-block; font-size: var(--w-text-2xs); font-weight: var(--w-weight-semibold); padding: 1px var(--w-space-sm); border-radius: var(--w-radius-pill); background: var(--w-inset); color: var(--w-ink-muted); margin-left: var(--w-space-xs); }
.w-tag--sent { color: #205c64; background: #daf0f3; }
.w-tag--void { color: #a4241b; }
.w-tag--ready { color: #fff; background: var(--w-live); }
.w-errors { margin: var(--w-space-md) 0 0; padding-left: var(--w-pad-inset); }
.w-errors li { margin-bottom: var(--w-space-sm); }
.w-alert--warn { border-color: var(--w-warn); }
.w-alert--ok { border-color: var(--w-live); }
.w-notice--warn { border-color: var(--w-warn); }
.w-alert__title { margin: 0 0 var(--w-space-xs); font-weight: var(--w-weight-bold); }
.w-alert__list { margin: 0; padding-left: var(--w-pad-inset); }
.w-lookup { display: flex; align-items: flex-start; }
.w-lookup__field { flex: 1 1 auto; min-width: 0; margin-right: var(--w-space-sm); }
.w-lookup__btn { margin-top: var(--w-space-2xl); flex: 0 0 auto; }
.w-muted-top { margin: 0 0 var(--w-space-xs); font-size: var(--w-text-sm); }

/* stock documents: cards and line editors that read on a phone, tables that scroll in their own box */
.w-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.w-cards { list-style: none; margin: 0 0 var(--w-space-lg); padding: 0; }
.w-card { background: var(--w-surface); border: 1px solid var(--w-hairline); border-radius: var(--w-radius); margin-bottom: var(--w-space-sm); }
.w-card__link { display: block; padding: var(--w-space-md) var(--w-space-lg); color: var(--w-ink); text-decoration: none; min-height: var(--w-touch); box-sizing: border-box; }
.w-card__title { display: block; font-weight: var(--w-weight-bold); }
.w-card__meta { display: block; font-size: var(--w-text-xs); color: var(--w-ink-muted); margin-top: var(--w-space-3xs); }
.w-line { border: 1px solid var(--w-hairline); border-radius: var(--w-radius); padding: var(--w-space-md) var(--w-space-md) var(--w-space-2xs); margin: 0 0 var(--w-space-md); min-width: 0; }
.w-fieldset { margin: 0; min-width: 0; }
/* Label/value pairs (a dl): dt and dd in two columns that wrap on a phone. --totals right-aligns the values.
   --rows holds one pair per .w-pairs__row, label left and value right; --strong is the row that sums them. */
.w-pairs { display: flex; flex-wrap: wrap; margin: var(--w-space-md) 0 0; }
.w-pairs > dt { flex: 1 1 45%; color: var(--w-ink-muted); font-size: var(--w-text-sm); padding: var(--w-space-2xs) 0; }
.w-pairs > dd { flex: 1 1 55%; margin: 0; padding: var(--w-space-2xs) 0; text-align: left; font-variant-numeric: tabular-nums; }
.w-pairs--totals > dd { text-align: right; }
.w-pairs--rows { display: block; flex-wrap: nowrap; }
.w-pairs__row { display: flex; justify-content: space-between; padding: var(--w-space-2xs) 0; }
.w-pairs__row > dt, .w-pairs__row > dd { margin: 0; }
.w-pairs__row--strong { font-weight: var(--w-weight-bold); font-size: var(--w-text-lg); }
.w-doc-table th, .w-doc-table td { padding: var(--w-space-sm) var(--w-space-sm); white-space: nowrap; }
.w-doc-table td:nth-child(2) { white-space: normal; min-width: 140px; }
.w-negative { color: var(--w-fault); }
/* An entry form on one line that wraps on a phone (the count and the waste forms). */
.w-count__form { display: flex; flex-wrap: wrap; align-items: center; margin-top: var(--w-space-sm); }
.w-count__form > * { margin: 0 var(--w-space-sm) var(--w-space-sm) 0; }
.w-count__form .w-count__qty { flex: 1 1 80px; min-width: 0; width: 80px; }
.w-count__form .w-count__unit { flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; }
.w-inline { display: inline; margin: 0; }
