/* Local extension of the existing Operate table; no new visual identity. */
body.erp-operate-ui #workOrdersView .blacklake-filterbar {
  display: grid;
  grid-template-columns: 140px minmax(180px, 1fr) repeat(3, minmax(120px, 150px)) auto;
  gap: 10px;
  align-items: end;
}
body.erp-operate-ui #workOrdersView .blacklake-filterbar label { min-width: 0; }
.workorder-history-navigation, .workorder-page-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
.workorder-history-navigation {
  padding: 12px 0; color: var(--erp-text-secondary); font-variant-numeric: tabular-nums;
}
.workorder-page-actions { margin-left: auto; }
.workorder-history-navigation button { min-height: 38px; }
#workOrderHistoryDetail { margin-top: 12px; scroll-margin-top: 80px; }
#workOrderHistoryDetailContent { min-width: 0; }
#workOrderHistoryDetailContent .table-wrap { overflow-x: auto; }
.workorder-source { color: var(--erp-text-secondary); font-size: var(--erp-text-sm); }
@layer system {
  body.erp-operate-ui #workOrderHistoryDetail,
  body.erp-operate-ui #workOrderHistoryDetail .detail-panel {
    background: var(--erp-surface) !important;
    color: var(--erp-text) !important;
    border: 1px solid var(--erp-line) !important;
    box-shadow: none !important;
  }
  body.erp-operate-ui #workOrderHistoryDetail h3 { color: var(--erp-text) !important; }
  body.erp-operate-ui #workOrderHistoryDetail .detail-panel-header span { color: var(--erp-text-secondary) !important; }
  body.erp-operate-ui #workOrderHistoryDetail .blacklake-history-table { min-width: 800px; table-layout: auto; }
  body.erp-operate-ui #workOrdersView .blacklake-workorder-table-wrap { max-height: 65dvh; overflow: auto; }
}
@layer responsive {
  @media (max-width: 480px) {
    body.erp-operate-ui #workOrdersView#workOrdersView .blacklake-filterbar { grid-template-columns: minmax(0, 1fr) !important; }
  }
}
@media (max-width: 900px) {
  body.erp-operate-ui #workOrdersView .blacklake-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workorder-page-actions { margin-left: 0; }
}
