/* =========================================================
   UBICACIÓN:
   frontend/src/pages/gobernanza/presupuestos/presupuestos.css

   WIRTZ HUB · GOBERNANZA · PRESUPUESTOS
   PARTE 1 DE 2
   ========================================================= */

/* =========================================================
   PAGE
   ========================================================= */

.budgets-page {
  display: flex;
  flex-direction: column;
  gap: 10px;

  width: 100%;
  min-width: 0;
}

/* =========================================================
   HEADER
   ========================================================= */

.budgets-head {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    auto;

  align-items: center;
  gap: 14px;

  padding: 14px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--panel);
}

.budgets-brand {
  display: flex;
  align-items: center;
  gap: 11px;

  min-width: 0;
}

.budgets-brand__icon {
  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  border: 1px solid var(--border);
  border-radius: 11px;

  background: var(--surface);
  color: var(--text);
}

.budgets-brand__icon .icon {
  width: 19px;
  height: 19px;
}

.budgets-brand__copy {
  min-width: 0;
}

.budgets-brand__copy > span {
  display: block;

  margin-bottom: 3px;

  color: var(--text-muted);

  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.budgets-brand__copy h1 {
  margin: 0;

  color: var(--text);

  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.budgets-brand__copy p {
  max-width: 720px;

  margin: 5px 0 0;

  color: var(--text-muted);

  font-size: 12px;
  line-height: 1.45;
}

/* =========================================================
   HEADER STATUS
   ========================================================= */

.budgets-head__status {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.budgets-head-status {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 132px;

  padding: 9px 10px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);
}

.budgets-head-status > .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;

  color: var(--text-muted);
}

.budgets-head-status > span {
  min-width: 0;
}

.budgets-head-status small {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.budgets-head-status strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.budgets-head__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.budgets-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-height: 34px;

  padding: 0 11px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--surface);
  color: var(--text);

  font: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease;
}

.budgets-btn .icon {
  width: 14px;
  height: 14px;
}

.budgets-btn:hover:not(:disabled) {
  background: var(--panel);
  border-color: currentColor;
}

.budgets-btn--dark {
  background: var(--text);
  border-color: var(--text);
  color: var(--panel);
}

.budgets-btn--dark:hover:not(:disabled) {
  opacity: 0.88;
}

.budgets-btn--compact {
  min-height: 30px;

  padding: 0 8px;

  font-size: 10px;
}

.budgets-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* =========================================================
   ICON BUTTON
   ========================================================= */

.budgets-icon-btn {
  display: inline-grid;
  place-items: center;

  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  padding: 0;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
  color: var(--text);

  cursor: pointer;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.budgets-icon-btn .icon {
  width: 14px;
  height: 14px;
}

.budgets-icon-btn:hover {
  background: var(--panel);
  border-color: currentColor;
}

.budgets-icon-btn--danger {
  color: var(--danger, #b42318);
}

/* =========================================================
   METRICS
   ========================================================= */

.budgets-metrics {
  display: grid;
  grid-template-columns:
    repeat(
      6,
      minmax(0, 1fr)
    );

  gap: 7px;
}

.budgets-metric {
  display: flex;
  align-items: center;
  gap: 9px;

  min-width: 0;

  padding: 10px;

  border: 1px solid var(--border);
  border-radius: 11px;

  background: var(--panel);
}

.budgets-metric__icon {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--surface);
  color: var(--text-muted);
}

.budgets-metric__icon .icon {
  width: 15px;
  height: 15px;
}

.budgets-metric__copy {
  min-width: 0;
}

.budgets-metric__copy small {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.budgets-metric__copy strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   CONTROL METRICS
   ========================================================= */

.budgets-control-metrics {
  display: grid;
  grid-template-columns:
    repeat(
      6,
      minmax(0, 1fr)
    );

  gap: 7px;
}

.budgets-control-card {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;

  padding: 8px 9px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);
}

.budgets-control-card > .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;

  color: var(--text-muted);
}

.budgets-control-card > span {
  min-width: 0;
}

.budgets-control-card small {
  display: block;

  overflow: hidden;

  margin-bottom: 1px;

  color: var(--text-muted);

  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.budgets-control-card strong {
  color: var(--text);

  font-size: 13px;
  font-weight: 800;
}

/* =========================================================
   PANEL
   ========================================================= */

.budgets-panel {
  min-width: 0;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--panel);
}

/* =========================================================
   FILTERS
   ========================================================= */

.budgets-filters {
  border-bottom: 1px solid var(--border);
}

.budgets-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 12px;

  border-bottom: 1px solid var(--border);
}

.budgets-filters__title {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;
}

.budgets-filters__title > .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;

  color: var(--text-muted);
}

.budgets-filters__title > div {
  min-width: 0;
}

.budgets-filters__title span {
  display: block;

  color: var(--text-muted);

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.budgets-filters__title strong {
  display: block;

  margin-top: 1px;

  color: var(--text);

  font-size: 12px;
  font-weight: 800;
}

.budgets-filters__summary {
  flex: 0 0 auto;
}

.budgets-filters__summary > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.budgets-filters__summary small {
  color: var(--text-muted);

  font-size: 10px;
}

.budgets-filters__summary strong {
  color: var(--text);

  font-size: 12px;
}

.budgets-filters__body {
  padding: 10px 12px;
}

/* =========================================================
   SEARCH
   ========================================================= */

.budgets-search-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 7px;

  margin-bottom: 8px;
}

