/* Approved Apple-style admin lists only. No customer-facing phone selectors. */
.sx-time { display:grid; gap:2px; font-size:12px; white-space:nowrap; font-variant-numeric:tabular-nums; line-height:1.3; }
.sx-time small { font-size:11px; color:var(--ap-muted); }
/* Product rows stay tabular on computers. Only the phone viewport becomes cards;
   a sidebar or narrow parent must not silently turn a desktop list into a form. */
.shell .product-list-workbench .reference-product-table-wrap { overflow:auto; }
.shell .sx-product-table { display:table; width:100%; min-width:940px; table-layout:fixed; }
.shell .sx-product-table thead { display:table-header-group; }
.shell .sx-product-table tbody { display:table-row-group; }
.shell .sx-product-table tr { display:table-row; }
.shell .sx-product-table th { height:40px; padding:8px; font-size:12px; }
.shell .sx-product-table td { display:table-cell; height:64px; padding:8px; font-size:13px; vertical-align:middle; white-space:normal; overflow-wrap:anywhere; }
.shell .sx-product-table td::before { content:none; }
.shell .sx-product-table .sx-col-select { width:38px; }
.shell .sx-product-table .sx-col-category { width:100px; }
.shell .sx-product-table .sx-col-flags { width:166px; }
.shell .sx-product-table .sx-col-status { width:86px; }
.shell .sx-product-table .sx-col-order { width:48px; text-align:right; }
.shell .sx-product-table .sx-col-time { width:104px; }
.shell .sx-product-table .sx-col-actions { width:88px; }
.shell .sx-product-table [data-field="display-order"] { text-align:right; font-variant-numeric:tabular-nums; }
.sx-product-identity { display:flex; align-items:center; gap:10px; min-width:0; }
.sx-product-image { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; border:1px solid var(--ap-line); border-radius:7px; background:var(--ap-inset); color:var(--ap-muted); font-size:10px; }
.shell .sx-product-image .product-list-thumb { display:block; width:100%; height:100%; object-fit:cover; border-radius:6px; }
.shell .sx-product-table .product-title-button { min-width:0; padding:0; flex:1; }
.shell .sx-product-table .product-title-button strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:13px; font-weight:550; line-height:1.4; }
.sx-product-meta { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; }
.shell .sx-product-table .product-source-badge { width:auto; padding:0; background:transparent; color:var(--ap-muted); font-size:11px; }
.shell .sx-product-table .product-title-button .code { font-size:11px; }
.sx-product-flags { display:flex; align-items:center; gap:12px; }
.sx-product-flags > div { display:grid; justify-items:center; gap:5px; flex:0 0 auto; }
.sx-product-flags > div > span { color:var(--ap-muted); font-size:11px; white-space:nowrap; }
.shell .sx-product-table .sx-product-switch { position:relative; display:block; justify-self:center; flex:0 0 auto; width:34px; min-width:34px; max-width:34px; height:20px; min-height:20px; padding:2px; border:1px solid var(--ap-line); border-radius:10px; background:var(--ap-inset); }
.shell .sx-product-table .sx-product-switch span { position:absolute; top:2px; left:2px; display:block; width:14px; height:14px; border-radius:50%; background:var(--ap-muted); transition:transform .15s ease-out; }
.shell .sx-product-table .sx-product-switch.is-on { border-color:var(--ap-accent); background:var(--ap-accent); }
.shell .sx-product-table .sx-product-switch.is-on span { background:var(--ap-on); transform:translateX(14px); }
.shell .reference-toggle:not(.sx-product-switch) { justify-self:start; flex:0 0 auto; width:max-content; max-width:100%; }
.shell .sx-product-table .reference-row-actions { display:flex; gap:10px; }
.shell .sx-product-table .reference-text-button { padding:0; font-size:12px; font-weight:500; }
.shell .sx-product-table .product-channel-status { display:inline-block; padding:4px 6px; font-size:11px; white-space:nowrap; }
.shell .sx-product-table td.empty-state { height:144px; text-align:center; }
@media (prefers-reduced-motion:reduce) { .shell .sx-product-table .sx-product-switch span { transition:none; } }
@media (max-width:820px) {
  .shell .product-list-workbench .reference-product-table-wrap { overflow:visible; border:0; background:transparent; box-shadow:none; }
  .shell .sx-product-table { display:block; min-width:0; table-layout:auto; }
  .shell .sx-product-table thead { display:none; }
  .shell .sx-product-table tbody { display:grid; gap:12px; }
  .shell .sx-product-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; padding:12px; border:1px solid var(--ap-line); border-radius:12px; background:var(--ap-surface); }
  .shell .sx-product-table td { display:grid; height:auto; min-width:0; padding:0; gap:4px; border:0; position:static; box-shadow:none; }
  .shell .sx-product-table td[data-label]::before { content:attr(data-label); font-size:11px; color:var(--ap-muted); }
  .shell .sx-product-table td[data-field="title"] { grid-column:1/-1; grid-row:1; padding-right:44px; }
  .shell .sx-product-table td[data-field="title"]::before,
  .shell .sx-product-table td[data-field="select"]::before,
  .shell .sx-product-table td[data-field="actions"]::before { content:none; }
  .shell .sx-product-table td[data-field="select"] { grid-column:2; grid-row:1; justify-self:end; align-self:start; }
  .shell .sx-product-table .product-row-select { display:grid; width:44px; height:44px; place-items:center; }
  .shell .sx-product-table .product-row-select input { width:18px; height:18px; }
  .shell .sx-product-table td[data-field="recommendations"] { grid-column:1/-1; }
  .shell .sx-product-table .sx-product-flags { justify-content:space-between; gap:8px; }
  .shell .sx-product-table .sx-product-flags > div { display:flex; justify-content:space-between; align-items:center; gap:5px; }
  .shell .sx-product-table .sx-product-switch { width:44px; min-width:44px; max-width:44px; height:44px; min-height:44px; padding:0; border:0; background:transparent; }
  .shell .sx-product-table .sx-product-switch::before { content:""; position:absolute; width:34px; height:20px; left:5px; top:12px; border-radius:10px; border:1px solid var(--ap-line); background:var(--ap-inset); }
  .shell .sx-product-table .sx-product-switch.is-on::before { background:var(--ap-accent); border-color:var(--ap-accent); }
  .shell .sx-product-table .sx-product-switch span { top:15px; left:8px; }
  .shell .sx-product-table td[data-field="display-order"] { text-align:left; }
  .shell .sx-product-table td[data-field="actions"] { grid-column:1/-1; border-top:1px solid var(--ap-line); padding-top:4px; }
  .shell .sx-product-table .reference-row-actions { justify-content:flex-end; }
  .shell .sx-product-table .reference-text-button { min-width:44px; min-height:44px; }
  .shell .sx-product-table td.empty-state { grid-column:1/-1; place-items:center; min-height:144px; }
  .shell .sx-product-table .sx-time { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 6px; }
}
.sx-selection { background:var(--ap-surface); border:1px solid var(--ap-line); border-radius:13px; }
.shell .sx-selection.customer-directory { padding:20px 24px 0; box-shadow:0 1px 3px rgba(32,36,43,.03); }
.sx-selection .section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.sx-selection .section-head h2 { margin:0; font-size:18px; }
.sx-selection .section-head p { margin:6px 0 0; font-size:12px; }
.shell .sx-selection .sx-selection-toolbar { display:flex; flex-wrap:wrap; gap:10px; padding:0 0 16px; margin:0; }
.sx-selection-search { flex:1; min-width:220px; max-width:450px; }
.sx-selection-search input { width:100%; box-sizing:border-box; }
.shell .sx-selection .sx-selection-toolbar input,
.shell .sx-selection .sx-selection-toolbar select { height:40px; background:var(--ap-surface); }
.shell .sx-selection .sx-selection-table { max-height:max(320px,calc(100dvh - 400px)); overflow:auto; border:1px solid var(--ap-line); border-radius:10px; margin:0; }
.sx-compact-table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:13px; }
.sx-compact-table thead { position:sticky; top:0; z-index:1; }
.shell .sx-selection .sx-compact-table th { padding:12px; text-align:left; background:var(--ap-inset); color:var(--ap-muted); font-size:12px; font-weight:550; }
.shell .sx-selection .sx-compact-table td { padding:7px 12px; height:48px; border-bottom:1px solid var(--ap-line); font-size:13px; line-height:1.35; overflow-wrap:anywhere; }
.sx-compact-table th:nth-child(1) { width:160px; }
.sx-compact-table th:nth-child(2) { width:135px; }
.sx-compact-table th:nth-child(4) { width:54px; }
.sx-compact-table th:nth-child(5) { width:110px; }
.sx-compact-table th:nth-child(6) { width:90px; }
.sx-compact-table th:nth-child(7) { width:115px; }
.sx-compact-table th:last-child { width:74px; }
.sx-selection td strong { font-weight:550; }
.sx-selection .code { font-size:12px; color:var(--ap-muted); font-variant-numeric:tabular-nums; }
.shell .sx-selection td:nth-child(4), .shell .sx-selection th:nth-child(4) { text-align:right; font-variant-numeric:tabular-nums; }
.sx-selection-summary { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.sx-selection .sx-selection-status { font-size:11px; font-weight:500; padding:4px 8px; white-space:nowrap; background:var(--ap-inset); color:var(--ap-muted); }
.sx-selection-status[data-status="pending"], .sx-selection-status[data-status="processing"] { background:var(--ap-soft); color:var(--ap-accent); }
.sx-selection-status[data-status="completed"] { background:var(--ap-soft); color:var(--ap-ink); }
.sx-selection :focus-visible, .sx-approval-customer-name:focus-visible { outline:2px solid var(--ap-accent); outline-offset:3px; }
.shell .sx-selection .sx-selection-detail>td { height:auto; padding:14px 20px; background:var(--ap-inset); }
.sx-selection-detail .selection-request-items { display:flex; flex-wrap:wrap; gap:10px 24px; margin:10px 0; padding-left:16px; }
.sx-selection-detail p { color:var(--ap-muted); }
.shell .sx-selection .sx-list-pagination { display:flex; justify-content:space-between; align-items:center; padding:16px 0; margin:0; gap:12px; font-size:12px; color:var(--ap-muted); }
.shell .sx-selection .sx-list-pagination button { min-height:44px; height:auto; }
.sx-list-pagination>div, .sx-list-pagination label { display:flex; align-items:center; gap:10px; }
.sx-list-pagination select { padding:6px; }
.sx-list-state { padding:32px; text-align:center; }
.sx-approval-customer-name { appearance:none; border:0; border-radius:4px; background:transparent; color:var(--ap-accent); font:inherit; font-weight:550; padding:3px 0; text-align:left; cursor:pointer; }
.sx-approval-customer-name:hover { text-decoration:underline; text-underline-offset:3px; }
.sx-approval-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.sx-approval-actions>.link-button { white-space:nowrap; }
@media (max-width:1200px) {
  .sx-compact-table th:nth-child(1) { width:130px; }
  .sx-compact-table th:nth-child(2) { width:100px; }
  .sx-compact-table th:nth-child(5) { width:88px; }
}
@media (max-width:820px) {
  .shell .sx-selection.customer-directory { padding:16px 12px 0; }
  .sx-selection .section-head { align-items:flex-start; flex-wrap:wrap; }
  .sx-selection-search { min-width:100%; max-width:none; }
  .shell .sx-selection .sx-selection-table { max-height:none; overflow:visible; }
  .shell .sx-selection .sx-compact-table { min-width:0; width:100%; }
  .sx-compact-table, .sx-compact-table tbody { display:block; }
  .sx-compact-table thead { display:none; }
  .sx-compact-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0 12px; padding:10px 12px; border-bottom:1px solid var(--ap-line); }
  .shell .sx-selection .sx-compact-table td { display:flex; gap:8px; height:auto; min-height:32px; padding:4px 0; border:0; font-size:12px; min-width:0; }
  .sx-compact-table td::before { content:attr(data-label); color:var(--ap-muted); font-size:11px; flex-shrink:0; }
  .sx-compact-table td:nth-child(1), .sx-compact-table td:nth-child(3), .sx-compact-table td:nth-child(7) { grid-column:1/-1; }
  .shell .sx-selection td:nth-child(4) { text-align:left; }
  .shell .sx-selection .sx-compact-table td:last-child { align-items:center; justify-content:flex-end; grid-column:1/-1; position:static; background:transparent; box-shadow:none; }
  .sx-selection button, .sx-approval-customer-name, .sx-approval-actions>.link-button,
  .shell .sx-selection .sx-selection-toolbar input, .shell .sx-selection .sx-selection-toolbar select { min-height:44px; }
  .shell .sx-selection .sx-list-pagination button { min-height:44px; }
  .sx-selection .sx-list-pagination { flex-direction:column; align-items:flex-start; }
  .sx-selection .sx-list-pagination>div { flex-wrap:wrap; width:100%; }
  .sx-compact-table .sx-selection-detail, .shell .sx-selection .sx-selection-detail>td { display:block; }
  .shell .sx-selection .sx-selection-detail>td { padding:10px; }
  .sx-time { display:flex; flex-wrap:wrap; gap:6px; }
}
