:root{font-family:Inter,Arial,"Tahoma",sans-serif;color:#1c2c44;background:#f3f6fa;font-size:13px}*{box-sizing:border-box}body{margin:0}aside{position:fixed;width:218px;inset:0 auto 0 0;background:#12243d;color:#dbe5f4;padding:32px 19px}.brand{font-size:20px;font-weight:700;letter-spacing:-.5px}.brand b{color:#65c5ff;font-size:27px;vertical-align:middle}.brand span{display:block;font-size:9px;letter-spacing:1.7px;margin:8px 0 45px 31px;color:#8ea3bf}.navlabel{font-size:9px;letter-spacing:2px;color:#8597b1;margin:20px 12px}aside a{display:block;text-decoration:none;color:#aabbd3;padding:14px 12px;margin:5px 0;border-radius:7px}.active{background:#254365;color:white!important;border-left:3px solid #69c7ff}.sidebottom{position:absolute;bottom:28px;font-size:12px;line-height:2;color:#b6c8df}.sidebottom small{font-size:10px;color:#8096b3}.dot{display:inline-block;background:#56c4a5;width:6px;height:6px;border-radius:50%;margin-right:6px}main{margin-left:218px;padding:32px 38px;max-width:1800px}header{display:flex;justify-content:space-between;align-items:center;gap:20px}header small{font-size:9px;font-weight:700;letter-spacing:1.7px;color:#667a94}h1{font-size:29px;letter-spacing:-.8px;margin:10px 0}p{color:#718198;font-size:12px;line-height:1.7;margin:6px 0}button,select,input{font:inherit;border:1px solid #dce3ed;border-radius:6px;background:white;color:#354962;padding:9px 12px}button{cursor:pointer;font-weight:600;white-space:nowrap}button:hover{background:#edf4ff}button:disabled{opacity:.4;cursor:default}.source{margin:22px 0;background:#eaf2fc;border:1px solid #d6e6fa;padding:13px 16px;border-radius:8px;font-size:12px;color:#486b98}.source>span:first-child{color:#2588d7;margin-right:6px}.tag{font-size:8px;letter-spacing:1px;background:#d7e7fc;padding:4px 6px;margin-left:8px;border-radius:4px}.source small{float:right;color:#7387a0;font-size:10px}.filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:24px 0}label{display:flex;flex-direction:column;gap:7px;font-size:10px;font-weight:600;color:#708099}select{min-width:155px}input[type=date]{min-width:135px}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0}.kpis article,.panel{background:white;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 2px 3px #172e4903}.kpis article{padding:22px;border-top:3px solid #237dd5}.kpis article:nth-child(2){border-top-color:#a8b8cc}.kpis article:nth-child(3){border-top-color:#38a898}.kpis article:nth-child(4){border-top-color:#e5a54c}.kpis small{font-size:9px;letter-spacing:1.4px;font-weight:700;color:#74869f}.kpis h2{font-size:29px;margin:14px 0 8px;letter-spacing:-1px}.kpis span{font-size:10px;color:#8190a4}.charts{display:grid;grid-template-columns:1.25fr 1fr;gap:18px;margin:22px 0}.panel{padding:22px;margin-bottom:20px}.charts .panel{margin:0}.panelhead{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}h3{font-size:14px;margin:0;letter-spacing:-.2px}.legend{font-size:9px;color:#718198;white-space:nowrap}.legend i{display:inline-block;width:7px;height:7px;background:#3486db;border-radius:2px;margin:0 4px 0 8px}.legend i.setup{background:#abd3f8}.barrow{display:grid;grid-template-columns:65px 1fr 67px;align-items:center;gap:10px;font-size:10px;margin:12px 0}.track{display:flex;background:#f3f6fa;height:13px;border-radius:3px;overflow:hidden}.operate{background:#3486db}.setupbar{background:#abd3f8}.barvalue{text-align:right;font-variant-numeric:tabular-nums;color:#5c718d}.monthchart{display:flex;gap:5px;height:205px;align-items:stretch;overflow-x:auto;padding-top:20px}.monthcol{flex:1;min-width:23px;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:8px}.monthbar{width:75%;max-width:32px;background:#3486db;border-radius:4px 4px 0 0;min-height:2px}.monthcol small{font-size:8px;color:#8796aa;writing-mode:vertical-rl;transform:rotate(180deg);height:47px}.footnote{font-size:10px;color:#8a99ab;margin-top:18px}.notice,.quality{font-size:11px;line-height:1.6;padding:12px 14px;background:#fff7e9;color:#977231;border-radius:6px;margin:12px 0}.quality{background:#f3f6fa;color:#6c8099}.tablewrap{overflow-x:auto}table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:11px}th{text-align:left;padding:12px 11px;color:#7c8da4;font-size:9px;background:#f7f9fc;font-weight:600;letter-spacing:.2px}td{padding:13px 11px;border-bottom:1px solid #edf1f6;font-variant-numeric:tabular-nums}tr:hover td{background:#f8fbff}.badge{display:inline-block;border-radius:4px;padding:4px 7px;font-size:9px;background:#edf3f8;color:#70839a}.badge.red{background:#fff0ef;color:#cf5950}.badge.green{background:#e8f6f0;color:#258869}.badge.blue{background:#eaf2ff;color:#307ec3}.ratio{display:flex;gap:8px;align-items:center}.ratio .track{width:75px;height:5px}.ratio .track span{background:#3486db}.ratio .track span.redfill{background:#dc736a}.detail{font-size:10px;color:#357fc9;padding:5px 8px}.pagination{display:flex;align-items:center;justify-content:space-between;margin-top:18px;font-size:10px;color:#8291a5}.pagination button{font-size:10px;padding:7px 10px}footer{display:flex;justify-content:space-between;color:#98a4b5;font-size:9px;margin:24px 0}dialog{border:0;border-radius:12px;width:780px;max-width:95vw;max-height:90vh;padding:26px;color:#263b56;box-shadow:0 20px 80px #14223855}dialog::backdrop{background:#10223f88}dialog input[type=number]{width:95px;padding:7px}.dialogfoot{display:flex;justify-content:space-between;margin-top:24px}.primary{background:#237dd5;color:white;border-color:#237dd5}.primary:hover{background:#196aba}#plan{width:100%}#error:not(:empty){background:#ffeded;color:#b33;padding:12px;border-radius:8px}#detailwc{color:#337fc7;font-weight:400}@media(max-width:1100px){aside{width:180px}main{margin-left:180px;padding:25px}.kpis{gap:10px}.kpis article{padding:16px}.source small{float:none;display:block;margin-top:8px}.charts{grid-template-columns:1fr}}@media(max-width:700px){aside{position:static;width:100%;padding:15px 20px}.brand span,.navlabel,aside a,.sidebottom{display:none}main{margin:0;padding:20px 14px}header{align-items:start;flex-direction:column}h1{font-size:25px}.kpis{grid-template-columns:1fr 1fr}.kpis h2{font-size:23px}.panel{padding:16px}.panelhead{align-items:start;flex-wrap:wrap}.filters label{flex:1}select,input[type=date]{width:100%}footer{gap:20px;line-height:1.6}.source{line-height:1.8}}

.charts{grid-template-columns:1fr}.chartscroll{overflow-x:auto;margin-top:18px}.chartscroll svg{display:block;width:100%;height:auto;max-height:350px}.capacitylegend{display:flex;align-items:center;gap:8px;font-size:11px;color:#6c819c}.bluekey{color:#3486db}.redkey{color:#df7168;margin-left:14px}.capacitylegend b{font-size:22px;color:#263c58;margin-left:14px}.periodcontrols{display:flex;gap:8px}.weeklyinput{margin-top:15px;max-width:250px}#periodrows .badge{margin:2px}#periodrows td:nth-child(6){font-weight:600}@media(max-width:700px){.periodcontrols{flex-wrap:wrap}.chartscroll svg{max-height:none}}

.periodcontrols{align-items:center;flex-wrap:wrap}.hideempty{display:flex;flex-direction:row;align-items:center;gap:7px;color:#526983;font-size:11px;white-space:nowrap}.hideempty input{accent-color:#237dd5;width:15px;height:15px;margin:0}

.headeractions{display:flex;flex-direction:column;align-items:flex-end;gap:10px}.todaylabel{font-size:11px;color:#6682a4;background:#eaf2fd;padding:8px 11px;border-radius:6px}.currentperiodnote{font-size:11px;color:#3977b6;margin-top:13px}.current-period-row td,.today-row td{background:#edf5ff}.current-period-row td:first-child,.today-row td:first-child{box-shadow:inset 3px 0 #91bde9}.current-period-row:hover td,.today-row:hover td{background:#e5f0ff}.currentbadge{display:inline-block;font-size:9px;color:#3977b6;background:#dcecff;border-radius:4px;padding:3px 5px;margin-left:5px;font-weight:500}@media(max-width:700px){.headeractions{align-items:flex-start}}

.fgfilter input{min-width:270px}.fgfilter{flex:1;max-width:390px}

.fgcontext{font-size:12px;color:#3e6084;padding:10px 13px;background:#f2f6fb;border-radius:6px;white-space:normal;overflow-wrap:anywhere;line-height:1.8;margin:12px 0}.fgfilter{position:relative;max-width:none;min-width:280px}.fgfilter input{width:100%;min-width:0}.fgbrowse{font-size:10px;text-align:left;padding:4px 0;border:0;background:transparent;color:#357fc9}.fgsuggestions{position:absolute;z-index:30;top:100%;left:0;min-width:100%;width:max-content;max-width:min(600px,85vw);max-height:330px;overflow-y:auto;background:white;border:1px solid #dce3ed;border-radius:7px;box-shadow:0 8px 28px #20375022;padding:7px}.fgchoice{display:block;width:100%;border:0;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:11px;font-weight:400;line-height:1.6;padding:9px}.fgcount{font-size:10px;padding:6px;color:#8191a5}.machine-table{max-height:440px;overflow:auto}.machine-table th{position:sticky;top:0;z-index:1}.machine-table td:first-child,.machine-table th:first-child{position:sticky;left:0;background:#f7faff}.capacitylegend{flex-wrap:wrap}

/* Aligned controls and numeric columns */
.filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;column-gap:16px;row-gap:16px;background:#fff;padding:18px;border:1px solid #e2e8f0;border-radius:10px}
.filters>label{min-width:0;gap:8px;line-height:14px}.filters .fgfilter{grid-column:span 2;min-width:0;max-width:none}
.filters input,.filters select{width:100%;min-width:0;height:38px;line-height:18px}.filters>.fgfilter{position:relative}
.filters>.fgfilter .fgbrowse{position:absolute;right:9px;top:29px;width:30px;height:25px;padding:0;text-align:center;background:#f3f7fd;border:0;border-radius:4px;line-height:25px;font-size:0}
.filters>.fgfilter .fgbrowse::after{content:'▾';font-size:14px}.filters .fgfilter input{padding-right:46px}
.filters>#reset{height:38px;margin-top:22px;width:100%}
.panelhead{align-items:flex-start}.panelhead>div:first-child{min-width:0}.periodcontrols{align-items:center;justify-content:flex-end;gap:12px}
.periodcontrols>select,.periodcontrols>button{height:38px}.hideempty{min-height:38px}.periodcontrols>label:not(.hideempty){line-height:14px;gap:8px}
#machines .panelhead{align-items:flex-end}#machines .periodcontrols{align-items:flex-end}#machinewc{height:38px;min-width:160px}
.capacitylegend{gap:10px;line-height:20px}.capacitylegend b{line-height:20px}.chartscroll{margin-top:16px}
th,td{vertical-align:middle}#perioddetails table th,#machinesdetails table th,#centers table th{font-size:10px;line-height:1.5}
#perioddetails table th:nth-child(n+3):nth-child(-n+8),#periodrows td:nth-child(n+3):nth-child(-n+8),#machinesdetails table th:nth-child(n+3),#machinerows td:nth-child(n+3),#centers table th:nth-child(n+2):nth-child(-n+7),#centerrows td:nth-child(n+2):nth-child(-n+7){text-align:right}
#orders table th:nth-child(n+7),#orderrows td:nth-child(n+7){text-align:right}
#centerrows .ratio{justify-content:flex-end}.machine-table th{white-space:normal;min-width:112px}.machine-table th:nth-child(1),.machine-table th:nth-child(2){text-align:left;min-width:105px}
.machine-table th:first-child{z-index:3}.machine-table .current-period-row td:first-child{background:#edf5ff}.machine-table .current-period-row:hover td:first-child{background:#e5f0ff}
.headeractions{flex-shrink:0}.source small{line-height:1.6}
@media(max-width:1200px){.panelhead{flex-wrap:wrap}.panelhead>.periodcontrols{width:100%;justify-content:flex-start}.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.source small{float:none;display:block;margin-top:8px}}
@media(max-width:700px){.filters{padding:14px;gap:14px}.filters .fgfilter{grid-column:span 2}.periodcontrols{justify-content:flex-start}.headeractions{width:100%;align-items:flex-start}.todaylabel{line-height:1.7;white-space:normal}.machine-table th{min-width:105px}#machines .periodcontrols{align-items:flex-end}}
@media(max-width:420px){.filters{grid-template-columns:1fr}.filters .fgfilter{grid-column:auto}.filters>#reset{margin-top:0}#machines .periodcontrols>label{flex:1}}

.period-hit{cursor:pointer;outline:none}.period-hit .period-focus{stroke:transparent;stroke-width:2;pointer-events:none}.period-hit:hover .period-focus,.period-hit:focus .period-focus{stroke:#3486db}.orderperiod{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;margin-bottom:14px;background:#edf5ff;border:1px solid #cbdff7;border-radius:7px;color:#315b8e;font-size:12px}.orderperiod[hidden]{display:none}#orders{scroll-margin-top:18px}@media(max-width:700px){.orderperiod{align-items:flex-start;flex-direction:column}}

.filters>.filteractions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:12px;align-items:center}.filteractions>button{height:38px;min-width:165px;margin:0}#settings{color:#237dd5;border-color:#b9d3ef}@media(max-width:420px){.filteractions>button{flex:1;min-width:0}}

/* Keep the apply action visible while editing all work centers. */
#dialog{overflow:hidden}#capacityform{display:flex;flex-direction:column;max-height:calc(90vh - 52px);min-height:0}#capacityform>.panelhead{flex-shrink:0;margin-bottom:12px}#capacityform>.notice{flex-shrink:0}#capacityform>.settingtable{min-height:80px;overflow:auto;flex:1}#capacityform .settingtable thead th{position:sticky;top:0;z-index:1}#capacityform>.dialogfoot{flex-shrink:0;align-items:center;gap:12px;flex-wrap:wrap;padding-top:14px;margin-top:0;background:white;border-top:1px solid #e2e8f0}.settingshint{font-size:11px;color:#718198;flex:1}.appliedcapacity{margin-top:16px;border:1px solid #e2e8f0;border-radius:7px;background:#f8fbff}.appliedcapacity>summary{cursor:pointer;padding:12px;color:#486b98;font-size:11px;font-weight:600}.appliedcapacity td:nth-child(n+2),.appliedcapacity th:nth-child(n+2){text-align:right}.appliedcapacity table{background:white}@media(max-width:700px){#dialog{padding:16px}#capacityform{max-height:calc(90vh - 32px)}.settingshint{flex-basis:100%}#capacityform>.notice{font-size:10px;padding:8px;line-height:1.4}}

.settingsfeedback{font-size:11px;color:#258869;line-height:1.5;flex-basis:100%}.settingsfeedback.invalid{color:#b34d43}#capacityform>.dialogfoot{justify-content:space-between}

.settingtable output{display:block;min-width:90px;text-align:center;background:#f3f6fa;padding:8px;border-radius:5px;color:#486b98}.settingtable th{white-space:normal}#dialog{width:960px}.machine-table th:nth-child(3),#machinerows td:nth-child(3){text-align:left}
