@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* 1. KUNCI SCROLLBAR VERTIKAL (Agar Tampilan Tidak Bergeser saat Filter Data) */
html {
  overflow-y: scroll;
}

:root {
  --primary: #4f46e5;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-sub: #64748b;
  --p1-color: #0284c7;
  --p2-color: #8b5cf6;
}

/* 2. RESET GLOBAL & LAYOUT FULL SCREEN */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  width: 100%;
  min-height: 100vh;
}

.container,
.main-container,
.app-container,
.dashboard-container,
.content-wrapper {
  max-width: 100% !important;
  width: 100% !important;
  padding: 20px 24px !important;
  margin: 0 !important;
}

/* NAVBAR TABS */
.navbar-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 8px;
  margin-bottom: 24px;
  width: 100%;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-tab {
  background: transparent;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.nav-tab.active {
  background: var(--primary);
  color: #ffffff;
}

.nav-tab-highlight.active {
  background: #059669;
}

.badge-tab-count {
  background: #ecfdf5;
  color: #059669;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.nav-tab.active .badge-tab-count {
  background: #ffffff;
  color: #059669;
}

/* TAB CONTENT */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* CARDS & STAT BOXES */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.exec-stat-grid,
.pm-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
}

.stat-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-sub);
  text-transform: uppercase;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.stat-unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
}

.stat-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
  margin: 4px 0 0 0;
}

/* KOMPARASI CARDS */
.komparasi-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.p-card-p1 { border-top: 4px solid var(--p1-color); }
.p-card-p2 { border-top: 4px solid var(--p2-color); }

.p-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.p-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.p-title h4 { margin: 0; font-size: 1rem; font-weight: 800; }
.dot-p1 { width: 10px; height: 10px; background: var(--p1-color); border-radius: 50%; }
.dot-p2 { width: 10px; height: 10px; background: var(--p2-color); border-radius: 50%; }

