/* Pay consoles and pay editors, design spec 6.5 and 9.1: only what is unique to the staff cost and TFR consoles (their
   script feedback line, the inline editor row the scripts insert, the person checkboxes of the bulk forms) and to the
   pay editor forms; tables, figures, toolbars and pagers come from components.css. */
.pay-editor { display: grid; gap: var(--ph-space-15); max-width: 42rem; margin-block: var(--space-2); }
/* A label that wraps its control stacks them; a label beside its control keeps its asterisk on its line. */
.pay-editor label:has(> :is(input, select, textarea)) { display: grid; gap: var(--ph-space-05); }
.pay-editor label.checkbox { display: flex; align-items: center; gap: var(--space-1); }
.pay-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: var(--ph-space-05) var(--space-2); }
.pay-people > legend { grid-column: 1 / -1; }
.pay-people > label { min-height: var(--ph-control-h); }
.console-feedback, .console-empty { max-width: var(--ph-measure); margin: 0 0 var(--space-2); }
.console-feedback:empty { margin: 0; }
.console-feedback:not(:empty) { padding: var(--space-1) var(--space-2); border-left: 3px solid var(--ph-info); background: var(--ph-info-bg); color: var(--ph-info); }
.console-feedback[data-error="true"] { border-left-color: var(--err); background: var(--ph-err-bg); color: var(--err); }
.console-empty { color: var(--ink-2); }
/* The console tables carry many figures and two row actions: the name keeps a readable width, the headers wrap, in
   sentence case and not in the uppercase label of a list table (design-d-spec.md 2), and the actions stack in their
   cell. The fourteen columns of the staff cost table (task 088) and the eleven of the TFR table scroll inside their
   region where the page is narrower than they are; the staff cost table keeps the name in view while they do (below). */
[data-console] .data-table tbody th[scope="row"] { min-width: 9rem; }
[data-console] .data-table thead th { padding-inline: var(--space-2); font-size-adjust: inherit; letter-spacing: normal; text-transform: none; white-space: normal; vertical-align: bottom; }
[data-console] .data-table td.row-actions { width: 1%; white-space: normal; }
[data-console] .data-table td.row-actions > * { display: flex; justify-content: center; width: 100%; white-space: nowrap; }
[data-console] .data-table td.row-actions > * + * { margin-top: var(--ph-space-05); margin-left: 0; }
/* The row the script paints keeps the hook of a cell note that has nothing to say (the standard hourly cost of a person
   it does not apply to): an empty note takes no line. */
[data-console] .data-table .cell-note:empty { display: none; }
/* The foot of the staff cost table, the sums of what the table lists (task 095), each under the column it sums: a
   stronger rule sets it apart from the rows, a lighter one parts its own lines, and its figures are set as the totals
   they are. (Design «Segnale» removed the line above the table that said it went on to the right: it no longer does.) */
[data-console="staff-cost"] .data-table tfoot :is(th, td) { padding: var(--ph-space-15) var(--space-2); border-top: var(--border-w) solid var(--line-strong); font-weight: 600; vertical-align: top; }
[data-console="staff-cost"] .data-table tfoot th { text-align: left; }
[data-console="staff-cost"] .data-table tfoot tr + tr > * { border-top-color: var(--surface-2); }
/* A figure of the table never wraps, and a note under one is a block inside its cell, so a note of words alone would
   set the width of its whole column: the one under the cost of a person outside the yearly total and the one under
   the foot's sum of the pay pushed the standard hourly cost out of sight at 1440 pixels (task 095, review of round 2).
   These two notes hold no figure and wrap, inside the width their column takes from its figures and from the notes
   that hold a date or an amount, which stay on one line. On a phone, where a cell is half a card, they read whole. */
[data-console="staff-cost"] .data-table .cell-note-wrap { white-space: normal; }
/* Task 222: the line in place of the decision of a proposal (who decides it) is words, so it wraps in its cell. */
.data-table .row-actions .decision-note { white-space: normal; }
/* Design «Segnale»: the heads of a console are short words, with their full name in the tooltip of an abbreviation
   drawn as plain text. */
[data-console] .data-table thead abbr[title] { text-decoration: none; cursor: help; }
/* The staff cost table may be wider than its region on a narrow desk (task 088; since design «Segnale» it has seven
   columns): the person's name stays in view while the figures scroll sideways, as the person column of the consultant's desk does (consultant.css). The cell
   stands on the ground its row shows, so that no figure reads through it: the sheet's, and the page's while the row is
   under the pointer (components.css .table-scroll and .data-table tbody tr:hover; a row of this table has no other
   state, which staff-cost-088.test.js holds). The row of the inline editor is one cell across the table and has no
   name cell, so nothing is held over it. The name of a line of the foot is held as a person's name is (task 095): a
   sum that scrolled away from what it sums would be a figure with no word. At 40rem and under the table is a list of
   cards and nothing scrolls: there a line of the foot is a card of its own, with no word for a column it does not sum. */
@media (min-width: 40.0625rem) {
  [data-console="staff-cost"] .data-table.stack-on-phone :is(thead th:first-child, tbody th[scope="row"], tfoot th[scope="row"]) { position: sticky; left: 0; z-index: 1; background: var(--surface-1); box-shadow: inset calc(-1 * var(--border-w)) 0 0 var(--line); }
  [data-console="staff-cost"] .data-table.stack-on-phone tbody tr:hover > th[scope="row"] { background: var(--bg); }
}
@media (max-width: 40rem) {
  [data-console="staff-cost"] .data-table.stack-on-phone tfoot { display: block; }
  [data-console="staff-cost"] .data-table.stack-on-phone tfoot :is(th, td) { display: block; padding: 0; border: 0; text-align: left; }
  [data-console="staff-cost"] .data-table.stack-on-phone tfoot th { grid-column: 1 / -1; }
  [data-console="staff-cost"] .data-table.stack-on-phone tfoot td:empty { display: none; }
}
@media (max-width: 63.999rem) {
  .pay-people > label { min-height: var(--ph-control-h-touch); }
}
/* Design «Segnale»: a row of a console is one line from 40rem up: nothing in a row wraps and its cells take the step of
   the head, whose labels are short words (the rule of the abbreviated heads is above) and wrap as every head does. */
@media (min-width: 40.0625rem) {
  [data-console] .data-table tbody :is(th, td) { padding-inline: var(--space-2); white-space: nowrap; }
}
