:root {
  --primary: #4f46e5;          /* Indigo Modern */
  --primary-hover: #4338ca;
  --bg: #f8fafc;               /* Slate Light BG */
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --success-bg: #ecfdf5;
  --success-text: #047857;
  --success-border: #10b981;

  --danger-bg: #fff1f2;
  --danger-text: #be123c;
  --danger-border: #f43f5e;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; }
body { background-color: var(--bg); color: var(--text-main); padding: 24px; }
.container { max-width: 1300px; margin: 0 auto; }

/* Cards Styling */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03);
}

/* Header & Filter Section */
.filter-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-header i {
  font-size: 1.2rem;
  color: var(--primary);
  background: #eef2ff;
  padding: 10px;
  border-radius: 10px;
}

.filter-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Filter Cards Layout */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.status-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--card-bg);
  position: relative;
  overflow: hidden;
}

.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.status-card.active {
  border: 2px solid var(--primary);
  background: #f5f3ff;
}

.status-card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.status-card-header strong {
  margin-right: auto;
  color: var(--text-main);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-purple { background-color: var(--primary); }
.dot-green { background-color: var(--success-border); }
.dot-red { background-color: var(--danger-border); }

.check-icon {
  color: #fff;
  background: var(--primary);
  padding: 4px;
  border-radius: 50%;
  font-size: 0.65rem;
}

.badge-percent {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}
.badge-green { background: var(--success-bg); color: var(--success-text); }
.badge-red { background: var(--danger-bg); color: var(--danger-text); }

.status-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.status-stat {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Toolbar & Action Area */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 420px;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.88rem;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s;
}

.search-box input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 5px;
}

/* Buttons UI */
.btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-outline {
  background: white;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: #f1f5f9;
}

.btn-icon {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-muted);
}
.btn-icon:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

/* Table Design */
.table-responsive {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
  background: white;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background-color: #f8fafc;
}

.olt-text {
  font-weight: 600;
  color: var(--text-main);
}

.cause-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e0e7ff;
  color: #3730a3;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.cause-tag.red {
  background: #ffe4e6;
  color: #9f1239;
}

/* Status Badges */
.badge-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.72rem;
  display: inline-block;
}

