* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: #f1f5f9;
  color: #1e293b;
  padding: 0; /* Menghilangkan margin/padding luar agar menyatu penuh di iframe */
  margin: 0;
  width: 100%;
  overflow-x: hidden;
}

/* SAMAKAN LEBAR KONTAINER UTAMA DENGAN CORPORATE (FULL WIDTH) */
.main-container,
.dashboard-container,
.main-content,
.container {
  width: 100% !important;
  max-width: 100% !important; /* Menghilangkan pembatas 1400px */
  padding: 16px 20px !important; /* Padding pas sejajar dengan Corporate */
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* HEADER COMPACT (SEBARIS SEPERTI CORPORATE) */
.top-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  width: 100%;
}

.navbar-group {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.nav-tab {
  background: transparent;
  color: #64748b;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-tab:hover {
  background: #f1f5f9;
  color: #2563eb;
}

.nav-tab.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.title-card-compact {
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  width: 100%;
}

.title-card-compact h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.title-card-compact p {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.filters-group-flex {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.filter-box select {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  width: 100%;
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.5px;
}

.stat-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: #2563eb;
  margin: 8px 0 4px 0;
}

.stat-sub {
  font-size: 12px;
  color: #94a3b8;
}

.dashboard-section { display: none; width: 100%; }
.dashboard-section.active-section { display: block; }

/* KARTU CHART FULL LEBAR */
.chart-card-clean {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  color: #0f172a;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 15px;
}

.chart-legend-box {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #475569;
}

.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-box-blue { width: 12px; height: 12px; background: #3b82f6; border-radius: 2px; }
.legend-box-orange { width: 12px; height: 12px; background: #f97316; border-radius: 2px; }
.legend-box-gray { width: 12px; height: 12px; background: #94a3b8; border-radius: 2px; }

.chart-wrapper-canvas { position: relative; height: 440px; width: 100%; overflow: hidden; }

.content-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  width: 100%;
}

.table-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.badge-count {
  background: #f1f5f9;
  color: #2563eb;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
}

.table-responsive { width: 100%; overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

tr:hover td { background: #f8fafc; }

td:last-child {
  white-space: nowrap;
}

.action-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-del {
  background: #dc2626;
  color: #ffffff;
}

.btn-del:hover {
  background: #b91c1c;
}

.btn-sec { background: #e2e8f0; color: #334155; border: none; padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 13px; cursor: pointer; }

.arrow-icon-sep {
  color: #64748b;
  font-size: 0.75rem;
}

.datepicker-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.datepicker-wrapper .icon-calendar {
  position: absolute;
  left: 8px;
  color: #2563eb;
  font-size: 0.8rem;
  z-index: 2;
  pointer-events: none;
}

.datepicker-input {
  padding-left: 26px !important;
  padding-right: 6px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  color: #1e293b !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  width: 140px !important;
  height: 32px;
}

.compact-select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  height: 32px;
  max-width: 130px;
}

/* MODAL POP-UP STYLES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
}

.modal-header h3 {
  font-size: 16px;
  color: #0f172a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.form-group input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.form-group input:focus {
  border-color: #2563eb;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}

.btn-edit {
  background: #2563eb;
  color: #ffffff;
  margin-right: 0 !important;
}

.btn-edit:hover {
  background: #1d4ed8;
}

/* =========================================================
   PENGATURAN SCROLL & UTILS UNTUK INTEGRASI IFRAME DASHBOARD
   ========================================================= */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow-y: auto !important; /* Membiarkan konten mengalir mulus tanpa scrollbar ganda */
}