
.sap-report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#sap-items-report .customer-header {
  padding-right: 0;
}

#sap-items-report .customer-header > .utility-actions.customer-actions,
#sap-items-report .customer-header > .utility-actions:has(> .exit-button) {
  position: static;
  width: auto;
  min-width: 0;
  height: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  overflow: visible;
}

#sap-items-report .customer-header .exit-button {
  position: relative;
  top: auto;
  right: auto;
}

#sap-items-report .customer-header > .utility-actions.customer-actions .sap-report-toolbar {
  flex-wrap: nowrap;
}

.sap-report-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sap-report-qty-filter {
  min-height: 34px;
  border: 1px solid #b9d8e1;
  border-radius: 6px;
  background: #ffffff;
  color: #103f52;
  font-weight: 700;
  padding: 6px 10px;
}

.sap-report-tabs .tab-button {
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid #b9d8e1;
  border-radius: 6px;
  background: #ffffff;
  color: #103f52;
  font-weight: 700;
}

.sap-report-tabs .tab-button.active {
  background: #dff4f7;
  border-color: #78b6c6;
}

.sap-items-report-grid-wrap {
  max-height: 680px;
}

.sap-report-matrix-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 14px;
  align-items: start;
}

.sap-report-matrix-area[hidden] {
  display: none;
}

#sapItemsReportTable {
  table-layout: auto;
  min-width: 860px;
}

#sapItemsReportTable th,
#sapItemsReportTable td {
  padding: 2px 5px;
  font-size: 11px;
  line-height: 1.05;
  height: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sapItemsReportTable .sap-items-col-desc {
  min-width: 300px;
}

#sapItemsReportTable .sap-items-col-qty,
#sapItemsReportTable .sap-items-col-total {
  width: 82px;
  text-align: right;
}

.sap-items-report-filter-panel {
  width: min(560px, 96vw);
}

.sap-items-report-filter-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.sap-items-report-filter-grid input,
.sap-items-report-filter-grid select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #c6d7df;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
}

.sap-items-report-filter-grid .ts-wrapper {
  width: 100%;
}

.sap-items-report-filter-grid .ts-control {
  min-height: 34px;
  border-color: #c6d7df;
  border-radius: 6px;
  font-size: 13px;
}


#sap-items-report-host { display: contents; }
#sap-items-report.sap-items-report-active-fallback { display: block; }
body:has(#sap-items-report.sap-items-report-active-fallback) .dashboard { display: none; }
