/* Debt payment dialog: wide two-panel form on one grid. Every control is one shape (equal height,
   one radius) and the input lives inside its wrapper, never drawn on its own. */

.overlay.debt-payment-overlay {
  align-items: center;
  overflow-y: auto;
  background:
    radial-gradient(460px 340px at 85% 12%, rgba(61, 187, 133, .42), transparent 70%),
    radial-gradient(420px 320px at 10% 88%, rgba(143, 132, 240, .4), transparent 70%),
    rgba(20, 24, 40, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

html[data-theme="dark"] .overlay.debt-payment-overlay {
  background:
    radial-gradient(460px 340px at 85% 12%, rgba(61, 187, 133, .26), transparent 70%),
    radial-gradient(420px 320px at 10% 88%, rgba(143, 132, 240, .26), transparent 70%),
    rgba(6, 8, 16, .68);
}

.modal.debt-payment {
  --dp-h: 52px;
  --dp-radius: 18px;
  --dp-gap: 16px;
  --dp-ink: var(--text1, #17213c);
  --dp-soft: #4b5573;
  --dp-edge: rgba(255, 255, 255, .85);
  --dp-panel: rgba(255, 255, 255, .46);
  --dp-ctl: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(237, 234, 253, .8));
  --dp-ctl-edge: rgba(255, 255, 255, .95);
  --dp-ring: rgba(140, 128, 214, .22);
  --dp-menu: #fbfaff;
  --dp-hover: rgba(120, 100, 220, .09);
  width: 100%;
  max-width: 940px;
  margin: auto;
  display: grid;
  gap: var(--dp-gap);
  padding: 24px;
  border: 1px solid var(--dp-edge);
  border-radius: 28px;
  color: var(--dp-ink);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, .3), transparent 45%),
    rgba(255, 255, 255, .55);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    0 30px 70px rgba(30, 60, 110, .3),
    inset 0 1px 0 rgba(255, 255, 255, .7);
  container-type: inline-size;
  /* the overlay scrolls, so an open dropdown menu is never clipped by the dialog */
  max-height: none;
  overflow: visible;
  animation: dpPop .7s cubic-bezier(.2, .9, .3, 1.1) both;
}

html[data-theme="dark"] .modal.debt-payment {
  --dp-ink: #f2f5ff;
  --dp-soft: #b9c3db;
  --dp-edge: rgba(255, 255, 255, .14);
  --dp-panel: rgba(255, 255, 255, .05);
  --dp-ctl: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(160, 150, 255, .07));
  --dp-ctl-edge: rgba(255, 255, 255, .14);
  --dp-ring: rgba(170, 160, 255, .2);
  --dp-menu: #1b2236;
  --dp-hover: rgba(255, 255, 255, .08);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, .1), transparent 45%),
    rgba(20, 28, 44, .6);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .6),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

.debt-payment > *,
.debt-payment .dp-cols > * {
  animation: dpRise .55s cubic-bezier(.2, .9, .3, 1.1) both;
}

.debt-payment .dp-cols > *:nth-child(2) { animation-delay: .08s; }
.overlay .modal.debt-payment .modal-actions.dp-actions { animation-delay: .16s; }

