/*!
 * Riwayat Deposit / Penarikan — rapi + responsive.
 */

.riwayat-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.75rem 0.85rem 2rem;
}

/* ---- Tabs ---- */
.riwayat-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
}

.riwayat-tabs__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 0.4rem;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #fff !important;
  border: 1px solid rgba(254, 216, 4, 0.35);
  background: transparent;
  min-height: 3rem;
}

.riwayat-tabs__item img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.riwayat-tabs__item:hover {
  color: #000 !important;
  background: rgba(254, 216, 4, 0.85);
  border-color: rgb(254, 216, 4);
  text-decoration: none !important;
}

.riwayat-tabs__item:hover img,
.riwayat-tabs__item.is-active img {
  filter: brightness(0);
}

.riwayat-tabs__item.is-active {
  color: #000 !important;
  background: rgb(254, 216, 4);
  border-color: rgb(254, 216, 4);
}

@media (min-width: 480px) {
  .riwayat-tabs__item {
    font-size: 0.82rem;
  }
}

/* ---- Filter ---- */
.riwayat-filter {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 0.85rem;
  margin: 0 0 1rem;
}

.riwayat-filter__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .riwayat-filter__grid {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}

.riwayat-filter__field label {
  display: block;
  margin: 0 0 0.35rem;
  color: #bbb;
  font-size: 0.8rem;
  font-weight: 600;
}

.riwayat-filter .form-control {
  background: #1e1e1e;
  border: 1px solid #3a3a3a;
  color: #fff;
  border-radius: 6px;
  min-height: 2.5rem;
  font-size: 0.9rem;
}

.riwayat-filter .form-control:focus {
  background: #222;
  border-color: rgb(254, 216, 4);
  color: #fff;
  box-shadow: 0 0 0 0.15rem rgba(254, 216, 4, 0.25);
}

.riwayat-filter__btn {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 1.25rem;
  border: 0;
  border-radius: 6px;
  background: rgb(254, 216, 4);
  color: #000;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.riwayat-filter__btn:hover {
  background: #ffe44a;
}

/* ---- Mobile cards ---- */
.riwayat-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.riwayat-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 0.85rem 0.95rem;
}

.riwayat-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.riwayat-card__code {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fefb00;
  word-break: break-all;
}

.riwayat-card__amount {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.riwayat-card__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.riwayat-card__meta dt {
  color: #888;
  margin: 0;
}

.riwayat-card__meta dd {
  color: #ddd;
  margin: 0;
  word-break: break-word;
}

.riwayat-empty {
  text-align: center;
  color: #888;
  padding: 1.5rem 1rem;
  background: #141414;
  border: 1px dashed #333;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Status badges */
.riwayat-status {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.riwayat-status--proses {
  background: rgba(255, 193, 7, 0.18);
  color: #ffc107;
}

.riwayat-status--selesai {
  background: rgba(40, 167, 69, 0.18);
  color: #5cd67a;
}

.riwayat-status--batal {
  background: rgba(220, 53, 69, 0.18);
  color: #ff6b7a;
}

.riwayat-status--lain {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
}

/* ---- Desktop table ---- */
.riwayat-table-wrap {
  display: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}

.riwayat-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #121212;
}

.riwayat-table thead th {
  background: #1a1a1a;
  color: #fefb00;
  font-weight: 700;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #333;
  white-space: nowrap;
}

.riwayat-table tbody td {
  color: #ddd;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #222;
  vertical-align: middle;
}

.riwayat-table tbody tr:last-child td {
  border-bottom: 0;
}

.riwayat-table tbody tr:hover td {
  background: #1a1a1a;
}

.riwayat-table .col-code {
  color: #fefb00;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.riwayat-table .col-amount {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .riwayat-cards {
    display: none;
  }

  .riwayat-table-wrap {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .riwayat-table-wrap {
    display: none;
  }

  .riwayat-cards {
    display: flex;
  }
}
