:root{--primary:#1769e0;--primary-dark:#0e4fb6;--bg:#f3f6fb;--card:#fff;--text:#172033;--muted:#6b7280;--line:#dfe5ef;--success:#0f9f6e;--shadow:0 8px 24px rgba(31,55,92,.09)}
*{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;font-size:16px}body{padding:14px}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}
.page{width:min(1180px,100%);margin:0 auto}.page-title{font-size:22px;font-weight:700;margin:4px 0 14px}.card{background:var(--card);border:1px solid #e7ebf2;border-radius:16px;box-shadow:var(--shadow);padding:16px;margin-bottom:14px}.filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:12px;align-items:end}.filter-grid>*{min-width:0}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field label,.field>span:first-child{font-size:13px;font-weight:600;color:var(--muted)}
input[type=text],input[type=password],input[type=date],textarea,select{width:100%!important;max-width:100%;min-width:0;min-height:42px;border:1px solid #cfd7e6;border-radius:10px;background:#fff;padding:9px 11px;font:inherit;color:var(--text);outline:none}input[type=date]{display:block;min-width:0!important}textarea{min-height:130px;resize:vertical}input:focus,textarea:focus,select:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(23,105,224,.13)}input[type=submit],input[type=button],button,.btn{min-height:42px;border:0;border-radius:10px;padding:9px 20px;background:var(--primary);color:#fff;font:inherit;font-weight:600;cursor:pointer;box-shadow:0 4px 12px rgba(23,105,224,.2)}input[type=submit]:hover,input[type=button]:hover,button:hover{background:var(--primary-dark)}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.status-text{color:var(--success);font-weight:600}
.table-wrap{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}table.results{width:100%;min-width:950px;border-collapse:collapse;background:#fff;table-layout:auto}table.results th{background:#edf4ff;color:#294466;font-size:13px;font-weight:700;white-space:nowrap}table.results th,table.results td{padding:9px 7px;border:0;border-bottom:1px solid var(--line);vertical-align:middle;line-height:1.45;overflow-wrap:normal;word-break:normal}table.results tr:last-child td{border-bottom:0}table.results tr:hover td{background:#f8fbff}
/* 流程查询常用字段列宽：编号、日期、门结构、规格、款式、颜色、客户、ID。 */
table.results th:nth-child(1),table.results td:nth-child(1){min-width:102px;white-space:nowrap}table.results th:nth-child(2),table.results td:nth-child(2){min-width:76px;white-space:nowrap}table.results th:nth-child(3),table.results td:nth-child(3){min-width:88px}table.results th:nth-child(4),table.results td:nth-child(4){min-width:135px;white-space:nowrap}table.results th:nth-child(5),table.results td:nth-child(5){min-width:170px}table.results th:nth-child(6),table.results td:nth-child(6){min-width:160px}table.results th:nth-child(7),table.results td:nth-child(7){min-width:72px}table.results th:nth-child(8),table.results td:nth-child(8){min-width:86px;white-space:nowrap}
.top-nav{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;width:min(880px,100%);margin:auto;background:#fff;padding:8px;border-radius:14px;box-shadow:var(--shadow)}.top-nav a{display:flex;align-items:center;justify-content:center;min-height:46px;border-radius:10px;font-weight:700;color:#41506a}.top-nav a:hover{background:#edf4ff;color:var(--primary);text-decoration:none}.simple-grid{width:100%;border-collapse:separate;border-spacing:0 10px}.simple-grid td{border:0!important;padding:4px 6px}.login-card{max-width:430px;margin:8vh auto 0}.brand{text-align:center;margin-bottom:20px}.brand h1{font-size:24px;margin:8px 0}.brand p{color:var(--muted);margin:0}.footer{text-align:center;color:var(--muted);font-size:13px;padding:8px}
@media(max-width:760px){body{padding:10px}.page-title{font-size:19px}.card{border-radius:13px;padding:13px}.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.filter-grid .actions{grid-column:1/-1}.top-nav{gap:4px;padding:5px}.top-nav a{font-size:15px;min-height:44px}.table-wrap{overflow:visible;background:transparent;border:0;box-shadow:none}table.results,table.results tbody,table.results tr,table.results td{display:block;width:100%}table.results thead,table.results tr:first-child:has(th){display:none}table.results tr{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:12px;margin-bottom:12px}table.results td{display:grid;grid-template-columns:78px 1fr;gap:10px;padding:7px 3px;border-bottom:1px dashed #e7ebf2!important;overflow-wrap:anywhere}table.results td:last-child{border-bottom:0!important}table.results td:before{content:attr(data-label);color:var(--muted);font-size:13px;font-weight:600}table.results td:first-child a{font-size:17px;font-weight:700}.footer{font-size:12px}}
@media(max-width:430px){.filter-grid{grid-template-columns:1fr}.filter-grid .actions{grid-column:auto}.top-nav a{font-size:14px}}
@media(max-width:600px){.filter-grid .date-field{grid-column:1/-1}.date-field input[type=date]{width:100%!important;max-width:100%!important;box-sizing:border-box!important;-webkit-appearance:none;appearance:none}}
/* 异常订单入口：状态与上报按钮。 */
.exception-column{min-width:118px!important}.exception-cell{min-width:118px!important;white-space:nowrap!important}.exception-cell a{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;font-size:12px;font-weight:700;line-height:1.2;text-decoration:none}.exception-status{padding:6px 8px;background:#edf2f7;color:#526174}.exception-report-link{margin-left:6px;padding:6px 8px;background:#1769e0;color:#fff!important}.exception-status.status-working{background:#f1b51c;color:#4c3900}.exception-status.status-waiting,.exception-status.status-overdue{background:#d83b46;color:#fff}.exception-status.status-overdue{background:#a91520}.exception-status.status-normal{background:#eaf2ff;color:#1769e0}table.results tr.exception-row-working td{background:#fff8d9!important}table.results tr.exception-row-waiting td,table.results tr.exception-row-overdue td{background:#fff0f1!important}table.results tr.exception-row-overdue td{background:#ffe4e6!important}table.results tr.exception-row-working:hover td{background:#fff3bd!important}table.results tr.exception-row-waiting:hover td,table.results tr.exception-row-overdue:hover td{background:#ffdadd!important}
/* 手机端查询结果仍保持“一条订单一行”，通过横向滑动查看全部列。 */
@media(max-width:760px){.table-wrap{overflow-x:auto!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:12px!important;box-shadow:var(--shadow)!important;-webkit-overflow-scrolling:touch}table.results{display:table!important;width:100%!important;min-width:950px!important;border-collapse:collapse!important}table.results thead{display:table-header-group!important}table.results tbody{display:table-row-group!important}table.results tr,table.results tr:first-child:has(th){display:table-row!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;margin:0!important}table.results th,table.results td{display:table-cell!important;width:auto!important;padding:8px 6px!important;border-bottom:1px solid var(--line)!important;vertical-align:middle;font-size:13px;line-height:1.45}table.results td:before{display:none!important;content:none!important}table.results th:first-child,table.results td:first-child{position:sticky;left:0;z-index:2;background:#fff;box-shadow:2px 0 5px rgba(31,55,92,.08)}table.results th:first-child{z-index:3;background:#edf4ff}table.results td:first-child a{font-size:14px}table.results th:nth-child(1),table.results td:nth-child(1),table.results th:nth-child(2),table.results td:nth-child(2),table.results th:nth-child(4),table.results td:nth-child(4),table.results th:nth-child(8),table.results td:nth-child(8){white-space:nowrap!important}}
/* 结果区域独立滚动，表头在向下浏览订单时始终可见。 */
.table-wrap{max-height:68vh;overflow:auto;position:relative;-webkit-overflow-scrolling:touch}table.results th{position:sticky;top:0;z-index:5;background:#edf4ff}table.results th:first-child{z-index:7}
/* 编号列只容纳基础编号；“包套、子门”等后缀自动换行。 */
table.results th:first-child,table.results td:first-child{width:100px!important;min-width:100px!important;max-width:100px!important;white-space:normal!important}table.results td:first-child a{display:block;white-space:normal!important;word-break:normal;overflow-wrap:normal;line-height:1.4}
table.results tr.stock-filter-hidden{display:none!important}
.filter-toggle{background:#64748b;box-shadow:none}.filter-toggle:hover{background:#475569}.filter-toggle.filter-toggle-active{background:#0f9f6e}
.top-nav a.active{background:#eaf2ff;color:var(--primary)}

/* 电脑端 v23：充分利用宽屏，并让筛选和长表格更适合鼠标操作。 */
@media(min-width:980px){
  body{padding:16px 22px}
  .wide-page{width:100%;max-width:none}
  .wide-page .page-title{margin:0 0 12px;font-size:23px}
  .process-query-page .card{padding:16px}
  .process-query-filter{
    grid-template-columns:minmax(145px,.85fr) minmax(145px,.85fr) minmax(165px,1fr) minmax(165px,1fr) minmax(145px,.85fr) minmax(300px,1.45fr);
    gap:12px
  }
  .process-query-filter .actions{
    display:grid;
    grid-template-columns:max-content max-content;
    align-content:end;
    align-items:center;
    gap:8px 10px
  }
  .process-query-filter .actions .status-text{grid-column:1/-1;min-height:18px;white-space:nowrap}
  .process-query-filter input[type=submit],
  .process-query-filter .filter-toggle{padding-left:17px;padding-right:17px;white-space:nowrap}
  .wide-page .table-wrap{max-height:calc(100vh - 205px);scrollbar-gutter:stable}
  .wide-page .table-wrap::-webkit-scrollbar{width:12px;height:12px}
  .wide-page .table-wrap::-webkit-scrollbar-track{background:#edf1f7;border-radius:999px}
  .wide-page .table-wrap::-webkit-scrollbar-thumb{background:#aeb8c7;border:3px solid #edf1f7;border-radius:999px}
  .wide-page .table-wrap::-webkit-scrollbar-thumb:hover{background:#7d899a}
  .wide-page table.results{min-width:1450px;font-size:14px}
  .wide-page table.results th,.wide-page table.results td{padding:10px 8px}
  .wide-page table.results tbody tr:nth-child(even) td{background:#f8fbff}
  .wide-page table.results tbody tr:hover td{background:#edf5ff}
  .wide-page table.results th:first-child,
  .wide-page table.results td:first-child{position:sticky;left:0}
  .wide-page table.results th:first-child{z-index:8;box-shadow:3px 0 8px rgba(31,55,92,.09)}
  .wide-page table.results td:first-child{z-index:3;background:#fff;box-shadow:3px 0 8px rgba(31,55,92,.07)}
  .wide-page table.results tbody tr:nth-child(even) td:first-child{background:#f8fbff}
  .wide-page table.results tbody tr:hover td:first-child{background:#edf5ff}
  .top-nav{width:100%;max-width:none;padding:7px 10px}
  .top-nav a{min-height:48px}
}
@media(min-width:980px) and (max-width:1199px){
  .process-query-filter{grid-template-columns:repeat(3,minmax(0,1fr))}
  .process-query-filter .actions{grid-column:1/-1}
}
