/* Screen styles: lab worklist and overview (S-18, S-19). imported by assets/app.js.
   Worklist: one <tbody> per sample (header row + analysis rows) in a dense table that scrolls sideways (the page scrolls vertically);
   on phones every sample becomes a card and the analysis cells stack as labeled fields (ui.md S-18). */

.sv-worklist__total { margin-block: var(--sv-space-3); color: var(--sv-color-text-muted); font-size: var(--sv-text-sm); }
.sv-worklist__conclude-all { display: inline-flex; }

.sv-worklist__head-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sv-space-2) var(--sv-space-3);
  align-items: center;
  font-weight: var(--sv-weight-regular);
}
.sv-worklist__meta { display: flex; flex-wrap: wrap; gap: var(--sv-space-1) var(--sv-space-3); align-items: baseline; }
.sv-worklist__authority { font-weight: var(--sv-weight-semibold); text-decoration: none; }
.sv-worklist__label { font-family: var(--sv-font-mono, ui-monospace, monospace); font-weight: var(--sv-weight-bold); }
.sv-worklist__number { color: var(--sv-color-text-muted); }
.sv-worklist__remark { color: var(--sv-color-text-muted); font-style: italic; }
.sv-worklist__documents { display: inline-flex; flex-wrap: wrap; gap: var(--sv-space-2); align-items: center; }
.sv-worklist__actions { display: inline-flex; flex-wrap: wrap; gap: var(--sv-space-2); align-items: center; margin-inline-start: auto; }

.sv-worklist__organism-name { display: block; font-weight: var(--sv-weight-medium); }
.sv-worklist__lab { display: block; color: var(--sv-color-text-muted); }
.sv-worklist__help { display: inline-block; }
.sv-worklist__help > summary { display: inline-flex; cursor: pointer; list-style: none; color: var(--sv-color-text-muted); }
.sv-worklist__help > summary::-webkit-details-marker { display: none; }
.sv-worklist__help > p { max-width: 24rem; margin: var(--sv-space-1) 0 0; font-size: var(--sv-text-xs); white-space: normal; }

.sv-worklist__analysis.is-muted > td { color: var(--sv-color-text-muted); background: var(--sv-color-surface-muted); }
.sv-worklist__cell .sv-input,
.sv-worklist__cell .sv-select { min-width: 7rem; }
.sv-worklist__cell--cost .sv-input { width: 6rem; min-width: 0; font-variant-numeric: tabular-nums; }
.sv-worklist__cell--receivedOn .sv-input,
.sv-worklist__cell--diagnosedOn .sv-input { min-width: 9rem; }
.sv-worklist__state { min-width: 9rem; }
.sv-worklist__state .sv-button { margin-block-start: var(--sv-space-1); }
.sv-worklist__admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--sv-space-3); }
.sv-worklist__admin .sv-field:has(textarea),
.sv-worklist__admin .sv-alert,
.sv-worklist__admin .sv-dialog-form__actions { grid-column: 1 / -1; }
.sv-worklist__map-coords { margin-block-end: var(--sv-space-2); font-variant-numeric: tabular-nums; }

/* Phones: each sample is a card, analysis rows stack into labeled fields (2 columns from 30em). */
@media (max-width: 47.99em) {
  .sv-worklist__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sv-worklist__table,
  .sv-worklist__table tbody,
  .sv-worklist__table tr,
  .sv-worklist__table th,
  .sv-worklist__table td { display: block; width: 100%; }
  .sv-worklist__table tbody { margin-block-end: var(--sv-space-4); border: 1px solid var(--sv-color-border); border-radius: var(--sv-radius-lg); }
  .sv-worklist__analysis { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: var(--sv-space-2); padding: var(--sv-space-2); }
  .sv-worklist__analysis > td { border: 0; padding: 0; }
  .sv-worklist__analysis > td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--sv-color-text-muted);
    font-size: var(--sv-text-xs);
    font-weight: var(--sv-weight-semibold);
  }
}
@media (min-width: 30em) and (max-width: 47.99em) {
  .sv-worklist__analysis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-worklist__analysis > .sv-worklist__organism,
  .sv-worklist__analysis > .sv-worklist__state { grid-column: 1 / -1; }
}

/* Overview S-19: total and "Download CSV" in one toolbar line; dense table (scrolls sideways) whose
   first column(s) stay visible while scrolling sideways (authority + site code for FA/TA/RO,
   site code for inspectors; data-sticky-columns of DataTable, only for the table layout ≥ 48em). */
.sv-overview__toolbar { align-items: center; }
.sv-overview__total { margin: 0; color: var(--sv-color-text-muted); font-size: var(--sv-text-sm); }
.sv-overview__toolbar .sv-overview__total { margin-inline-end: auto; }
.sv-overview td,
.sv-overview th { white-space: nowrap; }
.sv-overview .sv-overview__remark { min-width: 12rem; max-width: 24rem; white-space: normal; }
@media (min-width: 48em) {
  .sv-overview[data-sticky-columns] :is(th, td):first-child { position: sticky; inset-inline-start: 0; }
  .sv-overview[data-sticky-columns] td:first-child { z-index: 1; background: var(--sv-color-surface); }
  .sv-overview[data-sticky-columns] thead th:first-child { z-index: calc(var(--sv-z-sticky) + 1); }
  .sv-overview[data-sticky-columns="2"] :is(th, td):first-child { width: 5rem; min-width: 5rem; max-width: 5rem; }
  .sv-overview[data-sticky-columns="2"] :is(th, td):nth-child(2) {
    position: sticky;
    inset-inline-start: 5rem;
    box-shadow: inset -1px 0 0 var(--sv-color-border);
  }
  .sv-overview[data-sticky-columns="2"] td:nth-child(2) { z-index: 1; background: var(--sv-color-surface); }
  .sv-overview[data-sticky-columns="2"] thead th:nth-child(2) { z-index: calc(var(--sv-z-sticky) + 1); }
  .sv-overview[data-sticky-columns="1"] :is(th, td):first-child { box-shadow: inset -1px 0 0 var(--sv-color-border); }
}
