:root{--paper:#f4f6f8;--card:#ffffff;--ink:#17252a;--muted:#667477;--line:#dce4e2;--teal:#00a6a6;--teal-dark:#106f69;--amber:#b06a00;--red:#fe2c55;--nav:#101318;--shadow:0 8px 22px rgba(17,42,45,.06)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"Segoe UI","Microsoft YaHei",sans-serif}.page-workspace{min-width:0}.management-page-head{margin:1.15rem clamp(1rem,3vw,3rem) .8rem;padding:.95rem 1.05rem;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow)}.eyebrow,.section-no{margin:0 0 .55rem;color:var(--teal-dark);font:800 .72rem/1.2 Consolas,monospace;letter-spacing:.14em}.management-page-head h1{margin:.16rem 0 .24rem;font-size:1.56rem;line-height:1.12;letter-spacing:0}.lede{max-width:820px;margin:0;color:var(--muted);font-size:.82rem;line-height:1.55}
.management-note{margin:0 clamp(1rem,3vw,3rem) .8rem;padding:.78rem 1rem;display:grid;grid-template-columns:minmax(170px,.45fr) minmax(240px,.85fr) minmax(260px,1fr);align-items:center;gap:1rem;background:var(--card);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow)}.management-note h2{margin:0;font:700 1rem "Segoe UI","Microsoft YaHei",sans-serif}.management-note p:last-child{margin:0;color:var(--muted);line-height:1.55;font-size:.82rem}.date-track{display:grid;grid-template-columns:auto 1fr auto 1fr auto;align-items:center;gap:.6rem;color:var(--muted);font-size:.72rem}.date-track i{height:1px;background:var(--line)}.date-track b{padding:.35rem .5rem;border:1px solid var(--line);background:#f8fafb;color:var(--ink)}.date-track .future{color:var(--muted)}
.configuration-topbar{margin:1.15rem clamp(1rem,3vw,3rem) 0;display:grid;grid-template-columns:1fr auto;gap:.85rem;align-items:stretch}.section-switcher{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);background:#fff}.section-switcher button{padding:1rem;border:0;border-right:1px solid var(--line);background:transparent;text-align:left;color:#7b817f;font:800 .72rem Consolas,monospace;cursor:pointer}.section-switcher button:last-child{border-right:0}.section-switcher span{display:block;margin-top:.35rem;color:var(--ink);font:700 .94rem "Segoe UI","Microsoft YaHei",sans-serif}.section-switcher button.active{background:#f8fafb;box-shadow:inset 0 -3px var(--teal)}.recalc-open-button{height:100%;min-width:128px}
main{padding:1.4rem clamp(1rem,3vw,3rem) 4rem}.config-section{background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow)}.section-heading,.subsection-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.5rem 1.6rem;border-bottom:1px solid var(--line)}.section-heading h2{margin:0;font:700 clamp(1.5rem,2.3vw,2.2rem) Georgia,"Microsoft YaHei",serif}.section-heading p:last-child,.subsection-heading p{margin:.35rem 0 0;color:var(--muted);font-size:.88rem}.subsection{margin:1.25rem;border:1px solid var(--line)}.subsection-heading{padding:1rem 1.1rem;background:#f8fafb}.subsection-heading h3{margin:0;font-size:1rem}.notice{display:flex;gap:1rem;margin:1rem 1.5rem;padding:1rem;border-left:4px solid var(--amber);background:#fff7e9;color:#685332;font-size:.86rem}.notice strong{white-space:nowrap}.table-shell{width:100%;overflow:auto}table{width:100%;border-collapse:collapse;table-layout:fixed;min-width:900px}th,td{padding:.82rem .9rem;border-bottom:1px solid #e5dfd4;text-align:left;vertical-align:top;font-size:.82rem}th{background:#edf4f3;color:#4e5f62;font-size:.72rem;letter-spacing:.04em}td{max-width:240px}.cell-main{display:block;font-weight:700}.cell-sub{display:block;margin-top:.22rem;color:var(--muted);font-size:.74rem}.truncate,.cell-edit{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell-edit{width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;font:inherit}.cell-edit:hover{color:var(--teal-dark);text-decoration:underline}.row-action{border:0;background:transparent;color:var(--teal-dark);font-weight:800;cursor:pointer}.empty-state{margin:0;padding:2rem;text-align:center;color:var(--muted)}
button.primary,button.secondary,.import-button{min-height:40px;padding:.65rem 1rem;border:1px solid var(--teal-dark);font-weight:800;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-align:center}button.primary{background:var(--teal-dark);color:#fff}button.secondary,.import-button{background:transparent;color:var(--teal-dark)}button:disabled{opacity:.45;cursor:not-allowed}.visually-hidden-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.import-toolbar{display:grid;gap:.45rem;min-width:220px;align-self:flex-start}.import-toolbar-wide{min-width:380px}.import-toolbar>button.primary{width:100%}.import-button-primary{width:100%;min-height:52px;background:var(--teal-dark);color:#fff;font-size:1.08rem}.import-template-row{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:.45rem}.import-template-row button,.import-template-row .import-button{width:100%;min-height:40px;background:#fff}.import-grid{display:grid;grid-template-columns:minmax(260px,.55fr) minmax(360px,1fr);gap:1rem;padding:1rem 1.5rem}.drop-zone{min-height:auto;display:flex;align-items:center;gap:.7rem;border:1px solid var(--line);background:#f8fafb;cursor:pointer;padding:.75rem .9rem}.drop-zone strong{font:800 .86rem "Segoe UI","Microsoft YaHei",sans-serif}.drop-zone small,.drop-zone span{display:none}.drop-zone input{max-width:260px}.inline-import{display:flex;align-items:center;gap:.75rem;align-self:start;min-height:40px;padding:.58rem .75rem;border:1px solid var(--line);background:#f8fafb}.inline-import span{font-weight:800;color:var(--teal-dark);white-space:nowrap}.inline-import input{width:min(260px,100%);font-size:.78rem}.preview-panel{padding:1.1rem;border:1px solid var(--line);display:flex;flex-direction:column;justify-content:space-between;gap:.85rem}.preview-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem}.preview-counts article{padding:.8rem;background:#f8fafb}.preview-counts span,.preview-counts strong{display:block}.preview-counts strong{margin-top:.3rem;font:800 1.7rem Georgia,serif}.preview-counts .failed{background:#f9e9e5;color:var(--red)}.import-result-panel{min-height:116px;margin:0;padding:.9rem 1rem;border:1px solid var(--line);background:#f8fafb}.import-result-panel summary{font-weight:800;color:var(--teal-dark);cursor:pointer}.import-result-panel p{margin:.65rem 0 0;color:var(--muted);font-size:.82rem;line-height:1.5}
.sku-workbench-heading{padding:1.2rem 1.3rem 1rem;border-bottom:1px solid var(--line);align-items:flex-start}.sku-workbench-heading h2{font-size:clamp(1.7rem,2.6vw,2.6rem)}.sku-actions,.heading-actions,.template-actions,.import-actions{display:flex;gap:.65rem;flex-wrap:wrap;justify-content:flex-end;align-items:center}.template-actions button{min-height:34px;padding:.45rem .65rem}.compact-drop-zone{display:flex;align-items:center;gap:.7rem;padding:.6rem .75rem;border:1px solid var(--line);background:#fff;cursor:pointer;min-height:40px}.compact-drop-zone span{font-weight:800;color:var(--teal-dark)}.compact-drop-zone input{width:100%;font-size:.78rem}.sku-import-result{margin:1rem 1.25rem .85rem;border:1px solid var(--line);background:#f8fafb}.sku-import-result summary{padding:.9rem 1rem;font-weight:800;color:var(--teal-dark);cursor:pointer}.sku-import-result-body{display:grid;grid-template-columns:1fr;gap:.75rem;padding:0 1rem 1rem}.compact-counts{grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem;max-width:560px}.compact-counts article{padding:.55rem}.compact-counts strong{font-size:1.25rem}.sku-import-result .muted,.sku-import-result #import-message{margin:.15rem 0 0;color:var(--muted);font-size:.78rem;line-height:1.45}.failure-table-shell,.import-preview-table{max-height:150px}.failure-table-shell table,.import-preview-table table{min-width:0}.failure-table-shell th,.failure-table-shell td,.import-preview-table th,.import-preview-table td{font-size:.76rem;padding:.55rem .65rem}.failure-table-shell th:first-child{width:38%}.failure-table-shell td:first-child{color:var(--red);font-weight:700}.failure-table-shell td:last-child{word-break:break-word}.import-actions{justify-content:flex-start}.import-actions button{min-height:34px;padding:.45rem .8rem}
.editor-dialog{width:min(900px,calc(100vw - 2rem));max-height:90vh;padding:0;border:1px solid var(--line);background:var(--card);box-shadow:0 24px 90px rgba(0,0,0,.25)}.editor-dialog::backdrop{background:rgba(12,25,29,.62)}.compact-dialog{width:min(720px,calc(100vw - 2rem))}.editor-dialog form>header,.editor-dialog form>footer{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.2rem 1.4rem;border-bottom:1px solid var(--line)}.editor-dialog form>footer{border-top:1px solid var(--line);border-bottom:0;justify-content:flex-end}.editor-dialog h2{margin:0;font:700 1.5rem Georgia,"Microsoft YaHei",serif}.icon-button{border:0;background:transparent;font-size:1.8rem;cursor:pointer}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;padding:1.4rem}.form-grid label{display:grid;gap:.38rem;color:#586467;font-size:.78rem}.form-grid label[hidden]{display:none}.form-grid input,.form-grid select,.component-row input{width:100%;min-height:42px;padding:.55rem .65rem;border:1px solid #bfc6c2;background:#fff;font:inherit}.form-grid input:focus,.form-grid select:focus,.component-row input:focus{outline:3px solid rgba(33,143,138,.18);border-color:var(--teal)}input[data-digits],input[data-money]{appearance:none;-moz-appearance:textfield}input[data-digits]::-webkit-outer-spin-button,input[data-digits]::-webkit-inner-spin-button,input[data-money]::-webkit-outer-spin-button,input[data-money]::-webkit-inner-spin-button{appearance:none;margin:0}.component-editor{margin:0 1.4rem 1.4rem;padding:1rem;border:1px solid var(--line);background:#f8fafb}.component-editor>div:first-child,.component-row{display:flex;align-items:center;justify-content:space-between;gap:.7rem}.component-editor h3{margin:0}.component-row{display:grid;grid-template-columns:1fr 150px auto;margin-top:.7rem}.component-row button{border:0;background:transparent;color:var(--red);cursor:pointer}.component-editor p{margin:.8rem 0 0;color:var(--muted);font-size:.76rem}.form-error{min-height:1.2rem;margin:0;padding:0 1.4rem;color:var(--red);font-size:.82rem}
.profit-recalc-dialog{width:min(980px,calc(100vw - 2rem))}.profit-recalc-body{display:grid;gap:1rem;padding:1.3rem 1.4rem;max-height:min(68vh,720px);overflow:auto}.recalc-type-field{display:grid;gap:.7rem;margin:0;padding:1rem;border:1px solid var(--line);background:#f8fafb}.recalc-type-field legend{font-weight:800;color:var(--teal-dark)}.recalc-type-field label{display:flex;align-items:flex-start;gap:.65rem}.recalc-type-field strong,.recalc-type-field small{display:block}.recalc-type-field small,.muted{color:var(--muted)}.recalc-panel{display:grid;gap:.8rem}.recalc-panel[hidden]{display:none}.recalc-panel h3{margin:0}.recalc-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.65rem}.recalc-stats article{padding:.75rem;border:1px solid var(--line);background:#fff}.recalc-stats span,.recalc-stats strong{display:block}.recalc-stats strong{margin-top:.25rem;font:800 1.35rem Georgia,serif}.recalc-product-list{display:grid;gap:.55rem}.recalc-product-item{display:grid;grid-template-columns:auto 1fr auto;gap:.8rem;align-items:center;padding:.75rem;border:1px solid var(--line);background:#fff}.recalc-product-item span span,.recalc-product-item small{display:block;color:var(--muted)}.recalc-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.35rem .8rem;margin:0;padding-left:1.2rem}.warning-text{margin:0;color:var(--red);font-weight:700}
@media(max-width:1100px){.management-note{grid-template-columns:1fr}.section-switcher{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:repeat(2,1fr)}.sku-import-result-body{grid-template-columns:1fr}}@media(max-width:700px){.management-page-head{grid-template-columns:1fr}.section-switcher{grid-template-columns:1fr}.section-switcher button{border-right:0;border-bottom:1px solid var(--line)}.section-heading,.subsection-heading,.import-card-head{align-items:flex-start;flex-direction:column}.import-grid,.form-grid{grid-template-columns:1fr}.component-row{grid-template-columns:1fr}.date-track{grid-template-columns:auto 1fr auto}.date-track i:last-of-type,.date-track .future{display:none}.template-actions,.sku-actions{justify-content:flex-start}}
@media(prefers-reduced-motion:no-preference){.config-section.active{animation:ledger-in .22s ease-out}@keyframes ledger-in{from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:none}}}
.recalc-progress-track{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.8rem}.recalc-progress-track progress{width:100%;height:14px;accent-color:var(--teal-dark)}.recalc-progress-percent{min-width:3.2rem;text-align:right}.recalc-progress-estimate{margin:0;color:var(--teal-dark);font-weight:800}.danger-button{border-color:var(--red)!important;color:var(--red)!important}
