/*
 * Touch and tablet layer (Phase 4, owner's note of 29 September 2026: "the
 * work screens are not optimized for tabs and easy taps").
 *
 * Applies only where the primary pointer is a finger (pointer: coarse), so
 * desktop screens keep their compact layout. Targets grow to the 44 px the
 * platform guidelines ask for, inputs use 16 px text (no zoom-in on focus),
 * the floor's running-order cards fall to two per row, and hover-only cues
 * are replaced by visible ones. No markup changes; sections are recognised
 * by the body's data-section attribute set in the layout.
 */

@media (pointer: coarse) {
  body {
    font-size: 16px;
  }

  /* every button is a comfortable target; small buttons stay smaller in text only */
  .btn,
  .btn-sm,
  .btn-group-sm > .btn {
    min-height: 44px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 1rem;
  }

  .btn-link.py-0,
  .btn-link.btn-sm {
    min-height: 44px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .btn-lg {
    min-height: 56px;
    font-size: 1.15rem;
  }

  /* inputs and selects: 16 px text, tall enough to hit */
  .form-control,
  .form-control-sm,
  .custom-select,
  .select2-container .select2-selection--single {
    min-height: 44px;
    height: auto;
    font-size: 16px;
  }

  .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
  }

  .select2-container .select2-selection--single .select2-selection__arrow {
    height: 42px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 1.35rem;
    height: 1.35rem;
    vertical-align: middle;
  }

  .form-check-label,
  .custom-control-label {
    padding-top: 0.2rem;
    padding-left: 0.35rem;
  }

  label {
    margin-bottom: 0.35rem;
  }

  /* table rows tall enough to tap; row action links spaced apart */
  .table-sm td,
  .table-sm th {
    padding: 0.55rem 0.5rem;
    vertical-align: middle;
  }

  .table td > a + a,
  .table td > form + form,
  .table td > a + form,
  .table td > form + a,
  .table td > .btn + .btn {
    margin-left: 0.5rem;
  }

  /* icon-only controls (Items rows: receive, issue, count) */
  .table td a > .fal,
  .table td a > .far,
  .table td a > .fas,
  a.btn > .fal,
  a.btn > .far,
  a.btn > .fas {
    font-size: 1.35rem;
    padding: 0.35rem;
  }

  /* module and section tabs */
  nav ul li a,
  .nav-link,
  .navbar a {
    display: inline-block;
    min-height: 44px;
    padding: 0.6rem 0.9rem;
  }

  /* collapsible how-to and add forms open with a full-width tap */
  details > summary {
    min-height: 44px;
    padding: 0.6rem 0;
    cursor: pointer;
  }

  /* modal dialogs: buttons full height, footer buttons not crowded */
  .modal-footer .btn + .btn {
    margin-left: 0.75rem;
  }

  .modal-dialog {
    margin: 0.5rem auto;
  }

  /* worker log-in: names as a two-column grid of big targets */
  #floor-names {
    display: flex;
    flex-wrap: wrap;
  }

  #floor-names .floor-name {
    flex: 1 1 45%;
    min-height: 64px;
    margin-right: 0.5rem !important;
  }

  #floor-names .text-muted.small {
    flex: 0 0 100%;
  }

  #floor-pin-input {
    font-size: 1.5rem;
    letter-spacing: 0.4rem;
    text-align: center;
  }

  /* the production floor: start buttons big, running orders two per row */
  body[data-section="production-floor"] [data-quick-start] {
    min-width: 56px;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
  }

  body[data-section="production-floor"] .card-body .btn {
    margin-bottom: 0.35rem;
  }

  body[data-section="production-floor"] .alert .btn {
    margin-top: 0.35rem;
  }

  /* count sheets and requisition forms: the figure columns wide enough for thumbs */
  body[data-section="stock-counts"] td input.form-control,
  body[data-section="stock-issues"] td input.form-control,
  body[data-section="requisitions"] td input.form-control,
  body[data-section="stock-receipts"] td input.form-control {
    min-width: 6.5rem;
  }
}

/* narrow tablets and phones in portrait: two running-order cards per row, then one */
@media (pointer: coarse) and (max-width: 1100px) {
  body[data-section="production-floor"] .row > .col-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  body[data-section="production-floor"] .col-lg-8,
  body[data-section="production-floor"] .col-lg-4,
  body[data-section="fuel-maintenance"] .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (pointer: coarse) and (max-width: 700px) {
  body[data-section="production-floor"] .row > .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .form-row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/*
 * Station screens pass (UX workload review of 13 October 2026). Not limited to
 * touch screens: the menu wraps instead of widening the page, the card a worker
 * just accepted or started is marked for a moment, and an open exception panel
 * stays inside its own card.
 */
nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

nav li {
  flex: 0 0 auto;
}

/* the stylesheet squeezed the last menu entry to the width of the log-out icon; a named last entry (Packaging) overflowed the page */
nav li:last-child {
  width: auto;
}

#station .st-just {
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.45);
  transition: box-shadow 1.5s ease-in 3s;
}

#station .st-card-id {
  line-height: 1.2;
}

#station .st-details summary {
  cursor: pointer;
}

#station #st-counts .badge {
  font-size: 1rem;
}

#station .st-reason.active {
  font-weight: 700;
}

@media (pointer: coarse) {
  #station .st-find,
  #board .form-control {
    min-height: 44px;
  }

  #station .st-dept {
    min-height: 44px;
  }
}

