/* Order list, order details and item selection. Theme tokens are supplied by orders-design.css. */
#page-content.flow-orders-page,
#page-content.flow-order-detail { min-width:0; }
#page-content .flow-orders-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0 0 16px; }
#page-content .flow-orders-toolbar .flow-order-search { flex:1 1 260px; width:100%; max-width:390px; min-width:0; margin-right:4px; }
#page-content .flow-order-search input { min-width:0; width:100%; }
#page-content .flow-orders-toolbar > .button { flex:0 1 auto; min-width:0; }
#page-content .flow-orders-toolbar :is(.flow-mobile-tools-toggle,.flow-mobile-scan,.flow-mobile-reset),
#page-content .flow-tools-only { display:none!important; }
#page-content .flow-orders-toolbar [data-act="columns-open"] { margin-left:auto; }
#page-content.flow-orders-page .orders-viewbar { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin:0 0 18px; }
#page-content.flow-orders-page .status-filters { flex:1 1 330px; display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0; padding:0; overflow:visible; max-width:100%; }
#page-content.flow-orders-page .status-filter { min-height:var(--orders-control-height,44px); padding:10px 14px; border:0; border-radius:var(--orders-radius-control,999px); color:var(--text); background:var(--control-surface); font-size:13px; line-height:1.3; white-space:nowrap; }
#page-content.flow-orders-page .status-filter.active { color:var(--accent)!important; background:var(--flow-selected-glass)!important; box-shadow:var(--flow-selected-edge); }
#page-content.flow-orders-page .status-filter b { min-width:18px; font-size:12px; font-weight:550; opacity:.8; }
.flow-status-more { position:relative; flex:0 1 auto; z-index:20; }
.flow-status-trigger { list-style:none; display:flex; align-items:center; justify-content:center; gap:8px; min-height:var(--orders-control-height,44px); padding:10px 14px; border-radius:var(--orders-radius-control,999px); font-size:13px; line-height:1.3; color:var(--text); background:var(--control-surface); cursor:pointer; box-sizing:border-box; }
.flow-status-trigger::-webkit-details-marker { display:none; }
.flow-status-trigger > .icon { width:17px; height:17px; flex:0 0 17px; }
.flow-status-trigger > .icon:last-child { width:14px; height:14px; }
.flow-status-trigger > span { overflow-wrap:anywhere; }
.flow-status-more.has-selection > summary { color:var(--accent); background:var(--flow-selected-glass); box-shadow:var(--flow-selected-edge); }
.flow-status-options { position:absolute; top:calc(100% + 8px); left:0; display:grid; gap:3px; width:max-content; min-width:230px; max-width:min(340px,calc(100vw - 34px)); max-height:min(420px,60dvh); overflow:auto; padding:8px; border-radius:var(--orders-radius-inset,20px); background:var(--menu-surface,var(--card-surface)); box-shadow:var(--card-edge),0 16px 48px #0003; backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); }
#page-content.flow-orders-page .flow-status-options .status-filter { display:flex; align-items:center; justify-content:flex-start; gap:9px; width:100%; min-height:var(--orders-control-height,44px); text-align:left; white-space:normal; border-radius:var(--orders-radius-control,999px); background:transparent; }
.flow-status-options .status-filter > span { flex:1; }
#page-content.flow-orders-page .orders-viewbar .tabs { flex:0 1 auto; margin:0; max-width:100%; }
#page-content.flow-orders-page .orders-viewbar .tab { min-height:var(--orders-control-height,44px); padding:10px 15px; font-size:13px; }
#page-content.flow-orders-page .orders-viewbar .tab.active { color:var(--accent); }

#page-content .flow-orders-list { padding:0!important; border-radius:var(--orders-radius-card,24px); overflow:hidden; }
#page-content .flow-orders-list .order-columns-scroll { width:100%; padding:0; overflow-x:auto; scrollbar-width:thin; scrollbar-color:color-mix(in srgb,var(--muted) 30%,transparent) transparent; }
#page-content .flow-orders-list .order-head,
#page-content .flow-orders-list .order-row { box-sizing:border-box; width:100%; column-gap:10px!important; padding-inline:16px; }
#page-content .flow-orders-list .order-head { min-height:var(--orders-control-height,44px); color:var(--muted); background:var(--control-surface)!important; border:0; font-size:11px; font-weight:500; line-height:1.4; letter-spacing:.02em; }
#page-content .flow-orders-list .order-row { min-height:90px; padding-block:14px; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--text); box-shadow:none; }
#page-content .flow-orders-list .order-row:last-child { border-bottom:0; }
#page-content .flow-orders-list .order-row:hover { background:var(--flow-neutral-hover)!important; }
#page-content .flow-orders-list .order-row.selected { background:var(--flow-selected-glass)!important; box-shadow:var(--flow-selected-edge)!important; }
#page-content .flow-orders-list :is(.order-row,.order-head) > [data-order-column] { min-width:0!important; max-width:100%; width:auto!important; overflow-wrap:anywhere; clip-path:none!important; position:static!important; background:transparent!important; }
#page-content .flow-orders-list [data-order-column="amount"] { min-width:0!important; width:auto!important; font-size:14px; line-height:1.4; font-weight:600; text-align:right; white-space:normal!important; font-variant-numeric:tabular-nums; }
#page-content .flow-orders-list [data-order-column="amount"] .subline { font-size:12px; font-weight:400; line-height:1.4; white-space:normal!important; margin-top:4px; }
#page-content .flow-orders-list [data-order-column="actions"] { display:flex; align-items:center; justify-content:flex-end; width:auto!important; min-width:0; gap:0; }
#page-content .flow-orders-list [data-order-column="actions"] .icon-btn { width:44px; height:var(--orders-control-height,44px); min-width:44px; flex:0 0 44px; }
#page-content .flow-orders-list [data-order-column="status"] { min-width:0; }
#page-content .flow-orders-list [data-order-column="status"] :is(button,.state-pill) { max-width:100%; white-space:normal; min-height:36px; line-height:1.3; }
#page-content .flow-orders-list .customer-cell { gap:9px; }
#page-content .flow-orders-list .customer-cell > div { min-width:0; }
#page-content .flow-orders-list .customer-name { font-size:14px; font-weight:500; line-height:1.4; white-space:normal; overflow-wrap:anywhere; }
#page-content .flow-orders-list .avatar-square { width:34px; height:34px; flex:0 0 34px; border-radius:var(--orders-radius-control,999px); color:var(--accent); background:var(--flow-control-glass); }
#page-content .flow-orders-list .order-number { max-width:100%; font-size:14px; font-weight:600; white-space:normal!important; overflow-wrap:anywhere; }
#page-content .flow-orders-list .number-cell :is(time,.order-type),
#page-content .flow-orders-list .subline { color:var(--muted); font-size:12px; line-height:1.4; }
#page-content .flow-orders-list .flow-draft-label { color:var(--muted)!important; }
#page-content .flow-orders-list .table-bottom { padding:14px 16px; background:var(--control-surface)!important; color:var(--muted); font-size:12px; border-top:1px solid var(--line); }
#page-content .flow-orders-list.flow-list-empty .order-head { display:none!important; }
#page-content .flow-orders-list.flow-list-empty .order-columns-scroll { overflow:hidden; }
#page-content .flow-orders-list.flow-list-empty #order-list .empty { min-height:240px; padding:40px 20px; }
#page-content.flow-orders-page .list-hint { display:flex; gap:12px; flex-wrap:wrap; margin-top:12px; color:var(--muted); font-size:12px; line-height:1.5; }

/* Cards depend on the available work area, not just on the browser width. */
#page-content .flow-orders-list.flow-list-cards:not(.flow-list-empty) { background:none!important; box-shadow:none!important; overflow:visible; border:0!important; }
#page-content .flow-list-cards .order-columns-scroll { overflow:visible!important; }
#page-content .flow-list-cards .order-head { display:none!important; }
#page-content .flow-list-cards #order-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); gap:14px; }
#page-content .flow-list-cards .order-row { margin:0!important; padding:18px!important; min-height:0; align-items:start; row-gap:10px; border:0!important; border-radius:var(--orders-radius-inset,20px)!important; background:var(--card-surface)!important; box-shadow:var(--card-edge)!important; backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); }
#page-content .flow-list-cards .order-row > [data-order-column="number"] { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding-top:8px; }
#page-content .flow-list-cards .number-cell .order-number { font-size:16px; }
#page-content .flow-list-cards .order-row > [data-order-column="actions"] { width:44px!important; justify-content:flex-end; align-self:start; }
#page-content .flow-list-cards [data-act="print-order"] { display:none!important; }
#page-content .flow-list-cards .order-row > [data-order-column="amount"] { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px 14px; padding-top:12px; margin-top:2px; border-top:1px solid var(--line); font-size:18px; text-align:left; }
#page-content .flow-list-cards [data-order-column="amount"] .subline { text-align:right; margin:0; font-size:12px; }
#page-content .flow-list-cards [data-order-column="customer"] { align-items:center; }
#page-content .flow-list-cards [data-order-column="customer"] .avatar-square { width:30px; height:30px; flex-basis:30px; font-size:11px; }
#page-content .flow-list-cards [data-order-column="status"] { padding-top:2px; }
#page-content .flow-list-cards [data-order-column="items"],
#page-content .flow-list-cards [data-order-column="due"],
#page-content .flow-list-cards [data-order-column="payment"] { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; font-size:13px; }
#page-content .flow-list-cards [data-order-column="due"]::before { content:"К выдаче"; color:var(--muted); font-size:12px; margin-right:auto; }
#page-content .flow-list-cards [data-order-column="payment"]::before { content:"Способ оплаты"; color:var(--muted); font-size:12px; margin-right:auto; }
:lang(en) #page-content .flow-list-cards [data-order-column="due"]::before { content:"Due"; }
:lang(en) #page-content .flow-list-cards [data-order-column="payment"]::before { content:"Payment method"; }
#page-content .flow-list-cards .order-row > .order-column-hidden { display:none!important; }
#page-content .flow-list-cards .table-bottom { margin-top:14px; border:0; border-radius:var(--orders-radius-inset,20px); }
/* Mobile defaults and saved visibility remain native. A selected column must
   not disappear under older mobile stylesheet rules. */
html:root.orders-crystal body #page-content .flow-list-cards .order-row > [data-order-column]:not(.order-column-hidden):not(.flow-card-empty-field) { display:flex!important; visibility:visible!important; opacity:1!important; }
html:root.orders-crystal body #page-content .flow-list-cards .order-row > [data-order-column].flow-card-empty-field { display:none!important; }
html:root.orders-crystal body #page-content .flow-list-cards .order-row > [data-order-column="items"]:not(.order-column-hidden) { flex-direction:row; align-items:center; justify-content:space-between; gap:6px 12px; }
html:root.orders-crystal body #page-content .flow-list-cards [data-order-column="items"] .goods-count { display:inline; font-size:12px; color:var(--text); }
html:root.orders-crystal body #page-content .flow-list-cards [data-order-column="items"] > .subline { display:block!important; flex:1 1 100%; font-size:11px; line-height:1.4; }
html:root.orders-crystal body #page-content .flow-list-cards [data-order-column="due"] .subline { display:inline!important; font-size:12px; line-height:1.4; }
html:root.orders-crystal body #page-content .flow-orders-list .order-number { color:var(--text)!important; }
html:root.orders-crystal body #page-content .flow-orders-list.flow-list-empty .table-bottom,
html:root.orders-crystal body #page-content.flow-orders-page:has(.flow-orders-list.flow-list-empty) .list-hint { display:none!important; }

#page-content.flow-order-detail .detail-heading { display:flex!important; align-items:flex-start; justify-content:space-between; gap:16px; margin:0 0 20px; }
#page-content.flow-order-detail .detail-heading > div:first-child { display:flex!important; flex:1 1 auto!important; flex-direction:column; align-items:flex-start; gap:8px; width:auto; min-width:0; }
#page-content.flow-order-detail .detail-title { display:flex; flex-wrap:wrap!important; flex:0 1 auto; gap:10px; min-width:0; }
#page-content.flow-order-detail .detail-title h1 { flex:1 1 auto; max-width:100%; min-width:0; white-space:normal!important; overflow-wrap:anywhere!important; font-size:clamp(26px,2.35vw,36px)!important; line-height:1.16; letter-spacing:-1px; }
#page-content.flow-order-detail .detail-meta { padding:0; width:auto; gap:10px; font-size:13px; line-height:1.4; color:var(--muted); }
#page-content.flow-order-detail .detail-heading > .heading-actions { flex:0 1 auto; display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; width:auto; margin:0!important; }
#page-content.flow-order-detail .detail-heading > .heading-actions .button { flex:0 1 auto!important; }
#page-content.flow-order-detail .timeline-steps { gap:12px; margin:0 0 18px; padding:0 0 4px; overflow-x:auto; scrollbar-width:none; }
#page-content.flow-order-detail .timeline-step { flex:1 0 105px; font-size:12px; line-height:1.4; }
#page-content.flow-order-detail .timeline-step span { white-space:normal; }
#page-content.flow-order-detail .content-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(290px,320px); gap:20px; align-items:start; }
#page-content.flow-order-detail .content-grid > div { min-width:0; }
#page-content.flow-order-detail .detail-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:5px; overflow:visible; padding:5px; margin:0 0 16px; border:0; border-radius:var(--orders-radius-control,999px); background:var(--control-surface); }
#page-content.flow-order-detail .detail-tab { flex:0 1 auto; min-height:var(--orders-control-height,44px); margin:0; padding:10px 13px; border:0!important; border-radius:var(--orders-radius-control,999px); color:var(--muted); font-size:13px; line-height:1.3; }
#page-content.flow-order-detail .detail-tab.active { color:var(--accent); background:var(--flow-selected-glass)!important; box-shadow:var(--flow-selected-edge); }
#page-content.flow-order-detail .side-summary { position:sticky; top:var(--orders-summary-top,96px); display:flex; flex-direction:column; gap:16px; min-width:0; max-height:calc(100dvh - 124px); overflow:auto; scrollbar-width:thin; scrollbar-color:color-mix(in srgb,var(--muted) 25%,transparent) transparent; padding:1px; }
#page-content.flow-order-detail .summary-panel { scroll-margin-top:110px; }
#page-content.flow-order-detail .summary-lines { display:grid; gap:12px; font-size:14px; color:var(--muted); }
#page-content.flow-order-detail .summary-lines > div { gap:14px; align-items:baseline; }
#page-content.flow-order-detail .summary-lines b { color:var(--text); }
#page-content.flow-order-detail .summary-lines button { color:var(--accent); font-size:14px; }
#page-content.flow-order-detail .summary-total { gap:12px; margin-top:18px; padding-top:18px; border-top:1px solid var(--line); color:var(--text); }
#page-content.flow-order-detail .summary-total strong { font-size:28px; line-height:1.2; font-weight:500; }
#page-content.flow-order-detail .summary-due { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 14px; margin:16px 0; border-radius:var(--orders-radius-inset,20px); font-size:13px; background:var(--flow-control-glass); }
#page-content.flow-order-detail .flow-empty-draft .summary-due.is-paid { color:var(--muted); background:var(--control-surface); }
#page-content.flow-order-detail .flow-empty-draft .summary-due.is-paid > svg { display:none; }
#page-content.flow-order-detail .flow-duplicate-action { display:none!important; }
#page-content.flow-order-detail .order-customer-panel .empty,
#page-content.flow-order-detail .customer-panel .empty { min-height:0; padding:12px 0 4px; align-items:flex-start; text-align:left; gap:8px; }
#page-content.flow-order-detail .order-customer-panel .empty > svg,
#page-content.flow-order-detail .customer-panel .empty > svg { display:none; }
#page-content.flow-order-detail .order-customer-panel .empty h3,
#page-content.flow-order-detail .customer-panel .empty h3 { font-size:15px; font-weight:500; }
#page-content.flow-order-detail .order-customer-panel .empty p,
#page-content.flow-order-detail .customer-panel .empty p { font-size:13px; line-height:1.5; }
#page-content.flow-order-detail .note-fields { gap:16px; }
#page-content.flow-order-detail .note-fields textarea { min-height:84px; font-size:14px; line-height:1.5; }
/* Empty comments stay compact; the native fields and optical canvas stay put. */
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-panel { min-height:0!important; padding:12px 20px!important; }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-panel > .section-top { margin:0!important; padding:0!important; min-height:0; }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-panel > .section-top > h2 { display:none!important; }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-toggle {
  display:flex; align-items:center; gap:12px; width:100%; min-width:0;
  min-height:var(--orders-control-height,44px); padding:6px 0; border:0!important;
  background:transparent!important; color:var(--text)!important; box-shadow:none!important;
  text-align:left; cursor:pointer; border-radius:var(--orders-radius-control,999px);
}
html:root.orders-crystal body #page-content.flow-order-detail [data-flow-comments-title] { flex:0 0 auto; font-size:15px; line-height:1.3; font-weight:600; }
html:root.orders-crystal body #page-content.flow-order-detail [data-flow-comments-evidence] { flex:1; min-width:0; color:var(--muted); font-size:12px; line-height:1.4; text-align:right; overflow-wrap:anywhere; }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-filled [data-flow-comments-evidence] { color:var(--text); }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-chevron { display:flex; flex:0 0 18px; width:18px; height:18px; align-items:center; justify-content:center; }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-chevron .icon { width:18px; height:18px; }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-open .flow-comments-chevron { transform:rotate(180deg); }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-panel .note-fields { margin:14px 0 4px; }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-panel .note-fields[hidden] { display:none!important; }
html:root.orders-crystal body #page-content.flow-order-detail .flow-comments-panel .field-shell { border-radius:var(--orders-radius-inset,20px)!important; }
/* Quantity and base price are one glass capsule each, including their native
   decrement / increment / history controls. Inputs keep their exact nodes. */
html:root.orders-crystal body #page-content.flow-order-detail .product-row :is(.qty,.price-entry) {
  box-sizing:border-box!important; min-width:0;
  height:var(--orders-control-height,44px)!important; min-height:var(--orders-control-height,44px)!important;
  border:0!important; border-radius:var(--orders-radius-control,999px)!important; overflow:hidden;
  background:var(--orders-control-fill,var(--flow-control-glass))!important;
  box-shadow:var(--orders-control-shadow,var(--flow-control-edge))!important; color:var(--text)!important;
  backdrop-filter:blur(18px) saturate(1.04)!important; -webkit-backdrop-filter:blur(18px) saturate(1.04)!important;
}
html:root.orders-crystal body #page-content.flow-order-detail .product-row > .qty {
  display:grid!important; grid-template-columns:minmax(24px,32px) minmax(0,1fr) minmax(24px,32px); align-items:stretch;
}
html:root.orders-crystal body #page-content.flow-order-detail .product-row .price-entry { display:grid!important; grid-template-columns:minmax(0,1fr) 44px; align-items:stretch; }
html:root.orders-crystal body #page-content.flow-order-detail .product-row :is(.qty,.price-entry) > :is(input,button) {
  box-sizing:border-box!important; width:100%!important; min-width:0!important; max-width:100%;
  height:var(--orders-control-height,44px)!important; min-height:var(--orders-control-height,44px)!important;
  margin:0!important; border:0!important; background:transparent!important; box-shadow:none!important;
  color:var(--text)!important; -webkit-text-fill-color:var(--text)!important;
  backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
}
html:root.orders-crystal body #page-content.flow-order-detail .product-row :is(.qty input,.price-field) { outline:none!important; border-radius:0!important; font-size:16px; font-variant-numeric:tabular-nums; }
html:root.orders-crystal body #page-content.flow-order-detail .product-row .qty input { padding:0 2px!important; text-align:center; }
html:root.orders-crystal body #page-content.flow-order-detail .product-row .price-field { padding:0 10px!important; }
html:root.orders-crystal body #page-content.flow-order-detail .product-row :is(.qty button,.history-trigger) { display:grid; place-items:center; padding:0!important; border-radius:var(--orders-radius-control,999px)!important; }
html:root.orders-crystal body #page-content.flow-order-detail .product-row .history-trigger .icon { color:inherit!important; }
html:root.orders-crystal body #page-content.flow-order-detail .product-row :is(.qty,.price-entry):focus-within { outline:2px solid var(--orders-focus,var(--text))!important; outline-offset:2px; }
html:root.orders-crystal body #page-content.flow-order-detail .product-row :is(.qty button,.history-trigger):focus-visible { outline:2px solid var(--orders-focus,var(--text))!important; outline-offset:-3px; }
.flow-summary-shortcut { display:none; }