.status-done {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.status-notyet {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

/* Form Styles */
.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

input, select, textarea {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  background: #f8fafc;
}

input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-group {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.badge-kategori {
  display: inline-block;
  background: #e0e7ff;
  color: #3730a3;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* 1. Mengunci Tata Letak Tabel agar Kolom Tidak Bergeser */
table {
  table-layout: fixed !important;
  width: 100%;
}

/* 2. Menentukan Lebar Presisi untuk Setiap Kolom (Total 100%) */
th:nth-child(1), td:nth-child(1) { width: 4%; text-align: center; } /* NO */
th:nth-child(2), td:nth-child(2) { width: 9%; }                     /* TANGGAL */
th:nth-child(3), td:nth-child(3) { width: 22%; }                    /* PERANGKAT OLT */
th:nth-child(4), td:nth-child(4) { width: 10%; }                    /* AREA */
th:nth-child(5), td:nth-child(5) { width: 6%; }                     /* TIKET */
th:nth-child(6), td:nth-child(6) { width: 10%; }                    /* ID INCIDENT */
th:nth-child(7), td:nth-child(7) { width: 7%; }                     /* KATEGORI */
th:nth-child(8), td:nth-child(8) { width: 14%; }                    /* PENYEBAB */
th:nth-child(9), td:nth-child(9) { width: 11%; }                    /* RENCANA TINDAK LANJUT */
th:nth-child(10), td:nth-child(10) { width: 8%; text-align: center; }/* STATUS */
th:nth-child(11), td:nth-child(11) { width: 7%; text-align: center; }/* AKSI */

/* 3. Menangani Teks Panjang agar Rapi dan Tidak Merusak Kolom */
td {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 4. Menjaga Posisi Scrollbar Browser Tetap Stabil */
html {
  overflow-y: visible;
}

html,
body {
  overflow-x: hidden;
  overflow-y: visible !important;
}

/* Layout Grid Chart Dashboard */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
}

.chart-card.span-2 { grid-column: span 2; }
.chart-card.span-3 { grid-column: span 3; }

.chart-header {
  margin-bottom: 15px;
}

.chart-header h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-header h4 i {
  color: var(--primary);
}

.chart-wrapper {
  position: relative;
  height: 220px;
  width: 100%;
}

.chart-wrapper-h {
  position: relative;
  height: 200px;
  width: 100%;
}

@media (max-width: 992px) {
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card.span-2, .chart-card.span-3 { grid-column: span 1; }
}

/* Penyesuaian Tinggi Chart & Padding Teks */
.chart-wrapper {
  position: relative;
  height: 250px; /* Ditambah tinggi kontainernya */
  width: 100%;
}

.chart-wrapper-h {
  position: relative;
  height: 240px;
  width: 100%;
}

/* Layout Ringkasan Detail di Bawah Donut Chart */
.chart-details-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  text-align: center;
}

.detail-item {
  flex: 1;
}

.detail-count {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.detail-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.detail-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-color);
}

.text-green { color: #10b981; }
.text-orange { color: #f59e0b; }
.text-red { color: #f43f5e; }

/* Mengoptimalkan Kontainer Chart Agar Responsif & Mengisi Kartu dengan Pas */
.chart-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between;
  height: 100%; /* Memaksa tinggi kartu penuh */
}

/* Mengatur tinggi canvas area chart agar proposional */
.chart-wrapper {
  position: relative;
  flex: 1;
  min-height: 280px; /* Menambah tinggi grafik agar mengisi area kosong bawah */
  width: 100%;
}

/* Styling Responsive Grid Chart 2x2 */
/* Layout Chart Grid Modern & Proporsional */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr); /* Menggunakan 12 Grid System */
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  margin-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between;
  height: 100%;
}

/* Pembagian Span Kolom Grid */
.col-4 { grid-column: span 4; } /* 1/3 Lebar Layar (Donut Chart) */
.col-8 { grid-column: span 8; } /* 2/3 Lebar Layar (Sebaran Wilayah - Sangat Luas) */
.col-6 { grid-column: span 6; } /* 1/2 Lebar Layar (Samping-Sampingan) */

.chart-wrapper {
  position: relative;
  height: 280px;
  width: 100%;
}

@media (max-width: 992px) {
  .charts-grid {
    display: flex;
    flex-direction: column;
  }
  .col-4, .col-8, .col-6 {
    width: 100%;
  }
}

/* Navigation Bar & Tab Styling */
.navbar-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.nav-tabs {
  display: flex;
  gap: 10px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab i {
  font-size: 1rem;
}

.nav-tab:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.nav-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Hide / Show Content Tab */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Layout Tab Content */
.tab-content {
  display: none;
  width: 100%;
}

.tab-content.active {
  display: block;
}

/* Pastikan Navbar dan Filter Tersusun Vertikal */
.navbar-card, .filter-card {
  width: 100%;
  clear: both;
}

/* Stat Box Atas Tab Penyebab (4 Kolom) */
.cause-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

.stat-box {
  padding: 16px;
  margin-bottom: 0 !important;
}

.stat-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.stat-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.stat-icon {
  font-size: 1.1rem;
}

.stat-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-unit {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  border-top: 1px dashed var(--border-color);
  padding-top: 6px;
}

/* Colors & Borders */
.border-orange { border-top: 3px solid #f97316 !important; }
.border-pink { border-top: 3px solid #ec4899 !important; }
.border-purple { border-top: 3px solid #a855f7 !important; }
.border-blue { border-top: 3px solid #0284c7 !important; }

.badge-orange { background: #fff7ed; color: #c2410c; }
.badge-pink { background: #fdf2f8; color: #be185d; }
.badge-purple { background: #faf5ff; color: #6b21a8; }
.badge-blue { background: #f0f9ff; color: #0369a1; }

.text-orange { color: #f97316; }
.text-pink { color: #ec4899; }
.text-purple { color: #a855f7; }
.text-blue { color: #0284c7; }

/* Executive Summary Stat Cards Styling */
.exec-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.exec-card {
  padding: 16px 18px;
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 16px;
}

.exec-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.exec-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.03em;
  line-height: 1.3;
  max-width: 80%;
}

.exec-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.exec-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.exec-num-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.exec-num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.exec-unit {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.exec-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.exec-sub {
  font-size: 0.73rem;
  font-weight: 600;
  color: #94a3b8;
  margin: 0;
}

/* Color Styles */
.border-left-green { border-left: 4px solid #10b981; }
.border-left-red { border-left: 4px solid #f43f5e; }
.border-left-blue { border-left: 4px solid #3b82f6; }

.bg-light-green { background: #e6f4ea; }
.bg-light-red { background: #fce8e6; }
.bg-light-blue { background: #e8f0fe; }
.bg-light-purple { background: #f1f3fe; color: #4338ca; }

.bg-solid-green { background: #10b981; color: #ffffff; }
.bg-solid-red { background: #f43f5e; color: #ffffff; }

.text-green { color: #10b981; }
.text-red { color: #f43f5e; }
.text-blue { color: #2563eb; }
.text-dark-blue { color: #1e3a8a; }

@media (max-width: 1200px) {
  .exec-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .exec-stat-grid { grid-template-columns: 1fr; }
}

/* Header Badge Badges/Pill Indicator */
.chart-header {
  display: flex !important;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.chart-header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-status i {
  font-size: 0.5rem;
}

.badge-status-done {
  background: #e6f4ea;
  color: #10b981;
}

.badge-status-prog {
  background: #fef3c7;
  color: #d97706;
}

.badge-status-notyet {
  background: #ffe4e6;
  color: #f43f5e;
}

/* Pembatasan Ukuran Kontainer Grafik */
.chart-card {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between;
  overflow: hidden; /* Mencegah elemen melimpah keluar kartu */
}

.chart-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  margin-bottom: 12px;
  width: 100%;
}

.chart-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 280px; /* Menentukan tinggi pasti canvas */
  flex: 1;
}

/* Layout Chart Grid Exec (2 Kolom Seimbang Samping-Sampingan) */
.charts-grid-exec {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px;
  margin-bottom: 24px;
}

/* Memastikan Donut Chart Tampil Proporsional */
.donut-wrapper {
  height: 220px !important;
}

.chart-details-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  margin-top: 8px;
}

.detail-item {
  text-align: center;
}

.detail-count {
  font-size: 0.95rem;
  font-weight: 800;
}

.detail-sub {
  font-size: 0.72rem;
  font-weight: 600;
}

.detail-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
}

@media (max-width: 992px) {
  .charts-grid-exec {
    grid-template-columns: 1fr !important;
  }
}

/* Penyesuaian agar iframe rekap-pm tampil rapi tanpa bentrok scroll */
body {
  background-color: var(--bg);
  color: var(--text-main);
  padding: 16px 24px; /* Padding luar di dalam iframe */
  margin: 0;
}

.container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Memastikan Semua Grid Memanfaatkan Lebar Baru secara Optimal */
.exec-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 18px !important;
  margin-bottom: 20px !important;
  width: 100% !important;
}

.charts-grid-exec, 
.charts-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
  width: 100% !important;
}

/* Menyesuaikan Tinggi Chart agar Proporsional Saat Layar Melebar */
.chart-wrapper {
  position: relative;
  width: 100%;
  height: 320px !important; /* Menambah sedikit tinggi agar chart makin lega */
  flex: 1;
}

.donut-wrapper {
  height: 240px !important;
}

/* Styling Matriks Progres Penyelesaian per Wilayah Area */
.progress-area-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.area-progress-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.area-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.area-title-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.area-title-group h5 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
}

.area-title-group .area-total-lokasi {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.area-badge-pct {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
}

/* Kustomisasi Warna Badge Persentase */
.pct-green { background: #e6f4ea; color: #059669; }
.pct-orange { background: #fef3c7; color: #d97706; }
.pct-red { background: #ffe4e6; color: #e11d48; }

/* Styling Progress Bar */
.area-progress-track {
  width: 100%;
  height: 8px;
  background-color: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.area-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease-in-out;
}

.fill-green { background-color: #10b981; }
.fill-orange { background-color: #f59e0b; }
.fill-red { background-color: #f43f5e; }

/* Stat Footer Kartu Area (Selesai vs Pending Tiket) */
.area-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.foot-done {
  color: #059669;
  display: flex;
  align-items: center;
  gap: 5px;
}

.foot-pending {
  color: #e11d48;
  display: flex;
  align-items: center;
  gap: 5px;
}

.foot-pending.text-muted {
  color: #94a3b8 !important;
}

@media (max-width: 992px) {
  .progress-area-grid {
    grid-template-columns: 1fr;
  }
}

/* Memaksa Grid Chart Tab 1 dan Tab 2 Berada dalam 2 Kolom Samping-Sampingan */
.charts-grid-exec {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
  width: 100% !important;
  margin-bottom: 24px;
}

/* Penyesuaian Tinggi Khusus Donut Chart agar presisi dengan detail grid di bawahnya */
.donut-wrapper {
  height: 190px !important;
}

/* Detail Grid di bawah Proporsi Doughnut Chart */
#propGamasDetails {
  display: flex !important;
  justify-content: space-around !important;
  align-items: center !important;
  padding-top: 8px !important;
  border-top: 1px dashed var(--border-color);
  margin-top: 6px !important;
}

#propGamasDetails .detail-item {
  flex: 1;
  text-align: center;
  padding: 0 2px;
}

/* Menyamakan Ukuran Kotak Kartu Statistik di Semua Tab */
.exec-stat-grid,
.cause-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
  width: 100% !important;
}

.exec-card,
.stat-box {
  min-height: 145px !important; /* Mengunci tinggi minimal yang sama */
  height: 100% !important;
  padding: 18px 20px !important; /* Menyeragamkan padding dalam */
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* Penyelarasan Font & Style Kartu Statistik Tab 1 & Tab 2 */

/* 1. Header Judul Kartu */
.exec-title,
.stat-title {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  color: #64748b !important;
  text-transform: uppercase !important;
}

/* 2. Angka Utama */
.exec-num,
.stat-num {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* 3. Satuan Teks (Lokasi / Tiket) */
.exec-unit,
.stat-unit {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
}

/* 4. Teks Sub-deskripsi */
.exec-sub,
.stat-sub {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  margin: 4px 0 0 0 !important;
}

/* 5. Badge Persentase / Label Kanan */
.exec-badge,
.badge-percent {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 20px !important;
}

/* Styling Modal Overlay Pop-Up */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;

  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;

  opacity: 0;
  pointer-events: none;

  transition: all 0.25s ease;
  box-sizing: border-box;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 24px;
  transform: translateY(20px);
  transition: all 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.modal-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.navbar-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

/* Kesejajaran Tampilan Tab & Link */
.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none; /* Hilangkan garis bawah elemen <a> */
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.nav-tab.active {
  background: #eff6ff;
  color: #2563eb;
}

/* Pemisah Antara Link Halaman & Tab Internal */
.nav-divider {
  width: 1px;
  height: 24px;
  background-color: #e2e8f0;
  margin: 0 4px;
}

/* Warna Khusus Tombol Gangguan OLT */
.nav-link-external {
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.nav-link-external:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

/* =========================================================
   DARK MODE — REKAP TINDAK LANJUT PM
   PLN ENTERPRISE NAVY
   KHUSUS TAMPILAN
   ========================================================= */

html body.dark {
  --primary: #3b82f6;
  --primary-hover: #2563eb;

  --bg: #0b1220;
  --card-bg: #111c2e;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --border-color: #26354a;

  --success-bg: #153827;
  --success-text: #4ade80;
  --success-border: #10b981;

  --danger-bg: #3a1d25;
  --danger-text: #f87171;
  --danger-border: #f43f5e;

  color-scheme: dark;

  background-color: #0b1220 !important;
  color: #f8fafc !important;
}

/* =========================
   BACKGROUND
   ========================= */

html body.dark,
html body.dark .container,
html body.dark .tab-content {
  background-color: #0b1220 !important;
  color: #f8fafc !important;
}

/* =========================
   NAVBAR TAB
   ========================= */

html body.dark .navbar-card {
  background: #0f172a !important;
  border: 1px solid #26354a !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.22) !important;
}

html body.dark .nav-tab {
  background: transparent !important;
  color: #94a3b8 !important;
  border-color: transparent !important;
}

html body.dark .nav-tab:hover {
  background: #172338 !important;
  color: #e2e8f0 !important;
}

html body.dark .nav-tab.active {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 12px rgba(37,99,235,.25) !important;
}

html body.dark .nav-tab.active i {
  color: #fff !important;
}

html body.dark .nav-link-external {
  background: #172338 !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

html body.dark .nav-link-external:hover {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #3b82f6 !important;
}

html body.dark .nav-divider {
  background: #334155 !important;
}

/* =========================
   SEMUA CARD
   ========================= */

html body.dark .card,
html body.dark .exec-card,
html body.dark .stat-box,
html body.dark .chart-card,
html body.dark .filter-card,
html body.dark .table-card,
html body.dark .visual-card,
html body.dark .content-card {
  background: #111c2e !important;
  color: #f8fafc !important;
  border-color: #26354a !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.24) !important;
}

/* =========================
   TEXT UTAMA
   ========================= */

html body.dark h1,
html body.dark h2,
html body.dark h3,
html body.dark h4,
html body.dark h5,
html body.dark h6 {
  color: #f8fafc !important;
}

html body.dark .exec-title,
html body.dark .stat-title {
  color: #94a3b8 !important;
}

html body.dark .exec-num,
html body.dark .stat-num {
  color: #f8fafc !important;
}

html body.dark .exec-unit,
html body.dark .stat-unit {
  color: #94a3b8 !important;
}

html body.dark .exec-sub,
html body.dark .stat-sub {
  color: #94a3b8 !important;
}

html body.dark .stat-status {
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

html body.dark .subtitle,
html body.dark .detail-sub {
  color: #94a3b8 !important;
}

/* =========================
   WARNA STATUS
   ========================= */

html body.dark .text-green {
  color: #4ade80 !important;
}

html body.dark .text-red {
  color: #f87171 !important;
}

html body.dark .text-blue {
  color: #60a5fa !important;
}

html body.dark .text-dark-blue {
  color: #93c5fd !important;
}

html body.dark .text-orange {
  color: #fbbf24 !important;
}

html body.dark .text-pink {
  color: #f472b6 !important;
}

html body.dark .text-purple {
  color: #c084fc !important;
}

/* =========================
   EXEC BADGE
   ========================= */

html body.dark .bg-light-green {
  background: #153827 !important;
}

html body.dark .bg-light-red {
  background: #3a1d25 !important;
}

html body.dark .bg-light-blue {
  background: #172d45 !important;
}

html body.dark .bg-light-purple {
  background: #2d2140 !important;
  color: #c084fc !important;
}

html body.dark .bg-solid-green {
  background: #10b981 !important;
  color: #fff !important;
}

html body.dark .bg-solid-red {
  background: #f43f5e !important;
  color: #fff !important;
}

/* =========================
   STATUS BADGE
   ========================= */

html body.dark .badge-status-done {
  background: #153827 !important;
  color: #4ade80 !important;
}

html body.dark .badge-status-prog {
  background: #3a2d12 !important;
  color: #fbbf24 !important;
}

html body.dark .badge-status-notyet {
  background: #3a1d25 !important;
  color: #f87171 !important;
}

html body.dark .badge-green {
  background: #153827 !important;
  color: #4ade80 !important;
}

html body.dark .badge-red {
  background: #3a1d25 !important;
  color: #f87171 !important;
}

html body.dark .badge-orange {
  background: #3a2d12 !important;
  color: #fbbf24 !important;
}

html body.dark .badge-pink {
  background: #381b2b !important;
  color: #f472b6 !important;
}

html body.dark .badge-purple {
  background: #2d2140 !important;
  color: #c084fc !important;
}

html body.dark .badge-blue {
  background: #172d45 !important;
  color: #60a5fa !important;
}

/* =========================
   FILTER STATUS CARD
   ========================= */

html body.dark .status-card {
  background: #0f1929 !important;
  border-color: #2b3b52 !important;
  color: #f8fafc !important;
}

html body.dark .status-card.active {
  background: #142b49 !important;
  border-color: #3b82f6 !important;
}

html body.dark .status-card-header strong {
  color: #f8fafc !important;
}

html body.dark .status-desc {
  color: #94a3b8 !important;
}

html body.dark .status-stat {
  color: #cbd5e1 !important;
}

/* =========================
   SEARCH
   ========================= */

html body.dark .search-box {
  background: #0f1929 !important;
}

html body.dark .search-box input,
html body.dark .toolbar .search-box input {
  background: #0f1929 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html body.dark .search-box input::placeholder {
  color: #64748b !important;
}

html body.dark .search-box input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.10) !important;
}

/* =========================
   DATE FILTER
   ========================= */

html body.dark .date-filter-box {
  background: #111c2e !important;
  border-color: #334155 !important;
}

html body.dark .date-filter-box i {
  color: #60a5fa !important;
}

/* =========================
   INPUT
   ========================= */

html body.dark input,
html body.dark select,
html body.dark textarea,
html body.dark .form-control {
  background: #172338 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html body.dark input::placeholder,
html body.dark textarea::placeholder {
  color: #64748b !important;
}

html body.dark option {
  background: #172338 !important;
  color: #f8fafc !important;
}

html body.dark input:focus,
html body.dark select:focus,
html body.dark textarea:focus {
  background: #172338 !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.10) !important;
}

/* =========================
   TABLE
   ========================= */

html body.dark .table-responsive,
html body.dark table {
  background: #111c2e !important;
  border-color: #26354a !important;
}

html body.dark th {
  background: #172338 !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

html body.dark td {
  background: #111c2e !important;
  color: #cbd5e1 !important;
  border-color: #26354a !important;
}

html body.dark table tbody tr:hover td {
  background: #172338 !important;
}

/* Inline color dari JS */
html body.dark table td[style*="color: #6b7280"],
html body.dark table td[style*="color:#6b7280"] {
  color: #94a3b8 !important;
}

html body.dark table td[style*="color: #374151"],
html body.dark table td[style*="color:#374151"] {
  color: #cbd5e1 !important;
}

html body.dark table td[style*="color: #2563eb"],
html body.dark table td[style*="color:#2563eb"] {
  color: #60a5fa !important;
}

/* =========================
   CATEGORY
   ========================= */

html body.dark .cause-tag {
  background: #25345a !important;
  color: #a5b4fc !important;
}

html body.dark .cause-tag.red {
  background: #3a1d25 !important;
  color: #f87171 !important;
}

html body.dark .badge-kategori {
  background: #25345a !important;
  color: #a5b4fc !important;
}

/* =========================
   AREA PROGRESS
   ========================= */

html body.dark .area-progress-card {
  background: #111c2e !important;
  border-color: #26354a !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.20) !important;
}

html body.dark .area-title-group h5 {
  color: #f8fafc !important;
}

html body.dark .area-title-group .area-total-lokasi {
  color: #94a3b8 !important;
}

html body.dark .pct-green {
  background: #153827 !important;
  color: #4ade80 !important;
}

html body.dark .pct-orange {
  background: #3a2d12 !important;
  color: #fbbf24 !important;
}

html body.dark .pct-red {
  background: #3a1d25 !important;
  color: #f87171 !important;
}

html body.dark .area-progress-track {
  background: #26354a !important;
}

html body.dark .foot-done {
  color: #4ade80 !important;
}

html body.dark .foot-pending {
  color: #f87171 !important;
}

/* =========================
   MODAL
   ========================= */

html body.dark .modal-overlay {
  background: rgba(2,8,23,.72) !important;
}

html body.dark .modal-card {
  background: #111c2e !important;
  color: #f8fafc !important;
  border: 1px solid #26354a !important;
  box-shadow: 0 24px 50px rgba(0,0,0,.45) !important;
}

html body.dark .modal-header {
  border-color: #26354a !important;
}

html body.dark .modal-header h4 {
  color: #f8fafc !important;
}

html body.dark .modal-close {
  color: #94a3b8 !important;
}

html body.dark .modal-close:hover {
  color: #fff !important;
}

html body.dark .modal-footer {
  border-color: #26354a !important;
}

/* =========================
   BUTTON
   ========================= */

html body.dark .btn-primary {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #3b82f6 !important;
}

html body.dark .btn-primary:hover {
  background: #3b82f6 !important;
}

html body.dark .btn-outline,
html body.dark .btn-icon {
  background: #172338 !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

html body.dark .btn-outline:hover,
html body.dark .btn-icon:hover {
  background: #24344c !important;
  color: #fff !important;
}

/* =========================
   FLATPICKR
   ========================= */

html body.dark .flatpickr-calendar {
  background: #111c2e !important;
  border-color: #334155 !important;
  box-shadow: 0 16px 30px rgba(0,0,0,.35) !important;
}

html body.dark .flatpickr-months,
html body.dark .flatpickr-month,
html body.dark .flatpickr-weekdays,
html body.dark .flatpickr-weekday {
  background: #111c2e !important;
  color: #cbd5e1 !important;
  fill: #cbd5e1 !important;
}

html body.dark .flatpickr-day {
  color: #cbd5e1 !important;
}

html body.dark .flatpickr-day:hover {
  background: #24344c !important;
  border-color: #24344c !important;
}

html body.dark .flatpickr-day.today {
  border-color: #3b82f6 !important;
}

html body.dark .flatpickr-day.selected,
html body.dark .flatpickr-day.startRange,
html body.dark .flatpickr-day.endRange {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

html body.dark .flatpickr-day.inRange {
  background: #172d45 !important;
  border-color: #172d45 !important;
  box-shadow:
    -5px 0 0 #172d45,
    5px 0 0 #172d45 !important;
}

/* =========================
   SCROLLBAR
   ========================= */

html body.dark::-webkit-scrollbar,
html body.dark *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html body.dark::-webkit-scrollbar-track,
html body.dark *::-webkit-scrollbar-track {
  background: #0b1220;
}

html body.dark::-webkit-scrollbar-thumb,
html body.dark *::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}

html body.dark::-webkit-scrollbar-thumb:hover,
html body.dark *::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* =========================================================
   SAMAKAN LEBAR SCROLLBAR LIGHT & DARK
   AGAR LAYOUT TIDAK BERGESER
   ========================================================= */

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

