.price-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
#costing-view .table-scroll{max-height:none;overflow:visible}
#prices-table{width:100%;table-layout:fixed;min-width:0}
#prices-table th:first-child{width:35%}
#prices-table th{white-space:normal}
#prices-table td{vertical-align:top;padding:16px 10px}
#prices-table input,#prices-table select{width:100%;min-width:0;min-height:44px;font-size:16px;border:1px solid #c9d5c8;border-radius:8px;padding:9px;background:white;display:block}
#prices-table small{display:block;font-size:13px;font-weight:normal;color:#526553;margin-top:4px}
#prices-table .item-button{max-width:100%}
#prices-table .item-button>span{min-width:0}
#prices-table .item-name{overflow-wrap:anywhere}
.price-quantity{display:flex;gap:6px;align-items:center}
.price-quantity input{flex:1;width:50px!important}
.price-extra{font-size:14px;margin-top:8px}
.price-extra summary{cursor:pointer;min-height:32px;padding:6px 0}
.price-extra label{display:block;margin-top:10px}
.price-history-link{display:block;margin-top:10px;min-height:36px;text-align:left}
#price-history-dialog{width:700px;overflow:hidden}
#price-history-dialog[open]{display:flex;flex-direction:column}
#price-history-dialog .drawer-header{flex:none;border-bottom:1px solid var(--line)}
#price-history-body{overflow:auto;padding-top:18px;color:var(--ink)}
.price-history-snapshot{display:flex;flex-direction:column;gap:4px;min-width:0;padding:12px;background:#f5f7f2;border-radius:8px;overflow-wrap:anywhere}
.price-history-snapshot h4{margin:0;font-size:14px;color:#526553}
.price-history-snapshot strong{font-size:18px}
.price-history-snapshot span{font-size:14px}
.price-history-change{border-bottom:1px solid var(--line);padding:12px 0}
.price-history-change summary{cursor:pointer;overflow-wrap:anywhere}
.price-history-change summary>span{display:block;font-size:13px;color:#526553;margin-top:4px}
.price-history-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.price-history-baseline{margin-top:18px;font-size:14px}
.price-history-baseline summary{cursor:pointer}
.price-history-note{white-space:pre-wrap}
.price-history-draft{font-size:14px;color:#76571d}
@media(max-width:700px){.price-history-comparison{grid-template-columns:minmax(0,1fr)}#price-history-dialog .drawer-header{padding:16px}#price-history-body{padding:16px}}
#price-error{color:#a63020}
.cost-total{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}
.cost-total strong{font-size:22px}
.cost-issues{padding:0;list-style:none}
.cost-issues li{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #e0e6dc}
.cost-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;padding:12px 0;border-bottom:1px solid #e0e6dc}
.cost-line>button{text-align:left;grid-column:1}
.cost-line>span{grid-column:1;font-size:14px}
.cost-line>strong{grid-column:2;grid-row:1/3;align-self:center}
.cost-scope{font-size:14px;color:#526553;margin-top:24px}
@media(max-width:1000px) and (min-width:701px){#prices-table th:first-child{width:29%}#prices-table td{padding:12px 6px}#prices-table input{padding:8px 3px}}
@media(max-width:700px){
 #prices-table,#prices-table tbody{display:block;width:100%}
 #prices-table thead{display:none}
 #prices-table td{height:auto;min-height:0}
 #prices-table tr:not(.mobile-open) .price-extra{display:none}
 #prices-table .mobile-open>td:first-child{display:block!important;max-height:none!important;height:auto!important}
 #prices-table .mobile-open .price-extra{margin:12px 0 0}
 #prices-table .mobile-open input,#prices-table .mobile-open select{max-width:100%}
 #costing-view .price-tabs .button{flex:1;white-space:normal;padding:10px;font-size:15px}
 #costing-view .sourcing-filters{min-width:0}
 .cost-issues li{flex-direction:column;align-items:flex-start}
 .cost-issues .button{max-width:100%;white-space:normal}
 .cost-line{grid-template-columns:minmax(0,1fr);gap:6px}
 .cost-line>strong{grid-column:1;grid-row:auto}
}
#costing-view #price-search{min-width:0;min-height:44px;font:inherit;padding:10px;border:1px solid #c9d5c8;border-radius:8px;background:white}
@media(max-width:700px){
 #prices-table .mobile-open>td:not(:first-child):not(.mobile-summary):before{content:attr(data-label);font-size:14px;color:#526553;margin-bottom:6px}
 #prices-table .mobile-open .mobile-meta{visibility:hidden}
}

.history-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.history-controls input,.history-controls select{max-width:100%;min-height:44px}.history-controls input{flex:1;min-width:160px}#history-status-text{margin:8px 16px 16px;font-size:14px}.purchase-history-row{border-top:1px solid #e0e7dc}.purchase-history-row>summary{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 18px;cursor:pointer;min-height:64px}.purchase-history-row>summary>span{min-width:0}.purchase-history-row>summary>span:last-child{text-align:right;flex-shrink:0}.purchase-history-row small{display:block;font-size:13px;color:#647667}.purchase-history-row strong{font-size:16px}.purchase-history-details{padding:0 18px 18px}.purchase-history-details .table-scroll{max-height:none}.purchase-history-details table{min-width:480px;width:100%}.purchase-history-details p{margin:10px 0}.purchase-history-details td{padding:10px}.purchase-history-details td small{display:block}
@media(max-width:700px){.history-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:12px}.history-controls input{grid-column:1/-1;min-width:0;width:100%}.history-controls select{width:100%;min-width:0}.purchase-history-row>summary{padding:10px;gap:8px;min-height:64px}.purchase-history-row strong{font-size:14px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.purchase-history-row>summary small{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.purchase-history-row>summary>span:last-child{font-size:13px;max-width:45%}.purchase-history-details{padding:0 10px 12px}.price-tabs{flex-wrap:wrap}}

.history-controls input{border:1px solid #cad6c8;border-radius:8px;padding:10px;font-size:16px}.purchase-history-row>summary::after{content:"⌄";color:#647667}.purchase-history-row[open]>summary::after{content:"⌃"}

.cost-gst-totals,.cost-gst-amounts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.cost-gst-totals>div{padding:12px;background:#f3f6ef;border-radius:8px;min-width:0}
.cost-gst-totals span,.cost-gst-totals strong,.cost-gst-amounts small,.cost-gst-amounts strong{display:block;overflow-wrap:anywhere}
.cost-gst-totals span,.cost-gst-amounts small{font-size:12px;color:#526553;margin-bottom:5px}
.cost-gst-totals strong{font-size:18px}
.cost-gst-note,.price-gst p{font-size:13px;line-height:1.5;color:#526553}
.price-gst,.price-gst p{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.cost-line.cost-line-gst{display:flex;flex-direction:column;gap:8px;padding:18px 0}
.cost-gst-amounts{margin-top:5px;font-size:15px}
.cost-gst-source{font-size:12px;color:#526553;overflow-wrap:anywhere}
.cost-gst-source summary{cursor:pointer}.cost-gst-source details{margin-top:5px}
@media(max-width:700px){.cost-gst-totals,.cost-gst-amounts{gap:8px}.cost-gst-totals>div{padding:8px}.cost-gst-totals strong,.cost-gst-amounts strong{font-size:14px}.cost-gst-totals span,.cost-gst-amounts small{font-size:11px}.cost-line.cost-line-gst>button{font-size:15px}.cogs-table .cogs-status{font-size:12px}.cogs-table .cogs-action{grid-column:auto;align-self:center}.cogs-table .cogs-amount strong{font-size:15px;white-space:normal}}
