/* Shops directory and drill-down share colors and type across all panel widths. */
body:has(#shops:not([hidden])) {
  --shop-canvas: #17181b;
  --shop-panel: #202226;
  --shop-raised: #272a2f;
  --shop-border: #41454e;
  --shop-text: #f3f4f6;
  --shop-muted: #b6bdc9;
  --shop-blue: #8cbcff;
  --shop-accent: #5596ff;
  --shop-action: #2459b4;
  --shop-selected: #26364c;
  --shop-hover: #292e36;
  --shop-green: #a3dfad;
  --shop-green-bg: #294435;
  --shop-yellow: #f1ca82;
  --shop-yellow-bg: #463b29;
  --shop-red: #f3aaa7;
  --shop-red-bg: #4c3437;
  --shop-secondary-size: .8125rem;
  --shop-body-size: .875rem;
  background: var(--shop-canvas);
}

:root[data-theme="light"] body:has(#shops:not([hidden])) {
  --shop-canvas: #eff2f6;
  --shop-panel: #fff;
  --shop-raised: #f5f7fa;
  --shop-border: #d1d8e3;
  --shop-text: #172130;
  --shop-muted: #505d70;
  --shop-blue: #194f9d;
  --shop-accent: #2b65c5;
  --shop-action: #2459ad;
  --shop-selected: #e5efff;
  --shop-hover: #edf3fa;
  --shop-green: #235e37;
  --shop-green-bg: #e6f4ea;
  --shop-yellow: #765015;
  --shop-yellow-bg: #fbefd4;
  --shop-red: #952f36;
  --shop-red-bg: #fbe8e9;
}

.shops-topbar { display: none; }
#shops.table-panel { margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; color: var(--shop-text); }
#shops .shop-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
#shops [data-shop-layout="shop"] { grid-template-columns: minmax(300px, 1fr) minmax(0, 2.45fr); }
#shops [data-shop-layout="product"] { grid-template-columns: minmax(310px, 1fr) minmax(430px, 1.55fr) minmax(354px, 1.05fr); }
#shops .shop-directory-card { min-width: 0; container: shop-list / inline-size; }
#shops .shop-workspace { container: shop-detail / inline-size; position: relative; min-width: 0; scroll-margin-block-start: 12px; }
#shops .workspace-card:not(.shop-directory-card) {
  background: var(--shop-panel);
  border: 1px solid var(--shop-border);
  border-radius: 9px;
  padding: 13px;
}
#shops .shops-directory-heading { margin: 0 0 12px; }
#shops .shops-directory-heading h2 { margin: 0 0 3px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.018em; }
#shops .shops-directory-heading p, #shops .workspace-note, #shops .workspace-card-title p {
  margin: 0; font-size: var(--shop-secondary-size); line-height: 1.45; color: var(--shop-muted);
}
#shops .shop-directory-card .table-toolbar { display: block; margin: 0 0 11px; padding: 0; }
#shops .directory-toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; gap: 8px; }
#shops .directory-toolbar > label { display: grid; align-self: start; gap: 4px; min-width: 0; margin: 0; font-size: var(--shop-secondary-size); color: var(--shop-text); }
#shops .directory-toolbar > label:has(#directoryScope) { grid-column: 2; grid-row: 2; }
#shops .directory-toolbar > label:has(#directorySync) { grid-column: 3; grid-row: 2; }
#shops .directory-toolbar > label:has(#directoryHealth) { grid-column: 4; grid-row: 2; }
#shops .directory-toolbar > label:has(#directoryLocation) { grid-column: 1; grid-row: 2; }
#shops .directory-toolbar > label.search-box {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--shop-border);
  border-radius: 7px;
  background: var(--shop-panel);
  color: var(--shop-muted);
}
#shops .directory-toolbar .search-box input { width: 100%; padding: 7px 0; min-height: 34px; border: 0; background: transparent; }
#shops .directory-toolbar #clearShopFilters { grid-column: 5; grid-row: 2; }
#shops .directory-toolbar #activeShopsFilter, #shops .directory-toolbar label:has(#shopSort) { display: none; }
#shops :is(button, input, select), .shops-topbar :is(button, select, summary) { font-size: var(--shop-body-size); }
#shops :is(input, select), .shops-topbar select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--shop-border);
  border-radius: 7px;
  padding: 5px 8px;
  background: var(--shop-panel);
  color: var(--shop-text);
  font-weight: 500;
}
#shops input::placeholder { color: var(--shop-muted); }
#shops .directory-toolbar select { width: 100%; text-overflow: ellipsis; }
#shops :is(option, optgroup), .shops-topbar :is(option, optgroup) { background: var(--shop-raised); color: var(--shop-text); }
#shops option:checked, .shops-topbar option:checked { background: var(--shop-selected); color: var(--shop-blue); }
#shops option:disabled, .shops-topbar option:disabled { color: var(--shop-muted); }
#shops :is(button, select, input):disabled { opacity: .58; cursor: default; }
#shops :is(button, input, select, summary, tr[tabindex]):focus-visible, .shops-topbar :focus-visible {
  outline: 2px solid var(--shop-accent);
  outline-offset: 2px;
}
#shops tr[tabindex]:focus-visible { outline-offset: -3px; }
#shops .secondary, #shops .workspace-options button, .shops-topbar .shops-icon-action {
  border: 1px solid var(--shop-border);
  background: var(--shop-raised);
  color: var(--shop-text);
  font-weight: 550;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
}
#shops .secondary:enabled:hover, #shops .workspace-options button:hover { border-color: var(--shop-accent); background: var(--shop-selected); }

