.budget-card {
  grid-row: span 2;
  padding: 28px;
}
.budget-allocator {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}
.allocator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 550;
}
.allocation {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.allocation-profile {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 3px 11px;
  align-items: center;
  min-width: 0;
  min-height: 64px;
  padding: 0;
  background: transparent;
  border: 0;
}
.allocation-profile .avatar {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 56px;
  height: 56px;
  border-radius: 9px;
}
.allocation-identity {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.allocation-identity strong {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
}
.allocation-identity small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.allocation-remaining {
  grid-column: 2;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
}
.allocation-remaining b {
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.allocation-control {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.allocation-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.allocation-value > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.allocation-value output {
  color: var(--ink);
  font-size: 15px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.allocation input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 24px;
  margin: 0;
  padding: 0;
  background: linear-gradient(
      to right,
      var(--red) var(--progress, 60%),
      var(--line) var(--progress, 60%)
    )
    center / 100% 4px no-repeat;
  border-radius: 5px;
  cursor: pointer;
}
.allocation input::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--panel);
  border: 3px solid var(--red);
  box-shadow: 0 0 0 3px var(--bg);
}
.allocation input::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: var(--panel);
}
.allocator-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.allocator-footer > span:last-child {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (min-width: 681px) and (max-width: 1180px) {
  .budget-card {
    padding: 24px;
  }
  .allocation {
    gap: 12px;
    padding-inline: 10px;
    grid-template-columns: 170px minmax(0, 1fr);
  }
  .allocation-profile {
    gap: 3px 8px;
    padding-inline: 0;
  }
  .allocation-control {
    padding-left: 12px;
  }
  .allocation-value {
    flex-wrap: wrap;
    gap: 3px 8px;
  }
}
@media (max-width: 900px) {
  .budget-card {
    padding: 20px;
  }
  .budget-allocator {
    margin-top: 20px;
  }
  .allocator-head {
    padding: 12px;
    flex-wrap: wrap;
    gap: 4px 10px;
  }
  .allocation {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 12px;
    padding: 7px 10px;
  }
  .allocation-profile {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 3px 8px;
    padding: 0;
    min-height: 64px;
  }
  .allocation-profile .avatar {
    width: 48px;
    height: 48px;
    grid-row: 1;
  }
  .allocation-identity {
    grid-row: 1;
  }
  .allocation-control {
    padding-left: 10px;
  }
  .allocation-identity strong {
    font-size: 13px;
  }
  .allocation-remaining {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: space-between;
  }
  .allocation-value {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
  .allocation-value output {
    font-size: 14px;
  }
  .allocator-footer {
    padding: 11px 12px;
    flex-wrap: wrap;
    gap: 5px 12px;
  }
}
@media (max-width: 360px) {
  .budget-card {
    padding: 14px;
  }
  .allocation {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 9px;
    padding-inline: 8px;
  }
  .allocation-profile {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 3px 6px;
    padding: 0;
  }
  .allocation-control {
    padding-left: 8px;
  }
  .allocation-profile .avatar {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 680px) {
  .budget-card {
    grid-row: auto;
  }
}
