:root {
  --sidebar-width: 250px;
  --header-height: 60px;
  --primary: #fbc02d;
  --dark: #121212;
  --dark-light: #1a1a1a;
  --text-light: #e6e6e6;
  --text-grey: #aaaaaa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--dark);
  color: var(--text-light);
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background: var(--dark-light);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.logo {
  text-align: center;
  padding: 20px;
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  border-bottom: 1px solid #2c2c2c;
  margin-bottom: 20px;
}

.nav-links {
  list-style: none;
  padding: 0 15px;
}

.nav-links li a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  text-decoration: none;
  color: var(--text-light);
  border-radius: 5px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: rgba(251, 192, 45, 0.1);
  color: var(--primary);
}

.nav-links li a i {
  margin-right: 10px;
  font-size: 18px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: all 0.3s ease;
}

/* Header Styles */
header {
  background: var(--dark-light);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #2c2c2c;
}

.header-left h1 {
  font-size: 20px;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-info img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-right: 10px;
  background: var(--primary);
  padding: 5px;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-light);
  margin-left: 15px;
  cursor: pointer;
  font-size: 16px;
}

/* Content Area */
.content-area {
  padding: 20px;
}

/* Dashboard Styles */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--dark-light);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(251, 192, 45, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.stat-icon i {
  font-size: 24px;
  color: var(--primary);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  color: var(--text-grey);
  font-size: 14px;
}

/* Table Styles */
.section-title {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title a {
  color: var(--text-grey);
  font-size: 14px;
  text-decoration: none;
}

.table-container {
  background: var(--dark-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: rgba(251, 192, 45, 0.1);
}

th, td {
  padding: 12px 15px;
  text-align: left;
}

th {
  color: var(--primary);
  font-weight: 600;
}

tbody tr {
  border-bottom: 1px solid #2c2c2c;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.status {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.status.success {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

.status.pending {
  background: rgba(255, 152, 0, 0.2);
  color: #FF9800;
}

.status.failed {
  background: rgba(244, 67, 54, 0.2);
  color: #F44336;
}

.status.refunded {
  background: rgba(33, 150, 243, 0.2);
  color: #2196F3;
}

/* Form Styles */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-title {
  font-size: 24px;
  color: var(--primary);
}

.btn {
  background: var(--primary);
  color: var(--dark);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.btn i {
  margin-right: 8px;
}

.btn:hover {
  opacity: 0.9;
}

.form-container {
  background: var(--dark-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: none; /* Hidden by default */
}

.form-container.active {
  display: block;
}

.form-title {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-grey);
}

.form-control {
  width: 100%;
  padding: 10px;
  background: #2c2c2c;
  border: 1px solid #444;
  border-radius: 5px;
  color: var(--text-light);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-secondary {
  background: #444;
  color: var(--text-light);
}

.action-buttons {
  display: flex;
  gap: 5px;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
}

.action-btn.edit {
  color: #4CAF50;
}

.action-btn.delete {
  color: #F44336;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

.status-badge.inactive {
  background: rgba(244, 67, 54, 0.2);
  color: #F44336;
}

/* Modal Styles */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
z-index: 1000;
justify-content: center;
align-items: center;
}

.modal-content {
background: var(--dark-light);
border-radius: 10px;
padding: 30px;
width: 90%;
max-width: 600px;
position: relative;
box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.close-btn {
position: absolute;
top: 15px;
right: 15px;
font-size: 24px;
color: var(--text-grey);
cursor: pointer;
transition: color 0.3s;
}

.close-btn:hover {
color: var(--primary);
}

.modal-title {
font-size: 24px;
color: var(--primary);
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #2c2c2c;
}

/* Styles for Transaction Filters */
.transaction-filters-container {
display: flex;
gap: 10px; /* Jarak antar tombol */
margin-bottom: 20px; /* Jarak antara filter dan tabel */
margin-top: 15px; /* Jarak antara judul dan filter */
justify-content: flex-start; /* Rata kiri */
flex-wrap: wrap; /* Agar tombol wrap ke bawah di layar kecil */
}

.transaction-filters-container .filter-btn {
padding: 10px 20px;
border: 1px solid #444; /* Border sedikit lebih gelap */
border-radius: 8px; /* Rounded corners */
background-color: #333; /* Warna latar belakang default */
color: #eee; /* Warna teks */
cursor: pointer;
transition: all 0.2s ease-in-out;
font-size: 1rem;
display: flex; /* Untuk ikon dan teks sejajar */
align-items: center;
gap: 8px; /* Jarak antara ikon dan teks */
}

.transaction-filters-container .filter-btn:hover {
background-color: #555; /* Warna hover */
border-color: #666;
}

.transaction-filters-container .filter-btn.active {
background-color: #ffc107; /* Warna aktif (kuning, seperti tombol Anda) */
color: #333; /* Teks gelap untuk warna kuning */
border-color: #ffc107;
font-weight: bold;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Styles for Data Table Toolbar (Show entries, Search, Filter) */
.table-toolbar {
display: flex;
justify-content: space-between; /* Pushes left and right sections apart */
align-items: center;
margin-bottom: 20px;
flex-wrap: wrap; /* Allow wrapping on smaller screens */
gap: 15px; /* Space between the two main sections if they wrap */
background-color: #2b2b2b;
padding: 15px 20px;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.data-options-left {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0; /* Prevent it from shrinking */
}

.data-options-left label {
font-weight: bold;
color: #eee;
white-space: nowrap;
}

/* Small form control for 'Show entries' select */
.form-control-sm {
padding: 5px 8px; /* Smaller padding */
border: 1px solid #555;
border-radius: 5px;
background-color: #3a3a3a;
color: #eee;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23eeeeee%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13%205.1L150.2%20186%20101.4%2063.1c-1.5-2.7-4.1-4.7-7.4-5.3h-0.2c-3.7-.6-7.5%201.2-9.6%204.3l-130%20227.4c-2.1%203.7-2.1%208.4%200%2012.1s5.9%206.4%2010.5%206.4H282c4.6%200%208.4-2.7%2010.5-6.4s2.1-8.4%200-12.1L287%2069.4z%22%2F%3E%3C%2Fsvg%3E');
background-repeat: no-repeat;
background-position: right 5px top 50%; /* Adjusted position for smaller size */
background-size: 10px auto; /* Smaller arrow */
font-size: 0.9em; /* Smaller font size */
height: 32px; /* Fixed height for consistency */
width: auto; /* Allow content to dictate width */
min-width: 60px; /* Minimum width for select */
}


.data-options-right {
display: flex;
gap: 15px; /* <-- PERUBAHAN DI SINI: dari 100px menjadi 15px */
align-items: center;
flex-grow: 1; /* Allows it to take up remaining space */
justify-content: flex-end; /* Pushes content to the right */
}

.search-box {
position: relative;
flex-grow: 1;
max-width: 250px; /* Adjusted max width for search input */
}

.search-box input[type="text"] {
padding: 8px 35px 8px 12px;
border: 1px solid #555;
border-radius: 5px;
background-color: #3a3a3a;
color: #eee;
width: 100%; /* Ensure it fills max-width */
}

.search-box .search-icon {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
color: #aaa;
pointer-events: none;
}

.filter-btn-primary {
background-color: #007bff; /* Blue filter button */
color: white;
padding: 10px 15px;
border-radius: 5px;
border: none;
cursor: pointer;
transition: background-color 0.2s ease;
display: flex;
align-items: center;
gap: 8px;
white-space: nowrap; /* Prevent button text from wrapping */
}

.filter-btn-primary:hover {
background-color: #0056b3;
}


/* Styles for Pagination Controls (aligned to center below table) */
.pagination-controls {
display: flex;
justify-content: center; /* Center horizontally */
align-items: center;
margin-top: 20px;
gap: 10px;
padding: 10px;
background-color: #2b2b2b; /* Same background as toolbar */
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.btn-pagination {
padding: 8px 15px;
border: 1px solid #555;
border-radius: 5px;
background-color: #3a3a3a;
color: #eee;
cursor: pointer;
transition: all 0.2s ease-in-out;
display: flex;
align-items: center;
gap: 5px;
}

.btn-pagination:hover:not(:disabled) {
background-color: #555;
border-color: #666;
}

.btn-pagination:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.page-numbers {
display: flex;
gap: 5px;
align-items: center;
}

.page-numbers .page-number-btn {
padding: 8px 12px;
border: 1px solid #555;
border-radius: 5px;
background-color: #3a3a3a;
color: #eee;
cursor: pointer;
transition: all 0.2s ease-in-out;
}

.page-numbers .page-number-btn:hover:not(.active) {
background-color: #555;
border-color: #666;
}

.page-numbers .page-number-btn.active {
background-color: #ffc107; /* Your accent color */
color: #333; /* Dark text for active button */
border-color: #ffc107;
font-weight: bold;
}

.page-numbers span {
color: #ccc;
font-weight: bold;
margin: 0 5px;
}


/* Styles for Modals (ensure these are consistent for all modals) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1000; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
justify-content: center; /* Center horizontally */
align-items: center; /* Center vertically */
}

.modal-content {
background-color: #333;
margin: auto;
padding: 30px;
border: 1px solid #555;
width: 90%;
max-width: 500px; /* Max width for modal content */
border-radius: 10px;
position: relative;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
color: #eee;
max-height: 85vh; /* Batasi tinggi modal maksimal 85% dari tinggi layar */
overflow-y: auto;
}

.modal-title {
color: #ffc107;
margin-bottom: 20px;
text-align: center;
}

.modal .close-btn {
color: #aaa;
font-size: 28px;
font-weight: bold;
position: absolute;
right: 15px;
top: 10px;
cursor: pointer;
}

.modal .close-btn:hover,
.modal .close-btn:focus {
color: #fff;
text-decoration: none;
cursor: pointer;
}

.form-group {
margin-bottom: 15px;
}

.form-group label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #ccc;
}

.form-control {
width: calc(100% - 20px);
padding: 10px;
margin-bottom: 5px; /* Adjust margin if needed */
border: 1px solid #555;
border-radius: 5px;
background-color: #444;
color: #eee;
font-size: 1rem;
}

.form-control:focus {
border-color: #ffc107;
outline: none;
box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.form-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 20px;
}

.btn {
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
transform: translateY(-1px);
}

.btn-primary, .btn[type="submit"] {
background-color: #ffc107;
color: #333;
}

.btn-primary:hover, .btn[type="submit"]:hover {
background-color: #e0a800;
}

.btn-secondary {
background-color: #6c757d;
color: white;
}

.btn-secondary:hover {
background-color: #5a6268;
}

/* For form-grid in user modal */
.form-grid {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
}

@media (min-width: 600px) {
.form-grid {
    grid-template-columns: 1fr 1fr; /* Two columns on larger screens */
}
}

/* Responsive adjustments for toolbar */
@media (max-width: 768px) {
.table-toolbar {
    flex-direction: column;
    align-items: flex-start;
}
.data-options-left {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 10px; /* Add some space when stacked */
}
.data-options-left select {
    flex-grow: 1;
}
.data-options-right {
    width: 100%;
    flex-direction: column; /* Stack search and filter vertically */
    align-items: flex-start;
}
.search-box {
    width: 100%;
    max-width: none;
}
.filter-btn-primary {
    width: 100%;
    justify-content: center;
}
.pagination-controls {
    flex-wrap: wrap;
}
}