#shops .shop-directory-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 13px; }
#shops .shop-directory-counts > span {
  display: grid; align-content: center; gap: 3px; min-height: 56px;
  padding: 7px 9px; background: var(--shop-raised); border: 1px solid var(--shop-border); border-radius: 7px;
}
#shops .shop-directory-counts strong { font-size: 1.25rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
#shops .shop-directory-counts small { font-size: var(--shop-secondary-size); line-height: 1.2; color: var(--shop-muted); }
#shops .table-wrap {
  margin: 0;
  overflow-x: auto;
  border: 1px solid var(--shop-border);
  border-radius: 7px;
  background: var(--shop-panel);
}
#shops .market-table { width: 100%; min-width: 0; margin: 0; border-collapse: collapse; }
#shops .market-table :is(th, td) {
  padding: 9px 9px;
  border-bottom: 1px solid var(--shop-border);
  color: inherit;
  background: transparent;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--shop-body-size);
  line-height: 1.38;
  vertical-align: middle;
}
#shops .market-table th {
  color: var(--shop-muted); font-size: var(--shop-secondary-size); font-weight: 650;
  text-transform: none; letter-spacing: 0; background: var(--shop-raised);
}
#shops .market-table tbody tr { background: transparent; color: var(--shop-text); transition: background-color .16s ease; }
#shops .market-table tbody tr:last-child td { border-bottom: 0; }
#shops .market-table tbody tr:hover { background: var(--shop-hover); }
#shops .market-table :is(.shop-directory-row[data-selected], [data-current-product]) {
  color: var(--shop-text); background: var(--shop-selected); outline: 1px solid var(--shop-accent); outline-offset: -1px;
}
#shops .market-table :is(.shop-directory-row[data-selected], [data-current-product]) td:first-child { box-shadow: inset 3px 0 var(--shop-accent); }
#shops .shop-directory-row td { padding-block: 7px; }
#shops .market-table th button, #shops .shop-product-link {
  border: 0; padding: 0; background: transparent; text-align: inherit; color: inherit; min-height: 23px;
  font: inherit; cursor: pointer;
}
#shops .market-table th button:hover, #shops .shop-product-link:hover { color: var(--shop-blue); text-decoration: underline; }
#shops .market-table td[data-column="name"] { min-width: 8rem; }
#shops .market-table td[data-column="name"] :is(strong, button) {
  display: block; font-weight: 650; font-size: .9375rem;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#shops .market-table tbody small { display: block; color: var(--shop-muted); font-size: var(--shop-secondary-size); margin: 2px 0 0; }