@keyframes dpPop {
  from {
    opacity: 0;
    transform: translateY(28px) scale(.95);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes dpRise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- head ---------- */
.debt-payment .dp-head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}

.debt-payment .dp-icon {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 28px;
  background: linear-gradient(145deg, #6ee0ae, #2fa96d 55%, #2f9fc4);
  box-shadow:
    0 10px 22px rgba(47, 169, 109, .4),
    inset 0 1px 0 rgba(255, 255, 255, .5);
}

.debt-payment .dp-icon i {
  animation: dpCoin 2.8s ease-in-out infinite;
}

.debt-payment .dp-icon::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(61, 187, 133, .5);
  border-radius: 22px;
  animation: dpRing 2.4s ease-out infinite;
}

@keyframes dpCoin {
  0%, 100% { transform: translateY(0) rotate(0); }
  40% { transform: translateY(-3px) rotate(-8deg); }
  60% { transform: translateY(0) rotate(6deg); }
}

@keyframes dpRing {
  from {
    transform: scale(.92);
    opacity: .9;
  }
  to {
    transform: scale(1.22);
    opacity: 0;
  }
}

.debt-payment .dp-title {
  flex: 1;
  min-width: 0;
}

.debt-payment .dp-title h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.debt-payment .dp-title span {
  display: block;
  color: var(--dp-soft);
  font-size: 13px;
  line-height: 1.5;
}

.debt-payment .dp-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--dp-ctl-edge);
  border-radius: var(--dp-radius);
  color: var(--dp-soft);
  background: var(--dp-ctl);
  box-shadow: 0 0 0 1px var(--dp-ring), inset 0 1px 0 rgba(255, 255, 255, .8);
  font-size: 20px;
  cursor: pointer;
  transition: transform .2s ease;
}

.debt-payment .dp-close:hover {
  transform: rotate(90deg);
}

/* ---------- panels ---------- */
.debt-payment .dp-cols {
  display: grid;
  gap: var(--dp-gap);
}

@container (min-width: 760px) {
  .dp-cols {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.debt-payment .dp-panel {
  min-width: 0;
  display: grid;
  gap: var(--dp-gap);
  align-content: start;
  padding: 20px;
  border: 1px solid var(--dp-edge);
  border-radius: 24px;
  background: var(--dp-panel);
}

.debt-payment .dp-panel-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
}

.debt-payment .dp-panel-head > i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, var(--a), var(--b));
  font-size: 18px;
}

/* ---------- fields ---------- */
.debt-payment .dp-field {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.debt-payment .dp-field:has(.accounts-sort-select.is-open) {
  z-index: 60;
}

/* an open menu sits above the panel below it and above the action buttons */
.debt-payment .dp-cols:has(.accounts-sort-select.is-open),
.debt-payment .dp-panel:has(.accounts-sort-select.is-open) {
  position: relative;
  z-index: 50;
}

.overlay .modal.debt-payment .modal-actions.dp-actions {
  position: relative;
  z-index: 1;
}

.debt-payment .dp-field > label {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.debt-payment .dp-field > label .ui-label-icon {
  display: none;
}

.debt-payment .dp-field > label > i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  font-size: 14px;
}

/* one shape for every control */
.debt-payment .dp-ctl {
  height: var(--dp-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  overflow: hidden;
  border: 1px solid var(--dp-ctl-edge);
  border-radius: var(--dp-radius);
  color: var(--dp-ink);
  background: var(--dp-ctl);
  box-shadow: 0 0 0 1px var(--dp-ring), inset 0 1px 0 rgba(255, 255, 255, .75);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.debt-payment .dp-ctl:focus-within {
  border-color: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent);
}

.debt-payment .dp-ctl > i {
  flex: none;
  color: var(--dp-soft);
  font-size: 19px;
}

.debt-payment .dp-field .dp-ctl :is(input, textarea) {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  color: var(--dp-ink);
  background: transparent !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 14.5px;
  -webkit-appearance: none;
  appearance: none;
}

.debt-payment .dp-field .dp-ctl input {
  height: 100%;
}

.debt-payment .dp-field .dp-ctl :is(input, textarea)::placeholder {
  color: var(--dp-soft);
  opacity: .8;
}

.debt-payment .dp-ctl.dp-amount {
  height: 60px;
}

.debt-payment .dp-field .dp-amount input {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .3px;
  direction: ltr;
  text-align: right;
}

.debt-payment .dp-currency {
  flex: none;
  padding: 4px 12px;
  border: 1px solid rgba(63, 174, 114, .35);
  border-radius: 999px;
  color: #1f7a49;
  background: rgba(63, 174, 114, .16);
  font-size: 12.5px;
  font-weight: 700;
}

html[data-theme="dark"] .debt-payment .dp-currency {
  color: #8be3ae;
}

.debt-payment .dp-ctl.is-notes {
  height: auto;
  min-height: 104px;
  align-items: flex-start;
  padding: 16px 18px;
}

.debt-payment .dp-field .is-notes textarea {
  height: 72px;
  resize: none;
  line-height: 1.8;
}

.debt-payment .dp-ctl.is-readonly {
  border-color: rgba(47, 159, 196, .38);
  background: linear-gradient(120deg, rgba(47, 159, 196, .18), rgba(47, 159, 196, .05));
  box-shadow: none;
}

.debt-payment .dp-ctl.is-readonly > i {
  color: #2f9fc4;
}

.debt-payment .dp-value {
  min-width: 0;
  font-size: 14.5px;
}

.debt-payment .dp-value b {
  font-weight: 700;
}

.debt-payment .dp-value small {
  margin-inline-start: 8px;
  color: var(--dp-soft);
  font-size: 12.5px;
}

/* the date picker keeps its own markup and takes the same shape */
.debt-payment .date-picker-field {
  height: var(--dp-h);
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--dp-ctl-edge);
  border-radius: var(--dp-radius);
  color: var(--dp-ink);
  background: var(--dp-ctl);
  box-shadow: 0 0 0 1px var(--dp-ring), inset 0 1px 0 rgba(255, 255, 255, .75);
}

.debt-payment .date-picker-field > i {
  color: var(--dp-soft);
  font-size: 19px;
}

.debt-payment .date-picker-field:focus-visible {
  outline: 0;
  border-color: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent);
}

