/* 💰 Калькулятор чистого капитала — активы минус пассивы */

.calc-intro {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 8px 0 0;
}

/* 🗂 Заголовки групп полей (Активы / Обязательства) */
.nw-group-title {
  margin-top: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid #0077cc;
  font-size: 1.05rem;
  font-weight: bold;
  color: #0077cc;
}

.calc-block label {
  display: block;
  margin-top: 16px;
  font-weight: bold;
  font-size: 15px;
  color: #222;
}

/* 💵 Поля ввода сумм */
.calc-block input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: #222;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calc-block input[type="text"]:hover {
  border-color: #999;
}

.calc-block input[type="text"]:focus {
  outline: none;
  border-color: #0077cc;
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.15);
}

.calc-block input[type="text"]::placeholder {
  color: #bbb;
}

.field-hint {
  display: block;
  color: #888;
  font-size: 12px;
  font-weight: normal;
  margin-top: 3px;
}

.calc-block button {
  margin-top: 22px;
  padding: 12px 24px;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s ease;
}

.calc-block button:hover {
  background: #005fa3;
}

.calc-block button:active {
  background: #004f87;
}

/* 🎴 Карточка результата */
.result-block h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  color: #222;
}

.result-output {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 18px 16px;
}

.nw-empty {
  text-align: center;
  color: #888;
  font-size: 14px;
  margin: 12px 0;
  line-height: 1.5;
}

/* 🔢 Крупная сумма чистого капитала и бейдж */
.nw-score-wrap {
  text-align: center;
  padding-bottom: 4px;
}

.nw-score {
  font-size: 2.4rem;
  font-weight: bold;
  margin: 10px 0 6px;
  line-height: 1.15;
  word-break: break-word;
}

.nw-score-wrap.positive .nw-score {
  color: #2e7d32;
}

.nw-score-wrap.zero .nw-score {
  color: #555;
}

.nw-score-wrap.negative .nw-score {
  color: #d32f2f;
}

.nw-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

.nw-badge.positive {
  background: #2e7d32;
}

.nw-badge.zero {
  background: #757575;
}

.nw-badge.negative {
  background: #d32f2f;
}

.nw-formula {
  text-align: center;
  font-size: 13px;
  color: #777;
  margin: 8px 0 2px;
}

/* 📊 Сводка: активы и пассивы */
.nw-totals {
  display: flex;
  gap: 10px;
  margin: 16px 0 4px;
}

.nw-total-card {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}

.nw-total-card .nw-total-label {
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}

.nw-total-card .nw-total-value {
  font-size: 1.05rem;
  font-weight: bold;
  color: #222;
  word-break: break-word;
}

.nw-total-card.assets {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
}

.nw-total-card.liabilities {
  background: #ffebee;
  border: 1px solid #ffcdd2;
}

/* 📊 Сравнительная полоса активов и обязательств */
.nw-compare-title {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin: 16px 0 6px;
}

.nw-compare {
  display: flex;
  height: 18px;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
}

.nw-compare-seg {
  height: 100%;
  transition: width 0.5s ease;
}

.nw-compare-seg.assets {
  background: #43a047;
}

.nw-compare-seg.liabilities {
  background: #e53935;
}

.nw-compare-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.nw-compare-legend .leg-assets::before {
  content: '▮ ';
  color: #43a047;
}

.nw-compare-legend .leg-liabilities::before {
  content: '▮ ';
  color: #e53935;
}

/* 📊 Разбивка по категориям: полосы */
.nw-breakdown-title {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin: 18px 0 6px;
}

.nw-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.nw-bar-label {
  flex: 0 0 34%;
  font-size: 13px;
  color: #444;
  line-height: 1.3;
}

.nw-bar-track {
  flex: 1;
  height: 12px;
  border-radius: 8px;
  background: #eee;
  overflow: hidden;
}

.nw-bar-fill {
  display: block;
  height: 100%;
  border-radius: 8px;
  min-width: 3px;
  transition: width 0.5s ease;
}

.nw-bar-fill.asset {
  background: linear-gradient(90deg, #66bb6a, #43a047);
}

.nw-bar-fill.liability {
  background: linear-gradient(90deg, #ef5350, #e53935);
}

.nw-bar-value {
  flex: 0 0 30%;
  text-align: right;
  font-size: 12px;
  font-weight: bold;
  color: #222;
  white-space: nowrap;
}

/* 💬 Долговая нагрузка и вердикт */
.nw-debt-load {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0f7ff;
  border: 1px solid #d4e6f7;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.nw-verdict {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fafafa;
  border: 1px solid #eee;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}

.nw-note {
  font-size: 12px;
  color: #888;
  margin-top: 14px;
  line-height: 1.5;
  border-top: 1px dashed #ddd;
  padding-top: 10px;
}

/* 📱 Мобильная адаптация разбивки */
@media (max-width: 480px) {
  .nw-totals {
    flex-direction: column;
  }

  .nw-bar-row {
    flex-wrap: wrap;
  }

  .nw-bar-label {
    flex: 1 1 100%;
  }

  .nw-bar-value {
    flex: 0 0 auto;
    text-align: left;
  }
}