#shops .market-table :is(th, td):is([data-column="units"], [data-column="quantity"], [data-column="price"], [data-column="buyingPrice"], [data-column="sellingPrice"], [data-column="revenue"], [data-column="profit"], [data-column="margin"], [data-column="change"], [data-column="total"]) {
  text-align: right; font-variant-numeric: tabular-nums;
}
#shops .shop-directory-row { cursor: pointer; }
#shops .shop-directory-card [data-column="number"] {
  width: 2.75rem;
  text-align: center;
  color: var(--shop-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#shops .shop-directory-card td[data-column="name"] strong {
  white-space: normal;
}
@container shop-list (width >= 1050px) {
  #shops [data-shop-layout="directory"] .shop-directory-card .market-table { table-layout: fixed; }
  #shops [data-shop-layout="directory"] .shop-directory-card th[data-column="location"] { width: 12%; }
  #shops [data-shop-layout="directory"] .shop-directory-card th[data-column="created"] { width: 7%; }
  #shops [data-shop-layout="directory"] .shop-directory-card th[data-column="sync"] { width: 11.5%; }
  #shops [data-shop-layout="directory"] .shop-directory-card th[data-column="products"] { width: 7%; }
  #shops [data-shop-layout="directory"] .shop-directory-card th[data-column="sales"] { width: 11%; }
  #shops [data-shop-layout="directory"] .shop-directory-card th[data-column="revenue"] { width: 6.5%; }
  #shops [data-shop-layout="directory"] .shop-directory-card th[data-column="updates"] { width: 16%; }
  #shops [data-shop-layout="directory"] .shop-directory-card th[data-column="health"] { width: 14%; }
}
#shops .shop-directory-card [data-column="created"] { min-width: 6.5rem; }
#shops .shop-directory-card [data-column="revenue"] { min-width: 5.25rem; }
#shops .shop-directory-card .shop-row-place { display: none; }
#shops .shop-directory-card :is(.sync-absolute,.sync-relative) { display: block; }
#shops .shop-directory-card [data-column="sync"] .shop-status { margin: 4px 0 0; }
#shops :is(.trend-up,.market-table .trend-up) { color: var(--shop-green); }
#shops :is(.trend-down,.market-table .trend-down) { color: var(--shop-red); }
#shops .missing-value { color: var(--shop-muted); }
#shops .shop-status, #shops .workspace-identity-status {
  display: inline-block; margin: 1px 0; padding: 3px 6px; border: 1px solid transparent; border-radius: 6px;
  font-size: .75rem; font-weight: 550; white-space: normal; line-height: 1.18;
}
#shops :is(.shop-status.positive, .workspace-identity-status) { background: var(--shop-green-bg); color: var(--shop-green); }
#shops .shop-status.warning { background: var(--shop-yellow-bg); color: var(--shop-yellow); }
#shops .shop-status.sync-warning { background: var(--shop-red-bg); color: var(--shop-red); }
#shops .shop-status.info { background: var(--shop-selected); color: var(--shop-blue); }
#shops .shop-status.neutral { background: var(--shop-raised); border-color: var(--shop-border); color: var(--shop-text); }
#shops .shop-pagination, #shops .shop-pagination > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#shops .shop-pagination { justify-content: space-between; margin: 8px 0 0; font-size: var(--shop-secondary-size); color: var(--shop-muted); }
#shops .shop-pagination > p { margin: 0; }
#shops .shop-pagination:has(#shopPages > :disabled):not(:has(#shopPages > :enabled)) #shopPages { display: none; }

#shops .shops-status-guide { margin-top: 12px; padding: 9px 11px; border: 1px solid var(--shop-border); border-radius: 8px; background: var(--shop-raised); }
#shops .shops-status-guide summary, #shops .workspace-metadata summary, #shops .workspace-custom-range summary { cursor: pointer; font-weight: 600; }
#shops .shops-status-guide dl { margin: 8px 0 0; font-size: var(--shop-secondary-size); }
#shops .shops-status-guide dl div { display: grid; grid-template-columns: 6.2rem 1fr; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid var(--shop-border); }
#shops .shops-status-guide dd { margin: 0; color: var(--shop-muted); }

