/* История баланса */
.balance-summary {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  margin: 1.25rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.balance-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.balance-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.balance-header h2 .balance-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: #9ca3af;
}

.balance-header h2 .balance-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
}

.balance-header .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.balance-header .btn-primary {
  background: #0088cc;
  color: white;
  border: none;
}

.balance-header .btn-primary:hover {
  background: #006ba3;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 136, 204, 0.25);
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.transactions-table thead {
  background: #f9fafb;
}

.transactions-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 500;
  font-size: 0.875rem;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.transactions-table td {
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}

.transactions-table tbody tr:hover {
  background: #f9fafb;
}

.transactions-table tbody tr.credit {
  background: rgba(16, 185, 129, 0.02);
}

.transactions-table tbody tr.debit {
  background: rgba(239, 68, 68, 0.02);
}

.transaction-type {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.transaction-type.referral_bonus {
  background: #dbeafe;
  color: #1e40af;
}

.transaction-type.manual_top_up {
  background: #d1fae5;
  color: #065f46;
}

.transaction-type.incoming_post_charge {
  background: #fef3c7;
  color: #92400e;
}

.transaction-type.admin_adjustment {
  background: #f3f4f6;
  color: #374151;
}

.transaction-type.yookassa_payment,
.transaction-type.stripe_payment {
  background: #dbeafe;
  color: #1e40af;
}

.transaction-type.initial_balance {
  background: #e5e7eb;
  color: #4b5563;
}

.amount {
  font-weight: 600;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.amount.positive {
  color: #10b981;
}

.amount.negative {
  color: #ef4444;
}

.payment-status {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.payment-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.payment-status.succeeded {
  background: #d1fae5;
  color: #065f46;
}

.payment-status.canceled {
  background: #fee2e2;
  color: #991b1b;
}

.payment-status.completed {
  color: #6b7280;
}

.no-data {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
  font-size: 0.9375rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin: 2rem 0;
}

/* Пагинация */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.pagination a:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.pagination .current {
  background: #0088cc;
  color: white;
  border-color: #0088cc;
}

.pagination .disabled {
  color: #9ca3af;
  pointer-events: none;
  opacity: 0.6;
}

/* Адаптивность */
@media (max-width: 768px) {
  .balance-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .balance-header .btn {
    width: 100%;
    justify-content: center;
  }

  .balance-header h2 .balance-amount {
    font-size: 1.75rem;
  }

  .transactions-table {
    font-size: 0.8125rem;
  }

  .transactions-table th,
  .transactions-table td {
    padding: 0.75rem 0.5rem;
  }

  .transaction-type,
  .payment-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .amount {
    font-size: 0.9375rem;
  }
}
