/* Roster directory. Use the shared page-header controls and one continuous work surface. */
.ros-directory {
  --ros-pad: var(--s-5);
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
}
.ros-directory-header {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  gap: var(--s-2) var(--s-3);
  align-items: center;
  padding: var(--s-4) var(--ros-pad) var(--s-3);
}
.ros-directory-header .pgh { display: contents; }
.ros-directory-header .pgh-top,
.ros-directory-header .pgh-tabs,
.ros-directory-header .pgh-meta,
.ros-directory-header .pgh-status,
.ros-directory-header .pgh-saves,
.ros-directory-header .ros-active-filters,
.ros-directory-header .ros-export-note,
.ros-directory-header #rosRosterSummary { grid-column: 1 / -1; margin: 0; }
.ros-directory-header .pgh-top { align-items: center; }
.ros-directory-header .pgh-h { margin: 0; }
.ros-directory-header .pgh-tabs { grid-row: 2; flex-wrap: nowrap; gap: var(--s-4); }
.ros-directory-header .pgh-tab { min-height: var(--control-height-touch); padding: var(--s-2) var(--s-1); }
.ros-directory-header .pgh-row { grid-column: 1; grid-row: 3; margin: 0; flex-wrap: nowrap; }
.ros-directory-header .pgh-search { min-width: 0; min-height: var(--control-height-touch); flex-basis: auto; }
.ros-directory-header .pgh-filters { min-height: var(--control-height-touch); }
.ros-directory-header .pgh-tabs + .pgh-row { min-width: 0; }
.ros-directory-header .pgh-meta { color: var(--muted); font-size: var(--t-sub); }
.ros-directory-tools { grid-column: 2; grid-row: 3; display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.ros-directory-tools .ctx-row { margin: 0; min-width: 0; }
.ros-directory-tools .sel { max-width: 100%; min-height: var(--control-height-touch); }
.ros-directory-tools .ros-sortpick { margin: 0; }
.ros-directory-header #rosRosterSummary[hidden] { display: none; }
.ros-directory-header .dash-stats { margin: var(--s-2) 0 0; }
.ros-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.ros-active-filters .ctx-chip { padding-block: 0; }
.ros-active-filters .ctx-x { width: var(--control-height-touch); height: var(--control-height-touch); background: none; }

.ros-directory-table { border-collapse: collapse; table-layout: fixed; width: 100%; text-align: left; }
.ros-directory-table thead { background: var(--wash); }
.ros-directory-table th, .ros-directory-table td { border: 0; overflow-wrap: anywhere; }
.ros-directory-table thead th { padding: var(--s-2) var(--s-3); border-block: 1px solid var(--line); color: var(--muted); font-size: var(--t-sub); font-weight: 600; }
.ros-directory-table thead th:nth-child(1) { width: 32%; }
.ros-directory-table thead th:nth-child(2) { width: 20%; }
.ros-directory-table thead th:nth-child(3) { width: 17%; }
.ros-directory-table thead th:nth-child(4) { width: 15%; }
.ros-directory-table .ros-row { display: table-row; cursor: pointer; border-bottom: 1px solid var(--hair); }
.ros-directory-table .ros-row:last-child { border-bottom: 0; }
.ros-directory-table .ros-row:focus-within { background: var(--wash); }
.ros-directory-table tbody :is(th,td) { text-align: left; font-weight: 400; padding: var(--s-2) var(--s-3); font-size: var(--t-body); vertical-align: middle; }
.ros-directory-table :is(thead,tbody) th:first-child { padding-inline-start: var(--ros-pad); }
.ros-directory-table :is(thead,tbody) :is(th,td):last-child { padding-inline-end: var(--ros-pad); }
.ros-person-name { display: inline-flex; align-items: center; gap: var(--s-3); padding: 0; min-height: var(--control-height-touch); max-width: 100%; text-align: left; color: var(--navy-dark); font: inherit; font-weight: 650; background: transparent; border: 0; cursor: pointer; }
.ros-person-name > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.ros-person-name:hover .ros-name { text-decoration: underline; text-underline-offset: .15em; }
.ros-person-label { display: grid; align-content: center; justify-items: start; gap: 1px; }
.ros-person-label .ros-name { font-weight: 650; color: var(--navy-dark); }
.ros-initials { display: inline-grid; flex: 0 0 2rem; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--line); background: var(--wash); border-radius: var(--r-s); font-size: var(--t-sub); font-weight: 600; }
.ros-row-meta, .ros-row-details, .ros-directory-table .ros-archmeta { margin-inline-start: calc(2rem + var(--s-3)); }
.ros-row-meta, .ros-row-details { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); color: var(--muted); font-size: var(--t-sub); }
.ros-row-meta { margin-top: calc(-1 * var(--s-1)); }
.ros-row-details { margin-top: var(--s-1); }
.ros-employee-number, .ros-position-cell small { display: block; font-size: var(--t-sub); font-weight: 400; color: var(--muted); }
.ros-employee-number { font-variant-numeric: tabular-nums; }
.ros-directory-table .badge { margin: 0; white-space: normal; }
.ros-directory-table .vchip--plain { color: inherit; font-weight: inherit; font-size: inherit; white-space: normal; }
.ros-venue-cell .vdot { flex: none; }
.ros-call { display: inline-flex; align-items: center; min-height: var(--control-height-touch); color: var(--navy); text-decoration: underline; text-underline-offset: .15em; font-variant-numeric: tabular-nums; }
.ros-call svg, .ros-mobile-identity, .ros-mobile-detail { display: none; }
.ros-no-phone { color: var(--muted); }
.ros-cert-expired { color: var(--bad-fg); }
.ros-cert-soon { color: var(--warn-fg); }
.ros-training-stage { color: var(--navy-dark); font-weight: 600; }
.ros-directory .empty-state { margin: 0; }

