[v-cloak]{display:none!important}
:root{font-family:"Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;color:#26332d;background:#f4f7f5;font-synthesis:none;--green:#246b49;--line:#d6e1d9;--muted:#65766c;--soft:#edf4ef}
*{box-sizing:border-box}body{margin:0;background:linear-gradient(180deg,#fafcfb,#eff4f1);min-height:100vh}button,input,select{font:inherit;color:inherit}button{border:1px solid #becfc4;border-radius:5px;background:#fff;color:#315641;padding:6px 12px;cursor:pointer;font-size:14px;font-weight:550}button:hover:not(:disabled){background:#edf5ef;border-color:#81a88e}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--green);border-color:var(--green);color:#fff}button.primary:hover:not(:disabled){background:#194d35}input,select{height:33px;border:1px solid #c8d5cc;border-radius:5px;background:white;padding:0 9px;font-size:14px}input:focus-visible,select:focus-visible,button:focus-visible{outline:2px solid #428862;outline-offset:1px}.app-shell{height:100dvh;min-height:470px;display:flex;flex-direction:column;gap:10px;padding:14px 18px 10px}.topbar,.brand,nav,.toolbar,.sheethead,.sheethead>div,.tools,footer,.actions,.dialoghead{display:flex;align-items:center;gap:9px}.topbar,.sheethead,.dialoghead{justify-content:space-between}.topbar{min-height:41px}.brand h1{font-size:20px;letter-spacing:-.035em;margin:0}.mark{display:grid;place-items:center;width:31px;height:31px;border-radius:7px;background:var(--green);color:white;font-size:18px}.muted,small{color:var(--muted)}.divider{width:1px;height:16px;background:#cbd7ce}.brand .muted{font-size:13px}.toolbar{padding:9px 11px;background:#fff;border:1px solid var(--line);border-radius:7px;flex-wrap:wrap}.toolbar label{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}.toolbar select,.toolbar input{width:clamp(165px,22vw,320px);font-weight:400}.grow{flex:1}.pill{font-size:12px;color:#775c17;background:#fff1c8;border-radius:12px;padding:3px 9px}.pill.locked{background:#dff3e8;color:#17643e}.sheet{display:flex;flex-direction:column;flex:1;min-height:0;border:1px solid #ceddd3;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 3px 16px #1f402f0d}.sheethead{border-top:3px solid var(--green);padding:10px 12px;min-height:56px}.sheethead h2,.dialoghead h2{font-size:17px;margin:0}.sheethead span,footer{font-size:13px;color:var(--muted)}.table-wrap{flex:1;min-height:180px;overflow:auto;background:white;scrollbar-color:#9cafa1 #f0f4f1}table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:100%;font-size:14px}.table-wrap table{min-width:780px}
.table-wrap table:has(col.fee){min-width:980px}.rowno{width:38px}.skuname{width:120px}.material{width:auto}.total-cost{width:94px}.actioncol{width:75px}.fee{width:72px}
.fee+.fee{width:62px}thead{position:sticky;top:0;z-index:4}th,td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:left}thead th{color:#41584a;background:#edf4ef;padding:5px 8px;height:30px;font-weight:650;font-size:13px}thead .groups th{background:#e4eee7;border-top:1px solid #c8d8cb;text-align:center}.sticky,.rightfix{position:sticky;z-index:2;background:white}.index{left:0;width:38px;text-align:center;font-size:12px;color:#738478;background:#f3f6f4}.skufixed{left:38px;box-shadow:1px 0 0 #ccd8ce}.rightfix{right:0;text-align:center;box-shadow:-1px 0 0 #cbd8ce}.groups .sticky,.groups .rightfix{z-index:5}tbody td{height:46px;padding:0 3px;background:#fff}tbody tr:nth-child(even) td{background:#fcfdfc}.focusrow td{background:#f4f9f5!important}table input{width:100%;min-width:0;height:30px;padding:0 4px;border:1px solid transparent;background:transparent!important;border-radius:2px;font-variant-numeric:tabular-nums;font-size:14px}table input:hover:not(:disabled){border-color:#c4d6c8}table input:focus{outline:2px solid #3b8d5e;outline-offset:-1px;background:#fff!important}table input::placeholder{color:#85948b;font-size:13px}table input:disabled{opacity:1}input[type=number]{appearance:textfield}input::-webkit-inner-spin-button{appearance:none}.cost{background:#edf5e9!important;color:#285337;font-weight:650}.numeric{text-align:right;padding-right:8px;font-variant-numeric:tabular-nums}.cellBtn{padding:3px 7px;background:#eef7ee;color:#216044;border:1px solid #c5d9c9;font-size:12px}.blank td,.blank th{height:39px}.table-wrap td:last-child,.table-wrap th:last-child{border-right:0}footer{border-top:1px solid var(--line);padding:8px 12px;background:#f6f9f7;flex-wrap:wrap}footer span:first-child{color:#356345;font-weight:600}footer b{margin-left:auto;font-size:12px;font-weight:500}footer i{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:3px;background:#498962}.notice{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#e7f4e9;border-block:1px solid #cee5cf;color:#2c673e;padding:7px 12px;font-size:14px}.error{background:#fff1e8;color:#8f3d23;border-color:#ecd3c8}.notice button{font-size:12px;padding:2px 7px}.popup{position:fixed;z-index:8;overflow:auto;max-height:min(275px,45vh);border:1px solid #93b49d;background:white;box-shadow:0 8px 22px #1b442c2e;border-radius:5px}.popup button,.reuse button{width:100%;border:0;border-radius:0;text-align:left;display:block;border-bottom:1px solid #e3ebe4;padding:7px 10px}.popup button.highlight{background:#e4f3e7}.popup button span{float:right;color:#2b6240}.popup small,.reuse small{display:block;font-size:12px;white-space:normal}.pickerhint,.popup button.clear{padding:8px 10px;color:#617468;font-size:13px}.popup button.clear{color:#8c4134}.summary{background:var(--soft);padding:10px;margin:10px 0;border-radius:5px}dialog{width:min(460px,94vw);color:#26332d;border:1px solid #b3c7b8;border-radius:9px;padding:18px;box-shadow:0 15px 60px #16332538}dialog::backdrop{background:#21382b57}.dialoghead button{font-size:19px;padding:1px 8px}dialog p{font-size:14px;line-height:1.6}dialog label{display:grid;gap:5px;margin:12px 0;font-size:14px}.actions{justify-content:flex-end;margin-top:18px;flex-wrap:wrap}.reuse{max-height:45vh;overflow:auto}
@media(max-width:760px){.app-shell{padding:7px;gap:7px}.brand .muted,.divider{display:none}.brand h1{font-size:17px}.brand{gap:5px}.topbar button,.tools button{font-size:12px;padding:5px 7px}.sheethead{align-items:flex-start;flex-direction:column;gap:7px}.sheethead h2{font-size:15px}.toolbar label{font-size:12px}.toolbar select,.toolbar input{width:155px}footer{font-size:11px;gap:5px}.skufixed{left:35px}.rowno{width:35px}}

.toolbar [aria-current="page"]{background:var(--soft);color:var(--green);border-color:#8eae97}
.sheet-name label{font-size:14px;font-weight:600}.fee-summary{width:75px}
thead .fee-toggle{padding:0}.fee-toggle button{width:100%;height:100%;border:0;border-radius:0;background:transparent;color:var(--green)}
.add-row{position:sticky;left:0;width:100%;text-align:left;padding:4px 12px;border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:20px;color:var(--green)}
.library-scroll{overflow:auto}.library .link-table{width:100%;min-width:750px}.link-table th,.link-table td{padding:7px 14px}.link-name-col{width:28%}.link-id-col{width:16%}.link-sku-col{width:29%}.link-cost-col{width:13%}.link-state-col,.link-action-col{width:7%}.link-table td button{border:0;background:transparent;padding:4px 0;color:var(--green);text-align:left}.empty{text-align:center;padding:32px 12px;color:var(--muted)}.library input[type=search]{width:min(290px,80vw)}

.login-panel{max-width:390px;margin:16vh auto;padding:26px;background:#fff;border:1px solid var(--line);border-radius:10px}.login-panel h1{font-size:22px}.login-panel a{display:inline-block;color:white;background:var(--green);padding:9px 16px;border-radius:5px;text-decoration:none}
.accountbar{display:flex;gap:8px;align-items:center;justify-content:flex-end;padding:4px 18px;font-size:13px}.accountbar button{font-size:12px}body:has(.accountbar) .app-shell{height:calc(100dvh - 37px)}.accounts{list-style:none;padding:0;max-height:50vh;overflow:auto}.accounts li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid var(--line)}.accounts small{display:block}

.library .link-table td{white-space:normal;overflow-wrap:anywhere}.library .link-table .numeric{text-align:right;font-variant-numeric:tabular-nums}.library .link-table .link-action{border:1px solid #b6c8bd;padding:3px 10px;border-radius:4px;white-space:nowrap}

.edit-sheets,.sheet-block{display:flex;flex-direction:column;flex:1;min-height:0}
.edit-sheets.multiple{overflow:auto;gap:14px;scroll-padding:8px}
.multiple .sheet-block{flex:none;gap:5px}
.multiple .table-wrap{flex:auto;min-height:0;max-height:62vh}
.draft-actions{display:flex;align-self:flex-start;gap:6px}
.draft-actions button{padding:3px 8px;color:var(--green);font-size:12px;font-weight:400;line-height:1.4}

.table-wrap table{--qty-width:44px;--basket-width:66px}
.quantity{width:var(--qty-width)}.basket-col{width:var(--basket-width)}
.table-wrap td.material-group{position:relative;padding:0;vertical-align:top}
.part-line{display:grid;grid-template-columns:minmax(0,1fr);min-height:49px}
.with-quantity>.part-line{grid-template-columns:minmax(0,1fr) var(--qty-width)}
.with-basket>.part-line{grid-template-columns:minmax(0,1fr) var(--qty-width) var(--basket-width)}
.material-group.with-quantity::after,.material-group.with-basket::before{content:"";position:absolute;inset-block:0;right:0;width:var(--qty-width);border-left:1px solid var(--line);box-sizing:border-box;pointer-events:none}
.material-group.with-basket::after{right:var(--basket-width)}
.material-group.with-basket::before{width:var(--basket-width)}
.part-line+.part-line{border-top:1px solid var(--line)}
.part-line>div{min-width:0;display:flex;flex-direction:column;justify-content:center;padding:2px 3px}
.part-name{position:relative}
.part-name:has(.part-action) .wrap-editor{margin-right:15px}
.part-name small{margin-inline:4px;color:#67706b;font-size:11px;line-height:1.3;overflow-wrap:anywhere}
.part-action{position:absolute;right:0;top:5px;border:0;background:transparent;padding:0 3px;color:#748278;font-size:14px;opacity:.45}
.part-name:hover .part-action,.part-action:focus-visible{opacity:1}
.basket-cell select{width:100%;height:24px;padding:0 2px;border:0;background:transparent;font-size:13px}
.basket-model{position:relative;min-width:0;padding:2px 12px 2px 2px;color:var(--muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.basket-model::after{content:"";position:absolute;right:3px;top:50%;width:5px;height:5px;border:solid currentColor;border-width:0 1px 1px 0;transform:translateY(-75%) rotate(45deg);pointer-events:none}
.basket-model select{position:absolute;inset:0;height:100%;opacity:0;cursor:pointer}
.basket-model:focus-within{outline:2px solid #428862;outline-offset:-1px}
.basket-model:has([aria-invalid="true"]){background:#fff0ef;box-shadow:inset 0 0 0 2px #ba332a}
.toolbar .manual-sync{padding:4px 2px;border:0;background:transparent;color:#69736d;font-size:12px;font-weight:400}
.toolbar .manual-sync:hover:not(:disabled){color:var(--green);background:transparent;text-decoration:underline}
.sync-status{color:#69736d;font-size:12px}.sync-warning{color:#ae302d}
button.trash,.library .link-table button.trash{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:32px;height:32px;padding:0;border:0;background:transparent;color:#69736d}
button.trash:hover:not(:disabled),.library .link-table button.trash:hover:not(:disabled){color:#ae302d;background:#fceeee}
.library .link-table{min-width:940px}.library .link-action-col{width:10%}.library .link-name-col{width:21%}.library .link-sku-col{width:21%}.library .link-id-col{width:13%}.link-code-col{width:15%}
.link-bom{overflow-wrap:anywhere}.finished-code{display:block;font-variant-numeric:tabular-nums;user-select:all}.bom-state{font-size:12px;color:var(--muted)}.bom-state.sync-warning{color:#ae302d}
.library .link-table td:last-child:has(.trash){white-space:nowrap;padding-inline:5px}

.table-wrap td.index{padding:0;text-align:center}.table-wrap button.row-trash:hover:not(:disabled){color:#ae302d;background:transparent}

.table-wrap td.fee-selected{background:#e5f2e8!important;box-shadow:inset 0 0 0 1px #85ad8e}
.table-wrap .fee-selected textarea:focus{background:transparent!important;outline:0}
.table-wrap td.fee-selected:focus-within{box-shadow:inset 0 0 0 2px #448158}

.table-wrap thead tr:nth-child(2) th{padding-inline:3px}
.table-wrap .fee-cell{padding-inline:2px}
.pending-cost{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.pending-help{position:relative;display:inline-grid;place-items:center;width:18px;height:18px;padding:0;border:0;border-radius:0;background:transparent;color:#68736d;font-size:10px;font-weight:400;line-height:1}
.pending-help:hover:not(:disabled){background:transparent;color:#415249}
.pending-help::before{content:"";position:absolute;inset:3px;border:1px solid #aab4ad;border-radius:50%;pointer-events:none}
.table-wrap [aria-invalid="true"]{background:#fff0ef!important;box-shadow:inset 0 0 0 2px #ba332a}

.wrap-editor{display:grid;min-width:0}
.wrap-editor textarea,.wrap-editor::after{grid-area:1/1;min-width:0;margin:0;padding:4px;border:1px solid transparent;font:inherit;font-size:12px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.wrap-editor::after{content:attr(data-value) " ";visibility:hidden;pointer-events:none}
.wrap-editor textarea{width:100%;resize:none;overflow:hidden;border-radius:2px;background:transparent;color:inherit}
.wrap-editor textarea::placeholder{color:#85948b}
.wrap-editor textarea:focus{outline:2px solid #3b8d5e;outline-offset:-1px;background:white}
.library .link-table td.sku-display{font-size:12px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}

.sheethead .sheet-name{min-width:0;max-width:100%}
.link-editor{width:clamp(130px,28vw,390px);max-width:100%;border:1px solid #c8d5cc;border-radius:5px}
.link-editor textarea,.link-editor::after{padding:6px 9px;font-size:13px}
.wrap-editor textarea:disabled{opacity:1}
.fee-cell .wrap-editor textarea,.fee-cell .wrap-editor::after{padding-inline:2px}
.table-wrap th,.table-wrap .numeric,.popup button,.library .link-table td button{overflow-wrap:anywhere}
.library .link-table td button:not(.trash){max-width:100%}
.library .link-table td:first-child button:not(.trash,.link-action){white-space:pre-wrap}

.bom-choice{display:flex;gap:4px;align-items:center;flex-wrap:wrap}.bom-choice select{max-width:100%;height:26px;font-size:12px}
