/*
 * 10G: the shared parts of the UI audit of 1 November 2026 (claude/ui-audit-2026-11-01.md, section 2).
 * Loaded after bundle.css and touch.css. Each block names its part.
 */

/* ---- S1 page header: title alone, subtitle line, status strip, actions at the right ---- */
.ph { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1rem; }
.ph-main { min-width: 0; flex: 1 1 20rem; }
.ph-title { font-size: 1.75rem; font-weight: 500; margin: 0; line-height: 1.2; }
.ph-title .ph-badge { font-size: .95rem; vertical-align: middle; margin-left: .25rem; }
.ph-sub { color: #6c757d; font-size: .9rem; margin-top: .15rem; display: flex; flex-wrap: wrap; gap: 0 .5rem; align-items: baseline; }
.ph-sub .ph-live { margin-left: auto; font-size: .78rem; color: #8a8f94; white-space: nowrap; }
.ph-sub .ph-live:empty { display: none; }
.ph-status { margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.ph-status .badge { font-size: .75rem; }
.ph-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; justify-content: flex-end; }
@media (max-width: 575.98px) {
  .ph-title { font-size: 1.5rem; }
  .ph-actions { width: 100%; justify-content: flex-start; }
  .ph-actions .btn { flex: 1 1 45%; }
  .ph-sub .ph-live { margin-left: 0; flex: 0 0 100%; }
}
/* the live stamp when a page has no header slot (layout.njk falls back to the corner) */
.live-stamp.in-head { position: static; font-size: inherit; color: inherit; }

/* a section heading inside a page */
.ps { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; margin: 1.25rem 0 .5rem; }
.ps-title { font-size: 1.2rem; font-weight: 600; margin: 0; }
.ps-count { color: #6c757d; font-weight: 400; font-size: 1rem; }
.ps-note { color: #6c757d; font-size: .875rem; }
.ps-actions { margin-left: auto; display: flex; gap: .35rem; }

/* ---- S2 button scale: one primary fill; green and amber are state colours, not button colours ---- */
/* 10H: the station screens too; their forward tap is the primary, Returned and Damaged are outlines */
.btn-success { color: #fff; background-color: #40538b; border-color: #40538b; }
.btn-success:hover, .btn-success:focus { background-color: #344575; border-color: #2f3f6b; color: #fff; }
.btn-success:not(:disabled):not(.disabled):active { background-color: #2f3f6b; border-color: #2a3861; }
.btn-outline-success { color: #40538b; border-color: #40538b; background: transparent; }
.btn-outline-success:hover, .btn-outline-success:focus { color: #fff; background-color: #40538b; border-color: #40538b; }
.btn-warning:not(.btn-outline-warning) { color: #40538b; background-color: #fff; border-color: #40538b; }
.btn-warning:not(.btn-outline-warning):hover { color: #fff; background-color: #40538b; }
.btn-outline-secondary { color: #495057; border-color: #adb5bd; }
.btn-outline-secondary:hover, .btn-outline-secondary:focus { color: #212529; background-color: #e9ecef; border-color: #adb5bd; }
.btn:focus, .btn.focus { box-shadow: 0 0 0 .2rem rgba(64, 83, 139, .3); }
/* row actions: plain links, the destructive one red, no glyphs */
.row-actions a, .row-actions button.btn-link { padding: 0 .35rem; font-size: .875rem; }
.row-actions a + a::before { content: ""; }
.row-actions .text-danger, .row-actions a.danger { color: #c0392b; }

/* ---- S3 cards and tiles: one grid, one height ---- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.card-grid > a { display: block; color: inherit; text-decoration: none; min-width: 0; }
.card-grid > a:hover { text-decoration: none; color: inherit; }
.card-grid .card { height: 100%; min-height: 7.25rem; }
.card-grid .card:hover { border-color: #40538b; }
.card-grid .cg-title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-grid .cg-text { font-size: .85rem; color: #6c757d; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-grid .cg-n { font-size: 1.75rem; line-height: 1; font-weight: 600; min-width: 2.6rem; text-align: center; flex: 0 0 auto; }
.cg-group { margin: 1rem 0 .4rem; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: #6c757d; }
.cg-group:first-child { margin-top: 0; }
@media (max-width: 991.98px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .card-grid { grid-template-columns: minmax(0, 1fr); } .card-grid .card { min-height: 0; } }
/* the home screen's module tiles: three a row, one height, the waiting line pinned to the foot */
.home-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.home-tile { max-width: none; min-height: 11.5rem; display: flex; flex-direction: column; }
.home-tile .ht-lead { min-height: 2.4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-tile .ht-wait { margin-top: auto; padding-top: .5rem; }
@media (max-width: 991.98px) { .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .home-tiles { grid-template-columns: minmax(0, 1fr); } .home-tile { min-height: 0; } }
/* stat tiles: the figure and the label, one height, labels one line */
.stats { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.stat { flex: 1 1 9rem; min-width: 8rem; max-width: 14rem; border: 1px solid #dee2e6; border-radius: 6px; padding: .5rem .75rem; background: #fff; min-height: 4.6rem; display: flex; flex-direction: column; justify-content: flex-end; }
.stat .n { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.stat .n small { font-size: .8rem; color: #6c757d; font-weight: 400; }
.stat .l { font-size: .75rem; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.warn { border-color: #ffc51a; background: #fff8e1; }
.stat.bad { border-color: #f45b69; background: #fff0f1; }
/* the station list's tiles share one height (UX-09) */
.st-tile-btn { min-height: 8.4rem; }
@media (max-width: 575.98px) { .st-tile-btn { min-height: 7.2rem; } }

/* ---- S4 filter bar: a hint on date boxes; on a phone the bar folds behind one button ---- */
.fb .fb-box > label .fb-hint { font-weight: 400; color: #8a8f94; margin-left: .25rem; }
.fb-toggle { display: none; }
.fb-active { font-weight: 600; color: #40538b; }
.pf-showing { margin: -.5rem 0 .75rem; }
@media (max-width: 575.98px) {
  .fb-toggle { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .75rem; }
  .fb.fb-folded > .fb-box, .fb.fb-folded > .fb-actions, .fb.fb-folded > .fb-kinds { display: none; }
  .fb.fb-folded { margin-bottom: 0; }
}
/* the segmented filter: one chip row for a kind or a category */
.seg { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-bottom: .75rem; }
.seg .seg-label { color: #6c757d; font-size: .8rem; margin-right: .25rem; }
.seg a, .seg button { border: 1px solid #ced4da; border-radius: 1rem; padding: .15rem .7rem; font-size: .85rem; color: #2f3a63; background: #fff; text-decoration: none; line-height: 1.5; }
.seg a:hover, .seg button:hover { background: #eef1f7; text-decoration: none; }
.seg a.on, .seg button.on { background: #40538b; border-color: #40538b; color: #fff; font-weight: 600; }
@media (max-width: 575.98px) { .seg { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; } .seg a, .seg button { white-space: nowrap; flex: 0 0 auto; } }

/* ---- S5 tables: one header style, sticky where long, the empty-cell glyph, the phone blocks ---- */
main .table thead th { font-weight: 600; border-top: 0; border-bottom: 2px solid #dee2e6; color: #343a40; }
main .table .thead-light th { background: #f6f7fb; }
.table-sticky thead th { position: sticky; top: 0; background: #fff; z-index: 2; }
@media (min-width: 1200px) { .table-sticky thead th { top: 0; } }
.table .muted-cell { color: #8a8f94; }
.table-note { color: #6c757d; font-size: .85rem; margin: .25rem 0 1rem; }
.pg { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.pg-links { display: flex; gap: .35rem; }
.pe { margin: .75rem 0 1.25rem; }
@media (max-width: 575.98px) {
  table.phone-blocks tbody td:empty, table.phone-blocks tbody td.pb-skip { display: none; }
  table.phone-blocks tbody td.pb-actions { flex: 1 1 100%; padding-top: .3rem; }
  table.phone-blocks tbody td.text-right { text-align: left !important; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .table-scroll > table { min-width: 36rem; }
}

/* ---- S7 badges: one size, one tone per meaning; the teal of badge-info becomes a quiet indigo ---- */
.badge { font-size: .75rem; font-weight: 600; padding: .3em .55em; vertical-align: middle; letter-spacing: 0; }
.badge-info { color: #2f3a63; background-color: #e6ebf7; }
.badge-light { color: #495057; background-color: #eceff4; }
.badge-dark { color: #fff; background-color: #495057; }
h1 .badge, h2 .badge, .h2 .badge { font-size: .95rem; }

/* ---- S8 frame: the side navigation's background runs the full height; room for the phone's bottom bar ---- */
@media (min-width: 1200px) {
  .app-shell.with-side { background: linear-gradient(to right, #f6f7fb 0, #f6f7fb 13.5rem, #e3e6ee 13.5rem, #e3e6ee calc(13.5rem + 1px), transparent calc(13.5rem + 1px)); min-height: calc(100vh - 1rem); }
  .app-shell.with-side > nav.side { background: transparent; border-right: 0; }
  .app-shell.with-side > .topbar { background: #40538b; }
}
@media (max-width: 767.98px) { .app-shell { padding-bottom: 4.6rem; } }

/* ---- S10 notices and empty states ---- */
.notice { border: 1px solid #dee2e6; border-left-width: 4px; border-radius: 4px; padding: .6rem .8rem; margin: 0 0 1rem; background: #fff; font-size: .95rem; }
.notice.warn { border-color: #ffe08a; border-left-color: #f0ad00; background: #fff8e1; }
.notice.bad { border-color: #f5c2c7; border-left-color: #dc3545; background: #fff5f5; }
.notice.ok { border-color: #c3e6cb; border-left-color: #28a745; background: #f1faf3; }
.notice a { text-decoration: underline; }
details.more > summary { color: #40538b; cursor: pointer; font-size: .9rem; list-style: none; display: inline-block; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: " \25BE"; }
details.more[open] > summary::after { content: " \25B4"; }

/* the Stores matrix on a phone: each item as a block, the sticky column rule off */
@media (max-width: 575.98px) {
  .stores-items.phone-blocks .stores-sticky { position: static; min-width: 0; background: transparent; flex: 1 1 100%; font-weight: 600; }
  .stores-matrix.phone-blocks-wrap { overflow: visible; }
}

/* ===== 10H: the production, setup, fuel and dialog pages (the forks' CSS merged) ===== */
/* 10H fork B: the production pages */

/* Production order: the plan-day box sits on the bar; the h2 wrapper is only the bundle's hook, not a heading */
.po-day { font-size: 1rem; font-weight: 400; line-height: inherit; }
.po-day .date { width: 9rem; }
.no-spin::-webkit-inner-spin-button, .no-spin::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.no-spin { -moz-appearance: textfield; }

/* Shifts: one column layout across the department cards (UX-14); the current shift's row in the ok tone, not teal */
.shift-table { table-layout: fixed; }
.shift-table th:nth-child(1) { width: 8%; } .shift-table th:nth-child(2) { width: 11%; } .shift-table th:nth-child(3), .shift-table th:nth-child(4), .shift-table th:nth-child(5) { width: 9%; }
.shift-table th:nth-child(6), .shift-table th:nth-child(7) { width: 12%; } .shift-table th:nth-child(8) { width: 20%; } .shift-table th:nth-child(9) { width: 10%; }
.shift-table td { overflow-wrap: anywhere; }
.shift-table tr.shift-current td { background: #f1faf3; }
@media (max-width: 575.98px) { .shift-table { table-layout: auto; } }
/* 11C (the owner's mock-up 1): one line per department: its name, its state, its two lists, its action. What waits for
   somebody carries a coloured edge. On a phone the four parts stack and the action spans the width */
.sh-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1.2fr) minmax(0, 1.3fr) auto; column-gap: 1rem; row-gap: .25rem; align-items: start;
  padding: .7rem .9rem; margin-bottom: .6rem; background: #fff; border: 1px solid #dee2e6; border-left: 5px solid #ced4da; border-radius: .3rem; }
.sh-row.sh-waiting { border-left-color: #f0ad4e; background: #fffaf0; }
.sh-row.sh-on { border-left-color: #5cb85c; }
.sh-row .sh-state { font-size: 1.05rem; }
.sh-row .sh-detail { display: block; color: #6c757d; }
.sh-row .sh-note { margin-top: .25rem; white-space: pre-line; overflow-wrap: anywhere; }
.sh-row .sh-nums details summary { cursor: pointer; }
.sh-row .sh-nums details[open] { margin-bottom: .3rem; }
.sh-row .sh-nums .badge { white-space: normal; text-align: left; }
.sh-row .sh-act { text-align: right; }
.sh-row .sh-who { display: inline-block; max-width: 11rem; }
.sh-row .sh-hist { grid-column: 1 / -1; }
.sh-row .sh-hist-table { overflow-x: auto; }
/* 11D: in the history table a long badge ("1 refusal unresolved") wraps inside its narrow State column; it was cut at the table's edge */
.shift-table .badge { white-space: normal; text-align: left; }
.sh-row .shift-batch-link { text-decoration: underline; }
@media (max-width: 767.98px) {
  .sh-row { grid-template-columns: minmax(0, 1fr); }
  .sh-row .sh-dept small { display: inline !important; margin-left: .4rem; }
  .sh-row .sh-act { text-align: left; }
  .sh-row .sh-action { display: block; width: 100%; }
  .sh-row .sh-who { max-width: none; }
  .sh-row .sh-nums details summary, .sh-row .sh-nums > div { padding: .3rem 0; }
}
@media print { .sh-row { break-inside: avoid; border-left-width: 1px; } }

/* Day close on a phone: the item as the block's title, Context as the last line; the detail rows keep their tables in a scroller */
@media (max-width: 575.98px) {
  .dc-rows tbody tr.expandable td.dc-context { order: 99; }
  .dc-rows tbody td[colspan] { overflow-x: auto; }
}

/* Stations list: the department groups flow as one grid; a group's label is a chip in the flow, so a one-tile group leaves no empty row (UX-28) */
.st-groups { display: flex; flex-wrap: wrap; align-items: flex-start; margin: 0 -15px; }
.st-groups .st-group { flex: 0 0 25%; max-width: 25%; margin: 0 0 1rem; padding: 0 15px; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: #6c757d; align-self: stretch; display: flex; align-items: center; }
.st-groups .st-group::before { content: ""; display: inline-block; width: .5rem; height: 2.2rem; background: #40538b; border-radius: 2px; margin-right: .6rem; opacity: .5; }
.st-groups .st-group-row { display: contents; }
.st-groups .st-tile { flex: 0 0 25%; max-width: 25%; }
@media (max-width: 991.98px) { .st-groups .st-tile, .st-groups .st-group { flex: 0 0 33.333%; max-width: 33.333%; } }
@media (max-width: 767.98px) { .st-groups .st-tile { flex: 0 0 50%; max-width: 50%; } .st-groups .st-group { flex: 0 0 100%; max-width: 100%; margin-bottom: .5rem; } }
#st-stage-bar .st-stage { border-radius: 1rem; }

/* station screens: the cards of one row share a height (UX-09); the receipts strip under the subtitle */
.st-cards .st-card .card { height: 100%; }
.st-cards .st-card { display: flex; flex-direction: column; }
.ph-station .ph-status { font-size: .9rem; }

/* ---- 10H fork A: the setup lists, the item and product pages ---- */
/* row actions as links of one style; the words spaced */
.row-actions a + a, .row-actions a + form, .row-actions form + a, .row-actions form + form { margin-left: .6rem; }
.row-actions form { display: inline; }
.row-actions .btn-link { font-size: inherit; line-height: inherit; border: 0; vertical-align: baseline; }
/* phone blocks: long emails and links wrap inside their block */
@media (max-width: 575.98px) { table.phone-blocks td a, table.phone-blocks td { overflow-wrap: anywhere; } }
/* a setup list's add form, folded under the table, opened by the header's button */
details.setup-add > summary { font-weight: 600; cursor: pointer; margin-bottom: .5rem; }
details.setup-add > summary::marker { color: #6c757d; }
/* Floor terminals: the station select full width in its block on the phone */
@media (max-width: 575.98px) { #fk-list .fk-station { width: 100%; margin: 0 0 .25rem; } #fk-list form.form-inline { display: block; } }
/* S1 fix (fork A): the subtitle was a flex row, so a link inside it broke onto its own line; block flow, the stamp floated right */
.ph-sub { display: block; }
.ph-sub .ph-live { float: right; margin-left: .75rem; }
@media (max-width: 575.98px) { .ph-sub .ph-live { float: none; display: block; } }
/* the product page: the right column gets a rule above it when it drops under the form on a narrow screen */
@media (max-width: 991.98px) { #product-page .product-side { border-top: 1px solid #dee2e6; margin-top: 1rem; padding-top: .5rem; } }

/* 10H fork C: the Fuel desk, the fuel register, the dialogs */

/* the Fuel desk's morning check: the balances as stat tiles, the count's state and action on one row under them */
#fd-morning .stats { margin-bottom: .5rem; }
#fd-morning .stat { max-width: 12rem; }
#fd-morning .fd-count-row { gap: .35rem .75rem; }

/* the fuel register: columns sized by their content, the figures right-aligned */
.ft-table th, .ft-table td { white-space: nowrap; }
.ft-table td:nth-child(2), .ft-table td.ft-recipient { white-space: normal; }

/* 10J: Bulungo and the mixers light like the other stations; a tile whose materials or buckets waited past the limit pulses */
.st-dot-over, .st-tile-over .st-dot { background: #dc3545; }
.st-tile-over { border-color: #dc3545; animation: st-alarm-pulse 1.6s ease-in-out infinite; }
.st-tile-overdue { font-size: .7rem; vertical-align: middle; }
.board-st .board-dot.over { background: #dc3545; }
.board-st.over { border-color: #dc3545; animation: st-alarm-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .st-tile-over, .board-st.over { animation: none; } }

/* ================= 10K (the overnight run of 4 November 2026): slices A, B and C ================= */
/* MC-01: the materials request's place cards (and the handover chooser): figures never cut off; the whole units under the need */
.rq-places .rq-place { flex: 1 1 18rem; max-width: 26rem; min-width: 0; }
.rq-places .rq-place-items { table-layout: fixed; width: 100%; }
.rq-places .rq-place-items td:first-child { max-width: none; width: 48%; }
.rq-places .rq-place-items td.rq-share { white-space: normal; }
.rq-places .rq-place-items td.rq-share small { display: block; line-height: 1.1; }
/* the handover form: the equivalent on one line, the quantity boxes not squeezed */
#si-lines .si-equiv { white-space: nowrap; }
#si-lines .si-whole-cell { font-size: .8rem; }
@media (max-width: 575.98px) { .rq-places .rq-place { max-width: none; } }
/* FD-57 (issue detail): the item's name leads its phone block */
@media (max-width: 575.98px) { table.phone-blocks tbody td.pb-title { flex: 1 1 100%; font-weight: 600; } }
/* MC-12: Purchases by supplier: one table per item, the figures beside their headings */
.rs-table { width: auto; min-width: 60%; }
.rs-table thead th { white-space: nowrap; vertical-align: bottom; }
@media (max-width: 575.98px) { .rs-table { width: 100%; } }
/* FD-82 / FD-83: a figure never breaks inside itself, even in a phone block */
.num { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 575.98px) {
  .mbp-group.phone-blocks { table-layout: auto; }
  .mbp-group.phone-blocks tbody td.pb-title { flex: 1 1 100%; font-weight: 600; }
  .mbp-group.phone-blocks tbody td.text-right { flex: 1 1 30%; }
}
/* FD-57 / FD-62: the reconciliation matrix keeps the item name in view while scrolling sideways on a phone;
   the box scrolls at every width (a wide matrix on a tablet must not push the page sideways either) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-scroll .rc-table .rc-item, .table-scroll .rc-table thead th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
/* ---- slice B (overnight, 4 November 2026) ---- */
/* FD-57: detail tables as phone blocks; the item name leads its block, the line number is not shown */
@media (max-width: 575.98px) {
  table.phone-blocks tbody td.pb-title { flex: 1 1 100%; font-weight: 600; }
  table.phone-blocks tbody td.pb-skip { display: none; }
  table.phone-blocks tfoot { display: block; }
  table.phone-blocks tfoot tr { display: flex; justify-content: space-between; border-top: 2px solid #dee2e6; }
  table.phone-blocks tfoot th { display: block; border: 0; padding: .3rem .35rem; }
  table.phone-blocks tfoot th:empty { display: none; }
  /* the by-place table inside a request line stays a small table */
  #rq-lines .rq-by-place { display: table; width: auto; }
  #rq-lines .rq-by-place tbody { display: table-row-group; }
  #rq-lines .rq-by-place tr { display: table-row; border: 0; padding: 0; }
  #rq-lines .rq-by-place td { display: table-cell; padding: 0 .4rem 0 0; }
  #rq-lines .rq-by-place td::before { content: none; }
  #count-lines .count-entry { max-width: 100%; }
}
@media (max-width: 575.98px) { table.phone-blocks tbody td .text-right { text-align: left !important; } }
/* FD-57: the receipt's entry rows on a phone: labels above the boxes, empty computed cells hidden */
@media (max-width: 575.98px) {
  #sr-lines tbody td[data-label]:not([data-label=""])::before { display: block; font-size: .8rem; }
  #sr-lines tbody td .w-qty, #sr-lines tbody td .w-unit, #sr-lines tbody td .w-price, #sr-lines tbody td .w-lot { width: 100%; max-width: none; }
  #sr-lines tbody td.sr-equiv:empty, #sr-lines tbody td.sr-amount:empty { display: none; }
  #sr-lines tbody tr { border-top: 2px solid #dee2e6; padding: .5rem 0; }
}
/* FD-58: the Start-a-count panel: its boxes line up (the items picker has the same height as its neighbours) */
#count-add .fb .fb-box select[multiple] { height: calc(1.5em + .75rem + 2px); }
#count-add .fb { align-items: flex-end; }
/* FD-59: a sticky heading needs the page as its scroll context: on a wide screen the responsive wrapper around
   a .table-sticky table does not scroll of its own, so the headings stay in view while the page scrolls */
@media (min-width: 992px) { .table-responsive:has(> .table-sticky) { overflow: visible; } }
/* FD-64: the Today cards at one height on a wide screen (a card with a second line set the rows apart: 116 / 123 px) */
@media (min-width: 576px) { .home-cards .card { min-height: 7.75rem; height: 100%; } }
/* FD-66: the Items shelves as folding groups (open on a wide screen, the first open on a phone) */
#sl-items details.sl-group > summary { cursor: pointer; list-style: none; margin-bottom: .25rem; }
#sl-items details.sl-group > summary::-webkit-details-marker { display: none; }
#sl-items details.sl-group > summary::before { content: '▸'; display: inline-block; width: 1rem; color: #6c757d; transition: transform .15s; }
#sl-items details.sl-group[open] > summary::before { transform: rotate(90deg); }
/* MC-15: the finished batches grouped by product on the Floor */
.floor-recent-group > summary { cursor: pointer; list-style: none; padding: .2rem 0; }
.floor-recent-group > summary::-webkit-details-marker { display: none; }
.floor-recent-group > summary > strong::before { content: '▸'; display: inline-block; width: 1rem; color: #6c757d; transition: transform .15s; }
.floor-recent-group[open] > summary > strong::before { transform: rotate(90deg); }
/* FD-70: the packaging rules' groups fold like the Items shelves */
#pk-rules details.pk-group > summary { cursor: pointer; list-style: none; margin-bottom: .25rem; }
#pk-rules details.pk-group > summary::-webkit-details-marker { display: none; }
#pk-rules details.pk-group > summary::before { content: '▸'; display: inline-block; width: 1rem; color: #6c757d; transition: transform .15s; }
#pk-rules details.pk-group[open] > summary::before { transform: rotate(90deg); }
/* MC-11: the loaf-weight alerts folded behind one line */
#board-weight-warning details.wa-fold > summary { cursor: pointer; }
#board-weight-warning .wa-line { padding: .15rem 0; border-top: 1px solid rgba(0,0,0,.06); }
#board-weight-warning .wa-line:first-child { border-top: 0; }
/* ---- overnight run, slice C (MC-03/04/05/08/09, FD-72) ---- */
/* FD-72: the worker's header must not widen the page on a phone. Since 11D it is one line (touch.css, .wk-bar): the name
   shortens with an ellipsis and the two buttons keep their width */
/* MC-04: the mixer's collect band and the held buckets */
#st-collect .st-held { font-size: 0.85rem; white-space: normal; }
#st-collect .st-collect-line { display: inline-block; margin-bottom: 0.25rem; }
/* MC-05: the room's figures, one chip per meaning, wrapping on a phone */
#bk-summary .badge { margin-bottom: 0.25rem; white-space: normal; }
/* MC-03: the Office logins' departments column */
.sl-departments .sl-assign label { white-space: normal; }

/* ---- 10L (4 November 2026): slice E, the decision inbox ---- */
/* ---- 10L slice E: Needs my decision on Today ---- */
#needs-decision .nd-row .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  #needs-decision .nd-row { flex-direction: column; }
  #needs-decision .nd-row .btn { margin-top: .25rem; align-self: flex-start; }
}

/* ---- 10M (4 November 2026): slice H, the moulding form on a phone ---- */
/* 10M slice H (Astra FD-104): the moulding "Send a trolley" form never widens a phone: the trolley-type select and the
   number inputs shrink with their columns (a select keeps its content width unless told otherwise), and the long option
   text drops to the normal size on narrow screens */
.st-load .form-row > [class*="col-"] { min-width: 0; }
.st-load select.st-load-type, .st-load .st-load-trolley, .st-load .st-load-full, .st-load .st-load-partial { min-width: 0; width: 100%; max-width: 100%; }
.st-load select.st-load-type { text-overflow: ellipsis; }
@media (max-width: 575.98px) {
  .st-load select.st-load-type.form-control-lg, .st-load .st-load-trolley.form-control-lg { font-size: 1rem; padding-left: .5rem; padding-right: 1.5rem; }
}

/* ---- 10M (4 November 2026): slice I, Purchases by supplier folded ---- */
/* 10M fork I (Astra FD-96): Purchases by supplier: one folded block per item, its heading as the summary */
.rs-item { border-top: 1px solid #e3e6ea; }
.rs-item > summary.rs-item-summary { display: block; padding: .5rem 0; font-size: 1rem; color: #212529; }
.rs-item > summary.rs-item-summary .rs-item-title { font-weight: 600; color: #2f3a63; margin-right: .5rem; }
.rs-item > summary.rs-item-summary::after { color: #40538b; }
.rs-item[open] > summary.rs-item-summary { margin-bottom: .25rem; }
.rs-find-row #rs-find { max-width: 18rem; }
@media (max-width: 575.98px) { .rs-find-row #rs-find { flex: 1 1 auto; max-width: none; } }
@media print { .rs-item { display: block; } .rs-item > summary::after { content: ""; } }

/* 10N (Astra FD-104, reproduced on a window resized from a wide screen to 375): select2 fixes the trolley-type select's width in
   pixels when it is built, so the widget keeps a wide-screen width on a narrow one; the column rules it instead */
.st-load .select2-container { width: 100% !important; max-width: 100%; min-width: 0; }

/* ---- 10P slice H2 (Astra round 15) ---- */
/* FD-107: the Now tile naming several trolleys reads as a sentence, not a headline figure */
.stat .n.batch-now-loads { font-size: 1rem; line-height: 1.35; }
/* FD-101: a headline with one figure per unit (packets and pieces) fits its tile */
.board-tile .n.board-n-units { font-size: 1.15rem; line-height: 1.3; }

/* ---- 10Q slice H3 ---- */
/* the trolley's own clock on a load card and the "one trolley of the batch" note on the board */
.st-load-wait { margin-bottom: .25rem; }
.board-load-of { white-space: normal; }

/* ---- 10R slice C (the owner's overnight brief of 5 November 2026, item 6): the worker-first station screens ---- */
/* the frequent worker actions are 48 px targets, well apart; the rare ones (undo, put back, withdraw, decline) 44 px links */
.st-touch, .bk-prepare, .bk-hand-over, .st-collect, .st-remix, .st-start, .st-start-none, .st-load-tap, .st-load-send,
.st-count-save, .st-packed-send, .st-receive-save, .st-tap, .st-offcuts,
#floor.floor-worker [data-quick-start], #floor.floor-worker .floor-start-none, #floor.floor-worker .pb-actions .btn, #floor.floor-worker .floor-start-cell .btn {
  min-height: 48px; min-width: 56px; padding: .5rem .9rem; font-size: 1.1rem; line-height: 1.3;
}
.st-touch-link, .bk-undo, .bk-lost, .st-put-back, .st-cancel-ask, .bk-decline { min-height: 44px; padding: .55rem .5rem; font-size: 1rem; }
.st-touch-input, .st-ask-n { height: 48px; width: 4.5rem; font-size: 1.15rem; }
#st-lines .st-start-cell .btn + .btn, #floor.floor-worker .pb-actions .btn + .btn, #floor.floor-worker .pb-actions .btn + a.btn { margin-left: .5rem; }
#floor.floor-worker .pb-actions .btn { margin-bottom: .35rem; }
/* the queue headings read as the job's steps, the sub-text in plain words */
.st-queue-head { margin-top: 1rem; padding-top: .35rem; border-top: 1px solid #e3e6ea; }
.st-queue-head small { font-weight: 400; font-size: .8rem; display: inline-block; }
@media (max-width: 575.98px) {
  .st-queue-head small { display: block; }
  .bk-handover .h5 { font-size: 1.1rem; }
  /* a worker's phone: the day totals and the plan fold at the end; the shift strip stays short */
  #floor.floor-worker .alert { font-size: .95rem; }
  .bk-journeys li { margin-bottom: .2rem; }
}
/* the Bulungo figures and the Floor's totals fold after the work for a worker by PIN */
#bk-figures summary, #floor-worker-more summary { cursor: pointer; }
.floor-no-bucket { white-space: normal; max-width: 22rem; margin-left: auto; }
#floor.floor-worker td.pb-actions { white-space: normal !important; min-width: 11rem; }
#st-lines .st-start, #st-lines .st-start-none { min-width: 48px; padding-left: .6rem; padding-right: .6rem; }
#st-lines .st-start-cell .btn + .btn { margin-left: .35rem; }

/* 10R slice C: the worker's first line on a station screen */
.st-next-task { font-size: 1.1rem; }
.st-next-task .st-next-label { color: #6c757d; }
@media (max-width: 575.98px) { .st-next-task { font-size: 1rem; line-height: 1.35; } }
@media (max-width: 575.98px) { .bk-line-actions { order: -1; width: 100%; } .bk-line-info { width: 100%; } }
/* 10S (owner, 11 November): the Floor's bell: amber with a red count while a handover from stores waits to be received */
.floor-bell { min-height: 44px; min-width: 52px; display: inline-flex; align-items: center; justify-content: center; }
.floor-bell.btn-warning, .floor-bell.btn-warning:hover, .floor-bell.btn-warning:focus { background: #ffc107 !important; border-color: #d39e00 !important; color: #212529 !important; }
.floor-bell .floor-bell-count { background: #dc3545; color: #fff; font-size: .9rem; margin-left: .35rem; }
.floor-bell-row .floor-bell-confirm { margin-bottom: .25rem; }
@media (max-width: 575.98px) { .ph-actions .floor-bell { flex: 0 0 auto; } }
/* 10T (Astra 10S/FD-115, the small part): the moulding form's boxes are touch targets like its buttons */
.st-load .st-load-trays { height: 44px; font-size: 1.05rem; width: 5.5rem !important; }
.st-load .st-load-full, .st-load .st-load-partial { height: 48px; font-size: 1.15rem; }
.st-load .st-load-mate, .st-load .st-load-last { width: 1.25rem; height: 1.25rem; vertical-align: middle; }
.st-load label.d-block { padding: .2rem 0; }
