.product-costing{color:#173e34;max-width:1440px;margin:auto;font-size:14px;line-height:1.5}
.product-costing *,.pc-dialog *{box-sizing:border-box}
.product-costing [hidden],.pc-dialog [hidden]{display:none!important}
.pc-product-filters{margin:12px 0}.pc-product-filters>summary{cursor:pointer;font-size:12px;padding-top:6px;padding-bottom:6px}
.pc-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-bottom:20px;border-bottom:1px solid #ccd8d1}
.product-costing h3{font-size:22px;margin:0}.product-costing h4{font-size:16px;margin:20px 0 12px}.pc-heading p{margin:6px 0 0;color:#596c62}
.pc-search,.pc-filters,.pc-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}
.pc-filters{grid-template-columns:2fr 1fr 1fr 1fr}.product-costing label,.pc-dialog label{display:grid;gap:6px;min-width:0;font-size:12px;font-weight:600}
.pc-filters.pc-default-scope{grid-template-columns:2fr 1fr 1fr}
:root .product-costing :is(input:not([type=radio]):not([type=checkbox]),select,textarea),:root .pc-dialog :is(input,select){min-width:0;width:100%;min-height:44px;padding:10px 12px;border:1px solid #c7d3ca;border-radius:6px;background:#fff;color:#173e34;font:400 14px/1.4 system-ui}
.pc-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:36px}.pc-layout>section{min-width:0}.pc-analysis{border-left:1px solid #ccd8d1;padding-left:28px}
.pc-product{display:flex;align-items:center;gap:14px;padding:12px 0}.pc-product h4{margin:0}.pc-product img{object-fit:contain;flex:none;border-radius:6px}.pc-product span{color:#5c7165;font-size:12px}
.product-costing dl,.pc-dialog dl{display:grid;gap:0;margin:10px 0 20px}.product-costing dl>div,.pc-dialog dl>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,auto);gap:12px;padding:8px 0;border-bottom:1px solid #e1e8e3}.product-costing dd,.pc-dialog dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;font-weight:600}.pc-totals{max-width:540px}
.pc-table-wrap{overflow:auto}.product-costing table{width:100%;border-collapse:collapse;font-size:12px}.product-costing :is(th,td){padding:10px 8px;border-bottom:1px solid #dce4de;text-align:left;overflow-wrap:anywhere}.product-costing th{font-weight:600;color:#567063}
.pc-target{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.pc-target>label:last-child{grid-column:1/-1}.pc-warning{border-left:3px solid #b07813;background:#fff9e9;padding:12px;color:#79580c}.pc-danger{border-color:#ad3743;color:#942d3a;background:#fff0f2}
.pc-scopes{border:0;padding:0;display:grid;gap:8px;margin:12px 0}.pc-scopes label,.pc-branch-choices label{display:flex;align-items:center;gap:8px;min-height:32px}.pc-branch-choices{display:flex;flex-wrap:wrap;gap:4px 14px;margin:12px 0}
.product-costing [data-review]{margin-top:16px}.pc-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.pc-settings{margin:24px 0}.pc-settings summary{font-weight:600;cursor:pointer;padding-top:8px;padding-bottom:8px}
.pc-branches,.pc-history{border-top:1px solid #ccd8d1;margin-top:28px;padding-top:8px}.pc-history summary{padding:12px 0;cursor:pointer}.pc-history pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:320px;overflow:auto}
.product-costing :is(button,input,select,textarea,summary):focus-visible,.pc-dialog :is(button,input,select):focus-visible{outline:3px solid #be941c;outline-offset:3px}.product-costing button:disabled{opacity:.5;cursor:not-allowed}
.pc-dialog{border:1px solid #c7d3ca;border-radius:8px;padding:0;max-width:680px;width:calc(100% - 32px);max-height:calc(100dvh - 32px);color:#173e34}.pc-dialog::backdrop{background:#163b325e}.pc-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 34px)}.pc-dialog header,.pc-dialog footer{padding:16px 20px;flex:none}.pc-dialog header{border-bottom:1px solid #dce4de}.pc-dialog h3{margin:0;font-size:18px}.pc-dialog-body{padding:16px 20px;overflow:auto;min-height:0}.pc-dialog footer{display:flex;justify-content:flex-end;gap:12px;border-top:1px solid #dce4de}.pc-recipe-line{display:grid;grid-template-columns:minmax(0,1fr) 110px 44px;align-items:end;gap:10px;margin:16px 0}
.catalog-costing-link{font:inherit;white-space:nowrap;min-height:44px}
.product-costing .btn,.pc-dialog .btn{min-height:44px}
.product-costing textarea{resize:vertical;max-width:100%}
.catalog-product-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
.pc-zero-costs{border:0;padding:0;margin:16px 0;display:grid;gap:8px}.pc-zero-costs legend{font-size:12px;font-weight:600;margin-bottom:8px}.pc-zero-costs label{display:flex;align-items:center;gap:10px;min-height:44px}.pc-zero-costs input{flex:none}.pc-zero-costs span{overflow-wrap:anywhere;min-width:0}
@media(max-width:1023px){.pc-layout{grid-template-columns:minmax(0,1fr)}.pc-analysis{border-left:0;border-bottom:1px solid #ccd8d1;padding:0 0 20px;grid-row:1}.pc-filters,.pc-filters.pc-default-scope{grid-template-columns:1fr 1fr}}
@media(max-width:599px){.pc-search,.pc-settings-grid{grid-template-columns:minmax(0,1fr)}.pc-heading{align-items:flex-start}.pc-filters,.pc-filters.pc-default-scope{grid-template-columns:minmax(0,1fr)}.pc-breakdown table thead{display:none}.pc-breakdown :is(tbody,tr,td){display:block}.pc-breakdown tr{padding:12px 0;border-bottom:1px solid #c7d3ca}.pc-breakdown td{border:0;display:flex;gap:12px;justify-content:space-between;padding:4px 0}.pc-breakdown td:before{content:attr(data-label);color:#567063;flex:0 0 45%}.pc-recipe-line{grid-template-columns:minmax(0,1fr) 44px}.pc-recipe-line>label:first-child{grid-column:1/-1}.pc-dialog header,.pc-dialog-body,.pc-dialog footer{padding:14px}.pc-dialog footer .btn{min-height:44px}.pc-heading .btn{flex:none}}