@media (max-width: 900px) {
  .ros-directory { --ros-pad: var(--s-4); }
  .ros-directory-header { grid-template-columns: minmax(0, 1fr) minmax(12rem, auto); }
  .ros-directory-tools .ros-venue-filter { display: none; }
  .ros-directory-table thead th:first-child { width: 34%; }
  .ros-directory-table thead th:last-child { width: 8%; }
  .ros-call { display: inline-grid; place-items: center; width: var(--control-height-touch); }
  .ros-call svg { display: inline-block; }
  .ros-call span { display: none; }
}
@media (max-width: 640px) {
  .ros-directory { --ros-pad: var(--s-3); }
  .ros-directory-header { grid-template-columns: minmax(0, 1fr); padding-top: var(--s-3); gap: var(--s-2); }
  .ros-directory-header .pgh-top { flex-wrap: nowrap; }
  .ros-directory-header .pgh-acts { width: auto; flex: 0 0 auto; margin-left: auto; }
  .ros-directory-header .pgh-titles { min-width: 0; flex: 1 1 auto; }
  .ros-directory-header #addBtn { min-width: 0; white-space: nowrap; }
  .ros-directory-header .pgh-tabs { justify-content: space-between; gap: 0; }
  .ros-directory-header .pgh-tab { font-size: var(--t-sub); }
  .ros-directory-header .pgh-row { grid-column: 1 / -1; }
  .ros-directory-header .pgh-filters { flex: 0 0 auto; }
  .ros-directory-tools { display: none; }
  .ros-directory-table, .ros-directory-table tbody { display: block; }
  .ros-directory-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ros-directory-table .ros-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: var(--s-2) var(--ros-pad); }
  .ros-directory-table .ros-row:first-child { border-top: 1px solid var(--line); }
  .ros-directory-table .ros-row .ros-person-cell, .ros-directory-table .ros-row .ros-phone-cell { padding: 0; }
  .ros-directory-table .ros-position-cell, .ros-directory-table .ros-venue-cell, .ros-directory-table .ros-stage-cell, .ros-directory-table .ros-no-phone { display: none; }
  .ros-mobile-identity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--s-1); color: var(--muted); font-size: var(--t-sub); font-weight: 400; }
  .ros-employee-number:not(.ros-number-visible) { display: none; }
  .ros-mobile-detail { display: inline; }
  .ros-row-meta { margin-top: var(--s-1); }
}


.ros-dialog-sort { grid-column: 1 / -1; }
.ros-dialog-sort .ros-sortpick, .ros-dialog-sort .col-sortpick { width: 100%; margin: 0; }
.ros-dialog-sort .col-sortpick { display: grid; }
.ros-dialog-sort .ros-sortpick .sel { width: 100%; min-height: var(--control-height-touch); }
.ros-directory-header:not(:has(.ros-active-filters)) .pgh-meta { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
@media (min-width: 900px) {
  .ros-directory-header { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .ros-directory-header .pgh-top { display: contents; }
  .ros-directory-header .pgh-titles { grid-column: 1; grid-row: 1; }
  .ros-directory-header .pgh-tabs { grid-column: 2 / 4; grid-row: 1; align-self: stretch; margin-inline: var(--s-2); box-shadow: none; }
  .ros-directory-header .pgh-acts { grid-column: 4; grid-row: 1; }
  .ros-directory-header .pgh-row { grid-column: 1 / 3; grid-row: 2; }
  .ros-directory-tools { grid-column: 3 / 5; grid-row: 2; }
}