#shops .workspace-identity { display: flex; align-items: center; gap: 11px; padding-right: 30px; margin: 1px 0 10px; }
#shops .workspace-identity-copy { min-width: 0; flex: 1; }
#shops .workspace-identity h2 { margin: 0 0 3px; font-size: 1.25rem; line-height: 1.22; letter-spacing: -.015em; overflow-wrap: anywhere; }
#shops .workspace-identity p { margin: 2px 0 0; color: var(--shop-muted); font-size: var(--shop-secondary-size); }
#shops .workspace-identity .workspace-sync { color: var(--shop-text); }
#shops .workspace-identity-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 1px solid var(--shop-border); border-radius: 8px; background: var(--shop-raised); }
#shops .workspace-identity-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
#shops .workspace-close {
  position: absolute; top: 11px; right: 11px; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--shop-border); border-radius: 7px; background: var(--shop-raised); color: var(--shop-text); font-size: 1.2rem;
}
#shops .workspace-close:hover { border-color: var(--shop-accent); }
#shops .workspace-intro {
  padding: 7px 10px; margin: 0 0 9px; border: 1px solid var(--shop-border); border-inline-start: 2px solid var(--shop-accent);
  border-radius: 6px; background: var(--shop-selected); color: var(--shop-text); font-size: var(--shop-secondary-size);
}
#shops .workspace-panel-tabs, #shops .workspace-options { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
#shops .workspace-panel-tabs { margin: 0 0 13px; border-bottom: 1px solid var(--shop-border); }
#shops .workspace-panel-tabs button {
  min-height: 34px; padding: 5px 9px; background: none; border: 0; border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0; color: var(--shop-muted); font-size: var(--shop-secondary-size); font-weight: 550;
}
#shops .workspace-panel-tabs button:hover { background: var(--shop-raised); color: var(--shop-text); }
#shops .workspace-panel-tabs button[aria-pressed="true"] { color: var(--shop-blue); border-color: var(--shop-accent); font-weight: 650; }
#shops .workspace-alert-count { color: var(--shop-red); background: var(--shop-red-bg); border-radius: 999px; padding: 1px 5px; }
#shops .workspace-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0 0 9px; }
#shops :is(.kpis-shop-main,.kpis-product) { grid-template-columns: repeat(4, minmax(0,1fr)); }
#shops .shop-kpi {
  display: grid; align-content: start; gap: 3px; min-width: 0; min-height: 70px; padding: 8px;
  background: var(--shop-raised); border: 1px solid var(--shop-border); border-radius: 7px;
}
#shops .shop-kpi small { font-size: var(--shop-secondary-size); color: var(--shop-muted); line-height: 1.2; }
#shops .shop-kpi strong { font-size: 1.25rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#shops #productWorkspace .shop-kpi strong { font-size: 1.125rem; }
#shops .shop-context { margin-bottom: 12px; }

#shops :is(.workspace-performance,.workspace-records,.product-movement,.workspace-notice,.product-price-strip.workspace-card) {
  background: var(--shop-raised); margin: 0 0 11px; padding: 10px;
}
#shops .workspace-records { padding: 0; overflow: hidden; }
#shops .workspace-records > :is(.workspace-card-title,.workspace-tabs,.workspace-table-tools) { padding-inline: 10px; }
#shops .workspace-records > .workspace-card-title { padding-top: 10px; }
#shops .workspace-records .table-wrap { border-inline: 0; border-bottom: 0; border-radius: 0; }
#shops .workspace-records .table-wrap + .shop-pagination { padding: 0 10px 8px; }
#shops .workspace-card-title { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 7px; margin: 0 0 7px; }
#shops :is(.workspace-card-title,.product-movement,.workspace-notice) h3 { margin: 0 0 3px; font-size: 1.0625rem; line-height: 1.2; font-weight: 680; }
#shops .workspace-performance .workspace-card-title > div:first-child { flex: 1 1 7rem; min-width: 0; }
#shops .workspace-card-title .shop-product-link { color: var(--shop-blue); font-size: var(--shop-secondary-size); }
#shops .workspace-options button[aria-pressed="true"] { background: var(--shop-action); border-color: var(--shop-accent); color: #fff; }
#shops .chart-toggle { gap: 2px; }
#shops .chart-toggle button { min-height: 29px; font-size: var(--shop-secondary-size); padding: 4px 7px; }
#shops .workspace-table-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
#shops .workspace-table-tools input { flex: 1 1 145px; width: auto; }
#shops .workspace-table-tools select { flex: 1 1 100px; width: auto; max-width: 100%; }
#shops .workspace-table-tools button { white-space: nowrap; }
#shops .workspace-table[data-table-kind="products"] { table-layout: fixed; }
#shops .workspace-table[data-table-kind="products"] [data-column="name"] { width: 25%; }
#shops .workspace-table[data-table-kind="products"] td[data-column="name"] button { width: 100%; }
#shops .workspace-table:not([data-table-kind="products"]) [data-column="date"] { min-width: 9rem; }