/* production pass: a long station queue (over twelve batches) as one line per batch, the rest behind More */
.st-compact .st-row .card { border-left: 0; border-right: 0; border-top: 0; border-radius: 0; }
.st-compact .st-row .card-body { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; padding: .4rem .5rem !important; }
.st-compact .st-row .st-card-id { font-size: 1.15rem; margin: 0; }
.st-compact .st-row .h5, .st-compact .st-row .h4 { font-size: 1rem; margin: 0; }
.st-compact .st-row .st-since { margin: 0; font-size: .85rem; }
.st-compact .st-row .btn-lg { padding: .3rem .7rem; font-size: 1rem; }
.st-compact .st-row .btn-block { display: inline-block; width: auto; margin: 0; }
.st-compact .st-row .st-count-row { margin: 0; flex: 0 0 auto; width: auto; }
.st-compact .st-row .st-count-row .col-4, .st-compact .st-row .st-count-row .col-8 { flex: 0 0 auto; width: auto; max-width: none; padding: 0 .2rem; }
.st-compact .st-row .form-control-lg, .st-compact .st-row .input-group-lg > .form-control, .st-compact .st-row .input-group-lg > .input-group-append > .input-group-text { height: calc(1.5em + .6rem + 2px); font-size: 1rem; padding: .25rem .5rem; }
.st-compact .st-row .st-trolley { width: 6rem; }
.st-compact .st-row .st-count { width: 6rem; }
.st-compact .st-row .st-refused { margin: 0; }
.st-compact .st-row .st-row-extra { flex: 0 0 100%; }
.st-compact .st-row .st-secondary { display: inline-flex; }
.st-compact .st-row .st-secondary .btn { flex: 0 0 auto; }
.st-compact .st-row.st-just .card, .st-compact .st-row .card.st-just { background: #fffbe6; }

/* production pass: the handover form's buttons stay in view */
.si-actions-sticky { position: sticky; bottom: 0; background: #fff; padding: .5rem 0; border-top: 1px solid #dee2e6; z-index: 5; }
@media print { .si-actions-sticky { position: static; border: 0; } }

/* help marks: a small "?" after a header or label that carries an explanation; the sentence shows on a tap */
th, label { position: relative; }
.help-mark { display: inline-block; width: 1rem; height: 1rem; line-height: .95rem; margin-left: .25rem; padding: 0; border: 1px solid #adb5bd; border-radius: 50%; background: #fff; color: #6c757d; font-size: .7rem; font-weight: 600; text-align: center; vertical-align: text-top; cursor: pointer; }
.help-mark::before { content: '?'; }
.help-mark:hover, .help-mark:focus { border-color: #495057; color: #212529; outline: none; }
.help-pop { position: absolute; left: 0; top: 100%; z-index: 20; min-width: 14rem; max-width: 22rem; padding: .4rem .6rem; background: #212529; color: #fff; font-size: .8rem; font-weight: 400; line-height: 1.3; border-radius: .25rem; white-space: normal; text-align: left; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
@media print { .help-mark, .help-pop { display: none; } }

/* Stage losses: the per-station columns fold below 1200 px unless opened (D8-04) */
@media (max-width: 1199px) {
  .sl-stage { display: none; }
  body.sl-stages-open .sl-stage { display: table-cell; }
}
@media (min-width: 1200px) { #sl-stages-toggle { display: none; } }
@media print { .sl-stage { display: table-cell; } }

/* stores layout pass (9D): one filter bar and one set of box widths for every stores page.
   A box is sized by what it holds, not by the column it sits in; every box has its label. */
.fb { display: flex; flex-wrap: wrap; align-items: flex-end; margin: 0 -.375rem 1rem; }
.fb .fb-box { display: flex; flex-direction: column; padding: 0 .375rem; margin-bottom: .5rem; }
.fb .fb-box > label { font-size: .8rem; color: #6c757d; margin-bottom: .15rem; white-space: nowrap; }
.fb .fb-box > .form-control, .fb .fb-box > .select2 { width: 100%; }
.fb-w-company, .fb-w-store, .fb-w-supplier, .fb-w-department { width: 13rem; }
.fb-w-item { width: 15rem; }
.fb-w-status, .fb-w-kind { width: 9rem; }
.fb-w-date { width: 10rem; }
.fb-w-text { width: 14rem; }
.fb-w-search { width: 18rem; }
.fb-w-period { width: 15rem; }
.fb-w-auto { width: auto; }
.fb .fb-box > .select2 .select2-selection--single { height: calc(1.5em + .75rem + 2px); }
.fb .fb-box > .select2 .select2-selection--multiple { min-height: calc(1.5em + .75rem + 2px); }
.fb .fb-box > .select2 .select2-selection--multiple .select2-selection__rendered { line-height: 1.5; }
.fb .fb-actions { display: flex; align-items: center; padding: 0 .375rem; margin-bottom: .5rem; }
.fb .fb-actions .btn + .btn { margin-left: .25rem; }
@media (max-width: 575px) { .fb .fb-box, .fb .fb-actions { width: 100%; } }

/* document line boxes: a quantity, a price, a lot or a reference are the same size on every form */
.form-control.w-qty, .input-group.w-qty { width: 7rem; max-width: 100%; }
.form-control.w-price { width: 8.5rem; max-width: 100%; }
.form-control.w-unit, .custom-select.w-unit { width: 11rem; max-width: 100%; }
.form-control.w-lot { width: 8rem; max-width: 100%; }
.form-control.w-ref { width: 12rem; max-width: 100%; }
.form-control.w-item { min-width: 14rem; }

.fb .fb-kinds { flex-direction: row; flex-wrap: wrap; align-items: center; align-self: flex-end; }
.fb .fb-kinds .btn { margin-right: .25rem; margin-bottom: .25rem; }

/* 9D.1: tally tables of the recipe deviations report share a half-width column; the name wraps, the figures stay tight */
.rd-tally { table-layout: fixed; font-size: .875rem; }
.rd-tally th:first-child { width: 30%; }
.rd-tally th { white-space: nowrap; overflow-wrap: normal; font-size: .8125rem; }
.rd-tally th, .rd-tally td { overflow-wrap: anywhere; padding-left: .25rem; padding-right: .25rem; }


/* 9F (Astra UX-01): the mixer plan table on a phone - the start buttons wrap under the product instead of running off the right */
#st-lines .st-start-cell { white-space: nowrap; }
/* 10M: the hint under the start buttons wraps (the 10M wording is longer); the buttons stay on one line */
#st-lines .st-start-cell .st-no-bucket { white-space: normal; max-width: 24rem; }
@media (max-width: 575px) { #st-lines .st-start-cell { white-space: normal; } #st-lines .st-start-cell .btn { margin: 0 .25rem .25rem 0; } #st-lines td.h5 { font-size: 1.1rem; } }
/* 9P (management, 19 October): the over-limit band pulses so a station cannot miss it; a card's badge stays steady */
@keyframes st-alarm-pulse { 0%, 100% { background-color: #f8d7da; } 50% { background-color: #f1aeb5; } }
.st-alarm, .floor-alarm { animation: st-alarm-pulse 1.6s ease-in-out infinite; border-color: #dc3545; font-size: 1.05rem; }
@media (prefers-reduced-motion: reduce) { .st-alarm, .floor-alarm { animation: none; } }
.st-wait { font-weight: 500; }
/* 9P (Astra UXR-01): on a phone each plan line is a block, the start buttons under the product and its facts */
@media (max-width: 575px) {
  #st-lines thead { display: none; }
  #st-lines, #st-lines tbody { display: block; width: 100%; }
  #st-lines tr { display: block; border-top: 1px solid #dee2e6; padding: .25rem 0; }
  #st-lines td { display: block; width: 100%; border: 0; padding: .15rem .5rem; }
  #st-lines td.d-none { display: none; }
  #st-lines td.st-start-cell { padding-bottom: .5rem; }
}

/* 9F (Astra UX-08): Materials used by product - every product's table shares one set of column widths, so the figures line up down the page */
.mbp-group { table-layout: fixed; }
.mbp-group td, .mbp-group th { overflow-wrap: anywhere; }
.mbp-group .mbp-c-used { width: 11rem; }
.mbp-group .mbp-c-batches { width: 6rem; }
.mbp-group .mbp-c-per { width: 12rem; }
@media (max-width: 575px) { .mbp-group .mbp-c-used { width: 7rem; } .mbp-group .mbp-c-batches { width: 4.5rem; } .mbp-group .mbp-c-per { width: 7rem; } }

/* 9G: word actions in a scrolling table keep the small size of the words beside them (the 1.25rem rule of the bundle is for the old icon-only grids) */
.table-responsive table a[data-action].btn-sm { font-size: .875rem; }

/* 9H: the request page's "Who still needs what" cards, and the per-place table inside a line */
/* 10D (the owner's pilot, 29 October): the place cards stand in one row of equal height, the item names on one line
   each, and every Hand over button sits on the same bottom line whatever the card holds */
.rq-places { display: flex; flex-wrap: wrap; gap: .75rem; align-items: stretch; }
.rq-places .rq-place { flex: 1 1 16rem; max-width: 22rem; margin: 0; display: flex; }
.rq-places .rq-place > .card-body { display: flex; flex-direction: column; width: 100%; }
.rq-places .rq-place-items { flex: 1 1 auto; }
.rq-places .rq-place-items td:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11rem; }
.rq-places .rq-place-go, .rq-places .rq-place-more { margin-top: auto; align-self: flex-start; }
.rq-places .rq-place-nothing { flex: 1 1 auto; }
.rq-places .rq-place-open { background: #fff8e1; }
.rq-places .rq-place-done { background: #f3f8ef; border-color: #b7dca3; }
.rq-places .rq-place-items td { padding-top: 0; padding-bottom: 0; }
#rq-lines .rq-by-place { width: auto; min-width: 14rem; }
#rq-lines .rq-by-place td { padding-left: .25rem; padding-right: .25rem; }

/* 9H: the document forms' header is the same labelled bar as the filters, with two more widths */
.fb-w-destination { width: 14rem; }
.fb-w-wide { width: 26rem; }
.fb.doc-head { align-items: flex-start; }
.fb.doc-head .fb-box > label { white-space: normal; }
@media (max-width: 575px) { .fb-w-destination, .fb-w-wide { width: 100%; } }
.fb .fb-box > .form-text:empty { display: none; }
.fb .fb-box > .form-text { font-size: .8rem; }
/* 9H: the three documents' line tables keep their column widths (the boxes used to push the Item column narrow) */
#sr-lines, #si-lines { table-layout: fixed; }
#sr-lines th, #si-lines th { overflow-wrap: normal; }

/* 9K: Production today (the Day board's figures in one picture; batches lead the bars) */
.board-tiles { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.board-tile { flex: 1 1 10rem; min-width: 9rem; border: 1px solid #dee2e6; border-radius: 6px; padding: .5rem .75rem; color: inherit; text-decoration: none; background: #fff; }
.board-tile:hover { text-decoration: none; color: inherit; border-color: #adb5bd; }
.board-tile .n { font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.board-tile .n small { font-size: .8rem; color: #6c757d; font-weight: 400; }
.board-tile .l { font-size: .75rem; color: #6c757d; }
.board-tile.warn { border-color: #ffc51a; background: #fff8e1; }
.board-tile.bad { border-color: #f45b69; background: #fff0f1; }
/* 11E (the owner's dashboard request of 15 November; mock-up 5): what needs attention first, one card per department,
   what happened in time order. Red means act, amber means look; nothing else on the page uses them */
.board-h { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: #6c757d; font-weight: 600; margin: .2rem 0 .35rem; }
.board-h-n { display: inline-block; min-width: 1.3rem; text-align: center; background: #40538b; color: #fff; border-radius: .65rem; padding: 0 .35rem; letter-spacing: 0; }
.board-attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.board-a { background: #fff; border: 1px solid #dee2e6; border-left: 5px solid #adb5bd; border-radius: 5px; padding: .4rem .65rem; font-size: .9rem; min-width: 0; }
.board-a.bad { border-left-color: #d9534f; } .board-a.warn { border-left-color: #f0ad4e; }
.board-a strong { display: block; font-size: .95rem; }
.board-a .board-a-go { float: right; margin-left: .5rem; font-size: .8rem; text-decoration: underline; padding: .1rem 0 .3rem .3rem; }
.board-a .board-a-t { color: #4d5568; overflow-wrap: anywhere; }
.board-a .board-a-l { margin: .1rem 0 0; padding-left: 1rem; color: #4d5568; }
.board-a .board-a-l a { text-decoration: underline; }
.board-depts { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.board-d { display: block; background: #fff; border: 1px solid #dee2e6; border-radius: 5px; padding: .45rem .65rem; color: inherit; text-decoration: none; min-width: 0; }
a.board-d:hover { text-decoration: none; color: inherit; border-color: #adb5bd; }
.board-d-t { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; }
.board-d-t strong { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-pill { flex: 0 0 auto; border-radius: .7rem; padding: 0 .5rem; font-size: .75rem; font-weight: 700; white-space: nowrap; background: #e9ecef; color: #495057; }
.board-pill.ok { background: #dff3e3; color: #1d6b33; } .board-pill.bad { background: #fbe1e0; color: #a12622; } .board-pill.warn { background: #fff0cf; color: #7a5600; }
.board-d-n { font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.board-d-n small { font-size: .8rem; font-weight: 400; color: #5a6275; }
.board-d-bar { position: relative; display: flex; height: .7rem; background: #e9ecef; border-radius: .35rem; overflow: hidden; margin: .25rem 0; }
.board-d-bar i { display: block; height: 100%; } .board-d-bar i.fin { background: #5cb85c; } .board-d-bar i.run { background: #5bc0de; }
.board-d-f { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 .6rem; font-size: .78rem; color: #5a6275; }
.board-feed { list-style: none; margin: 0 0 .2rem; padding: 0; }
.board-ev { display: grid; grid-template-columns: 2.7rem .7rem minmax(0, 1fr); gap: .35rem; padding: .25rem 0; border-bottom: 1px solid #f0f1f4; font-size: .88rem; align-items: start; }
.board-ev time { color: #6c757d; }
.board-ev-dot { width: .6rem; height: .6rem; border-radius: 50%; margin-top: .35rem; background: #adb5bd; }
.board-ev.bad .board-ev-dot { background: #d9534f; } .board-ev.warn .board-ev-dot { background: #f0ad4e; }
.board-ev strong { font-weight: 600; }
.board-ev .board-ev-open { text-decoration: underline; white-space: nowrap; }
.board-ev-filters .badge { margin: 0 .2rem .2rem 0; cursor: pointer; font-size: .78rem; padding: .3rem .5rem; }
#board-earlier summary, details.board-fold > summary { cursor: pointer; }
details.board-fold > summary.h5 { display: list-item; }
@media (max-width: 575.98px) {
  .board-attn, .board-depts { grid-template-columns: minmax(0, 1fr); }
  .board-ev-filters .badge { padding: .55rem .6rem; }
  .board-a .board-a-go { padding: .35rem 0 .5rem .5rem; }
}
.board-flow { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin-bottom: .5rem; }
.board-st { flex: 1 1 9rem; min-width: 8.5rem; position: relative; border: 1px solid #dee2e6; border-radius: 6px; padding: .5rem .65rem; background: #fafbfd; color: inherit; text-decoration: none; }
.board-st:hover { text-decoration: none; color: inherit; border-color: #adb5bd; }
.board-st + .board-st::before { content: "\2192"; position: absolute; left: -1.15rem; top: 38%; color: #adb5bd; font-size: 1rem; }
.board-st .t { font-weight: 600; font-size: .875rem; }
.board-st .big { font-size: 1.4rem; font-weight: 600; line-height: 1.1; }
.board-st .big small { font-size: .75rem; color: #6c757d; font-weight: 400; }
.board-st .m { font-size: .75rem; color: #6c757d; }
.board-st.stall { border-color: #f45b69; }
.board-st.done { background: #eef8e8; border-color: #b7dca3; }
.board-st.room { background: #eef3fb; border-color: #c3d2ee; }
#board-plan .board-dept-row td { background: #f4f6fa; }
#board-plan .board-chip { font-weight: 400; margin-left: .35rem; }
#board-plan .board-bar-col { width: 34%; min-width: 14rem; }
.board-bar { display: flex; height: 1rem; border-radius: 3px; overflow: hidden; background: #e9ecef; width: 100%; }
.board-bar .seg { display: block; height: 100%; min-width: 2px; border-right: 1px solid #fff; }
.board-bar .seg:last-child { border-right: 0; }
.seg.fin, .sw.fin { background: #76b041; } .seg.dep, .sw.dep { background: #2e8b57; } .seg.rop, .sw.rop { background: repeating-linear-gradient(45deg, #76b041, #76b041 4px, #cfe8b9 4px, #cfe8b9 8px); } .seg.ovn, .sw.ovn { background: #e67e22; } .seg.boi, .sw.boi { background: #f1c40f; }
.seg.mou, .sw.mou { background: #5dade2; } .seg.mix, .sw.mix { background: #40538b; } .seg.run, .sw.run { background: #adb5bd; } .sw.none { background: #e9ecef; border: 1px solid #dee2e6; }
.board-legend .sw { display: inline-block; width: .65rem; height: .65rem; margin: 0 .3rem 0 .9rem; border-radius: 2px; vertical-align: middle; }
@media (max-width: 575.98px) {
  .board-flow { flex-direction: column; gap: .5rem; }
  .board-st + .board-st::before { content: "\2193"; left: 50%; top: -1.05rem; }
  .board-tile { flex-basis: 45%; }
}

/* 9L: the menu - one bar, the module's pages in a side list, the home screen, a bottom bar on a phone */
.app-shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; margin: 0 0 1rem; text-align: center; }
.app-shell > .topbar { grid-column: 1 / -1; }
.app-shell > .app-content { grid-column: 1 / -1; padding-top: .75rem; min-width: 0; }
.app-shell > nav.side { grid-column: 1 / -1; }
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0 .75rem; background: #40538b; color: #fff; padding: 0 .75rem; min-height: 2.9rem; }
.topbar .brand { color: #fff; font-weight: 600; font-size: 1.05rem; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.topbar .brand img { border-radius: 4px; background: #fff; }
.topbar .brand .grid-icon { font-size: 1.1rem; opacity: .85; }
.topbar .signout-sm a[data-action], .topbar .signout-sm a[data-action] span { color: #e7ebf5; font-size: .9rem; }
.topbar .side-toggle { display: none; background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 4px; padding: .15rem .5rem; font-size: .9rem; }
.topbar nav#modules { margin: 0 !important; flex: 1 1 auto; }
.topbar nav#modules > ul { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: stretch; }
.topbar nav#modules > ul > li { margin: 0; font-size: 1rem; display: flex; align-items: center; }
.topbar nav#modules > ul > li > a { color: #e7ebf5; display: inline-block; padding: .65rem .75rem; min-height: 0; text-decoration: none; border-bottom: 3px solid transparent; }
.topbar nav#modules > ul > li.current > a { color: #fff; font-weight: 700; border-bottom-color: #ffc51a; }
.topbar nav#modules > ul > li > a:hover { color: #fff; text-decoration: none; }
.topbar nav#modules > ul > li.who { margin-left: auto; }
.topbar nav#modules > ul > li.who .text-muted { color: #c9d1e8 !important; }
.topbar nav#modules > ul > li:last-child { width: auto; }
.topbar nav#modules > ul > li:last-child a[data-action] { color: #e7ebf5; font-size: .95rem; }
.topbar nav#modules > ul > li:last-child a[data-action] span { color: #e7ebf5; }
nav.side { text-align: left; background: #f6f7fb; border-bottom: 1px solid #e3e6ee; padding: .35rem .75rem; }
nav.side .side-group { display: inline-block; vertical-align: top; margin: .2rem 1.25rem .2rem 0; }
nav.side .side-title { font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: #6c757d; margin-bottom: .1rem; }
nav.side ul { display: flex; flex-wrap: wrap; justify-content: flex-start; }
nav.side li { font-size: .95rem; margin: 0 .35rem 0 0; white-space: normal; }
nav.side li a { display: inline-block; padding: .25rem .5rem; min-height: 0; border-radius: 4px; color: #2f3a63; text-decoration: none; }
nav.side li.current a { background: #e6ebf7; font-weight: 700; border-left: 3px solid #40538b; }
nav.side li a .badge { font-size: .7rem; vertical-align: middle; }
nav.side li:last-child { width: auto; }
.crumb { text-align: left; padding: 0 1rem .25rem; }
/* 11D (the owner, 14 November): the bar's button opens the Menu as a drawer: on a phone everywhere, on a tablet on the
   work screens. The modules and the way out are in the list only where the bar does not show them (a phone) */
nav.side .side-extra { display: none; }
nav.side.side-empty { display: none; }
.topbar .topbar-page { display: none; }
.topbar .side-toggle .st-label-phone { display: none; }
.app-content > .container, .app-content > .container-fluid { text-align: left; }
@media (min-width: 1200px) {
  .app-shell.with-side { grid-template-columns: 13.5rem minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: .5rem; }
  .app-shell.with-side > nav.side { grid-column: 1; grid-row: 2; align-self: start; position: sticky; top: 0; max-height: 100vh; overflow: auto; border-bottom: 0; border-right: 1px solid #e3e6ee; padding: .75rem .5rem .75rem .75rem; min-height: 60vh; }
  .app-shell.with-side > .app-content { grid-column: 2; grid-row: 2; }
  .app-shell.with-side > nav.side .side-group { display: block; margin: 0 0 1rem; }
  .app-shell.with-side > nav.side ul { display: block; }
  .app-shell.with-side > nav.side li { display: block; margin: 0; }
  .app-shell.with-side > nav.side li a { display: block; padding: .35rem .5rem; }
  .app-shell.with-side > nav.side li a .badge { float: right; margin-top: .2rem; }
}
@media (max-width: 767.98px) {
  /* one bar: the Menu and the page's name. No brand, no bottom bar, no "Module > Page" line */
  .topbar { flex-wrap: nowrap; padding: 0 .5rem; }
  .topbar .brand { display: none; }
  .topbar .side-toggle { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .2rem .7rem; font-size: 1rem; flex: 0 0 auto; }
  .topbar .side-toggle .st-label-phone { display: inline; }
  .topbar .side-toggle .st-label-wide { display: none; }
  .topbar .topbar-page { display: block; flex: 1 1 auto; min-width: 0; text-align: left; color: #fff; font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar nav#modules { display: none; }
  .crumb { display: none; }
  nav.side .side-extra { display: block; margin: 0 0 1rem; }
  nav.side .side-modules ul { display: flex; flex-wrap: wrap; gap: .35rem; }
  nav.side .side-modules li { display: block; margin: 0; }
  nav.side .side-modules li a { display: block; padding: .5rem .7rem; border: 1px solid #cfd6e6; border-radius: 4px; background: #fff; border-left-width: 1px; }
  nav.side .side-modules li.current a { background: #40538b; color: #fff; border-color: #40538b; font-weight: 700; }
  nav.side .side-account { border-top: 1px solid #e3e6ee; padding-top: .6rem; margin-bottom: 0; }
  nav.side .side-account a[data-action] { display: block; padding: .6rem .5rem; min-height: 44px; }
  nav.side { display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 16rem; max-width: 85vw; z-index: 1040; overflow: auto; box-shadow: 2px 0 12px rgba(0,0,0,.25); border-right: 1px solid #dee2e6; padding: .75rem; }
  nav.side.open { display: block; }
  nav.side .side-group { display: block; margin: 0 0 1rem; }
  nav.side ul { display: block; }
  nav.side li { display: block; margin: 0; }
  nav.side li a { display: block; padding: .6rem .5rem; }
}
/* a tablet, on the work screens only: the module's pages fold behind the bar's button, which names the module */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .app-shell.menu-fold .topbar .side-toggle { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .2rem .7rem; font-size: 1rem; }
  .app-shell.menu-fold > nav.side { display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 17rem; max-width: 85vw; z-index: 1040; overflow: auto; box-shadow: 2px 0 12px rgba(0,0,0,.25); border-right: 1px solid #dee2e6; padding: .75rem; }
  .app-shell.menu-fold > nav.side.open { display: block; }
  .app-shell.menu-fold > nav.side .side-group { display: block; margin: 0 0 1rem; }
  .app-shell.menu-fold > nav.side ul { display: block; }
  .app-shell.menu-fold > nav.side li { display: block; margin: 0; }
  .app-shell.menu-fold > nav.side li a { display: block; padding: .6rem .5rem; }
}
/* 11D: a worker by PIN: one line at the top (the Menu, the name, Switch worker); the pages drop down from the Menu */
.wk-bar { display: flex; align-items: center; gap: .5rem; background: #40538b; color: #fff; padding: 0 .5rem; min-height: 48px; margin-bottom: .6rem; text-align: left; }
.wk-bar .wk-menu-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 4px; padding: .2rem .7rem; font-size: 1rem; }
.wk-bar .wk-who { flex: 1 1 auto; min-width: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e7ebf5; }
.wk-bar .wk-switch { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; padding: .2rem .6rem; border: 1px solid rgba(255,255,255,.5); border-radius: 4px; color: #fff; text-decoration: none; white-space: nowrap; }
.wk-bar .wk-switch span, .wk-bar .wk-switch i { color: #fff; }
nav.wk-menu { text-align: left; background: #f6f7fb; border-bottom: 1px solid #e3e6ee; margin: -.6rem 0 .6rem; padding: .25rem .5rem; }
nav.wk-menu[hidden] { display: none; }
nav.wk-menu ul { display: block; margin: 0; padding: 0; list-style: none; }
nav.wk-menu li { display: block; margin: 0; width: auto; }
nav.wk-menu li a { display: block; padding: .7rem .6rem; min-height: 48px; font-size: 1.05rem; color: #2f3a63; text-decoration: none; border-radius: 4px; }
nav.wk-menu li.current a { background: #e6ebf7; font-weight: 700; border-left: 3px solid #40538b; }
/* the home screen: one tile per module with what waits inside it */
.home-tiles { display: flex; flex-wrap: wrap; gap: .75rem; }
.home-tile { flex: 1 1 15rem; max-width: 20rem; border: 1px solid #dee2e6; border-radius: 8px; padding: .9rem 1rem; color: inherit; text-decoration: none; text-align: left; background: #fff; }
.home-tile:hover { text-decoration: none; color: inherit; border-color: #40538b; }
.home-tile .ht-letter { display: inline-flex; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; background: #40538b; color: #fff; border-radius: 8px; font-weight: 700; font-size: 1.1rem; margin-bottom: .5rem; }
.home-tile .ht-title { font-weight: 700; font-size: 1.1rem; }
.home-tile .ht-lead { font-size: .8rem; color: #6c757d; min-height: 2.2rem; }
.home-tile .ht-wait { font-size: .875rem; margin-top: .4rem; }
.home-tile .ht-wait strong { color: #c0392b; }

/* 9N (Astra FD-24): on a phone a wide table scrolls inside its own box; the page itself stays the width of the
   screen, so the headings, the filters and the buttons around the table never leave it. Small tables (w-auto) keep
   their layout. */
@media (max-width: 575px) {
  main table.table:not(.w-auto) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  main .table-responsive > table.table { display: table; }
  /* three fixed columns (Today's cards, signature lines) stack: a third of a phone is too narrow to read */
  main .row > .col-4 { flex: 0 0 100%; max-width: 100%; }
  /* a card header of name, badges and a button wraps instead of pushing the button off the screen */
  main .card-header.d-flex { flex-wrap: wrap; row-gap: .25rem; }
}

/* 9R (management, 19 October: staff requests): on a phone a request line is a block - the item, then the quantity and the unit side by side, the note under them */
@media (max-width: 575px) {
  #store-request-new .table-responsive { overflow: visible; }
  #store-request-new #sq-lines thead { display: none; }
  #store-request-new #sq-lines, #store-request-new #sq-lines tbody { display: block; width: 100%; }
  #store-request-new #sq-lines tr.sq-line { display: flex; flex-wrap: wrap; border-top: 1px solid #dee2e6; padding: .35rem 0; }
  #store-request-new #sq-lines tr.sq-line td { display: block; border: 0; padding: .15rem .35rem; }
  #store-request-new #sq-lines tr.sq-line td:nth-child(1) { flex: 1 1 80%; order: 1; }
  #store-request-new #sq-lines tr.sq-line td:nth-child(5) { flex: 0 0 15%; text-align: right; order: 2; }
  #store-request-new #sq-lines tr.sq-line td:nth-child(2) { flex: 1 1 40%; order: 3; }
  #store-request-new #sq-lines tr.sq-line td:nth-child(3) { flex: 1 1 55%; order: 4; }
  #store-request-new #sq-lines tr.sq-line td:nth-child(4) { flex: 1 1 100%; order: 5; }
  #store-request-new #sq-lines tr.sq-line .sq-qty::placeholder { color: #999; }
}

/* 9X (Astra FD-34): the request page's lines as blocks on a phone, each figure labelled, as the New request form already does */
@media (max-width: 575.98px) {
  #store-request .table-responsive { overflow: visible; }
  #store-request #sq-lines thead { display: none; }
  #store-request #sq-lines, #store-request #sq-lines tbody { display: block; width: 100%; }
  #store-request #sq-lines tbody tr { display: flex; flex-wrap: wrap; border-top: 1px solid #dee2e6; padding: .35rem 0; }
  #store-request #sq-lines tbody td { display: block; border: 0; padding: .1rem .35rem; text-align: left !important; white-space: normal !important; }
  #store-request #sq-lines tbody td:first-child { flex: 0 0 2rem; color: #6c757d; }
  #store-request #sq-lines tbody td.sq-title { flex: 1 1 calc(100% - 2.5rem); font-weight: 600; }
  #store-request #sq-lines tbody td[data-label] { flex: 1 1 48%; }
  #store-request #sq-lines tbody td[data-label]::before { content: attr(data-label) ": "; color: #6c757d; }
  #store-request #sq-lines tbody td.sq-approved .form-control { display: inline-block; width: 7rem; }
  #store-request #sq-lines tbody td.sq-note { flex: 1 1 100%; }
  #store-request #sq-lines tbody td.sq-note:empty { display: none; }
}

/* 9X: the live pages' "updated hh:mm" stamp (see layout.njk) */
.live-stamp { position: fixed; right: .5rem; bottom: .25rem; font-size: .72rem; color: #8a8f94; pointer-events: none; z-index: 1030; }
@media (max-width: 767.98px) { .live-stamp { bottom: 3.9rem; } }

/* 9Z (Astra FD-41, FD-46): a table marked phone-blocks reads as one block per row on a phone, each cell labelled
   with its column heading (the layout's script copies the headings into data-label); the filter bar's boxes
   never grow past the screen */
@media (max-width: 575.98px) {
  .table-responsive.phone-blocks-wrap { overflow: visible; }
  table.phone-blocks thead { display: none; }
  table.phone-blocks, table.phone-blocks tbody { display: block; width: 100%; }
  table.phone-blocks tbody tr { display: flex; flex-wrap: wrap; border-top: 1px solid #dee2e6; padding: .35rem 0; }
  table.phone-blocks tbody tr.d-none { display: none; }
  table.phone-blocks tbody td { display: block; border: 0; padding: .1rem .35rem; text-align: left !important; white-space: normal !important; flex: 1 1 48%; min-width: 0; }
  table.phone-blocks tbody td[colspan] { flex: 1 1 100%; }
  table.phone-blocks tbody td[data-label]:not([data-label=""])::before { content: attr(data-label) ": "; color: #6c757d; }
  table.phone-blocks tbody td.pb-wide { flex: 1 1 100%; }
  table.phone-blocks tbody td .input-group { width: 100%; max-width: 14rem; display: inline-flex; }
  table.phone-blocks tbody td .input-group .form-control { min-width: 5rem; }
  .fb .fb-box { min-width: 0; }
  .fb .fb-box > select.form-control, .fb .fb-box > input.form-control { max-width: 100%; }
}

/* 10D (the owner's pilot, 29 October): the station list's tiles carry their state as a colour: green working, amber a
   batch on its way, grey idle; the dot alone in the legend */
.st-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: #adb5bd; flex: 0 0 auto; }
.st-dot-busy, .st-tile-busy .st-dot { background: #28a745; }
.st-dot-arriving, .st-tile-arriving .st-dot { background: #ffc107; }
.st-dot-idle, .st-tile-idle .st-dot { background: #adb5bd; }
.st-tile-btn { border: 1px solid #ced4da; background: #fff; color: #212529; }
.st-tile-btn small { color: #6c757d; }
.st-tile-busy { border-color: #28a745; background: #f1faf3; }
.st-tile-arriving { border-color: #ffc107; background: #fff9e6; }
.st-tile-btn:hover { background: #e9ecef; color: #212529; }

/* 10E (the owner's pilot, item 4; Astra's reaction): the Worker log-in as a grouped board. The terminal's own
   department first, then the shared workers, then the rest; one tile size; a department keeps its colour. */
body.basic .fl-top { background: #2f3f6b; color: #fff; padding: .8rem 1.4rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.fl-top .fl-title { font-size: 1.35rem; font-weight: 600; }
.fl-top .fl-sub { font-size: .9rem; opacity: .9; }
.fl-top a { color: #fff; text-decoration: underline; }
.fl-wrap { max-width: 1180px; margin: 1.2rem auto; padding: 0 1rem; }
.fl-find { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.fl-find label { margin: 0; font-size: 1.05rem; color: #334; white-space: nowrap; }
.fl-find input { flex: 1; font-size: 1.2rem; }
.fl-group { background: #fff; border: 1px solid #e1e5ee; border-radius: .7rem; margin-bottom: .9rem; overflow: hidden; }
.fl-group-title { margin: 0; padding: .5rem .9rem; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: #334; background: #eef1f7; border-left: .6rem solid var(--c); }
.fl-group-title small { text-transform: none; letter-spacing: 0; color: #667; font-weight: 400; font-size: .85rem; }
.fl-own .fl-group-title { background: #e4e9f5; }
.fl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .6rem; padding: .7rem; }
/* FD-55 (Astra, round 9): one tile height on the whole board, enough for a name on two lines */
.fl-tile { border: 2px solid #cfd6e4; border-left: .5rem solid var(--c); border-radius: .6rem; padding: .6rem .8rem; font-size: 1.25rem; font-weight: 600; background: #fff; height: 6.4rem; text-align: left; color: #222; display: flex; flex-direction: column; justify-content: center; overflow: hidden; line-height: 1.2; }
.fl-tile small { font-size: .8rem; font-weight: 400; color: #667; margin-top: .1rem; }
.fl-tile:hover, .fl-tile:focus { background: #f1f4fa; color: #222; }
.fl-pin { max-width: 32rem; margin: 2rem auto; font-size: 1.1rem; }
@media (max-width: 575px) { .fl-tiles { grid-template-columns: repeat(2, 1fr); } .fl-tile { font-size: 1.05rem; height: 5.6rem; } }

/* 10E (item 15): the office log-in as one card on a two-tone page; the floor workers' door a button of its own */
.fl-top, .fl-wrap { text-align: left; }
body.basic main.my-3:has(.lg-page) { margin: 0 !important; }
.lg-page { min-height: calc(100vh - 2rem); background: linear-gradient(170deg, #2f3f6b 0, #2f3f6b 38%, #f4f6f9 38%); padding: 4rem 1rem 2rem; }
.lg-card { width: 100%; max-width: 26rem; margin: 0 auto; background: #fff; border-radius: 1rem; box-shadow: 0 12px 40px rgba(20, 30, 60, .18); padding: 2rem 2.2rem; text-align: center; }
.lg-brand { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #667; }
.lg-title { font-size: 1.7rem; margin: .2rem 0 1.2rem; }
.lg-card label { font-size: .9rem; color: #445; margin-bottom: .2rem; }
.lg-or { display: flex; align-items: center; gap: .6rem; color: #778; font-size: .85rem; margin: 1.4rem 0 .8rem; }
.lg-or:before, .lg-or:after { content: ""; flex: 1; height: 1px; background: #dde3ee; }
.lg-floor { font-size: 1.15rem; }
@media (max-width: 575px) { .lg-page { padding-top: 2rem; } .lg-card { padding: 1.4rem 1.2rem; } }

/* 10E (item 14): Production today's tiles open their batches; a dot per tile; the open tile joins its panel */
.board-st .board-dot { position: absolute; right: .55rem; top: .55rem; width: .7rem; height: .7rem; border-radius: 50%; background: #adb5bd; }
.board-st .board-dot.busy { background: #28a745; }
.board-st .board-dot.arriving { background: #ffc107; }
.board-opener { cursor: pointer; }
.board-opener:focus { outline: 2px solid #2f3f6b; outline-offset: 1px; }
.board-opener.open { border: 2px solid #2f3f6b; background: #fff; }
.board-detail { border: 2px solid #2f3f6b; border-radius: 6px; padding: .6rem .8rem; margin-top: .5rem; background: #fff; }
.board-detail-table td, .board-detail-table th { padding: .25rem .5rem; font-size: .9rem; }

/* 10U: where other devices find this copy, under the login card (shown only on the computer the app runs on) */
.lg-lan { width: 100%; max-width: 26rem; margin: 0 auto; text-align: center; line-height: 1.45; }
.lg-lan code { font-size: 1rem; color: #2f3f6b; background: #fff; border-radius: .3rem; padding: .1rem .35rem; user-select: all; }
.lg-lan-url { margin-top: .25rem; }

/* 10X: a station's refusal stays on the screen where the worker is (pinned to the top of the viewport) */
#st-error.st-error-pinned { position: sticky; top: 0; z-index: 1030; box-shadow: 0 4px 14px rgba(120, 20, 20, .25); cursor: pointer; }
#st-error.st-error-pinned::after { content: " (tap to put away)"; font-size: .8rem; opacity: .7; }
.st-load-sum { font-size: .95rem; }

/* 10Y (the owner, 13 November; mock-up 2): the trolley being loaded at moulding. The trolley is the form: a total that
   stays in view, one row per batch on the table with a stepper, the partial tray, what each batch keeps, one Send. */
.tl-panel { border: 2px solid #3d4f8f; border-radius: 8px; padding: 14px; background: #fff; max-width: 60rem; }
.tl-total { font-size: 1rem; line-height: 1.15; margin-bottom: .25rem; }
.tl-total-n { font-size: 2rem; font-weight: 700; }
.tl-total small { font-size: 1rem; color: #6c757d; }
.tl-total.text-danger small { color: inherit; }
.tl-size .btn { min-height: 44px; min-width: 6.5rem; }
.tl-trolley { width: 9rem; min-height: 44px; }
.tl-bar { height: 14px; background: #e9ecef; border-radius: 7px; overflow: hidden; margin: 8px 0 4px; display: flex; }
.tl-bar span { display: block; height: 100%; }
.tl-bar-0 { background: #3d4f8f; } .tl-bar-1 { background: #8fa0d8; } .tl-bar-2 { background: #c3cbea; }
.tl-bag { display: grid; grid-template-columns: 1fr auto 11.5rem; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #e3e6ec; }
.tl-bag-text strong { font-size: 1.05rem; }
.tl-bag-text small { display: block; color: #6c757d; }

.tl-step { display: flex; align-items: center; }
.tl-step .btn { width: 48px; height: 48px; font-size: 1.4rem; line-height: 1; padding: 0; }
.tl-step input { width: 4.2rem; height: 48px; text-align: center; font-size: 1.4rem; font-weight: 700; border: 0; padding: 0 2px; -moz-appearance: textfield; }
.tl-step input::-webkit-outer-spin-button, .tl-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tl-chip { min-height: 44px; }
.tl-chip-off { visibility: hidden; }
.tl-after { background: #f4f6fa; border-radius: 6px; padding: 8px 12px; margin: 8px 0 10px; }
.tl-after label { min-height: 32px; padding-top: 4px; }
.tl-after input[type=checkbox] { width: 1.15rem; height: 1.15rem; vertical-align: -3px; margin-right: 4px; }
.tl-send { min-height: 56px; white-space: normal; }
.tl-summary { font-weight: 600; margin-bottom: 6px; min-height: 1.4em; }
.tl-bag-link { color: inherit; text-decoration: underline dotted; }
.tl-partial-of { margin-top: 4px; }
.tl-partial-of-btn { min-height: 44px; min-width: 4.5rem; margin: 0 4px 4px 0; }
/* the trolley's total stays in view while the rows scroll under it */
.tl-head { position: sticky; top: 0; z-index: 5; background: #fff; padding: 2px 0 4px; }
.tl-setup { margin-bottom: 2px; }
@media (max-width: 600px) {
  .tl-bag { grid-template-columns: 1fr auto; }
  .tl-bag .tl-chip { grid-column: 1 / -1; }
  .tl-bag .tl-chip-off { display: none; }
  .tl-bag span.tl-chip { min-height: 0; grid-column: 2; text-align: center; }
}

/* 11B (mock-up 3): the mixer's plan lines carry their next step; the lines of later days fold behind one link */
#st-lines.st-later-folded tr.st-line-later { display: none; }
#st-lines .st-start-cell { min-width: 15rem; }
#st-lines .st-line-meta { line-height: 1.35; }
.st-next-jump { font-size: .9rem; white-space: nowrap; }
#st-lines tr:target { outline: 2px solid #3d4f8f; outline-offset: -2px; }
@media (max-width: 600px) { #st-lines .st-start-cell { min-width: 0; } #st-lines thead { display: none; } #st-lines tr { display: block; border-top: 1px solid #dee2e6; padding: 6px 0; } #st-lines td { display: block; border: 0; padding: 2px 0; } #st-lines.st-later-folded tr.st-line-later { display: none; } }

/* FD-130 (Astra, round 25): in the mixer's Buckets box a request or a handed-over bucket is one long line (product,
   time, worker, mixer); on a phone it ran past the card. It wraps, and each stands on its own line with its link */
#st-collect .st-asked, #st-collect .st-held { white-space: normal; text-align: left; max-width: 100%; line-height: 1.3; }
/* 11D: the same on the Stations list: a tile's red "… over the limit" ran 5 px past a phone's screen */
.st-tile-overdue { white-space: normal; text-align: left; }
@media (max-width: 600px) { #st-collect .st-asked, #st-collect .st-held { display: block; margin-left: 0 !important; margin-top: .35rem; } }

/* 11F (the owner, 15 November): a paused station. The band stays in view while the page scrolls, so a pause is not
   forgotten; nothing under it is dimmed or blocked, since the pause stops no work. The control to pause is one quiet
   line until it is opened */
.st-paused-band { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; background: #fff3cd; border: 1px solid #e0b93a; border-left: 6px solid #d39e00; border-radius: .3rem; padding: .55rem .75rem; color: #533f03; box-shadow: 0 3px 10px rgba(80, 60, 0, .12); }
.st-paused-band .st-paused-text { flex: 1 1 16rem; min-width: 0; }
.st-paused-band .btn { flex: 0 0 auto; min-height: 48px; }
details.st-pause > summary { display: inline-flex; align-items: center; min-height: 40px; padding: .2rem .8rem; border: 1px solid #b9c0cc; border-radius: .3rem; color: #40538b; cursor: pointer; list-style: none; background: #fff; }
details.st-pause > summary::-webkit-details-marker { display: none; }
details.st-pause[open] > summary { border-color: #40538b; }
details.st-pause .st-pause-form { border: 1px solid #d5dae3; border-radius: .3rem; padding: .6rem .75rem; margin-top: .4rem; background: #fff; max-width: 44rem; }
details.st-pause .st-pause-reasons { display: flex; flex-wrap: wrap; gap: .5rem; }
details.st-pause .st-pause-go { min-height: 48px; padding: .3rem .9rem; }
.st-tile-paused, .board-paused { display: inline-block; background: #fff3cd; color: #533f03; border: 1px solid #e0b93a; border-radius: .25rem; padding: 0 .4rem; font-size: .8rem; white-space: normal; text-align: left; }
@media (max-width: 600px) { .st-paused-band .btn { flex: 1 1 100%; } details.st-pause .st-pause-go { flex: 1 1 45%; } }

/* 11G (Astra's round 29): on a phone the paused band took 193 of 700 px. The sentence about the limits is said when the
   pause is made and on the board; on a phone the band keeps the fact, the reason, the worker and the button. The band
   turns a stronger yellow once work was recorded under it */
@media (max-width: 600px) { .st-paused-band { padding: .4rem .6rem; gap: .4rem; } .st-paused-band .st-paused-note { display: none; } .st-paused-band .st-paused-text { flex-basis: 100%; } }
.st-paused-band.st-paused-worked { background: #ffe69c; border-color: #c79a00; }
.board-d-paused { margin-top: .2rem; }
