/* Production schedule follows the source business columns; scroll the table,
   while retaining document identity and warehouse completion at both edges. */
.production-kpis .kpi-card{cursor:default}
.production-kpis .kpi-card:hover{border-color:var(--line);box-shadow:none}
.production-kpis .kpi-card strong{font-variant-numeric:tabular-nums;font-size:28px}
.production-filters{align-items:flex-end;gap:12px;padding:18px 20px}
.schedule-filter{display:flex;flex-direction:column;gap:6px;font-size:10px;color:#718697;min-width:0}
.production-filters .schedule-filter select{max-width:none;min-width:180px;width:100%;height:36px}
.production-filters .line-filter select{min-width:120px}
.production-filters select:disabled{background:#f4f6f8;color:#8f9ba7;cursor:not-allowed}
.date-filter{display:flex;height:36px;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:#fff}
.date-filter input{min-width:138px;width:138px;border:0;padding:6px 8px;color:#3d5b71;background:#fff;font-size:12px}
.date-filter button{background:#f0f5f8;color:#58788e;font-size:11px;padding:0 9px;border-left:1px solid var(--line)}
.completed-filter{display:flex;align-items:center;gap:6px;min-height:36px;font-size:11px;color:#587387;white-space:nowrap}
.completed-filter input{accent-color:var(--teal);width:14px;height:14px;margin:0}
.production-filters .search-box{min-width:240px;flex:1 1 270px;height:36px;margin-left:0;max-width:none}
.production-filters .filter-chip{height:36px;font-size:11px}
.schedule-reading-guide{display:flex;justify-content:space-between;gap:15px;padding:10px 20px;background:#f8fafc;color:#8a9ba9;font-size:10px;border-top:1px solid #e8edf2;border-bottom:1px solid #dde6ee;line-height:1.8}
.schedule-reading-guide span:first-child{color:#5f7b90}
.production-table-wrap{width:100%;max-width:100%;overflow:auto;max-height:690px;isolation:isolate}
.production-table{width:2734px;min-width:2734px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:11px;line-height:1.6}
.production-table col.col-watch{width:44px}.production-table col.col-schedule{width:80px}.production-table col.col-count{width:74px}.production-table col.col-type{width:65px}.production-table col.col-order{width:136px}.production-table col.col-product{width:205px}.production-table col.col-name{width:190px}.production-table col.col-spec{width:260px}.production-table col.col-date{width:102px}.production-table col.col-qty{width:99px}.production-table col.col-line{width:85px}.production-table col.col-small{width:84px}.production-table col.col-rate{width:98px}.production-table col.col-action{width:94px}
.production-table thead th:nth-child(n){width:auto;height:37px;padding:8px 10px;border-right:1px solid #e0e8ef;border-bottom:1px solid #d5e1eb;white-space:nowrap;text-align:center;font-size:10px;color:#57758d;background:#f1f6fa;position:sticky;top:0;z-index:4}
.production-table thead .group-head th{background:#eaf2f8;color:#3d6484;font-size:11px;font-weight:700}
.production-table thead .column-head th{top:37px;background:#f5f8fb}
.production-table tbody td{height:auto;min-height:55px;padding:13px 10px;border-right:1px solid #edf1f5;border-bottom:1px solid #e5ecf1;background:#fff;color:#3c566c;vertical-align:middle;text-align:center;line-height:1.7;white-space:normal;overflow-wrap:anywhere;font-size:11px;font-variant-numeric:tabular-nums}
.production-table tbody tr:nth-child(even) td{background:#f8fbfd}
.production-table tbody tr:hover td{background:#f0f7fb}
.production-table tbody td.wrap-product{text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.85}
.production-table tbody td.specification{font-size:10px;color:#6f8394}
.production-table tbody td.numeric{text-align:right;padding-right:13px}
.production-table .product-code{font-family:Consolas,"Microsoft YaHei",monospace;font-size:10px;white-space:normal;overflow-wrap:anywhere}
.production-table .field-pending{font-size:10px;color:#a0adb8;font-weight:400}
.production-table .sticky-watch{position:sticky;left:0;z-index:2}
.production-table .sticky-schedule{position:sticky;left:44px;z-index:2;border-right:1px solid #cddce8}
.production-table .sticky-order,.production-table .sticky-order-head{position:sticky;left:124px;z-index:2;border-right:1px solid #cddce8;box-shadow:5px 0 7px -6px #7892a6}
.production-table thead .sticky-watch,.production-table thead .sticky-schedule{z-index:7}
.production-table thead .sticky-order-head{z-index:6}
.production-table th:nth-last-child(1),.production-table td:nth-last-child(1){position:sticky;right:0;z-index:3}
.production-table th:nth-last-child(2),.production-table td:nth-last-child(2){position:sticky;right:94px;z-index:3}
.production-table th:nth-last-child(3),.production-table td:nth-last-child(3){position:sticky;right:192px;z-index:3;box-shadow:-5px 0 7px -6px #7892a6;border-left:1px solid #cddce8}
.production-table .group-head th:nth-last-child(2),.production-table .group-head th:nth-last-child(3){position:sticky;right:auto;box-shadow:none;border-left:0}
.production-table .group-head th:nth-last-child(2){right:94px}
.production-table .group-head th:last-child{z-index:7}
.production-table .column-head th:nth-last-child(1){right:94px;z-index:6}
.production-table .column-head th:nth-last-child(2){right:192px;z-index:6;box-shadow:-5px 0 7px -6px #7892a6;border-left:1px solid #cddce8}
.production-table .column-head th:nth-last-child(3){right:auto;z-index:4;box-shadow:none;border-left:0}
.schedule-number,.work-order-link{padding:0;max-width:100%;background:transparent;color:#2d6c9d;font-size:11px;font-weight:700;overflow-wrap:anywhere;line-height:1.8}
.work-order-link{font-family:Consolas,"Microsoft YaHei",monospace}
.schedule-number:hover,.work-order-link:hover{text-decoration:underline}
.row-action-stack{display:flex;flex-direction:column;gap:5px;align-items:center}
.production-table .detail-button{font-size:10px;padding:0;white-space:nowrap}
.production-table .secondary-action{font-weight:400;color:#8398a8}
.completion-value{display:inline-block;padding:2px 7px;border-radius:4px;background:#eef4fa;color:#547c9d;white-space:nowrap}
.completion-value.is-complete{background:#e7f5ee;color:#348365}
.page-size-label{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:10px;color:#8a9fac}
.page-size-label select{font-size:11px;height:29px;padding:3px 5px;border:1px solid var(--line);border-radius:5px;background:#fff;color:#58738a}
.production-detail-group{padding:16px 0;border-bottom:1px solid #e7edf2}
.production-detail-group h3{font-size:13px;color:#52758f;margin:0 0 13px}
.production-detail-group .detail-field{padding:10px 12px;background:#f7fafd;border-radius:5px;min-width:0}
.production-detail-group .detail-field>b{font-size:12px;line-height:1.8;white-space:normal;overflow-wrap:anywhere}
.production-detail-group .wide-field{grid-column:1/-1}
.production-detail-group .field-pending{font-size:11px;color:#9aabb7;font-weight:400}
.business-query-hint{font-size:12px;color:#7b91a1;line-height:1.9;margin:0 0 16px}
.business-query-list{display:grid;grid-template-columns:1fr;gap:9px}
.business-query-list button{padding:14px 16px;display:flex;align-items:flex-start;flex-direction:column;gap:5px;border:1px solid #dce7ee;border-radius:6px;background:#f9fcfe;color:#496c86;text-align:left}
.business-query-list button:hover{border-color:#a7c6dc;background:#f1f7fb}
.business-query-list b{font-size:12px}.business-query-list span{font-size:11px;color:#8ba0af;line-height:1.8}
.business-collaboration-links{display:flex;gap:10px;margin-top:20px}
.production-card .card-schedule-number{font-size:10px;color:#8098a9}.production-card h3{font-size:13px;margin:3px 0 0}
.production-card .card-product-code{font-family:Consolas,"Microsoft YaHei",monospace;font-size:11px;margin:12px 0 6px;color:#4e738e;overflow-wrap:anywhere}
.card-product-name{font-size:12px;color:#46667e;line-height:1.9;overflow-wrap:anywhere}
.card-specification{margin:7px 0 12px;color:#7891a2;font-size:10px;line-height:1.8}
.card-specification summary{cursor:pointer}.card-specification p{margin:8px 0!important;font-size:11px!important;overflow-wrap:anywhere}
.production-card-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 9px;padding:13px 0;border-top:1px solid #edf2f6;border-bottom:1px solid #edf2f6;margin:12px 0}
.production-card-facts>div{min-width:0}.production-card-facts dt{color:#8c9eac;font-size:10px}.production-card-facts dd{margin:4px 0 0;color:#4b6b82;font-size:12px;overflow-wrap:anywhere}
.production-card .field-pending{color:#a1afb9;font-size:10px}.production-card .card-relation-actions{flex-wrap:wrap;justify-content:flex-start;margin-top:8px}
.production-unconnected{margin:0 0 17px;border:1px solid #dde7ee;border-radius:7px;background:#f8fbfd;color:#879cab;font-size:11px}
.production-unconnected summary{padding:10px 14px;cursor:pointer;color:#7991a3}
.production-unconnected-content{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:3px 16px 14px}
.production-unconnected-content h3{font-size:11px;font-weight:700;color:#68879e;margin:3px 0 6px}
.production-unconnected-content p{font-size:10px;line-height:1.95;margin:0;color:#94a6b3}
@media(min-width:761px){.main-content{max-width:none;padding-right:26px;padding-left:26px}.production-workspace .card-head{padding-left:20px;padding-right:20px}}
@media(max-width:1100px){.production-filters .search-box{flex-basis:100%;order:8}.production-filters .schedule-filter{flex:1 1 35%}.production-filters .line-filter{flex:1 1 20%}.production-filters .filter-chip{flex:none}.schedule-reading-guide{flex-direction:column;gap:2px}}
@media(max-width:760px){.production-filters{padding:14px;gap:10px}.production-filters .schedule-filter{flex:1 1 calc(50% - 5px)}.production-filters .schedule-filter:first-child{flex-basis:100%}.production-filters .schedule-filter select{min-width:0;font-size:11px}.production-filters .line-filter{flex-basis:calc(50% - 5px)}.date-filter input{min-width:0;width:100%;font-size:11px;padding:5px}.date-filter button{font-size:10px;padding:0 7px}.completed-filter{flex-basis:100%;font-size:11px}.production-filters .search-box{min-width:0;flex-basis:100%;order:0}.production-filters .filter-chip{flex:1 1 40%}.schedule-reading-guide{padding:10px 14px;font-size:9px}.production-kpis .kpi-card strong{font-size:24px}.production-card-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.production-card .card-relation-actions button{font-size:10px}.page-size-label{margin-left:auto}.list-pagination>span{flex-basis:100%;margin:0 0 2px}.production-unconnected-content{grid-template-columns:1fr;gap:10px}.production-unconnected summary{font-size:10px;line-height:1.9}.drawer-tabs>button{padding:0 8px;font-size:10px}.business-query-list button{padding:13px}.business-query-list span{font-size:10px}}

/* Keep the daily working screen dense enough to compare many work orders. */
.production-unconnected-content .day-banner{grid-column:1/-1;margin:0 0 2px;padding:8px 11px;gap:10px}
@media(min-width:761px){
  body:has(#schedulePage:not(.hidden)) .main-content{padding-top:12px}
  body:has(#schedulePage:not(.hidden)) .mode-notice{margin-bottom:10px;padding:6px 11px;font-size:10px;line-height:1.65}
  #schedulePage .page-head{align-items:center;margin-bottom:10px;gap:12px}
  #schedulePage .eyebrow{display:none}
  #schedulePage .page-head h1{font-size:25px;line-height:1.25;margin:0 0 3px}
  #schedulePage .page-head p{font-size:11px;line-height:1.65}
  #schedulePage .page-actions .btn{height:32px;font-size:11px}
  #schedulePage .production-unconnected{margin-bottom:10px}
  #schedulePage .production-unconnected summary{padding:6px 12px;font-size:10px;line-height:1.7}
  #schedulePage .production-kpis{gap:10px;margin-bottom:10px}
  #schedulePage .production-kpis .kpi-card{padding:9px 13px 10px;min-height:88px}
  #schedulePage .production-kpis .kpi-top{font-size:10px;line-height:1.5}
  #schedulePage .production-kpis .kpi-top>span:last-child{height:18px;width:18px;font-size:12px;border-radius:4px}
  #schedulePage .production-kpis strong{font-size:25px;line-height:1.15;margin:5px 0 3px}
  #schedulePage .production-kpis small{font-size:9px;line-height:1.5;display:block}
  #schedulePage .production-workspace .card-head{height:43px;padding:0 14px}
  #schedulePage .production-workspace .card-head h2{font-size:14px}
  #schedulePage .record-count{font-size:10px}
  #schedulePage .view-btn{height:25px;font-size:10px}
  #schedulePage .production-filters{padding:8px 12px;gap:8px}
  #schedulePage .schedule-filter{gap:3px;font-size:9px}
  #schedulePage .production-filters .schedule-filter select{min-width:166px;height:32px;padding-left:8px;padding-right:23px;font-size:10px}
  #schedulePage .production-filters .line-filter select{min-width:96px}
  #schedulePage .date-filter{height:32px}
  #schedulePage .date-filter input{width:128px;min-width:128px;font-size:11px;padding:5px 7px}
  #schedulePage .date-filter button{padding:0 7px;font-size:10px}
  #schedulePage .completed-filter{min-height:32px;font-size:10px;gap:5px}
  #schedulePage .production-filters .search-box{flex:1 1 180px;min-width:164px;width:180px;height:32px}
  #schedulePage .production-filters .search-box input{font-size:10px}
  #schedulePage .production-filters .filter-chip{height:32px;font-size:10px;padding:0 9px}
  #schedulePage .schedule-reading-guide{padding:5px 13px;font-size:9px;line-height:1.7}
  #schedulePage .production-table thead th:nth-child(n){height:32px;padding:6px 9px}
  #schedulePage .production-table thead .column-head th{top:32px}
  #schedulePage .production-table tbody td{padding-top:6px;padding-bottom:6px;min-height:46px;line-height:1.6}
  #schedulePage .production-table tbody td.wrap-product{line-height:1.7}
  #schedulePage .production-table .pin-btn{min-height:26px;min-width:24px;margin:0}
  #schedulePage .row-action-stack{gap:3px}
  #schedulePage .production-table .detail-button{line-height:1.7}
  #schedulePage .list-pagination{padding:8px 13px}
  #schedulePage .card-foot{min-height:35px;padding:7px 13px;font-size:9px}
}
@media(min-width:1200px){
  #schedulePage .production-table tbody td:nth-child(16),
  #schedulePage .production-table .column-head th:nth-child(14){position:sticky;right:291px;z-index:3;border-left:1px solid #cddce8;box-shadow:-5px 0 7px -6px #7892a6}
  #schedulePage .production-table .column-head th:nth-child(14){z-index:6;background:#edf5fa}
}
@media(min-width:761px) and (max-width:900px){
  #schedulePage .production-table .sticky-watch,#schedulePage .production-table .sticky-schedule{left:auto;position:static}
  #schedulePage .production-table .sticky-order,#schedulePage .production-table .sticky-order-head{left:0}
}
/* Fixed headers must sit above every horizontally scrolling column heading. */
#schedulePage .production-table thead th.sticky-watch,
#schedulePage .production-table thead th.sticky-schedule{z-index:9}
#schedulePage .production-table thead th.sticky-order-head{z-index:8}
#schedulePage .production-table thead .group-head th:last-child{z-index:9}
#schedulePage .production-table thead .group-head th:nth-last-child(2),
#schedulePage .production-table thead .column-head th:nth-last-child(1),
#schedulePage .production-table thead .column-head th:nth-last-child(2){z-index:8}
@media(min-width:1200px){
  #schedulePage .production-table thead .column-head th:nth-child(14){z-index:8}
}
.detail-field-source{display:block;font-size:9px;line-height:1.75;color:#91a3b1;margin-top:5px;font-weight:400;overflow-wrap:anywhere}
#scheduleSourceLabel{font-size:inherit;color:#60829a;font-weight:600}
.audit-summary-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;margin:8px 0 12px}
.audit-summary-facts>div{min-width:0}.audit-summary-facts dt{font-size:9px;color:#8b9eac;line-height:1.8}
.audit-summary-facts dd{font-size:11px;color:#57768d;line-height:1.8;margin:3px 0 0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.production-unconnected-content .mes-summary-status{font-weight:600;color:#557c94;margin-bottom:5px}
.mes-match-note{margin:0 0 12px;padding:10px 12px;border:1px solid #dbe8f0;border-radius:5px;background:#f2f8fc;color:#68869b;font-size:11px;line-height:1.9}
.mes-source-note,.mes-source-explanations{font-size:10px;color:#8b9fac;line-height:1.95;overflow-wrap:anywhere}
.mes-source-explanations{padding:10px 12px;border-left:2px solid #c9dfe9;background:#f8fbfd;margin:12px 0}
.mes-source-explanations p{margin:2px 0}
.mes-operation-list{display:flex;flex-direction:column;gap:9px;margin-top:15px}
.mes-operation{border:1px solid #dce7ee;border-radius:6px;overflow:hidden}
.mes-operation summary{padding:12px 14px;background:#f8fbfd;cursor:pointer;color:#587b94;font-size:11px;line-height:1.9}
.mes-operation summary>b{font-size:11px}.mes-operation summary>span{display:block;font-size:10px;color:#8da2b1;margin-left:14px}
.mes-operation-body{padding:12px 14px}.mes-operation-body dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 12px}
.mes-operation-body dl>div{min-width:0}.mes-operation-body dt{font-size:9px;color:#94a6b3;line-height:1.8}.mes-operation-body dd{font-size:11px;color:#57768b;margin:3px 0 0;line-height:1.9;overflow-wrap:anywhere}
.mes-operation-body .mes-standard-facts{padding-top:13px;border-top:1px solid #e7eef3}.mes-operation-body .mes-source-note{margin-bottom:0}
.production-detail-group .detail-field>b>span:not(.field-pending):not(.completion-value){font-size:inherit;color:inherit;margin:0}
@media(max-width:760px){.mes-operation summary{padding:10px 11px}.mes-operation-body{padding:12px 11px}.mes-operation-body dl{grid-template-columns:1fr}.mes-match-note{font-size:10px}.mes-source-explanations{font-size:10px}}
