.payments-content {
  padding-top: 26px;
}

.payments-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.payments-top h1,
.payments-top p,
.payments-top small {
  margin: 0;
}

.payments-top h1 {
  font-size: 30px;
}

.payments-top p {
  margin-top: 8px;
  font-weight: 800;
}

.payments-top span,
.payments-top small {
  color: var(--muted);
}

.payments-top small {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.payments-actions {
  display: flex;
  gap: 14px;
}

.payments-actions button,
.payments-filter button,
.payments-table td button,
.table-footer button,
.table-footer select {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
}

.payments-actions button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  height: 42px;
  padding: 0 18px;
}

.payments-actions b {
  font-size: 12px;
}

.payment-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.payment-stats article {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 128px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23, 44, 39, 0.05);
}

.payment-stats article > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
}

.payment-stats p,
.payment-stats small {
  margin: 0;
}

.payment-stats p {
  color: #4f5e59;
  font-weight: 800;
}

.payment-stats strong {
  display: block;
  margin: 10px 0 12px;
  font-size: 24px;
}

.payment-stats small {
  font-weight: 800;
}

.payment-stats .up {
  color: var(--green);
}

.payment-stats .down {
  color: #e34b5b;
}

.payments-filter {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.1fr auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
}

.payments-filter label > span {
  position: relative;
  display: block;
}

.payments-filter input,
.payments-filter select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  outline: 0;
}

.payments-filter input {
  padding: 0 42px 0 14px;
}

.payments-filter select {
  padding: 0 14px;
}

.payments-filter label > span i {
  position: absolute;
  right: 12px;
  top: 11px;
  color: var(--muted);
}

.payments-filter button {
  height: 42px;
  padding: 0 22px;
  color: var(--green);
  border-color: rgba(15, 159, 99, 0.42);
}

.payments-table {
  padding: 0;
  overflow: hidden;
}

.payment-tabs {
  display: flex;
  gap: 34px;
  align-items: center;
  height: 62px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.payment-tabs button {
  position: relative;
  height: 100%;
  border: 0;
  color: #4f5e59;
  background: transparent;
  font-weight: 800;
}

.payment-tabs button.active {
  color: var(--green);
}

.payment-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--green);
}

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

.payments-table table {
  min-width: 1280px;
}

.payments-table th {
  background: #fbfcfc;
}

.payments-table td,
.payments-table th {
  padding: 18px 20px;
  vertical-align: middle;
}

.payments-table td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.method {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 250px;
}

.pay-logo {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  font-style: normal;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1;
}

.pay-logo.bca {
  color: #0f63b7;
  background: #eef6ff;
}

.pay-logo.ovo {
  color: #fff;
  background: #6542b9;
}

.pay-logo.mandiri {
  color: #163f95;
  background: #fff9da;
}

.pay-logo.mandiri::after {
  content: "";
  display: block;
  width: 24px;
  height: 4px;
  margin-top: 2px;
  border-radius: 999px;
  background: #f6c100;
}

.pay-logo.shopee {
  color: #fff;
  background: #fb6530;
  font-size: 16px;
}

.pay-logo.cod {
  color: #263530;
  background: #f2f4f4;
  border: 1px solid #d9dfdd;
}

.pay-logo.qris {
  color: #111;
  background: #fff;
  border: 1px solid #dce2df;
}

.pay-logo.dana {
  color: #fff;
  background: #2087e8;
}

.payments-table td em {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 7px;
  font-style: normal;
  font-weight: 900;
}

.payments-table td em::before {
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}

.paid-status {
  color: var(--green);
  background: #eaf9f2;
}

.paid-status::before {
  content: "";
  border: 1px solid var(--green);
}

.pending-status {
  color: #b47a00;
  background: #fff4d8;
}

.pending-status::before {
  content: "!";
  border: 1px solid #e6a928;
}

.cancel-status {
  color: #e34b5b;
  background: #ffe9ee;
}

.cancel-status::before {
  content: "x";
  border: 1px solid #e34b5b;
}

.expired-status {
  color: #68726e;
  background: #eef2f2;
}

.expired-status::before {
  content: "i";
  border: 1px solid #9ca7a3;
}

.countdown {
  color: #ef3d4c !important;
  font-weight: 800;
}

.payments-table td:last-child {
  display: flex;
  gap: 14px;
  align-items: center;
}

.payments-table td button {
  height: 38px;
  padding: 0 16px;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.table-footer p {
  margin: 0;
  color: #4f5e59;
}

.table-footer div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.table-footer button,
.table-footer select {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
}

.table-footer button.active {
  color: #fff;
  background: var(--green);
}

@media (max-width: 1400px) {
  .payment-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .payments-filter {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .payments-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .payments-actions {
    width: 100%;
    flex-direction: column;
  }

  .payments-actions button {
    justify-content: center;
  }

  .payment-stats,
  .payments-filter {
    grid-template-columns: 1fr;
  }

  .payment-tabs {
    overflow-x: auto;
    gap: 18px;
  }

  /* Rows per page footer — scroll horizontal */
  .table-footer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    white-space: nowrap;
  }
  .table-footer::-webkit-scrollbar { display: none; }
  .table-footer p { flex-shrink: 0; }
  .table-footer div {
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-items: center;
  }
}
