/* ---- V1.74 the basic mine apps, wave 4 (mtw-): Site Access's muster list (Client\Apps\MineRegister\Pages\SiteAccessMusterPage.razor) and
   the Mine Control Tower (Client\Apps\MineRegister\ControlTower\ControlTowerPage.razor). Design system tokens only (--os-*), full page
   width; a new app file: every design guard at zero (DesignGuardTests.ZeroTolerance). ---- */

/* Site Access: the way to the muster list, above the register's page */
.mtw-musterbar { display: flex; justify-content: flex-end; padding-bottom: 0; }

/* The muster list: one panel per area, a box to tick per person */
.mtw-muster-area { margin-top: var(--os-gutter); }
.mtw-muster-table td, .mtw-muster-table th { overflow-wrap: anywhere; }
.mtw-check { width: 4ch; text-align: center; }
.mtw-box { display: inline-block; width: 1.1em; height: 1.1em; border: var(--os-border-w-strong) solid var(--os-border-strong); border-radius: var(--os-radius-xs); vertical-align: middle; }
.mtw-bad { color: var(--os-bad-text); font-weight: 600; }

/* Printed: the list only, on the page's own ground, without the bars, the buttons or the bubble; an area never split from its head */
@media print {
  body:has(.mtw-muster-page) .os-topbar, body:has(.mtw-muster-page) .os-appbar, body:has(.mtw-muster-page) .os-bubble, .mtw-noprint { display: none !important; }
  .mtw-muster-page .os-panel { box-shadow: none; break-inside: avoid; }
  .mtw-muster-table tr { break-inside: avoid; }
}

/* The Control Tower: one card per app (its headline figures), then what needs attention now across the apps */
.mtw-tower-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--os-gutter); margin-top: var(--os-gutter); }
.mtw-card { display: flex; flex-direction: column; gap: var(--os-space-2); min-width: 0; }
.mtw-card__head { display: flex; align-items: center; gap: var(--os-space-2); min-width: 0; }
.mtw-card__head a { color: var(--os-text); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.mtw-card__head a:hover { text-decoration: underline; }
.mtw-figs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--os-space-1); }
.mtw-figs li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--os-space-3); padding: var(--os-space-1) 0; border-bottom: var(--os-border-w) solid var(--os-border-subtle); }
.mtw-figs li:last-child { border-bottom: 0; }
.mtw-figs span { color: var(--os-text-2); min-width: 0; overflow-wrap: anywhere; }
.mtw-figs b { font-family: var(--os-font-mono); white-space: nowrap; }
.mtw-tone--ok b { color: var(--os-good-text); }
.mtw-tone--warn b, .mtw-alist .mtw-tone--warn { color: var(--os-warn-text); }
.mtw-tone--bad b, .mtw-alist .mtw-tone--bad { color: var(--os-bad-text); }
.mtw-alist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--os-space-2); }
.mtw-alist li { display: flex; gap: var(--os-space-2); align-items: flex-start; min-width: 0; }
.mtw-alist li a { color: inherit; overflow-wrap: anywhere; }
.mtw-app { color: var(--os-text-3); white-space: nowrap; }
.mtw-attention { margin-top: var(--os-gutter); }

/* ---- V1.74 the Mine Control Tower on a wall screen (Client\Apps\MineRegister\ControlTower\ControlTowerWallPage.razor): no OneStop bars
   (html.wall-mode, whose tokens are the wall's: dark-friendly, larger muted text), the full width, large figures read from a few metres ---- */
.mtw-wall { display: flex; flex-direction: column; gap: var(--os-gutter); min-height: 100vh; padding: var(--os-space-4) var(--os-gutter); background: var(--os-canvas); color: var(--os-text); box-sizing: border-box; }
.mtw-wall__head { display: flex; align-items: center; gap: var(--os-space-3); flex-wrap: wrap; min-width: 0; }
.mtw-wall__head > .mud-icon-root, .mtw-wall__head > svg { font-size: 2.5rem; color: var(--os-accent); }
.mtw-wall__title { display: flex; flex-direction: column; min-width: 0; }
.mtw-wall__title h1 { margin: 0; font-size: clamp(1.4rem, 2.2vw, 2.4rem); font-weight: 600; line-height: 1.15; }
.mtw-wall__title span { color: var(--os-text-2); font-size: clamp(1rem, 1.4vw, 1.5rem); overflow-wrap: anywhere; }
.mtw-wall__clock { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; font-size: clamp(1rem, 1.4vw, 1.5rem); font-family: var(--os-font-mono); }
.mtw-wall__clock small { font-family: var(--os-font-ui); color: var(--os-text-3); font-size: 0.7em; }
.mtw-wall__tools { display: flex; gap: var(--os-space-2); }
.mtw-wall__body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(min(100%, 320px), 1fr); gap: var(--os-gutter); align-items: start; }
.mtw-wall__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--os-gutter); min-width: 0; }
.mtw-wall__card { display: flex; flex-direction: column; gap: var(--os-space-3); min-width: 0; }
.mtw-wall__card--attention { border-color: var(--os-warn-text); }
.mtw-wall__cardhead { display: flex; align-items: center; gap: var(--os-space-2); font-size: clamp(1.1rem, 1.5vw, 1.6rem); font-weight: 600; min-width: 0; }
.mtw-wall__cardhead span { overflow-wrap: anywhere; min-width: 0; }
.mtw-wall__count { margin-left: auto; min-width: 2ch; padding: 0 var(--os-space-2); border-radius: var(--os-radius-xs); background: var(--os-warn-text); color: var(--os-surface); text-align: center; font-family: var(--os-font-mono); }
.mtw-wall__figs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--os-space-3); }
.mtw-wall__figs li { display: flex; flex-direction: column; gap: var(--os-space-1); min-width: 0; }
.mtw-wall__figs b { font-family: var(--os-font-mono); font-size: clamp(1.8rem, 3vw, 3.4rem); line-height: 1.05; white-space: nowrap; }
.mtw-wall__figs span { color: var(--os-text-2); font-size: clamp(0.95rem, 1.1vw, 1.25rem); overflow-wrap: anywhere; }
.mtw-wall__na, .mtw-wall__clear { color: var(--os-text-2); font-size: clamp(1rem, 1.3vw, 1.4rem); margin: 0; }
.mtw-wall__attention h2 { margin: 0 0 var(--os-space-3); font-size: clamp(1.2rem, 1.6vw, 1.8rem); }
.mtw-wall__attention .mtw-alist { font-size: clamp(1rem, 1.3vw, 1.4rem); }
@media (max-width: 1100px) { .mtw-wall__body { grid-template-columns: minmax(0, 1fr); } }
