@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background-color: #F4F7FB; color: #334155; font-size: 14px; }
.header { background-color: #19325B; color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.header-line { height: 4px; background-color: #C6A868; }
.header-left { display: flex; align-items: center; gap: 15px; }
.logo-circle { width: 45px; height: 45px; min-width: 45px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; display: flex; justify-content: center; align-items: center; }
.logo-circle svg { width: 24px; height: 24px; }
.header-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 2px; }
.header-subtitle { font-size: 0.85rem; color: #cbd5e1; }
.container { max-width: 1350px; margin: 25px auto; padding: 0 15px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 25px; }
.stat-card { background: white; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; display: flex; flex-direction: column; }
.stat-title { font-size: 0.8rem; font-weight: 700; color: #64748b; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 2.5rem; font-weight: 800; color: #1e293b; margin-bottom: 20px; }
.stat-details { margin-top: auto; }
.stat-row { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; color: #475569; }
.stat-num { font-weight: 700; color: #0f172a; }

.chart-card { position: relative; }
.chart-title { font-weight: 600; margin-bottom: 5px; color: #334155; font-size: 0.95rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.chart-title small { font-size: 0.7rem; color: #94a3b8; font-weight: 400; }
.chart-container { position: relative; height: 150px; width: 100%; display: flex; justify-content: center; }
canvas { cursor: pointer; max-width: 100%; }

.table-card { background: white; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.table-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.controls-left, .controls-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; width: 100%; }
@media(min-width: 768px) {
  .controls-left, .controls-right { width: auto; }
}
.form-input, .form-select { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.9rem; outline: none; color: #334155; width: 100%; }
@media(min-width: 768px) {
  .form-input { width: 250px; }
  .form-select { width: auto; }
}
.form-input:focus, .form-select:focus { border-color: #2563eb; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 0.9rem; cursor: pointer; border: none; transition: 0.2s; white-space: nowrap; }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.4); color: white; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-excel { background: #059669; color: white; }
.btn-excel:hover { background: #047857; }
.btn-pdf { background: #DC2626; color: white; }
.btn-pdf:hover { background: #B91C1C; }
.btn-primary { background: #19325B; color: white; }
.btn-primary:hover { background: #112240; }
.btn-warning { background: #d97706; color: white; }
.btn-warning:hover { background: #b45309; }
.btn-danger { background: #ef4444; color: white; padding: 4px 8px; font-size: 0.8rem; }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #f1f5f9; }
th { color: #475569; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
td { color: #334155; font-size: 0.9rem; }
td strong { color: #0f172a; font-weight: 600; }

.pagination-info { font-size: 0.85rem; color: #64748b; margin-top: 20px; margin-bottom: 10px; }
.pagination-container { display: flex; flex-wrap: wrap; gap: 5px; }
.page-btn { padding: 6px 12px; border: 1px solid #e2e8f0; background: white; color: #475569; border-radius: 4px; cursor: pointer; font-size: 0.85rem; transition: 0.2s; }
.page-btn:hover { background: #f1f5f9; }
.page-btn.active { background: #19325B; color: white; border-color: #19325B; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; padding: 15px; }
.modal-content { background: white; width: 100%; max-width: 400px; border-radius: 10px; padding: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.1rem; color: #0f172a; }
.close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #94a3b8; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 0.85rem; font-weight: 600; color: #475569; }
.form-group .form-input, .form-group .form-select { width: 100%; }

/* BADGES FOR ACTIVE FILTERS */
.filter-badges { display: flex; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.badge { background-color: #C6A868; color: #19325B; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.badge-close { cursor: pointer; font-size: 1.2rem; line-height: 1; transition: 0.2s; }
.badge-close:hover { color: white; transform: scale(1.1); }

/* --- RESPONSIVE MEDIA QUERIES UNTUK HP (MOBILE FIRST & BREAKPOINTS) --- */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .header {
    padding: 12px 15px;
    flex-direction: column;
    align-items: flex-start;
  }
  .header-right {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .stat-value {
    font-size: 2rem;
    margin-bottom: 10px;
  }
  .container {
    padding: 0 10px;
    margin: 15px auto;
  }
  .table-card {
    padding: 12px;
  }
  .controls-left, .controls-right {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .form-input {
    width: 100% !important;
  }
  .btn {
    width: 100%;
  }
}

@media print {
    body { background: white; }
    .header, .stats-grid, .table-controls, .pagination-info, .pagination-container, .filter-badges { display: none; }
    .table-card { box-shadow: none; border: none; padding: 0; }
}
