/* On-primary text (Unfold defaults to text-white on bg-primary-*).
   Use [class~="text-white"] so we do not match after:text-white on checkboxes. */
[class*="bg-primary-"][class~="text-white"] {
  color: #1d1f25 !important;
}

/* COP amounts in debt movement inlines (Movement.amount_cop) */
.field-amount_cop .tabular-money-cop,
td.field-amount_cop .tabular-money-cop {
  display: block;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Changelist: table grows to fill space beside the fixed filter sidebar (w-80). */
#changelist.filtered .result-list-wrapper {
  width: 100%;
}

#changelist.filtered .result-list-wrapper > .grow {
  flex: 1 1 0%;
  min-width: 0;
}

#changelist.filtered #result_list {
  width: 100%;
}

/* Movement changelist: align amount inputs like the old read-only column. */
#result_list td.field-amount input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Sidebar: tighten header gap so last-update sits under the logo border. */
#nav-sidebar-inner > .border-b {
  margin-bottom: 0.75rem;
}

.sidebar-last-update {
  font-variant-numeric: tabular-nums;
}

/* Admin home: money / debts summary cards */
.home-summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 639px) {
  .home-summary-cards {
    grid-template-columns: 1fr;
  }
}

.home-summary-card {
  display: block;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.home-summary-card__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-summary-card__amount {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.home-summary-card__meta {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
}

.home-summary-card--money {
  border: 1px solid #a7f3d0;
  background-color: #ecfdf5;
}

.home-summary-card--money .home-summary-card__label {
  color: #047857;
}

.home-summary-card--money .home-summary-card__amount {
  color: #064e3b;
}

.home-summary-card--money .home-summary-card__meta {
  color: #065f46;
  opacity: 0.75;
}

.home-summary-card--money:hover {
  border-color: #6ee7b7;
  background-color: #d1fae5;
}

.home-summary-card--debts {
  border: 1px solid #fecdd3;
  background-color: #fff1f2;
}

.home-summary-card--debts .home-summary-card__label {
  color: #be123c;
}

.home-summary-card--debts .home-summary-card__amount {
  color: #881337;
}

.home-summary-card--debts .home-summary-card__meta {
  color: #9f1239;
  opacity: 0.75;
}

.home-summary-card--debts:hover {
  border-color: #fda4af;
  background-color: #ffe4e6;
}

html.dark .home-summary-card--money {
  border-color: rgba(6, 95, 70, 0.55);
  background-color: rgba(6, 78, 59, 0.22);
}

html.dark .home-summary-card--money .home-summary-card__label {
  color: #6ee7b7;
}

html.dark .home-summary-card--money .home-summary-card__amount {
  color: #d1fae5;
}

html.dark .home-summary-card--money .home-summary-card__meta {
  color: #a7f3d0;
}

html.dark .home-summary-card--money:hover {
  border-color: rgba(52, 211, 153, 0.45);
  background-color: rgba(6, 78, 59, 0.35);
}

html.dark .home-summary-card--debts {
  border-color: rgba(159, 18, 57, 0.55);
  background-color: rgba(136, 19, 55, 0.22);
}

html.dark .home-summary-card--debts .home-summary-card__label {
  color: #fda4af;
}

html.dark .home-summary-card--debts .home-summary-card__amount {
  color: #ffe4e6;
}

html.dark .home-summary-card--debts .home-summary-card__meta {
  color: #fecdd3;
}

html.dark .home-summary-card--debts:hover {
  border-color: rgba(251, 113, 133, 0.45);
  background-color: rgba(136, 19, 55, 0.35);
}
