:root {
  --ink: #18202a;
  --muted: #667085;
  --line: #e1e6ec;
  --canvas: #f4f6f8;
  --blue: #2563eb;
  --blue-soft: #edf4fd;
  --teal: #31827e;
  --green: #329870;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 92px;
  padding: 16px 28px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}
.topbar h1 { margin: 0; font-size: 24px; line-height: 1.45; font-weight: 700; letter-spacing: 0; }
.topbar-subtitle { color: #717985; font-size: 12px; }
.date-tools { display: flex; align-items: center; gap: 12px; }
.date-chip {
  width: 150px; height: 35.5px; min-height: 34px; padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between;
  color: #20262f; background: #fff; border: 1px solid #dde2e7; border-radius: 6px;
  box-shadow: 0 1px 3px rgba(24, 37, 52, .04);
  font-size: 13.3333px; line-height: normal;
}
.date-chip strong { font-size: inherit; }
.date-chip span { color: #27313b; font-size: 12px; }
.topbar-note { min-width: 364px; color: #515b67; font-size: 12px; white-space: nowrap; }
.topbar-note strong { font-weight: 600; }

.content { width: 100%; max-width: none; margin: 0; padding: 20px 28px 36px; }
.summary-grid { height: 122px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.summary-card {
  min-width: 0; padding: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.summary-label { display: block; margin-bottom: 8px; color: #667085; font-size: 13px; }
.summary-card strong { display: block; font-size: 26px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.summary-meta { display: block; margin-top: 6px; color: #667085; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, .55fr); gap: 14px; align-items: stretch; }
.style-detail-panel { margin-top: 14px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.style-detail-titlebar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.style-detail-titlebar h2 { margin: 0; font-size: 16px; }
.style-detail-titlebar > span { color: var(--muted); font-size: 12px; }
.style-detail-empty { min-height: 120px; display: grid; place-items: center; color: #98a2b3; }
.style-detail-hero { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 14px; }
.detail-product-image { width: 96px; height: 128px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #f3f5f7; }
.detail-product-image[src] { cursor: zoom-in; }
.detail-image-empty { display: grid; place-items: center; color: #98a2b3; font-size: 12px; }
.style-detail-heading h3 { margin: 0 0 6px; font-size: 18px; }
.style-detail-heading h3.detail-product-code { color: #1f2937; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 24px; font-weight: 800; letter-spacing: .01em; }
.detail-product-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-product-code-row h3.detail-product-code { margin: 0; line-height: 28px; }
.detail-gallery-button { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 4px 10px; color: #0f766e; background: #eef8f6; border: 1px solid #b9e5dd; border-radius: 6px; font-size: 12px; font-weight: 700; text-decoration: none; }
.detail-gallery-button:hover { color: #075e57; background: #dff5f0; }
.detail-gallery-empty { color: #98a2b3; font-size: 12px; }
.style-detail-heading p { margin: 0 0 10px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-tags span { padding: 4px 8px; color: #445064; background: #f4f6f8; border-radius: 999px; font-size: 12px; }
.detail-metrics { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 10px; margin-bottom: 14px; }
.detail-metrics > div { padding: 10px 12px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 8px; }
.detail-metrics span { display: block; color: var(--muted); font-size: 12px; }
.detail-metrics strong { display: block; margin-top: 4px; color: var(--ink); font-size: 18px; }
.detail-metric-meta { display: inline; margin-left: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.style-detail-grid { display: grid; grid-template-columns: minmax(360px, 1.3fr) minmax(220px, .8fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.style-detail-top-grid { grid-template-columns: 1fr; }
.detail-lower-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.detail-box { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.detail-box h3 { margin: 0 0 10px; font-size: 14px; }
.detail-info-grid { display: grid; grid-template-columns: repeat(5, 72px minmax(90px, 1fr)); gap: 8px 12px; margin: 0; font-size: 12px; }
.detail-info-grid dt { color: var(--muted); text-align: left; }
.detail-info-grid dd { min-width: 0; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.detail-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.detail-table th, .detail-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.detail-table th { color: #445064; background: #f8fafc; font-weight: 700; }
.detail-table tr:last-child td { border-bottom: 0; }
.detail-empty-cell { padding: 20px !important; color: #98a2b3; }
.size-distribution { display: flex; flex-direction: column; gap: 0; max-height: 560px; overflow: auto; padding-right: 4px; }
.size-inventory-row { width: 100%; display: grid; grid-template-columns: 70px minmax(0, 1fr); grid-template-areas: "meta content" "sku sku"; column-gap: 8px; row-gap: 4px; align-items: start; margin: 0; padding: 10px 0; border-bottom: 1px solid #edf0f3; }
.size-inventory-row:last-child { border-bottom: 0; }
.size-inventory-meta { grid-area: meta; min-width: 0; }
.size-inventory-label { color: var(--ink); font-size: 13px; font-weight: 800; text-align: left; }
.size-inventory-content { grid-area: content; min-width: 0; }
.size-bar-metric { display: grid; grid-template-columns: 34px 44px minmax(0, 1fr); gap: 5px; align-items: center; min-height: 18px; }
.size-bar-name { color: var(--muted); font-size: 12px; white-space: nowrap; }
.size-bar-value { color: var(--ink); font-size: 12px; line-height: 1.1; text-align: right; white-space: nowrap; }
.size-bar-track { height: 10px; overflow: hidden; background: #edf1f5; border-radius: 999px; }
.size-bar-fill { display: block; height: 100%; min-width: 0; background: var(--teal); border-radius: inherit; }
.size-sku-list { grid-area: sku; min-width: 0; display: grid; gap: 2px; }
.size-sku-item { display: flex; align-items: center; justify-content: flex-start; gap: 16px; color: #667085; font-size: 11px; line-height: 1.3; white-space: nowrap; }
.size-sku-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.size-sku-item em { color: #98a2b3; font-style: normal; }
.detail-source-box { margin-top: 14px; }
.detail-size-box { margin-top: 14px; }
.selected-style-row { background: #eef8f6 !important; }
.results-panel, .insight-card {
  min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.results-panel { height: min(700px, calc(100vh - 118px)); padding: 16px; display: flex; flex-direction: column; overflow: hidden; }
.results-toolbar {
  margin: 0 0 12px; padding: 0;
  display: block;
}
.toolbar-title-row { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-bottom: 12px; }
.results-toolbar h2 { margin: 0; font-size: 16px; font-weight: 700; white-space: nowrap; }
.download-btn { height: 36px; padding: 0 16px; color: #fff; background: var(--teal); border: 0; border-radius: 8px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.download-btn:hover { background: #276f6b; }
.download-btn:disabled { cursor: wait; opacity: .65; }
.toolbar-controls { width: 100%; min-width: 0; display: flex; align-items: flex-end; gap: 8px; flex-wrap: nowrap; }
.toolbar-input, .toolbar-select, .more-btn {
  height: 36px; min-height: 36px; min-width: 0; padding: 7px 12px;
  color: #303945; background: #fff; border: 1px solid #d7e0ea; border-radius: 8px; outline: none;
}
.toolbar-input { width: 160px; min-width: 140px; flex: 0 1 160px; }
.toolbar-input { resize: none; overflow-y: auto; line-height: 20px; }
.toolbar-input::placeholder { color: #929aa4; }
.toolbar-select { width: 150px; }
.toolbar-filter-field { width: 108px; flex: 0 1 108px; }
.multi-select { position: relative; min-width: 0; }
.toolbar-multi-select { width: 120px; flex: 0 1 120px; }
.multi-select-trigger {
  width: 100%; height: 36px; min-height: 36px; padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: #303945; background: #fff; border: 1px solid #d7e0ea; border-radius: 8px; outline: none; text-align: left; white-space: nowrap; font-size: 14px;
}
.multi-select-trigger:hover, .multi-select-trigger[aria-expanded="true"] { border-color: #8aa8dc; box-shadow: 0 0 0 2px #edf3fd; }
.multi-select-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.multi-select-arrow { flex: 0 0 auto; color: #667085; font-size: 11px; transition: transform .15s ease; }
.multi-select-trigger[aria-expanded="true"] .multi-select-arrow { transform: rotate(180deg); }
.multi-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: max(220px, 100%); max-height: 320px; padding: 8px;
  overflow: auto; background: #fff; border: 1px solid #d6e0eb; border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}
.multi-select-menu[hidden] { display: none; }
.multi-select-menu-title { margin-bottom: 6px; padding: 7px 10px; color: #445064; background: #f7f9fc; border: 1px solid #cbd7e6; border-radius: 8px; font-size: 13px; font-weight: 700; text-align: center; }
.multi-select-options { display: grid; gap: 2px; }
.multi-select-option { min-height: 36px; padding: 7px 10px; display: flex; align-items: center; gap: 10px; color: #27313b; border-radius: 7px; cursor: pointer; font-size: 13px; }
.multi-select-option:hover { background: #f0f6fa; }
.multi-select-option input { flex: 0 0 auto; width: 16px !important; height: 16px !important; min-width: 16px !important; margin: 0; padding: 0 !important; accent-color: var(--teal); }
.multi-select-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-select-empty { padding: 14px 10px; color: #98a2b3; font-size: 12px; text-align: center; }
.toolbar-date-range { height: 36px; min-height: 36px; display: flex; align-items: center; gap: 6px; color: #596570; font-size: 14px; white-space: nowrap; }
.toolbar-date-range input { width: 120px; min-width: 120px; flex: 0 0 120px; height: 36px; padding: 7px 8px; color: #303945; background: #fff; border: 1px solid #d7e0ea; border-radius: 8px; outline: none; font-size: 14px; }
.toolbar-date-range input:focus { border-color: #8aa8dc; box-shadow: 0 0 0 2px #edf3fd; }
.toolbar-date-range i { color: #929aa4; font-style: normal; }
.toolbar-input:focus, .toolbar-select:focus { border-color: #8aa8dc; box-shadow: 0 0 0 2px #edf3fd; }
.more-btn { width: 92px; color: #596570; font-size: 12px; }
.primary-btn {
  min-height: 36px; padding: 8px 16px; color: #fff; background: var(--teal);
  border: 0; border-radius: 5px; font-size: 12px; font-weight: 650; white-space: nowrap;
}
.primary-btn:hover { background: #276f6b; }
.sort-head { display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.sort-btn { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; padding: 0; color: #667085; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 10px; font-weight: 800; line-height: 16px; cursor: pointer; }
.sort-btn.active { color: #0f766e; background: #ecfdf5; border-color: #0f766e; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.toolbar-filter-field { gap: 0; }
.field > span { color: #74808b; font-size: 10px; }
.field select, .field input { width: 100%; height: 32px; min-width: 0; padding: 0 8px; color: #39434e; background: #fff; border: 1px solid #dce1e6; border-radius: 4px; outline: 0; }
.field .multi-select-trigger { min-height: 36px; height: 36px; padding: 7px 12px; border-color: #d7e0ea; border-radius: 8px; font-size: 14px; }
.range-inputs { display: flex; align-items: center; gap: 4px; }
.range-inputs i { color: #9aa3ac; font-style: normal; }
.reset-btn { height: 36px; padding: 0 10px; color: #65717d; background: #fff; border: 1px solid #d7e0ea; border-radius: 8px; white-space: nowrap; font-size: 13px; }

.table-wrap { width: 100%; min-height: 0; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--line); border-radius: 6px; }
.table-wrap table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.table-wrap th {
  height: 33px; padding: 7px 8px; color: #445064; background: #f8fafc;
  border-bottom: 1px solid var(--line); text-align: center; font-size: 12px; font-weight: 700; white-space: normal; overflow-wrap: anywhere;
}
.table-wrap thead { position: sticky; top: 0; z-index: 2; }
.table-wrap th:nth-child(1), .table-wrap td:nth-child(1) { width: 3.5%; }
.table-wrap th:nth-child(2), .table-wrap td:nth-child(2) { width: 5%; }
.table-wrap th:nth-child(3), .table-wrap td:nth-child(3) { width: 11%; }
.table-wrap th:nth-child(4), .table-wrap td:nth-child(4) { width: 5.5%; }
.table-wrap th:nth-child(5), .table-wrap td:nth-child(5) { width: 3.5%; }
.table-wrap th:nth-child(6), .table-wrap td:nth-child(6) { width: 4.5%; }
.table-wrap th:nth-child(7), .table-wrap td:nth-child(7) { width: 9.5%; }
.table-wrap th:nth-child(8), .table-wrap td:nth-child(8) { width: 6%; }
.table-wrap th:nth-child(9), .table-wrap td:nth-child(9) { width: 6%; }
.table-wrap th:nth-child(10), .table-wrap td:nth-child(10) { width: 6.5%; }
.table-wrap th:nth-child(11), .table-wrap td:nth-child(11) { width: 8.5%; }
.table-wrap th:nth-child(12), .table-wrap td:nth-child(12) { width: 8%; }
.table-wrap th:nth-child(13), .table-wrap td:nth-child(13) { width: 8%; }
.table-wrap th:nth-child(14), .table-wrap td:nth-child(14) { width: 7.5%; }
.table-wrap th:nth-child(15), .table-wrap td:nth-child(15) { width: 8%; }
.table-wrap th, .table-wrap td { text-align: center !important; }
.table-wrap td { min-height: 73px; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 12px; overflow-wrap: anywhere; }
.table-wrap tbody tr:hover { background: #eef6ff; }
.row-index { height: 73px; padding-top: 5px !important; padding-bottom: 5px !important; }
.row-index .row-number { display: block; margin-bottom: 5px; line-height: 16px; }
.row-gallery-control { width: 24px; height: 24px; margin: 0 auto; display: grid; place-items: center; color: #0f766e; background: #eef8f6; border: 1px solid #b9e5dd; border-radius: 5px; text-decoration: none; cursor: pointer; }
.row-gallery-control:hover { color: #075e57; background: #dff5f0; }
.row-gallery-control svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row-gallery-control.disabled { color: #a7b0ba; background: #f4f6f8; border-color: #e1e5e9; cursor: not-allowed; }
.product-image { width: 44px; height: 58px; margin: auto; position: relative; display: grid; place-items: center; overflow: hidden; color: #9aa4ae; background: #f1f3f5; border: 1px solid #e0e5e9; border-radius: 5px; font-size: 9px; }
.product-image img { position: absolute; inset: 0; width: 100%; height: 100%; background: #fff; object-fit: contain; }
.product-image img { cursor: zoom-in; }
.image-preview { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, .72); }
.image-preview.open { display: flex; }
.image-preview img { max-width: min(92vw, 900px); max-height: 88vh; object-fit: contain; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.image-preview-close { position: absolute; top: 18px; right: 22px; width: 36px; height: 36px; padding: 0; color: #fff; background: rgba(15, 23, 42, .58); border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; font-size: 26px; line-height: 30px; }
.style-cell { min-width: 0; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden; text-align: center; }
.style-cell strong { display: block; max-width: 100%; color: #2c3742; font-size: 11px; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.style-cell span { display: block; max-width: 100%; color: #667085; font-size: 12px; line-height: 1.1; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.style-cell .style-category { color: #667085; font-size: 12px; line-height: 1.1; }
.product-code { display: block; color: #2b4e7c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 700; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.money { color: #27323d; font-weight: 650; white-space: nowrap; }
.controlled-price { color: #2e588d; }
.inventory-cell { font-weight: 650; }
.inventory-cell.positive { color: var(--green); }
.date-text { color: #596675; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; white-space: nowrap; }
.grade-badge { display: inline-grid; min-width: 23px; height: 23px; padding: 0 5px; place-items: center; color: #3d62a8; background: var(--blue-soft); border-radius: 4px; font-size: 10px; font-weight: 650; }
.sample-status { padding: 0; color: var(--muted); background: transparent; border: 0; font: inherit; font-weight: 600; }
.sample-status.has-samples { color: #0f766e; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.sample-status.has-samples:hover { color: #075e57; }
.sample-orders-dialog { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, .48); }
.sample-orders-card { width: min(980px, 94vw); max-height: min(680px, 88vh); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px rgba(15, 23, 42, .25); }
.sample-orders-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.sample-orders-head h3 { margin: 0; color: #18202a; font-size: 17px; }
.sample-orders-close { width: 30px; height: 30px; padding: 0; color: #596675; background: #fff; border: 1px solid #d7e0ea; border-radius: 50%; font-size: 22px; line-height: 26px; cursor: pointer; }
.sample-orders-body { padding: 14px 18px 18px; }
.sample-orders-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.sample-orders-table th, .sample-orders-table td { padding: 9px 7px; border-bottom: 1px solid var(--line); text-align: center; word-break: break-all; }
.sample-orders-table th { color: #445064; background: #f8fafc; font-weight: 700; }
.sample-orders-table td { color: #303945; }
.year-season { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.year-season strong { font-size: 12px; }
.year-season span { color: #727d89; font-size: 11px; }
.brand-text { display: block; color: #45515e; font-size: 12px; overflow-wrap: anywhere; white-space: normal; }
.remark-text { display: block; color: #45515e; white-space: normal; overflow-wrap: anywhere; }
.empty-state { height: 300px !important; padding: 60px !important; color: #9da6af; text-align: center !important; }
.empty-state p { margin: 8px 0 0; }
.loader { width: 20px; height: 20px; margin: auto; border: 2px solid #dfe6ed; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pagination { min-height: 0; margin: 10px 0 0; flex: 0 0 auto; padding: 0; display: flex; align-items: center; justify-content: flex-end; gap: 20px; color: #445064; background: #fff; font-size: 12px; flex-wrap: wrap; text-align: right; }
.pagination-left, .page-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.pagination-left { margin-left: auto; }
.pagination-left label { display: inline-flex; align-items: center; gap: 6px; color: #445064; font-size: 12px; font-weight: 700; }
.pagination-left select { min-height: 30px; padding: 4px 8px; color: #18202a; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; }
.pagination-status, .page-buttons { color: #445064; font-size: 12px; font-weight: 700; }
.page-btn { min-height: 30px; padding: 4px 10px; color: #18202a; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; font-weight: 700; }
.page-btn:disabled { cursor: not-allowed; opacity: .42; }

.insights-column { min-width: 0; }
.insight-card { padding: 14px 12px; }
.distribution-panel { height: min(700px, calc(100vh - 118px)); display: flex; flex-direction: column; overflow: auto; }
.insight-card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.secondary-title { margin-top: 20px !important; padding-top: 17px; border-top: 1px solid #edf0f2; }
.bar-list { padding-right: 4px; display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 104px minmax(58px, 1fr) 54px; gap: 6px; align-items: center; font-size: 12px; }
.bar-label { overflow: hidden; color: #3f4a55; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 11px; overflow: hidden; background: #e7edf3; border-radius: 999px; }
.bar-fill { display: block; height: 100%; min-width: 2px; background: var(--blue); border-radius: inherit; }
.bar-value { color: #37424d; font-size: 12px; text-align: right; }
.bar-empty { color: #929ca6; font-size: 11px; }

@media (max-width: 1280px) {
  .summary-grid { height: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-card { min-height: 110px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .toolbar-input { width: 190px; }
  .toolbar-select, .toolbar-multi-select { width: 135px; }
  .toolbar-filter-field { width: 120px; flex-basis: 120px; }
  .detail-info-grid { grid-template-columns: repeat(4, 76px minmax(90px, 1fr)); gap: 8px 14px; }
}
@media (max-width: 920px) {
  .topbar-note { display: none; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .toolbar-title-row { align-items: center; }
  .toolbar-controls { flex-wrap: wrap; width: 100%; }
  .toolbar-input, .toolbar-select, .toolbar-multi-select { flex: 1 1 180px; width: auto; }
  .toolbar-date-range { flex: 1 1 360px; }
  .style-detail-top-grid, .detail-lower-grid { grid-template-columns: 1fr; }
  .detail-info-grid { grid-template-columns: repeat(2, 82px minmax(0, 1fr)); gap: 8px 14px; }
  .detail-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .app-header { height: 78px; padding: 14px; }
  .topbar h1 { font-size: 20px; }
  .date-chip { display: none; }
  .content { padding: 14px 12px 28px; }
  .summary-grid { gap: 8px; margin-bottom: 12px; }
  .summary-card { min-height: 92px; padding: 12px; }
  .summary-card strong { font-size: 21px; }
  .dashboard-grid { gap: 12px; }
  .results-toolbar { padding: 12px; gap: 8px; }
  .toolbar-controls { gap: 8px; }
  .toolbar-input { flex-basis: 100%; }
  .toolbar-select, .toolbar-multi-select { flex-basis: calc(50% - 4px); }
  .toolbar-date-range { flex: 1 1 100%; flex-wrap: wrap; }
  .toolbar-date-range > span { width: 100%; }
  .toolbar-date-range input { flex: 1 1 120px; width: auto; }
  .toolbar-filter-field { flex: 1 1 180px; width: auto; }
  .pagination { min-height: 0; padding: 10px 12px; align-items: flex-start; flex-direction: column; }
  .style-detail-panel { padding: 12px; }
  .style-detail-titlebar { align-items: flex-start; flex-direction: column; gap: 4px; }
  .style-detail-hero { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .detail-product-image { width: 72px; height: 96px; }
  .style-detail-heading h3 { font-size: 16px; }
  .style-detail-heading h3.detail-product-code { font-size: 20px; }
  .detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-detail-top-grid, .detail-lower-grid { grid-template-columns: 1fr; }
  .detail-info-grid { grid-template-columns: 82px minmax(0, 1fr); }
  .detail-info-grid dt { text-align: right; }
  .size-inventory-row { grid-template-columns: 58px minmax(0, 1fr); column-gap: 7px; }
  .size-bar-metric { grid-template-columns: 34px 44px minmax(0, 1fr); gap: 4px; }
  .size-sku-item { gap: 8px; font-size: 10px; }
}
