.animate-enter { animation: chartMorph 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
@keyframes chartMorph { 0% { opacity: 0; transform: translateY(15px); } 100% { opacity: 1; transform: translateY(0); } }
.smooth-transition { transition: opacity 0.3s ease, transform 0.3s ease; }
.fade-out { opacity: 0; transform: scale(0.98); pointer-events: none; }

.dashboard-layout { display: flex; flex-direction: column; width: 100% !important; padding: 0 var(--padding-x) !important; margin: 0; }

/* FILTER BAR */
.header-row { 
    position: sticky !important; top: calc(var(--topbar-tinggi) + var(--topbar-jarak-atas)) !important; 
    background: var(--bg-body) !important; z-index: 1000; width: 100%;
    display: flex; justify-content: space-between; align-items: center; 
    flex-wrap: wrap; gap: 10px; padding: 15px 0 10px 0 !important; margin: 0 !important;
}

.filter-box { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 50px; height: 36px; display: inline-flex; align-items: center; transition: 0.2s; padding: 0; min-width: 120px; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.filter-box:hover { box-shadow: 0 4px 8px rgba(48, 82, 138, 0.06); border-color: #cbd5e1; }
.filter-box .custom-multiselect { width: 100%; height: 100%; display: flex; }
.filter-box .multiselect-header { background: transparent; border: none; height: 100%; width: 100%; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #475569; font-weight: 700; font-size: 0.8rem; cursor: pointer; }
.filter-box .multiselect-header i { font-size: 0.8rem; }

.tab-btn { justify-content: center; font-weight: 700; font-size: 0.8rem; color: #64748b; padding: 0 18px; cursor: pointer; transition: all 0.3s ease; min-width: 110px;}
.tab-btn.active { background: var(--tirta-blue); color: #ffffff; border-color: var(--tirta-blue); box-shadow: 0 4px 12px rgba(48, 82, 138, 0.2); }
.tab-btn i.icon-tab { color: var(--tirta-blue); transition: all 0.3s ease; }
.tab-btn.active i.icon-tab { color: #ffffff; }

.search-box { padding-left: 14px; min-width: 180px; }
.search-box input { font-size: 0.8rem; font-weight: 600; outline: none; color: #1e293b; }
.search-box input:focus { box-shadow: none; }

.custom-multiselect { position: relative; width: 100%; cursor: pointer;}
.multiselect-dropdown { position: absolute; top: 120%; left: 0; background: #fff; border: 1px solid rgba(0,0,0,0.05); border-radius: 14px; box-shadow: 0 12px 35px rgba(0,0,0,0.15); z-index: 9999; display: none; max-height: 280px; overflow-y: auto; padding: 12px; min-width: 200px; }
.multiselect-dropdown.show { display: block; animation: dropFade 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes dropFade { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.multiselect-dropdown label { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 0.85rem; cursor: pointer; border-radius: 8px; font-weight: 600; margin: 0; color:#1e293b;}
.multiselect-dropdown label:hover { background: #f0f4f8; color: #30528A; }
.multiselect-dropdown input[type="checkbox"] { cursor: pointer; accent-color: #30528A; transform: scale(1.2); }

.dashboard-content { flex-grow: 1; display: flex; flex-direction: column; width: 100%; padding-bottom: 0 !important; }

/* ==========================================================================
   KPI CARDS & GRID SYSTEM (JARAK SERAGAM 20PX)
   ========================================================================== */
.kpi-container { 
  /* Warna solid abu-abu muda biar grafik di bawahnya ga tembus */
  background: #f4f6f9 !important; 
  width: 100%;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
  gap: 20px !important; 
  
  /* 🔥 FIX: Padding kiri-kanan dibikin 0 biar rata sama tombol Overview 🔥 */
  padding: 10px 0 20px 0 !important; 
  margin: 0 !important; 
  border-bottom: none !important;
}
.kpi-card { position: relative !important; overflow: hidden; border-radius: 14px; padding: 18px 22px; border: none; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 6px 15px rgba(0,0,0,0.05); transition: 0.3s; width: 100%; z-index: 1;}
.kpi-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.12); }
.card-blue { background: linear-gradient(135deg, #30528A, #436ab0); color: #ffffff; }
.card-gold { background: linear-gradient(135deg, #A78759, #c7a473); color: #ffffff; }
.card-red  { background: linear-gradient(135deg, #EC363A, #f75c5f); color: #ffffff; }
.card-dark { background: linear-gradient(135deg, #1e293b, #334155); color: #ffffff; }
.kpi-info { display: flex; flex-direction: column; justify-content: center; }
.kpi-title { font-size: 0.7rem; font-weight: 600; color: rgba(255, 255, 255, 0.7); text-transform: uppercase; margin-bottom: 6px; letter-spacing: 1px;}
.kpi-value { font-size: 2.1rem; font-weight: 800; line-height: 1; color: #ffffff; letter-spacing: -0.5px; text-shadow: 0 2px 4px rgba(0,0,0,0.1);}
.kpi-icon-wrapper { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: rgba(255, 255, 255, 0.15); color: #ffffff; box-shadow: inset 0 2px 4px rgba(255,255,255,0.1), 0 4px 10px rgba(0,0,0,0.05);}

/* GRID SYSTEM (GRAFIK & TABEL) */
.grid-charts, .grid-charts-equal { 
    padding: 0 !important; 
    margin-top: 0 !important; 
    margin-bottom: 20px !important; /* Jarak standar antar grafik */
    position: relative; z-index: 1; 
}

.grid-data {
    padding: 0 !important; 
    margin-top: 0 !important; 
    /* HILANGKAN MARGIN BAWAH AGAR TIDAK SCROLL KEBABLASAN */
    margin-bottom: 0 !important; 
    position: relative; z-index: 1;
}

/* Jarak antar elemen di dalam grid juga dikunci 20px */
.grid-charts { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 20px !important; width: 100%; flex-shrink: 0;}
.grid-charts-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 20px !important; width: 100%; flex-shrink: 0;}
.grid-data { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr); gap: 20px !important; width: 100%; flex-shrink: 0;}

.widget { position: relative !important; background: #ffffff; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.04); transition: 0.3s; width: 100%; z-index: 1;}
.widget:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.07); }

/* ==========================================================================
   🚀 PERFECT FULL-SCREEN FIT (ANTI GEPENG & ANTI KEPOTONG)
   ========================================================================== */
@media (min-width: 992px) {
  .kpi-container {
      position: sticky !important; 
      /* Nempel persis di bawah Header Search lu */
      top: calc(var(--topbar-tinggi) + var(--topbar-jarak-atas) + 61px) !important; 
      z-index: 990 !important; 
      box-shadow: 0 15px 15px -15px rgba(0,0,0,0.08) !important;
      
      /* 🔥 FIX: Hapus dorongan margin/padding nyeleneh yang bikin geser 🔥 */
      margin: 0 !important;
      padding: 10px 0 20px 0 !important;
  }

  /* 2. OBAT GRAFIK GEPENG (Ini yang kemaren kehapus bray!) */
  .grid-charts .widget, 
  .grid-charts-equal .widget { 
      height: calc(100vh - 250px) !important; 
      min-height: 420px !important; /* Paksa minimal 420px biar ga mungkin jadi lidi */
  } 
  
  /* 3. TABEL NGEPAS KONTEN + SEPATU */
  .grid-data .widget { 
      height: 100% !important; /* Paksa kotak selalu ditarik tinggi 100% sejajar sebelahnya */
      min-height: 450px !important; 
  }
}

/* --- HEADER WIDGET DIBUAT CENTER, KAPITAL & ELEGAN --- */
.widget-head { 
    padding: 16px 24px; 
    border-bottom: 1px solid rgba(0,0,0,0.04); 
    background: #f8fafc; /* Dikasih warna abu-abu super muda biar kelihatan 'kepala' widget-nya */
    flex-shrink: 0;
    position: relative; 
    display: flex; 
    justify-content: center; /* KUNCI: Judul otomatis rata tengah */
    align-items: center; 
}

.w-title { 
    font-weight: 800; 
    font-size: 0.95rem; /* Ukuran dipaskan agar lebih elegan */
    letter-spacing: 1px; /* Spasi antar huruf agak direnggangkan */
    text-transform: uppercase; /* Huruf besar semua biar seragam dengan tabel lain */
    color: #30528A; /* Diseragamkan ke warna biru TMC */
    display: flex; 
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* Mengunci elemen tombol/legend di kanan agar tidak mendorong judul dari tengah */
.widget-head > div.gap-3, 
.widget-head > button {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
}

.widget-body { padding: 18px 24px; position: relative; flex-grow: 1; overflow-y: auto; overflow-x: hidden; height: 0; scrollbar-width: none; -ms-overflow-style: none; }
.widget-body::-webkit-scrollbar { display: none; }
.widget-body.no-pad { padding: 0; }

.chart-wrapper { position: relative; height: 100%; width: 100%; }
.chart-legend { display: flex; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: #1e293b;}
.dot { width: 14px; height: 14px; border-radius: 4px; }

/* TOP ACHIEVERS - ULTRA COMPACT DESIGN */
.top-list-container { display: flex; width: 100%; height: 100%; }
.top-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Header dipangkas paddingnya jadi 8px */
.top-col-header { background: #f8fafc; padding: 8px; text-align: center; font-weight: 800; font-size: 0.75rem; color: #30528A; border-bottom: 1px solid rgba(0,0,0,0.04); letter-spacing: 1px; flex-shrink: 0; }
.border-start { border-left: 1px solid rgba(0,0,0,0.04); }

.rank-list { margin: 0; padding: 0; list-style: none; overflow: hidden; flex-grow: 1; }

/* Padding tiap baris dipress lagi jadi 7px atas-bawah */
.rank-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid rgba(0,0,0,0.03); gap: 8px; transition: background 0.2s;}
.rank-item:hover { background: #f8fafc; }

/* Bulatan ranking diperkecil sedikit jadi 22px */
.rank-idx { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; flex-shrink: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.rank-gold { background: linear-gradient(135deg, #FFD700, #FDB931); color: #8A6300; border: 2px solid #FFF8D6; }
.rank-silver { background: linear-gradient(135deg, #E0E0E0, #BDBDBD); color: #4A4A4A; border: 2px solid #F5F5F5; }
.rank-bronze { background: linear-gradient(135deg, #CD7F32, #A0522D); color: #ffffff; border: 2px solid #FFDAB9; }
.rank-normal { background: #f1f5f9; color: #64748b; box-shadow: none; }

/* Font diturunkan sedikit (0.05rem) agar proporsional */
.rank-name { font-weight: 700; font-size: 0.8rem; color: #1e293b; flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.rank-val { font-weight: 800; font-size: 0.85rem; color: #30528A; flex-shrink: 0; }

/* 🚀 TABLES - OBAT ANTI KEPOTONG (FIT TO BOX) */
.table-responsive-wrapper { width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; display: block; scrollbar-width: none; -ms-overflow-style: none; }
.table-responsive-wrapper::-webkit-scrollbar { display: none; }

.t-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; }

/* Padding diperkecil agar isi tabel muat semua kolom */
.t-table th { text-align: left; padding: 10px 8px; background: #f8fafc; color: #64748b; font-weight: 800; text-transform: uppercase; border-bottom: 2px solid #e2e8f0; position: sticky; top: 0; z-index: 10; font-size: 0.75rem; letter-spacing: 0.5px; white-space: nowrap;}

/* white-space: nowrap DICABUT dari TD biar elemen yang panjang bisa ngikutin container */
.t-table td { padding: 10px 8px; border-bottom: 1px solid rgba(0,0,0,0.03); color: #1e293b; font-weight: 600; font-size: 0.85rem; vertical-align: middle; }
.t-table tr.hoverable:hover td { background: rgba(48, 82, 138, 0.04); cursor: pointer; }

/* MINI PROGRESS BAR DI TABEL */
.mini-bar-bg { width: 100%; height: 4px; background: #e2e8f0; border-radius: 4px; margin-top: 4px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }

.widget-overlay-loader { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(4px); z-index: 100; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; border-radius: inherit; }
.kpi-card .widget-overlay-loader { background: rgba(0, 0, 0, 0.15); } 
.widget-overlay-loader.active { opacity: 1; pointer-events: auto; }

.mini-spinner { width: 3.5rem; height: 3.5rem; border-radius: 50%; border: 4px solid rgba(48, 82, 138, 0.1); border-top-color: var(--tirta-blue); border-right-color: var(--tirta-red); animation: tmc-spin-1 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; position: relative; box-shadow: 0 0 15px rgba(48, 82, 138, 0.1); }
.mini-spinner::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--tirta-gold); border-left-color: var(--tirta-gold); animation: tmc-spin-2 0.7s linear infinite reverse; }
.mini-spinner-sm { width: 2rem; height: 2rem; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: #ffffff; border-right-color: #ffffff; animation: tmc-spin-1 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; position: relative; }
.mini-spinner-sm::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--tirta-gold); border-left-color: var(--tirta-gold); animation: tmc-spin-2 0.7s linear infinite reverse; }

/* ==========================================================================
   WRAPPER STICKY UNTUK HEADER + FILTER (AGAR NEMPEL BARENGAN)
   ========================================================================== */
.dashboard-sticky-header-wrapper {
    position: sticky; 
    top: calc(var(--topbar-tinggi) + var(--topbar-jarak-atas)); 
    z-index: 1000; 
    background: var(--bg-body); 
    width: 100%; 
}

/* ==========================================================================
   STYLE TOMBOL LEADERBOARD & LOGIC MOBILE SWITCH
   ========================================================================== */
.leaderboard-toggle { display: inline-flex; background: #e2e8f0; border-radius: 50px; padding: 4px; }
.btn-lb { background: transparent; border: none; padding: 8px 16px; border-radius: 50px; font-size: 0.75rem; font-weight: 800; color: #64748b; cursor: pointer; transition: 0.3s; text-transform: uppercase; letter-spacing: 0.5px;}
.btn-lb.active { background: #fff; color: #30528A; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
#btn-lb-mkt.active { color: #A78759; }

/* --- ATURAN PC / DESKTOP (WAJIB TAMPIL DUA-DUANYA) --- */
@media (min-width: 992px) {
    #mobile-lb-toggle { display: none !important; } /* Sembunyikan tombol di PC */
    .lb-col-branch, .lb-col-mkt { display: block !important; width: calc(50% - 20px) !important; }
    .lb-item-branch, .lb-item-mkt { display: flex !important; width: calc(50% - 20px) !important; }

    #mobile-chart-toggle { 
        display: none !important; /* Sembunyikan tombol switch di PC */
    }
    
    #mobile-chart-container .chart-item-bar,
    #mobile-chart-container .chart-item-donut {
        display: flex !important; /* Paksa kedua grafik muncul sebelahan */
    }
}

/* ==========================================================================
   📱 MOBILE RESPONSIVE KHUSUS DASHBOARD (FIX SCROLL, STICKY & SWIPE)
   ========================================================================== */
@media (max-width: 991.98px) {
    #mobile-lb-toggle { display: flex !important; } /* Munculin tombol di HP */
    
    /* Lebar Leaderboard ngepas layar HP, ga perlu di-swipe */
    #unified-leaderboard, .widget:last-child .text-uppercase { min-width: 100% !important; width: 100% !important; }
    
    /* JIKA LAGI MODE BRANCH (Marketing Disembunyikan) */
    #unified-leaderboard.lb-mode-branch .lb-item-branch { display: flex !important; width: 100% !important; }
    #unified-leaderboard.lb-mode-branch .lb-item-mkt { display: none !important; }
    .lb-mode-branch-header .lb-col-branch { display: block !important; width: 100% !important; border: none !important; }
    .lb-mode-branch-header .lb-col-mkt { display: none !important; }

    /* JIKA LAGI MODE MARKETING (Branch Disembunyikan) */
    #unified-leaderboard.lb-mode-mkt .lb-item-mkt { display: flex !important; width: 100% !important; border: none !important; padding-left: 10px !important;}
    #unified-leaderboard.lb-mode-mkt .lb-item-branch { display: none !important; }
    .lb-mode-mkt-header .lb-col-mkt { display: block !important; width: 100% !important; border: none !important; padding-left: 10px !important;}
    .lb-mode-mkt-header .lb-col-branch { display: none !important; }

    /* --- 1. KUNCI STICKY HEADER MOBILE --- */
    .dashboard-sticky-header-wrapper {
        position: -webkit-sticky !important; /* WAJIB buat iPhone/Safari */
        position: sticky !important;
        top: 51px !important; /* Sesuaikan kalau nabrak topbar */
        z-index: 1020 !important;
        background: #f4f6f9 !important; 
        box-shadow: 0 10px 15px -10px rgba(0,0,0,0.1) !important; 
        margin-bottom: 10px !important;
    }

    /* Pastikan pembungkus utamanya ga ngunci sticky */
    body, html, .dashboard-layout {
        overflow-x: clip !important; /* Pake 'clip' gantiin 'hidden' biar sticky tetep hidup */
        overflow-y: visible !important;
    }

    /* --- 2. FIX HEADER TAMPILAN MOBILE (SIMETRIS & MINIMALIS) --- */
    .header-row {
        display: flex !important;
        flex-direction: column !important; /* Paksa jadi 2 susun: Atas Tab, Bawah Tools */
        flex-wrap: nowrap !important; 
        overflow: visible !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 12px 15px !important; 
        gap: 12px !important; 
    }
    
    /* Grup 1: Tab Overview & Comparison (Bagi 2 Rata Kiri-Kanan) */
    .header-row > div:nth-child(1) { 
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        gap: 10px !important;
        margin: 0 !important;
    }
    
    .header-row > div:nth-child(1) .tab-btn {
        flex: 1 !important; /* 🔥 KUNCI: Membelah layar jadi 50:50 🔥 */
        justify-content: center !important;
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
        min-width: 0 !important; 
        font-size: 0.75rem !important;
    }

    /* Grup 2: Search, Filter, Refresh (Rata Tengah Simetris) */
    .header-row > div:nth-child(2) {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        justify-content: center !important; /* 🔥 KUNCI: Kumpul di Tengah! 🔥 */
        align-items: center !important;
        gap: 10px !important;
        margin: 0 !important;
    }
    
    /* Buang garis pemisah PC */
    .header-row div[style*="width: 2px"] { display: none !important; }
    
    /* Seragamkan ukuran tinggi tombol */
    .filter-box, .tab-btn, .search-box-wrapper, .tmc-action-btn { 
        height: 38px !important; 
        border-radius: 50px !important; 
    }
    
    /* Search Box menyesuaikan ruang */
    .search-box-wrapper { flex-grow: 1 !important; max-width: 220px !important; padding: 0 14px !important; }
    .search-box-wrapper input { font-size: 0.75rem !important; width: 100% !important; }
    .tmc-action-btn { flex-shrink: 0 !important; }

    /* --- 3. FIX SCROLL HALAMAN MATI (ANTI NGE-FREEZE) --- */
    body, html, .dashboard-layout, .dashboard-content, #view-ops {
        overflow-y: visible !important;
        height: auto !important;
    }

    /* --- 4. KPI NORMAL (JANGAN STICKY BIAR LAYAR GA HABIS) --- */
    .kpi-container {
        position: relative !important; 
        top: 0 !important;
        z-index: 99 !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Susun 2 baris 2 kolom */
        gap: 10px !important; 
        padding: 10px 0 15px 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .kpi-card { 
        padding: 12px !important; border-radius: 12px !important; 
        min-height: 75px !important; height: auto !important; 
        display: flex !important; flex-direction: column !important; justify-content: center !important; 
    }
    .kpi-title { font-size: 0.6rem !important; margin-bottom: 2px !important;}
    .kpi-value { font-size: 1.25rem !important;}
    .kpi-icon-wrapper { position: absolute !important; right: 10px !important; top: 10px !important; width: 24px !important; height: 24px !important; opacity: 0.15; font-size: 0.8rem !important; }

    /* --- 5. GRAFIK (ANTI GEPENG LIDI) --- */
    .dashboard-layout .widget { 
        width: 100% !important; height: auto !important; min-height: auto !important; 
        border-radius: 14px !important; overflow: hidden !important; 
    }

    /* ==========================================================================
       📱 6. SULAP TABEL JADI LIST MENYATU (SEAMLESS NATIVE MOBILE) 📱
       ========================================================================== */
    .grid-data .widget { min-height: auto !important; }
    
    /* 1. Matikan Scroll Horizontal & Sembunyikan Header PC */
    .grid-data .widget > div:first-child { overflow-x: hidden !important; width: 100% !important; }
    .grid-data .widget:first-child .text-uppercase { display: none !important; } 
    
    #tbl-body-wrapper { min-width: 100% !important; width: 100% !important; background: #ffffff !important; }

    /* 2. Sulap Tiap Baris Jadi List Menyatu (Gak Pake Jarak) */
    #tbl-body-wrapper > div {
        height: auto !important; 
        min-height: 75px !important;
        flex-wrap: wrap !important; 
        padding: 16px 20px !important;
        position: relative !important;
        align-items: center !important;
        gap: 6px 0 !important;
        background: transparent !important;
        
        /* 🔥 KUNCI BIAR NYATU KAYAK TABEL 🔥 */
        border-radius: 0 !important; 
        margin-bottom: 0 !important; /* Hapus jarak antar elemen! */
        box-shadow: none !important; 
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important; /* Cuma pakai garis bawah */
    }
    
    /* Hilangkan garis bawah di baris paling terakhir biar clean */
    #tbl-body-wrapper > div:last-child { border-bottom: none !important; }

    /* Hapus Baris Kosong (Filler) */
    #tbl-body-wrapper > div:empty { display: none !important; }

    /* Bantai Inline Style bawaan PC */
    #tbl-body-wrapper > div > div {
        justify-content: flex-start !important; text-align: left !important; padding: 0 !important;
    }

    /* KOLOM 1: Nama Project & Cabang (Full Width) */
    #tbl-body-wrapper > div > div:nth-child(1) {
        width: 100% !important; margin-bottom: 4px !important; padding-right: 75px !important; 
    }
    #tbl-body-wrapper > div > div:nth-child(1) .fw-bolder {
        white-space: normal !important; font-size: 0.85rem !important; line-height: 1.3 !important; color: #1e293b !important;
    }

    /* KOLOM 2: Target */
    #tbl-body-wrapper > div > div:nth-child(2) { width: auto !important; font-size: 0.75rem !important; color: #64748b !important; }
    #tbl-body-wrapper > div > div:nth-child(2)::before { content: "TGT: "; margin-right: 4px; font-weight: 600; opacity: 0.7; }

    /* KOLOM 3: Actual */
    #tbl-body-wrapper > div > div:nth-child(3) { 
        width: auto !important; margin-left: 16px !important; font-size: 0.75rem !important; color: #30528A !important; font-weight: 800 !important;
    }
    #tbl-body-wrapper > div > div:nth-child(3)::before { content: "ACT: "; margin-right: 4px; color: #64748b !important; font-weight: 600; opacity: 0.7;}

    /* KOLOM 4: Progress % (Mentok Kanan) */
    #tbl-body-wrapper > div > div:nth-child(4) { width: auto !important; margin-left: auto !important; }
    #tbl-body-wrapper > div > div:nth-child(4) span { font-size: 0.75rem !important; font-weight: 800 !important; }

    /* Sembunyikan bar warna panjangnya, sisain persentasenya aja biar ga sumpek */
    #tbl-body-wrapper > div > div:nth-child(4) .d-lg-block { display: none !important; }

    /* KOLOM 5: Status Badge (Kanan Atas) */
    #tbl-body-wrapper > div > div:nth-child(5) { position: absolute !important; top: 16px !important; right: 20px !important; width: auto !important; }
    #tbl-body-wrapper > div > div:nth-child(5) span { font-size: 0.55rem !important; padding: 4px 8px !important; letter-spacing: 0.5px !important; }

    /* 7. LEADERBOARD AMAN FIT DI LAYAR HP */
    #unified-leaderboard, .widget:last-child .text-uppercase {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    /* --- DROPDOWN POP-UP NATIVE --- */
    .multiselect-dropdown.show { 
        position: fixed !important; top: 50% !important; left: 50% !important; 
        transform: translate(-50%, -50%) !important; width: 90vw !important; 
        max-height: 60vh !important; z-index: 9999999 !important; 
        border-radius: 16px !important; box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
        overflow-y: auto !important; background: #fff !important;
    }

    /* ==========================================================================
       🔥 JURUS SAKTI TUKAR POSISI (KHUSUS HP) 🔥
       ========================================================================== */
    /* Pastikan pembungkusnya pakai Flexbox (biasanya udah dari kodingan sblmnya) */
    .grid-data {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Widget 1 (Tabel Project Details) KITA TENDANG KE BAWAH */
    .grid-data > .widget:nth-child(1) {
        order: 2 !important;
    }

    /* Widget 2 (Leaderboard Branches/Marketing) KITA TARIK KE ATAS */
    .grid-data > .widget:nth-child(2) {
        order: 1 !important;
    }

    /* ==========================================================================
       🔥 OBAT DASHBOARD BERANTAKAN (TOMBOL RAKSASA & BOTTOM NABRAK) 🔥
       ========================================================================== */
       
    /* 1. SULAP TOMBOL TOGGLE JADI KAPSUL NATIVE iOS (Mulus & Ramping) */
    #mobile-chart-toggle,
    .leaderboard-toggle {
        display: flex !important;
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 50px !important;
        padding: 4px !important;
        width: 100% !important;
        margin: 0 0 15px 0 !important; /* Kasih jarak napas ke grafik bawahnya */
    }

    #mobile-chart-toggle button,
    .btn-lb {
        flex: 1 !important; /* 🔥 KUNCI: Bagi lebar layar 50:50 rata tengah! */
        background: transparent !important;
        border: none !important;
        padding: 8px 10px !important;
        border-radius: 50px !important;
        font-size: 0.75rem !important;
        font-weight: 800 !important;
        color: #64748b !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        transition: all 0.3s ease !important;
        box-shadow: none !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        height: 36px !important; /* Tinggi dipress biar gak gembul */
    }

    #mobile-chart-toggle button.active,
    .btn-lb.active {
        background: #ffffff !important;
        color: var(--tirta-blue) !important; /* Warna biru elegan */
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }

    /* 2. RAPIHIN JUDUL GRAFIK BIAR GAK MELAYANG */
    .widget-head {
        background: transparent !important; 
        border-bottom: 1px dashed #e2e8f0 !important;
        padding: 12px 16px !important;
    }
    .w-title {
        font-size: 0.8rem !important;
        color: #1e293b !important;
    }

    /* 3. RAPIHIN JARAK ANTAR KOTAK WIDGET BIAR GAK SUMPEK */
    .grid-charts, .grid-charts-equal, .grid-data { 
        gap: 15px !important; 
        margin-bottom: 15px !important;
        margin-top: 5px !important;
    }

    /* ==========================================================================
       🔥 OBAT GRAFIK GEPENG & TOGGLE BALAPAN DI HP 🔥
       ========================================================================== */
    /* 1. Kasih Ruang Nafas Buat Kotak Grafiknya */
    .grid-charts .widget {
        min-height: 380px !important; /* Paksa tinggi kotaknya biar chart gak kegencet */
        height: auto !important;
        overflow: visible !important; /* Jangan di-hidden biar grafik gak kepotong */
    }

    /* 2. Rapihin Kepala Kotak (Toggle di atas, Judul di bawahnya) */
    .grid-charts .widget-head {
        display: flex !important;
        flex-direction: column-reverse !important; /* Susun rapi: Toggle di atas, Judul di bawah */
        align-items: center !important;
        padding: 15px 15px 5px 15px !important;
        height: auto !important;
    }

    /* 3. Benerin Posisi Toggle Biar Gak Melayang Nabrak Judul */
    #mobile-chart-toggle {
        position: relative !important;
        width: 100% !important;
        margin: 0 0 15px 0 !important;
        top: 0 !important;
        right: 0 !important;
        transform: none !important;
    }

    /* 4. Paksa Grafik ke Tengah Biar Gak Miring/Kepotong */
    .grid-charts .widget-body {
        padding: 10px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .chart-wrapper {
        height: 250px !important;
        min-height: 250px !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* ==========================================================================
       🔥 LOGIC TOGGLE CHART TAMPIL GANTIAN (ANTI BOCOR PC vs HP) 🔥
       ========================================================================== */
    /* Pastikan pembungkus utamanya juga full width */
    #mobile-chart-container { width: 100% !important; max-width: 100% !important; display: flex !important; flex-direction: column !important; }

    /* JIKA MODE TARGET & ACTUAL (BAR) AKTIF */
    #mobile-chart-container.chart-mode-bar .chart-item-bar { 
        display: flex !important; 
        width: 100% !important; /* 🔥 KUNCI: PAKSA MELAR 100% 🔥 */
        max-width: 100% !important;
    }
    #mobile-chart-container.chart-mode-bar .chart-item-donut { display: none !important; }

    /* JIKA MODE PROJECT STATUS (DONUT) AKTIF */
    #mobile-chart-container.chart-mode-donut .chart-item-donut { 
        display: flex !important; 
        width: 100% !important; /* 🔥 KUNCI: PAKSA MELAR 100% 🔥 */
        max-width: 100% !important;
    }
    #mobile-chart-container.chart-mode-donut .chart-item-bar { display: none !important; }

    /* ==========================================================================
       📱 8. BANTAI RUANG KOSONG BAWAH (NEMPEL 0 PIKSEL NATIVE) 📱
       ========================================================================== */
    /* Nol-kan semua padding dan margin liar di ujung bawah */
    body, html, .dashboard-layout, #contentArea, .dashboard-content {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Bikin ujung bawah tabel jadi KOTAK (gak melengkung) & ilangin marginnya biar nempel sempurna */
    .grid-data > .widget:nth-child(1) {
        margin-bottom: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    /* 🔥 SEPATU PRESISI (SUDAH DI-FIX JADI 85PX) 🔥 */
    .main-wrapper-container {
        padding-bottom: 85px !important; /* DINAUKKAN AGAR TIDAK NABRAK NAVBAR HITAM BAWAH! */
    }
}