/* Product selection keeps the native two-step catalog/selection flow on smaller screens. */
.flow-product-picker.dialog { width:min(1240px,calc(100vw - 40px)); max-width:1240px; border-radius:var(--orders-radius-dialog,28px)!important; }
.flow-product-picker .dialog-scroll { display:flex; flex-direction:column; min-height:0; height:min(780px,calc(100dvh - 48px)); max-height:calc(100dvh - 48px); padding:24px; overflow:hidden; box-sizing:border-box; }
.flow-product-picker .modal-head { flex:0 0 auto; padding:0 42px 0 0; margin-bottom:18px; }
.flow-product-picker .modal-head h2 { font-size:24px; line-height:1.2; }
.flow-product-picker .modal-head p { font-size:13px; line-height:1.5; color:var(--muted); margin-top:8px; }
.flow-product-picker .picker-grid { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:16px; flex:1; min-height:0; }
.flow-product-picker .picker-catalog,
.flow-product-picker .picker-selected { min-height:0; padding:16px; border-radius:var(--orders-radius-inset,20px); border:0!important; background:var(--control-surface)!important; box-shadow:none!important; }
.flow-product-picker .picker-selected { container: flow-picker / inline-size; }
.flow-product-picker :is(.catalog-scroll,.selected-scroll) { flex:1 1 auto; min-height:0; max-height:none; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:color-mix(in srgb,var(--muted) 25%,transparent) transparent; }
.flow-product-picker .catalog-categories { padding:12px 0; gap:6px; }
.flow-product-picker .category { min-height:var(--orders-control-height,44px); padding:8px 13px; font-size:13px; line-height:1.3; border-radius:var(--orders-radius-control,999px); }
.flow-product-picker .category.active { color:var(--accent)!important; background:var(--flow-selected-glass)!important; }
.flow-product-picker .catalog-row { display:grid; grid-template-columns:40px minmax(0,1fr) auto 44px; gap:10px; min-height:76px; padding:12px 0; border-color:var(--line); }
.flow-product-picker .catalog-row .product-image { width:40px; height:40px; }
.flow-product-picker .catalog-row > div { min-width:0; }
.flow-product-picker .catalog-row .product-name { font-size:13px; font-weight:500; line-height:1.4; overflow-wrap:anywhere; }
.flow-product-picker .catalog-row .subline { font-size:11px; line-height:1.4; color:var(--muted); overflow-wrap:anywhere; }
.flow-product-picker .catalog-row .catalog-price { font-size:13px; font-variant-numeric:tabular-nums; white-space:normal; overflow-wrap:anywhere; text-align:right; }
.flow-product-picker .catalog-row .add-product { min-width:44px; width:44px; height:var(--orders-control-height,44px); flex-basis:44px; border-radius:var(--orders-radius-control,999px); color:var(--accent); }
.flow-product-picker .catalog-row .added-count { font-size:14px; }
.flow-product-picker .catalog-row.in-cart { background:var(--flow-neutral-hover); }
.flow-product-picker .picker-selected h3 { color:var(--text); font-size:16px; font-weight:500; padding:0 0 14px; }
.flow-product-picker .picker-tools { flex:0 0 auto; flex-wrap:wrap; gap:8px; padding-top:10px; margin-top:8px; border-color:var(--line); }
.flow-product-picker .picker-tools button { min-height:var(--orders-control-height,44px); font-size:13px; }
.flow-product-picker .picker-footer { flex:0 0 auto; display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:14px 0 0; margin-top:12px; border-top:1px solid var(--line); }
.flow-product-picker .picker-footer .button { min-height:var(--orders-control-height,44px); padding:11px 15px; font-size:13px; }
.flow-product-picker .picker-footer .total-block { min-width:0; margin-right:auto; }
.flow-product-picker .picker-footer .total-block > span { font-size:12px; line-height:1.4; color:var(--muted); }
.flow-product-picker .picker-footer .total-block > strong { font-size:26px; font-weight:500; line-height:1.3; color:var(--text); }
.flow-product-picker .picker-selected .table-labels { display:none; }
.flow-product-picker .picker-selected .product-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px; grid-template-areas:"product product remove" "quantity price price" "amount amount amount"; gap:12px; align-items:start; min-height:0; padding:16px 0; border-color:var(--line); }
.flow-product-picker .picker-selected .product-cell { grid-area:product; align-items:flex-start; gap:10px; min-width:0; }
.flow-product-picker .picker-selected .product-cell > div { min-width:0; }
.flow-product-picker .picker-selected .product-image { width:40px; height:40px; flex:0 0 40px; }
.flow-product-picker .picker-selected .product-name { font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
.flow-product-picker .picker-selected .product-cell small { font-size:12px; line-height:1.4; white-space:normal; overflow-wrap:anywhere; }
.flow-product-picker .picker-selected .qty { grid-area:quantity; display:grid; grid-template-columns:36px minmax(0,1fr) 36px; width:min(100%,142px); min-width:0; height:var(--orders-control-height,44px); }
.flow-product-picker .picker-selected .qty > * { width:100%; min-width:0; height:var(--orders-control-height,44px); }
.flow-product-picker .picker-selected .price-control { grid-area:price; position:static; min-width:0; margin:0; }
.flow-product-picker .picker-selected .price-entry { width:min(100%,160px); min-height:var(--orders-control-height,44px); height:var(--orders-control-height,44px); }
.flow-product-picker .picker-selected :is(.qty input,.price-field) { min-width:0; height:var(--orders-control-height,44px); font-size:16px; }
.flow-product-picker .picker-selected .price-source { position:static; font-size:12px; margin-top:4px; }
.flow-product-picker .picker-selected .amount { grid-area:amount; font-size:15px; text-align:right; min-width:0; }
.flow-product-picker .picker-selected .row-menu { grid-area:remove; width:44px; height:var(--orders-control-height,44px); min-width:44px; }
.flow-product-picker .mobile-tab-switch { flex:0 0 auto; }

@media (max-width:1180px) {
  #page-content.flow-order-detail .content-grid { grid-template-columns:minmax(0,1fr); }
  #page-content.flow-order-detail .side-summary { position:static; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:none; overflow:visible; }
}
@media (max-width:900px) {
  .flow-product-picker .picker-grid { display:block; min-height:0; overflow:hidden; }
  .flow-product-picker .mobile-tab-switch { display:flex; gap:6px; padding:4px; border-radius:var(--orders-radius-control,999px); margin:0 0 14px; background:var(--control-surface); }
  .flow-product-picker .mobile-tab-switch button { flex:1; min-height:var(--orders-control-height,44px); border-radius:var(--orders-radius-control,999px); padding:10px 12px; font-size:14px; color:var(--muted); }
  .flow-product-picker .mobile-tab-switch button.active { color:var(--accent); background:var(--flow-selected-glass); }
  .flow-product-picker .picker-grid .picker-catalog,
  .flow-product-picker .picker-grid .picker-selected { display:flex; height:100%; max-height:none; box-sizing:border-box; }
  .flow-product-picker .picker-grid[data-mobile="catalog"] .picker-selected,
  .flow-product-picker .picker-grid[data-mobile="selected"] .picker-catalog { display:none; }
  .flow-product-picker .mobile-picker-next { display:block; flex:0 0 auto; padding-top:10px; }
  .flow-product-picker .mobile-picker-next .button { min-height:var(--orders-control-height,44px); font-size:14px; }
}
@media (max-width:760px) {
  html:root.orders-crystal body #page-content.flow-orders-page .list-hint { display:none!important; }
  #page-content.flow-orders-page .page-heading { align-items:flex-start; }
  #page-content.flow-orders-page .page-heading .heading-actions { flex:0 1 auto; }
  #page-content .flow-orders-toolbar { gap:8px; }
  #page-content .flow-orders-toolbar .flow-order-search { flex:1 1 100%; max-width:none; margin:0; }
  #page-content .flow-orders-toolbar > .button { flex:1 1 auto; font-size:13px; }
  #page-content .flow-orders-toolbar :is([data-act="columns-open"],[data-act="live-refresh"],[data-act="refresh"]) { width:44px; height:var(--orders-control-height,44px); margin:0; flex:0 0 44px; }
  html:root.orders-crystal body #page-content.flow-mobile-disclosure .flow-orders-toolbar { gap:8px; margin-bottom:12px; }
  html:root.orders-crystal body #page-content.flow-mobile-disclosure .flow-tools-only { display:flex!important; }
  html:root.orders-crystal body #page-content.flow-mobile-disclosure .flow-mobile-tools-toggle {
    display:flex!important; flex:1 1 100%!important; width:100%; min-width:0; min-height:calc(var(--orders-control-height,44px) + 12px); padding:10px 14px;
    align-items:center; justify-content:space-between; gap:12px; border:0; border-radius:var(--orders-radius-control,999px); text-align:left; white-space:normal;
  }
  #page-content .flow-mobile-tools-copy { display:grid; gap:3px; min-width:0; }
  #page-content [data-flow-tools-label] { color:var(--text); font-size:13px; font-weight:600; line-height:1.25; }
  #page-content [data-flow-tools-summary] { color:var(--muted); font-size:11px; font-weight:400; line-height:1.4; overflow-wrap:anywhere; }
  #page-content [data-flow-tools-summary]:empty { display:none; }
  #page-content .flow-mobile-tools-chevron { display:flex; flex:0 0 18px; width:18px; height:18px; align-items:center; justify-content:center; }
  #page-content .flow-mobile-tools-chevron .icon { width:18px; height:18px; }
  #page-content.flow-mobile-tools-open .flow-mobile-tools-chevron { transform:rotate(180deg); }
  html:root.orders-crystal body #page-content.flow-mobile-disclosure:not(.flow-mobile-tools-open) .flow-mobile-secondary,
  html:root.orders-crystal body #page-content.flow-mobile-disclosure:not(.flow-mobile-tools-open) .orders-viewbar { display:none!important; }
  html:root.orders-crystal body #page-content.flow-mobile-disclosure.flow-mobile-tools-open .flow-mobile-scan { display:inline-flex!important; flex:1 1 100%; justify-content:center; min-height:var(--orders-control-height,44px); }
  html:root.orders-crystal body:has(#page-content.flow-mobile-disclosure) #floating-area .floating-scan { display:none!important; }
  #page-content.flow-orders-page .orders-viewbar { gap:12px; }
  #page-content.flow-orders-page .status-filters { flex:1 1 100%; gap:6px; }
  #page-content.flow-orders-page .status-filter { padding:10px 12px; }
  #page-content.flow-orders-page .flow-status-more { flex:1; min-width:0; }
  .flow-status-trigger { padding:10px 11px; }
  .flow-status-trigger > .icon:first-child { display:none; }
  .flow-status-options { left:auto; right:0; min-width:240px; }
  #page-content.flow-orders-page .orders-viewbar .tabs { display:flex; flex:1 1 100%; width:100%; }
  #page-content.flow-orders-page .orders-viewbar .tab { flex:1; justify-content:center; padding:10px 8px; min-width:0; }
  #page-content .flow-list-cards #order-list { grid-template-columns:minmax(0,1fr); gap:12px; }
  #page-content .flow-list-cards .order-row { padding:16px!important; }
  #page-content.flow-order-detail .detail-heading { flex-direction:column; gap:12px; }
  #page-content.flow-order-detail .detail-heading > .heading-actions { width:100%; justify-content:flex-start; gap:8px; }
  #page-content.flow-order-detail .detail-heading > .heading-actions .primary { flex:1 1 auto!important; }
  #page-content.flow-order-detail .detail-title h1 { font-size:27px!important; }
  #page-content.flow-order-detail .detail-meta { flex-wrap:wrap; gap:8px; width:100%; }
  #page-content.flow-order-detail .detail-tabs { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; border-radius:var(--orders-radius-control,999px); padding:4px; }
  #page-content.flow-order-detail .detail-tab { flex:0 0 auto; min-height:var(--orders-control-height,44px); padding:10px 13px; font-size:13px; }
  #page-content.flow-order-detail .side-summary { display:flex; flex-direction:column; gap:16px; }
  #page-content.flow-order-detail .note-fields { grid-template-columns:minmax(0,1fr); }
  #page-content.flow-order-detail .note-fields textarea { font-size:16px; }
  #page-content.flow-order-detail.flow-has-summary { padding-bottom:calc(var(--orders-bottom-nav-height,74px) + 88px + env(safe-area-inset-bottom)); }
  .flow-summary-shortcut { display:flex; position:fixed; left:17px; right:17px; bottom:calc(var(--orders-bottom-nav-height,74px) + 10px + env(safe-area-inset-bottom)); z-index:39; min-height:62px; padding:11px 17px; align-items:center; justify-content:space-between; gap:14px; border:0; border-radius:var(--orders-radius-card,24px); background:var(--card-surface); color:var(--text); box-shadow:var(--card-edge),0 6px 24px #0002; backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); text-align:left; }
  .flow-summary-shortcut > span:first-child { min-width:0; display:grid; gap:3px; }
  .flow-summary-shortcut small { color:var(--muted); font-size:11px; line-height:1.2; }
  .flow-summary-shortcut strong { font-size:18px; font-weight:550; line-height:1.2; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  .flow-summary-link { color:var(--accent); font-size:13px; line-height:1.3; font-weight:500; }
  body:has(.dialog-scrim:not([hidden])) .flow-summary-shortcut,
  body:has(.sidebar.open) .flow-summary-shortcut { display:none; }
  .flow-product-picker.dialog { width:100%; max-width:none; }
  .flow-product-picker .dialog-scroll { height:calc(100dvh - 24px - env(safe-area-inset-bottom)); max-height:calc(100dvh - 24px - env(safe-area-inset-bottom)); padding:20px 14px 14px; }
  .flow-product-picker .modal-head { padding-right:38px; margin-bottom:14px; }
  .flow-product-picker .modal-head h2 { font-size:23px; }
  .flow-product-picker .modal-head p { font-size:12px; margin-top:6px; line-height:1.4; }
  .flow-product-picker .picker-catalog,
  .flow-product-picker .picker-selected { padding:12px; border-radius:var(--orders-radius-inset,20px); }
  .flow-product-picker .catalog-row { grid-template-columns:32px minmax(0,1fr) 44px; gap:8px 10px; }
  .flow-product-picker .catalog-row .product-image { grid-row:1 / 3; width:32px; height:38px; }
  .flow-product-picker .catalog-row .product-name { font-size:14px; }
  .flow-product-picker .catalog-row .catalog-price { grid-column:2; grid-row:2; margin:0; text-align:left; }
  .flow-product-picker .catalog-row .add-product { grid-column:3; grid-row:1 / 3; }
  .flow-product-picker .picker-tools { gap:8px; }
  .flow-product-picker .picker-tools button { font-size:12px; }
  .flow-product-picker .picker-footer { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .flow-product-picker .picker-footer .total-block { margin:0; }
  .flow-product-picker .picker-footer [data-act="picker-save"] { grid-column:1 / -1; width:100%; min-height:var(--orders-control-height,44px); font-size:14px; }
  .flow-product-picker .picker-footer .picker-cancel { display:inline-flex; }
}
@media (max-width:380px) {
  #page-content.flow-orders-page .status-filter { padding-inline:10px; }
  .flow-status-trigger { font-size:12px; padding-inline:9px; }
  #page-content.flow-order-detail .detail-heading > .heading-actions .button { padding-inline:12px; }
}
/* All work controls share neutral photographic glass in both themes. */
html:root.orders-crystal body {
  --flow-control-glass:var(--orders-control-fill,linear-gradient(145deg,rgba(255,244,229,.09),rgba(255,255,255,.035) 55%,rgba(12,15,19,.14)));
  --flow-selected-glass:var(--orders-control-selected,linear-gradient(145deg,rgba(255,244,229,.18),rgba(255,255,255,.085) 55%,rgba(12,15,19,.09)));
  --flow-control-edge:var(--orders-control-shadow,inset 1px 1px 1px rgba(255,245,232,.17),inset -1px -1px 1px rgba(222,230,239,.05));
  --flow-selected-edge:var(--orders-control-selected-shadow,inset 1px 1px 1px rgba(255,245,232,.38),inset -1px -1px 1px rgba(222,230,239,.16));
  --flow-neutral-hover:rgba(255,246,232,.065);
}
html:root.orders-crystal[data-orders-theme="light"] body {
  --flow-control-glass:var(--orders-control-fill,linear-gradient(145deg,rgba(255,255,255,.36),rgba(255,255,255,.12) 55%,rgba(237,232,225,.17)));
  --flow-selected-glass:var(--orders-control-selected,linear-gradient(145deg,rgba(255,255,255,.66),rgba(255,255,255,.28) 55%,rgba(237,232,225,.22)));
  --flow-control-edge:var(--orders-control-shadow,inset 1px 1px 1px rgba(255,255,255,.64),inset -1px -1px 1px rgba(40,38,35,.075));
  --flow-selected-edge:var(--orders-control-selected-shadow,inset 1px 1px 1px rgba(255,255,255,.94),inset -1px -1px 1px rgba(40,38,35,.19));
  --flow-neutral-hover:rgba(60,52,42,.055);
}
html:root.orders-crystal body #page-content.flow-orders-page :is(.flow-order-search,.flow-mobile-tools-toggle,.flow-mobile-scan,.status-filter,.flow-status-trigger,.orders-viewbar .tabs,.orders-viewbar .tab),
html:root.orders-crystal body #page-content.flow-order-detail :is(.detail-tabs,.detail-tab,.summary-due),
html:root.orders-crystal body .flow-product-picker :is(.picker-catalog,.picker-selected,.search-shell,.mobile-tab-switch,.mobile-tab-switch button,.category,.qty,.price-entry) {
  background:var(--flow-control-glass)!important;
  background-color:transparent!important;
  color:var(--text)!important;
  border-color:transparent!important;
  box-shadow:var(--flow-control-edge)!important;
  backdrop-filter:blur(18px) saturate(1.04)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.04)!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .flow-order-search :is(input,input:focus,input:focus-visible),
html:root.orders-crystal body .flow-product-picker :is(.search-shell,.qty,.price-entry) input {
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  border-color:transparent!important;
  box-shadow:none!important;
  color:var(--text)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html:root.orders-crystal body #page-content.flow-orders-page :is(.flow-mobile-tools-toggle[aria-expanded="true"],.status-filter.active,.status-filter[aria-pressed="true"],.flow-status-more.has-selection > summary,.orders-viewbar .tab.active,.orders-viewbar .tab[aria-selected="true"]),
html:root.orders-crystal body #page-content.flow-order-detail :is(.detail-tab.active,.detail-tab[aria-selected="true"]),
html:root.orders-crystal body .flow-product-picker :is(.category.active,.category[aria-pressed="true"],.mobile-tab-switch button.active,.mobile-tab-switch button[aria-selected="true"]) {
  background:var(--flow-selected-glass)!important;
  background-color:transparent!important;
  color:var(--text)!important;
  box-shadow:var(--flow-selected-edge)!important;
  border-color:transparent!important;
  font-weight:600!important;
}
html:root.orders-crystal body #page-content.flow-orders-page :is(.orders-viewbar .counter,.status-filter b),
html:root.orders-crystal body .flow-product-picker .counter {
  background:rgba(255,255,255,.07)!important;
  color:inherit!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
html:root.orders-crystal body #page-content .flow-orders-list :is(.order-head,.table-bottom),
html:root.orders-crystal body .flow-product-picker :is(.picker-footer,.picker-tools) {
  background:var(--flow-control-glass)!important;
  background-color:transparent!important;
  color:var(--muted)!important;
  backdrop-filter:blur(18px) saturate(1.04)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.04)!important;
}
html:root.orders-crystal body #page-content .flow-orders-list .avatar-square {
  background:var(--flow-control-glass)!important;
  box-shadow:var(--flow-control-edge)!important;
  color:var(--text)!important;
}
html:root.orders-crystal body #page-content .flow-orders-list .native-status {
  background:var(--flow-control-glass)!important;
  background-color:transparent!important;
  color:var(--text)!important;
  border-color:transparent!important;
  box-shadow:var(--flow-control-edge)!important;
  backdrop-filter:blur(18px) saturate(1.04)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.04)!important;
}
html:root.orders-crystal body #page-content .flow-orders-list .native-status i {
  background:var(--status-color)!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .flow-status-options {
  background:var(--card-surface)!important;
  box-shadow:var(--card-edge),0 16px 48px rgba(0,0,0,.18)!important;
  backdrop-filter:blur(24px) saturate(1.04)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.04)!important;
}
html:root.orders-crystal body #page-content .flow-orders-list .order-row:hover,
html:root.orders-crystal body .flow-product-picker .catalog-row.in-cart {
  background:var(--flow-neutral-hover)!important;
}
html:root.orders-crystal body #page-content .flow-orders-list .order-row.selected,
html:root.orders-crystal body #page-content .flow-orders-list .pager button.active {
  background:var(--flow-selected-glass)!important;
  box-shadow:var(--flow-selected-edge)!important;
  color:var(--text)!important;
}
/* One control system: a single glass search/group surface, capsule controls,
   and 36px segments inside a 44px group. These rules follow the broad glass
   rules above so inactive segments cannot acquire a second filled surface. */