.budgets-search {
  position: relative;

  display: flex;
  align-items: center;

  min-width: 0;
}

.budgets-search > .icon {
  position: absolute;
  left: 10px;

  width: 14px;
  height: 14px;

  color: var(--text-muted);

  pointer-events: none;
}

.budgets-search input {
  width: 100%;
  min-width: 0;
  height: 34px;

  padding: 0 11px 0 32px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--surface);
  color: var(--text);

  font: inherit;
  font-size: 11px;
}

.budgets-search input::placeholder {
  color: var(--text-muted);
}

/* =========================================================
   FILTER GRID
   ========================================================= */

.budgets-filters-grid {
  display: grid;
  grid-template-columns:
    repeat(
      7,
      minmax(0, 1fr)
    );

  gap: 7px;
}

.budgets-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;

  min-width: 0;
}

.budgets-filter-field > span {
  color: var(--text-muted);

  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
}

.budgets-filter-field input,
.budgets-filter-field select {
  width: 100%;
  min-width: 0;
  height: 32px;

  padding: 0 8px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
  color: var(--text);

  font: inherit;
  font-size: 10px;
}

/* =========================================================
   TABLE
   ========================================================= */

.budgets-list {
  min-width: 0;
}

.budgets-table-wrap {
  width: 100%;
  min-width: 0;

  overflow-x: auto;
}

.budgets-table {
  width: 100%;
  min-width: 1700px;

  border-collapse: collapse;

  color: var(--text);

  font-size: 10px;
}

.budgets-table th,
.budgets-table td {
  padding: 8px 9px;

  border-bottom: 1px solid var(--border);

  text-align: left;
  vertical-align: middle;
}

.budgets-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;

  background: var(--panel);
  color: var(--text-muted);

  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.budgets-table tbody tr {
  background: var(--panel);

  transition: background 0.15s ease;
}

.budgets-table tbody tr:hover {
  background: var(--surface);
}

.budgets-table tbody tr:last-child td {
  border-bottom: 0;
}

/* =========================================================
   NAME
   ========================================================= */

.budgets-name {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 210px;
  max-width: 310px;

  padding: 0;

  border: 0;

  background: transparent;
  color: inherit;

  text-align: left;

  cursor: pointer;
}

.budgets-name__icon {
  display: grid;
  place-items: center;

  width: 30px;
  height: 30px;
  flex: 0 0 30px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
  color: var(--text-muted);
}

.budgets-name__icon .icon {
  width: 13px;
  height: 13px;
}

.budgets-name__copy {
  min-width: 0;
}

