/* ===========================
   TRANSACTION HISTORY STYLES
   =========================== */

:root {
  --primary-color: #34004d;
  --secondary-color: #f3893f;
  --black-color: black;
  --white-color: white;
  --very-bold: 700;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: var(--primary-color);
}

.darkMode {
  --primary-color: #000;
  --secondary-color: #f3893f;
  --black-color: white;
  --white-color: #34004d;
  --very-bold: 700;
}

html {
    min-height: 100vh;
}

main {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* 🔥 stretch to left */
    width: 100%;
    min-height: 100vh;
    background-color: rgba(239, 237, 237, 0.575);
    padding: 20px;
    gap: 20px;
}


.dashboard{
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-panel {
  width: 100%;
  padding: 0px 20px;
  background-color: var(--white-color);
}

.save-btn {
    margin-top: 25px;
}


.dashboard-panel .head {
  font-weight: 700;
  height: 50px;
  display: flex;
  align-items: center;
}

.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.transaction {
  width: 95%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.transaction-panel {
  width: 100%;
  padding: 0px 20px;
  background-color: var(--white-color);
}

.transaction-panel .head {
  font-weight: 700;
  height: 50px;
  display: flex;
  align-items: center;
}

.transactions-filter {
  width: 100%;
  background-color: var(--white-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

#transaction-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}

#transaction-filter-form .form-group {
  width: 100%;
  max-width: 250px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#transaction-filter-form label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary-color);
}

#transaction-filter-form select,
#transaction-filter-form input[type="date"] {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: var(--secondary-color) !important;
}

#transaction-filter-form option {
  color: #34004d !important;
}

#transaction-filter-form button.save-btn {
  background-color: var(--secondary-color);
  color: #fff !important;
  font-weight: 600;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
}

.transaction-history {
  background-color: var(--white-color);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#history-placeholder > p {
    color: #34004d !important;
}
.transaction-card {
  border-left: 5px solid #ccc;
  padding: 15px;
  border-radius: 8px;
  background-color: #f4e1ff;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.transaction-card.success {
  border-left-color: #28a745;
}
.transaction-card.failed {
  border-left-color: #dc3545;
}
.transaction-card.pending {
  border-left-color: #ffc107;
}

.transaction-card .top-line {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  flex-wrap: wrap;
}

.transaction-card .meta {
  font-size: 0.85rem;
  color: var(--black-color);
}

#notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--white-color);
  z-index: 9999;
  display: none;
}


#transaction-filter-form button.save-btn:hover {
    scale: 1.03; 
}

#notification.success {
  background-color: #28a745;
}
#notification.danger {
  background-color: #dc3545;
}

@media screen and (max-width: 768px) {
  #transaction-filter-form {
    flex-direction: column;
    align-items: stretch;
  }
  #transaction-filter-form .form-group {
    max-width: 100%;
  }
  #transaction-filter-form button.save-btn {
    max-width: 100%;
  }
  .transaction-card .top-line {
    flex-direction: column;
    gap: 5px;
  }
  
.save-btn {
    margin-top: 0;
}
}


.transaction-table {
  background-color: #000;
  padding: 20px;
  border-radius: 10px;
  overflow-x: scroll;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.transaction-table .table-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff !important;
  margin-bottom: 10px;
}

.transaction-table table {
      overflow: scroll;
      background: #f1f1f1;
}

.transaction-table thead {
  background-color: #f3893f !important;
  border-radius: 10px;
}

.transaction-table th {
  padding: 12px 10px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
    min-width: 100px;
    background-color: #f3893f !important;
}

.transaction-table td {
  padding: 12px 10px;
  text-align: left;
  font-size: 0.85rem;
  color: #000;
  min-width: 100px;
}
.transaction-table tbody tr {
 background-color: #fefefe;
  border-bottom: 1px solid #34004d;
}

.transaction-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.download-btn {
    border: none;
    padding: 10px;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    background: #000;
    border-radius: 5px;
}

.status,
.status.success,
.status.pending,
.status.failed{
    width: 100%;
    padding: 10px;
    max-width: fit-content;
}
.success {
  color: #28a745;
  font-weight: 600;
}
.status.failed {
  color: #dc3545;
  font-weight: 600;
}
.status.pending {
  color: #ffc107;
  font-weight: 600;
}
.text-center {
  text-align: center;
  font-size: 0.95rem;
  color: var(--primary-color);
}

.receipt-container {
    padding: 2rem;
    color: var(--white-color) !important;
    background: var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    font-family: sans-serif;
}
.receipt-container * {
    color: var(--white-color) !important;
}
.receipt-container h2 { text-align: center; margin-bottom: 1rem; }
.receipt-item { margin-bottom: 1rem; display: flex; justify-content: space-between; }
.receipt-label { font-weight: bold; }

.btn-print {
    display: inline-block;
    padding: 10px 20px;
    color: #fff  !important;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: var(--secondary-color);
}

#transaction-title {
    color: #fff;
    font-size: 23px;
    font-weight: 900;
    margin-bottom: 20px;
}

#day-showing-page .transaction-table {
    all: unset;
    width: 100%;
}

#day-showing-page table {
    width: 100%;
}

#network-tabs {
    width: fit-content; 
    margin: auto;
}

.network-btn {
    height: 50px;
    max-width: 120px;
    margin-right: 12px;
    padding: 10px 12px;
    margin-bottom: 20px;
}

.network-btn:last-child {
    margin-right: 0;
}

.network-btn.active {
    color: #fff;
    background-color: #F3893F;
}

@media (max-width: 575px) {
    .network-btn {
        height: 50px;
            max-width: unset;
        padding: 10px !important;
        width: 100%; /* make each button full-width inside grid cell */
        font-size: 14px;
    }

    #network-tabs {
        width: 90%;
        margin: auto;
        display: grid;
        grid-gap: 15px;
        grid-template-columns: 1fr 1fr;
    }

    #day-showing-page .transaction-table {
        overflow-x: auto;
    }

    #day-showing-page .transaction-table table {
        width: 100%;
        min-width: 600px; /* force horizontal scroll if table too wide */
        border-collapse: collapse;
    }

    #day-showing-page .transaction-table thead {
        background: #f8f9fa;
        position: sticky !important;
        top: 0;
        z-index: 1;
    }
}