/* amount message */
.debt-payment .dp-msg {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
}

.debt-payment .dp-msg.is-bad { color: #b13f2a; }
.debt-payment .dp-msg.is-ok { color: #1f7a49; }

html[data-theme="dark"] .debt-payment .dp-msg.is-bad { color: #f4ae98; }
html[data-theme="dark"] .debt-payment .dp-msg.is-ok { color: #8be3ae; }

.debt-payment .dp-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--dp-soft) 20%, transparent);
}

.debt-payment .dp-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2fa96d, #2f9fc4, #8f84f0);
  transition: width .5s cubic-bezier(.2, .9, .3, 1.1);
}

/* ---------- three figures ---------- */
.debt-payment .dp-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.debt-payment .dp-stat {
  --t: #2f9fc4;
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "icon"
    "label"
    "num"
    "tag";
  align-items: center;
  justify-items: start;
  gap: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--t) 30%, rgba(255, 255, 255, .9));
  border-radius: var(--dp-radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--t) 18%, transparent), color-mix(in srgb, var(--t) 4%, transparent) 70%),
    var(--dp-ctl);
  box-shadow:
    0 0 0 1px var(--dp-ring),
    inset 0 1px 0 rgba(255, 255, 255, .75),
    0 10px 22px rgba(30, 60, 110, .16);
  animation: dpRise .55s cubic-bezier(.2, .9, .3, 1.1) both;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.1), border-color .4s ease, background .4s ease;
}

.debt-payment .dp-stat:nth-child(2) { animation-delay: .07s; }
.debt-payment .dp-stat:nth-child(3) { animation-delay: .14s; }

.debt-payment .dp-stat:hover {
  transform: translateY(-3px);
}

.debt-payment .dp-stat::after {
  content: "";
  position: absolute;
  inset-inline-start: -34px;
  bottom: -44px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--t) 30%, transparent), transparent 70%);
  animation: dpGlow 3.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes dpGlow {
  50% {
    transform: scale(1.25);
    opacity: .65;
  }
}

