.budget-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.budget-card-head > .filter-popover {
  margin-top: 20px;
}

.budget-card-title {
  min-width: 220px;
}

.budget-card-title h3 {
  margin-bottom: 5px;
}

.budget-card-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.section-kicker {
  margin-bottom: 4px;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.budget-period {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(118px, 0.55fr) minmax(170px, 0.85fr) minmax(142px, auto);
  align-items: end;
  gap: 10px;
  width: min(100%, 720px);
}

.budget-period-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.budget-period-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.budget-period .input,
.budget-period .select {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 12px;
}

.budget-load-btn {
  min-width: 142px;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 12px;
  background: rgba(216, 180, 106, 0.12);
  border-color: rgba(216, 180, 106, 0.3);
  color: var(--gold-2);
}

.budget-load-btn:disabled {
  cursor: wait;
  opacity: 1;
}

.budget-progress {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.budget-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.budget-progress-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-progress-head strong {
  flex: 0 0 auto;
  color: var(--green);
  font-weight: 950;
}

.budget-progress-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.budget-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, var(--green));
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.18);
}

@media (max-width: 860px) {
  .budget-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: start;
    gap: 12px;
  }

  .budget-card-title {
    min-width: 0;
  }

  .budget-card-head > .filter-popover {
    justify-self: end;
    margin-top: 18px;
  }

  .budget-period {
    width: 100%;
  }

  .budget-progress {
    min-width: 150px;
  }
}

@media (max-width: 560px) {
  .budget-period {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 0.65fr);
    gap: 8px;
  }

  .budget-load-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .budget-currency-field {
    grid-column: 1 / -1;
  }

  .budget-card-head {
    gap: 12px;
    margin-bottom: 14px;
  }

  .budget-progress {
    min-width: 0;
    width: 100%;
  }

  .budget-progress-head {
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .budget-period {
    grid-template-columns: 1fr;
  }

  .budget-load-btn {
    grid-column: auto;
  }
}
