/* cosfix r4 (2026-10-10): layout bugs only; colours and type follow the existing tokens. */
#anav-overview { position: static; }                         /* the pinned summary covered the section being read */
#anav-nav { top: 12px; }
.r4-danger-group { display: inline-flex; margin-left: auto; padding-left: 14px; border-left: 1px solid var(--border-color, #e5e7eb); }
button.r4-danger { color: var(--danger, #dc2626) !important; border-color: currentColor !important; }
.r4-empty { padding: 14px 16px; color: var(--text-muted, #6b7280); font-size: .9rem; }
/* rooms / wide report tables scroll inside their card instead of cutting the header off */
.rdg-card table, .rdg-body table, .result-card-body > table { display: block; max-width: 100%; overflow-x: auto; }
.rdg-card th, .rdg-body th { white-space: nowrap; }
/* Pipeline: filters on one wrapping row, actions never cut, location truncated not wrapped */
@media (min-width: 769px) {
  .pipeline-toolbar { flex-direction: row !important; flex-wrap: wrap !important; align-items: center; gap: 6px; }
  .pipeline-toolbar select, .pipeline-toolbar input[type="date"] { width: auto !important; flex: 0 0 auto; }
  .pipeline-toolbar .pipe-search { flex: 1 1 160px; min-width: 140px !important; width: auto !important; }
  .pipeline-toolbar select { max-width: 120px; }
  .pipeline-toolbar input[type="date"] { max-width: 128px; }
  .pipeline-toolbar button, .pipeline-toolbar .btn { white-space: nowrap; flex: 0 0 auto; }
}
.pipeline-table-wrap { overflow-x: auto; }
.pipeline-table td:last-child, .pipeline-table th:last-child { white-space: nowrap; }
.pipeline-table td.location, .pipeline-table td[data-col="location"] { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* r4c: location never wraps tall, even before r4-fixes tags the cell */
.pipeline-table td:nth-child(4) { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* cosfix r4k: the pipeline table scrolls inside its card instead of cutting Drive/Actions off */
.pipeline-table-wrap { display: block; max-width: 100%; overflow-x: auto !important; }
#pipeline-view, #pipeline-view > *, .pipeline-table-wrap { min-width: 0; }
.pipeline-table th, .pipeline-table td { padding-left: 6px !important; padding-right: 6px !important; }
.pipeline-table td:nth-child(2) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* cosfix r4k: Plan reading tables scroll inside the pane; the Rooms table's last column was cut off */
.rdg-tablewrap { max-width: 100%; overflow-x: auto !important; }
#reading-section, #reading-section *:has(> .rdg-tablewrap), .anav-group, #anav-pane { min-width: 0; max-width: 100%; }
.rdg-table-rooms td:last-child, .rdg-table-rooms th:last-child { min-width: 160px; white-space: normal; }
.rdg-typo-note { margin: 6px 0 10px; font-size: 12.5px; }
/* cosfix r4l: after a section jump the translucent, blurred top bar showed the cards scrolled under it
   as a grey band. Same colour, opaque; jump targets stop below the bar. */
.app-topbar { background: linear-gradient(var(--topbar-bg), var(--topbar-bg)), var(--dark-bg) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.anav-group, .anav-shell, [id$="-section"] { scroll-margin-top: 60px; }
/* cosfix r4l: all 14 pipeline columns fit at 1280px without sideways scrolling */
.pipeline-table { font-size: 12px; }
.pipeline-table th, .pipeline-table td { padding-left: 4px !important; padding-right: 4px !important; }
.pipeline-table th { white-space: normal; }
.pipeline-table td:nth-child(2) { max-width: 150px; }
.pipeline-table td:nth-child(3) { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipeline-table td.location, .pipeline-table td:nth-child(4) { max-width: 120px !important; }
.pipeline-table td:last-child .btn, .pipeline-table td:last-child button { padding: 2px 6px; font-size: 11px; }
/* cosfix r4l: all 14 pipeline columns fit the card at 1280px (fixed layout; cut text keeps its full value in the tooltip) */
.pipeline-table { table-layout: fixed; width: 100%; font-size: 12px; }
.pipeline-table th { white-space: normal !important; line-height: 1.2; vertical-align: bottom; }
.pipeline-table td { overflow: hidden; text-overflow: ellipsis; }
.pipeline-table td:not(:last-child) { white-space: nowrap; }
.pipeline-table th:nth-child(1) { width: 9.5%; } .pipeline-table td:nth-child(1) { font-size: 11px; }
.pipeline-table th:nth-child(2) { width: 13%; }
.pipeline-table th:nth-child(3) { width: 4.5%; }
.pipeline-table th:nth-child(4) { width: 11%; }
.pipeline-table th:nth-child(5) { width: 4%; }
.pipeline-table th:nth-child(6) { width: 8%; }
.pipeline-table th:nth-child(7) { width: 5.5%; }
.pipeline-table th:nth-child(8) { width: 5.5%; }
.pipeline-table th:nth-child(9) { width: 6%; }
.pipeline-table th:nth-child(10) { width: 5.5%; }
.pipeline-table th:nth-child(11) { width: 3.5%; }
.pipeline-table th:nth-child(12) { width: 7%; }
.pipeline-table th:nth-child(13) { width: 4.5%; }
.pipeline-table th:nth-child(14) { width: 12%; }
.pipeline-table td:last-child { white-space: normal !important; }
.pipeline-table td:last-child .btn, .pipeline-table td:last-child button { margin: 1px; }
.pipeline-table td:nth-child(2), .pipeline-table td:nth-child(4), .pipeline-table td.location { max-width: none !important; }
.pipeline-table th:nth-child(1) { width: 8.5%; }
.pipeline-table th:nth-child(4) { width: 9%; }
.pipeline-table th:nth-child(5) { width: 3.5%; }
.pipeline-table th:nth-child(11) { width: 3%; }
.pipeline-table th:nth-child(7) { width: 6.5%; }
.pipeline-table th:nth-child(8) { width: 6%; }
.pipeline-table th:nth-child(10) { width: 6%; }
.pipeline-table th:nth-child(13) { width: 4%; }
.pipeline-table th:nth-child(14) { width: 15%; }
.pipeline-table td:nth-child(8) span, .pipeline-table td:nth-child(10) span { font-size: 10px; padding: 1px 4px !important; }
.pipeline-table td:last-child { overflow: visible; }
.pipeline-table td:last-child > div, .pipeline-table td:last-child { display: table-cell; }
.pipeline-table td:last-child .btn, .pipeline-table td:last-child button { padding: 2px 5px !important; font-size: 11px !important; }
.pipeline-table th { font-size: 10px; overflow-wrap: anywhere; }
/* cosfix r4l: the Rooms table fits its pane (it scrolled inside itself with the last column out of view) */
table.rdg-table-rooms { display: table !important; width: 100%; table-layout: fixed; font-size: 12px; }
table.rdg-table-rooms th, table.rdg-table-rooms td { padding: 5px 5px; min-width: 0 !important; overflow-wrap: anywhere; white-space: normal !important; }
table.rdg-table-rooms th:nth-child(1) { width: 6%; } table.rdg-table-rooms th:nth-child(2) { width: 12%; }
table.rdg-table-rooms th:nth-child(3) { width: 14%; } table.rdg-table-rooms th:nth-child(4) { width: 9%; }
table.rdg-table-rooms th:nth-child(5) { width: 8%; } table.rdg-table-rooms th:nth-child(6) { width: 7%; }
table.rdg-table-rooms th:nth-child(7) { width: 9%; } table.rdg-table-rooms th:nth-child(8) { width: 21%; }
table.rdg-table-rooms th:nth-child(9) { width: 14%; }
table.rdg-table-rooms td .rdg-chip, table.rdg-table-rooms td .rdg-sheet { max-width: 100%; white-space: normal; }
table.rdg-table-rooms th { overflow-wrap: normal !important; font-size: 10px; }
table.rdg-table-rooms th:nth-child(5) { width: 9%; } table.rdg-table-rooms th:nth-child(8) { width: 22%; } table.rdg-table-rooms th:nth-child(9) { width: 12%; }
table.rdg-table-rooms th:nth-child(2) { width: 11%; }
table.rdg-table-rooms td:nth-child(8) .rdg-chip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; margin-bottom: 2px; }
table.rdg-table-rooms td { overflow: hidden; }
