/* Manufacturing (mfg- prefix): schedule board, shop-floor terminal, compact quantity inputs. */
.mfg-qty { width: 96px; text-align: right; }
.mfg-seq { width: 64px; }
.mfg-timeform { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; width: 100%; align-items: end; }
.mfg-timeform .ct-actions { grid-column: 1 / -1; flex-wrap: wrap; }
.mfg-timeform .ct-check { display: block; margin: 2px 0; }
.mfg-steps { margin: 0; padding-left: 20px; }
.mfg-steps li { margin: 6px 0; line-height: 1.45; }

/* Schedule board: one row per work centre, one column per day, steps as bars on lanes. */
.mfg-board { min-width: calc(180px + var(--days) * 64px); position: relative; }
.mfg-bhead, .mfg-brow { display: grid; grid-template-columns: 180px 1fr; }
.mfg-bhead { position: sticky; top: 0; z-index: 2; background: #f5f8fb; border-bottom: 1px solid #d6e0e9; }
.mfg-wc { padding: 8px 10px; border-right: 1px solid #e0e7ed; font-size: 12px; min-width: 0; background: #fff; position: sticky; left: 0; z-index: 1; }
.mfg-bhead .mfg-wc { background: #f5f8fb; font-weight: 700; color: var(--muted); }
.mfg-wc .sub { display: block; }
.mfg-cells { display: grid; grid-template-columns: repeat(var(--days), minmax(56px, 1fr)); min-width: 0; }
.mfg-day { padding: 6px 4px; font-size: 11px; text-align: center; color: var(--muted); border-right: 1px solid #edf1f4; }
.mfg-day b { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.mfg-day.we, .mfg-bg.we { background: #f4f6f8; }
.mfg-day.now { color: var(--brand-primary); font-weight: 700; background: #eaf3fd; }
.mfg-brow { border-bottom: 1px solid #e3eaf0; }
.mfg-lanes { grid-template-rows: repeat(var(--lanes), 34px); padding: 4px 0; row-gap: 3px; }
.mfg-bg { border-right: 1px solid #f0f3f6; }
.mfg-bg.now { background: rgba(26, 127, 224, .06); }
.mfg-bar { position: relative; z-index: 1; margin: 0 2px; border-radius: 4px; padding: 3px 6px; font-size: 11px; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    color: #0d2233; background: #e3eefb; border-left: 3px solid #1a7fe0; text-decoration: none; display: block; }
.mfg-bar span { display: block; font-size: 10px; color: #5b6f82; overflow: hidden; text-overflow: ellipsis; }
.mfg-bar:hover { filter: brightness(.96); }
.mfg-bar.s-planned { background: #eef1f4; border-left-color: #8a9bb0; }
.mfg-bar.s-released { background: #e3eefb; border-left-color: #1a7fe0; }
.mfg-bar.s-in_progress { background: #fff3d6; border-left-color: #d99a06; }
.mfg-bar.s-completed { background: #e1f5ec; border-left-color: #12a079; }
.mfg-bar.late { box-shadow: inset 0 0 0 1px #d7263d; }
.mfg-loadlabel { font-size: 10.5px; color: var(--muted); padding-top: 4px; padding-bottom: 4px; }
.mfg-load { height: 26px; position: relative; border-right: 1px solid #f0f3f6; display: flex; align-items: flex-end; }
.mfg-load span { display: block; width: 100%; background: rgba(26, 127, 224, .22); }
.mfg-load.over span { background: rgba(215, 38, 61, .3); }
.mfg-load em { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 10px; color: #3d5166; }
.mfg-load.over em { color: #b42335; font-weight: 700; }
.mfg-legend { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.mfg-legend .mfg-bar { display: inline-block; }

/* Capacity and master schedule. */
.mfg-capmeter { min-width: 80px; }
.mfg-capmeter.high span { background: linear-gradient(90deg, #f1c75b, #d99a06); }
.mfg-capmeter.over span { background: linear-gradient(90deg, #ef7d8c, #d7263d); }
.mfg-mps .ct-input { width: 74px; text-align: right; }
.mfg-mps tr.mfg-mps-first td { border-top: 2px solid #d6e0e9; }

/* Shop-floor terminal: large tap targets for gloves and phones. */
.mfg-floor .ct-btn, .mfg-floor input, .mfg-floor select { min-height: 44px; }
.mfg-scan { display: flex; gap: 8px; flex-wrap: wrap; }
.mfg-scan input { flex: 1 1 220px; font-size: 16px; }
.mfg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mfg-chips .erp-chip { padding: 8px 12px; font-size: 13px; text-decoration: none; color: inherit; }
.mfg-chips .erp-chip.on { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.mfg-opfacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.mfg-opfacts div { background: #f5f8fb; border-radius: 4px; padding: 8px 10px; min-width: 0; }
.mfg-opfacts small { display: block; color: var(--muted); font-size: 11px; }
.mfg-opfacts b { font-size: 16px; }
.mfg-wi { margin: 0 0 10px; }
.mfg-wi summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.mfg-wi ol { margin: 4px 0; padding-left: 20px; }
.mfg-floorform { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; align-items: end; }
.mfg-floorform .ct-check { align-self: center; }
.mfg-floorform .ct-btn { grid-column: span 2; justify-content: center; }

@media (max-width: 760px) {
    .mfg-timeform, .mfg-floorform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mfg-opfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mfg-bhead, .mfg-brow { grid-template-columns: 120px 1fr; }
    .mfg-board { min-width: calc(120px + var(--days) * 58px); }
}
