/* SMTEK POS design system. Loaded after every other stylesheet so it is the single source of
   truth for buttons, icons, colors and the sidebar. Theme colors (--brand, --brand2, --accent,
   --sidebar...) are set by applyTheme() from Setup → Theme. */
:root{
  --font:'Figtree',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
  --bg:#f3f5f9;--panel:#fff;--text:#1d252c;--muted:#566173;--line:#dde2ea;--line-strong:#c5ccd8;
  --brand:#0046be;--brand2:#003a9e;--accent:#ffe000;--accent-text:#1d252c;--accent-border:#e6c900;
  --sidebar:#0a1f44;--sidebar-active:#15305e;--sidebar-text:#c3cee3;
  --danger:#b42318;--danger-line:#f0b4ad;--danger-soft:#fdecea;
  --radius:6px;--btn-h:36px;--btn-h-sm:30px;
}
body{font-family:var(--font);background:var(--bg);color:var(--text)}
button,input,select,textarea{font-family:inherit}
[hidden]{display:none!important}

/* Page layout: every page gets the same margins and the same title block, whether it lives
   inside .content or was added straight into .main by a module (Sales, Reporting, Production). */
/* Older per-page rules use IDs with !important, so these carry :not(#\#) (never matches an
   element, adds ID weight) to win. A title's line box equals the button height, so titles sit
   at the same place whether or not the page has header buttons. */
