/* Shop Floor. Uses the site's tokens (styles.css, docs/BRAND.md). */
.sf [hidden] { display: none !important; }
.sf-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.sf-head h1 { margin-bottom: 4px; }
.sf-lede { max-width: 68ch; margin-top: 0; color: var(--muted); }
.sf-live { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.sf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); box-shadow: 0 0 0 4px var(--chip); }
.sf-live.is-live .sf-dot { background: var(--sage); }
.sf-live.is-stale .sf-dot { background: var(--sand); }
.sf-note { background: var(--sand); color: var(--on-light-accent); border-radius: 10px; padding: 8px 12px; }

.sf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 8px 0 24px; }
.sf-kpi, .sf-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.sf-kpi { padding: 14px 16px; }
.sf-kpi h2 { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sf-big { margin: 4px 0 2px; font-size: 1.7rem; font-weight: 600; line-height: 1.2; }
.sf-sub { margin: 0; font-size: .85rem; color: var(--muted); }
.sf-meter { position: relative; height: 8px; border-radius: 4px; background: var(--chip); margin: 6px 0 4px; }
.sf-meter span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--olive); width: 0; transition: width .6s; }
.sf-meter i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--rust); left: 0; }

.sf-main { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.sf-card { padding: 18px 20px; }
.sf-card h2 { margin: 0; font-size: 1.4rem; }
.sf-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.sf-board-card { flex: 999 1 560px; min-width: 0; }
.sf-feed-card { flex: 1 1 280px; min-width: 0; }

.sf-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sf-tile { display: flex; flex-direction: column; gap: 4px; min-height: 128px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sf-tile.is-down { border: 2px solid var(--brick); }
.sf-tile.is-off { background: var(--page); border-style: dashed; }
.sf-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sf-code { font-family: var(--font-mono); font-weight: 600; font-size: .9rem; }
.sf-name { font-size: .75rem; color: var(--muted); }
.sf-job { font-weight: 600; font-size: .92rem; }
.sf-detail { font-size: .85rem; }
.sf-tile-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--muted); }
.sf-progress { height: 4px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.sf-progress span { display: block; height: 100%; background: var(--sage); }

.sf-pill { font-size: .75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.sf-pill.running { background: var(--sage); color: var(--on-light-accent); }
.sf-pill.idle { background: var(--chip); color: var(--ink); }
.sf-pill.down { background: var(--brick); color: var(--on-rust); }
.sf-pill.off { background: var(--thead); color: var(--muted); }
.sf-pill.unstaffed { background: var(--sand); color: var(--on-light-accent); }
.sf-pill.late { background: var(--brick); color: var(--on-rust); }
.sf-rush { font-size: .7rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--rust); color: var(--on-rust); margin-left: 6px; }

.sf-feed { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sf-feed li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: start; font-size: .9rem; }
.sf-feed .sf-mark { width: 10px; height: 10px; border-radius: 3px; margin-top: 6px; background: var(--muted); }
.sf-feed .k-shipped { background: var(--sage); }
.sf-feed .k-breakdown, .sf-feed .k-late { background: var(--brick); }
.sf-feed .k-job, .sf-feed .k-poke { background: var(--rust); }
.sf-feed .k-absent, .sf-feed .k-repaired { background: var(--sand); }
.sf-feed time { display: block; font-size: .78rem; color: var(--muted); }
.sf-foot { margin-top: 20px; }
