.bc315{max-width:1400px;margin:auto}.bc315 header,.bc315 .bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:15px}.bc315 header h2{margin-right:auto}.bc315 label{display:grid;gap:6px;font-size:13px}.bc315 .fields{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:14px;margin:18px 0}.bc315 input,.bc315 select,.bc315 textarea{width:100%;min-width:80px;padding:9px;border:1px solid #cbd5e1;border-radius:8px}.bc315 table input[type=checkbox]{min-width:0;width:18px}.bc315 .summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.bc315 .summary article{padding:18px;border-radius:12px;background:#eaf3ff;color:#174172}.bc315 .summary article:nth-child(2){background:#eaf8ee;color:#23633a}.bc315 .summary article:nth-child(3){background:#fff4dc;color:#7c5310}.bc315 .summary article:nth-child(4){background:#ede9fe;color:#54369a}.bc315 .summary span,.bc315 .summary b{display:block}.bc315 .summary b{font-size:24px;margin-top:6px}.bc315 .table-wrap{overflow:auto}.bc315 td{min-width:95px}.bc315 td:first-child{min-width:150px}.bc315 .note{color:#526172;font-size:13px}.bc315 input:invalid{border-color:#d97706}@media(max-width:760px){.bc315 .fields,.bc315 .summary{grid-template-columns:repeat(2,minmax(0,1fr))}.bc315 .summary b{font-size:19px}}

.bc316-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.bc316-tabs .active{background:#2563eb;color:white}

.bc315{font-size:16px}.bc315 label{font-size:16px;font-weight:700;color:#173a68;gap:8px}.bc315 input,.bc315 select,.bc315 textarea{font-size:17px!important;font-weight:700!important;color:#123254!important;background:#f2f7ff!important;border:1.5px solid #a9c1e4!important;padding:12px!important;border-radius:10px!important;min-height:46px;box-sizing:border-box}.bc315 input:focus,.bc315 select:focus,.bc315 textarea:focus{outline:3px solid #bfdbfe;border-color:#2563eb!important;background:#fff!important}.bc315 .table th,.bc315 .table td{font-size:15px!important;padding:12px!important}.bc315 .note{font-size:15px}.bc315 .btn,.bc315 .bc316-tabs .btn{font-size:15px;font-weight:700;padding:10px 16px}.bc315 .summary span{font-size:15px;font-weight:700}.bc315 input[type=checkbox]{padding:0!important;min-height:22px;width:22px!important}.bm317-lines{grid-column:1/-1;min-width:0}.bm317-lines table input,.bm317-lines table select{min-width:110px;font-size:16px;font-weight:600}.bm317-lines td:first-child select{min-width:160px}.bm317-lines [data-total]{display:block;margin-top:14px;font-size:18px;color:#174172}

/* v318: contain fields in their own cells; wrap cards/actions inside the card. */
.bc315{width:100%;max-width:100%;min-width:0;box-sizing:border-box}.bc315>form,.bc315 header,.bc315 .bar,.bc315 .fields,.bc315 .summary,.bc315 label{min-width:0;max-width:100%;box-sizing:border-box}.bc315 .fields{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}.bc315 .summary{grid-template-columns:repeat(4,minmax(0,1fr))}.bc315 .summary article{min-width:0;overflow-wrap:anywhere}.bc315 header h2{overflow-wrap:anywhere;line-height:1.4}.bc315 .btn{white-space:normal;max-width:100%;flex-shrink:1}.bc315 .table-wrap,.bm317-lines .table-wrap{width:100%;max-width:100%;overflow-x:auto}.bc315 table{table-layout:auto!important;min-width:1050px;width:100%}.bc315 table td,.bc315 table th{min-width:0!important;vertical-align:middle}.bc315 table input:not([type=checkbox]){width:105px!important;min-width:0!important;max-width:100%}.bc315 table select{width:180px!important;min-width:0!important;max-width:100%}.bc315 .fields input,.bc315 .fields select,.bc315 textarea{min-width:0!important;max-width:100%}.bc315 .summary b{font-size:clamp(20px,2.2vw,26px)}.bm317-lines table{table-layout:auto;min-width:1120px}.bm317-lines input[data-key=text]{width:200px}.bm317 .bm318-charges{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:16px;min-width:0}.bm317 .bm318-charges label{min-width:0}@media(max-width:900px){.bc315 .summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.bc315{padding:12px}.bc315 .summary article{padding:12px}.bc315 .bar .btn{flex:1 1 140px}.bc315 header h2{font-size:21px}.bc315 .bc316-tabs .btn{flex:1 1 130px}.bc315 .summary span{font-size:13px}}

.bc315 .bc320-material thead th{background:#174b85!important;color:#fff!important;border-color:#386a9f}.bc315 .bc320-material thead th:nth-child(4){background:#2563eb!important}.bc315 .bc320-material thead th:nth-child(6){background:#a66a08!important}.bc315 .bc320-material thead th:nth-child(8){background:#15803d!important}.bc315 .bc320-material tbody tr:nth-child(even){background:#f1f6fd}.bc315 .bc320-material tbody tr:hover{background:#e5f0ff}.bc315 .bc320-material td[data-kg]{background:#eaf2ff;color:#1d4ed8;font-weight:800}.bc315 .bc320-material td[data-ratio]{background:#fff7df;color:#92620a;font-weight:800}.bc315 .bc320-material td[data-cost]{background:#e7f8ed;color:#166534;font-weight:800}.bc315 .bc320-material td:last-child{min-width:145px!important}.bc315 .bc320-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}.bc315 .bc320-actions .btn{padding:8px 10px;white-space:nowrap}.bc315 .bc320-actions [data-add-after]{background:#dcfce7;color:#166534;border-color:#86efac;font-size:21px;line-height:1;min-width:38px;min-height:38px}

/* v321 compact summary and table totals */
.bc315 .summary{gap:8px;margin:10px 0 12px}.bc315 .summary article{padding:10px 12px;border-radius:9px}.bc315 .summary span{font-size:13px;line-height:1.3}.bc315 .summary b{font-size:clamp(17px,1.6vw,22px);margin-top:4px;line-height:1.25}.bc315 .bc320-actions [data-remove]{min-width:36px;padding:8px;font-size:19px;line-height:1}.bc315 .bc320-material td:last-child{min-width:95px!important}.bc315 .bc320-material tfoot th,.bc315 .bc320-material tfoot td{background:#eaf0fb;font-weight:800;border-top:2px solid #93add4;padding:11px}.bc315 .bc320-material tfoot [data-total-weight]{color:#1d4ed8;background:#e0ecff}.bc315 .bc320-material tfoot [data-total-ratio]{color:#92620a;background:#fff2ce}.bc315 .bc320-material tfoot [data-total-cost]{color:#166534;background:#dcfce7}@media(max-width:480px){.bc315 .summary article{padding:8px 10px}.bc315 .summary span{font-size:12px}.bc315 .summary b{font-size:18px}}
