/* CBM calculator page — dedicated layout, isolated from shared tool tables */
.cbm-page .section>.container{width:min(1200px,calc(100% - 48px))}
.cbm-page .tool-shell{overflow:hidden}
.cbm-page .shell-body{padding:20px}
.cbm-page #cbmTool{display:grid;gap:14px}
.cbm-page #cbmTool .nt-card{overflow:visible}
.cbm-page .cbm-entry-card{padding:20px}
.cbm-page .cbm-tool-head{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:24px;align-items:end;margin-bottom:16px}
.cbm-page .cbm-tool-head .nt-field{width:100%;min-width:0!important}
.cbm-page .cbm-tool-head select{height:36px!important;min-height:36px!important;max-height:36px!important;font-size:12.5px!important}

.cbm-row-list{display:grid;gap:10px}
.cbm-row{min-width:0;padding:14px;border:1px solid #dce5f1;border-radius:12px;background:#f8faff}
.cbm-row-top{display:flex;align-items:flex-end;gap:10px;margin-bottom:10px}
.cbm-row-index{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;height:26px;padding:0 9px;border-radius:999px;background:#e8efff;color:#2455c3;font-size:10.5px;font-weight:850;white-space:nowrap}
.cbm-field{display:grid;gap:5px;min-width:0}
.cbm-field-name{flex:1}
.cbm-field label,.cbm-row-grid label{display:grid;gap:5px;color:#30445f;font-size:11px;font-weight:800;line-height:1.25;min-width:0}
.cbm-row input,.cbm-row select{box-sizing:border-box!important;width:100%!important;height:36px!important;min-height:36px!important;max-height:36px!important;padding:0 10px!important;border:1px solid #d3deec!important;border-radius:8px!important;background:#fff!important;color:#142844!important;font-size:12.5px!important;line-height:1!important;outline:none!important}
.cbm-row input:focus,.cbm-row select:focus{border-color:#2b5cdb!important;box-shadow:0 0 0 3px rgba(43,92,219,.1)!important}
.cbm-delete{flex:0 0 auto;width:auto!important;min-width:54px!important;height:36px!important;min-height:36px!important;padding:0 11px!important;border:1px solid #d8e1ee!important;border-radius:8px!important;background:#fff!important;color:#65758b!important;font-size:11px!important;font-weight:800!important;line-height:1!important;white-space:nowrap!important}
.cbm-delete:hover{border-color:#efb6b6!important;background:#fff7f7!important;color:#c83c3c!important}
.cbm-row-grid{display:grid;grid-template-columns:repeat(3,minmax(88px,1fr)) 86px minmax(100px,1fr) 76px 100px 100px;gap:8px;align-items:end;min-width:0}
.cbm-output{min-width:0;height:56px;display:flex;flex-direction:column;justify-content:center;padding:7px 9px;border:1px solid #dde6f2;border-radius:8px;background:#fff}
.cbm-output span{color:#6d7c91;font-size:9.5px;font-weight:750;line-height:1.2;white-space:nowrap}
.cbm-output strong{display:block;margin-top:4px;color:#15335f;font-size:13px;line-height:1.1;font-weight:850;font-variant-numeric:tabular-nums;white-space:nowrap}
.cbm-page .nt-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.cbm-page .nt-actions .nt-btn{height:36px!important;min-height:36px!important;padding:0 14px!important;border-radius:8px!important;font-size:11.5px!important}

/* Results remain readable without oversized empty blocks. */
.cbm-page .nt-results{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.cbm-page .nt-result{min-height:82px;padding:12px}
.cbm-page .nt-result strong{font-size:16px}
.cbm-page .nt-result em{font-size:9.5px}

/* Container table scrolls inside its own boundary only. */
.cbm-page .nt-table-wrap{max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
.cbm-page #cbmContainerRows{font-variant-numeric:tabular-nums}
.cbm-page .nt-card .nt-table{min-width:850px}

@media(max-width:1080px){
  .cbm-page .cbm-row-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cbm-page .cbm-output{height:52px}
}
@media(max-width:760px){
  .cbm-page .section>.container{width:calc(100% - 28px)}
  .cbm-page .shell-body{padding:12px}
  .cbm-page .cbm-entry-card{padding:14px}
  .cbm-page .cbm-tool-head{grid-template-columns:1fr;gap:12px}
  .cbm-page .cbm-tool-head .nt-field{max-width:none}
  .cbm-page .cbm-row-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cbm-page .nt-results{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:430px){
  .cbm-page .cbm-row{padding:11px}
  .cbm-page .cbm-row-top{align-items:end}
  .cbm-page .cbm-row-index{display:none}
  .cbm-page .cbm-row-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .cbm-page .cbm-output{height:50px}
  .cbm-page .nt-actions .nt-btn{flex:1}
}
