/* ===== Workers on a phone · roster, timecards and shifts ===== */

/* the pane runs with the page rather than scrolling inside itself */
#tab-workers .workspace-pane { overflow: visible; padding-right: 0; }
#tab-workers .filter-row { flex-wrap: wrap; gap: 0.5rem; }
#tab-workers .filter-row input[type="text"] { flex: 1 1 100%; min-width: 0; min-height: var(--touch); }
#tab-workers .filter-row select { flex: 1 1 calc(50% - 0.25rem); min-width: 0; min-height: var(--touch); }
#tab-workers .filter-row button,
#tab-workers .tab-btn,
#tab-workers .subtab { min-height: var(--touch); }


/* ─── List tables · lead card rows (workspace.css), the name on top and its facts wrapped under it ─── */

/* the bulk-edit box leads the row, a thumb-sized target of its own */
#workers-tbody > tr > td.cell-check { order: 0; display: flex; align-items: center; justify-content: center; width: 1.75rem; min-height: 1.75rem; }
#workers-tbody > tr > td.cell-check input { width: 20px; height: 20px; }
/* first and last name read as one name at the top of the card */
#workers-tbody > tr > td:nth-child(1 of :not(.cell-check)),
#workers-tbody > tr > td:nth-child(2 of :not(.cell-check)) { order: 1; font-size: 0.9rem; font-weight: 600; color: var(--text); }
#workers-tbody > tr > td:nth-child(2 of :not(.cell-check)) { flex: 1 1 40%; margin-left: -0.3rem; }
/* job, department and shift share the facts line, a dot between each */
#workers-tbody > tr > td:nth-child(4 of :not(.cell-check))::before,
#workers-tbody > tr > td:nth-child(5 of :not(.cell-check))::before { content: "· "; color: var(--text-faint); }
#workers-tbody > tr > td:nth-child(6 of :not(.cell-check)) { order: 2; }
/* the facts line starts under the name, clear of the bulk box */
#workers-tbody > tr:has(> td.cell-check) > td:nth-child(3 of :not(.cell-check)) { margin-left: 2.35rem; }
#workers-tbody > tr > td:nth-child(7 of :not(.cell-check)) { margin-left: auto; font-size: 0.75rem; color: var(--text-faint); }
#workers-tbody > tr > td:nth-child(7 of :not(.cell-check))::before { content: "Hired "; }

/* Timecards · who leads, open or closed beside them, the times under */
#worker-timecards-tbody > tr > td:nth-child(1) { order: 1; flex: 1 1 60%; font-size: 0.9rem; font-weight: 600; color: var(--text); }
#worker-timecards-tbody > tr > td:nth-child(5) { order: 2; }
#worker-timecards-tbody > tr > td:nth-child(2)::before { content: "In "; }
#worker-timecards-tbody > tr > td:nth-child(3)::before { content: "· Out "; color: var(--text-faint); }
#worker-timecards-tbody > tr > td:nth-child(4) { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Shifts and rotations · the group or name leads, its hours and state under */
#shifts-tbody > tr > td:nth-child(1),
#rotations-tbody > tr > td:nth-child(1) { order: 1; flex: 1 1 60%; font-size: 0.9rem; font-weight: 600; color: var(--text); }
#shifts-tbody > tr > td:nth-child(5),
#rotations-tbody > tr > td:nth-child(3) { order: 2; }
#shifts-tbody > tr > td:nth-child(3)::before { content: "to "; }
#shifts-tbody > tr > td:nth-child(4)::before { content: "· Order "; color: var(--text-faint); }
#rotations-tbody > tr > td:nth-child(2)::before { content: "Epoch "; }
/* a worker's actions ride the end of the facts line rather than taking one of their own */
#tab-workers tbody > tr > td.col-action { flex: none; margin-left: auto; }


/* ─── Rotation week · the day grid keeps its columns and scrolls inside its card ─── */
#tab-workers .table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
#tab-workers .table-scroll select { min-height: 2.5rem; }


/* ─── Worker panel · stacked under the roster, one field per line ─── */
#tab-workers .workspace-panel-body { overflow: visible; max-height: none; }
#tab-workers .workspace-panel .form-grid { grid-template-columns: minmax(0, 1fr); }