#shops .shop-sales-chart { display: block; width: 100%; height: auto; max-height: 204px; margin: 6px 0 0; color: var(--shop-accent); }
#shops .shop-sales-chart text { fill: var(--shop-text); font-size: 12px; }
#shops .shop-sales-chart .chart-date { fill: var(--shop-muted); }
#shops .shop-sales-chart path { fill: none; }
#shops .shop-chart-grid { stroke: var(--shop-border); stroke-width: .8; }
#shops .shop-chart-axis { stroke: var(--shop-muted); stroke-width: .8; }
#shops .shop-chart-line { stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
#shops .shop-sales-chart circle { fill: var(--shop-action); stroke: var(--shop-blue); stroke-width: 1.5; }
#shops .shop-sales-chart .shop-trend-area { fill: url(#shop-trend-fill); }
#shops .shop-trend-bar { fill: url(#product-bar-fill); stroke: var(--shop-blue); stroke-width: .6; }
#shops .product-chart-legend { display: flex; justify-content: center; gap: 14px; color: var(--shop-muted); font-size: var(--shop-secondary-size); }
#shops .product-chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 8px; margin-right: 5px; background: #5f94db; border-radius: 2px; }
#shops .product-chart-legend span + span::before { height: 2px; vertical-align: middle; background: var(--shop-accent); }
#shops .product-price-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
#shops .product-price-strip > div { display: grid; align-content: start; gap: 3px; padding: 3px 7px; border-inline-end: 1px solid var(--shop-border); }
#shops .product-price-strip > div:last-child { border-inline-end: 0; }
#shops .product-price-strip small { font-size: var(--shop-secondary-size); color: var(--shop-muted); line-height: 1.22; }
#shops .product-price-strip strong { font-size: 1.0625rem; line-height: 1.25; overflow-wrap: anywhere; }
#shops .movement-unit { color: var(--shop-muted); font-size: var(--shop-secondary-size); font-weight: 500; }
#shops .product-movement .product-price-strip { margin-top: 7px; }
#shops .workspace-notice { border-inline-start: 2px solid var(--shop-accent); }
#shops .workspace-notice ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: var(--shop-body-size); }
#shops .workspace-notice li + li { margin-top: 5px; }
#shops .workspace-notice li::marker { color: var(--shop-accent); }
#shops .workspace-empty { margin: 0; padding: 14px 10px; color: var(--shop-muted); font-size: var(--shop-body-size); line-height: 1.4; }
#shops .workspace-note { padding: 6px 2px 0; }
#shops .workspace-metadata, #shops .workspace-custom-range { color: var(--shop-muted); font-size: var(--shop-secondary-size); }
#shops .workspace-metadata p { margin: 5px 0; }
#shops .workspace-custom-range form { display: flex; gap: 6px; flex-wrap: wrap; align-items: end; margin: 7px 0; }
#shops .workspace-custom-range form label { display: grid; gap: 4px; }
#shops [data-range-error]:empty { display: none; }
#shops [data-range-error] { color: var(--shop-red); }

