#catalog-navigation[hidden] + #dispatch-catalog-extra { display: none; }
#dispatch-catalog-extra .catalog-link svg { flex: 0 0 auto; }

#production-report-workspace, .production-report-list, .production-report-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}
#production-report-workspace > button { justify-self: start; }
.workspace-v2 .production-report-filters .date-filter-group { padding: 0; }
.production-report-filters .action-label { display: inline-flex; margin: 0; max-width: 100%; }
.production-report-filters select { width: auto; max-width: 100%; }
/* 20/11/2026: one low strip, left-aligned under the filter and sized to its content; the table below keeps the full width. */
.production-report-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(8.5rem, max-content));
  justify-self: start;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 2px 0;
  border-radius: 8px;
  background: var(--ui-surface-muted);
}
.workspace-v2 .production-report-totals .metric-row {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: subgrid;
  grid-row: span 2;
  align-items: start;
  padding: 10px 22px 10px 20px;
  gap: 2px;
  border: 0;
}
.production-report-totals .metric-row + .metric-row::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 1px;
  background: var(--ui-neutral-border);
  pointer-events: none;
}
.production-report-totals dt { font-size: var(--ui-secondary); line-height: 1.3; }
.production-report-totals dd { text-align: left; font-size: clamp(16px, 2.6vw, 24px); }
.production-report-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.production-report-table :is(th,td) { padding: 9px 12px; border-bottom: 1px solid var(--ui-border); text-align: left; vertical-align: middle; }
.production-report-table th { font-weight: 600; color: var(--ui-muted); background: var(--ui-surface-muted); }
.production-report-list .production-report-table { min-width: 900px; }
.production-report-list .production-report-table :is(th,td):is(:nth-child(4),:nth-child(5),:nth-child(6),:nth-child(8),:nth-child(9)) {
  font-variant-numeric: tabular-nums;
}
.production-report-list .production-report-table :is(th,td):first-child { text-align: center; }
.production-report-list .production-report-table th:first-child { width: 5%; }
.production-report-list .production-report-table :is(th,td) { padding-inline: 10px; }
.production-report-list .production-report-table th:nth-child(2) { width: 11%; }
.production-report-list .production-report-table th:nth-child(3) { width: 22%; }
.production-report-list .production-report-table th:is(:nth-child(4),:nth-child(5)) { width: 9%; }
.production-report-list .production-report-table th:is(:nth-child(6),:nth-child(9)) { width: 11%; }
.production-report-list .production-report-table th:nth-child(7) { width: 14%; }
.production-report-list .production-report-table th:nth-child(8) { width: 8%; }
.production-report-list .production-report-table td:nth-child(3) { overflow-wrap: anywhere; }
.production-report-list .production-report-table td:nth-child(7) { min-width: 9rem; }
.production-report-list .production-report-table tbody tr { cursor: pointer; }
.production-report-list .production-report-table tbody tr:has(.production-report-open:focus-visible) {
  outline: 2px solid var(--ui-focus);
  outline-offset: -2px;
}
.production-report-open {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  padding: 0;
  min-height: 0;
  white-space: nowrap;
  cursor: pointer;
}
.production-report-reason { margin: 4px 0 0; overflow-wrap: anywhere; }
.production-report-detail { padding: 0; }
.production-report-detail-head { display: flex; align-items: center; gap: 12px; }
.production-report-detail-head h2 { margin: 0; }
.production-report-detail .production-report-table { min-width: 520px; }
/* 20/11/2026: chi tiết đơn — Thông tin đơn hàng, Kết quả đơn hàng, Danh sách chuyến xe trên cùng một nền. */
.production-report-detail { gap: 20px; }
.production-report-block { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.production-report-block + .production-report-block { padding-top: 16px; border-top: 1px solid var(--ui-border); }
.production-report-block > h3 { margin: 0; font-size: var(--ui-section-title, 1rem); }
.production-report-detail .production-report-table.production-report-trips { min-width: 760px; }
.production-report-trips :is(th,td):is(:nth-child(5),:nth-child(6)) { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .production-report-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .workspace-v2 .production-report-totals .metric-row { padding: 10px clamp(6px, 2vw, 12px); }
}
/* 20/11/2026: order detail — status and Nhà dân beside the code; facts in two label/value columns; four small result boxes. */
.production-report-detail-head .residential-badge { font-size: var(--ui-secondary); }
.production-report-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(16px, 4vw, 56px); margin: 0; }
.production-report-facts dl { display: grid; grid-template-columns: minmax(7.5rem, max-content) minmax(0, 1fr); align-content: start; margin: 0; }
.production-report-facts :is(dt, dd) { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--ui-border); }
.production-report-facts dt { padding-right: 24px; color: var(--ui-muted); }
.production-report-facts dd { font-weight: 600; overflow-wrap: anywhere; }
.production-report-facts .production-report-schedule-title { grid-column: 1 / -1; padding: 12px 0 2px; border: 0; color: var(--ui-muted); font-weight: 600; }
.production-report-results { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.production-report-results > div { display: grid; gap: 2px; min-width: 9rem; padding: 10px 18px 10px 16px; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-surface-muted); }
.production-report-results dt { color: var(--ui-muted); font-size: var(--ui-secondary); }
.production-report-results dd { margin: 0; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.production-report-results dd small { font-size: 14px; font-weight: 600; margin-left: 3px; }
.production-report-results .is-shortage { border-color: color-mix(in srgb, var(--ui-amber-ink) 22%, transparent); background: color-mix(in srgb, var(--ui-amber-surface) 45%, var(--ui-surface-muted)); }
.production-report-results .is-shortage dd { color: var(--ui-amber-ink); }
@media (max-width: 720px) {
  .production-report-facts { grid-template-columns: minmax(0, 1fr); }
  .production-report-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-report-results > div { min-width: 0; }
}
.production-report-detail-head { flex-wrap: wrap; row-gap: 6px; }
.production-report-detail-head h2 { white-space: nowrap; }
