/* =========================
   BALANCE PAGE
   /pages/balance.html
   ========================= */

.balance-page {
  padding: 36px 0 60px;
  min-height: 60vh;
}

.balance-page__wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Карточка */
.balance-bal {
  opacity: 0;
  transform: translateY(16px);
  animation: balanceFadeUp 0.5s ease forwards;
}

@keyframes balanceFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Заголовок */
.balance-bal__head {
  margin-bottom: 20px;
}

.balance-bal__titlebox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.balance-bal__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.balance-bal__title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.balance-bal__sub {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

/* Форма */
.balance-bal__form {
  margin-bottom: 12px;
}

.balance-bal__field {
  margin-bottom: 14px;
}

.balance-bal__label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.balance-bal__input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fff;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.balance-bal__input:focus {
  border-color: rgba(0, 108, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 108, 255, 0.1);
}

.balance-bal__btn {
  width: 100%;
  height: 48px;
  font-size: 16px;
}

/* Ошибка (JS управляет display) */
.balance-bal__err {
  margin-top: 12px;
  color: var(--error);
  font-weight: 700;
  text-align: center;
  display: none;
}

/* Результат */
.balance-bal__result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--stroke);
  display: none;
}

.balance-bal__info {
  background: rgba(0, 44, 95, 0.04);
  border: 1px solid rgba(0, 44, 95, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.balance-bal__row {
  margin: 6px 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.balance-bal__row strong {
  font-weight: 800;
  color: var(--ink);
}

/* Карточка суммы */
.balance-bal__money {
  background: var(--soft);
  border-radius: 14px;
  border: 1px solid rgba(0, 108, 255, 0.12);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.02em;
  font-size: 56px;
}

.balance-amount .rub {
  font-size: 28px;
  font-weight: 800;
  margin-left: 8px;
  line-height: 1;
  color: inherit;
}

.balance-amount.is-negative {
  color: var(--error);
}

/* Адаптив */
@media (max-width: 520px) {
  .balance-page {
    padding: 24px 0 40px;
  }

  .balance-page__wrap {
    padding: 0 16px;
  }

  .balance-bal__title {
    font-size: 22px;
  }

  .balance-amount {
    font-size: 48px;
  }

  .balance-amount .rub {
    font-size: 24px;
  }
}