html:root.orders-crystal body #page-content.flow-orders-page :is(.flow-order-search,.status-filter,.flow-status-trigger,.flow-orders-toolbar > .button:not(.flow-mobile-tools-toggle),.flow-orders-toolbar > .icon-btn),
html:root.orders-crystal body #page-content.flow-order-detail :is(.heading-actions .button,.field-shell:not(:has(textarea)),.input:not(textarea),.select-trigger),
html:root.orders-crystal body .flow-product-picker :is(.search-shell,.field-shell,.category,.qty,.price-entry,.button,.row-menu,.add-product),
html:root.orders-crystal body #orders-search:not(input) {
  box-sizing:border-box!important;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  min-height:var(--orders-control-height,44px);
}
html:root.orders-crystal body #page-content.flow-orders-page .flow-order-search,
html:root.orders-crystal body .flow-product-picker .search-shell,
html:root.orders-crystal body #orders-search:not(input) {
  display:flex; align-items:center; gap:10px; padding:0 16px!important;
  height:var(--orders-control-height,44px)!important;
  min-height:var(--orders-control-height,44px)!important;
  border:0!important; overflow:hidden;
  background:var(--flow-control-glass)!important;
  box-shadow:var(--flow-control-edge)!important;
  backdrop-filter:blur(18px) saturate(1.04)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.04)!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .flow-order-search input,