.budgets-name__copy small,
.budgets-name__copy strong,
.budgets-name__copy > span {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.budgets-name__copy small {
  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 8px;
  font-weight: 750;
}

.budgets-name__copy strong {
  color: var(--text);

  font-size: 11px;
  font-weight: 800;
}

.budgets-name__copy > span {
  margin-top: 2px;

  color: var(--text-muted);

  font-size: 9px;
}

/* =========================================================
   STRATEGY / OBJECTIVE
   ========================================================= */

.budgets-strategy,
.budgets-objective,
.budgets-period,
.budgets-deviation {
  min-width: 110px;
}

.budgets-strategy small,
.budgets-objective small,
.budgets-period small,
.budgets-deviation small {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 8px;
}

.budgets-strategy strong,
.budgets-objective strong,
.budgets-period strong,
.budgets-deviation strong {
  display: block;

  max-width: 170px;

  overflow: hidden;

  color: var(--text);

  font-size: 10px;
  font-weight: 750;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   TABLE PROGRESS
   ========================================================= */

.budgets-table-progress {
  min-width: 85px;
}

.budgets-table-progress > strong {
  display: block;

  margin-bottom: 4px;

  color: var(--text);

  font-size: 10px;
}

.budgets-table-progress > span {
  display: block;

  width: 100%;
  height: 4px;

  overflow: hidden;

  border-radius: 999px;

  background: var(--border);
}

.budgets-table-progress > span > span {
  display: block;

  height: 100%;

  border-radius: inherit;

  background: currentColor;
}

/* =========================================================
   STATE / PRIORITY
   ========================================================= */

.budgets-state,
.budgets-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  min-height: 22px;

  padding: 0 7px;

  border: 1px solid currentColor;
  border-radius: 999px;

  background: var(--surface);

  color: var(--text-muted);

  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.budgets-state .icon {
  width: 10px;
  height: 10px;
}

.budgets-state--active,
.budgets-state--approved,
.budgets-state--executed {
  color: var(--text);
}

.budgets-state--risk,
.budgets-state--exceeded,
.budgets-priority--critica,
.budgets-priority--alta {
  color: var(--danger, #b42318);
}

.budgets-state--cancelled,
.budgets-state--closed,
.budgets-state--paused,
.budgets-state--draft,
.budgets-state--pending {
  color: var(--text-muted);
}

/* =========================================================
   ROW ACTIONS
   ========================================================= */

.budgets-row-actions,
.budgets-child-actions,
.budgets-inline-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.budgets-child-actions {
  margin-left: auto;
}

/* =========================================================
   PROGRESS
   ========================================================= */

.budgets-progress {
  min-width: 0;
}

.budgets-progress__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  margin-bottom: 5px;
}

.budgets-progress__head span {
  color: var(--text-muted);

  font-size: 9px;
}

.budgets-progress__head strong {
  color: var(--text);

  font-size: 10px;
}

.budgets-progress__track {
  width: 100%;
  height: 5px;

  overflow: hidden;

  border-radius: 999px;

  background: var(--border);
}

.budgets-progress__track > span {
  display: block;

  height: 100%;

  border-radius: inherit;

  background: var(--text);

  transition: width 0.2s ease;
}

.budgets-progress--compact .budgets-progress__track {
  height: 4px;
}

/* =========================================================
   EMPTY / LOADING
   ========================================================= */

.budgets-empty,
.budgets-loading,
.budgets-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 210px;

  padding: 26px;

  text-align: center;
}

.budgets-empty > .icon,
.budgets-loading > .icon,
.budgets-detail-empty > .icon {
  width: 26px;
  height: 26px;

  margin-bottom: 9px;

  color: var(--text-muted);
}

.budgets-empty strong,
.budgets-loading strong,
.budgets-detail-empty strong {
  color: var(--text);

  font-size: 12px;
}

.budgets-empty span,
.budgets-loading span,
.budgets-detail-empty span {
  max-width: 430px;

  margin-top: 4px;

  color: var(--text-muted);

  font-size: 10px;
  line-height: 1.45;
}

.budgets-spin {
  animation: budgetsSpin 0.85s linear infinite;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.budgets-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-height: 48px;

  padding: 8px 11px;

  border-top: 1px solid var(--border);
}

.budgets-pagination__info,
.budgets-pagination__page {
  color: var(--text-muted);

  font-size: 10px;
}

.budgets-pagination__info strong,
.budgets-pagination__page strong {
  color: var(--text);
}

.budgets-pagination__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* =========================================================
   MOBILE CARDS
   ========================================================= */

.budgets-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;

  padding: 8px;
}

.budgets-card {
  padding: 10px;

  border: 1px solid var(--border);
  border-radius: 11px;

  background: var(--panel);
}

.budgets-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.budgets-card__head > button {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;

  padding: 0;

  border: 0;

  background: transparent;
  color: inherit;

  text-align: left;

  cursor: pointer;
}

.budgets-card__icon {
  display: grid;
  place-items: center;

  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
}

.budgets-card__icon .icon {
  width: 14px;
  height: 14px;
}

.budgets-card__head > button > span:last-child {
  min-width: 0;
}

.budgets-card__head small,
.budgets-card__head strong,
.budgets-card__head > button > span:last-child > span {
  display: block;
}

.budgets-card__head small {
  color: var(--text-muted);

  font-size: 8px;
}

.budgets-card__head strong {
  margin-top: 1px;

  color: var(--text);

  font-size: 12px;
}

.budgets-card__head > button > span:last-child > span {
  margin-top: 2px;

  color: var(--text-muted);

  font-size: 9px;
}

.budgets-card__meta {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 5px;

  margin-top: 9px;
}

.budgets-card__meta > span {
  display: flex;
  align-items: center;
  gap: 5px;

  min-width: 0;

  color: var(--text-muted);

  font-size: 9px;
}

.budgets-card__meta .icon {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
}

.budgets-card__amounts {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 5px;

  margin: 9px 0;
}

.budgets-card__amounts > span,
.budgets-card__stats > span {
  min-width: 0;

  padding: 7px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
}

.budgets-card__amounts small {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 8px;
}

.budgets-card__amounts strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 10px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.budgets-card__stats {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 5px;

  margin-top: 9px;
}

.budgets-card__stats > span {
  color: var(--text-muted);

  font-size: 8px;
}

.budgets-card__stats strong {
  display: block;

  margin-top: 2px;

  color: var(--text);

  font-size: 11px;
}

.budgets-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  margin-top: 9px;
}

/* =========================================================
   MODAL BACKDROP
   ========================================================= */

.budgets-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 18px;

  background: rgba(0, 0, 0, 0.5);
}

.budgets-modal-backdrop--nested {
  z-index: 1250;
}

/* =========================================================
   MODAL
   ========================================================= */

.budgets-modal {
  display: flex;
  flex-direction: column;

  width: min(920px, 100%);
  max-height: calc(100vh - 36px);

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--panel);
  color: var(--text);
}

.budgets-modal--form {
  width: min(980px, 100%);
}

.budgets-modal--detail {
  width: min(1240px, 100%);
}

.budgets-modal--child {
  width: min(760px, 100%);
}

.budgets-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 14px;

  border-bottom: 1px solid var(--border);
}

.budgets-modal__head > div {
  min-width: 0;
}