.debt-payment .dp-stat.is-owed { --t: #d85a30; --tn: #b13f2a; }
.debt-payment .dp-stat.is-paying { --t: #2fa96d; --tn: #1f7a49; }
.debt-payment .dp-stat.is-left { --t: #2f9fc4; --tn: #1d6f93; }
.debt-payment .dp-stat.is-left.is-settled { --t: #2fa96d; --tn: #1f7a49; }
.debt-payment .dp-stat.is-left.is-over { --t: #d85a30; --tn: #b13f2a; }

html[data-theme="dark"] .debt-payment .dp-stat.is-owed { --tn: #f4ae98; }
html[data-theme="dark"] .debt-payment .dp-stat.is-paying { --tn: #8be3ae; }
html[data-theme="dark"] .debt-payment .dp-stat.is-left { --tn: #8fd0f0; }
html[data-theme="dark"] .debt-payment .dp-stat.is-left.is-settled { --tn: #8be3ae; }
html[data-theme="dark"] .debt-payment .dp-stat.is-left.is-over { --tn: #f4ae98; }

.debt-payment .dp-stat-icon {
  grid-area: icon;
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--t) 62%, #fff), var(--t));
  box-shadow: 0 8px 16px color-mix(in srgb, var(--t) 38%, transparent);
  font-size: 20px;
}

.debt-payment .dp-stat-icon i {
  transition: transform .4s cubic-bezier(.2, 1.6, .4, 1);
}

.debt-payment .dp-stat.is-bumped .dp-stat-icon i {
  transform: scale(1.25) rotate(-10deg);
}

.debt-payment .dp-stat.is-owed .dp-stat-icon i {
  animation: dpSand 3s ease-in-out infinite;
}

@keyframes dpSand {
  50% { transform: rotate(180deg); }
}

.debt-payment .dp-stat-label {
  grid-area: label;
  position: relative;
  z-index: 1;
  min-width: 0;
  color: var(--dp-soft);
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 10px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
}

.debt-payment .dp-stat-num {
  grid-area: num;
  position: relative;
  z-index: 1;
  min-width: 0;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
}

.debt-payment .dp-stat-num b {
  color: var(--tn, var(--dp-ink));
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  direction: ltr;
}

.debt-payment .dp-stat-num small {
  color: var(--dp-soft);
  font-size: 12px;
  white-space: nowrap;
}

.debt-payment .dp-stat-tag {
  position: relative;
  grid-area: tag;
  justify-self: start;
  margin-top: 8px;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, #2fa96d, #2f9fc4);
  font-size: 11px;
  font-weight: 700;
  animation: dpPip .5s cubic-bezier(.2, 1.6, .4, 1) both;
}

.debt-payment .dp-stat.is-settled .dp-stat-tag {
  display: inline-flex;
}

@keyframes dpPip {
  from { transform: scale(0); }
  to { transform: none; }
}

/* ---------- handover dialog: extra figures and notices ---------- */
.debt-payment .dp-stat.is-expected { --t: #5069dc; --tn: #3b57c8; }
.debt-payment .dp-stat.is-transit { --t: #c08a1e; --tn: #8a5d0d; }

html[data-theme="dark"] .debt-payment .dp-stat.is-expected { --tn: #a9b9ff; }
html[data-theme="dark"] .debt-payment .dp-stat.is-transit { --tn: #f0cf86; }

.debt-payment .dp-stat.is-transit .dp-stat-icon i {
  animation: dpTruck 2.6s ease-in-out infinite;
}

@keyframes dpTruck {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-3px); }
}

.debt-payment .dp-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--n) 38%, transparent);
  border-radius: var(--dp-radius);
  background: linear-gradient(120deg, color-mix(in srgb, var(--n) 20%, transparent), color-mix(in srgb, var(--n) 5%, transparent));
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
}

.debt-payment .dp-note > i {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--n) 62%, #fff), var(--n));
  font-size: 19px;
}

.debt-payment .dp-note b {
  color: var(--nt);
  font-weight: 800;
}

.debt-payment .dp-note.is-warn { --n: #d85a30; --nt: #b13f2a; }
.debt-payment .dp-note.is-info { --n: #c08a1e; --nt: #8a5d0d; }

html[data-theme="dark"] .debt-payment .dp-note.is-warn { --nt: #f4ae98; }
html[data-theme="dark"] .debt-payment .dp-note.is-info { --nt: #f0cf86; }

/* ---------- salary deduction: the same dialog in a warm tone ---------- */
.overlay.deduction-overlay {
  background:
    radial-gradient(460px 340px at 85% 12%, rgba(229, 138, 75, .42), transparent 70%),
    radial-gradient(420px 320px at 10% 88%, rgba(143, 132, 240, .38), transparent 70%),
    rgba(20, 24, 40, .45);
}

html[data-theme="dark"] .overlay.deduction-overlay {
  background:
    radial-gradient(460px 340px at 85% 12%, rgba(229, 138, 75, .26), transparent 70%),
    radial-gradient(420px 320px at 10% 88%, rgba(143, 132, 240, .24), transparent 70%),
    rgba(6, 8, 16, .68);
}

.salary-deduction .dp-icon {
  background: linear-gradient(145deg, #f5a66b, #e0703a 55%, #d8503a);
  box-shadow:
    0 10px 22px rgba(224, 112, 58, .4),
    inset 0 1px 0 rgba(255, 255, 255, .5);
}

.salary-deduction .dp-icon::after {
  border-color: rgba(224, 112, 58, .5);
}

.salary-deduction .dp-icon i {
  animation-name: dpWobble;
}

@keyframes dpWobble {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-10deg); }
  60% { transform: rotate(8deg); }
}

.salary-deduction .dp-currency {
  border-color: rgba(224, 112, 58, .38);
  color: #a8470f;
  background: rgba(224, 112, 58, .16);
}

html[data-theme="dark"] .salary-deduction .dp-currency {
  color: #f4b08a;
}

.overlay .modal.debt-payment.salary-deduction .modal-actions.dp-actions .btn-primary {
  background: linear-gradient(120deg, #e0a73a, #e0703a, #d8503a, #e0a73a);
  background-size: 250% 100%;
  box-shadow:
    0 14px 28px rgba(224, 112, 58, .38),
    inset 0 1px 0 rgba(255, 255, 255, .4);
}

/* ---------- themed dropdown ---------- */
.debt-payment .accounts-sort-select {
  position: relative;
  width: 100%;
}

.debt-payment .accounts-sort-select.is-open {
  z-index: 100;
}

.debt-payment .accounts-sort-select > select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.debt-payment .accounts-sort-trigger {
  width: 100%;
  height: var(--dp-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--dp-ctl-edge);
  border-radius: var(--dp-radius);
  color: var(--dp-ink);
  background: var(--dp-ctl);
  box-shadow: 0 0 0 1px var(--dp-ring), inset 0 1px 0 rgba(255, 255, 255, .75);
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.debt-payment .accounts-sort-trigger-copy {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.debt-payment .accounts-sort-trigger-copy > i {
  color: var(--dp-soft);
  font-size: 19px;
}

.debt-payment .accounts-sort-chevron {
  color: var(--dp-soft);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.1);
}

.debt-payment .accounts-sort-select.is-open .accounts-sort-chevron {
  transform: rotate(180deg);
}

.debt-payment .accounts-sort-select.is-open .accounts-sort-trigger,
.debt-payment .accounts-sort-trigger:focus-visible {
  outline: 0;
  border-color: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent);
}

.debt-payment .accounts-sort-menu {
  position: absolute;
  z-index: 120;
  inset-inline: 0;
  top: calc(100% + 6px);
  display: none;
  gap: 2px;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--dp-edge);
  border-radius: 22px;
  background: var(--dp-menu);
  box-shadow: 0 20px 44px rgba(30, 40, 90, .3);
}

html[data-theme="dark"] .debt-payment .accounts-sort-menu {
  box-shadow: 0 20px 44px rgba(0, 0, 0, .6);
}

.debt-payment .accounts-sort-select.is-open .accounts-sort-menu {
  display: grid;
  transform-origin: top;
  animation: dpMenu .25s cubic-bezier(.2, .9, .3, 1.1) both;
}

@keyframes dpMenu {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.97);
  }
}

.debt-payment .accounts-sort-option {
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border: 0;
  border-radius: 14px;
  color: var(--dp-ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
}

.debt-payment .accounts-sort-option > i:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  font-size: 16px;
}

.debt-payment .accounts-sort-option > i:last-child {
  color: #2fa96d;
  font-size: 17px;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .25s ease, transform .25s cubic-bezier(.2, 1.6, .4, 1);
}

.debt-payment .accounts-sort-option:hover {
  background: var(--dp-hover);
}

.debt-payment .accounts-sort-option.is-active {
  font-weight: 700;
  background: color-mix(in srgb, var(--c) 14%, transparent);
}

.debt-payment .accounts-sort-option.is-active > i:last-child {
  opacity: 1;
  transform: none;
}

/* ---------- actions ---------- */
.overlay .modal.debt-payment .modal-actions.dp-actions {
  display: flex;
  gap: 12px;
  margin: 0;
  padding-top: 4px;
}

.overlay .modal.debt-payment .modal-actions.dp-actions .btn {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  overflow: hidden;
  height: var(--dp-h);
  margin: 0;
  padding: 0 28px;
  border-radius: var(--dp-radius);
  font-size: 15px;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.1);
}

.overlay .modal.debt-payment .modal-actions.dp-actions .btn:hover:not(:disabled) {
  transform: translateY(-3px);
}

.overlay .modal.debt-payment .modal-actions.dp-actions .btn-primary {
  min-width: 240px;
  border: 0;
  color: #fff;
  background: linear-gradient(120deg, #2fa96d, #2f9fc4, #5b7bff, #2fa96d);
  background-size: 250% 100%;
  animation: dpFlow 6s linear infinite;
  box-shadow:
    0 14px 28px rgba(47, 159, 196, .38),
    inset 0 1px 0 rgba(255, 255, 255, .4);
}

.overlay .modal.debt-payment .modal-actions.dp-actions .btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80px;
  width: 60px;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg);
  animation: dpSheen 3.2s ease-in-out infinite;
}

@keyframes dpFlow {
  to { background-position: 250% 0; }
}

@keyframes dpSheen {
  60%, 100% { left: 120%; }
}

.overlay .modal.debt-payment .modal-actions.dp-actions .btn-ghost {
  min-width: 140px;
  border: 1px solid var(--dp-ctl-edge);
  color: var(--dp-ink);
  background: var(--dp-ctl);
  box-shadow: 0 0 0 1px var(--dp-ring), inset 0 1px 0 rgba(255, 255, 255, .75);
}

@container (max-width: 759px) {
  .overlay .modal.debt-payment .modal-actions.dp-actions {
    flex-direction: column-reverse;
  }

  .overlay .modal.debt-payment .modal-actions.dp-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

@container (max-width: 560px) {
  .debt-payment .dp-stats {
    grid-template-columns: 1fr;
  }

  .debt-payment .dp-stat {
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: "icon label tag num";
    justify-items: stretch;
    gap: 0 10px;
  }

  .debt-payment .dp-stat-tag {
    margin-top: 0;
    justify-self: auto;
  }

  .debt-payment .dp-stat-label {
    margin-top: 0;
  }

  .debt-payment .dp-stat-num {
    margin-top: 0;
  }

  .debt-payment .dp-stat-num {
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .modal.debt-payment {
    padding: 16px;
  }

  .debt-payment .dp-panel {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal.debt-payment,
  .debt-payment *,
  .debt-payment *::after {
    animation: none !important;
  }
}