html:root.orders-crystal body .flow-product-picker .search-shell input,
html:root.orders-crystal body #orders-search input {
  box-sizing:border-box!important; flex:1; min-width:0;
  height:var(--orders-control-height,44px)!important;
  min-height:var(--orders-control-height,44px)!important;
  padding:0!important; margin:0; border:0!important; outline:none!important;
  border-radius:inherit!important; background:transparent!important;
  color:var(--text)!important; box-shadow:none!important;
  backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .flow-order-search:focus-within,
html:root.orders-crystal body .flow-product-picker :is(.search-shell,.qty,.price-entry):focus-within,
html:root.orders-crystal body #orders-search:focus-within {
  outline:2px solid var(--orders-focus,var(--text))!important; outline-offset:2px;
  box-shadow:var(--flow-control-edge)!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar :is(.tabs,.segmented:not(.as-text),.list-tabs,#view-group),
html:root.orders-crystal body #page-content.flow-order-detail .detail-tabs,
html:root.orders-crystal body .flow-product-picker .mobile-tab-switch,
html:root.orders-crystal body #view-group {
  box-sizing:border-box!important; align-items:center;
  flex-wrap:nowrap; gap:4px!important; padding:4px!important;
  height:var(--orders-control-height,44px)!important;
  min-height:var(--orders-control-height,44px)!important; min-width:0; max-width:100%;
  border:0!important; border-radius:var(--orders-radius-control,999px)!important;
  background:var(--flow-control-glass)!important; box-shadow:var(--flow-control-edge)!important;
  backdrop-filter:blur(18px) saturate(1.04)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.04)!important;
  overflow-x:auto; overflow-y:hidden; scrollbar-width:none;
}
html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar :is(.tabs,.segmented:not(.as-text),.list-tabs,#view-group) > :is(button,.tab,[role="tab"]),
html:root.orders-crystal body #page-content.flow-order-detail .detail-tabs > .detail-tab,
html:root.orders-crystal body .flow-product-picker .mobile-tab-switch > button,
html:root.orders-crystal body #view-group :is(button,.tab,[role="tab"]) {
  box-sizing:border-box!important; display:inline-flex; align-items:center; justify-content:center;
  height:calc(var(--orders-control-height,44px) - 8px)!important;
  min-height:calc(var(--orders-control-height,44px) - 8px)!important;
  padding:6px 12px!important; margin:0!important; border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:transparent!important; box-shadow:none!important;
  color:var(--muted)!important; -webkit-text-fill-color:currentColor!important;
  font-size:13px; line-height:20px; font-weight:500; white-space:nowrap;
  backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar :is(.tabs,.segmented:not(.as-text),.list-tabs,#view-group) > :is(button,.tab,[role="tab"]):is(.active,.selected,[aria-selected="true"],[aria-pressed="true"]),
html:root.orders-crystal body #page-content.flow-order-detail .detail-tabs > .detail-tab:is(.active,[aria-selected="true"]),
html:root.orders-crystal body .flow-product-picker .mobile-tab-switch > button:is(.active,[aria-selected="true"]),
html:root.orders-crystal body #view-group :is(button,.tab,[role="tab"]):is(.active,.selected,[aria-selected="true"],[aria-pressed="true"]) {
  background:var(--flow-selected-glass)!important;
  box-shadow:var(--flow-selected-edge)!important;
  color:var(--text)!important; font-weight:600!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar #view-group > .segmented,
html:root.orders-crystal body #view-group > .segmented,
html:root.orders-crystal body #page-content.flow-orders-page .flow-order-search .field-shell,
html:root.orders-crystal body #orders-search .field-shell,
html:root.orders-crystal body .flow-product-picker :is(.qty,.price-entry) > :is(button,input) {
  background:transparent!important; border:0!important; box-shadow:none!important;
  backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar #view-group > .segmented,
html:root.orders-crystal body #view-group > .segmented {
  padding:0!important; height:100%!important; min-height:0!important;
}
html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar [role="tab"]:focus-visible,
html:root.orders-crystal body #page-content.flow-order-detail .detail-tab:focus-visible,
html:root.orders-crystal body .flow-product-picker .mobile-tab-switch button:focus-visible,
html:root.orders-crystal body #view-group button:focus-visible {
  outline:2px solid var(--orders-focus,var(--text))!important; outline-offset:-3px!important;
}
html:root.orders-crystal body #page-content .flow-orders-list .native-status {
  box-sizing:border-box; min-height:36px!important; height:auto;
  border-radius:var(--orders-radius-control,999px)!important;
}
html:root.orders-crystal body #page-content .flow-orders-list .pager button {
  box-sizing:border-box; border-radius:var(--orders-radius-control,999px)!important;
  min-width:var(--orders-control-height,44px); min-height:var(--orders-control-height,44px);
}
html:root.orders-crystal body #page-content .flow-orders-list:not(.flow-list-cards) :is([data-order-column="actions"] .icon-btn,.pager button) {
  width:36px!important; height:36px!important; min-width:36px!important; min-height:36px!important; flex-basis:36px!important;
}
html:root.orders-crystal body #page-content.flow-order-detail .note-fields textarea,
html:root.orders-crystal body .flow-product-picker :is(.picker-catalog,.picker-selected) {
  border-radius:var(--orders-radius-inset,20px)!important;
}
/* Category arrows and touch scrolling already expose the horizontal navigation. */
html:root.orders-crystal body .flow-product-picker .catalog-categories {
  scrollbar-width:none!important;
  scrollbar-color:var(--scrollbar-thumb) transparent!important;
}
html:root.orders-crystal body .flow-product-picker .catalog-categories::-webkit-scrollbar { display:none!important; }
/* Orders use two working rows: title / view / create, then find / filter / tools.
   The original view and status controls are moved, never recreated. */