:root{--page-x:28px;--page-top:22px;--page-bottom:32px}
.content:not(#\#){padding:var(--page-top) var(--page-x) var(--page-bottom)!important}
.main:has(>.page.active)>.content{display:none}
.content>.page:not(#\#):not(#\#){padding:0!important;margin:0!important}
.main>.page:not(#\#):not(#\#){padding:var(--page-top) var(--page-x) var(--page-bottom)!important;margin:0!important}
:is(.page-head,.sales-page-title,.production-page-head):not(#\#):not(#\#){
  display:flex;align-items:center!important;justify-content:space-between;gap:12px 16px;flex-wrap:wrap;
  margin:0 0 18px!important;padding:0!important;transform:none!important;min-height:0!important;
}
:is(.page-head,.sales-page-title,.production-page-head) h1:not(#\#):not(#\#){margin:0!important;font-size:26px!important;font-weight:800!important;line-height:36px!important;letter-spacing:-.3px}
:is(.page-head,.sales-page-title,.production-page-head) .sub:not(#\#):not(#\#){margin:0!important;font-size:14px!important;color:var(--muted)}
:is(.page-head,.sales-page-title,.production-page-head)>div:first-child:not(#\#){display:flex;align-items:baseline;gap:4px 12px;flex-wrap:wrap}
.module-search-wrap:not(#\#){margin:0 0 18px!important}
/* Search boxes in a page header match the 36px button height. */
:is(.page-head,.sales-page-title,.production-page-head) :is(.search,.module-search):not(#\#){height:var(--btn-h)}
:is(.page-head,.sales-page-title,.production-page-head) :is(input[type=search],input:not([type])):not(#\#){height:var(--btn-h)!important;box-sizing:border-box;padding-top:0!important;padding-bottom:0!important}
:is(.page-head,.sales-page-title,.production-page-head) .search:before{top:50%!important;transform:translateY(-50%)}

/* Search boxes, filter dropdowns and quick-add boxes on a page are all 36px, like the buttons
   beside them. Data-entry form fields (.field, .edit-field, table cells, modals) keep their size. */
.page :is(.search,.module-search):not(#\#){height:var(--btn-h)!important}
.page :is(.search,.module-search):before{top:50%!important;transform:translateY(-50%)!important;line-height:1}
.page input:is([placeholder^="Search" i],[placeholder^="Filter" i],[placeholder^="Enter" i],[placeholder^="SCAC" i],[type=search]):not(#\#):not(#\#),
.page select:not(.head-drop):not(:is(.field,.edit-field,td,th,form) select):not(#\#):not(#\#){
  height:var(--btn-h)!important;min-height:0!important;padding-top:0!important;padding-bottom:0!important;box-sizing:border-box;font-size:14px!important
}

/* Buttons: one height, one shape, one icon size. Default = secondary. */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:var(--btn-h)!important;min-height:0!important;padding:0 14px!important;box-sizing:border-box;
  border-radius:var(--radius)!important;border:1px solid var(--line-strong)!important;
  background:#fff!important;color:var(--text)!important;box-shadow:none!important;
  font:600 14px/1 var(--font)!important;letter-spacing:0!important;white-space:nowrap;text-decoration:none;
  cursor:pointer;transition:background-color .12s,border-color .12s,filter .12s;
}
.btn:hover{background:#f4f6fa!important;border-color:#a9b3c3!important;color:var(--text)!important}
.btn:focus-visible,.x:focus-visible,.nav button:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.btn:disabled,.btn[disabled]{opacity:.5;cursor:default}
.btn.primary{background:var(--brand)!important;border-color:var(--brand)!important;color:#fff!important}
.btn.primary:hover{background:var(--brand2)!important;border-color:var(--brand2)!important;color:#fff!important}
.btn.accent{background:var(--accent)!important;border-color:var(--accent-border)!important;color:var(--accent-text)!important}
.btn.accent:hover{filter:brightness(.95)}
.btn.danger{color:var(--danger)!important;border-color:var(--danger-line)!important}
.btn.danger:hover{background:var(--danger-soft)!important}
.btn .ui-icon{width:16px;height:16px;flex-shrink:0}
.btn.icon-only{width:var(--btn-h);padding:0!important}

/* Older page-header buttons were tall stacked tiles with their own glyph icons. */
.purchase-new-po-action,.shipment-new-action,.inventory-header-action,.module-action-button{
  flex-direction:row!important;width:auto!important;min-width:0!important;height:var(--btn-h)!important;min-height:0!important;
  padding:0 14px!important;gap:8px!important;border-radius:var(--radius)!important;box-shadow:none!important;
}
.btn>span{font-size:inherit!important;line-height:inherit!important}
.btn .button-icon{display:none!important}

/* Narrow spots: the item photo buttons stack, and add-rows size their button column to fit. */
.item-image-actions{grid-template-columns:1fr!important}
.item-image-btn{width:100%;padding:0 10px!important;font-size:13px!important}
#allowanceTypes .uom-add-row{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(110px,auto) auto!important}

/* Compact size inside tables and lists. */
td .btn,.btn.small{height:var(--btn-h-sm)!important;padding:0 10px!important;gap:6px;font-size:13px!important}
td .btn .ui-icon,.btn.small .ui-icon{width:14px;height:14px}
td .btn.icon-only,.btn.small.icon-only{width:var(--btn-h-sm);padding:0!important}

/* Table rows: every list on a page (and in the read-only detail window) uses the Purchase Orders row height (28px). Buttons,
   inputs and status badges inside a row are 24px so they fit without stretching it. */
:root{--row-pad:6px;--row-control:24px}
:is(.page,#detailModal) td:not(#\#):not(#\#){padding-top:var(--row-pad)!important;padding-bottom:var(--row-pad)!important;line-height:15px!important;vertical-align:middle!important;white-space:nowrap!important}
:is(.page,#detailModal) td:has(button,input,select):not(#\#):not(#\#){padding-top:1.5px!important;padding-bottom:1.5px!important}
:is(.page,#detailModal) td .btn:not(#\#):not(#\#),:is(.page,#detailModal) td button.production-actions:not(#\#){height:var(--row-control)!important;padding:0 8px!important;font-size:12px!important;gap:5px}
:is(.page,#detailModal) td .btn.icon-only:not(#\#):not(#\#){width:var(--row-control);padding:0!important}
:is(.page,#detailModal) td .btn .ui-icon{width:13px;height:13px}
:is(.page,#detailModal) td :is(input:not([type=checkbox]):not([type=radio]),select):not(#\#):not(#\#){height:var(--row-control)!important;min-height:0!important;padding-top:0!important;padding-bottom:0!important;box-sizing:border-box}
:is(.page,#detailModal) td :is(.sales-status,.picking-line-status,.status-pill,.badge,.status):not(#\#):not(#\#){line-height:15px!important;padding-top:0!important;padding-bottom:0!important;vertical-align:middle}
/* Long text is cut off with an ellipsis instead of wrapping the row onto several lines. */
:is(.page,#detailModal) td:not(#\#):not(#\#){max-width:420px;overflow:hidden;text-overflow:ellipsis}

/* Sales lists are not tables: each row is a button or div laid out as a grid
   (.sales-order-choice for Orders/Picking/Shipping, .invoice-list-row for Invoices).
   Same 28px rows, single-line cells and ellipsis as table rows. */
:is(.sales-order-choice,.invoice-list-row):not(#\#):not(#\#){padding-top:6px!important;padding-bottom:6px!important;row-gap:0!important;align-items:center!important;line-height:15px!important;min-height:0!important;box-sizing:border-box}
.invoice-list-row:not(#\#):not(#\#){padding-top:5px!important;padding-bottom:5px!important}
.invoice-list-row input[type=checkbox]:not(#\#){width:16px!important;height:16px!important;margin:0}
:is(.sales-order-choice,.invoice-list-row)>*:not(#\#){min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:15px}
/* Column headings line up with the rows below: same column gap, same left inset (Sales Orders
   rows reserve 38px for their selection checkbox), and a 28px heading row. */
:is(.sales-list-header,.sales-order-choice):not(#\#):not(#\#){column-gap:8px!important}
.sales-list-header:not(#\#):not(#\#){padding-top:6px!important;padding-bottom:6px!important;min-height:28px!important;align-items:center!important;line-height:15px!important;box-sizing:border-box}
#shippingListHeader:not(#\#):not(#\#){padding-left:10px!important;padding-right:10px!important}

/* Column headings ("clean" style): no dividers; one line arrow pinned to the right edge of the
   sorted column only, a faint up/down arrow on hover elsewhere. The old ▲ ▼ ⇅ characters are
   hidden and drawn as masked icons. Resize handles stay usable but only show on header hover. */
:root{
  --icon-sort-up:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E");
  --icon-sort-down:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M19 12l-7 7-7-7'/%3E%3C/svg%3E");
  --icon-sort-any:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 15l5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E");
}
:is(.sales-column-heading,.shipping-column-heading):not(#\#):not(#\#){display:flex!important;align-items:center;gap:4px;border-right:0!important;color:var(--muted)}
:is(.sales-column-heading,.shipping-column-heading):is([aria-sort=ascending],[aria-sort=descending]):not(#\#):not(#\#){color:var(--text)!important}
:is(.sales-sort-indicator,.picking-sort-indicator,.shipping-sort-indicator,#uomAbbrSortIcon,#uomNameSortIcon):not(#\#){font-size:0!important;margin-left:auto;flex-shrink:0;display:inline-flex}
:is(.sales-sort-indicator,.picking-sort-indicator,.shipping-sort-indicator,#uomAbbrSortIcon,#uomNameSortIcon)::after,.inventory-sort-button::after{
  content:''!important;display:inline-block;width:13px;height:13px;flex-shrink:0;background:currentColor;
  -webkit-mask:var(--icon-sort-any) center/contain no-repeat;mask:var(--icon-sort-any) center/contain no-repeat;
  color:var(--muted);opacity:0;transition:opacity .12s
}
:is(.sales-column-heading,.shipping-column-heading,th,.inventory-sort-button):hover :is(.sales-sort-indicator,.picking-sort-indicator,.shipping-sort-indicator,#uomAbbrSortIcon,#uomNameSortIcon)::after,.inventory-sort-button:hover::after{opacity:.55}
:is([aria-sort=ascending],[aria-sort=descending]) :is(.sales-sort-indicator,.picking-sort-indicator,.shipping-sort-indicator)::after,
:is(#uomAbbrSortIcon,#uomNameSortIcon):is([data-dir=asc],[data-dir=desc])::after,.inventory-sort-button.active::after{opacity:1!important;background:var(--brand)!important}
[aria-sort=ascending] :is(.sales-sort-indicator,.picking-sort-indicator,.shipping-sort-indicator)::after,#uomAbbrSortIcon[data-dir=asc]::after,#uomNameSortIcon[data-dir=asc]::after,.inventory-sort-button.active[data-direction=asc]::after{-webkit-mask-image:var(--icon-sort-up)!important;mask-image:var(--icon-sort-up)!important}
[aria-sort=descending] :is(.sales-sort-indicator,.picking-sort-indicator,.shipping-sort-indicator)::after,#uomAbbrSortIcon[data-dir=desc]::after,#uomNameSortIcon[data-dir=desc]::after,.inventory-sort-button.active[data-direction=desc]::after{-webkit-mask-image:var(--icon-sort-down)!important;mask-image:var(--icon-sort-down)!important}
.inventory-sort-button:not(#\#){display:flex!important;align-items:center;gap:4px;width:100%;color:var(--muted)}
.inventory-sort-button::after{margin-left:auto}
.inventory-sort-button.active:not(#\#){color:var(--text)}
:is(#uomAbbrSortIcon,#uomNameSortIcon):not(#\#){float:right;margin-top:1px}
.sales-column-resizer:not(#\#):not(#\#){border-right-color:transparent!important}
:is(.sales-list-header,#shippingListHeader):hover .sales-column-resizer:not(#\#):not(#\#){border-right-color:var(--line)!important}
.sales-column-resizer:is(:hover,:active):not(#\#):not(#\#){border-right-color:var(--brand)!important}

/* One header row style for every table and list: 28px, tinted, gray uppercase labels, no
   vertical dividers, labels never wrap. Applies to <th> cells and the Sales grid headers. */
:root{--head-bg:#f7f9fc}
:is(.page,#detailModal) th:not(#\#):not(#\#){
  height:28px;padding-top:6px!important;padding-bottom:6px!important;line-height:15px!important;box-sizing:border-box;
  font-size:11px!important;font-weight:700!important;letter-spacing:.5px!important;text-transform:uppercase!important;
  color:var(--muted)!important;background:var(--head-bg)!important;border-left:0!important;border-right:0!important;
  white-space:nowrap!important;vertical-align:middle!important;overflow:hidden;text-overflow:ellipsis
}
:is(.sales-list-header,#shippingListHeader):not(#\#):not(#\#){background:var(--head-bg)!important;border-bottom:1px solid var(--line)!important}
:is(.sales-column-heading,.shipping-column-heading):not(#\#):not(#\#){font-size:11px!important;font-weight:700!important;letter-spacing:.5px!important;text-transform:uppercase!important;line-height:15px!important;white-space:nowrap!important}
.inventory-sort-button:not(#\#){font:inherit!important;letter-spacing:inherit!important;text-transform:inherit!important}

/* Header filter dropdowns (Purchase Orders "All ▾") become a small filter icon at the right edge
   of the column. Still a real <select>: clicking opens the same choices. Blue when a choice other
   than the first ("All") is active. */
:root{
  --icon-filter:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238791a3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l-6 7.5V19l-4 2v-8.5z'/%3E%3C/svg%3E");
  --icon-filter-on:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230046be' stroke='%230046be' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l-6 7.5V19l-4 2v-8.5z'/%3E%3C/svg%3E");
}
th select.head-drop:not(#\#):not(#\#){
  -webkit-appearance:none;appearance:none;float:right;width:20px!important;min-width:20px!important;max-width:20px!important;height:18px!important;min-height:0!important;
  margin:-2px -4px -2px 6px!important;padding:0!important;border:0!important;border-radius:4px!important;outline-offset:1px;
  color:transparent!important;background:transparent var(--icon-filter) center/13px no-repeat!important;cursor:pointer;font-size:12px!important
}
th select.head-drop:hover:not(#\#):not(#\#){background-color:#e6ecf5!important}
th select.head-drop:not(:has(option:first-child:checked)):not(#\#):not(#\#){background-image:var(--icon-filter-on)!important}
th select.head-drop option{color:var(--text);background:#fff}
:is(.page,#detailModal) th:has(>select.head-drop option:first-child:not(:checked)):not(#\#):not(#\#){color:var(--text)!important}
/* Rows are selected with click / Ctrl+click / Shift+click (no checkboxes); Shift+click must not
   highlight text. The selection hint sits under the list. */
/* One selected-row highlight everywhere (the invoice list's shape): rounded ends, a thin blue
   outline and a light blue fill, for single and multiple selection. Drawn with an inset shadow
   instead of a border so rows keep their size and stay aligned with their headers. */
:root{--row-sel-bg:#eef4ff;--row-sel-line:#9bb8ff;--row-hover-bg:#f5f8fd}
:is(.sales-order-choice,.invoice-list-row,.item-list-row):not(#\#){border-radius:8px}
:is(.sales-order-choice,.invoice-list-row,.item-list-row):hover:not(#\#):not(#\#){background:var(--row-hover-bg)!important}
:is(.sales-order-choice,.invoice-list-row,.item-list-row):is(.selected,.multi-selected):not(#\#):not(#\#){
  background:var(--row-sel-bg)!important;box-shadow:inset 0 0 0 1px var(--row-sel-line)!important;border-color:transparent!important
}
/* Table rows (Picking detail items): cells can only round when the table keeps separate borders. */
table:has(>tbody>tr.picking-item-row):not(#\#){border-collapse:separate!important;border-spacing:0!important}
tr.picking-item-row:is(.selected,:hover)>td:not(#\#):not(#\#){background:var(--row-sel-bg)!important}
tr.picking-item-row:hover:not(.selected)>td:not(#\#):not(#\#){background:var(--row-hover-bg)!important}
tr.picking-item-row.selected:not(#\#):not(#\#),tr.picking-item-row.completed.selected:not(#\#):not(#\#){box-shadow:none!important;background:transparent!important}
tr.picking-item-row.selected>td:not(#\#):not(#\#){box-shadow:inset 0 1px var(--row-sel-line),inset 0 -1px var(--row-sel-line)!important}
tr.picking-item-row.selected>td:first-child:not(#\#):not(#\#){border-radius:8px 0 0 8px;box-shadow:inset 1px 0 var(--row-sel-line),inset 0 1px var(--row-sel-line),inset 0 -1px var(--row-sel-line)!important}
tr.picking-item-row.selected>td:last-child:not(#\#):not(#\#){border-radius:0 8px 8px 0;box-shadow:inset -1px 0 var(--row-sel-line),inset 0 1px var(--row-sel-line),inset 0 -1px var(--row-sel-line)!important}
tr.picking-item-row:hover>td:first-child{border-radius:8px 0 0 8px}
tr.picking-item-row:hover>td:last-child{border-radius:0 8px 8px 0}
/* Every list table on a page gets the same hover as the Sales lists: a soft fill with rounded
   ends. "No records" rows are left alone. */
.page table:has(>tbody>tr):not(#\#){border-collapse:separate!important;border-spacing:0!important}
.page tbody>tr:not(.picking-item-row):not(:has(td.empty)):hover>td:not(#\#):not(#\#){background:var(--row-hover-bg)!important}
.page tbody>tr:not(.picking-item-row):not(:has(td.empty)):hover>td:first-child:not(#\#){border-radius:8px 0 0 8px}
.page tbody>tr:not(.picking-item-row):not(:has(td.empty)):hover>td:last-child:not(#\#){border-radius:0 8px 8px 0}

/* Invoice list: a header (Invoice #, PO #, Customer, Billed Date, Amount, Status) over rows that
   share its grid columns (set inline by resizableGridColumns). Rows have a 1px border, so the
   header's inset is one pixel wider to keep headings over their values. */
.invoice-list-row:not(#\#):not(#\#){min-height:28px!important;column-gap:8px!important;padding-left:10px!important;padding-right:10px!important}
.invoice-list-header:not(#\#):not(#\#){display:grid!important;align-items:center;padding-left:11px!important;padding-right:11px!important;margin-bottom:4px;border-radius:0}
.invoice-list-header .sales-column-heading:not(#\#){position:relative;min-width:0;cursor:pointer}
.invoice-list-header .sales-column-resizer:not(#\#):not(#\#){position:absolute;z-index:2;top:-7px;right:-6px;width:10px;height:28px;cursor:col-resize;border-right:2px solid transparent}
.invoice-list-row .invoice-amount{text-align:right;font-variant-numeric:tabular-nums}
.invoice-list-row .sales-status:not(#\#){justify-self:start;max-width:100%;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
/* Invoice list and preview are split by a draggable divider (sales-ui.js setupInvoicePanelDivider). */
.invoice-split:not(#\#):not(#\#){grid-template-columns:minmax(300px,var(--invoice-left,45%)) 10px minmax(560px,1fr);gap:0}
.invoice-divider{position:relative;cursor:col-resize;touch-action:none}
.invoice-divider:after{content:"";position:absolute;inset:0 3px;border-radius:5px;background:#d8dfeb;transition:background .15s}
.invoice-divider:is(:hover,:focus,.dragging):after{background:var(--brand)}
@media(max-width:1050px){.invoice-split:not(#\#):not(#\#){grid-template-columns:1fr;gap:12px}.invoice-divider{display:none}}
:is(.sales-order-choice,.invoice-list-row){user-select:none;-webkit-user-select:none}
.sales-selection-status:not(#\#){margin:10px 0 0!important;font-size:12px;color:var(--muted)}
:is(.sales-order-choice,.invoice-list-row) .sales-status:not(#\#):not(#\#){line-height:15px!important;padding-top:0!important;padding-bottom:0!important;align-self:center}

/* Sales toolbars (.sales-icon-action) were stacked glyph tiles, colored per position on Picking.
   sales.css styles them with ID-scoped !important rules, so these selectors carry two
   never-matching :not(#\#) to outrank them. Same look as .btn. */
.sales-icon-action:not(#\#):not(#\#){
  display:inline-flex;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  height:var(--btn-h)!important;min-height:0!important;min-width:0!important;padding:0 14px!important;box-sizing:border-box!important;
  border-radius:var(--radius)!important;border:1px solid var(--line-strong)!important;background:#fff!important;color:var(--text)!important;
  box-shadow:none!important;filter:none!important;transform:none!important;font:600 14px/1 var(--font)!important;white-space:nowrap!important;cursor:pointer!important;
}
.sales-icon-action:not(#\#):not(#\#):hover{background:#f4f6fa!important;border-color:#a9b3c3!important;color:var(--text)!important;filter:none!important}
.sales-icon-action:not(#\#):not(#\#):disabled{background:#fff!important;border-color:var(--line-strong)!important;color:var(--text)!important;opacity:.5!important;cursor:not-allowed!important}
.sales-icon-action:not(#\#):not(#\#) small{font:inherit!important;line-height:1!important}
.sales-icon-action:not(#\#):not(#\#)>span:not(.ui-icon){display:none!important}
.sales-icon-action .ui-icon{width:16px!important;height:16px!important;flex-shrink:0!important}
.sales-new-action .sales-icon-action:not(#\#):not(#\#),.sales-icon-action[data-command="Finish"]:not(#\#):not(#\#){background:var(--brand)!important;border-color:var(--brand)!important;color:#fff!important}
.sales-new-action .sales-icon-action:not(#\#):not(#\#):hover,.sales-icon-action[data-command="Finish"]:not(#\#):not(#\#):hover{background:var(--brand2)!important;border-color:var(--brand2)!important;color:#fff!important}
.sales-icon-action.danger:not(#\#):not(#\#){color:var(--danger)!important;border-color:var(--danger-line)!important}
.sales-icon-action.danger:not(#\#):not(#\#):hover{background:var(--danger-soft)!important}
.sales-main-toolbar,.sales-action-bar,.picking-action-bar,.shipping-action-bar{align-items:center!important;gap:8px!important;flex-wrap:wrap}
/* Sales pages: title on the left, toolbar on the right of the same row, like every other page.
   ui.js moves buttons that do not fit into a "More" menu. The toolbar's inner groups use
   display:contents so New and the other actions sit in one row. */
.sales-page-title>div:first-child:not(#\#):not(#\#){flex:1 1 auto;min-width:0}
.sales-page-title>:not(:first-child):not(#\#):not(#\#){flex:0 0 auto;flex-wrap:nowrap!important;justify-content:flex-end!important;margin:0 0 0 auto!important;transform:none!important;overflow:visible!important;max-width:100%!important;padding:0!important;border:0!important}
.sales-main-toolbar>:is(.sales-new-action,.sales-action-bar){display:contents!important}
.sales-icon-action.toolbar-utility:not(#\#):not(#\#){width:var(--btn-h);padding:0!important}
/* Buttons moved into a toolbar's More menu look like menu items. */
.ui-menu-list .sales-icon-action:not(#\#):not(#\#){width:100%;justify-content:flex-start!important;gap:10px!important;border:0!important;background:transparent!important;font-weight:500!important;padding:0 10px!important}
.ui-menu-list .sales-icon-action:not(#\#):not(#\#):hover{background:#eef2f8!important}
.ui-menu-list .sales-icon-action.danger:not(#\#):not(#\#):hover{background:var(--danger-soft)!important}
.toolbar-more [data-ui-menu] .ui-icon{order:2}
.sales-icon-action.toolbar-utility:not(#\#):not(#\#) small{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* "More" menu (UiIcons.moreMenu) */
.ui-menu{position:relative;display:inline-flex}
.ui-menu [data-ui-menu] .ui-icon{order:2}
.ui-menu-list{position:absolute;right:0;top:calc(100% + 6px);z-index:1300;min-width:220px;display:flex;flex-direction:column;gap:2px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 10px 28px rgba(16,24,40,.14)}
.ui-menu-list[hidden]{display:none}
.ui-menu-item{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:var(--text);font:500 14px/1 var(--font);text-align:left;cursor:pointer;white-space:nowrap}
.ui-menu-item:hover,.ui-menu-item:focus-visible{background:#eef2f8;outline:none}
.ui-menu-item.danger{color:var(--danger)}
.ui-menu-item.danger:hover{background:var(--danger-soft)}
.ui-menu-item .ui-icon{width:16px;height:16px;flex-shrink:0}

/* Account menu (top bar): initials avatar with a cloud sync badge overlapping its corner; the
   menu opens on hover or click. Replaces the old user switcher, status pill and Sign Out button. */
#smtekCloudPill,#smtekSignOutButton,.current-user>span:not(.user-avatar){display:none!important}
.user-menu{position:relative;display:flex;align-items:center;margin-left:auto}
/* The old ".current-user span" label style (small gray capitals) must not reach the menu. */
.user-menu span{font-size:inherit;text-transform:none;letter-spacing:inherit;color:inherit;font-weight:inherit}
.user-menu .user-avatar{color:#fff;font-size:13px;font-weight:700}
.user-avatar{position:relative;width:36px;height:36px;border-radius:50%;border:0;padding:0;background:var(--brand);color:#fff;display:inline-flex;align-items:center;justify-content:center;font:700 13px/1 var(--font);letter-spacing:.3px;cursor:pointer;flex-shrink:0}
.user-avatar:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.user-avatar.small{width:36px;height:36px;cursor:default}
.user-sync-badge{position:absolute;right:-9px;bottom:-7px;width:22px;height:22px;display:flex;pointer-events:none}
.user-sync-badge svg{display:block;filter:drop-shadow(0 1px 1px rgba(16,24,40,.25))}
/* The panel's top padding bridges the gap under the avatar so the hover doesn't drop. */
.user-menu-panel{position:absolute;top:100%;right:0;z-index:1400;width:280px;padding-top:10px;display:none}
.user-menu:hover .user-menu-panel,.user-menu.open .user-menu-panel{display:block}
.user-menu-card{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 28px rgba(16,24,40,.14);overflow:hidden}
.user-menu-head{display:flex;align-items:center;gap:12px;padding:14px;border-bottom:1px solid var(--line)}
.user-menu-head b{display:block;font-size:14px;line-height:1.3}
.user-menu-head small{display:block;font-size:12px;color:var(--muted);word-break:break-all}
.user-menu-row{display:flex;align-items:center;gap:10px;padding:9px 14px;font-size:13px;color:var(--text)}
.user-menu-row small{color:var(--muted)}
.user-menu-row .ui-icon{width:16px;height:16px;color:var(--muted);flex-shrink:0}
.user-menu-live{padding-top:0!important;font-size:12px!important;color:var(--muted)!important;align-items:flex-start!important}
.user-menu-live span{white-space:normal;line-height:1.35;min-width:0;max-width:230px}
.user-menu-live i{margin-top:4px!important}
.user-menu-live i{width:8px;height:8px;border-radius:50%;flex-shrink:0;margin:0 5px;background:#98a2b3}
.user-menu-live.on i{background:#12b76a}
.user-menu-live.off i{background:#f79009}
.user-menu-signout{display:flex;align-items:center;gap:10px;width:100%;padding:11px 14px;border:0;border-top:1px solid var(--line);background:#fff;color:var(--danger);font:600 13px/1 var(--font);text-align:left;cursor:pointer}
.user-menu-signout:hover,.user-menu-signout:focus-visible{background:var(--danger-soft);outline:none}

/* In-app document viewer (UiDocs): replaces new browser tabs for PDFs and printable reports. */
.ui-doc-viewer{position:fixed;inset:0;z-index:5000;background:rgba(12,18,29,.5);display:flex;align-items:center;justify-content:center;padding:24px}
.ui-doc-dialog{width:min(1100px,100%);height:min(92vh,1000px);background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.25);display:flex;flex-direction:column;overflow:hidden}
.ui-doc-head{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.ui-doc-head h2{margin:0;font-size:18px;font-weight:800;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ui-doc-actions{display:flex;align-items:center;gap:8px}
.ui-doc-hint{margin:0;padding:8px 16px;font-size:13px;color:var(--muted);background:var(--head-bg,#f7f9fc);border-bottom:1px solid var(--line)}
.ui-doc-frame{flex:1;width:100%;border:0;background:#eef1f6}

/* Close and remove buttons become quiet icon buttons. */
button.x,button.remove,button.invoice-remove{
  display:inline-flex;align-items:center;justify-content:center;width:var(--btn-h);height:var(--btn-h);
  padding:0!important;border:0!important;border-radius:var(--radius);background:transparent!important;color:var(--muted)!important;cursor:pointer;
}
button.x:hover{background:#eef1f6!important;color:var(--text)!important}
button.remove:hover,button.invoice-remove:hover{background:var(--danger-soft)!important;color:var(--danger)!important}
button.x .ui-icon,button.remove .ui-icon,button.invoice-remove .ui-icon{width:18px;height:18px}

/* Sidebar: a long expanded menu scrolls, and the version label follows the menu instead of
   being pinned over it. */
.side{background:var(--sidebar)!important;display:flex;flex-direction:column}
.side>.nav{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#2c4270 transparent}
.side-foot:not(#\#){position:static!important;margin-top:auto;padding:16px 10px 0}
.logo-main{color:#fff}
.logo-sub{display:flex;align-items:center;gap:6px;color:var(--sidebar-text);letter-spacing:1.5px!important}
.logo-sub:before{content:'';width:8px;height:8px;border-radius:2px;background:var(--accent);flex-shrink:0}
.nav button{display:flex;align-items:center;gap:10px;color:var(--sidebar-text);border-radius:8px}
.nav button:before,.nav-sub:before{content:none!important}
.nav button.active,.nav button:hover{background:var(--sidebar-active);color:#fff}
.nav-parent{color:#fff!important;font-weight:700}
.nav-parent .ui-icon{width:18px;height:18px;flex-shrink:0;opacity:.9}
.nav-sub{padding-left:40px!important}
.nav-sub.active{background:var(--brand)!important;color:#fff!important;font-weight:700}
.nav-group:has(.nav-sub.active) .nav-parent{background:var(--sidebar-active)}
.sidebar-mini .nav-parent .ui-icon{margin:0 auto}

/* PO detail: title and subtitle never wrap; buttons drop to a second row when space runs out. */
#detailModal .dialog-head:not(#\#){flex-wrap:wrap;row-gap:10px}
#detailModal .dialog-head>div:first-child:not(#\#){flex:0 0 auto;min-width:0}
#detailModal .dialog-head>div:first-child :is(h2,.sub):not(#\#){white-space:nowrap}
#detailModal .dialog-head>div:last-child:not(#\#){flex-wrap:wrap;justify-content:flex-end;margin-left:auto}

/* Hovering Send Email on a sent PO shows a bubble: when, to whom, by whom (latest first). */
.po-send-wrap{position:relative;display:inline-flex}
.po-sent-bubble{display:none;position:absolute;top:calc(100% + 9px);right:0;z-index:30;width:300px;padding:10px 12px;border-radius:8px;background:#1d252c;color:#fff;font-size:12px;font-weight:400;line-height:1.5;white-space:normal;text-align:left;box-shadow:0 8px 24px rgba(16,24,39,.22);pointer-events:none}
.po-sent-bubble:before{content:"";position:absolute;top:-5px;right:28px;width:10px;height:10px;background:#1d252c;transform:rotate(45deg)}
.po-sent-bubble b{font-weight:700}
.po-sent-bubble .m{color:#b8c2d3}
.po-sent-bubble>div{overflow-wrap:anywhere}
.po-sent-count{color:#7ee2b0;font-weight:700;margin-bottom:2px}
.po-sent-history{border-top:1px solid #3a4452;margin-top:8px;padding-top:7px;color:#b8c2d3}
.po-sent-history>div:not(.m){display:flex;justify-content:space-between;gap:8px;margin-top:4px}
.po-sent-history>div:first-child{margin-top:0}
.po-send-wrap:is(:hover,:focus-within) .po-sent-bubble{display:block}

/* Create / Edit Purchase Order window: the form scrolls inside the window, which clips to its
   rounded corners, so no scrollbar can square off an edge. The products table stays inside. */
#poModal .dialog:not(#\#):not(#\#){display:flex!important;flex-direction:column!important;overflow:hidden!important}
#poModal .dialog>.dialog-head:not(#\#){flex:0 0 auto}
#poModal .dialog>form:not(#\#){flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden!important}
#poModal .po-lines-table:not(#\#):not(#\#){width:100%!important;margin-left:0!important;margin-right:0!important}
#poModal .lines:not(#\#){margin-left:0!important;margin-right:0!important}
/* Smaller windows: PO product columns share the width (no cut-off, and the Item # list still opens). */
@media (max-width:1399px){
  #poModal .po-lines-table :is(th,td):nth-child(1):not(#\#):not(#\#){width:14%!important}
  #poModal .po-lines-table :is(th,td):nth-child(2):not(#\#):not(#\#){width:9%!important}
  #poModal .po-lines-table :is(th,td):nth-child(3):not(#\#):not(#\#){width:11%!important}
  #poModal .po-lines-table :is(th,td):nth-child(4):not(#\#):not(#\#){width:auto!important}
  #poModal .po-lines-table :is(th,td):nth-child(5):not(#\#):not(#\#){width:8.5%!important}
  #poModal .po-lines-table :is(th,td):nth-child(6):not(#\#):not(#\#){width:8.5%!important}
  #poModal .po-lines-table :is(th,td):nth-child(7):not(#\#):not(#\#){width:8%!important}
  #poModal .po-lines-table :is(th,td):nth-child(8):not(#\#):not(#\#){width:8%!important}
  #poModal .po-lines-table :is(th,td):nth-child(9):not(#\#):not(#\#){width:9%!important}
  #poModal .po-lines-table :is(th,td):nth-child(10):not(#\#):not(#\#){width:36px!important}
  #poModal .po-lines-table table:not(#\#):not(#\#){min-width:0!important}
}
#poModal .po-lines-table th:not(#\#):not(#\#){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* PO list hover card: every item line of the PO; scrolls inside itself when taller than the screen. */
.po-peek{position:fixed;z-index:400;width:min(600px,calc(100vw - 16px));max-height:calc(100vh - 16px);display:flex;flex-direction:column;background:#fff;border:1px solid #d6deea;border-radius:12px;box-shadow:0 12px 32px rgba(16,24,39,.18);font-size:12px;color:var(--text);overflow:hidden}
.po-peek-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:10px 14px 6px}
.po-peek-head b{font-size:14px;font-weight:800}
.po-peek-head .status{font-size:12px;font-weight:700;white-space:nowrap}
.po-peek-body{overflow:auto;padding:0 14px;min-height:0}
.po-peek table{width:100%;border-collapse:collapse;table-layout:fixed}
.po-peek th{position:sticky;top:0;background:#f7f9fc;color:var(--muted);font-size:10.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;text-align:left;padding:5px 6px;border-bottom:1px solid var(--line)}
.po-peek td{padding:4px 6px;border-bottom:1px solid #eef1f6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.po-peek :is(th,td):nth-child(1){width:92px}
.po-peek :is(th,td):nth-child(n+3){width:64px;text-align:right}
.po-peek :is(th,td):nth-child(6){width:78px}
.po-peek-foot{display:flex;justify-content:space-between;gap:10px;padding:7px 14px 10px;color:var(--muted);border-top:1px solid var(--line)}
.po-peek-foot b{color:var(--text)}
.po-peek.compact{font-size:11px}
.po-peek.compact td{padding:2px 6px}
.receiving-peek{width:min(520px,calc(100vw - 16px))}
.receiving-peek :is(th,td):nth-child(n+3){width:auto}
.receiving-peek :is(th,td):nth-child(3){width:104px}
.receiving-peek :is(th,td):nth-child(4){width:118px}
.receiving-editing :is(input,select):disabled{background:#f3f5f9!important;color:var(--muted)!important;cursor:not-allowed}

/* New-PO notices in Purchase Orders: highlighted row with a New tag for the team member who has to
   acknowledge; Waiting / Acknowledged marks for administrators. */
#poTable tr.po-row-new>td{background:#fff3c4!important}
.po-new-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#e5a400;margin-right:6px;vertical-align:1px}
.po-new-tag{display:inline-block;margin-left:6px;padding:0 6px;border-radius:8px;background:#172033;color:#fff;font-size:10px;font-weight:700;line-height:16px;vertical-align:1px}
.po-sent-date{display:inline-block;min-width:92px;vertical-align:middle} /* fixed width so the marks line up in one column */
.po-ack-mark{display:inline-flex;vertical-align:middle;cursor:default}
.po-ack-mark.ok,.po-ack-text.ok{color:#0b8a4c}
.po-ack-mark.wait,.po-ack-text.wait{color:#b7791f}
.po-new-note{margin:0 22px 4px;padding:8px 12px;border-radius:8px;background:#fff3c4;border:1px solid #f0d77a;color:#5c4400;font-size:13px}
.po-sent-bubble .g{color:#7ee2b0}
.po-sent-bubble .y{color:#f5c242}
.ui-tip{position:fixed;z-index:450;max-width:280px;padding:7px 10px;border-radius:8px;background:#1d252c;color:#fff;font-size:12px;line-height:1.45;box-shadow:0 8px 24px rgba(16,24,39,.22);pointer-events:none}

/* Production Tracking history: one table row per revision or comment, newest first. */
#productionHistoryModal .history-meta{display:flex;flex-wrap:wrap;gap:6px 22px;margin:0 0 12px;color:var(--muted);font-size:13px}
#productionHistoryModal .history-meta b{color:var(--text)}
#productionHistoryModal .history-table-wrap{max-height:min(60vh,560px);overflow:auto;border:1px solid var(--line);border-radius:10px}
#productionHistoryModal .history-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:13px}
#productionHistoryModal .history-table th{position:sticky;top:0;z-index:1;background:#f7f9fc;color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;text-align:left;padding:7px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
#productionHistoryModal .history-table td{padding:7px 10px;border-bottom:1px solid #eef1f6;vertical-align:top}
#productionHistoryModal .history-table tr:last-child td{border-bottom:0}
#productionHistoryModal .history-table :is(th,td):nth-child(1){width:34px;color:var(--muted)}
#productionHistoryModal .history-table :is(th,td):nth-child(2){width:92px}
#productionHistoryModal .history-table :is(th,td):nth-child(3){width:210px;white-space:nowrap}
#productionHistoryModal .history-table :is(th,td):nth-child(5){width:110px}
#productionHistoryModal .history-table :is(th,td):nth-child(6){width:150px;white-space:nowrap}
#productionHistoryModal .history-text{white-space:pre-wrap;overflow-wrap:anywhere}
#productionHistoryModal .history-kind{display:inline-block;padding:0 7px;border-radius:9px;font-size:11px;font-weight:700;line-height:18px}
#productionHistoryModal .history-kind.rev{background:#e8efff;color:#1d4ed8}
#productionHistoryModal .history-kind.cmt{background:#f1f3f6;color:#475467}
#productionHistoryModal .history-arrow{color:#98a2b3;margin:0 5px}
#productionHistoryModal .history-muted{color:var(--muted)}
#productionHistoryModal .history-new td{background:#fff7d6}

/* Shipment PO / Item search boxes: text stops before the drop-down arrow (a general input rule was
   overriding the padding), and a long label ends with "…". */
.ship-alloc-search input:not(#\#):not(#\#){padding-right:38px!important;text-overflow:ellipsis;white-space:nowrap}
.shipment-cancelled-note{margin:14px 18px 6px;padding:10px 14px;border-radius:10px;background:#fef3f2;border:1px solid #fecdca;color:#912018;font-size:13px}
#customsPackingListModal .packing-blank{color:var(--muted);text-align:center}

/* Shipment email window (Email Warehouse / Email Customs). */
#shipmentEmailModal{z-index:1300}
#shipmentEmailModal .ship-email-dialog{width:min(860px,calc(100vw - 28px));max-height:94vh;display:flex;flex-direction:column;overflow:hidden}
#shipmentEmailModal .ship-email-body{flex:1 1 auto;min-height:0;overflow:auto;padding:18px 22px}
#shipmentEmailModal textarea{width:100%;box-sizing:border-box;resize:vertical;font:inherit;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
#shipmentEmailModal .ship-email-files{margin-top:16px;display:flex;flex-direction:column;gap:8px}
#shipmentEmailModal .ship-email-file{display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:#fbfcfe}
#shipmentEmailModal .ship-email-file-name{flex:1;min-width:0;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#shipmentEmailModal .ship-email-file.removed .ship-email-file-name{color:var(--muted);text-decoration:line-through;font-weight:400}
#shipmentEmailModal .ship-email-error{margin-top:12px;color:var(--danger,#d92d20);font-size:13px}
#shipmentEmailModal .ship-email-error:empty{display:none}
#shipmentEmailModal .ship-email-actions{flex:0 0 auto;display:flex;justify-content:flex-end;gap:10px;padding:14px 22px;border-top:1px solid var(--line);background:#fff}
/* While email attachments are built, the document windows open briefly off screen. */
body.building-docs :is(#warehouseInvoiceModal,#warehousePackingListModal,#warehouseASNModal,#customsInvoiceModal,#customsPackingListModal){visibility:hidden!important}
/* Scrolling windows: a slim rounded scrollbar that stops short of the rounded corners, so the
   window's right edge keeps its 18px corners (the plain scrollbar squared them off). */
.modal .dialog::-webkit-scrollbar{width:10px}
.modal .dialog::-webkit-scrollbar-track{background:transparent;margin:16px 0}
.modal .dialog::-webkit-scrollbar-thumb{background:#c9d1dd;border-radius:10px;border:2px solid #fff}
.modal .dialog::-webkit-scrollbar-thumb:hover{background:#aab4c3}

/* Sidebar stays in place at full window height while long pages scroll (a later rule had made it scroll away with the page). */
.app>.side{position:sticky!important;top:0;height:100vh;align-self:start}
/* File drop box: a dashed area that takes a dropped file or opens the file chooser when clicked. */
.file-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:22px 16px;margin:6px 0 4px;border:2px dashed var(--line);border-radius:12px;background:var(--panel,#fff);color:var(--muted);text-align:center;cursor:pointer;transition:border-color .15s,background .15s}
.file-drop b{color:var(--text)}
.file-drop:hover,.file-drop.over{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 6%,transparent)}
.file-drop input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.file-drop-name:not(:empty){margin-top:4px;font-weight:700;color:var(--brand)}
/* Password box with a show / hide eye at its right edge. */
.pw-wrap{position:relative;display:block;width:100%}
.pw-wrap>input{width:100%;padding-right:42px!important}
.pw-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;padding:6px;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}
.pw-eye:hover{color:var(--text);background:rgba(16,24,40,.05)}
/* Item → Price List: customers an item is exclusive to (tick boxes in a scrolling box). */
.exclusive-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:6px 14px;max-height:190px;overflow:auto;border:1px solid var(--line);border-radius:8px;padding:10px}
.item-detail-panel .exclusive-picker .inline-check{min-height:0;font-size:13px;font-weight:600;cursor:pointer}