#shops [data-shop-layout]:not([data-shop-layout="directory"]) .shop-directory-card [data-column]:not(:is([data-column="number"],[data-column="name"],[data-column="sync"],[data-column="health"])) { display: none; }
#shops [data-shop-layout]:not([data-shop-layout="directory"]) .shop-directory-card .shop-row-place { display: block; }
#shops [data-shop-layout]:not([data-shop-layout="directory"]) .shop-directory-card :is(.sync-absolute,.secondary-status) { display: none; }
#shops [data-shop-layout]:not([data-shop-layout="directory"]) .shop-directory-card .table-wrap { max-block-size: clamp(260px, 45vh, 540px); }
#shops [data-shop-layout]:not([data-shop-layout="directory"]) .shop-directory-card thead { position: sticky; inset-block-start: 0; z-index: 1; }
#shops [data-shop-layout]:not([data-shop-layout="directory"]) .shop-directory-card [data-column="name"] { width: 44%; }
#shops [data-shop-layout="product"] #shopWorkspace .workspace-table[data-table-kind="products"] [data-column]:not(:is([data-column="name"],[data-column="quantity"],[data-column="sellingPrice"],[data-column="units"],[data-column="revenue"])) { display: none; }
#shops [data-shop-layout="product"] #shopWorkspace .workspace-table[data-table-kind="products"] [data-column="name"] { width: 35%; }
#shops [data-shop-layout]:not([data-shop-layout="directory"]) .shop-directory-card [data-column="sync"] { width: 26%; }

@container shop-list (width < 840px) {
  #shops [data-shop-layout="directory"] .shop-directory-card [data-column="updates"] { display: none; }
}
@container shop-list (width < 650px) {
  #shops [data-shop-layout="directory"] .shop-directory-card [data-column]:is([data-column="location"],[data-column="sales"],[data-column="revenue"]) { display: none; }
  #shops [data-shop-layout="directory"] .shop-directory-card .shop-row-place { display: block; }
}
@container shop-list (width < 480px) {
  #shops .directory-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
  #shops .directory-toolbar > label:has(#directorySync) { grid-column: 1; grid-row: 3; }
  #shops .directory-toolbar > label:has(#directoryHealth) { grid-column: 2; grid-row: 3; }
  #shops .directory-toolbar #clearShopFilters { grid-column: 3; grid-row: 3; }
  #shops .shop-directory-counts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #shops .shop-directory-counts > span { padding-inline: 5px; }
}
@container shop-list (width < 410px) {
  #shops .shop-directory-card [data-column="number"] { width: 2rem; padding-inline: 4px; }
  #shops .shop-directory-card td[data-column="name"] { min-width: 0; }
  #shops [data-shop-layout="directory"] .shop-directory-card [data-column="products"] { display: none; }
  #shops .table-wrap [data-column="sync"] .sync-absolute { display: none; }
}
@container shop-detail (width < 795px) {
  #shops .workspace-table[data-table-kind="products"] :is([data-column="change"],[data-column="margin"],[data-column="profit"]) { display: none; }
}
@container shop-detail (width < 590px) {
  #shops .workspace-table[data-table-kind="products"] :is([data-column="category"],[data-column="buyingPrice"]) { display: none; }
  #shops .workspace-table:not([data-table-kind="products"]) :is([data-column="price"],[data-column="profit"],[data-column="total"]) { display: none; }
}
@container shop-detail (width < 425px) {
  #shops .kpis-shop-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #shops .workspace-table[data-table-kind="products"] [data-column="revenue"] { display: none; }
  #shops .workspace-table:not([data-table-kind="products"]) [data-column="date"] { min-width: 0; }
}
@container shop-detail (width < 360px) {
  #shops .kpis-product { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #shops .product-movement .product-price-strip { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-flow: row; gap: 5px; }
}
@container shop-detail (width < 345px) {
  #shops .product-price-strip.workspace-card > div { padding-inline: 4px; }
  #shops .workspace-table[data-table-kind="products"] td[data-column="name"] { min-width: 0; }
}
@media (max-width: 1260px) {
  #shops [data-shop-layout="product"] { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); }
  #shops [data-shop-layout="product"] .shop-directory-card { grid-column: 1 / -1; }
  #shops [data-shop-layout="product"] .shop-directory-card .table-wrap { max-block-size: 230px; }
  #shops [data-shop-layout="product"] .shops-status-guide { display: none; }
}
@media (max-width: 800px) {
  #shops:has([data-shop-layout]) [data-shop-layout] { grid-template-columns: minmax(0, 1fr); }
  #shops [data-shop-layout="shop"] #shopWorkspace { grid-row: 1; }
  #shops [data-shop-layout="product"] #productWorkspace { grid-row: 1; }
  #shops [data-shop-layout="product"] #shopWorkspace { grid-row: 2; }
  #shops [data-shop-layout]:not([data-shop-layout="directory"]) .shop-directory-card .table-wrap { max-block-size: 250px; }
}