.badge-p-count {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
}
.p1-badge { background: #e0f2fe; color: #0369a1; }
.p2-badge { background: #f3e8ff; color: #6b21a8; }

.p-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.p-metric-box {
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}

.p-metric-label { font-size: 0.72rem; color: var(--text-sub); font-weight: 700; display: block; }
.p-metric-value { font-size: 1.25rem; font-weight: 800; display: block; }
.p-metric-sub { font-size: 0.7rem; color: var(--text-sub); }

.p-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.82rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 14px;
}

.p-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.p-info-item span { color: var(--text-sub); font-weight: 600; }
.p-info-item strong { font-weight: 800; color: var(--text-main); text-align: right; }

.charts-grid-exec {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.chart-wrapper {
  position: relative;
  height: 260px;
  width: 100%;
}

/* PM BATCH CARDS */
.pm-batch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.border-left-blue { border-left: 5px solid #0284c7; }
.border-left-purple { border-left: 5px solid #8b5cf6; }

.pm-batch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.badge-batch { padding: 4px 12px; border-radius: 20px; font-weight: 800; font-size: 0.8rem; color: white; }
.bg-blue { background: #0284c7; }
.bg-purple { background: #8b5cf6; }

.pm-list-group { display: flex; flex-direction: column; gap: 12px; }
.pm-list-item { background: #f8fafc; padding: 12px 16px; border-radius: 10px; font-size: 0.82rem; }
.pm-list-item p { margin: 4px 0 0 0; color: var(--text-sub); }
.text-danger { color: #f43f5e !important; }
.text-success { color: #10b981 !important; }

/* STYLING TABEL UTAMA (PRESISI 11 KOLOM FIXED) */
.table-card {
  padding: 20px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Toolbar Data & Tabel Detail */
.table-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 16px !important;
}

/* Sisi Kiri: Input Search */
.search-box {
  position: relative;
  flex: 1;
  max-width: 320px; /* Ukuran kotak search pas & kompak */
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.82rem;
  outline: none;
  background: #ffffff;
}

.search-box input:focus {
  border-color: #4f46e5;
}

/* Sisi Kanan: Grouping Tombol & Info Data dalam 1 Baris */
.toolbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: auto !important; /* Mendorong semua tombol rapat ke kanan */
}

.data-count-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.btn-csv {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-csv:hover {
  background: #059669;
  color: #ffffff;
}

.btn-add {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-add:hover {
  background: #4338ca;
}

/* PENGATURAN LEBAR KOLOM KHUSUS REKAP PM BACKBONE (11 KOLOM) */
.custom-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.custom-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
  padding: 12px 8px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.custom-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PENGATURAN LEBAR KOLOM REKAP PM BACKBONE (12 KOLOM PRESISI) */
.custom-table th:nth-child(1), .custom-table td:nth-child(1) { width: 40px; text-align: center; }  /* 1. NO */
.custom-table th:nth-child(2), .custom-table td:nth-child(2) { width: 95px; white-space: nowrap; } /* 2. TANGGAL */
.custom-table th:nth-child(3), .custom-table td:nth-child(3) { width: 190px; }                     /* 3. BACKBONE UPE */
.custom-table th:nth-child(4), .custom-table td:nth-child(4) { width: 100px; }                     /* 4. AREA */
.custom-table th:nth-child(5), .custom-table td:nth-child(5) { width: 100px; }                     /* 5. ID INCIDENT */
.custom-table th:nth-child(6), .custom-table td:nth-child(6) { width: 75px; text-align: center; }  /* 6. KATEGORI */
.custom-table th:nth-child(7), .custom-table td:nth-child(7) { width: 70px; text-align: center; }  /* 7. IMPACT */
.custom-table th:nth-child(8), .custom-table td:nth-child(8) { width: 200px; white-space: normal; word-break: break-word; } /* 8. DETAIL SEGMENT */
.custom-table th:nth-child(9), .custom-table td:nth-child(9) { width: 150px; white-space: normal; word-break: break-word; } /* 9. ROOTCAUSE */
.custom-table th:nth-child(10), .custom-table td:nth-child(10) { width: 150px; white-space: normal; word-break: break-word; } /* 10. TINDAK LANJUT */
.custom-table th:nth-child(11), .custom-table td:nth-child(11) { width: 90px; text-align: center; } /* 11. STATUS */
.custom-table th:nth-child(12), .custom-table td:nth-child(12) { width: 60px; text-align: center; } /* 12. AKSI */

.custom-table th:nth-child(10), .custom-table td:nth-child(10) { 
  width: 210px; 
  white-space: normal !important; 
  word-break: break-word;
} /* 10. PENYEBAB */

.custom-table th:nth-child(11), .custom-table td:nth-child(11) { 
  width: 85px; 
  text-align: center; 
} /* 11. AKSI */

/* BADGES & BUTTONS IN TABLE */
.badge-sheet {
  background: #f3e8ff;
  color: #6b21a8;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-block;
  white-space: nowrap;
}

.badge-status-done { background: #e0f2fe; color: #0369a1; } /* PORT DOWN */
.badge-status-prog { background: #fef3c7; color: #d97706; } /* UNMONITOR */
.badge-status-notyet { background: #ffe4e6; color: #e11d48; } /* FAT LOSS */

.badge-kategori {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.btn-add {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-add:hover { background: #4338ca; }

.btn-action-group {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.btn-act {
  border: none;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit { background: #e0e7ff; color: #3730a3; }
.btn-edit:hover { background: #3730a3; color: #ffffff; }

.btn-delete { background: #ffe4e6; color: #e11d48; }
.btn-delete:hover { background: #e11d48; color: #ffffff; }

/* MODAL STYLING */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-overlay.active { display: flex; }

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 650px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  animation: modalSlide 0.25s ease-out;
}

@keyframes modalSlide {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.btn-close-modal { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; color: #94a3b8; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: span 2; }
.form-group label { font-size: 0.75rem; font-weight: 700; color: #475569; }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #4f46e5; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}

.btn-cancel { background: #f1f5f9; color: #64748b; border: none; padding: 9px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.btn-save { background: #4f46e5; color: #ffffff; border: none; padding: 9px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; }

/* FILTER CONTROL STYLING */
.filter-card {
  padding: 16px 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.filter-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
}

.filter-item label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control-select {
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.form-control-select:focus {
  border-color: #4f46e5;
  background: #ffffff;
}

.filter-vs-badge {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 8px 14px;
  border-radius: 20px;
  margin-top: 18px;
}

.filter-header-mode {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
}

.filter-mode-label { font-size: 0.78rem; font-weight: 800; color: #64748b; text-transform: uppercase; }
.mode-toggle-group { display: flex; gap: 8px; }

.btn-mode {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mode.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

/* QUICK SELECTOR CARDS */
.table-quick-cards-grid {
  display: flex !important; /* Ubah dari grid ke flex */
  gap: 14px;
  overflow-x: auto; /* Aktifkan scroll horizontal */
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.q-card {
  min-width: 260px !important; /* Kunci ukuran minimal kartu agar tidak makin kecil */
  flex-shrink: 0; /* Mencegah kartu menciut */
}

/* Custom Scrollbar Tipis untuk Kartu */
.table-quick-cards-grid::-webkit-scrollbar {
  height: 6px;
}
.table-quick-cards-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.q-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.q-card:hover {
  border-color: #818cf8;
  transform: translateY(-2px);
}

.q-card.active {
  border: 2px solid #6366f1;
  background: #f5f3ff;
}

.q-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.q-card-dot { width: 8px; height: 8px; border-radius: 50%; background: #6366f1; }
.q-card-title { font-size: 0.9rem; font-weight: 800; color: var(--text-main); }
.q-card-badge { font-size: 0.68rem; font-weight: 800; background: #e0e7ff; color: #4338ca; padding: 2px 6px; border-radius: 6px; }

.q-card-check {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #6366f1;
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.q-card.active .q-card-check { display: flex; }
.q-card-sub { font-size: 0.73rem; color: var(--text-sub); margin-bottom: 8px; }
.q-card-stats { font-size: 0.73rem; font-weight: 700; color: #4f46e5; }

.date-picker-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
}

.range-input-rekap {
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-weight: 700 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  outline: none;
}

.date-picker-box select {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}

.date-picker-box select:focus { border-color: #6366f1; }

/* BADGES UNTUK PM DETAIL & AREA */
.badge-pm-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-pm-high { background: #ffe4e6; color: #e11d48; }
.badge-pm-medium { background: #fef3c7; color: #d97706; }
.badge-pm-low { background: #dcfce7; color: #15803d; }

.olt-tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.olt-tag { background: #f1f5f9; border: 1px solid #cbd5e1; color: #334155; font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; }

.badge-pm-target {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-pm-normal {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 12px;
}

.text-excel-tl {
  font-size: 0.78rem;
  font-weight: 700;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* PENGATURAN LEBAR KOLOM KHUSUS TABEL TINDAK LANJUT PM (10 KOLOM) */
.pm-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.pm-table th:nth-child(1), .pm-table td:nth-child(1) { width: 45px; text-align: center; }  /* 1. NO */
.pm-table th:nth-child(2), .pm-table td:nth-child(2) { width: 105px; } /* 2. SHEET */
.pm-table th:nth-child(3), .pm-table td:nth-child(3) { width: 120px; white-space: nowrap !important; } /* 3. TANGGAL */
.pm-table th:nth-child(4), .pm-table td:nth-child(4) { width: 240px; } /* 4. NAMA OLT */
.pm-table th:nth-child(5), .pm-table td:nth-child(5) { width: 110px; } /* 5. AREA */
.pm-table th:nth-child(6), .pm-table td:nth-child(6) { width: 70px; text-align: center; }  /* 6. TIKET */

.pm-table th:nth-child(7), .pm-table td:nth-child(7) { 
  width: 170px; 
  white-space: normal !important; 
  word-break: break-word; 
} /* 7. PENYEBAB */

.pm-table th:nth-child(8), .pm-table td:nth-child(8) { 
  width: 220px; 
  white-space: normal !important; 
  word-break: break-word; 
} /* 8. KOLOM TINDAK LANJUT (EXCEL) */

.pm-table th:nth-child(9), .pm-table td:nth-child(9) { width: 150px; } /* 9. STATUS RENCANA AKSI */
.pm-table th:nth-child(10), .pm-table td:nth-child(10) { width: 65px; text-align: center; } /* 10. AKSI */

/* =========================================================
   STYLING KARTU RINGKASAN & JADWAL BATCH PM (SAMA PERSIS REFERENSI)
   ========================================================= */

/* KARTU ATAS 1: HIJAU */
.border-green-light { border: 1.5px solid #a7f3d0 !important; border-radius: 16px !important; }
.text-green-dark { color: #065f46 !important; font-weight: 800; }
.bg-green-subtle { background: #d1fae5; }
.pct-green-capsule { background: #d1fae5; color: #065f46; font-weight: 800; font-size: 0.78rem; padding: 5px 12px; border-radius: 20px; }

/* KARTU ATAS 2 & BATCH 1: BIRU CYAN */
.border-cyan-light { border: 1.5px solid #a5f3fc !important; border-radius: 16px !important; }
.border-cyan-full { border: 1.5px solid #a5f3fc !important; border-radius: 16px !important; }
.text-cyan-dark { color: #0e7490 !important; }
.text-cyan-title { color: #0f172a !important; font-weight: 800; font-size: 1.05rem; margin: 0; }
.bg-cyan-subtle { background: #cff4fc; }
.bg-cyan-dark-fill { background: #0891b2; color: #ffffff; }
.pct-cyan-capsule { background: #cff4fc; color: #0e7490; font-weight: 800; font-size: 0.78rem; padding: 5px 12px; border-radius: 20px; }

/* KARTU ATAS 3 & BATCH 2: UNGU */
.border-purple-light { border: 1.5px solid #e9d5ff !important; border-radius: 16px !important; }
.border-purple-full { border: 1.5px solid #e9d5ff !important; border-radius: 16px !important; }
.text-purple-dark { color: #7e22ce !important; }
.text-purple-title { color: #0f172a !important; font-weight: 800; font-size: 1.05rem; margin: 0; }
.bg-purple-subtle { background: #f3e8ff; }
.bg-purple-dark-fill { background: #9333ea; color: #ffffff; }
.pct-purple-capsule { background: #f3e8ff; color: #7e22ce; font-weight: 800; font-size: 0.78rem; padding: 5px 12px; border-radius: 20px; }
.badge-priority-purple { color: #7e22ce; font-weight: 800; font-size: 0.75rem; }

/* KARTU ATAS 4: SLATE / GRAY */
.border-slate-light { border: 1.5px solid #e2e8f0 !important; border-radius: 16px !important; }
.text-slate-dark { color: #334155 !important; }
.bg-slate-subtle { background: #f1f5f9; }
.pct-slate-capsule { background: #f1f5f9; color: #334155; font-weight: 800; font-size: 0.78rem; padding: 5px 12px; border-radius: 20px; }

/* HEADER BATCH TITLE GROUP */
.pm-batch-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pm-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

/* STYLING KARTU RINGKASAN PM CLEAN & PRESISI */
.pm-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: #ffffff !important;
  padding: 16px 18px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 16px !important;
}

/* Header Atas: Judul Kiri & Ikon Kecil Kanan */
.stat-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 12px !important;
  background: transparent !important;
}

.stat-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* Kotak Ikon Kanan Atas Pas Kecil */
.stat-icon-box {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  flex-shrink: 0;
}

/* Angka Utama & Badge Sejajar */
.stat-body {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  margin-bottom: 8px !important;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

.stat-unit {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}

.pct-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 16px;
}

.stat-foot {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  margin: 0;
}

/* SKEMA WARNA KARTU */
/* Hijau */
.border-green-light { border: 1.5px solid #a7f3d0 !important; }
.text-green-dark { color: #065f46 !important; }
.bg-green-subtle { background: #d1fae5 !important; }

/* Biru Cyan */
.border-cyan-light { border: 1.5px solid #a5f3fc !important; }
.text-cyan-dark { color: #0e7490 !important; }
.bg-cyan-subtle { background: #cff4fc !important; }

/* Ungu */
.border-purple-light { border: 1.5px solid #e9d5ff !important; }
.text-purple-dark { color: #7e22ce !important; }
.bg-purple-subtle { background: #f3e8ff !important; }

/* Slate / Gray */
.border-slate-light { border: 1.5px solid #e2e8f0 !important; }
.text-slate-dark { color: #334155 !important; }
.bg-slate-subtle { background: #f1f5f9 !important; }

/* Penyesuaian Alignment & Layout Tabel Backbone */
.custom-table th {
  white-space: nowrap;
  padding: 12px 10px;
}

.custom-table td:last-child,
.custom-table th:last-child {
  text-align: center !important;
}

.btn-action-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

/* =========================================================
   TAMBAHAN STYLING FLATPICKR RANGE PICKER & PRESET BUTTONS (v2)
   ========================================================= */

/* Container Date Picker Side-by-Side */
.range-picker-container {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.range-input {
  flex: 1;
  background: #ffffff !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
}

.preset-select {
  width: 170px;
  background: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 10px;
}

.btn-preset-chip {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-chip:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

/* Kustomisasi tampilan input Flatpickr */
.flatpickr-input[readonly] {
  cursor: pointer;
  background-color: #ffffff !important;
}

/* =========================================================
   STYLING KARTU MATRIKS PROGRES PER WILAYAH (2 KOLOM OLT STYLE)
   ========================================================= */
.area-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.area-progress-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.area-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.area-title-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.area-title-group h5 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.area-total-lokasi {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.area-badge-pct {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
}

/* Skema Warna Badge Persentase */
.pct-green { background: #d1fae5; color: #065f46; }
.pct-orange { background: #fef3c7; color: #b45309; }
.pct-red { background: #ffe4e6; color: #be123c; }

/* Progress Bar Track & Fill */
.area-progress-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.area-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

.fill-green { background: #10b981; }
.fill-orange { background: #f59e0b; }
.fill-red { background: #f43f5e; }

/* Footer Insiden Selesai & Pending */
.area-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.foot-done { color: #10b981; display: flex; align-items: center; gap: 5px; }
.foot-pending { color: #f43f5e; display: flex; align-items: center; gap: 5px; }
.foot-pending.text-muted { color: #94a3b8; }

body.dark {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}
body.dark .card, 
body.dark .content-card,
body.dark .table-card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* =========================================================
   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 */
}