.payment-panel {
  margin-top: 18px;
  padding: 24px;
  scroll-margin-top: 24px;
}

.payment-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.payment-heading-actions .button:disabled,
.payment-modal .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.demo-finance-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 99px;
  background: #edf7ff;
  color: #286a9f;
  font-size: 9px;
  font-weight: 800;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-top: 20px;
}

.collection-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(150deg, #ffffff, #f8fbfd);
}

.collection-card > span {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #e8f7f1;
  color: #16805e;
  font-size: 15px;
  font-weight: 900;
}

.collection-card > span.amber {
  background: #fff4db;
  color: #9b681c;
}

.collection-card > span.violet {
  background: #f1edff;
  color: #6e55bd;
}

.collection-card-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #075fd8, #148cf5);
  color: white;
}

.collection-card-primary > span {
  background: rgba(255, 255, 255, 0.17);
  color: white;
}

.collection-card div {
  min-width: 0;
}

.collection-card p,
.collection-card strong,
.collection-card small {
  display: block;
  margin: 0;
}

.collection-card p {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.collection-card strong {
  margin-top: 2px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.2;
}

.collection-card small {
  margin-top: 3px;
  color: #8194a4;
  font-size: 7px;
}

.collection-card-primary p,
.collection-card-primary small {
  color: rgba(255, 255, 255, 0.76);
}

.collection-card-primary strong {
  color: white;
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: 14px;
  margin-top: 14px;
}

.ledger-card,
.finance-side-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.finance-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid #e6eef4;
}

.finance-card-heading h3,
.finance-card-heading p {
  margin: 0;
}

.finance-card-heading h3 {
  color: var(--navy);
  font-size: 14px;
}

.finance-card-heading > span {
  padding: 5px 8px;
  border-radius: 99px;
  background: #f0f5f8;
  color: #728797;
  font-size: 8px;
  font-weight: 800;
}

.ledger-scroll {
  overflow-x: auto;
}

.ledger-scroll:focus-visible {
  outline: 3px solid rgba(23, 137, 247, 0.25);
  outline-offset: -3px;
}

.ledger-scroll table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.ledger-scroll th,
.ledger-scroll td {
  padding: 12px 13px;
  border-bottom: 1px solid #edf2f5;
  color: #556d80;
  font-size: 8px;
  text-align: left;
}

.ledger-scroll th {
  background: #f7fafc;
  color: #7890a2;
  font-weight: 800;
  text-transform: uppercase;
}

.ledger-scroll tbody tr:last-child td {
  border-bottom: 0;
}

.ledger-patient strong,
.ledger-patient small {
  display: block;
}

.ledger-patient strong {
  color: var(--ink);
  font-size: 9px;
}

.ledger-patient small {
  margin-top: 2px;
  color: #8a9cab;
  font-size: 7px;
}

.ledger-amount {
  color: var(--ink);
  font-weight: 800;
}

.ledger-pending {
  color: #a56b16;
  font-weight: 850;
}

.ledger-pending.clear {
  color: #1a825f;
}

.payment-status {
  display: inline-flex;
  padding: 5px 7px;
  border-radius: 99px;
  background: #fff4dc;
  color: #95651d;
  font-size: 7px;
  font-weight: 850;
}

.payment-status.paid {
  background: #e8f8f1;
  color: #187b5b;
}

.payment-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.method-list,
.pending-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.method-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 8px;
}

.method-row > span:first-child {
  color: #5f7588;
  font-weight: 750;
}

.method-row b {
  color: var(--navy);
  font-size: 8px;
}

.method-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #eaf0f4;
}

.method-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1689eb, #4fb2ff);
}

.centre-collection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}

.centre-collection div {
  padding: 10px;
  border-radius: 10px;
  background: #f4f8fb;
}

.centre-collection small,
.centre-collection strong {
  display: block;
}

.centre-collection small {
  color: #758b9d;
  font-size: 7px;
}

.centre-collection strong {
  margin-top: 3px;
  color: var(--blue);
  font-size: 10px;
}

.pending-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid #f0e2c3;
  border-radius: 11px;
  background: #fffaf0;
}

.pending-card strong,
.pending-card small {
  display: block;
}

.pending-card strong {
  color: var(--ink);
  font-size: 9px;
}

.pending-card small {
  margin-top: 2px;
  color: #8c806a;
  font-size: 7px;
}

.pending-card b {
  display: block;
  margin-top: 4px;
  color: #9c681b;
  font-size: 10px;
}

.record-due-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #cfe2f4;
  border-radius: 8px;
  background: white;
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
}

.empty-ledger-note {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.payment-modal form {
  padding: 28px;
}

.payment-modal label {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: #587087;
  font-size: 11px;
  font-weight: 700;
}

.payment-modal input,
.payment-modal select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f9fbfd;
  color: var(--ink);
}

.payment-due-preview {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #d8e8f5;
  border-radius: 11px;
  background: #f2f8fd;
  color: #5e7689;
  font-size: 9px;
}

.payment-due-preview strong {
  color: var(--blue);
}

@media (max-width: 1180px) {
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .payment-side {
    grid-template-columns: 1fr;
  }

  .payment-heading-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 500px) {
  .payment-panel {
    padding: 18px;
  }

  .collection-grid {
    grid-template-columns: 1fr;
  }

  .payment-heading-actions {
    display: grid;
  }

  .payment-heading-actions .button {
    width: 100%;
  }

  .centre-collection {
    grid-template-columns: 1fr;
  }
}
