/* --- UMUM --- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f2f2f2;
  color: #333;
  overflow-x: hidden;
}

header {
  background: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header img {
  height: 50px;
}

header h1 {
  font-size: 1.2rem;
  margin: 0;
  color: #ed078c;
}

/* --- FILTER BOX --- */
.filter-box {
  background-color: #24ace3;
  color: white;
  padding: 20px;
  border-radius: 6px;
  margin: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.filter-box label {
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}

.filter-box input,
.filter-box select {
  width: 100%;
  padding: 6px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* --- BUTANG TINDAKAN --- */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 8px 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: #24ace3;
  color: white;
}

.btn-secondary {
  background-color: #ed078c;
  color: white;
}

/* --- STATISTIK --- */
.statistik-container {
  margin: 10px;
  background: #fff;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* --- JADUAL --- */
.table-container {
  margin: 10px;
}

.table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 6px;
  padding: 10px;
  max-width: 100%;
}

#data-table,
#statistikTable {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
}

#data-table th,
#data-table td,
#statistikTable th,
#statistikTable td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#data-table th,
#statistikTable th {
  background: #ffc107;
  white-space: nowrap;
}

#statistikTable thead th {
  position: sticky;
  top: 0;
  background: #ffc107;
  z-index: 1;
}

/* --- PAGINATION --- */
.pagination {
  text-align: center;
  margin: 15px 5px;
  flex-wrap: wrap;
}

.pagination button {
  background: #ed078c;
  color: white;
  border: none;
  padding: 6px 10px;
  margin: 2px;
  border-radius: 4px;
  cursor: pointer;
}

.pagination button.active {
  background: #24ace3;
}

/* --- LOADING --- */
#loading {
  text-align: center;
  color: #555;
  font-style: italic;
  padding: 20px;
}

/* --- RESPONSIF --- */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  header h1 {
    font-size: 1rem;
  }

  .filter-box {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .logo-container img {
    height: 40px;
  }

  .logo-container h1 {
    font-size: 1rem;
    margin-top: 5px;
  }
}

#statistikTable tbody tr.total-row {
  background: #f5f5f5;
}
#statistikTable tbody tr.total-row td {
  font-weight: 600;
}