html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading {
  display:grid!important; grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center!important; gap:12px 18px!important;
  min-height:var(--orders-control-height,44px)!important;
  padding:0!important; margin:0 0 12px!important;
}
html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading > div:first-child {
  grid-column:1; grid-row:1; min-width:0; margin:0; padding:0;
}
html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading :is(.eyebrow:empty,p:empty) { display:none!important; }
html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading > .heading-actions {
  display:flex!important; grid-column:3; grid-row:1; flex-wrap:nowrap!important;
  align-items:center!important; justify-content:flex-end; gap:10px; width:auto;
  min-width:0; margin:0!important; padding:0!important;
}
html:root.orders-crystal body #page-content.flow-orders-layout .flow-heading-views.orders-viewbar {
  display:flex!important; grid-column:2; grid-row:1; justify-self:start;
  align-items:center; justify-content:flex-start; flex-wrap:nowrap;
  width:fit-content; min-width:0; max-width:100%; gap:0; margin:0!important; padding:0!important;
}
html:root.orders-crystal body #page-content.flow-orders-layout .flow-heading-views .tabs { margin:0!important; min-width:0; }
html:root.orders-crystal body #page-content.flow-orders-layout .flow-duplicate-location { display:none!important; }
html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-utilities {
  display:flex; flex:0 0 auto; align-items:center; gap:6px; margin-left:auto;
}
html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-utilities > .icon-btn {
  flex:0 0 var(--orders-control-height,44px); width:var(--orders-control-height,44px)!important;
  height:var(--orders-control-height,44px)!important; min-width:var(--orders-control-height,44px); margin:0!important;
}
html:root.orders-crystal body #page-content.flow-orders-layout .flow-filter-count {
  display:inline-flex; align-items:center; justify-content:center; min-width:16px;
  font-size:11px; line-height:16px; font-weight:600; color:inherit;
}
html:root.orders-crystal body #page-content.flow-orders-layout .flow-filter-count:empty { display:none; }
html:root.orders-crystal body #page-content.flow-orders-layout [data-act="filters"].flow-has-active-filters {
  background:var(--flow-selected-glass)!important; box-shadow:var(--flow-selected-edge)!important;
  color:var(--text)!important; font-weight:600;
}
html:root.orders-crystal body #page-content.flow-orders-layout .flow-mobile-reset[hidden] { display:none!important; }
@media (min-width:761px) {
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar:not(.flow-tools-only) {
    display:flex; flex-wrap:nowrap!important; align-items:center; gap:8px!important;
    min-width:0; margin:0 0 16px!important; padding:0;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar .flow-order-search {
    flex:0 1 320px!important; width:320px; max-width:320px; min-width:150px; margin:0!important;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > :is([data-act="filters"],[data-act="orders-calendar"]) {
    flex:0 1 auto; min-width:0; padding-inline:14px!important; white-space:nowrap;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="orders-calendar"] { max-width:200px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="orders-calendar"] > span {
    min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses {
    flex:0 0 auto!important; display:flex; flex-wrap:nowrap!important; align-items:center; gap:6px!important;
    min-width:0; margin:0!important; padding:0!important;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses > .status-filter { padding-inline:12px; gap:6px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses > .flow-status-more { flex:0 0 auto!important; min-width:0; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses .flow-status-trigger { padding-inline:12px; white-space:nowrap; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses .flow-status-trigger > span {
    max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
}
@media (min-width:761px) and (max-width:1280px) {
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading { column-gap:12px!important; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar .flow-order-search { flex-basis:240px!important; width:240px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="filters"] { min-width:44px; padding-inline:12px!important; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="filters"] > span:not(.flow-filter-count) { display:none; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="orders-calendar"] { max-width:162px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses > .status-filter { padding-inline:10px; font-size:12px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses .flow-status-trigger { padding-inline:10px; font-size:12px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses .flow-status-trigger > .icon:first-child { display:none; }
}
/* Tablet tools wrap as two groups instead of compressing current conditions. */
@media (min-width:761px) and (max-width:1100px) {
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar:not(.flow-tools-only) { flex-wrap:wrap!important; gap:10px 8px!important; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar .flow-order-search { flex:1 1 150px!important; width:auto!important; min-width:150px; max-width:320px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="filters"] { flex:0 0 auto!important; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="filters"] > span:not(.flow-filter-count):not([aria-hidden="true"]) { display:inline!important; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="orders-calendar"] { flex:1 1 160px!important; width:auto; min-width:140px; max-width:300px; white-space:normal; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="orders-calendar"] > span { overflow:visible!important; text-overflow:clip; white-space:normal!important; overflow-wrap:anywhere; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses { flex:1 1 calc(100% - var(--orders-control-height,44px) - var(--orders-control-height,44px) - 14px)!important; max-width:calc(100% - var(--orders-control-height,44px) - var(--orders-control-height,44px) - 14px); min-width:0; flex-wrap:wrap!important; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses > .status-filter { padding-inline:12px; font-size:13px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses .flow-status-trigger { padding-inline:12px; font-size:13px; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses .flow-status-trigger > .icon:first-child { display:inline-flex; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-utilities { flex:0 0 calc(var(--orders-control-height,44px) + var(--orders-control-height,44px) + 6px); width:calc(var(--orders-control-height,44px) + var(--orders-control-height,44px) + 6px); margin-left:auto; align-self:flex-start; }

  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-orders-heading { grid-template-columns:minmax(0,1fr) auto; row-gap:10px!important; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-orders-heading > .heading-actions { grid-column:2; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-heading-views.orders-viewbar { grid-column:1 / -1; grid-row:2; justify-self:start; }
}
@media (min-width:1101px) and (max-width:1180px) {
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-orders-toolbar:not(.flow-tools-only) { flex-wrap:wrap!important; gap:10px 8px!important; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-orders-toolbar .flow-order-search { flex:1 1 150px!important; width:auto!important; min-width:150px; max-width:320px; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="filters"] { flex:0 0 auto!important; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="filters"] > span:not(.flow-filter-count):not([aria-hidden="true"]) { display:inline!important; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="orders-calendar"] { flex:1 1 160px!important; width:auto; min-width:140px; max-width:300px; white-space:normal; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-orders-toolbar > [data-act="orders-calendar"] > span { overflow:visible!important; text-overflow:clip; white-space:normal!important; overflow-wrap:anywhere; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-order-statuses { flex:1 1 calc(100% - var(--orders-control-height,44px) - var(--orders-control-height,44px) - 14px)!important; max-width:calc(100% - var(--orders-control-height,44px) - var(--orders-control-height,44px) - 14px); min-width:0; flex-wrap:wrap!important; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-order-statuses > .status-filter { padding-inline:12px; font-size:13px; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-order-statuses .flow-status-trigger { padding-inline:12px; font-size:13px; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-order-statuses .flow-status-trigger > .icon:first-child { display:inline-flex; }
  html:root.orders-crystal.orders-sidebar-revealed body #page-content.flow-orders-layout .flow-order-utilities { flex:0 0 calc(var(--orders-control-height,44px) + var(--orders-control-height,44px) + 6px); width:calc(var(--orders-control-height,44px) + var(--orders-control-height,44px) + 6px); margin-left:auto; align-self:flex-start; }
}
@media (max-width:1280px) {
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading .orders-live-status.flow-live-idle {
    position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
    clip-path:inset(50%); white-space:nowrap;
  }
}
@media (max-width:760px) {
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading {
    grid-template-columns:minmax(0,1fr) auto; gap:8px 12px!important; margin-bottom:12px!important;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading > .heading-actions {
    grid-column:2; flex-wrap:wrap!important; max-width:190px; gap:6px;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-heading .orders-live-status:not(.flow-live-idle) {
    font-size:10px; max-width:190px; flex-basis:100%; white-space:normal;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-orders-toolbar { margin:0 0 14px!important; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-order-statuses { flex:1 1 100%!important; width:100%; }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-toolbar-views.orders-viewbar {
    flex:1 1 100%; width:100%; min-width:0; margin:0!important; padding:0!important;
  }
  html:root.orders-crystal body #page-content.flow-orders-layout .flow-toolbar-views .tabs { width:100%; margin:0!important; }
  html:root.orders-crystal body #page-content.flow-orders-layout.flow-mobile-tools-open .flow-mobile-reset:not([hidden]) {
    display:inline-flex!important; flex:1 1 100%; justify-content:center; min-height:var(--orders-control-height,44px);
  }
}
@media (prefers-reduced-transparency:reduce) {
  .flow-status-options,.flow-summary-shortcut,#page-content .flow-list-cards .order-row { background:var(--solid-surface,var(--card-surface))!important; backdrop-filter:none; -webkit-backdrop-filter:none; }
  html:root.orders-crystal body #page-content.flow-orders-page :is(.flow-order-search,.flow-mobile-tools-toggle,.flow-mobile-scan,.status-filter,.flow-status-trigger,.flow-status-options,.orders-viewbar .tabs,.orders-viewbar .tab),
  html:root.orders-crystal body #page-content .flow-orders-list .native-status,
  html:root.orders-crystal body #page-content.flow-order-detail :is(.detail-tabs,.detail-tab,.summary-due),
  html:root.orders-crystal body .flow-product-picker :is(.picker-catalog,.picker-selected,.search-shell,.mobile-tab-switch,.mobile-tab-switch button,.category,.qty,.price-entry) {
    --flow-control-glass:var(--solid-surface,var(--card-surface));
    --flow-selected-glass:var(--solid-surface,var(--card-surface));
    background:var(--solid-surface,var(--card-surface))!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar :is(.tabs,.segmented:not(.as-text),.list-tabs,#view-group),
  html:root.orders-crystal body #page-content.flow-orders-page .flow-order-search,
  html:root.orders-crystal body #page-content.flow-order-detail .detail-tabs,
  html:root.orders-crystal body .flow-product-picker :is(.mobile-tab-switch,.search-shell),
  html:root.orders-crystal body :is(#view-group,#orders-search):not(input) {
    background:var(--solid-surface,var(--card-surface))!important;
    backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
  }
}
@media (forced-colors:active) {
  .flow-status-trigger,.flow-status-options,.flow-summary-shortcut,#page-content .flow-list-cards .order-row { background:Canvas!important; color:CanvasText!important; border:1px solid CanvasText!important; box-shadow:none!important; }
  #page-content.flow-orders-page .status-filter.active { border:2px solid Highlight!important; color:Highlight!important; }
  html:root.orders-crystal body #page-content.flow-orders-page :is(.flow-order-search,.flow-mobile-tools-toggle,.flow-mobile-scan,.status-filter,.flow-status-trigger,.flow-status-options,.orders-viewbar .tabs,.orders-viewbar .tab),
  html:root.orders-crystal body #page-content .flow-orders-list .native-status,
  html:root.orders-crystal body #page-content.flow-order-detail :is(.detail-tabs,.detail-tab,.summary-due),
  html:root.orders-crystal body .flow-product-picker :is(.picker-catalog,.picker-selected,.search-shell,.mobile-tab-switch,.mobile-tab-switch button,.category,.qty,.price-entry) {
    background:Canvas!important; color:CanvasText!important; border:1px solid CanvasText!important; box-shadow:none!important; backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
  }
  html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar :is(.tabs,.segmented:not(.as-text),.list-tabs,#view-group),
  html:root.orders-crystal body #page-content.flow-orders-page .flow-order-search,
  html:root.orders-crystal body #page-content.flow-order-detail .detail-tabs,
  html:root.orders-crystal body .flow-product-picker :is(.mobile-tab-switch,.search-shell),
  html:root.orders-crystal body :is(#view-group,#orders-search):not(input) {
    background:Canvas!important; color:CanvasText!important; border:0!important;
    outline:1px solid CanvasText; box-shadow:none!important;
    backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
  }
  html:root.orders-crystal body #page-content.flow-orders-page .orders-viewbar :is(.tabs,.segmented:not(.as-text),.list-tabs,#view-group) > :is(button,.tab,[role="tab"]):is(.active,.selected,[aria-selected="true"],[aria-pressed="true"]),
  html:root.orders-crystal body #page-content.flow-order-detail .detail-tabs > .detail-tab:is(.active,[aria-selected="true"]),
  html:root.orders-crystal body .flow-product-picker .mobile-tab-switch > button:is(.active,[aria-selected="true"]),
  html:root.orders-crystal body #view-group :is(button,.tab,[role="tab"]):is(.active,.selected,[aria-selected="true"],[aria-pressed="true"]) {
    background:Highlight!important; color:HighlightText!important; box-shadow:none!important;
  }
}
@media print { .flow-summary-shortcut,.flow-status-more { display:none!important; } }