.budgets-modal__head > div > span {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.budgets-modal__head h2 {
  margin: 0;

  color: var(--text);

  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.budgets-modal__body {
  flex: 1;

  min-height: 0;

  padding: 12px 14px;

  overflow-y: auto;
}

.budgets-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;

  padding: 10px 14px;

  border-top: 1px solid var(--border);

  background: var(--panel);
}

/* =========================================================
   FORM
   ========================================================= */

.budgets-form {
  width: 100%;
}

.budgets-form-grid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 9px;
}

.budgets-field {
  display: flex;
  flex-direction: column;
  gap: 4px;

  min-width: 0;
}

.budgets-field--span-2 {
  grid-column: span 2;
}

.budgets-field--span-3 {
  grid-column: 1 / -1;
}

.budgets-field > span {
  color: var(--text-muted);

  font-size: 9px;
  font-weight: 750;
}

.budgets-field input,
.budgets-field select,
.budgets-field textarea {
  width: 100%;
  min-width: 0;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
  color: var(--text);

  font: inherit;
  font-size: 11px;
}

.budgets-field input,
.budgets-field select {
  height: 34px;

  padding: 0 9px;
}

.budgets-field textarea {
  min-height: 74px;

  padding: 8px 9px;

  resize: vertical;

  line-height: 1.45;
}

.budgets-field input:disabled,
.budgets-field select:disabled,
.budgets-field textarea:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

/* =========================================================
   DETAIL HERO
   ========================================================= */

.budgets-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;

  padding: 13px 14px;

  border-bottom: 1px solid var(--border);
}

.budgets-detail-hero__main {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  min-width: 0;
}

.budgets-detail-hero__icon {
  display: grid;
  place-items: center;

  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);
}

.budgets-detail-hero__icon .icon {
  width: 18px;
  height: 18px;
}

.budgets-detail-hero__copy {
  min-width: 0;
}

.budgets-detail-hero__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;

  margin-bottom: 5px;

  color: var(--text-muted);

  font-size: 9px;
  font-weight: 800;
}

.budgets-detail-hero__copy h2 {
  margin: 0;

  color: var(--text);

  font-size: 20px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.budgets-detail-hero__copy p {
  max-width: 760px;

  margin: 5px 0 0;

  color: var(--text-muted);

  font-size: 10px;
  line-height: 1.45;
}

.budgets-detail-hero__actions {
  display: flex;
  align-items: center;
  gap: 6px;

  flex: 0 0 auto;
}

/* =========================================================
   DETAIL FINANCIAL
   ========================================================= */

.budgets-detail-financial {
  display: grid;
  grid-template-columns:
    repeat(
      5,
      minmax(0, 1fr)
    );

  gap: 6px;

  padding: 9px 14px;

  border-bottom: 1px solid var(--border);
}

.budgets-detail-financial article {
  min-width: 0;

  padding: 8px 9px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
}

.budgets-detail-financial small {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 8px;
}

.budgets-detail-financial strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 12px;
  font-weight: 800;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.budgets-detail-progress {
  padding: 8px 14px;

  border-bottom: 1px solid var(--border);
}

/* =========================================================
   DETAIL TABS
   ========================================================= */

.budgets-detail-tabs {
  display: flex;
  align-items: center;
  gap: 4px;

  padding: 6px 10px;

  overflow-x: auto;

  border-bottom: 1px solid var(--border);
}

.budgets-detail-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  min-height: 30px;

  padding: 0 8px;

  border: 1px solid transparent;
  border-radius: 7px;

  background: transparent;
  color: var(--text-muted);

  font: inherit;
  font-size: 9px;
  font-weight: 750;

  white-space: nowrap;

  cursor: pointer;
}

.budgets-detail-tabs button .icon {
  width: 12px;
  height: 12px;
}

.budgets-detail-tabs button:hover {
  border-color: var(--border);
  color: var(--text);
}

.budgets-detail-tabs button.is-active {
  border-color: var(--border);

  background: var(--surface);
  color: var(--text);
}

/* =========================================================
   DETAIL CONTENT
   ========================================================= */

.budgets-detail-content {
  flex: 1;

  min-height: 0;

  padding: 12px 14px;

  overflow-y: auto;
}

.budgets-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 9px 14px;

  border-top: 1px solid var(--border);
}

.budgets-detail-footer > span {
  color: var(--text-muted);

  font-size: 9px;
}

.budgets-detail-footer strong {
  color: var(--text);
}

/* =========================================================
   SUMMARY
   ========================================================= */

.budgets-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.budgets-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 7px;
}

.budgets-summary-card,
.budgets-text-block {
  min-width: 0;

  padding: 10px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--surface);
}

.budgets-summary-card > header,
.budgets-text-block > header {
  display: flex;
  align-items: center;
  gap: 6px;

  margin-bottom: 8px;
}

.budgets-summary-card > header .icon,
.budgets-text-block > header .icon {
  width: 13px;
  height: 13px;

  color: var(--text-muted);
}

.budgets-summary-card > header span,
.budgets-text-block > header strong {
  color: var(--text);

  font-size: 10px;
  font-weight: 800;
}

.budgets-detail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;

  margin: 0;
}

.budgets-detail-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.budgets-detail-list dt {
  color: var(--text-muted);

  font-size: 9px;
}

