/* Sortable data tables (roster and group preferences) and the toolbar above them. */

.table-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px 24px; padding: 22px var(--gutter) 19px; }
/* Left: the table's name above its summary, neither wrapping. */
.table-description { display: flex; flex-direction: column; gap: 3px; }
.table-description strong { color: #eadbbd; font: 600 24px var(--font-serif); white-space: nowrap; }
.table-description span { color: #95a5b0; font-size: 16px; white-space: nowrap; }
/* Right: every control, in rows of equal width; a search box stretches to fill its row. */
.table-actions { display: flex; flex-direction: column; gap: 8px; margin-left: auto; }
.action-row { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.table-scroll { overflow-x: auto; border-top: 1px solid #34434f; }

table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
thead { background: #1a2b3a; }
th, td { border-bottom: 1px solid #2e3e4c; padding: 14px 13px; font-size: 18px; }
thead th { padding: 0; }
/* The first column stays visible while the table scrolls sideways. */
thead th:first-child, tbody th { position: sticky; left: 0; z-index: 1; min-width: 170px; }
thead th:first-child { background: #1a2b3a; z-index: 2; }
tbody th { background: var(--card); font-weight: 600; }
tbody tr:hover td, tbody tr:hover th { background: #203242; }

.sort-button, .column-label { width: 100%; min-height: 52px; padding: 8px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; border: 0; background: none; color: #9eacb7; font-size: 15px; font-weight: 700; letter-spacing: .09em; }
.sort-button:hover, .sort-button.active, .column-label.active { color: var(--gold); }
.sort-button span, .column-label span { font-size: 14px; color: #bc9d65; }

.table-dash { color: #647482; }
.date-cell { color: #9aaab5; }
.pending { color: #83929d; font-style: italic; }
.empty-table { text-align: center; padding: 35px; color: #a2b0b9; }
.table-footer { padding: 17px var(--gutter); color: #8d9da9; font-size: 16px; }

@media (max-width: 800px) {
  .table-tools { align-items: stretch; flex-direction: column; }
  .table-actions { margin-left: 0; }
}

@media (max-width: 560px) {
  .action-row { flex-wrap: wrap; }
  .table-description span { white-space: normal; } /* Only the narrowest phones need a second line. */
}
