/* Shared catalog-table styling; product economics keeps its Desktop - 8 layout. */
:is(#view-products, #view-needs) {
  --catalog-line: #606164;
  --catalog-header: #2f3034;
  --catalog-paper: rgba(61, 63, 70, .45);
}
html[data-theme="light"] :is(#view-products, #view-needs) {
  --catalog-line: #c9d4ec;
  --catalog-header: #e9effb;
  --catalog-paper: var(--paper);
}
body.workspace-view:has(#view-products:not([hidden])) .page-heading { margin-bottom: 19px; }
#view-products > .panel,
#view-needs .needs-report {
  background: var(--catalog-paper);
  border-color: var(--catalog-line);
}
#view-products .economics-settings {
  min-height: 123px;
  padding: 20px;
  margin-bottom: 20px;
}
#view-products .economics-settings .eyebrow {
  margin-bottom: 5px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 16px;
}
#view-products .economics-settings h2 { margin-bottom: 0; line-height: 1.2; }
#view-products .economics-settings .small {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}
#products-tax-note::before {
  content: '';
  flex: 0 0 18px;
  height: 18px;
  background: url('/static/assets/figma/white-dot.svg') center / contain no-repeat;
}
html[data-theme="light"] #products-tax-note::before { background-image: url('/static/assets/figma/blue-dot.svg'); }
#view-products .economics-settings .button { min-height: 34px; padding: 7px 10px; white-space: nowrap; }
#view-products > .panel:not(.economics-settings),
#view-needs .needs-report { overflow: hidden; }
:is(#view-products, #view-needs) .table-heading { padding: 20px; border-color: var(--catalog-line); }
:is(#view-products, #view-needs) .table-heading .small { margin-top: 4px; font-size: 13px; line-height: 18px; font-weight: 400; }
#view-products .catalog-column-hint { display: block; }
:is(#view-products, #view-needs) .table-filters {
  display: grid;
  grid-template-columns: 209px minmax(130px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
:is(#view-products, #view-needs) .table-filters .search-field { min-width: 0; max-width: none; }
:is(#view-products, #view-needs) .search-field input { min-height: 34px; height: 34px; padding-left: 39px; font-size: 11px; border-color: var(--muted); }
:is(#view-products, #view-needs) .checkbox-label { margin-left: 30px; gap: 6px; white-space: nowrap; }
:is(#view-products, #view-needs) .checkbox-label input { width: 10px; height: 10px; margin: 0; }
#view-products .products-import-actions { flex-wrap: nowrap; gap: 10px; }
#view-products .products-import-actions .button { padding: 9px 11px; font-size: 11px; white-space: nowrap; }
#view-products .products-import-actions .button.secondary { border-color: var(--catalog-line); }
:is(#view-products, #view-needs) .count-pill { display: inline-flex; align-items: center; width: auto; min-height: 37px; margin: 0; padding: 9px 12px; border-radius: 8px; background: var(--accent-soft); }
:is(#view-products .resizable-table, #view-needs .needs-scroll table) thead { background: var(--catalog-header); }
:is(#view-products .resizable-table, #view-needs .needs-scroll table) th,
#view-products .resizable-table .catalog-column-groups th {
  height: 36px;
  padding: 8px 20px;
  border: .5px solid var(--catalog-line);
  background: var(--catalog-header);
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}
#view-products .resizable-table .catalog-column-headers th,
#view-needs .needs-scroll table th { padding-right: 22px; }
#view-products .resizable-table .catalog-column-headers .column-group-start { border-left: .5px solid var(--catalog-line); }
:is(#view-products .resizable-table, #view-needs .needs-scroll table) td {
  height: 50px;
  padding: 9px 20px;
  border: .5px solid var(--catalog-line);
  font-size: 11px;
  text-align: left;
  font-weight: 400;
}
:is(#view-products .resizable-table, #view-needs .needs-scroll table) :is(th, td):first-child { border-left: 0; }
:is(#view-products .resizable-table, #view-needs .needs-scroll table) :is(th, td):last-child { border-right: 0; }
:is(#view-products .resizable-table, #view-needs .needs-scroll table) tbody tr:last-child td { border-bottom: 0; }
:is(#view-products, #view-needs) .product-link { font-size: 11px; line-height: 1.4; }
:is(#view-products, #view-needs) .product-meta { margin-top: 0; line-height: 1.4; }
:is(#view-products .resizable-table, #view-needs .needs-scroll table) .text-button { font-size: 11px; }
:is(#view-products, #view-needs) .cost-edit-button { min-height: 28px; padding: 6px 11px; border: 0; border-radius: 8px; font-size: 11px; }
:is(#view-products, #view-needs) .cost-edit-button.cost-missing { box-shadow: inset 0 0 0 .5px var(--muted); }
#view-products .column-resize-handle::after { top: 0; bottom: 0; right: 0; opacity: 0; }
#view-products .column-resize-handle:is(:hover, :focus-visible)::after { opacity: 1; }
:is(#view-products, #view-needs) .pagination { min-height: 77px; padding: 20px; border-color: var(--catalog-line); }
:is(#view-products, #view-needs) .pagination > div { gap: 10px; }
:is(#view-products, #view-needs) .pagination .button { min-height: 37px; border-color: var(--catalog-line); }
:is(#view-products, #view-needs) .pagination .button:disabled { opacity: .75; }
#view-products .table-footer { padding: 18px 20px; border-color: var(--catalog-line); }
@media (max-width: 1320px) {
  :is(#view-products, #view-needs) .table-filters { grid-template-columns: minmax(180px, 1fr) auto; }
  #view-products .products-import-actions { grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-start; }
  :is(#view-products, #view-needs) .checkbox-label { margin-left: 0; }
}
@media (max-width: 640px) {
  #view-products .economics-settings { align-items: flex-start; }
  :is(#view-products, #view-needs) .table-filters { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #view-products .products-import-actions { gap: 8px; }
  #view-products .products-import-actions .button { white-space: normal; }
  :is(#view-products, #view-needs) .table-heading .small,
  #view-products .economics-settings .small { font-size: 12px; }
}