.budgets-detail-list dd {
  max-width: 62%;

  margin: 0;

  color: var(--text);

  font-size: 9px;
  font-weight: 700;

  text-align: right;
}

.budgets-summary-text-grid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 7px;
}

.budgets-text-block p {
  margin: 0;

  color: var(--text-muted);

  font-size: 9px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* =========================================================
   TAB HEAD
   ========================================================= */

.budgets-tab-section {
  min-width: 0;
}

.budgets-tab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 9px;
}

.budgets-tab-head > div {
  min-width: 0;
}

.budgets-tab-head > div > span {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.budgets-tab-head h3 {
  margin: 0;

  color: var(--text);

  font-size: 15px;
  font-weight: 850;
}

.budgets-tab-head p {
  max-width: 720px;

  margin: 3px 0 0;

  color: var(--text-muted);

  font-size: 9px;
  line-height: 1.4;
}

/* =========================================================
   RECORD LIST
   ========================================================= */

.budgets-record-list,
.budgets-movements,
.budgets-timeline,
.budgets-history {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.budgets-record-card,
.budgets-movement-card,
.budgets-timeline-item__body,
.budgets-history-item,
.budgets-linked-card {
  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--surface);
}

/* =========================================================
   RECORD CARD
   ========================================================= */

.budgets-record-card {
  padding: 9px;
}

.budgets-record-card > header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.budgets-record-icon {
  display: grid;
  place-items: center;

  width: 30px;
  height: 30px;
  flex: 0 0 30px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--panel);
  color: var(--text-muted);
}

.budgets-record-icon .icon {
  width: 13px;
  height: 13px;
}

.budgets-record-title {
  min-width: 0;
  flex: 1;
}

.budgets-record-title small,
.budgets-record-title strong {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.budgets-record-title small {
  color: var(--text-muted);

  font-size: 8px;
  font-weight: 750;
}

.budgets-record-title strong {
  margin-top: 1px;

  color: var(--text);

  font-size: 11px;
}

.budgets-record-card > p {
  margin: 8px 0;

  color: var(--text-muted);

  font-size: 9px;
  line-height: 1.45;
}

/* =========================================================
   AMOUNTS
   ========================================================= */

.budgets-amount-grid,
.budgets-review-financial {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 5px;

  margin: 8px 0;
}

.budgets-amount-grid > span,
.budgets-review-financial > span {
  min-width: 0;

  padding: 7px;

  border: 1px solid var(--border);
  border-radius: 7px;

  background: var(--panel);
}

.budgets-amount-grid small,
.budgets-review-financial small {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 8px;
}

.budgets-amount-grid strong,
.budgets-review-financial strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 10px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   RECORD META
   ========================================================= */

.budgets-record-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;

  margin-top: 8px;

  color: var(--text-muted);

  font-size: 8px;
}

.budgets-record-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.budgets-record-meta .icon {
  width: 10px;
  height: 10px;
}

/* =========================================================
   MOVEMENTS
   ========================================================= */

.budgets-movement-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;

  padding: 9px;
}

.budgets-movement-card.is-cancelled {
  opacity: 0.58;
}

.budgets-movement-card__body {
  flex: 1;

  min-width: 0;
}

.budgets-movement-card__body > header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.budgets-movement-card__body > header > div:first-child {
  flex: 1;
  min-width: 0;
}

.budgets-movement-card__body > header small,
.budgets-movement-card__body > header strong {
  display: block;
}

.budgets-movement-card__body > header small {
  color: var(--text-muted);

  font-size: 8px;
}

.budgets-movement-card__body > header strong {
  margin-top: 1px;

  color: var(--text);

  font-size: 10px;
}

.budgets-movement-amount {
  flex: 0 0 auto;

  white-space: nowrap;
}

.budgets-movement-card__body > p {
  margin: 7px 0 0;

  color: var(--text-muted);

  font-size: 9px;
  line-height: 1.4;
}

.budgets-inline-actions {
  justify-content: flex-end;

  margin-top: 7px;
}

/* =========================================================
   TIMELINE
   ========================================================= */

.budgets-timeline-item {
  display: grid;
  grid-template-columns:
    28px
    minmax(0, 1fr);

  gap: 7px;
}

.budgets-timeline-item__marker {
  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;

  border: 1px solid var(--border);
  border-radius: 50%;

  background: var(--surface);
  color: var(--text-muted);
}

.budgets-timeline-item__marker .icon {
  width: 12px;
  height: 12px;
}

.budgets-timeline-item__body {
  padding: 9px;
}

