.inline-conflict{color:#a63630;background:#fff2ee;border-left:3px solid #c65e4c;padding:8px 10px;margin-top:8px;font-size:12px;line-height:1.6;white-space:normal;min-width:210px;max-width:480px}.simple-more{margin:16px 0;padding:12px;background:#f5f8fa;border-radius:8px}.simple-more summary{cursor:pointer}.engineering-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start}.engineering-layout aside.dimension-panel{position:sticky;top:15px;width:auto;height:auto;display:block;background:white;color:#193c50;border:1px solid #dce5ec;border-radius:10px;padding:18px;overflow:auto;max-height:80vh}.dimension-panel h3{font-size:16px}.dimension-panel small{display:block;color:#647585}.dimension-reference{width:100%;height:auto;margin:10px 0}.dimension-values{display:grid;grid-template-columns:1.2fr 1fr;font-size:12px;gap:10px}.dimension-values dd{margin:0;font-weight:bold;overflow-wrap:anywhere}.engineering-table table{min-width:960px}.engineering-table td{vertical-align:top;white-space:normal}.engineering-table td:nth-child(3){min-width:180px}.engineering-table td:nth-child(4){min-width:170px}.engineering-table td:last-child{min-width:150px;position:sticky;right:0;background:white;box-shadow:-2px 0 4px #dce5ec}.engineering-table td small{display:block;max-width:190px;overflow-wrap:anywhere}.selected-spec td{background:#edf3f8}.engineering-table details{min-width:140px;font-size:12px}.engineering-table details p{margin:7px 0}.agreement-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:22px}.agreement-preview{width:100%;max-height:550px;object-fit:contain;background:#eef3f7}.template-pages{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0}@media(max-width:1050px){.engineering-layout,.agreement-layout{grid-template-columns:1fr}.engineering-layout aside.dimension-panel{position:static;max-height:350px}.dimension-reference{max-width:260px;float:left;margin-right:20px}.dimension-values{min-width:250px}.inline-conflict{max-width:100%}}
.source-details{padding:12px 16px;margin-bottom:14px;background:#f2f7fa;border-radius:8px}.source-details summary{cursor:pointer}.source-details pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.7 sans-serif;max-height:400px;overflow:auto}.detail-grid small{display:block;color:#687b8a;margin-top:5px}
.head-figure{width:100%;aspect-ratio:1.9;overflow:hidden;background:white}.head-figure img{display:block;width:100%;height:auto}.own-pdf{margin:14px 0;padding:10px 0;border-bottom:1px solid #e0e8ec}.spec-filters{align-items:end;flex-wrap:wrap}.spec-filters .field{min-width:140px;max-width:240px}.engineering-table td{cursor:pointer}.engineering-table td .small{display:block;margin-top:8px}.spindle-layout{grid-template-columns:350px minmax(0,1fr)}.dimension-panel svg{width:100%;display:block;margin:12px 0;background:#f7fafb;border-radius:8px}.dimension-panel svg text{font:10px sans-serif;fill:#526676}.curve-legend{display:flex;gap:25px;font-size:12px}.curve-legend span:first-child{color:#127aa0}.curve-legend span:last-child{color:#d97835}@media(max-width:1050px){.spindle-layout{grid-template-columns:1fr}.spindle-layout aside.dimension-panel{max-height:none}}
.review-cell{cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:5px}.review-cell:hover{background:#e4eef6}.pending-inline button{margin:4px}.direct-review{color:#a85412!important;background:#fff5e6!important}#curve-canvas{display:block;width:100%;height:auto;border:1px solid #bdcdd8;cursor:crosshair;touch-action:none}.curve-sample-list{max-height:130px;overflow:auto;font:12px/1.6 monospace}.pdf-preview .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pdf-preview button{margin:3px}.pdf-preview #curve-guide{color:#185d73;font-size:13px}
.dimension-panel .head-figure{cursor:zoom-in;border:1px solid #e0e8ec;border-radius:8px}.head-figure{aspect-ratio:1.72}.head-figure img{margin-top:-2%;width:100%}.dimension-panel .head-figure:focus-visible{outline:3px solid #1687a7}.diagram-zoom-controls{display:flex;gap:8px;align-items:center;margin:12px 0}.diagram-zoom-scroll{overflow:auto;max-height:65vh;background:#fff;border:1px solid #d8e2e8}.large-head-figure{width:100%;flex:none}.zoom-dimensions{display:flex;flex-wrap:wrap;gap:16px;padding:12px;background:#f0f7fa}.zoom-dimensions>div{min-width:95px}.zoom-dimensions dt{font-size:13px}.zoom-dimensions dd{margin:5px 0;font-weight:700}
.head-figure{aspect-ratio:1.82}.head-figure img{margin-top:-5%}

/* Browsing and settings have separate controls and clear focus states. */
.icon-settings{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;min-width:42px;padding:0;border:1px solid #cbd9e2;border-radius:10px;background:#fff;color:#34566a;cursor:pointer;font-size:24px;line-height:1}
.icon-settings:hover{background:#eaf0f5;border-color:#005ead;color:#003c6d}
.icon-settings.is-active{background:#e0eaf3;border-color:#005ead;color:#003968;box-shadow:inset 0 0 0 1px #005ead}
.icon-settings:focus-visible{outline:3px solid #3675a9;outline-offset:3px}
.page-settings-panel{margin:0 0 18px;padding:16px 20px;background:#f0f4f8;border:1px solid #c7d5e1;border-radius:12px}
.page-settings-panel[hidden]{display:none}
.settings-panel-title{display:flex;gap:16px;align-items:baseline;flex-wrap:wrap;margin-bottom:14px}
.settings-panel-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.settings-panel-controls label{display:flex;align-items:center;gap:10px}
#content>.heading{gap:20px;align-items:center;margin-bottom:24px}
#content>.heading .actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
#content>.filterbar{padding:14px 16px;background:#fff;border:1px solid #dce5ec;border-radius:12px;gap:12px;margin-bottom:18px;align-items:center;flex-wrap:wrap}
#content>.spec-filters{align-items:flex-end}
.spec-filters .field{margin-bottom:0;flex:0 1 190px;min-width:150px}
.spec-filters .search{flex:1 1 220px;min-width:180px;max-width:480px}
.dimension-panel h3{margin-top:0;line-height:1.5;overflow-wrap:anywhere}
.dimension-panel figure{margin:16px 0}
.dimension-panel figcaption{font-size:12px;color:#607b8b;margin-bottom:8px}
.dimension-panel [data-original-page]{border:1px solid #dce5ec;border-radius:8px;overflow:hidden;background:#fff}
.engineering-table .selected-spec td{background:#eaf1f7}
.engineering-table tbody tr:hover td{background:#f1f8fa}
@media(max-width:700px){#content>.heading{align-items:flex-start;flex-direction:column}#content>.filterbar .search{width:100%;max-width:none}.settings-panel-controls{align-items:stretch;flex-direction:column}.settings-panel-controls label{align-items:flex-start;flex-direction:column}.spec-filters .field{flex:1 1 140px}.icon-settings{width:44px;height:44px}}

.pdf-upload-slot{display:flex;flex-direction:column;gap:8px;min-width:175px;padding:10px 0}.pdf-upload-slot+.pdf-upload-slot{border-top:1px solid #dce5ec;margin-top:10px}.pdf-upload-slot strong{font-size:12px}.pdf-upload-slot button{align-self:flex-start}

/* Compact spindle comparison: keep each numeric value intact and file actions collapsed. */
.spindle-layout{grid-template-columns:300px minmax(0,1fr);gap:16px}
.spindle-layout .engineering-table table{table-layout:fixed;width:100%;min-width:1320px}
.spindle-layout .engineering-table th,.spindle-layout .engineering-table td{padding:12px 10px;box-sizing:border-box;line-height:1.5}
.spindle-layout .engineering-table th{white-space:normal;font-size:12px}
.spindle-layout .engineering-table td{min-width:0;overflow-wrap:normal}



.spindle-layout .engineering-table td:nth-child(-n+7){white-space:nowrap;font-variant-numeric:tabular-nums}
.spindle-layout .engineering-table td:nth-child(-n+4) small{display:none}






.spindle-layout .engineering-table td:nth-child(8) .link{text-align:left;overflow-wrap:anywhere;line-height:1.5;padding:0}
.spindle-layout .engineering-table td:last-child{position:static;min-width:0;box-shadow:none}
.spindle-layout .engineering-table details{min-width:0}
.spindle-layout .engineering-table td .small{margin-top:6px;padding:4px 9px}
.pdf-actions-menu>summary{cursor:pointer;border:1px solid #d6e3e9;border-radius:6px;padding:6px 9px;background:#fff;color:#244757;white-space:nowrap;list-style:none}
.pdf-actions-menu>summary::-webkit-details-marker{display:none}
.pdf-actions-menu[open]>summary{background:#e5ecf2;border-color:#98b1c6}
.pdf-actions-body{padding-top:6px}
.spindle-layout .pdf-upload-slot{min-width:0;gap:5px;padding:8px 0}
.spindle-layout .pdf-upload-slot+.pdf-upload-slot{margin-top:4px}
.spindle-layout .pdf-upload-slot strong,.spindle-layout .pdf-upload-slot small{font-size:11px}
@media(max-width:1050px){.spindle-layout{grid-template-columns:1fr}}

/* Reserve room for source precision and rounded reference, e.g. 95.5(96). */
.spindle-layout .engineering-table table{min-width:1406px}




.duty-group+.duty-group{margin-top:8px}.duty-group strong{display:block;font-size:11px;color:#617e8c;font-weight:500;white-space:normal}.duty-more{margin-top:8px}.duty-more summary{cursor:pointer;color:#084b82;font-size:11px}.duty-more .duty-group{margin-top:8px}

/* PDF-only notice must occupy its own block rather than inline label fragments. */
#review-form .review-pdf-only{display:block;box-sizing:border-box;width:100%;margin:16px 0;padding:14px 16px;white-space:normal}
#review-form .review-pdf-only>label{display:flex;align-items:flex-start;gap:8px;margin:0;line-height:1.6}
#review-form .review-pdf-only input{flex:0 0 auto;width:16px;height:16px;margin:4px 0 0}
#review-form .review-pdf-only>small{display:block;margin:6px 0 0 24px;line-height:1.6;overflow-wrap:anywhere}
#review-form .review-layout>div{min-width:0}
#review-form .modal-foot{flex-wrap:wrap;gap:8px}

.duty-maximum{margin-top:6px;padding-top:5px;border-top:1px solid #dce5ec;font-weight:600}

.inline-task-editor-row>td{padding:8px 12px 16px;background:#f3f6f9;white-space:normal}.inline-task-editor-row .task-editor{margin:0}.inline-task-editor-row .form-grid{min-width:0}tr[data-edit-task][aria-expanded="true"]{background:#e7eef4}

.task-completion{display:grid;grid-template-columns:auto minmax(145px,1fr) auto;gap:6px;align-items:center;max-width:360px;white-space:normal}.task-completion label{display:flex;align-items:center;gap:5px;margin:0;white-space:nowrap}.task-completion input[type="checkbox"]{width:auto;margin:0}.task-completion input[type="date"]{width:100%;padding:5px}.task-completion small,.task-completion .task-done-reason,.task-completion .error{grid-column:1/-1}.task-completion .task-done-save{grid-column:3;grid-row:1}

.task-assignee{display:grid;gap:6px;min-width:145px;max-width:210px;white-space:normal}.task-assignee select,.task-assignee input{width:100%;padding:6px}.task-assignee button{justify-self:start}

/* Column widths follow the current 14-column spindle schema. */
.spindle-layout{grid-template-columns:270px minmax(0,1fr)}
.spindle-layout .engineering-table{min-width:0;overflow:auto}
.spindle-layout .engineering-table table{width:1606px;min-width:1606px;table-layout:fixed}
.spindle-layout .engineering-table th:nth-child(n){width:auto;white-space:normal;word-break:normal;overflow-wrap:normal;vertical-align:middle}
.spindle-layout .engineering-table td:nth-child(n){min-width:0;white-space:normal;overflow-wrap:anywhere;vertical-align:top;padding:12px}
.spindle-layout .engineering-table td:nth-child(n+4):nth-child(-n+10){white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}
.spindle-layout .engineering-table td:nth-child(n) small{display:block}
.spindle-layout .engineering-table td:nth-child(n+4):nth-child(-n+7) small{display:none}
.spindle-layout .engineering-table td:nth-child(11) .link{text-align:left;white-space:normal;overflow-wrap:anywhere;padding:0;line-height:1.6;max-width:100%}
.spindle-layout .engineering-table td:nth-child(13) .badge{display:inline-block;white-space:nowrap;max-width:100%;box-sizing:border-box}
.spindle-layout .engineering-table td:last-child button{max-width:100%;white-space:normal;height:auto;line-height:1.5;box-sizing:border-box}
.spec-filters{gap:12px}.spec-filters>button,.spec-filters>span{flex-shrink:0}
@media(max-width:1050px){.spindle-layout{grid-template-columns:minmax(0,1fr)}}

.spindle-layout .engineering-table th:nth-child(-n+3),.spindle-layout .engineering-table td:nth-child(-n+3){padding-left:8px;padding-right:8px;white-space:nowrap}.spindle-layout .engineering-table td:nth-child(1){text-align:center}.spindle-layout .engineering-table th:nth-child(1){text-align:center}

.spindle-layout .engineering-table th:nth-child(6),.spindle-layout .engineering-table td:nth-child(6){padding-left:16px;padding-right:18px}.spindle-layout .engineering-table td:nth-child(6){line-height:1.8}.spindle-layout .engineering-table td:nth-child(6) .duty-maximum{margin-top:8px;padding-top:7px}

/* Shared sizing: grid children must shrink before their internal tables scroll. */
.grid > *, .form-grid > *, .agreement-layout > *, .engineering-layout > * {min-width:0}
#content .field {min-width:0}
#content .filterbar {row-gap:14px;column-gap:14px}
#content .filterbar .field {margin-bottom:0}
#content .filterbar .tabs {max-width:100%;flex-wrap:wrap}
#content .filterbar input, #content .filterbar select {max-width:100%}
#content .page-data-table {overflow:auto;scrollbar-gutter:stable}
#content .page-data-table thead th {position:sticky;top:0;z-index:3;background:#f3f7fa;box-shadow:0 1px 0 #dce5ec}
#content .page-data-table:focus-visible {outline:2px solid #155f9b;outline-offset:-2px}
#content .page-data-table.page-table-locked {overflow-y:hidden}   /* r239ui：表格頂端捲到頂之前先捲頁面（work-items.js sizePageTable） */
#content[data-page="head"] .engineering-table thead th:last-child {right:0;z-index:4}
.overview-summary-table {min-width:980px}
.overview-summary-table td {white-space:normal;overflow-wrap:anywhere}
.overview-summary-table td:nth-child(1) {text-align:center;width:80px}
.overview-summary-table td:nth-child(2) {min-width:160px}
.overview-summary-table td:nth-child(3) {min-width:160px}
.overview-summary-table td:nth-child(4) {white-space:nowrap}
.overview-summary-table td:nth-child(5),.overview-summary-table td:nth-child(6) {min-width:126px}
.overview-source-difference {display:block;width:max-content;margin-top:6px;color:#a63630;background:#fff2ee}
#content[data-page="overview"] > .grid {align-items:start}
@media (max-width:1700px) {#content[data-page="overview"] > .grid {grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px) {
 #content > .filterbar {padding:12px}
 #content .filterbar .search {min-width:0;flex-basis:100%}
 .stats {grid-template-columns:repeat(2,minmax(0,1fr))}
 .stat {min-width:0;padding:16px;overflow-wrap:anywhere}
 .card-head,.modal-foot {flex-wrap:wrap}
 .detail-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 .detail-grid > div {min-width:0;overflow-wrap:anywhere}
 .form-grid input,.form-grid select,.form-grid textarea {min-width:0;max-width:100%}
 #permission-preview-bar select {max-width:100%;margin:8px 0}
}

.source-conflict-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.source-conflict-table{max-height:55vh;margin:16px 0}.source-conflict-table table{min-width:580px;table-layout:fixed}.source-conflict-table th:first-child{width:64px}.source-conflict-table th,.source-conflict-table td{white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top}.source-conflict-table thead th{position:sticky;top:0;background:#f3f7fa}.source-conflict-table input[type=checkbox]{width:18px;height:18px}

/* Special orders share the same orange identification in overview and order control. */
.badge.order-type-special,.badge.特殊,select.order-type-special{background:#fff3df;color:#92400e;border:1px solid #e6a34b;font-weight:700}

button.source-conflict-link{cursor:pointer;text-align:left;white-space:normal;border:1px solid #d98a79;border-left:3px solid #c65e4c;color:#96382c;background:#fff2ee;font:inherit;line-height:1.6}
button.inline-conflict.source-conflict-link{display:block;font-size:12px}
button.source-conflict-entry{width:100%}
button.source-conflict-link:hover{background:#ffe3d9;border-color:#ad4d37;text-decoration:underline}
button.source-conflict-link:focus-visible{outline:3px solid #00467f;outline-offset:3px}
.source-conflict-hint{display:block;font-weight:600;margin-top:3px}
button.overview-source-difference{font-size:12px;white-space:nowrap}

dialog[open]{resize:both;overflow:auto;min-width:min(360px,calc(100vw - 24px));min-height:180px;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important}
dialog .modal-head,dialog>header{cursor:move;touch-action:none}
dialog .modal-head button,dialog>header button{cursor:pointer}
.task-delay-field{grid-column:1/-1;display:flex!important;flex-direction:column;align-items:stretch!important;gap:5px;font-size:12px}
.task-delay-field input,.task-delay-field select{width:100%;min-width:180px}
.task-delay-field [hidden]{display:none!important}
.task-completion .task-done-save{min-width:56px;white-space:nowrap}

.image-float{max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important}
dialog .form-grid{grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))}
dialog .form-grid>.field{min-width:0}
dialog .modal-foot{flex-wrap:wrap}
dialog[open]{overflow-x:hidden}dialog .modal-body{max-width:100%;overflow-x:auto}dialog .modal-head,dialog .modal-foot{max-width:100%;min-width:0}dialog .modal-head>div{min-width:0;overflow-wrap:anywhere}

/* Compact shared page chrome: keep records above the fold. */
main>header{height:48px;padding:0 20px}
#content{padding:16px 20px 30px;max-width:none}
#content>.heading,#content>.page-head{margin-bottom:12px;gap:12px;align-items:center}
#content>.heading h1,#content>.page-head h1{font-size:1.4rem;margin:0;line-height:1.35}
.page-help{font-size:.8rem;color:var(--muted);margin-top:3px}
.page-help summary,.order-data-tools summary,.selection-help summary,.permission-tools summary{cursor:pointer}
.page-help[open] p{max-width:65ch;margin:5px 0}
#content>.filterbar{gap:8px;margin-bottom:10px;padding:10px 12px}
#content .filterbar input,#content .filterbar select{padding:7px 9px}
#content .filterbar button{padding:7px 10px}
#content>.filterbar .search{min-width:180px;max-width:340px}
.order-data-tools,.selection-help{font-size:.8rem;color:var(--muted)}
.order-data-tools>div,.selection-help>p{padding:8px 0;max-width:440px;white-space:normal}
.permission-tools{margin:6px 20px;padding:5px 10px;border:1px solid #b7d6dd;border-radius:6px;background:#fff;font-size:.8rem}
.permission-tools>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-top:6px}
.permission-tools.preview-active{border-color:#e59022;background:#fff7e8}
.permission-tools button{padding:5px 9px}
#content .work-report-toolbar{padding:12px 16px}
#content .work-report-toolbar h2{margin-bottom:6px}
@media(max-width:760px){#content{padding:12px 10px 24px}main>header{padding:0 12px;height:44px}#content>.heading{align-items:stretch}.permission-tools{margin:5px 10px}.filterbar>*{max-width:100%}.order-data-tools[open],.selection-help[open]{flex-basis:100%}}

main>header{position:relative;gap:12px}
main>header .header-right{margin-left:auto}
main>header>.permission-tools{margin:0;padding:4px 8px;flex:none}
main>header>.permission-tools[open]>div{position:absolute;right:12px;top:calc(100% - 2px);z-index:20;max-width:min(540px,calc(100vw - 24px));padding:12px;background:white;border:1px solid #b7d6dd;border-radius:6px;box-shadow:0 5px 20px #1232}
#content{padding-top:10px}
#content>.heading,#content>.page-head{margin-bottom:8px}
@media(max-width:760px){main>header{flex-wrap:wrap;height:auto;min-height:44px;padding:6px 10px}.permission-tools.preview-active summary{color:#975700}}

/* Keep summary results above secondary report operations. */
.schedule-filterbar{padding:8px 12px!important;margin-bottom:8px!important;gap:8px!important}.calendar-summary>h2{margin:8px 0}.calendar-summary>.sub{font-size:12px;margin:4px 0 8px}.work-report-toolbar>summary{cursor:pointer;font-weight:600}.work-report-toolbar[open]>summary{margin-bottom:10px}

.heading{align-items:center;gap:12px}.heading>.actions{flex:1;justify-content:flex-end;flex-wrap:wrap}.schedule-period-status{margin:0 8px 0 0;font-size:12px}.schedule-filterbar>.field{min-width:110px;flex:0 1 190px}.schedule-filterbar>.field label{font-size:12px}.schedule-filterbar .calendar-navigation{gap:4px}.schedule-filterbar input,.schedule-filterbar select{padding:7px 9px}.calendar-stat-cards{margin-bottom:10px}
/* Shared drawing/specification pages: dedicate useful width to the original figure. */
.engineering-layout,.engineering-layout.spindle-layout{grid-template-columns:clamp(360px,30vw,560px) minmax(0,1fr);gap:14px}
.engineering-layout aside.dimension-panel{width:auto;min-width:0;padding:14px;box-sizing:border-box}
.dimension-panel [data-spindle-pdf] figure{margin:10px 0}.dimension-panel .head-figure{aspect-ratio:auto}
.dimension-panel h3{margin:0 0 8px;overflow-wrap:anywhere}.dimension-panel>p,.dimension-panel>.dim-body>p{font-size:13px;margin:6px 0}
@media(max-width:1050px){.engineering-layout,.engineering-layout.spindle-layout{grid-template-columns:minmax(0,1fr)}.engineering-layout aside.dimension-panel{max-height:none}.dimension-panel [data-spindle-pdf]{max-width:720px;margin:auto}}
/* r240ui（使用者 2026-11-26「版面問題 要涵蓋全部類似的頁面」）：
   ①二軸頭／主軸篩選：標籤放在選單左邊（原本標籤疊在選單上面，篩選列高 85px）
   ②KAC 篩選：欄位多，標籤留在上面但縮小、選單內距變小（同排程頁）
   ③尺寸面板：1050px 以下收成一行「▸ 尺寸圖：型號」（engineering.js dimPanel），寬畫面不顯示這一行 */
#content>.spec-filters{align-items:center}
.spec-filters .field{flex-direction:row;align-items:center;gap:6px;flex:0 1 240px;min-width:170px}
.spec-filters .field label{flex:none;white-space:nowrap}
.spec-filters .field select{width:auto;flex:1 1 auto;min-width:0;padding:7px 9px}
@media(max-width:700px){.spec-filters .field{flex:1 1 200px}}
/* ④匯入與人工審核：批次刪除那組併到「顯示已完成」同一列（v1.js reviewsView，原本兩列） */
.review-bulk{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}
.kac-filters>.field{gap:3px}.kac-filters>.field label{font-size:12px}.kac-filters input,.kac-filters select{padding:7px 9px}
.dim-toggle{display:none}
@media(max-width:1050px){
 .dim-toggle{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:4px 6px;border:0;background:transparent;color:#173f50;font-weight:700;text-align:left;cursor:pointer}
 .dim-name{min-width:0;overflow-wrap:anywhere}
 .dim-caret::before{content:'▾'}.dim-folded .dim-caret::before{content:'▸'}
 .engineering-layout aside.dimension-panel.dim-folded{padding:4px 10px}
 .dim-folded>.dim-body{display:none}
}

#content .heading .catalog-compact-filters{margin:0;padding:0;background:transparent;border:0;box-shadow:none;gap:8px;flex:1;justify-content:flex-end}.catalog-compact-filters .search{width:clamp(180px,22vw,360px)}

@media(min-width:1051px){.engineering-layout.figure-expanded{grid-template-columns:minmax(520px,55%) minmax(0,1fr)}}

/* Phones only: schedule filters fold under 「篩選條件」, heading buttons compact; desktop unchanged. */
.filter-toggle{display:none}
@media(max-width:760px){
.schedule-filterbar .filter-toggle{display:inline-flex;align-items:center;padding:8px 12px}
.schedule-filterbar:not(.filters-open)>.field{display:none}
.schedule-filterbar .calendar-navigation{display:flex;gap:6px;flex:1 1 100%}
.schedule-filterbar .calendar-navigation button{flex:1;padding:8px 6px}
.schedule-filterbar #calendar-date{flex:1 1 0;min-width:0}
.schedule-filterbar.filters-open>.field{flex:1 1 100%}
.heading>.actions{gap:6px}
.heading>.actions button{padding:7px 10px;font-size:.85rem}
}

.delay-picks{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 10px}
.delay-picks button{padding:4px 10px;font-size:.8rem;border-radius:14px}
.delay-project{display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px;margin:-4px 0 10px;padding:8px;border:1px solid var(--border);border-radius:8px}
.delay-project label{flex:1 1 220px;margin:0}
.delay-project .error{flex-basis:100%;margin:0}
.delay-project .error:empty{display:none}

/* 登入逾時: sign in again over the current page */
dialog.relogin{width:min(400px,calc(100vw - 32px))}
.relogin form{padding:22px;display:flex;flex-direction:column;gap:10px}
.relogin h2{margin:0}
.relogin .sub{margin:0}
.relogin .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}

/* OA 系統配色（Bootstrap 3 label：default #777、warning #f0ad4e、danger #d9534f），與 OA「審核中／已退回」標籤一致 */
/* 生產通知單審核狀態警示（審核中／已退回／未確認；曾匯入＋審核中＝訂單修改中） */
.notice-review-banner{display:flex;flex-direction:column;gap:4px;margin:0 0 12px;padding:10px 14px;border:1px solid #ebccd1;border-left:4px solid #d9534f;border-radius:4px;background:#f2dede;color:#a94442}
.notice-review-banner span{font-weight:600}
.notice-review-banner .sub{margin:4px 0 0;color:#a94442}
.notice-review-alert{margin:6px 0;padding:6px 10px;border:1px solid #ebccd1;border-left:4px solid #d9534f;border-radius:4px;background:#f2dede;color:#a94442;font-weight:600}
.notice-review-badge{display:inline-block;margin-left:4px;padding:.2em .6em .3em;border-radius:.25em;background:#d9534f;color:#fff;font-size:75%;font-weight:700;line-height:1;white-space:nowrap;vertical-align:baseline}

/* 功能狀態：建構中＝label-default、更新中＝label-warning、暫停開放＝label-danger */
.feature-tag{display:inline-block;margin-left:6px;padding:.2em .6em .3em;border-radius:.25em;color:#fff;font-size:75%;font-weight:700;line-height:1;vertical-align:middle;white-space:nowrap;flex:none}
#nav .calendar-subnav .feature-tag{margin-left:4px;padding:.15em .45em .2em;font-size:70%}
.feature-tag.building{background:#777}
.feature-tag.updating{background:#f0ad4e}
.feature-tag.closed{background:#d9534f}
.feature-notice{margin:0 0 12px;padding:10px 14px;border:1px solid #ddd;border-left:4px solid #777;border-radius:4px;background:#f5f5f5;color:#333}
.feature-notice.updating{border-color:#faebcc;border-left-color:#f0ad4e;background:#fcf8e3;color:#8a6d3b}
.feature-notice.closed{border-color:#ebccd1;border-left-color:#d9534f;background:#f2dede;color:#a94442}
.feature-notice p{margin:4px 0 0}
#nav .feature-closed-hide{display:none!important}   /* 暫停開放的頁面不在一般使用者選單（總檢查 F2） */
.brand-wide-input{min-width:300px}   /* 主軸品牌設定的系列／介面規格；手機卡片模式由 table.rt-cards input 取消 */

/* Long alert messages (e.g. overlapping work lists) stay two lines; the full text is in the tooltip and the opened task. */
.alert-msg{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.order-manage{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}   /* r239ui：訂單管理按鈕併在篩選列最後、靠右（imports.js orderToolGroups） */

.helper-update-banner{position:sticky;top:0;z-index:50;display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:8px 16px;background:#fcf8e3;border-bottom:2px solid #f0ad4e;color:#8a6d3b;font-size:14px}.helper-update-banner button{margin:0}.helper-update-banner [data-helper-update-close]{margin-left:auto;font-size:18px;background:none;border:0;cursor:pointer;color:#8a6d3b}

.helper-live-status{margin:0 0 10px;padding:6px 10px;border-radius:4px;border-left:4px solid #5bc0de;background:#eef8fb;font-size:13px}.helper-live-status.ok{border-color:#5cb85c;background:#eff8ef}.helper-live-status.warn{border-color:#f0ad4e;background:#fcf8e3;color:#8a6d3b}.helper-live-status button{margin:0 8px;padding:2px 10px}.helper-live-status .sub{display:block;margin-top:2px}

/* 助手更新流程圖 */
.helper-flow .hf-tabs{display:flex;gap:6px;margin:6px 0 10px}.hf-steps{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.hf-step{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid #bbcdd5;border-radius:18px;background:#fff;cursor:pointer}.hf-step.active{border-color:#d9534f;box-shadow:0 0 0 2px rgba(217,83,79,.25);font-weight:700}.hf-n{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#2d6a7a;color:#fff;font-size:12px}.hf-arrow{color:#999}.hf-detail{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1.4fr);gap:16px;margin-top:12px;align-items:start}@media(max-width:760px){.hf-detail{grid-template-columns:1fr}}.hf-win{border:1px solid #c9d3da;border-radius:8px;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.08);overflow:hidden;font-size:13px}.hf-title{background:#e9eef2;padding:6px 10px;font-weight:700}.hf-body{padding:10px}.hf-chrome{display:flex;align-items:center;gap:8px;background:#eef1f4;padding:6px 8px}.hf-url{flex:1;background:#fff;border-radius:12px;padding:3px 10px;color:#555}.hf-icons{display:flex;gap:8px}.hf-ico{position:relative;display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:4px;background:#fff;font-size:12px}.hf-menu{margin:4px 8px 10px auto;width:220px;border:1px solid #ddd;border-radius:6px;padding:6px}.hf-menu div{padding:5px 8px;border-radius:4px}.hf-card{border:1px solid #ddd;border-radius:8px;padding:10px}.hf-cardfoot{display:flex;gap:12px;align-items:center;margin-top:8px;color:#1a73e8}.hf-reload{position:relative;font-size:16px}.hf-toggle{display:inline-block;width:30px;height:16px;border-radius:8px;background:#ccc;position:relative}.hf-toggle.on{background:#1a73e8}.hf-row{display:flex;gap:8px;align-items:center;margin:6px 0}.hf-right{margin-left:auto}.hf-btn{position:relative;display:inline-block;padding:4px 12px;border:1px solid #bbb;border-radius:14px;background:#fff;margin:2px}.hf-ok{color:#2e7d32;font-weight:700}.hf-hit{outline:3px solid #d9534f;outline-offset:2px;border-radius:6px}.hf-mark{position:absolute;top:-12px;right:-14px;background:#d9534f;color:#fff;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;font-size:12px;font-weight:700}

.helper-flow-all .hf-all-h{margin:14px 0 4px;font-size:17px;border-bottom:2px solid #2d6a7a;padding-bottom:4px}.helper-flow-all .hf-all-step{border-bottom:1px dashed #d5dde3;padding-bottom:12px}.helper-flow h2 [data-hf-all]{margin-left:8px;font-size:14px}

.helper-card .helper-status-row{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}.helper-card .helper-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 4px}.helper-card .helper-actions>*{margin:0}.helper-card .helper-short{margin:6px 0;font-size:13px}.helper-card .helper-more{margin-top:8px}.helper-card .helper-more>summary{cursor:pointer;font-weight:600;color:#2d6a7a}.helper-card .helper-more h3{font-size:15px;margin:14px 0 4px}

/* OA 同步視窗：預計生產表／生產通知單分開，步驟由上而下 */
.oa-sync .oa-sync-kind{margin:0 0 10px}.oa-sync .oa-sync-kind .badge{color:#fff;padding:2px 8px;border-radius:3px}.oa-sync-summary .oa-sync-kind .badge{background:#337ab7}.oa-sync-notice .oa-sync-kind .badge{background:#8e44ad}.oa-sync .oa-step{border:1px solid #dde3e8;border-radius:6px;padding:8px 14px;margin:0 0 10px;background:#fff}.oa-sync .oa-step h3{font-size:15px;margin:2px 0 6px}.oa-sync .oa-models{display:flex;flex-wrap:wrap;gap:4px 18px}.oa-sync .oa-model-quick{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}.oa-sync .oa-model-quick button.active{background:var(--teal);color:#fff;border-color:var(--teal)}.oa-sync .oa-howto{margin:4px 0 4px 20px;padding:0}.oa-sync .oa-manual>summary{cursor:pointer;font-weight:700;font-size:15px}.oa-sync .oa-manual[open]>summary{margin-bottom:6px}

/* 工作排程：開始／完成兩格、手動新增欄、預計完成日重疊 */
.calendar-mark{font-style:normal;font-size:11px;font-weight:600;padding:0 6px;margin-right:5px;border-radius:8px;background:#e2eaf0;color:#244a6a}
.calendar-event.start{border-left-style:dashed}
.calendar-event.start .calendar-mark{background:#eceff5;color:#4a5466}
.calendar-event.overlap{border-color:#d08a00;background:#fff6e0}
.calendar-lane-custom{margin-top:6px;padding:4px;border:1px dashed #b9c9d2;border-radius:8px}
.calendar-lane-custom>small{display:block;color:#5d6f7a;margin:0 0 3px 2px}
.calendar-overlap{border-left:4px solid #d08a00}
.calendar-overlap ul{margin:6px 0 0;padding-left:18px}
.calendar-overlap li{margin:4px 0}
.calendar-overlap li button{margin:2px 4px}

/* 二軸頭馬達規格：主頁面額定扭力／剎車力／重量，完整表格展開 */
.hm-brief,.head-motor-brief{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:13px;line-height:1.5}
.hm-axis{white-space:nowrap}.hm-axis b{color:#244a6a;margin-right:3px}
.head-motor{margin-top:12px}.head-motor h4{margin:0 0 4px}
.head-motor-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:6px}
.head-motor-table th,.head-motor-table td{border:1px solid #dbe4eb;padding:4px 6px;text-align:left}
.head-motor-table thead th{background:#eef4f6}

/* 機型權限申請／審核與人員群組 */
.access-area{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:16px;margin-top:16px}
.access-models{display:flex;flex-wrap:wrap;gap:4px 14px;margin:6px 0}
.access-models label{white-space:nowrap}
.access-req{border-top:1px solid #dbe4eb;padding:10px 0}.access-req:first-child{border-top:0;padding-top:0}
.access-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:6px}.access-actions input{flex:1;min-width:160px}
.access-group{border:1px solid #dbe4eb;border-radius:8px;padding:8px 10px;margin:8px 0}.access-group legend input{width:12em}
.access-badge{display:inline-block;min-width:18px;padding:0 6px;margin-left:6px;border-radius:9px;background:#c0392b;color:#fff;font-size:12px;line-height:18px;text-align:center}
.access-alert{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.head-reanalyze{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin-top:10px}

/* 左側選單：同一項目有兩個以上功能狀態標籤（建構中＋暫停開放）時，標籤換到下一行，選單文字不被擠成一字一行 */
nav button:has(.feature-tag){flex-wrap:wrap;row-gap:4px}
nav button .feature-tag{margin-left:0}


/* 工作排程重疊提示：預設收合成一行，不占版面（使用者 2026-10-05「工作排程的提示很占版面」） */
.calendar-overlap{padding:6px 12px;margin:6px 0}
.calendar-overlap>summary{cursor:pointer;font-size:14px}

/* 放大檢視：獨立的上層視窗（不再被審核視窗裁切）；觸控裝置全螢幕、× 加大、可雙指縮放 */
dialog.image-float-dialog{padding:0;border:0;background:transparent;width:100vw;height:100dvh;max-width:none!important;max-height:none!important;min-width:0;min-height:0;margin:0;resize:none;overflow:visible;box-shadow:none}
dialog.image-float-dialog::backdrop{background:#102e4055}
.image-float .image-drag [data-image-close]{min-width:44px;min-height:40px;font-size:1.5rem}
.image-float .image-scroll{touch-action:pan-x pan-y}
@media (pointer:coarse),(max-width:1100px){
 .image-float{left:8px!important;top:8px!important;width:calc(100vw - 16px)!important;height:calc(100dvh - 16px)!important;resize:none}
 .image-float .image-tools button{min-height:40px;padding:0 12px}
}
#modal .modal-head [data-ai-jump]{margin-left:auto;white-space:nowrap}
.image-float .image-drag [data-image-close]{color:#102e40;background:#fff;border:1px solid #cfd8dc;border-radius:8px;line-height:1}


/* 工作排程 Excel 匯出／匯入按鈕 */
.sched-xls{display:flex;gap:8px;margin-left:auto;flex-wrap:wrap}
.sched-xls .button,.sched-xls button{white-space:nowrap}

/* 二軸頭管線（生產通知單下方、管長表獨立分區）與二軸頭管長資料庫 */
.hp-card{margin:12px 0;padding:12px 14px;border:1px solid #cfe0d8;border-left:4px solid #2e7d4f;border-radius:8px;background:#f7fbf8}
.hp-card h3{margin:0 0 6px;font-size:15px}
.hp-meta{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:14px;margin-bottom:6px}.hp-meta b{color:#244a6a;margin-right:4px}
.hp-table{border-collapse:collapse;font-size:14px}.hp-table th{text-align:left;font-weight:600;padding:3px 14px 3px 0;color:#33454e}.hp-table td{padding:3px 0;font-variant-numeric:tabular-nums}
.ns-card{overflow-x:auto}.ns-table{margin:8px 0;width:100%}.ns-table td,.ns-table th,.ns-table .sub{white-space:normal;overflow-wrap:anywhere}.ns-table thead th{font-size:13px;color:#5b6b73;border-bottom:1px solid #cfe0d8}.ns-table td{padding:3px 12px 3px 0;vertical-align:top}.ns-ok{color:#2e7d4f}.ns-bad{color:#b3261e}.ns-warn{color:#9a6700}.ns-ignored{font-size:12px}.ns-log summary{cursor:pointer;margin-top:6px}.ns-late{margin-top:4px;font-size:12px;color:#b3261e;font-weight:600}
/* 生產通知單分頁：通知單內文＋右側「生管需求時間」；窄畫面改上下排 */
/* 訂單詳細的工作分區標題（task-sections.js，使用者 2026-10-30：範本工作、自訂工作各一區，預設自訂在上、可切換） */
.task-section>th{background:#eef4f7;color:#24414f;text-align:left;font-weight:600;padding:8px 10px;border-top:2px solid #c9dbe3}
.task-section .sub{margin-left:10px;font-weight:400}
.task-section .task-section-swap{float:right;margin:-3px 0}
/* r210 B5：提醒「衝突」改叫「同日到期」，訂單狀態徽章沿用原本衝突的紅色 */
.badge.同日到期{background:#fceced;color:#bf4548}
/* r210 B2：iPad 直向／橫向（701～1279px，且不是橫拿手機）訂單詳細的工作表改兩行排版：第一行 工作｜負責人｜日期｜狀態，
   第二行 實際完成（勾選、完成日期、逾期說明、儲存）｜提醒；不必左右捲就看得到。1280px 以上桌機維持原表格。 */
@media (min-width:701px) and (max-width:1279px) and (min-height:501px){
 .task-table thead{display:none}
 .task-table,.task-table tbody{display:block;width:100%}
 .task-table tr[data-edit-task]{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr) minmax(0,.8fr);gap:6px 14px;padding:10px 8px;border-bottom:1px solid #d9e5ea}
 .task-table tr[data-edit-task]>td{display:block;padding:0;border:0;min-width:0;white-space:normal}
 .task-table tr[data-edit-task]>td:nth-child(1){grid-column:1;grid-row:1/span 2}
 .task-table tr[data-edit-task]>td:nth-child(2){grid-column:2;grid-row:1}
 .task-table tr[data-edit-task]>td:nth-child(3){grid-column:3;grid-row:1}
 .task-table tr[data-edit-task]>td:nth-child(4){grid-column:2/span 2;grid-row:2}
 .task-table tr[data-edit-task]>td:nth-child(5){grid-column:4;grid-row:1}
 .task-table tr[data-edit-task]>td:nth-child(6){grid-column:4;grid-row:2}
 .task-table tr[data-edit-task]>td:not(:first-child)::before{content:attr(data-label);display:block;font-size:12px;color:#647887;margin-bottom:2px}
 .task-table tr[data-edit-task] select,.task-table tr[data-edit-task] input[type=date]{max-width:100%}
 .task-table tr:not([data-edit-task]),.task-table tr:not([data-edit-task])>td{display:block;width:100%;padding-left:0;padding-right:0}
 .task-table tr.task-section>th{display:block;width:100%;box-sizing:border-box;padding:8px 10px}
}
/* 手機（≤700px）：訂單詳細的工作表格改成一項一張卡，欄位上下排、標上欄名，不必左右拖（使用者 2026-10-08 iPhone） */
@media (max-width:700px), (max-height:500px) and (pointer:coarse){
 dialog{width:100vw;max-width:100vw;max-height:100dvh;border-radius:0;margin:0}
 .task-table thead{display:none}
 .task-table,.task-table tbody{display:block;width:100%}
 .task-table tr[data-edit-task]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;padding:12px 4px;border-bottom:1px solid #d9e5ea}
 .task-table tr[data-edit-task]>td{display:block;padding:0;border:0;min-width:0;white-space:normal}
 .task-table tr[data-edit-task]>td:first-child,.task-table tr[data-edit-task]>td:nth-child(3),.task-table tr[data-edit-task]>td:nth-child(4){grid-column:1/-1}
 .task-table tr[data-edit-task]>td:not(:first-child)::before{content:attr(data-label);display:block;font-size:12px;color:#647887;margin-bottom:2px}
 .task-table tr[data-edit-task] select,.task-table tr[data-edit-task] input[type=date]{max-width:100%}
 .task-table tr:not([data-edit-task]),.task-table tr:not([data-edit-task])>td{display:block;width:100%;padding-left:0;padding-right:0}
 .task-table tr.task-section>th{display:block;width:100%;box-sizing:border-box;padding:10px 6px}
 .task-section .task-section-swap{float:none;display:block;margin:6px 0 0}
 .task-table .form-grid{grid-template-columns:minmax(0,1fr)}
 .table-wrap:has(.task-table){overflow-x:visible}
 .modal-head{flex-wrap:wrap;gap:8px}
 /* 其他資料表格（v12.js 加 .rt-cards 與欄名）：一列一張卡 */
 table.rt-cards thead{display:none}
 table.rt-cards,table.rt-cards tbody,table.rt-cards tr{display:block;width:100%}
 table.rt-cards tr{padding:10px 2px;border-bottom:1px solid #d9e5ea}
 table.rt-cards td,table.rt-cards tbody th{display:grid;grid-template-columns:minmax(76px,32%) minmax(0,1fr);gap:8px;align-items:start;padding:3px 0;border:0;white-space:normal;text-align:left;overflow-wrap:anywhere}
 table.rt-cards td::before,table.rt-cards tbody th::before{content:attr(data-label);font-size:12px;font-weight:400;color:#647887}
 table.rt-cards td[data-label=""],table.rt-cards tbody th[data-label=""]{grid-template-columns:minmax(0,1fr)}
 table.rt-cards td[data-label=""]::before,table.rt-cards tbody th[data-label=""]::before{display:none}
 table.rt-cards input,table.rt-cards select{max-width:100%;min-width:0;box-sizing:border-box}   /* min-width:0：寬欄位輸入框（如主軸品牌設定）不超出卡片（總檢查 V2） */
 .table-wrap:has(.rt-cards),.card:has(>table.rt-cards){overflow-x:visible}
 #toast{left:8px;right:8px;bottom:8px;max-width:none;padding:8px 12px;font-size:13px}
 /* 手機上的對話框（含人工審核）：全螢幕；標題列壓縮，避免固定在上方的標題把內容擠到看不見（使用者 2026-10-08 iPhone 二軸頭審核） */
 dialog#modal{width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh!important;margin:0;border-radius:0;left:0;top:0}
 #modal .modal-head{padding:8px 12px;gap:6px;align-items:flex-start}
 #modal .modal-head h2{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
 #modal .modal-head .sub{font-size:12px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 #modal .modal-head button{padding:3px 9px;font-size:12px;min-height:30px}
 #modal .modal-head>div:not(:first-child){display:flex;flex-wrap:wrap;gap:6px}
 #modal .modal-foot{padding:6px 10px;gap:6px}
 #modal .modal-foot button{padding:5px 10px;font-size:13px;min-height:34px}
}
/* AI 重新判讀：執行按鈕要像按鈕，不像說明文字（使用者 2026-10-08「執行的按鈕不明顯，像是說明文字而已」） */
details[data-ai-retry]>summary{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:8px;background:#0f4b7c;color:#fff;font-weight:600;cursor:pointer;list-style:none;margin:6px 0}
details[data-ai-retry]>summary::-webkit-details-marker{display:none}
details[data-ai-retry][open]>summary{background:#e3f1ec;color:#0b385c;border:1px solid #9cc9bb}
.ai-quick{border:2px solid #0f4b7c}.ai-quick [data-ai-quick-run]{font-size:16px;padding:10px 20px;font-weight:700}
/* ⚡ 自動 AI 判讀＝藍、✍ 手動網頁 AI 判讀＝琥珀色，一眼分得出（使用者 2026-10-25「這幾個按鈕的分辨很差」） */
#modal .modal-head [data-ai-manual-jump]{white-space:nowrap;background:#fff7e6;color:#7a4b00;border:1px solid #e0b25c;font-weight:600}
details[data-ai-manual]>summary{font-weight:600;color:#7a4b00}
details[data-ai-manual]{border-left:4px solid #e0b25c;padding-left:10px;margin-top:8px}
details[data-advanced-ai]>summary{font-weight:600;color:#0f4b7c}
/* 審核視窗「表格欄位比對」：不撐寬、長字換行，四欄一次看完；結果不是「相同」的列標色（使用者 2026-10-25「沒辦法直接看完 前面比對 跟後面差異文字」） */
#review-form table.review-compare{table-layout:fixed;width:100%;white-space:normal}
#review-form table.review-compare th:nth-child(1){width:10em}
#review-form table.review-compare th:nth-child(4){width:8.5em}
#review-form table.review-compare td{overflow-wrap:anywhere;vertical-align:top;padding:9px 12px}
#review-form table.review-compare tr.cmp-diff td{background:#fff4cc}
#review-form table.review-compare tr.cmp-diff td:last-child{font-weight:700;color:#8a5a00}
#review-form table.review-compare tr.cmp-missing td{color:#6b7c88}
#review-form details>pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:50vh;overflow:auto}
.head-reanalyze button.primary{font-size:15px;padding:8px 16px}
/* 二軸頭資料庫凍結窗格：名稱欄固定在左、最終版 PDF 欄固定在右（含表頭、實心底色，不蓋住其他欄） */
.engineering-table table.hd-frozen th:first-child,.engineering-table table.hd-frozen td:first-child{position:sticky;left:0;z-index:2;background:#fff;box-shadow:2px 0 4px #dce5ec;min-width:140px;max-width:200px}
.engineering-table table th:last-child{position:sticky;right:0;z-index:3;background:#f4f8fa;box-shadow:-2px 0 4px #dce5ec}
.engineering-table table.hd-frozen thead th:first-child{z-index:3;background:#f4f8fa}
.engineering-table td:last-child{z-index:2}
.engineering-table tr.selected-spec>td:first-child,.engineering-table tr.selected-spec>td:last-child{background:#e8f5ef}
/* 二軸頭清單版面（使用者 2026-10-12「調整一下版面合理性」）：固定的名稱／PDF 表頭蓋在左右捲動的表頭之上（原本同 z-index 被蓋住）；
   表格被擠窄時，狀態「待審核 1 筆」與主軸規格不再一字一行、把整列撐高 */
#content .engineering-table table.hd-frozen thead th:first-child,#content .engineering-table table.hd-frozen thead th:last-child{z-index:5}
.engineering-table table.hd-frozen .hd-spindle{min-width:6.5em;word-break:keep-all;overflow-wrap:normal}
.engineering-table table.hd-frozen .hd-spec{min-width:8.5em}
.engineering-table table.hd-frozen .hd-status{min-width:6.5em}
.engineering-table table.hd-frozen td.hd-status button,.engineering-table table.hd-frozen td.hd-status .badge{white-space:nowrap}
/* 寬表格可按住空白處左右拖曳（v12.js） */
.table-wrap.dragging{cursor:grabbing;user-select:none}
/* 後台 AI 使用統計：每日用量長條 */
.ai-daily{display:flex;gap:3px;align-items:flex-end;height:140px;padding:6px 0 18px;overflow-x:auto}
.ai-daily>div{flex:1 0 14px;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;position:relative}
.ai-daily span{display:block;width:100%;background:#0f4b7c;border-radius:3px 3px 0 0;min-height:2px}
.ai-daily small{position:absolute;bottom:-16px;font-size:10px;color:#647887;white-space:nowrap}
/* 統計卡標題在窄畫面會壓到右上角色條（版面總檢查 2026-10-08） */
.stat .label{padding-right:40px}
#boot-loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;font-size:18px;color:#3d5560;background:#f2f6f8;z-index:50}
.ns-date{white-space:nowrap}.ns-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,460px);gap:20px;align-items:start}.ns-split .ns-pm{position:sticky;top:0;background:#f7fbf9;border:1px solid #cfe0d8;border-radius:8px;padding:12px 14px}.ns-pm h3{margin:0 0 4px}.ns-card .ns-pm{margin:8px 0 12px}
@media (max-width:1100px){.ns-split{grid-template-columns:minmax(0,1fr)}.ns-split .ns-pm{position:static;order:-1}}
.hp-db th small{display:block;color:#5d6f7a;font-weight:400}.hp-db td{font-variant-numeric:tabular-nums}.hp-db .hp-out{background:#e8f4ee;font-weight:600}
.hp-actions{display:flex;gap:8px;flex-wrap:wrap}

/* MIS 架構檢視 */
.arch-sec{margin:10px 0;padding:8px 14px}.arch-sec>summary{cursor:pointer;font-weight:600}.arch-body{overflow-x:auto;margin-top:8px}
.arch-body code{font-size:12px;background:#eef3f5;padding:1px 5px;border-radius:4px;margin:2px;display:inline-block}.arch-shape{display:block!important;white-space:normal;max-width:520px}
.arch-bar{margin:8px 0;display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center}.arch-ver{font-size:14px;color:#33454e}.arch-ver b{font-variant-numeric:tabular-nums}
#modal:has(.hp-db){width:min(1500px,calc(100vw - 24px))}
.hp-db th,.hp-db td{white-space:nowrap}

.arch-body table td,.arch-body table th{white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.arch-body table td:last-child{min-width:260px}


/* 左側選單右鍵：另開分頁／視窗 */
.nav-ctx{position:fixed;z-index:3000;min-width:200px;padding:6px;background:#fff;border:1px solid #cfd8dc;border-radius:10px;box-shadow:0 10px 28px rgba(16,46,64,.25);display:flex;flex-direction:column}
.nav-ctx-title{font-size:12px;color:#5d6f7a;padding:4px 10px 6px;border-bottom:1px solid #eef2f4;margin-bottom:4px}
.nav-ctx button{text-align:left;border:0;background:none;padding:9px 10px;border-radius:6px;font-size:14px;color:#14303a}
.nav-ctx button:hover,.nav-ctx button:focus{background:#eef1f4;outline:none}

/* 手機（直向／橫向）與高度很矮的畫面：頂部精簡標題列＋「☰ 選單」抽屜（使用者 2026-10-06：iPad／iPhone／Android 手機與平板版面、
   手機也要考慮橫向直向翻轉）。iPad 與電腦維持左側固定選單。 */
.nav-toggle,.nav-backdrop,.nav-close{display:none}
body.nav-collapse-float .nav-collapse{position:fixed;top:8px;z-index:70;margin:0}   /* 標題列捲出畫面時浮在內容區左上角（nav-tabs.js） */
/* iPad／平板／電腦：左側選單收折（nav-tabs.js），收起後內容滿版 */
.nav-collapse{flex:none;min-height:38px;min-width:44px;padding:0 14px;margin-right:12px;border:2px solid #004a8a;border-radius:8px;background:#005ead;color:#fff;font-size:16px;font-weight:700;cursor:pointer;box-shadow:0 2px 6px #00897b55}   /* 醒目好辨識（使用者 2026-10-09） */
.nav-collapse:hover{background:#004a8a}
body.nav-collapsed .nav-collapse{background:#f57c00;border-color:#e65100;box-shadow:0 2px 6px #f57c0066}   /* 收起時改橘色，提醒選單在這裡 */
body.nav-collapsed .nav-collapse:hover{background:#e65100}
main>header{justify-content:flex-start}main>header .header-right{margin-left:auto}
body.nav-collapsed .shell>aside{display:none}
body.nav-collapsed .shell{grid-template-columns:1fr}
@media (max-width:760px),(max-height:500px) and (max-width:1000px){
 .shell{display:block}
 .nav-collapse{display:none}
 body.nav-collapsed .shell>aside{display:flex}   /* 手機永遠顯示頂部選單列（抽屜） */
 aside{position:sticky;top:0;z-index:50;height:auto;min-height:0;padding:6px 12px;flex-direction:row;align-items:center;justify-content:space-between;gap:8px}
 aside .brand{padding:0;font-size:1.1rem}aside .brand .brand-logo{width:64px}
 aside .brand small,aside .workspace,aside .aside-bottom{display:none}
 .nav-toggle{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 14px;border:1px solid #47717d;border-radius:999px;background:#1c4154;color:#e6f2f5;font-size:15px}
 #nav{position:fixed;top:0;left:0;bottom:0;z-index:60;width:min(300px,86vw);margin:0;padding:64px 10px 24px;display:flex;flex-direction:column;flex-wrap:nowrap;gap:2px;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;background:var(--ink);box-shadow:4px 0 24px #0005;transform:translateX(-105%);transition:transform .2s ease;visibility:hidden;max-height:none;height:auto}
 body.nav-open #nav{transform:none;visibility:visible}
 #nav button{white-space:normal;padding:12px;font-size:15px;min-height:44px}
 #nav button.active{border-bottom:0;border-left:3px solid #4aa3f0;padding-left:9px}
 #nav .nav-label{display:block;margin:14px 10px 4px}
 #nav .calendar-subnav{margin:0 6px 6px 18px}
 body.nav-open .nav-backdrop{display:block;position:fixed;inset:0;z-index:45;background:#102e4066}   /* under the sticky top bar (z 50), whose drawer sits inside it */
 .nav-close{position:fixed;top:10px;left:calc(min(300px,86vw) - 54px);z-index:61;min-width:44px;min-height:44px;border:0;background:none;color:#e6f2f5;font-size:26px;display:none}
 body.nav-open .nav-close{display:block}
 main>header{height:auto;min-height:48px;padding:6px 12px;flex-wrap:wrap}
 #content{padding:14px 12px 28px}
}
@media (max-height:500px) and (max-width:1000px){ main>header{min-height:40px} #content{padding-top:10px} }

/* 彈出視窗捲動時，標題列與 × 固定在頂端（手機橫向等矮畫面） */
dialog[open]>#modal-content>.modal-head,dialog[open] .modal-head:first-child{position:sticky;top:0;z-index:6;background:#fff}


/* 搜尋／篩選欄位醒目（使用者 2026-10-06）：較粗邊框＋聚焦高亮，較容易一眼找到 */
.search,#content>.filterbar input,#content>.filterbar select,.spec-filters input,.spec-filters select,.pipe-filterbar .search,.pipe-filterbar input,.pipe-filterbar select,.schedule-filterbar input,.schedule-filterbar select,.schedule-search-select,.sim-bar .search{border:1.5px solid #8aa6b8!important;border-radius:8px;background:#fbfdff}
.search::placeholder,#content>.filterbar input::placeholder,.pipe-filterbar input::placeholder{color:#6b7c88}
.search:focus,#content>.filterbar input:focus,#content>.filterbar select:focus,.spec-filters input:focus,.spec-filters select:focus,.pipe-filterbar .search:focus,.pipe-filterbar input:focus,.pipe-filterbar select:focus,.schedule-filterbar input:focus,.schedule-filterbar select:focus,.schedule-search-select:focus,.sim-bar .search:focus{border-color:#0E4A7C!important;box-shadow:0 0 0 3px rgba(14,124,107,.18);outline:none}

/* 主軸編輯（使用者 2026-10-07「編輯頁面也太小」）：接近全螢幕，PDF 原圖收在上方，欄位用整個寬度 */
#modal.spindle-editor{width:min(1500px,98vw);max-width:98vw;max-height:96vh}
#modal.spindle-editor .review-layout.spindle-one-column{grid-template-columns:1fr}
.spindle-pdf{margin:0 0 12px}.spindle-pdf>summary{cursor:pointer;font-weight:600;padding:6px 0}.spindle-pdf .pdf-preview{max-height:60vh}
.spindle-hint{display:block;margin-top:2px}
.spec-row.spindle-extra-start>td{border-top:2px solid #c8d4de}

/* 左側選單：沿用原本的深色選單，色調往深藍偏（使用者 2026-10-09「讓原本的顏色再偏深藍一點」，三款中選「深海軍藍」#071D3A）；
   標誌、文字顏色與排列都維持原樣，只調底色、滑過與選中項目的藍色 */
aside{background:#071d3a}
aside nav button:hover{background:#0e3058}
aside nav button.active{background:#103866;color:#9fcaf4;border-left:3px solid #4aa3f0}
aside .aside-bottom button{border-color:#2f5683}
aside #nav .calendar-subnav{border-left-color:#2f5683}
@media (max-width:760px),(max-height:500px) and (max-width:1000px){
 #nav{background:#071d3a}
 .nav-toggle{background:#0e3058;border-color:#2f5683}
 aside nav button.active,#nav button.active{border-bottom:0;border-left:3px solid #4aa3f0;padding-left:9px}
}
#toast{background:#071d3a}
/* 手機卡片表格修正（使用者 2026-10-09「手機頁面不好檢視」，工作總覽的訂單進度表）：
   取消電腦版表格的最小寬度與欄寬；欄位裡有多個元件（機號＋分類標籤＋ECN）時全部排在右側值那一欄，不再被拆散亂排 */
@media (max-width:700px), (max-height:500px) and (pointer:coarse){
 table.rt-cards{min-width:0!important;width:100%!important}
 table.rt-cards td,table.rt-cards tbody th{width:auto!important;min-width:0!important;text-align:left!important;white-space:normal!important}
 table.rt-cards td>*,table.rt-cards tbody th>*{grid-column:2;justify-self:start;max-width:100%}
 table.rt-cards td[data-label=""]>*,table.rt-cards tbody th[data-label=""]>*{grid-column:1}
 table.rt-cards td,table.rt-cards tbody th{row-gap:2px}
}
/* 非 Windows 裝置隱藏 OA 助手相關功能（nav-tabs.js 加 body.no-oa-helper）；手機寬度另外隱藏需選 Excel 檔的「匯入人工表格」 */
/* 助手設定與有新版提示：裝不了助手的瀏覽器（no-oa-ext＝no-oa-helper＋Windows 非 Chromium，R-20261028-1524 ⑤）都藏 */
body.no-oa-helper:not(.oa-paste-only) #oa-sync-orders,body.no-oa-helper:not(.oa-paste-only) #order-list-html-import,body.no-oa-helper #electrical-sync,
body.no-oa-ext #nav [data-view="helperSettings"],body.no-oa-ext .helper-update-banner{display:none!important}
@media (max-width:700px){ body.no-oa-helper #import-ecn{display:none!important} }
/* 2026-10-10 總檢查 V4：浮動訊息點一下就關 */
#toast{cursor:pointer}
/* 總檢查 V1：iPad 直放／小筆電（761～1023px）頂部列只留頁名、不換行，日期隱藏；主軸品牌設定輸入框跟著欄寬 */
@media (min-width:761px) and (max-width:1023px){
 main>header .crumb{font-size:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1 1 auto}
 main>header .crumb #page-title{font-size:15px}
 main>header #clock{display:none}
 .brand-wide-input{min-width:0;width:100%;box-sizing:border-box}
}

/* 放大檢視（2026-10-10「背景模糊，無法重疊比對後面的數據」）：背景不變暗不模糊；沒有其他對話框時是一般浮動視窗，頁面照常可操作 */
dialog.image-float-dialog::backdrop{background:transparent;backdrop-filter:none}
dialog.image-float-dialog.image-float-free{pointer-events:none;position:fixed;inset:0;z-index:1000}
dialog.image-float-dialog.image-float-free .image-float{pointer-events:auto}
.image-float .image-opacity{display:inline-flex;align-items:center;gap:4px}
.image-float .image-opacity input{width:90px}
/* 規格編輯視窗（主軸、二軸頭等共用）：修改原因、確認歸檔與錯誤提示放在底部固定列左邊（使用者 2026-10-10「提示字樣沒有顯示在視窗之內」
   「或是利用鎖定的空白框」）；必填或要補的欄位標紅框並捲過去 */
.catalog-foot .foot-reason{flex:1 1 360px;display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;min-width:0;margin-right:auto}
.catalog-foot .foot-reason input[name=reason]{flex:1 1 260px;min-width:0;min-height:38px}
.catalog-foot .foot-confirm{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:13px}
.catalog-foot .foot-confirm input{width:18px;height:18px;margin:0}
.catalog-foot #catalog-error{flex-basis:100%;margin:0;min-height:0}
.catalog-foot #catalog-error:not(:empty){padding:2px 6px;border-radius:4px;animation:foot-flash .6s ease 2}
@keyframes foot-flash{50%{background:#fde7e7}}
.need-fix{outline:2px solid #c62828!important;outline-offset:1px;background:#fff5f5!important}
/* 日期快選 −1／0／+1（2026-10-10）；2026-10-11 使用者「按鈕位置再調整…縮小放下面」：欄位在 .field 裡時改成小按鈕
   放在輸入框下方靠左，輸入框維持整欄寬、同列欄位的輸入框對齊；觸控螢幕按鈕放大 */
.dq{display:inline-flex;gap:3px;margin-left:4px;vertical-align:middle;flex:none}
.dq button{min-width:28px;min-height:22px;padding:0 6px;font-size:11.5px;line-height:1;border-radius:5px;color:#556e7d}
@media (pointer:coarse){.dq button{min-width:36px;min-height:30px;font-size:13px}}
.field>.dq{align-self:flex-start;margin:-3px 0 0}
/* OA 生產通知單匯入「讀取期間」月數（2026-10-11） */
.oa-sync .oa-recent label{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px}
.oa-sync .oa-recent input{width:5.5em;padding:4px 6px;border:1px solid #cdd9e0;border-radius:5px;text-align:center}
/* 快速新增自訂工作：機號搜尋＋歸檔訂單合併（2026-10-10） */
.quick-order-hidden{display:none!important}
.quick-order-list{max-height:170px;overflow:auto;margin-top:4px;border:1px solid var(--border,#d5dee8);border-radius:8px;background:#fff}
.quick-order-list button{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #eef2f5;border-radius:0;padding:6px 10px;min-height:36px;background:transparent;white-space:normal}
.quick-order-list button:hover{background:#f3f7fb}
.quick-order-list button.on{background:#e7eefc;box-shadow:inset 3px 0 0 #2b59c3}
.quick-order-list button small{color:#647888}
.quick-order-list .sub{margin:6px 10px}
/* 新版通知（2026-10-10）：右下角，不擋操作；切換頁面時自動換新 */
.update-banner{position:fixed;right:16px;bottom:16px;z-index:900;display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;max-width:min(560px,calc(100vw - 32px));padding:10px 14px;border-radius:10px;background:#fff8e1;color:#4a3b00;border:1px solid #e9cf72;box-shadow:0 6px 18px rgba(0,0,0,.18);font-size:14px}
.update-banner span{flex:1 1 220px}
/* 人工審核視窗的欄位表（使用者 2026-10-11「資料區的格子 很難修改」；只改審核視窗，規格編輯畫面不動）：欄位名稱欄原本被擠到 65px、名稱只剩前幾個字，
   改成欄位名稱、數值都看得完整；來源依據放窄欄、可換行；移除鈕不佔寬 */
#review-form .spec-table{table-layout:fixed;width:100%}
#review-form .spec-table th:nth-child(1){width:14em}
#review-form .spec-table th:nth-child(3){width:5.5em}
#review-form .spec-table th:nth-child(4){width:12em}
#review-form .spec-table th:nth-child(5){width:4.5em}
#review-form .spec-table td:nth-child(1) input{min-width:0;font-weight:600}
#review-form .spec-table td:nth-child(2) input,#review-form .spec-table td:nth-child(2) select,#review-form .spec-table td:nth-child(2) textarea{width:100%;min-width:0;box-sizing:border-box}
#review-form .spec-table td:nth-child(4) input{width:4.5em;min-width:0}
#review-form .spec-table td:nth-child(4) small{max-width:none;overflow-wrap:anywhere}
#review-form .spec-table td:nth-child(5) button{padding:4px 6px;font-size:12px}
/* 訂單管制 ECN 複製按鈕（2026-10-12） */
.ecn-copy{margin-left:.4em;padding:0 .5em;min-height:0;font-size:.85em;line-height:1.6;vertical-align:baseline}
/* 工作表單暫存提示（2026-10-12） */
.task-draft-note{margin:6px 0 10px;padding:6px 10px;background:#fff8e1;border-left:3px solid #f0b400;border-radius:4px;font-size:.9em;line-height:1.6}
.task-draft-note button{margin-left:.6em;padding:0 .6em;min-height:0;font-size:.9em}
/* 主軸列表 Ø外徑／法蘭到鼻端／主軸總長度：公差寫法（例 HDC190「190 (0/-0.035)」）可換行，不壓到隔壁欄（2026-10-12 使用者「Hdc疊字」）；功率～扭力仍不換行 */
.spindle-layout .engineering-table td:nth-child(n+8):nth-child(-n+10){white-space:normal;overflow-wrap:anywhere}
/* 主軸多檔上傳：每個檔案一列、類型選在檔名旁（2026-10-12） */
.pdf-parts-table{width:100%;border-collapse:collapse;margin:6px 0}.pdf-parts-table th,.pdf-parts-table td{padding:6px 8px;border-bottom:1px solid #e3e8ef;text-align:left;vertical-align:middle}.pdf-parts-table td:first-child{overflow-wrap:anywhere}.pdf-parts-table td small{color:#64748b;margin-left:4px}.pdf-parts-table select{width:100%;min-width:200px}
/* 「用此筆已上傳的 PDF 重新分析」只在比對資料選了既有主軸／二軸頭時顯示：.field 的 display 會蓋掉 hidden（2026-10-12 使用者「選擇欄位不匹配」） */
#pdf-form [data-reuse-pdf][hidden]{display:none!important}
/* 歸檔前相同主軸代碼選擇（2026-10-12） */
.dup-code{margin:10px 0}.dup-code-row{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:6px 0;border-top:1px dashed #e2c37a}.dup-code-row span{overflow-wrap:anywhere}.dup-code .actions{margin-top:8px}
.modal-foot:has(.dup-code){flex-wrap:wrap}.modal-foot .dup-code{flex:1 1 100%;margin:0 0 8px;text-align:left}
/* OA 匯入入口：先選來源（2026-10-13 兩顆按鈕合併） */
.oa-import-choice{display:grid;gap:12px}
.oa-import-choice button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:14px 16px;text-align:left;width:100%}
.oa-import-choice button b{font-size:1.05em}
/* 範本偏移量：「之後／提前」放上、天數放下（2026-10-13；並排在 1366 寬會多出橫向捲動） */
.rule-table .rule-offset select{display:block;width:85px;margin:0 0 4px}
/* 只有手動結案才算已完成（2026-10-13）：工作做完或 OA 已出貨但還沒結案，用黃色提醒按結案 */
.badge.工作完成・待結案,.badge.已出貨・待結案{background:#fff6dd;color:#8a5a00}
/* 大項目與下轄工作（2026-10-13）：下轄工作縮排、大項目顯示下轄完成數、未完成時完成鈕鎖住 */
tr.task-child>td:first-child{padding-left:28px;border-left:3px solid #d7e3ea}
.task-kids{font-size:.85em;color:#0b5c8a;margin-top:2px}
.task-done-locked{color:#8a99a6}
/* 大項目編輯表單裡的下轄工作清單（2026-10-13） */
.task-kids-panel{background:#f2f8fb;border:1px solid #d7e3ea;border-radius:6px;padding:8px 12px;margin:6px 0 10px}
.task-kids-panel ul{margin:6px 0;padding-left:4px;list-style:none}
.task-kids-panel li{margin:3px 0}
.task-kids-up{margin:4px 0 8px}
/* 下轄工作／大項目標籤（使用者 2026-10-13「那個箭頭不是很明顯 要調整一下」） */
.kid-mark,.parent-mark{display:inline-block;border-radius:4px;padding:0 6px;margin-right:6px;font-size:.78em;font-weight:700;line-height:1.6;vertical-align:1px;white-space:nowrap}
.kid-mark{background:#0b5c8a;color:#fff}
.parent-mark{background:#fff3d6;color:#8a5a00;border:1px solid #f0d58f}

/* r211 1-1：選單分組（nav-tabs.js）。最上面四頁照原樣；主管、BOM 選配、工程資料庫、設定收在可展開的群組，標題列點了展開／收合 */
#nav.nav-grouped{display:flex;flex-direction:column;gap:0}
#nav.nav-grouped .nav-label{display:none!important}
#nav .nav-group-body{display:grid;gap:7px}
#nav .nav-group[data-nav-group="core"]>.nav-group-body{gap:7px}
#nav .nav-fold>.nav-group-body{display:none;gap:2px;margin:2px 0 6px 10px;padding-left:6px;border-left:1px solid #2f5683}
#nav .nav-fold.open>.nav-group-body{display:grid}
#nav .nav-fold>.nav-group-body>button{padding:9px 12px;font-size:.92rem}
#nav .nav-group-head{display:flex;align-items:center;gap:8px;width:100%;margin-top:8px;padding:10px 15px;border:0;border-top:1px solid #1b3b5f;border-radius:0;background:transparent;color:#a9c0d0;font-size:.82rem;letter-spacing:1px;text-align:left;cursor:pointer}
#nav .nav-group-head:hover{background:#0e3058;color:#d6e6f2}
#nav .nav-group-head i{margin-left:auto;font-style:normal;transition:transform .15s}
#nav .nav-fold.open>.nav-group-head i{transform:rotate(90deg)}
#nav .nav-group-count{min-width:18px;padding:0 6px;border-radius:9px;background:#13345c;color:#9fcaf4;font-size:.72rem;text-align:center;letter-spacing:0}
#nav .nav-group-label{color:#7897a8;font-size:.75rem;letter-spacing:1px;padding:14px 15px 5px;border-top:1px solid #1b3b5f;margin-top:8px}
#nav .nav-group[hidden]{display:none}
@media (max-width:760px),(max-height:500px) and (max-width:1000px){
 #nav.nav-grouped{display:flex;flex-direction:column;flex-wrap:nowrap;gap:2px}
 #nav .nav-group-head{min-height:44px;font-size:.9rem}
 #nav .nav-fold>.nav-group-body>button{padding:11px 12px;font-size:15px}
}
/* 1366×768 等較矮的桌機：側欄標誌區與按鈕間距縮小，常用頁和每個群組標題一屏看完（使用者回報一屏只看得到前 9 項） */
@media (min-width:761px) and (max-height:820px){
 aside{padding-top:12px}
 aside .brand .brand-logo{width:104px}
 aside .brand small{margin-top:2px}
 aside .workspace{display:none}
 aside .aside-bottom{padding-top:10px}
 aside .aside-bottom small{margin:4px 0 8px}
 #nav.nav-grouped{margin-top:4px}
 #nav.nav-grouped .nav-group[data-nav-group="core"]>.nav-group-body{gap:2px}
 #nav.nav-grouped .nav-group[data-nav-group="core"]>.nav-group-body>button{padding-top:9px;padding-bottom:9px}
 #nav.nav-grouped .calendar-subnav button{padding-top:6px;padding-bottom:6px}
 #nav .nav-group-head{margin-top:2px;padding:8px 15px}
 #nav .nav-group-label{padding:8px 15px 3px;margin-top:2px}
}