:root{--ink:#213c38;--muted:#768883;--line:#dfe7e2;--green:#217d68;--soft:#eaf4ef;--bg:#f4f7f4;--red:#ad4a37}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.5 system-ui,"PingFang SC","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit;color:inherit}button,a{touch-action:manipulation}button{background:white;border:1px solid var(--line);border-radius:7px;padding:7px 12px;cursor:pointer;white-space:nowrap}button:hover{background:var(--soft)}button:disabled{opacity:.5;cursor:default}a{color:var(--green);text-decoration:none}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:6px;background:#fff;padding:8px 10px;min-width:0}input::placeholder,textarea::placeholder{color:#a1afa9}textarea{resize:vertical}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--green);outline-offset:2px}[hidden]{display:none!important}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#18634f}.danger{color:var(--red)}.app-header{height:58px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:18px;padding:0 28px}.brand{font-size:24px;font-weight:750;color:var(--ink)}.brand span{font-size:10px;letter-spacing:2px;margin-left:10px;color:var(--muted)}.header-divider{height:20px;border-left:1px solid var(--line)}.header-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.header-actions a{margin-right:8px;font-size:12px}.save-status{font-size:11px;color:var(--muted)}main{max-width:1740px;margin:auto;padding:20px 28px 24px}.panel{background:white;border:1px solid var(--line);border-radius:12px}.setup{padding:18px 22px 12px}.setup-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--green);font-weight:650}h1{font-size:23px;letter-spacing:.5px;margin:2px 0 0}h2{font-size:16px;margin:0}h3{font-size:17px}.pill{color:var(--green);background:var(--soft);border-radius:20px;padding:5px 11px;font-size:11px}.project-fields{display:grid;grid-template-columns:1.2fr 1fr 1.5fr;gap:22px}label{display:block;color:var(--muted);font-size:12px}label input,label select,label textarea{margin-top:5px;color:var(--ink)}.weights{display:flex;gap:10px}.weights label{flex:1}.quote-rule{display:flex;justify-content:space-between;gap:16px;font-size:11px;color:var(--muted);margin-top:13px}.quote-rule strong{white-space:nowrap;color:var(--green);font-weight:500}.results{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 8px;position:sticky;top:0;z-index:4;background:var(--bg);padding:6px 0}.supplier{border:1px solid var(--line);border-radius:10px;background:white;padding:12px 15px}.supplier.leader{border-color:#79b49b;background:#f6fbf7}.supplier.excluded{background:#fbf4f0}.supplier-title{display:flex;gap:8px;align-items:center}.supplier-title>span{font-size:11px;background:var(--soft);color:var(--green);padding:3px 6px;border-radius:4px}.supplier-title input{border-color:transparent;font-weight:650;padding:3px 5px}.supplier label{margin-top:6px}.supplier label input{padding:5px 8px;margin-top:3px}.supplier-summary{display:flex;align-items:baseline;gap:7px;margin-top:8px}.total{font-size:28px;letter-spacing:-1px;font-variant-numeric:tabular-nums;line-height:1.2}.rank{margin-left:auto;font-size:12px;color:var(--green)}.parts{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;margin-top:7px;gap:6px;flex-wrap:wrap}.supplier-state{font-size:11px;color:var(--muted);margin-top:5px;min-height:17px}.validation{font-size:12px;color:#9b7236;margin:8px 0 12px}.validation.complete{color:var(--green)}.table-heading{padding:17px 20px 10px;display:flex;align-items:center;justify-content:space-between;gap:12px}.table-heading h2 span{font-size:12px;font-weight:400;color:var(--muted);margin-left:8px}.table-heading p{font-size:12px;color:var(--muted);margin:4px 0}.table-heading>div:last-child{display:flex;gap:8px}.allocation{display:flex;gap:16px;padding:0 20px 12px;font-size:11px;color:var(--muted);flex-wrap:wrap}.allocation .balanced{color:var(--green)}.table-scroll{overflow:auto}table{width:100%;min-width:1060px;border-collapse:collapse;table-layout:fixed}th{background:#edf3ee;text-align:left;padding:11px 14px;font-size:12px;font-weight:550;border-block:1px solid var(--line)}td{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:top}tbody tr:last-child td{border-bottom:0}.category-row td{background:#f7faf7;color:var(--green);font-size:12px;font-weight:600;padding:7px 14px}.item-caption{font-size:10px;color:var(--muted);margin-bottom:3px}.item-title{font-size:13px;font-weight:550;overflow-wrap:anywhere}.item-rule{font-size:11px;color:var(--muted);margin-top:5px;display:flex;gap:8px;align-items:center}.link-button{border:0;background:transparent;color:var(--green);padding:0;font-size:11px}.cell-input{padding:6px 7px;font-size:12px}.cell-meta{display:flex;justify-content:space-between;align-items:center;margin-top:5px;gap:5px;font-size:11px;color:var(--muted)}.cell-error{color:var(--red)}.cell-score{color:var(--green);font-weight:550}.invalid{border-color:var(--red)}.empty{text-align:center;padding:55px 20px 65px}.empty-icon{display:inline-grid;place-items:center;border:1px solid #cfe0d5;border-radius:12px;background:var(--soft);width:46px;height:46px;color:var(--green);font-size:24px}.empty h3{margin:16px 0 7px}.empty p{color:var(--muted);font-size:13px;margin:0 0 20px}.footnote{font-size:11px;color:var(--muted);margin:12px 2px}dialog{border:1px solid var(--line);border-radius:14px;padding:24px;width:min(650px,94vw);max-height:90dvh;overflow:auto;color:var(--ink);box-shadow:0 20px 80px #173c3933}dialog::backdrop{background:#152c3655;backdrop-filter:blur(2px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.dialog-head p{font-size:12px;color:var(--muted);margin:4px 0 0}.dialog-head>button{font-size:20px;border:0;line-height:1}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.full{grid-column:1/-1}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.dialog-actions .danger{margin-right:auto}.form-error{color:var(--red);font-size:12px}details{margin-top:16px;font-size:12px}summary{cursor:pointer;color:var(--green)}#sourceContent{font-size:11px;max-height:180px;overflow:auto;color:var(--muted)}.drawer{inset:0 0 0 auto;margin:0;width:min(720px,96vw);height:100dvh;max-height:100dvh;border-radius:14px 0 0 14px;display:none;padding:22px}.drawer[open]{display:flex;flex-direction:column}.bank-controls{flex-shrink:0}.tabs{display:flex;gap:7px;margin-bottom:12px}.tabs .active{background:var(--green);color:white;border-color:var(--green)}.bank-content{flex:1;overflow:auto;margin-top:12px;padding-right:5px}.bank-content details{border:1px solid var(--line);border-radius:8px;padding:12px;margin:8px 0}.bank-content summary{font-size:13px;font-weight:600}.bank-group{font-size:11px;color:var(--muted);margin:14px 0 5px}.bank-entry{display:flex;align-items:center;gap:8px;padding:7px 3px;color:var(--ink);font-size:12px}.bank-entry input{width:15px;margin:0;flex-shrink:0;accent-color:var(--green)}.whole-button{margin-top:10px;font-size:11px}.drawer-foot{padding-top:14px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;font-size:12px}.list-row{display:flex;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid var(--line)}.list-row>div{flex:1}.list-row small{display:block;color:var(--muted);margin-top:3px}.list-row strong{overflow-wrap:anywhere}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:90vw;background:#24453e;color:#fff;padding:12px 22px;border-radius:9px;z-index:20;box-shadow:0 4px 24px #0002;font-size:13px}@media(max-width:1000px){.app-header{padding:10px 16px;height:auto;flex-wrap:wrap;gap:10px}.header-actions{gap:5px}.header-actions a{display:none}main{padding:12px}.project-fields{grid-template-columns:1fr 1fr}.weights{grid-column:1/-1}.setup{padding:14px}.results{gap:7px}.supplier{padding:9px}.parts{font-size:10px}.total{font-size:24px}}@media(max-width:650px){.brand span,.header-divider,.eyebrow{display:none}.header-actions{width:100%;margin:0}.project-fields{grid-template-columns:1fr}.setup-title{align-items:flex-start}h1{font-size:19px}.results{grid-template-columns:repeat(2,minmax(0,1fr));position:static}.quote-rule{flex-direction:column;gap:5px}.table-heading{align-items:flex-start;padding:12px;flex-direction:column}.allocation{padding:0 12px 12px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.pill{font-size:10px}.save-status{margin-left:auto}}
/* Keep supplier headings visible while scrolling long scoring sheets. */
.table-scroll{max-height:calc(100dvh - 305px)}
th{position:sticky;top:0;z-index:2}
@media(max-width:650px){.table-scroll{max-height:70dvh}}

@media(max-width:650px){.scoring-panel .allocation:after{content:"左右滑动下方表格，填写四家供应商评分";display:block;width:100%;color:var(--muted)}}

.source-projects{margin-top:8px}.source-count{font-size:12px;color:#6d7a76;margin:0 0 6px}.source-project{border:1px solid #dfe6e2;border-radius:8px;padding:10px 12px;margin:8px 0;font-size:13px;line-height:1.6}.source-project>b{display:block;font-weight:600}.source-project>small{display:block;color:#7b8884;font-size:11px}.source-winner{margin-top:4px}.source-facts{display:flex;flex-wrap:wrap;gap:4px 16px;margin:6px 0}.source-facts span{display:inline-flex;flex-direction:column;font-size:12px}.source-facts small{color:#7b8884;font-size:10px}.source-rule{background:#f5f8f6;border-left:2px solid #c6d8cc;padding:6px 8px;font-size:12px;color:#55665f;white-space:pre-wrap;margin:6px 0}.source-links{display:flex;gap:14px;font-size:12px}

/* 投标资质画像：头部中标人各评分项的出现频次 */
.profile-controls{display:flex;gap:12px;flex-shrink:0}.profile-controls label{flex:1}
.profile-summary{background:#f7faf8;border:1px solid var(--line);border-radius:9px;padding:10px 12px;font-size:12px;color:var(--muted);display:flex;flex-wrap:wrap;gap:4px 18px}
.profile-summary b{color:var(--ink);font-weight:600}
.profile-section{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:18px 0 4px;font-size:12px;font-weight:600;color:var(--green)}
.profile-section small{font-weight:400;color:var(--muted)}
table.profile-table{min-width:0;table-layout:auto}
.profile-table th,.profile-table td{padding:6px 8px;font-size:12px;border-bottom:1px solid #eef2ef}
.profile-table th{background:transparent;border-block:0;border-bottom:1px solid var(--line);position:static;color:var(--muted);font-weight:500}
.profile-table td{vertical-align:middle}
.profile-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.profile-bar{height:5px;border-radius:3px;background:var(--soft);margin-top:4px}
.profile-bar span{display:block;height:100%;border-radius:3px;background:var(--green)}
.profile-item small{display:block;color:var(--muted);font-size:10px;margin-top:2px}
.profile-hot{color:#8a5a1f;font-weight:600}
.profile-empty{color:var(--muted);font-size:12px;padding:10px 2px}
@media(max-width:650px){.profile-controls{flex-direction:column;gap:8px}.profile-table th:nth-child(3),.profile-table td:nth-child(3){display:none}}
.profile-toggle{border:0;background:transparent;padding:0;text-align:left;font-size:12px;color:var(--ink);display:block;width:100%}
.profile-toggle::before{content:"▸";color:var(--green);margin-right:5px;display:inline-block}
.profile-toggle.open::before{transform:rotate(90deg)}
.profile-toggle:hover{color:var(--green)}
.profile-detail>td{background:#f8fbf9;padding:10px 12px}
.detail-line{font-size:11px;color:var(--muted);margin-bottom:5px}
.detail-line b{color:var(--ink);font-weight:600;margin-right:6px}
.profile-detail .source-project{background:#fff;margin:6px 0}