.budgets-timeline-item__body > header {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.budgets-timeline-item__body > header > div:first-child {
  min-width: 0;
  flex: 1;
}

.budgets-timeline-item__body > header small,
.budgets-timeline-item__body > header strong {
  display: block;
}

.budgets-timeline-item__body > header small {
  color: var(--text-muted);

  font-size: 8px;
}

.budgets-timeline-item__body > header strong {
  margin-top: 1px;

  color: var(--text);

  font-size: 10px;
}

.budgets-timeline-text {
  margin-top: 7px;
}

.budgets-timeline-text strong {
  display: block;

  margin-bottom: 2px;

  color: var(--text);

  font-size: 9px;
}

.budgets-timeline-text p {
  margin: 0;

  color: var(--text-muted);

  font-size: 9px;
  line-height: 1.45;
}

.budgets-timeline-item__body > footer {
  margin-top: 8px;
  padding-top: 7px;

  border-top: 1px solid var(--border);

  color: var(--text-muted);

  font-size: 8px;
}

/* =========================================================
   LINKED
   ========================================================= */

.budgets-linked-card {
  display: flex;
  align-items: center;
  gap: 9px;

  padding: 10px;
}

.budgets-linked-card__icon {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--panel);
}

.budgets-linked-card__icon .icon {
  width: 15px;
  height: 15px;
}

.budgets-linked-card > div {
  min-width: 0;
}

.budgets-linked-card small,
.budgets-linked-card strong,
.budgets-linked-card span {
  display: block;
}

.budgets-linked-card small {
  color: var(--text-muted);

  font-size: 8px;
}

.budgets-linked-card strong {
  margin-top: 1px;

  color: var(--text);

  font-size: 11px;
}

.budgets-linked-card span {
  margin-top: 2px;

  color: var(--text-muted);

  font-size: 9px;
}

/* =========================================================
   HISTORY
   ========================================================= */

.budgets-history-item {
  display: grid;
  grid-template-columns:
    28px
    minmax(0, 1fr);

  gap: 7px;

  padding: 8px;
}

.budgets-history-item__icon {
  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--panel);
}

.budgets-history-item__icon .icon {
  width: 12px;
  height: 12px;
}

.budgets-history-item > div {
  min-width: 0;
}

.budgets-history-item > div > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.budgets-history-item > div > header strong {
  color: var(--text);

  font-size: 9px;
}

.budgets-history-item > div > header time {
  color: var(--text-muted);

  font-size: 8px;
}

.budgets-history-item p {
  margin: 4px 0 0;

  color: var(--text-muted);

  font-size: 8px;
}

.budgets-history-change {
  display: flex;
  align-items: center;
  gap: 5px;

  margin-top: 5px;

  color: var(--text-muted);

  font-size: 8px;
}

.budgets-history-change .icon {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}

/* =========================================================
   TOAST
   ========================================================= */

.budgets-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1400;

  display: flex;
  align-items: center;
  gap: 7px;

  max-width: 380px;

  padding: 9px 11px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--panel);
  color: var(--text);

  font-size: 10px;

  opacity: 0;
  transform: translateY(8px);

  pointer-events: none;

  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.budgets-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.budgets-toast__icon {
  display: grid;
  place-items: center;
}

.budgets-toast__icon .icon {
  width: 14px;
  height: 14px;
}

