/* BMS Calculators — стили калькуляторов */
.bms-calc {
  max-width: 600px;
  margin: 24px auto;
  font-family: Roboto, Arial, sans-serif;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.bms-head {
  background: linear-gradient(135deg, #1a3a5c, #2c5f8a);
  color: #fff;
  padding: 20px 24px;
}
.bms-htitle {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}
.bms-hsub {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
}
.bms-body {
  padding: 20px 24px;
}
.bms-lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  margin-top: 12px;
}
.bms-inp,
.bms-sel {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  background: #fff;
}
.bms-inp:focus,
.bms-sel:focus {
  outline: none;
  border-color: #2c5f8a;
  box-shadow: 0 0 0 2px rgba(44, 95, 138, 0.15);
}
.bms-unit {
  font-size: 11px;
  color: #999;
  font-weight: 400;
}
.bms-hint {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
  margin-bottom: 2px;
  font-style: italic;
}
.bms-btn {
  width: 100%;
  padding: 13px;
  margin-top: 18px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f47920, #e65d0e);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.2s;
}
.bms-btn:hover {
  opacity: 0.9;
}
.bms-result {
  margin-top: 18px;
  display: none;
}
.bms-result.show {
  display: block;
}
.bms-formula {
  margin-top: 12px;
  font-size: 12px;
  color: #999;
  text-align: center;
  font-style: italic;
}
.bms-note {
  margin-top: 4px;
  font-size: 11px;
  color: #bbb;
  text-align: center;
}
.bms-ok {
  background: #d4edda;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #28a745;
}
.bms-err {
  background: #fff3cd;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  color: #856404;
}
.bms-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
.bms-tbl td {
  padding: 4px 8px 4px 0;
  color: #666;
}
.bms-tbl td + td {
  padding: 4px 0;
  font-weight: 600;
  color: #333;
}
.bms-tbl tr.sep td {
  border-top: 2px solid #28a745;
  padding-top: 8px;
  color: #155724;
  font-weight: 700;
  font-size: 16px;
}
.bms-big {
  font-size: 24px;
  font-weight: 700;
  color: #155724;
  margin-bottom: 8px;
}
.bms-warn {
  background: #fff3cd;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 4px solid #ffc107;
  color: #856404;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.bms-tbl tr.section td {
  padding-top: 10px;
  font-weight: 700;
  color: #2c5f8a;
  font-size: 13px;
  border-bottom: 1px solid #e0e0e0;
}
/* v3.0 — плашки инженерного отчёта */
.bms-danger {
  background: #f8d7da;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 4px solid #dc3545;
  color: #721c24;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.bms-check {
  background: #fff3cd;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 4px solid #fd7e14;
  color: #856404;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.5;
}
/* v3.1 — горизонтальная раскладка: поля слева, результат справа (без скролла) */
.bms-calc {
  max-width: 1100px;
}
.bms-body {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}
.bms-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 16px;
  align-items: start;
}
.bms-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bms-field .bms-lbl {
  margin-top: 12px;
}
.bms-fields .bms-btn {
  grid-column: 1 / -1;
}
.bms-side {
  position: sticky;
  top: 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.bms-side .bms-result {
  margin-top: 0;
}
@media (max-width: 900px) {
  .bms-body {
    grid-template-columns: 1fr;
  }
  .bms-side {
    position: static;
  }
}
/* v3.2 — ревизия: белый заголовок плашки + жёсткая сетка полей */
.bms-head,
.bms-head h3,
.bms-head span,
.bms-htitle,
.bms-hsub {
  color: #ffffff !important;
  text-shadow: none !important;
}
.bms-fields {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 20px !important;
  align-items: start !important;
}
.bms-field {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  margin: 0 !important;
}
.bms-field input,
.bms-field select {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 40px !important;
  margin-top: 5px !important;
}
.bms-field label {
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  color: #333 !important;
  margin-bottom: 5px !important;
  display: block !important;
}
/* v3.4 — UI: крупные подписи, ровные линии результата, центрированная шапка */
.bms-field label {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #1a3a5c !important;
  margin-bottom: 8px !important;
  display: block !important;
  line-height: 1.3 !important;
}
.bms-side table {
  width: 100% !important;
  border-collapse: collapse !important;
}
.bms-side td {
  border-bottom: 1px solid #dcdcdc !important;
  padding: 10px 0 !important;
  box-sizing: border-box !important;
}
.bms-head {
  text-align: center !important;
  padding: 25px 20px !important;
}
.bms-htitle {
  text-align: center !important;
  margin: 0 0 10px 0 !important;
  color: #ffffff !important;
}
.bms-hsub {
  text-align: center !important;
  margin: 0 !important;
  color: #e0e0e0 !important;
  font-size: 1rem !important;
}
/* v3.5 — ровные таблицы результатов */
.bms-side table,
.bms-res-table {
  width: 100% !important;
  table-layout: fixed !important;
}
.bms-side td,
.bms-res-table td {
  padding: 10px 5px !important;
  border-bottom: 1px solid #dcdcdc !important;
  vertical-align: middle !important;
  word-wrap: break-word !important;
  box-sizing: border-box !important;
}
.bms-side td:first-child,
.bms-res-table td:first-child {
  width: 60% !important;
}
.bms-side td:last-child,
.bms-res-table td:last-child {
  width: 40% !important;
}
/* v3.6 — крупные подписи (block) + единицы измерения (inline) */
.bms-fields label,
.bms-fields strong,
.bms-fields p,
.bms-fields .bms-label {
  display: block !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #1a3a5c !important;
  margin-bottom: 5px !important;
}
.bms-fields span,
.bms-field span {
  display: inline !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  color: #666 !important;
}
/* v3.8 — фикс H1 и z-index выпадающих списков */
.entry-title,
.page-title,
h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem) !important;
  line-height: 1.3 !important;
  text-align: center !important;
  word-wrap: break-word !important;
  white-space: normal !important;
  max-width: 100% !important;
  padding: 0 15px !important;
  box-sizing: border-box !important;
  margin-bottom: 20px !important;
}
.bms-htitle {
  word-wrap: break-word !important;
  text-align: center !important;
}
.bms-sel {
  position: relative !important;
  z-index: 100 !important;
}