.production-dev-banner {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid #c98900;
    border-radius: 8px;
    background: #fff4ce;
    color: #6b4600;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.production-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.production-card {
    display: block;
    padding: 18px;
    border: 1px solid var(--line-color, #d9dee7);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.production-card strong,
.production-card span { display: block; }
.production-card span { margin-top: 6px; color: #667085; }

.production-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.production-subnav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid #cfd5df;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    text-decoration: none;
}

.production-status-ok { color: #067647; font-weight: 700; }
.production-status-warn { color: #b54708; font-weight: 700; }
.production-status-block { color: #b42318; font-weight: 700; }

.production-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.production-form-grid label,
.production-inline-form label,
.production-action-grid label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.production-form-grid input,
.production-form-grid select,
.production-form-grid textarea,
.production-inline-form input,
.production-action-grid input {
    width: 100%;
    min-width: 0;
}

.production-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.production-inline-form label { flex: 1 1 260px; }
.production-panel-form { padding: 16px; border-top: 1px solid #e4e7ec; }

.standard-part-merge-form { align-items:center; }
.standard-part-merge-form p {
    flex: 1 1 100%;
    margin: 0;
    color: #475467;
}
.standard-part-merge-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #175cd3;
    font-weight: 700;
    white-space: nowrap;
}
.standard-part-merge-choice input { width:auto; max-width:none; }

.production-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.production-action-grid form {
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.table-panel input,
.table-panel select { max-width: 180px; }

.production-cell-form {
    display: grid;
    gap: 5px;
    min-width: 150px;
}

.production-cell-form input,
.production-cell-form select,
.production-cell-form textarea { width: 100%; max-width: 220px; }

.capability-fieldset {
    display: grid;
    gap: 10px;
    margin: 8px 0;
    padding: 14px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
}

.capability-presets {
    padding-bottom: 10px;
    border-bottom: 1px dashed #d0d5dd;
}

/* Accepted static BOM prototype, bound to the formal application. */
.page:has(.bom-prototype-shell) { max-width:none; padding:24px; }
.bom-prototype-shell {
    --bp-nav:#13243a; --bp-blue:#1769e0; --bp-blue2:#eaf3ff; --bp-ink:#182538;
    --bp-muted:#67778b; --bp-line:#d8e1ec; --bp-bg:#f2f5f9; --bp-paper:#fff;
    --bp-warn:#b76a00; --bp-bad:#b9342d; --bp-ok:#13825b;
    margin: -24px; color: var(--bp-ink); background: var(--bp-bg); font: 14px/1.45 "Microsoft YaHei","PingFang SC",sans-serif;
}
.bom-prototype-shell *, .bom-prototype-shell *::before, .bom-prototype-shell *::after { box-sizing: border-box; }
.bom-prototype-shell [hidden] { display:none !important; }
.bom-prototype-shell button, .bom-prototype-shell input, .bom-prototype-shell select, .bom-prototype-shell textarea { font: inherit; }
.bom-prototype-top { height:58px; background:var(--bp-nav); color:#fff; display:flex; align-items:center; padding:0 18px; gap:12px; }
.bom-prototype-brand { font-size:17px; font-weight:700; white-space:nowrap; }
.bom-prototype-tag { font-size:11px; border:1px solid currentColor; border-radius:11px; padding:2px 7px; font-weight:400; }
.bom-prototype-progress-tag { display:inline-flex; align-items:center; gap:3px; margin-left:5px; border:1px solid #75b8ff; border-radius:11px; background:#173d63; color:#d9ecff; padding:2px 8px; font-size:11px; font-weight:400; white-space:nowrap; }
.bom-prototype-file { color:#bdccdc; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bom-prototype-stats { margin-left:auto; display:flex; gap:7px; align-items:center; }
.bom-prototype-stat { font-size:12px; color:#d5e2f0; background:#263b54; border-radius:5px; padding:5px 8px; white-space:nowrap; }
.bom-prototype-top-btn { border:1px solid #58718e; background:#263b54; color:#edf5ff; border-radius:5px; padding:6px 9px; font-size:12px; text-decoration:none; }
.bom-prototype-top-btn:hover { background:#36516f; }
.bom-prototype-draft { color:#bfe9d7; font-size:12px; white-space:nowrap; }
.bom-prototype-readonly { padding:8px 14px; border-bottom:1px solid #e4c36d; background:#fff7df; color:#735022; }
.bom-prototype-app { height:calc(100vh - 130px); min-height:650px; display:grid; grid-template-columns:228px minmax(440px,43%) minmax(540px,1fr); gap:9px; padding:9px; }
.bom-prototype-panel { background:var(--bp-paper); border:1px solid var(--bp-line); border-radius:8px; min-width:0; overflow:hidden; box-shadow:0 5px 18px rgba(31,51,77,.07); }
.bom-prototype-catalog { display:grid; grid-template-rows:auto auto minmax(0,1fr); }
.bom-prototype-catalog-head { padding:12px 13px; border-bottom:1px solid var(--bp-line); }
.bom-prototype-catalog-head strong { display:block; margin-bottom:8px; }
.bom-prototype-search { width:100%; border:1px solid #cbd6e3; border-radius:6px; padding:7px 9px; outline:none; }
.bom-prototype-filters { display:flex; gap:5px; flex-wrap:wrap; padding:9px 10px; border-bottom:1px solid var(--bp-line); }
.bom-prototype-filter { border:1px solid var(--bp-line); border-radius:13px; background:#fff; color:#53657b; padding:3px 8px; font-size:11px; }
.bom-prototype-filter.active { background:var(--bp-nav); border-color:var(--bp-nav); color:#fff; }
.bom-prototype-page-list { overflow:auto; padding:6px; }
.bom-prototype-page-item { width:100%; border:0; background:transparent; text-align:left; border-radius:6px; padding:7px; display:grid; grid-template-columns:38px minmax(0,1fr); gap:8px; align-items:center; color:var(--bp-ink); }
.bom-prototype-page-item:hover { background:#f0f5fb; }
.bom-prototype-page-item.active { background:var(--bp-blue2); box-shadow:inset 3px 0 var(--bp-blue); }
.bom-prototype-page-item img { width:38px; height:28px; object-fit:cover; border:1px solid #cfd7e1; }
.bom-prototype-page-name,.bom-prototype-page-meta { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bom-prototype-page-name { font-weight:700; }
.bom-prototype-page-meta { font-size:11px; color:var(--bp-muted); }
.bom-prototype-viewer { display:grid; grid-template-rows:46px minmax(0,1fr); }
.bom-prototype-viewer-head { display:flex; align-items:center; padding:0 12px; border-bottom:1px solid var(--bp-line); gap:8px; }
.bom-prototype-viewer-head strong { white-space:nowrap; }
.bom-prototype-viewer-head > span { color:var(--bp-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bom-prototype-viewer-controls { margin-left:auto; display:flex; gap:4px; }
.bom-prototype-icon { border:1px solid var(--bp-line); background:#fff; border-radius:5px; min-width:30px; height:29px; padding:0 8px; color:#42566f; white-space:nowrap; }
.bom-prototype-zoom-label { align-self:center; min-width:38px; color:var(--bp-muted); font-size:12px; text-align:right; }
.bom-prototype-canvas { position:relative; background:#475569; overflow:hidden; display:grid; place-items:center; padding:18px; cursor:grab; touch-action:none; }
.bom-prototype-canvas.bom-prototype-canvas-panning { cursor:grabbing; }
.bom-prototype-drawing { position:relative; width:var(--bom-preview-width, 100%); max-width:none; transform:translate(var(--bom-pan-x, 0), var(--bom-pan-y, 0)); transform-origin:center; }
.bom-prototype-drawing img { display:block; width:100%; max-width:none; height:auto; box-shadow:0 3px 16px rgba(20,34,50,.22); background:#fff; user-select:none; -webkit-user-drag:none; }
.bom-prototype-review { display:grid; grid-template-rows:auto 43px minmax(0,1fr) auto auto; }
.bom-prototype-summary { padding:12px 14px; border-bottom:1px solid var(--bp-line); }
.bom-prototype-title-line { display:flex; align-items:flex-start; gap:8px; flex-wrap:wrap; }
.bom-prototype-title-line h1 { font-size:18px; margin:0; }
.bom-prototype-type { color:#155fad; background:#ecf5ff; border:1px solid #bdd9fa; border-radius:12px; padding:2px 8px; font-size:11px; }
.bom-prototype-candidate { color:#9a5c00; background:#fff6e3; border:1px solid #f0d096; border-radius:12px; padding:2px 8px; font-size:11px; }
.bom-prototype-edit-page { margin-left:auto; }
.bom-prototype-drawing-no { color:var(--bp-muted); margin-top:3px; }
.bom-prototype-fields { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-top:11px; }
.bom-prototype-field { min-width:0; border:1px solid transparent; border-radius:6px; padding:5px 7px; background:#fff; color:inherit; text-align:left; }
.bom-prototype-field:not(:disabled) { cursor:pointer; }
.bom-prototype-field:not(:disabled):hover { border-color:#9fc3f1; background:#f2f7fe; }
.bom-prototype-field:disabled { opacity:1; }
.bom-prototype-field label { display:block; color:var(--bp-muted); font-size:11px; margin-bottom:2px; }
.bom-prototype-field strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bom-prototype-rule-note { margin-top:9px; padding:7px 9px; border-left:3px solid var(--bp-blue); background:#eef6ff; color:#315779; font-size:12px; }
.bom-prototype-edit-hint { font-size:11px; color:#1769e0; }
.bom-prototype-tabs { display:flex; align-items:flex-end; gap:20px; padding:0 14px; border-bottom:1px solid var(--bp-line); }
.bom-prototype-tab { height:42px; border:0; background:transparent; color:#5e6f84; font-weight:700; position:relative; }
.bom-prototype-tab.active { color:#155fad; }
.bom-prototype-tab.active::after { content:""; position:absolute; left:0; right:0; bottom:0; height:3px; background:var(--bp-blue); border-radius:2px; }
.bom-prototype-content { min-height:0; overflow:auto; }
.bom-prototype-tabpage { display:none; padding:12px 14px; }
.bom-prototype-tabpage.active { display:block; }
.bom-prototype-section-head { display:flex; align-items:center; gap:8px; margin:2px 0 10px; }
.bom-prototype-section-head h2 { font-size:15px; margin:0; }
.bom-prototype-section-head span { font-size:12px; color:var(--bp-muted); }
.bom-prototype-section-actions { margin-left:auto; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:7px; }
.bom-prototype-section-actions form { margin:0; }
.bom-prototype-batch-confirm-form { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:7px; }
.bom-prototype-table { width:100%; border-collapse:collapse; }
.bom-prototype-table th,.bom-prototype-table td { padding:8px 7px; text-align:left; border-bottom:1px solid #e2e8f0; vertical-align:top; }
.bom-prototype-table th { position:sticky; top:0; background:#f7f9fc; color:#607086; font-size:11px; z-index:1; }
.bom-prototype-table td { font-size:12px; }
.bom-prototype-table td small { display:block; margin-top:4px; color:#607086; line-height:1.45; }
.bom-prototype-table .num { text-align:right; white-space:nowrap; }
.bom-prototype-table .nowrap { white-space:nowrap; }
.bom-prototype-clickable { cursor:pointer; }
.bom-prototype-clickable:hover,.bom-prototype-clickable:focus { background:#eef5ff; outline:0; }
.bom-prototype-row-type { font-size:10px; border-radius:3px; background:#eef2f6; color:#5d6d81; padding:2px 4px; white-space:nowrap; }
.bom-prototype-row-type.raw { background:#eaf7f0; color:#187154; }
.bom-prototype-empty { padding:26px 12px; text-align:center; color:var(--bp-muted); background:#f8fafc; border:1px dashed #cbd6e2; border-radius:7px; }
.bom-prototype-create-panel { display:grid; gap:14px; padding:16px; border:1px solid #b8cae8; border-left:4px solid var(--bp-blue); border-radius:7px; background:#f5f8fd; }
.bom-prototype-create-heading span { display:block; margin-bottom:4px; color:#47688f; font-size:11px; font-weight:800; letter-spacing:.04em; }
.bom-prototype-create-heading h2 { margin:0; color:#183b63; font-size:18px; }
.bom-prototype-create-heading p,.bom-prototype-create-option p,.bom-prototype-create-note { margin:5px 0 0; color:var(--bp-muted); font-size:12px; line-height:1.55; }
.bom-prototype-create-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px; }
.bom-prototype-create-option { display:grid; gap:10px; align-content:space-between; min-width:0; margin:0; padding:12px; border:1px solid #cad6e3; border-radius:6px; background:#fff; }
.bom-prototype-create-option.primary { border-color:#9cb9ea; box-shadow:inset 0 3px #2f6fe4; }
.bom-prototype-create-option strong { color:#243b53; font-size:14px; }
.bom-prototype-create-option .bom-prototype-btn { width:100%; min-height:44px; }
.bom-prototype-file-choice { display:grid; gap:5px; color:#526477; font-size:11px; font-weight:700; }
.bom-prototype-file-choice input { width:100%; min-width:0; padding:6px; border:1px solid #cbd6e3; border-radius:5px; background:#f8fafc; }
.bom-prototype-create-note { padding-top:10px; border-top:1px solid #d8e1ec; }
.bom-prototype-create-note form { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:8px; }
.bom-prototype-row-action { border:1px solid var(--bp-line); background:#fff; border-radius:4px; color:#315b8a; font-size:11px; padding:3px 6px; }
.bom-prototype-bom-tools { display:flex; gap:8px; margin-bottom:9px; }
.bom-prototype-bom-tools input { flex:1; border:1px solid #cbd6e3; border-radius:6px; padding:7px 9px; }
.bom-prototype-bom-tools span { color:var(--bp-muted); font-size:12px; align-self:center; }
.bom-prototype-indent { display:inline-block; }
.bom-prototype-info-list { margin:0; padding-left:20px; }
.bom-prototype-info-list li { margin:8px 0; }
.bom-prototype-footer { border-top:1px solid var(--bp-line); display:flex; align-items:center; gap:7px; padding:9px 13px; background:#fbfcfe; }
.bom-prototype-footer span { margin-right:auto; color:var(--bp-muted); font-size:12px; }
.bom-prototype-btn { border:1px solid var(--bp-line); background:#fff; color:#3d536d; border-radius:6px; padding:7px 11px; font-weight:700; text-decoration:none; }
.bom-prototype-btn.primary { background:var(--bp-blue); border-color:var(--bp-blue); color:#fff; }
.bom-prototype-btn.danger { color:var(--bp-bad); }
.bom-prototype-dialog { width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:20px; border:0; background:rgba(9,21,36,.55); }
.bom-prototype-dialog::backdrop { background:transparent; }
.bom-prototype-editor { width:min(720px,100%); max-height:90vh; overflow:auto; margin:auto; background:#fff; border-radius:10px; box-shadow:0 20px 60px rgba(0,0,0,.28); }
.bom-prototype-editor-head { display:flex; align-items:center; padding:14px 17px; border-bottom:1px solid var(--bp-line); }
.bom-prototype-editor-head h2 { font-size:17px; margin:0; }
.bom-prototype-editor-head button { margin-left:auto; }
.bom-prototype-editor-body { padding:15px 17px; }
.bom-prototype-editor-note,.bom-prototype-warning { padding:8px 10px; background:#fff7e6; color:#735022; border-left:3px solid #dfa13b; margin-bottom:12px; font-size:12px; }
.bom-prototype-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.bom-prototype-form-grid label span { display:block; color:#5f7084; font-size:12px; margin-bottom:4px; }
.bom-prototype-form-grid input,.bom-prototype-form-grid textarea,.bom-prototype-form-grid select { width:100%; max-width:none; border:1px solid #cbd6e3; border-radius:6px; padding:8px 9px; outline:none; }
.bom-prototype-form-grid textarea { min-height:72px; resize:vertical; }
.bom-prototype-form-grid .full { grid-column:1/-1; }
.bom-prototype-editor-actions { display:flex; justify-content:flex-end; gap:8px; padding:12px 17px; border-top:1px solid var(--bp-line); background:#fafbfd; }
.bom-prototype-editor-actions > span { flex:1; }
.bom-prototype-evidence { margin-top:12px; padding:9px 11px; border:1px solid var(--bp-line); border-radius:6px; background:#f7f9fc; }
.bom-prototype-evidence summary { cursor:pointer; color:#315b8a; font-weight:700; }
.bom-prototype-evidence dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.bom-prototype-evidence dt { color:var(--bp-muted); font-size:11px; }
.bom-prototype-evidence dd { margin:2px 0 0; overflow-wrap:anywhere; }
.bom-prototype-check-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; margin-bottom:11px; }
.bom-prototype-check-summary > div { padding:8px 9px; background:#f6f9fc; border:1px solid var(--bp-line); border-radius:6px; }
.bom-prototype-check-summary label { display:block; color:var(--bp-muted); font-size:11px; }
.bom-prototype-check-summary strong { font-size:17px; }
.bom-prototype-status { display:inline-block; border-radius:10px; padding:2px 7px; font-size:10px; white-space:nowrap; }
.bom-prototype-status.pass { background:#e9f8f0; color:#12704f; }
.bom-prototype-status.review { background:#fff5df; color:#8d5700; }
.bom-prototype-status.block { background:#fdecea; color:#a52f29; }
.bom-prototype-status.exempt { background:#eef2f7; color:#526478; }
.bom-prototype-review-worklist-note { margin:0 0 10px; padding:9px 11px; border-left:3px solid var(--bp-blue); background:#eef6ff; color:#315779; font-size:12px; line-height:1.55; }
.bom-prototype-review-reasons { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
.bom-prototype-review-reasons span { padding:3px 7px; border-radius:10px; background:#f6f0e2; color:#80571a; font-size:11px; }
.bom-prototype-review-values { display:flex; flex-wrap:wrap; gap:3px 8px; }
.bom-prototype-review-values span { white-space:nowrap; }
.bom-prototype-review-values b { color:#50627a; font-weight:700; }
.bom-prototype-review-issues { margin:0 0 4px; padding-left:16px; color:#80571a; }
.bom-prototype-review-issues li { margin:2px 0; }
.bom-prototype-review-worklist .bom-prototype-row-action + .bom-prototype-row-action { margin-top:5px; }
.bom-prototype-review-row { cursor:pointer; }
.bom-prototype-review-row:hover td { background:#f4f8fd; }
.bom-prototype-review-row:focus-visible { outline:2px solid var(--bp-blue); outline-offset:-2px; }
.bom-prototype-review-row .bom-prototype-row-action { display:block; margin-top:6px; }
.bom-prototype-bulk-classify { margin:0 0 10px; padding:10px 11px; border:1px solid #cbd9ea; border-left:3px solid var(--bp-blue); border-radius:6px; background:#f7faff; }
.bom-prototype-bulk-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.bom-prototype-bulk-toolbar label { display:inline-flex; align-items:center; gap:6px; color:#315779; font-size:12px; font-weight:700; }
.bom-prototype-bulk-toolbar select { min-width:150px; border:1px solid #cbd6e3; border-radius:5px; padding:6px 8px; background:#fff; color:#30445a; }
.bom-prototype-bulk-checkbox,.bom-prototype-bulk-select-all input { width:16px; height:16px; margin:0; accent-color:var(--bp-blue); }
.bom-prototype-bulk-selected { color:#50627a; font-size:12px; font-variant-numeric:tabular-nums; }
.bom-prototype-bulk-help { margin:7px 0 0; color:#607086; font-size:11px; line-height:1.5; }
.bom-prototype-bulk-select-col { width:56px; min-width:56px; text-align:center !important; white-space:nowrap; }
.bom-prototype-bulk-na { color:#8a6b2e; font-size:11px; white-space:nowrap; }
.bom-prototype-bulk-classify button:disabled { opacity:.55; cursor:not-allowed; }
.bom-prototype-gate { padding:9px 11px; margin-bottom:10px; border-left:4px solid var(--bp-bad); background:#fff0ef; color:#7d302b; }
.bom-prototype-gate.pass { border-left-color:var(--bp-ok); background:#eef9f4; color:#205e49; }
.bom-prototype-gate form { display:flex; align-items:center; gap:8px; }
.bom-prototype-gate form span { flex:1; }
.bom-prototype-gate form label { max-width:560px; }
.bom-prototype-confirmation-gate { container-type:inline-size; }
.bom-prototype-confirm-gate { display:grid !important; gap:12px; min-width:0; }
.bom-prototype-confirm-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 18px; align-items:center; padding-bottom:11px; border-bottom:1px solid currentColor; }
.bom-prototype-confirm-summary > div { min-width:0; }
.bom-prototype-confirm-summary strong { display:block; font-size:14px; }
.bom-prototype-confirm-summary p { margin:3px 0 0; font-size:12px; line-height:1.5; opacity:.88; }
.bom-prototype-confirm-metrics { display:grid; grid-template-columns:repeat(3,minmax(78px,auto)); gap:6px; margin:0; }
.bom-prototype-confirm-metrics > div { min-width:78px; padding:6px 8px; border:1px solid currentColor; border-radius:5px; background:rgba(255,255,255,.68); }
.bom-prototype-confirm-metrics dt { font-size:10px; line-height:1.25; white-space:nowrap; }
.bom-prototype-confirm-metrics dd { margin:2px 0 0; font-size:17px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1; }
.bom-prototype-confirm-metrics .pass { color:#187154; }
.bom-prototype-confirm-metrics .review { color:#8d5700; }
.bom-prototype-confirm-metrics .block { color:#a52f29; }
.bom-prototype-confirm-action { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px 14px; align-items:center; min-width:0; }
.bom-prototype-confirm-action .bom-prototype-btn { min-height:44px; white-space:nowrap; }
@container (max-width:520px) {
    .bom-prototype-confirm-summary { grid-template-columns:1fr; }
    .bom-prototype-confirm-action { justify-content:stretch; }
    .bom-prototype-confirm-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .bom-prototype-confirm-metrics > div { min-width:0; }
    .bom-prototype-confirm-metrics dt { white-space:normal; }
    .bom-prototype-confirm-action .bom-prototype-btn { width:100%; }
}
.bom-prototype-gate button:disabled { opacity:.55; cursor:not-allowed; }
.bom-confirmation-worklist { margin:12px 0; }
.bom-prototype-shell .warning { color:var(--bp-warn); }
.bom-prototype-shell .danger { color:var(--bp-bad); }
.bom-prototype-shell .ok { color:var(--bp-ok); }
.bom-prototype-source-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin:14px 0; }
.bom-prototype-source-summary > div { padding:8px 9px; background:#f6f9fc; border:1px solid var(--bp-line); border-radius:6px; }
.bom-prototype-source-summary dt { color:var(--bp-muted); font-size:11px; }
.bom-prototype-source-summary dd { margin:2px 0 0; font-weight:700; overflow-wrap:anywhere; }
.bom-prototype-maintenance { margin-top:12px; border:1px solid var(--bp-line); border-radius:7px; }
.bom-prototype-maintenance > summary { padding:10px 12px; cursor:pointer; font-weight:700; }
.bom-prototype-maintenance-body { display:grid; gap:10px; padding:12px; border-top:1px solid var(--bp-line); }
.bom-prototype-maintenance-status,.bom-prototype-button-row,.bom-prototype-source-actions { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.bom-prototype-maintenance-status span { padding:4px 7px; border-radius:5px; background:#eef2f6; font-size:11px; }
.bom-prototype-manual-table { display:flex; flex-wrap:wrap; gap:8px; align-items:end; }
.bom-prototype-manual-table label { display:grid; gap:3px; font-size:11px; }
.bom-prototype-manual-table input { width:80px; }
.bom-prototype-coverage { display:grid; gap:8px; }
.bom-prototype-coverage textarea { width:100%; max-width:none; }

@media(max-width:1450px){.bom-prototype-app{grid-template-columns:190px minmax(350px,1fr) minmax(410px,1fr)}.bom-prototype-fields{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1000px){.bom-prototype-shell{margin:-16px}.bom-prototype-app{height:auto;grid-template-columns:1fr}.bom-prototype-catalog{height:340px}.bom-prototype-viewer{height:560px}.bom-prototype-review{min-height:700px}.bom-prototype-drawing img{max-height:485px}.bom-prototype-page-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.bom-prototype-stats .bom-prototype-stat{display:none}}
@media(max-width:560px){.bom-prototype-top{padding:0 10px}.bom-prototype-file{display:none}.bom-prototype-app{padding:5px}.bom-prototype-page-list{grid-template-columns:1fr}.bom-prototype-fields{grid-template-columns:repeat(2,1fr)}.bom-prototype-viewer{height:440px}.bom-prototype-drawing img{max-height:365px}.bom-prototype-form-grid{grid-template-columns:1fr}.bom-prototype-form-grid .full{grid-column:1}.bom-prototype-create-options{grid-template-columns:1fr}.bom-prototype-check-summary{grid-template-columns:repeat(2,1fr)}.bom-prototype-confirm-summary{grid-template-columns:1fr}.bom-prototype-confirm-action{justify-content:stretch}.bom-prototype-confirm-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.bom-prototype-confirm-metrics > div{min-width:0}.bom-prototype-confirm-metrics dt{white-space:normal}.bom-prototype-confirm-action .bom-prototype-btn{width:100%}.bom-prototype-table th:nth-child(4),.bom-prototype-table td:nth-child(4),.bom-prototype-table th:nth-child(6),.bom-prototype-table td:nth-child(6){display:none}}

/* Unified drawing evidence and BOM review workbench */
.bom-workbench-heading { margin-bottom: 12px; }
.bom-workbench-status {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.bom-workbench-status > div {
    padding: 10px 12px;
    border: 1px solid #d7e0eb;
    border-radius: 10px;
    background: #fff;
}
.bom-workbench-status span,
.bom-workbench-status strong { display: block; }
.bom-workbench-status span { color: #667085; font-size: .78rem; }
.bom-workbench-status strong { margin-top: 3px; color: #12263f; }
.bom-workbench {
    display: grid;
    grid-template-columns: minmax(190px, 15%) minmax(420px, 43%) minmax(430px, 42%);
    height: calc(100vh - 235px);
    min-height: 650px;
    overflow: hidden;
    border: 1px solid #d7e0eb;
    border-radius: 12px;
    background: #eef2f6;
}
.bom-page-browser,
.bom-drawing-pane,
.bom-review-pane { min-width: 0; min-height: 0; background: #fff; }
.bom-page-browser,
.bom-drawing-pane { border-right: 1px solid #d7e0eb; }
.bom-page-browser { display: flex; flex-direction: column; }
.bom-pane-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.bom-pane-heading > div > strong,
.bom-pane-heading h2 { display: block; margin: 0; }
.bom-pane-heading small { display: block; margin-top: 3px; color: #667085; }
.bom-page-browser > .bom-pane-heading { display: grid; padding: 12px; border-bottom: 1px solid #e4e7ec; }
.bom-page-browser input[type="search"] { width: 100%; min-width: 0; }
.bom-page-list { overflow: auto; padding: 7px; }
.bom-page-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    width: 100%;
    padding: 7px;
    gap: 8px;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #1d2939;
}
.bom-page-item:hover { background: #f2f6fb; }
.bom-page-item.is-active { border-color: #84adff; background: #eaf2ff; box-shadow: inset 3px 0 #2563eb; }
.bom-page-item img { width: 48px; height: 38px; object-fit: contain; border: 1px solid #e4e7ec; background: #fff; }
.bom-page-item span,
.bom-page-item strong,
.bom-page-item small { min-width: 0; }
.bom-page-item strong,
.bom-page-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bom-page-item strong { font-size: .83rem; }
.bom-page-item small { color: #667085; font-size: .72rem; margin-top: 4px; }
.bom-drawing-pane { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.bom-drawing-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #d7e0eb; }
.bom-drawing-toolbar > div { display: flex; gap: 6px; align-items: center; }
.bom-drawing-stage { overflow: auto; padding: 18px; background: #e8edf3; text-align: center; }
.bom-drawing-stage > img { display: block; width: 100%; max-width: none; height: auto; margin: auto; background: #fff; box-shadow: 0 4px 16px rgba(16, 24, 40, .16); }
.bom-review-pane { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.bom-review-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #d7e0eb; }
.bom-review-tabs button { min-width: 0; padding: 12px 6px; border: 0; border-bottom: 3px solid transparent; background: #fff; color: #475467; font-weight: 700; }
.bom-review-tabs button[aria-selected="true"] { color: #155eef; border-bottom-color: #155eef; }
.bom-review-tabs button span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; border-radius: 10px; background: #eef2f6; font-size: .72rem; }
.bom-tab-panel { min-height: 0; overflow: auto; padding: 14px; }
.bom-context-card,
.bom-side-section,
.bom-candidate-table,
.bom-freeze-card { padding: 14px; margin-bottom: 12px; border: 1px solid #d7e0eb; border-radius: 10px; background: #fff; }
.bom-context-card h2,
.bom-side-section h2,
.bom-freeze-card h2 { margin: 2px 0 8px; }
.bom-page-fact dl,
.bom-confirmed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.bom-page-fact dl > div,
.bom-confirmed-grid > div { padding: 8px; border-radius: 7px; background: #f7f9fc; }
.bom-page-fact dt,
.bom-confirmed-grid dt { color: #667085; font-size: .75rem; }
.bom-page-fact dd,
.bom-confirmed-grid dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.bom-compact-line { padding: 9px 0; border-bottom: 1px solid #eaecf0; }
.bom-compact-line > div { display: flex; justify-content: space-between; gap: 8px; }
.bom-compact-line span,
.bom-compact-line p { color: #667085; font-size: .82rem; }
.bom-compact-line p { margin: 4px 0 0; }
.bom-mini-status { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.bom-mini-status span { padding: 5px 8px; border-radius: 14px; background: #eef4ff; color: #3538cd; font-size: .78rem; }
.bom-manual-table { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.bom-manual-table label { display: grid; gap: 4px; }
.bom-manual-table input { width: 80px; }
.bom-candidate-table.needs-review { border-left: 4px solid #f79009; }
.bom-candidate-table > header { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.bom-candidate-table h3 { margin: 0; }
.bom-candidate-table header p { margin: 4px 0; }
.bom-candidate-row { padding: 12px 0; border-top: 1px solid #eaecf0; }
.bom-formal-card { padding: 12px; margin-bottom: 10px; border: 1px solid #d7e0eb; border-radius: 9px; background: #fbfcfe; }
.bom-formal-card-heading { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.bom-formal-card-heading span { color: #667085; }
.bom-form-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 8px; align-items: end; }
.bom-form-grid label { display: grid; gap: 4px; min-width: 0; font-size: .78rem; font-weight: 700; }
.bom-form-grid input,
.bom-form-grid select,
.bom-form-grid textarea { width: 100%; min-width: 0; max-width: none; }
.bom-wide-field { grid-column: span 3; }
.bom-add-line { margin-top: 12px; }
.bom-add-line summary { cursor: pointer; padding: 10px 0; font-weight: 700; }
.bom-source-actions { display: grid; gap: 10px; }
.bom-source-actions form { padding: 10px; border: 1px solid #e4e7ec; border-radius: 8px; }
.bom-source-actions form p { margin-top: 0; }
.bom-source-actions label { display: grid; gap: 5px; font-weight: 700; }
.bom-coverage-form { display: grid; gap: 10px; padding: 14px; border: 1px solid #84adff; border-radius: 10px; background: #eff4ff; }

.bom-review-summary { padding: 14px 16px 10px; border-bottom: 1px solid #e4e7ec; }
.bom-review-summary-title,
.bom-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bom-review-summary h2,
.bom-section-heading h2,
.bom-section-heading h3 { margin: 0; color: #101828; }
.bom-review-summary-title p,
.bom-section-heading span { margin: 3px 0 0; color: #667085; font-size: .8rem; }
.bom-review-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.bom-review-badges span,
.bom-count-badge { padding: 4px 8px; border-radius: 999px; background: #eef4ff; color: #1849a9; font-size: .75rem; white-space: nowrap; }
.bom-review-badges .is-warning { background: #fff3e0; color: #b54708; }
.bom-review-badges .is-ok { background: #ecfdf3; color: #027a48; }
.bom-page-fact dl { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 10px 0 6px; }
.bom-page-fact dl > div { padding: 0; background: transparent; }
.bom-page-fact dd { font-weight: 700; }
.bom-edit-hint { margin: 8px 0 0; padding: 7px 10px; border-left: 3px solid #2e90fa; background: #eff8ff; color: #344054; font-size: .8rem; }
.bom-page-review-group { margin-bottom: 14px; }
.bom-page-review-group > .bom-section-heading { margin-bottom: 8px; }
.bom-status-warning { max-width: 50%; color: #b54708 !important; text-align: right; }
.bom-readable-list { overflow: hidden; border: 1px solid #d7e0eb; border-radius: 9px; }
.bom-readable-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    width: 100%;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #eaecf0;
    background: #fff;
    color: #101828;
    text-align: left;
}
.bom-readable-row:last-child { border-bottom: 0; }
.bom-readable-row:not(:disabled):hover { background: #f5f9ff; }
.bom-readable-row:disabled { cursor: default; opacity: 1; }
.bom-row-number { color: #667085; font-variant-numeric: tabular-nums; }
.bom-row-main { min-width: 0; }
.bom-row-main strong,
.bom-row-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bom-row-main small { margin-top: 4px; color: #667085; font-size: .78rem; }
.bom-row-state { display: inline-flex; padding: 3px 7px; border-radius: 999px; background: #fff3e0; color: #b54708; font-size: .74rem; white-space: nowrap; }
.bom-row-state.is-confirmed { background: #ecfdf3; color: #027a48; }
.bom-page-empty-state { padding: 32px 12px; color: #667085; text-align: center; }

.bom-consistency-summary { display: grid; gap: 4px; margin-bottom: 12px; padding: 12px; border-radius: 9px; background: #ecfdf3; color: #05603a; }
.bom-consistency-summary.has-blocker { background: #fff4ed; color: #b54708; }
.bom-consistency-summary span { font-size: .82rem; }
.bom-consistency-list { overflow: hidden; border: 1px solid #d7e0eb; border-radius: 9px; }
.bom-consistency-row { display: grid; grid-template-columns: minmax(160px, 1.4fr) minmax(100px, .7fr) minmax(130px, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #eaecf0; }
.bom-consistency-row:last-child { border-bottom: 0; }
.bom-consistency-row.has-blocker { box-shadow: inset 3px 0 #f79009; background: #fffcf5; }
.bom-consistency-row strong,
.bom-consistency-row small { display: block; }
.bom-consistency-row small { margin-top: 3px; color: #667085; font-size: .75rem; }
.bom-prototype-bom-groups { display: grid; gap: 16px; }
.bom-prototype-bom-group { overflow: hidden; border: 1px solid #d7e0eb; border-radius: 12px; background: #fff; }
.bom-prototype-bom-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #d7e0eb; background: #f7f9fc; }
.bom-prototype-bom-group-head div { display: grid; grid-template-columns: auto minmax(0, auto); align-items: baseline; gap: 2px 10px; }
.bom-prototype-bom-group-head span { color: #175cd3; font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.bom-prototype-bom-group-head strong { color: #101828; font-size: 1rem; }
.bom-prototype-bom-group-head small { grid-column: 2; color: #667085; }
.bom-prototype-bom-group .bom-prototype-table { margin: 0; border: 0; border-radius: 0; }
.bom-prototype-bom-group .bom-prototype-table th:first-child,
.bom-prototype-bom-group .bom-prototype-table td:first-child { width:88px; min-width:88px; border-left:0; }
.bom-prototype-bom-group .bom-prototype-table th:last-child,
.bom-prototype-bom-group .bom-prototype-table td:last-child { border-right: 0; }
.bom-prototype-hierarchy-code { display:block; color:#175cd3; font-family:Consolas,"Microsoft YaHei",sans-serif; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.bom-prototype-hierarchy-code.root { color:var(--bp-nav); }
.bom-prototype-table-scroll { overflow-x: auto; scrollbar-width:none; }
.bom-prototype-table-scroll::-webkit-scrollbar { height:0; }
.bom-prototype-horizontal-scroll { height:18px; overflow-x:auto; overflow-y:hidden; border-top:1px solid var(--bp-line); background:#f7f9fc; scrollbar-color:#7b8da3 #e8edf3; scrollbar-width:auto; }
.bom-prototype-horizontal-scroll > div { height:1px; }

.bom-data-table-wrap { overflow: auto; margin-top: 10px; border: 1px solid #d7e0eb; border-radius: 9px; }
.bom-data-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .82rem; }
.bom-data-table th { padding: 9px 10px; background: #f2f4f7; color: #475467; text-align: left; white-space: nowrap; }
.bom-data-table td { padding: 9px 10px; border-top: 1px solid #eaecf0; }
.bom-data-row[role="button"] { cursor: pointer; }
.bom-data-row[role="button"]:hover,
.bom-data-row[role="button"]:focus { outline: none; background: #f5f9ff; }

.bom-edit-dialog { width: min(760px, calc(100vw - 28px)); max-width: none; max-height: 90vh; padding: 0; overflow: hidden; border: 0; border-radius: 12px; box-shadow: 0 24px 70px rgba(16, 24, 40, .3); }
.bom-edit-dialog::backdrop { background: rgba(15, 23, 42, .52); }
.bom-dialog-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: 90vh; }
.bom-dialog-form > header,
.bom-dialog-form > footer { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.bom-dialog-form > header { justify-content: space-between; border-bottom: 1px solid #e4e7ec; }
.bom-dialog-form > header h2 { margin: 2px 0 0; }
.bom-dialog-form > footer { justify-content: flex-end; border-top: 1px solid #e4e7ec; }
.bom-dialog-form > footer span { flex: 1; }
.bom-dialog-warning { margin: 12px 18px 0; padding: 9px 11px; border-radius: 7px; background: #fff4ed; color: #b54708; }
.bom-dialog-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; overflow: auto; padding: 16px 18px; }
.bom-dialog-fields label { display: grid; gap: 5px; min-width: 0; color: #344054; font-size: .78rem; font-weight: 700; }
.bom-dialog-fields input,
.bom-dialog-fields select { width: 100%; min-width: 0; max-width: none; }
.bom-dialog-wide { grid-column: 1 / -1; }
.bom-evidence-details { margin: 0 18px 14px; padding: 10px 12px; border: 1px solid #d7e0eb; border-radius: 8px; background: #f9fafb; }
.bom-evidence-details summary { cursor: pointer; color: #175cd3; font-weight: 700; }
.bom-evidence-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bom-evidence-details dt { color: #667085; font-size: .75rem; }
.bom-evidence-details dd { margin: 2px 0 0; overflow-wrap: anywhere; }

.bom-source-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bom-source-summary > div { padding: 10px; border-radius: 8px; background: #f7f9fc; }
.bom-source-summary dt { color: #667085; font-size: .75rem; }
.bom-source-summary dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.bom-maintenance-details { border: 1px solid #d7e0eb; border-radius: 9px; }
.bom-maintenance-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; cursor: pointer; list-style-position: inside; }
.bom-maintenance-details > summary span:first-child strong,
.bom-maintenance-details > summary span:first-child small { display: block; }
.bom-maintenance-details > summary small { margin-top: 3px; color: #667085; }
.bom-maintenance-body { display: grid; gap: 12px; padding: 12px; border-top: 1px solid #e4e7ec; }
.bom-maintenance-status { display: flex; flex-wrap: wrap; gap: 6px; }
.bom-maintenance-status span { padding: 5px 8px; border-radius: 999px; background: #eef4ff; color: #3538cd; font-size: .75rem; }
.bom-maintenance-tables { overflow: hidden; border: 1px solid #e4e7ec; border-radius: 8px; }
.bom-maintenance-tables > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #e4e7ec; }
.bom-maintenance-tables > div:last-child { border-bottom: 0; }
.bom-maintenance-tables form { display: flex; gap: 5px; }
.bom-maintenance-tables input { min-width: 0; max-width: 180px; }

@media (max-width: 1380px) {
    .bom-workbench-status { grid-template-columns: repeat(3, 1fr); }
    .bom-workbench { grid-template-columns: 180px minmax(360px, 40%) minmax(390px, 1fr); }
    .bom-form-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .bom-wide-field { grid-column: span 2; }
    .bom-page-fact dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bom-dialog-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .bom-workbench { height: auto; min-height: 0; grid-template-columns: 180px minmax(0, 1fr); overflow: visible; }
    .bom-page-browser { min-height: 560px; max-height: 70vh; }
    .bom-drawing-pane { min-height: 560px; max-height: 70vh; border-right: 0; }
    .bom-review-pane { grid-column: 1 / -1; min-height: 650px; border-top: 1px solid #d7e0eb; }
}
@media (max-width: 700px) {
    .bom-workbench-status { grid-template-columns: repeat(2, 1fr); }
    .bom-workbench { display: block; }
    .bom-page-browser { min-height: 0; max-height: 340px; border-right: 0; border-bottom: 1px solid #d7e0eb; }
    .bom-drawing-pane { min-height: 420px; max-height: 65vh; }
    .bom-review-pane { min-height: 600px; }
    .bom-review-tabs { grid-template-columns: repeat(2, 1fr); }
    .bom-form-grid { grid-template-columns: 1fr; }
    .bom-wide-field { grid-column: span 1; }
    .bom-review-summary-title,
    .bom-section-heading { display: grid; }
    .bom-review-badges { justify-content: flex-start; }
    .bom-page-fact dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bom-consistency-row { grid-template-columns: 1fr; }
    .bom-dialog-fields { grid-template-columns: 1fr; }
    .bom-dialog-wide { grid-column: 1; }
    .bom-evidence-details dl,
    .bom-source-summary { grid-template-columns: 1fr; }
    .bom-maintenance-tables > div { align-items: flex-start; flex-direction: column; }
}
