/* 💰 Шот балансы / төленуге тиіс сома виджеті (header.html, жоғарғы оң
   бұрыш). Ескерту: пайдаланушы сұрауы бойынша ӘЗІРГЕ жуықтап жасалған —
   есептеу логикасы кейін өзгертіледі (см. core/models.py Profile.
   account_balance/amount_due). */
.balance-widget {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.65rem;
  background: rgba(105, 108, 255, 0.08);
  border: 1px solid rgba(105, 108, 255, 0.15);
}

.balance-widget__item {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.balance-widget__sep {
  width: 1px;
  align-self: stretch;
  background: rgba(105, 108, 255, 0.2);
}

.balance-widget__label {
  font-size: 0.68rem;
  color: #a1acb8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.balance-widget__value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2c3345;
  font-variant-numeric: tabular-nums;
}

.balance-widget__value--negative {
  color: #ff3e1d;
}

.balance-widget__value--due {
  color: #ff8a00;
}

.balance-widget__days {
  font-size: 0.64rem;
  color: #a1acb8;
  white-space: nowrap;
}

.balance-widget__days--urgent {
  color: #ff8a00;
  font-weight: 600;
}

.balance-widget__days--overdue {
  color: #ff3e1d;
  font-weight: 700;
}

@media (max-width: 575.98px) {
  .balance-widget__label {
    display: none;
  }
  .balance-widget {
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Баскаанда ашылатын толық тарих (balance_widget.html) */
.balance-history {
  min-width: 21rem;
  max-width: 24rem;
  max-height: 26rem;
  overflow-y: auto;
  padding-top: 0.5rem;
  padding-bottom: 0.4rem;
}

.balance-history__summary {
  padding: 0.2rem 1rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.balance-history__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #697a8d;
}

.balance-history__summary-row--strong {
  font-weight: 700;
  font-size: 0.88rem;
  color: #2c3345;
}

.balance-history__amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.balance-history__amount--income {
  color: #71dd37;
}

.balance-history__amount--payment {
  color: #ff3e1d;
}

.balance-history__amount--due {
  color: #ff8a00;
}

.balance-history__title {
  padding: 0.3rem 1rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #a1acb8;
}

.balance-history__row {
  padding: 0.4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.balance-history__row:hover {
  background: rgba(105, 108, 255, 0.06);
}

.balance-history__row-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.balance-history__row-desc {
  font-size: 0.82rem;
  color: #2c3345;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-history__row-amount {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  flex-shrink: 0;
}

.balance-history__row-date {
  font-size: 0.7rem;
  color: #a1acb8;
}

.balance-history__more,
.balance-history__empty {
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  color: #a1acb8;
  text-align: center;
}