body:has(#shops:not([hidden])) #marketFilterBar { position: static; margin-bottom: 8px; }
@media (min-width: 761px) {
  .stok-admin-dashboard:has(#shops:not([hidden])) .dashboard-view { grid-template-rows: 50px minmax(0,1fr); }
  body:has(#shops:not([hidden])) .shops-topbar {
    display: flex; grid-column: 1 / -1; grid-row: 1; justify-content: space-between; align-items: center;
    padding: 0 15px; gap: 12px; border-bottom: 1px solid var(--shop-border); background: var(--shop-panel); color: var(--shop-text);
  }
  body:has(#shops:not([hidden])) .admin-sidebar { grid-row: 2; min-height: calc(100vh - 50px); }
  body:has(#shops:not([hidden])) .admin-main { grid-row: 2; grid-column: 2; padding: 16px 12px 22px; }
  body:has(#shops:not([hidden])) :is(.home-header,.status-row) { display: none; }
  body:has(#shops:not([hidden])):not(.shops-show-market-filters) #marketFilterBar { display: none; }
  .shops-brand, .shops-top-actions, .shops-period { display: flex; align-items: center; gap: 9px; }
  .shops-brand { font-size: 1rem; }
  .shops-brand-icon { width: 30px; height: 30px; border-radius: 7px; background: var(--shop-action); color: white; display: grid; place-items: center; }
  .shops-topbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .shops-period { gap: 5px; border: 1px solid var(--shop-border); border-radius: 7px; padding-inline: 8px 2px; background: var(--shop-raised); }
  .shops-period select { border: 0; min-height: 32px; padding-inline-start: 4px; background: transparent; }
  .shops-icon-action { display: grid; place-items: center; position: relative; }
  .shops-icon-action[data-has-alerts]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; position: absolute; right: 6px; top: 5px; background: var(--shop-accent); }
  .shops-account-menu { position: relative; z-index: 40; }
  .shops-account-menu summary { padding: 6px 8px; border: 1px solid var(--shop-border); border-radius: 7px; background: var(--shop-raised); list-style: none; cursor: pointer; }
  .shops-account-menu > div { position: absolute; min-width: 9rem; right: 0; top: calc(100% + 5px); display: grid; gap: 3px; padding: 5px; border: 1px solid var(--shop-border); border-radius: 8px; background: var(--shop-panel); }
  .shops-account-menu button { background: transparent; color: var(--shop-text); text-align: left; padding: 6px; border-radius: 4px; }
  .shops-account-menu button:hover { background: var(--shop-selected); }
}
@supports (appearance: base-select) and selector(::picker(select)) {
  @media (forced-colors: none) {
    :is(#shops,.shops-topbar) select:not([multiple]) { appearance: base-select; align-items: center; gap: .4rem; text-overflow: ellipsis; }
    :is(#shops,.shops-topbar) select:not([multiple])::picker(select) {
      appearance: base-select;
      inline-size: max-content;
      min-inline-size: anchor-size(width);
      max-inline-size: min(26rem, calc(100dvw - 1rem));
      max-block-size: min(22rem, 55dvh);
      position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
      margin-block: .2rem;
      padding: 4px;
      border: 1px solid var(--shop-border);
      border-radius: 8px;
      background: var(--shop-panel);
      color: var(--shop-text);
      box-shadow: 0 8px 24px rgb(0 0 0 / 28%);
    }
    :is(#shops,.shops-topbar) option { min-block-size: 2rem; padding: 5px 8px; border-radius: 5px; white-space: normal; overflow-wrap: anywhere; }
    :is(#shops,.shops-topbar) option:enabled:is(:hover,:focus-visible) { background: var(--shop-selected); outline: 1px solid var(--shop-accent); outline-offset: -1px; }
  }
}
@media (prefers-reduced-motion: reduce) { #shops .market-table tbody tr { transition: none; } }
