/* 總排程（2026-10-10 排程管理優化）：機台總排程、群組負荷、本週變動、改基準日影響預覽 */
.so-tabs{margin:0 0 12px}
.so-tools{margin-bottom:12px}
.so-toolrow{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.so-toolrow label{display:inline-flex;gap:6px;align-items:center}
.so-legend{margin:8px 0 0}
.so-card{padding:0}
.so-scroll{overflow:auto;max-height:72vh;--so-name:230px}
.so-grid{position:relative;min-width:100%}
.so-todayline{position:absolute;top:0;bottom:0;width:2px;background:#d9534f;opacity:.55;z-index:2;pointer-events:none}
.so-head{display:flex;position:sticky;top:0;z-index:3;background:#fff;border-bottom:1px solid #d9e5ea}
.so-head .so-track{height:28px}
.so-row{display:flex;border-bottom:1px solid #eef2f5;cursor:pointer}
.so-row:hover,.so-row:focus-visible{background:#f4f9fb;outline:none}
.so-row:focus-visible .so-name{box-shadow:inset 3px 0 0 #2584a8}
.so-name{flex:none;width:var(--so-name);box-sizing:border-box;position:sticky;left:0;z-index:2;background:inherit;background-color:#fff;padding:6px 10px;display:flex;flex-direction:column;gap:2px;border-right:1px solid #e3e8ec;font-size:13px}
.so-row:hover .so-name{background-color:#f4f9fb}
.so-name b{font-size:14px}
.so-name small{color:#647887;display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.so-corner{justify-content:center;font-weight:700}
.so-track{position:relative;flex:none;height:52px}
.so-wk{position:absolute;top:0;height:100%;padding:6px 0 0 3px;font-size:11px;color:#647887;border-left:1px solid #e3e8ec;white-space:nowrap}
.so-today{position:absolute;top:0;bottom:0;width:2px;background:#d9534f}
.so-bar{position:absolute;top:22px;height:10px;background:#cfe3ec;border-radius:5px;overflow:hidden}
.so-bar i{display:block;height:100%;background:#2b7a99}
.so-mark{position:absolute;top:16px;transform:translateX(-50%);font-size:13px;line-height:1;pointer-events:auto}
.so-approved{color:#6c757d}.so-sheetmetal{color:#8a6d3b}.so-online{color:#2b6ca3}.so-shipment{color:#c62828;font-size:14px}
.so-slack{display:inline-block;padding:1px 6px;border-radius:9px;font-size:12px;font-weight:600}
.so-green{background:#e3f4e6;color:#2e7d32}.so-yellow{background:#fff1c2;color:#7a5300}.so-red{background:#fde3e0;color:#c62828}.so-none{background:#eef1f4;color:#647887}
.so-chip{display:inline-block;padding:1px 6px;border-radius:9px;font-size:11px;background:#eef1f4;color:#465866;white-space:nowrap}
.so-chip-red{background:#fde3e0;color:#c62828}.so-chip-blue{background:#e1effa;color:#1d5f91}
.so-empty{padding:16px}
.so-red-text{color:#c62828}.so-green-text{color:#2e7d32}
/* 群組負荷 */
.so-heatwrap{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}
.so-heat table{border-collapse:separate;border-spacing:2px}
.so-heat th,.so-heat td{padding:2px 4px;text-align:center;white-space:nowrap}
.so-heat thead th{font-size:12px;color:#647887;font-weight:500}
.so-heat .so-person{text-align:left;font-weight:600;min-width:110px}
.so-heat .so-person small{display:block;font-weight:400}
.so-grp th{background:#eef3f6;text-align:left;padding:6px 8px;font-size:13px}
.so-cell{display:inline-block;width:100%;min-width:34px;height:28px;border:0;border-radius:4px;font-weight:700;font-size:13px;cursor:pointer;padding:0}
.so-toolrow .so-cell{width:auto;min-width:30px;height:auto;padding:1px 6px;cursor:default}
.so-cell.so-h0,button.so-cell.so-h0{background:#f4f6f8;color:transparent}.so-cell.so-h1,button.so-cell.so-h1{background:#d8f0dc;color:#1f5e2a}
.so-cell.so-h2,button.so-cell.so-h2{background:#fff1c2;color:#6b4b00}.so-cell.so-h3,button.so-cell.so-h3{background:#f8c9c4;color:#8e1f15}.so-cell.so-h4,button.so-cell.so-h4{background:#e05a4f;color:#fff}
button.so-cell:focus,button.so-cell:focus-visible{outline:3px solid #2584a8;outline-offset:1px}
.so-side{position:sticky;top:12px;max-height:72vh;overflow:auto}
.so-list{list-style:none;margin:6px 0 0;padding:0}
.so-list li{margin:6px 0}
.so-list small{display:block;color:#647887}
.so-urg{color:#c62828}
.so-var td{vertical-align:top}
/* 改基準日影響預覽（疊在訂單表單上面） */
.so-impact{width:min(780px,94vw);max-height:88vh;padding:0;border:0;border-radius:10px;box-shadow:0 12px 40px #12324a55}
.so-impact::backdrop{background:#0b1f2e66}
.so-impact-body{padding:20px 22px;overflow:auto;max-height:88vh;box-sizing:border-box}
.so-impact-body h2{margin:0 0 6px;font-size:18px}
.so-impact-body h3{margin:16px 0 6px;font-size:15px}
.so-impact-body ul{margin:4px 0;padding-left:20px}
.so-impact-block{background:#fde3e0;border-left:4px solid #c62828;padding:10px 12px;margin:10px 0;border-radius:4px}
.so-impact-body .actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px;position:sticky;bottom:-20px;background:#fff;padding:10px 0}
@media(max-width:1023px){.so-heatwrap{grid-template-columns:1fr}.so-side{position:static;max-height:none}}
@media(max-width:760px){.so-scroll{--so-name:150px}.so-name{font-size:12px;padding:4px 6px}.so-name b{font-size:13px}}
/* R-20261025-2147 B10：搜尋框設最小寬度，placeholder 不被截掉（窄螢幕仍不超出） */
#so-q{min-width:min(100%,320px)}