.budgets-toast--error {
  color: var(--danger, #b42318);
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes budgetsSpin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   CONTINÚA EN PARTE 2
   ========================================================= *//* =========================================================
   WIRTZ HUB · GOBERNANZA · PRESUPUESTOS
   PARTE 2 DE 2
   ========================================================= */

/* =========================================================
   HOVER / FOCUS
   ========================================================= */

.budgets-name:hover .budgets-name__copy strong,
.budgets-card__head > button:hover strong {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.budgets-btn:focus-visible,
.budgets-icon-btn:focus-visible,
.budgets-detail-tabs button:focus-visible,
.budgets-name:focus-visible,
.budgets-card__head > button:focus-visible,
.budgets-search input:focus-visible,
.budgets-filter-field input:focus-visible,
.budgets-filter-field select:focus-visible,
.budgets-field input:focus-visible,
.budgets-field select:focus-visible,
.budgets-field textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* =========================================================
   FORM STATES
   ========================================================= */

.budgets-field input::placeholder,
.budgets-field textarea::placeholder,
.budgets-filter-field input::placeholder {
  color: var(--text-muted);
}

.budgets-field input:focus,
.budgets-field select:focus,
.budgets-field textarea:focus,
.budgets-filter-field input:focus,
.budgets-filter-field select:focus,
.budgets-search input:focus {
  border-color: var(--text);
}

.budgets-field input[type="date"],
.budgets-field input[type="datetime-local"] {
  color-scheme: light dark;
}

/* =========================================================
   SCROLLBARS
   ========================================================= */

.budgets-table-wrap,
.budgets-detail-tabs,
.budgets-modal__body,
.budgets-detail-content {
  scrollbar-width: thin;
  scrollbar-color:
    var(--border)
    transparent;
}

.budgets-table-wrap::-webkit-scrollbar,
.budgets-detail-tabs::-webkit-scrollbar,
.budgets-modal__body::-webkit-scrollbar,
.budgets-detail-content::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.budgets-table-wrap::-webkit-scrollbar-thumb,
.budgets-detail-tabs::-webkit-scrollbar-thumb,
.budgets-modal__body::-webkit-scrollbar-thumb,
.budgets-detail-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--border);
}

.budgets-table-wrap::-webkit-scrollbar-track,
.budgets-detail-tabs::-webkit-scrollbar-track,
.budgets-modal__body::-webkit-scrollbar-track,
.budgets-detail-content::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================================================
   RESPONSIVE · 1500
   ========================================================= */

@media (
  max-width: 1500px
) {
  .budgets-metrics {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .budgets-control-metrics {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .budgets-filters-grid {
    grid-template-columns:
      repeat(
        4,
        minmax(0, 1fr)
      );
  }

  .budgets-summary-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-summary-text-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }
}

/* =========================================================
   RESPONSIVE · 1180
   ========================================================= */

@media (
  max-width: 1180px
) {
  .budgets-head {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  .budgets-head__status {
    grid-column:
      1 / -1;

    width: 100%;
  }

  .budgets-head-status {
    flex: 1;
  }

  .budgets-head__actions {
    align-self: center;
  }

  .budgets-filters-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .budgets-detail-financial {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .budgets-form-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-field--span-3 {
    grid-column:
      1 / -1;
  }

  .budgets-summary-text-grid {
    grid-template-columns:
      1fr;
  }

  .budgets-amount-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-review-financial {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }
}

/* =========================================================
   RESPONSIVE · TABLET / MOBILE
   ========================================================= */

@media (
  max-width: 820px
) {
  .budgets-page {
    gap: 8px;
  }

  .budgets-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;

    padding: 11px;

    border-radius: 11px;
  }

  .budgets-brand {
    align-items: flex-start;
  }

  .budgets-brand__icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;

    border-radius: 9px;
  }

  .budgets-brand__icon .icon {
    width: 17px;
    height: 17px;
  }

  .budgets-brand__copy h1 {
    font-size: 21px;
  }

  .budgets-brand__copy p {
    font-size: 11px;
  }

  .budgets-head__status {
    display: grid;
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 5px;
  }

  .budgets-head-status {
    min-width: 0;

    padding: 8px;
  }

  .budgets-head__actions {
    width: 100%;
  }

  .budgets-head__actions .budgets-btn {
    flex: 1;
  }

  .budgets-metrics {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 5px;
  }

  .budgets-metric {
    padding: 8px;
  }

  .budgets-metric__icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .budgets-metric__copy strong {
    font-size: 13px;
  }

  .budgets-control-metrics {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 5px;
  }

  .budgets-panel {
    border-radius: 11px;
  }

  .budgets-filters__head {
    padding: 9px 10px;
  }

  .budgets-filters__body {
    padding: 9px 10px;
  }

  .budgets-search-row {
    grid-template-columns: 1fr;
  }

  .budgets-filters-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-pagination {
    flex-direction: column;
    align-items: stretch;

    padding: 9px;
  }

  .budgets-pagination__info,
  .budgets-pagination__page {
    text-align: center;
  }

  .budgets-pagination__actions {
    display: grid;
    grid-template-columns:
      1fr
      auto
      1fr;
  }

  .budgets-card-list {
    padding: 7px;
  }

  .budgets-card {
    padding: 9px;
  }

  .budgets-card__meta {
    grid-template-columns: 1fr;
  }

  .budgets-modal-backdrop {
    align-items: flex-end;

    padding: 0;
  }

  .budgets-modal {
    width: 100%;
    max-height: 94vh;

    border-right: 0;
    border-bottom: 0;
    border-left: 0;

    border-radius:
      13px
      13px
      0
      0;
  }

  .budgets-modal--form,
  .budgets-modal--detail,
  .budgets-modal--child {
    width: 100%;
  }

  .budgets-modal__head {
    padding: 11px;
  }

  .budgets-modal__body {
    padding: 11px;
  }

  .budgets-modal__footer {
    padding: 9px 11px;
  }

  .budgets-form-grid {
    grid-template-columns: 1fr;
  }

  .budgets-field--span-2,
  .budgets-field--span-3 {
    grid-column: span 1;
  }

  .budgets-detail-hero {
    flex-direction: column;

    padding: 11px;

    gap: 9px;
  }

  .budgets-detail-hero__main {
    width: 100%;
  }

  .budgets-detail-hero__actions {
    width: 100%;

    display: grid;
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-detail-hero__actions .budgets-icon-btn {
    grid-column:
      1 / -1;

    justify-self: end;
  }

  .budgets-detail-financial {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    padding: 8px 11px;
  }

  .budgets-detail-progress {
    padding: 8px 11px;
  }

  .budgets-detail-tabs {
    padding: 5px 7px;
  }

  .budgets-detail-content {
    padding: 10px 11px;
  }

  .budgets-detail-footer {
    padding: 8px 11px;
  }

  .budgets-summary-grid {
    grid-template-columns: 1fr;
  }

  .budgets-summary-text-grid {
    grid-template-columns: 1fr;
  }

  .budgets-tab-head {
    align-items: flex-start;
  }

  .budgets-record-card,
  .budgets-movement-card,
  .budgets-timeline-item__body,
  .budgets-linked-card {
    padding: 9px;
  }

  .budgets-record-card > header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .budgets-record-title {
    min-width:
      calc(
        100% - 42px
      );
  }

  .budgets-record-card > header .budgets-child-actions {
    margin-left: auto;
  }

  .budgets-amount-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-movement-card__body > header {
    flex-wrap: wrap;
  }

  .budgets-movement-amount {
    margin-left: auto;
  }

  .budgets-timeline-item {
    grid-template-columns:
      24px
      minmax(0, 1fr);

    gap: 6px;
  }

  .budgets-timeline-item__marker {
    width: 24px;
    height: 24px;
  }

  .budgets-timeline-item__marker .icon {
    width: 11px;
    height: 11px;
  }

  .budgets-review-financial {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .budgets-history-item {
    grid-template-columns:
      25px
      minmax(0, 1fr);

    gap: 6px;
  }

  .budgets-history-item__icon {
    width: 25px;
    height: 25px;
  }

  .budgets-toast {
    right: 9px;
    bottom: 9px;

    max-width:
      calc(
        100vw - 18px
      );
  }
}

/* =========================================================
   RESPONSIVE · SMALL MOBILE
   ========================================================= */

@media (
  max-width: 560px
) {
  .budgets-head__status {
    grid-template-columns: 1fr;
  }

  .budgets-head__actions {
    display: grid;
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-metrics {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-control-metrics {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-filters-grid {
    grid-template-columns: 1fr;
  }

  .budgets-pagination__actions {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-pagination__page {
    grid-column:
      1 / -1;

    grid-row: 1;

    margin-bottom: 2px;
  }

  .budgets-card__head {
    flex-direction: column;
  }

  .budgets-card__head > button {
    width: 100%;
  }

  .budgets-card__amounts {
    grid-template-columns: 1fr;
  }

  .budgets-card__stats {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .budgets-card__footer {
    align-items: flex-end;
  }

  .budgets-detail-hero__main {
    flex-direction: column;
  }

  .budgets-detail-hero__actions {
    grid-template-columns: 1fr;
  }

  .budgets-detail-hero__actions .budgets-icon-btn {
    grid-column: auto;

    justify-self: end;
  }

  .budgets-detail-financial {
    grid-template-columns: 1fr 1fr;
  }

  .budgets-tab-head {
    flex-direction: column;
  }

  .budgets-tab-head > .budgets-btn {
    width: 100%;
  }

  .budgets-amount-grid {
    grid-template-columns: 1fr;
  }

  .budgets-review-financial {
    grid-template-columns: 1fr;
  }

  .budgets-record-meta {
    flex-direction: column;
    align-items: flex-start;

    gap: 5px;
  }

  .budgets-movement-card {
    flex-direction: column;
  }

  .budgets-movement-card > .budgets-record-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .budgets-movement-card__body {
    width: 100%;
  }

  .budgets-movement-card__body > header {
    flex-direction: column;
  }

  .budgets-movement-amount {
    margin-left: 0;
  }

  .budgets-history-item > div > header {
    flex-direction: column;
    align-items: flex-start;

    gap: 2px;
  }

  .budgets-history-change {
    align-items: flex-start;
    flex-direction: column;
  }

  .budgets-history-change .icon {
    transform: rotate(90deg);
  }

  .budgets-modal__footer {
    display: grid;
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .budgets-modal__footer .budgets-btn {
    width: 100%;
  }
}

/* =========================================================
   RESPONSIVE · VERY SMALL
   ========================================================= */

@media (
  max-width: 420px
) {
  .budgets-head__actions {
    grid-template-columns: 1fr;
  }

  .budgets-metrics {
    grid-template-columns: 1fr;
  }

  .budgets-control-metrics {
    grid-template-columns: 1fr;
  }

  .budgets-detail-financial {
    grid-template-columns: 1fr;
  }

  .budgets-card__stats {
    grid-template-columns: 1fr;
  }

  .budgets-card__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .budgets-card__footer .budgets-state {
    align-self: flex-start;
  }

  .budgets-card__footer .budgets-row-actions {
    justify-content: flex-end;
  }

  .budgets-modal__footer {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   DARK
   ========================================================= */

:root[data-theme="dark"]
  .budgets-btn--dark {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

:root[data-theme="dark"]
  .budgets-btn--dark:hover:not(:disabled) {
  background: #e7e7e7;
}

:root[data-theme="dark"]
  .budgets-modal-backdrop {
  background: rgba(0, 0, 0, 0.74);
}

:root[data-theme="dark"]
  .budgets-state,
:root[data-theme="dark"]
  .budgets-priority {
  background: #111111;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (
  prefers-reduced-motion:
    reduce
) {
  .budgets-btn,
  .budgets-icon-btn,
  .budgets-table tbody tr,
  .budgets-progress__track > span,
  .budgets-toast,
  .budgets-metric,
  .budgets-modal {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {
  .budgets-head__actions,
  .budgets-filters,
  .budgets-pagination,
  .budgets-row-actions,
  .budgets-child-actions,
  .budgets-inline-actions,
  .budgets-toast,
  .budgets-modal-backdrop {
    display: none !important;
  }

  .budgets-page,
  .budgets-head,
  .budgets-panel,
  .budgets-metric,
  .budgets-control-card {
    border-color: #bdbdbd !important;

    background: #ffffff !important;
    color: #000000 !important;
  }

  .budgets-table-wrap {
    overflow: visible;
  }

  .budgets-table {
    min-width: 0;
  }
}