    /* cache-bust: 2026-10-16-r82b */
    * { margin: 0; padding: 0; box-sizing: border-box; }
    html { height: 100%; overflow: hidden; }
    body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f2f5; color: #1a1a2e;
           height: 100%; overflow: hidden;
           display: flex; flex-direction: column; }

    /* -- TOP BAR -- */
    .top-bar {
      background: #0284c7;
      display: flex; align-items: center;
      height: 42px; padding: 0 12px; gap: 0;
      box-shadow: 0 2px 8px rgba(0,0,0,0.18);
      position: sticky; top: 0; z-index: 999;
    }
    /* Hamburger filter toggle */
    .filter-toggle {
      background: none; border: none; cursor: pointer;
      color: #fff; font-size: 20px; padding: 4px 10px 4px 4px;
      display: flex; align-items: center; gap: 6px;
      border-right: 1px solid #ffffff33; margin-right: 12px;
      white-space: nowrap; font-size: 13px; font-weight: 600;
    }
    .filter-toggle:hover { color: #38bdf8; }
    .filter-toggle .icon { font-size: 18px; line-height: 1; }

    /* -- TABS -- */
    .tab-list { display: flex; gap: 2px; flex: 1; }
    .tab-btn {
      background: transparent; border: none; cursor: pointer;
      color: #0f172a; font-size: 12px; font-weight: 700;
      padding: 0 18px; height: 42px; border-bottom: 3px solid transparent;
      white-space: nowrap; transition: color 0.15s, border-color 0.15s;
      letter-spacing: 0.3px;
    }
    .tab-btn:hover { color: #000000; }
    .tab-btn.active {
      color: #000000;
      border-bottom: 3px solid #0f172a;
      background: rgba(255,255,255,0.18);
    }
    /* Tab accent colors */
    .tab-btn[data-tab="eaf"].active   { border-color: #166534; color: #000000; }
    .tab-btn[data-tab="efor"].active  { border-color: #6b21a8; color: #000000; }
    .tab-btn[data-tab="sfc"].active   { border-color: #92400e; color: #000000; }
    .tab-btn[data-tab="asset"].active { border-color: #0369a1; color: #000000; }

    /* INFO-GRAFIS button */
    .btn-infografis {
      background: #7c3aed; color: #fff; border: none;
      padding: 5px 13px; border-radius: 4px; font-size: 11px;
      font-weight: 700; cursor: pointer; white-space: nowrap;
      margin-right: 6px; letter-spacing: 0.3px;
    }
    .btn-infografis:hover { background: #6d28d9; }
    .btn-infografis.active { background: #4c1d95; box-shadow: 0 0 0 2px #c4b5fd; }

    /* ===== MAIN MODE SWITCH (KINERJA / TAGIHAN) ===== */
    .main-mode-bar {
      display: flex; align-items: center; gap: 0;
      background: #1e3a5f; padding: 4px 12px;
      border-bottom: 2px solid #0f2a47;
    }
    .main-mode-label {
      font-size: 10px; font-weight: 700; color: #94a3b8;
      letter-spacing: .5px; margin-right: 10px; white-space: nowrap;
    }
    .btn-main-mode {
      background: transparent; border: none; cursor: pointer;
      color: #cbd5e1; font-size: 12px; font-weight: 700;
      padding: 5px 18px; border-radius: 4px 4px 0 0;
      white-space: nowrap; letter-spacing: .3px;
      border-bottom: 3px solid transparent;
      transition: all 0.15s;
    }
    .btn-main-mode:hover { color: #fff; background: rgba(255,255,255,0.08); }
    .btn-main-mode.active { color: #fff; background: rgba(255,255,255,0.15); border-bottom-color: #38bdf8; }
    .btn-main-mode[data-mode="tagihan"].active { border-bottom-color: #f59e0b; color: #fef3c7; }
    .btn-main-mode[data-mode="mgtKontrak"].active { border-bottom-color: #34d399; color: #d1fae5; }
    .btn-main-mode[data-mode="evalScm"].active     { border-bottom-color: #fb923c; color: #ffedd5; }
    .btn-main-mode[data-mode="digikit"].active     { border-bottom-color: #a78bfa; color: #ede9fe; }
    /* ===== DIGIKIT SUB-MENU BAR ===== */
    #digikitSubBar {
      display: none;
      background: #1a1a3e;
      border-bottom: 1px solid rgba(255,255,255,0.10);
      padding: 0 14px;
      align-items: center;
      gap: 4px;
    }
    #digikitSubBar.visible { display: flex; }
    .digi-sub-label {
      font-size: 10px; font-weight: 700; color: #94a3b8;
      letter-spacing: .5px; text-transform: uppercase;
      margin-right: 4px; white-space: nowrap; padding: 6px 0;
    }
    .btn-digi-sub {
      background: transparent; border: none; cursor: pointer;
      color: #94a3b8; font-size: 11px; font-weight: 700;
      padding: 6px 14px; border-radius: 4px 4px 0 0;
      white-space: nowrap; letter-spacing: .3px;
      border-bottom: 3px solid transparent;
      transition: color .15s, border-color .15s;
    }
    .btn-digi-sub:hover { color: #fff; }
    .btn-digi-sub.active { color: #a78bfa; border-bottom-color: #a78bfa; background: rgba(255,255,255,0.06); }
    /* WO Gangguan status badges */
    .wo-badge {
      display: inline-block; padding: 2px 8px; border-radius: 12px;
      font-size: 10px; font-weight: 700; white-space: nowrap;
    }
    .wo-badge-berjalan   { background:#dcfce7; color:#166534; }
    .wo-badge-pengadaan  { background:#fef3c7; color:#92400e; }
    .wo-badge-perencanaan{ background:#dbeafe; color:#1e40af; }
    .wo-badge-terbit     { background:#ccfbf1; color:#0f766e; }
    .wo-badge-disetujui  { background:#d1fae5; color:#065f46; }
    .wo-badge-izin       { background:#ede9fe; color:#5b21b6; }
    .wo-badge-other      { background:#f1f5f9; color:#475569; }
    /* WO stat cards */
    .wo-stat-card {
      background: #fff; border-radius: 12px; padding: 14px 16px;
      display: flex; align-items: center; gap: 12px;
      box-shadow: 0 1px 6px rgba(0,0,0,.06); margin-bottom: 10px;
      border-left: 4px solid #6d28d9;
    }
    .wo-stat-icon {
      width: 40px; height: 40px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 20px; flex-shrink: 0;
    }
    .wo-stat-val { font-size: 26px; font-weight: 800; color: #1e293b; line-height: 1; }
    .wo-stat-lbl { font-size: 11px; color: #64748b; font-weight: 600; margin-top: 2px; }
    .wo-stat-sub { font-size: 9px; color: #94a3b8; margin-top: 3px; line-height: 1.3; }
    .wo-row:hover { background: #f0f4ff !important; }
    .wo-row.selected { background: #4f46e5 !important; outline: 2px solid #3730a3; outline-offset: -2px; }
    .wo-row.selected td { color: #fff !important; }
    .wo-row.selected span { color: #fff !important; }
    .wo-filter-item {
      display: flex; align-items: center; gap: 8px;
      padding: 5px 14px; cursor: pointer;
      font-size: 11px; color: #374151; white-space: nowrap;
    }
    .wo-filter-item:hover { background: #f1f5f9; }

    /* WO Detail Modal */
    #woDetailOverlay {
      display: none; position: fixed; inset: 0;
      background: rgba(15,23,42,.55); z-index: 9000;
      align-items: center; justify-content: center;
    }
    #woDetailOverlay.open { display: flex; }
    #woDetailModal {
      background: #fff; border-radius: 16px;
      width: 92%; max-width: 680px; max-height: 90vh;
      overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.22);
      animation: woModalIn .18s ease;
    }
    @keyframes woModalIn {
      from { opacity:0; transform:translateY(-18px) scale(.97); }
      to   { opacity:1; transform:translateY(0)     scale(1); }
    }
    .wo-modal-header {
      background: linear-gradient(135deg,#312e81,#4f46e5);
      padding: 18px 22px 14px; border-radius: 16px 16px 0 0;
      display: flex; justify-content: space-between; align-items: flex-start;
    }
    .wo-modal-title { color:#fff; font-size:15px; font-weight:800; letter-spacing:.3px; }
    .wo-modal-subtitle { color:#c7d2fe; font-size:11px; margin-top:3px; }
    .wo-modal-close {
      background: rgba(255,255,255,.18); border: none; color:#fff;
      width:28px; height:28px; border-radius:50%; font-size:16px; cursor:pointer;
      display:flex; align-items:center; justify-content:center; flex-shrink:0;
    }
    .wo-modal-close:hover { background: rgba(255,255,255,.32); }
    .wo-modal-body { padding: 20px 22px 24px; }
    .wo-detail-section { margin-bottom: 18px; }
    .wo-detail-section-title {
      font-size: 10px; font-weight: 700; color: #6366f1;
      text-transform: uppercase; letter-spacing: .8px;
      border-bottom: 1px solid #e0e7ff; padding-bottom: 5px; margin-bottom: 10px;
    }
    .wo-detail-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
    }
    .wo-detail-grid.single { grid-template-columns: 1fr; }
    .wo-detail-item { display: flex; flex-direction: column; gap: 2px; }
    .wo-detail-label { font-size: 10px; color: #94a3b8; font-weight: 600; }
    .wo-detail-value { font-size: 12px; color: #1e293b; font-weight: 600; word-break: break-word; }
    .wo-detail-value.mono { font-family: monospace; color: #312e81; font-size: 13px; }
    .wo-detail-value.empty { color: #cbd5e1; font-style: italic; font-weight: 400; }
    .wo-detail-durasi { display:inline-flex; align-items:center; gap:6px; }
    .wo-detail-durasi-val { font-size:20px; font-weight:900; line-height:1; }
    .wo-detail-durasi-label { font-size:10px; color:#64748b; }
    .wo-modal-footer {
      padding: 12px 22px 18px; display: flex; gap: 10px;
      border-top: 1px solid #f1f5f9; justify-content: flex-end;
    }
    .wo-btn-wa {
      background: #25d366; color: #fff; border: none;
      padding: 8px 20px; border-radius: 8px; font-size: 12px;
      font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px;
    }
    .wo-btn-wa:hover { background: #1da851; }
    .wo-btn-wa.copied { background: #059669; }
    .wo-btn-close {
      background: #f1f5f9; color: #64748b; border: none;
      padding: 8px 18px; border-radius: 8px; font-size: 12px;
      font-weight: 600; cursor: pointer;
    }
    .wo-btn-close:hover { background: #e2e8f0; }
    #woWAToast {
      position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
      background: #1e293b; color: #fff; padding: 10px 22px; border-radius: 24px;
      font-size: 13px; font-weight: 600; opacity: 0; z-index: 9999;
      transition: opacity .25s, transform .25s; pointer-events: none;
    }
    #woWAToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

    /* ===== WO PERIODIK ===== */
    /* Status badges */
    .prd-badge { display:inline-block; padding:2px 9px; border-radius:10px; font-size:10px; font-weight:700; white-space:nowrap; }
    .prd-badge-usulan     { background:#fef9c3; color:#854d0e; }
    .prd-badge-selesai    { background:#dcfce7; color:#166534; }
    .prd-badge-proses     { background:#dbeafe; color:#1e40af; }
    .prd-badge-material   { background:#fce7f3; color:#9d174d; }
    .prd-badge-pengiriman { background:#ede9fe; color:#5b21b6; }
    .prd-badge-penyusunan { background:#ffedd5; color:#9a3412; }
    .prd-badge-pemesanan  { background:#e0f2fe; color:#075985; }
    /* Jenis Har badges */
    .prd-jenis { display:inline-block; padding:2px 8px; border-radius:6px; font-size:10px; font-weight:800; }
    .prd-jenis-so { background:#312e81; color:#fff; }
    .prd-jenis-mo { background:#065f46; color:#fff; }
    .prd-jenis-to { background:#7c2d12; color:#fff; }
    /* Stat cards */
    .prd-stat-card { background:#fff; border-radius:10px; padding:12px 16px; box-shadow:0 1px 4px rgba(0,0,0,.07); display:flex; align-items:center; gap:12px; min-width:0; }
    .prd-stat-icon { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:17px; flex-shrink:0; }
    .prd-stat-label { font-size:10px; color:#64748b; font-weight:600; }
    .prd-stat-val   { font-size:18px; font-weight:800; color:#1e293b; line-height:1.1; }
    /* Filter dropdown */
    .prd-filter-item { display:flex; align-items:center; gap:8px; padding:5px 14px; cursor:pointer; font-size:11px; color:#374151; white-space:nowrap; }
    .prd-filter-item:hover { background:#f1f5f9; }
    /* Periodik Detail Modal */
    #prdDetailOverlay {
      display:none; position:fixed; inset:0;
      background:rgba(15,23,42,.55); z-index:9000;
      align-items:center; justify-content:center;
    }
    #prdDetailOverlay.open { display:flex; }
    #prdDetailModal {
      background:#fff; border-radius:16px;
      width:92%; max-width:700px; max-height:90vh;
      overflow:hidden; display:flex; flex-direction:column;
      box-shadow:0 24px 64px rgba(0,0,0,.22);
      animation:woModalIn .18s ease;
    }
    .prd-modal-header {
      background:linear-gradient(135deg,#0f172a 0%,#1e3a5f 100%);
      padding:16px 20px 13px; border-radius:16px 16px 0 0;
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      flex-shrink:0;
    }
    .prd-modal-title   { color:#fff; font-size:15px; font-weight:800; }
    .prd-modal-subtitle{ color:rgba(255,255,255,.7); font-size:11px; margin-top:2px; }
    .prd-modal-close   {
      background:rgba(255,255,255,.18); border:none; color:#fff;
      width:28px; height:28px; border-radius:50%; font-size:14px;
      cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0;
    }
    .prd-modal-close:hover { background:rgba(255,255,255,.32); }
    .prd-modal-body    { padding:18px 20px 4px; overflow-y:auto; flex:1; }
    .prd-detail-section{ margin-bottom:16px; }
    .prd-detail-section-title { font-size:10px; font-weight:800; color:#64748b; text-transform:uppercase; letter-spacing:.8px; margin-bottom:8px; padding-bottom:4px; border-bottom:1px solid #f1f5f9; }
    .prd-detail-grid   { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; }
    .prd-detail-item   { display:flex; flex-direction:column; gap:2px; }
    .prd-detail-label  { font-size:10px; color:#94a3b8; font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
    .prd-detail-value  { font-size:12px; color:#1e293b; font-weight:600; word-break:break-word; }
    .prd-detail-value.mono { font-family:monospace; font-size:11px; }
    .prd-detail-value.empty{ color:#cbd5e1; font-weight:400; font-style:italic; }
    .prd-modal-footer  { padding:12px 20px 16px; display:flex; justify-content:flex-end; gap:10px; border-top:1px solid #f1f5f9; flex-shrink:0; }
    .prd-btn-wa        { background:#16a34a; color:#fff; border:none; border-radius:8px; padding:8px 16px; font-size:12px; font-weight:700; cursor:pointer; }
    .prd-btn-wa:hover  { background:#15803d; }
    .prd-btn-wa.copied { background:#0891b2; }
    .prd-btn-close     { background:#475569; color:#fff; border:none; border-radius:8px; padding:8px 16px; font-size:12px; font-weight:700; cursor:pointer; }
    .prd-btn-close:hover{ background:#334155; }
    /* Periodik Resume Modal */
    #prdResumeOverlay {
      display:none; position:fixed; inset:0;
      background:rgba(15,23,42,.55); z-index:9100;
      align-items:center; justify-content:center;
    }
    #prdResumeOverlay.open { display:flex; }
    #prdResumeModal {
      background:#fff; border-radius:16px;
      width:98%; max-width:1060px; max-height:88vh;
      overflow:hidden; display:flex; flex-direction:column;
      box-shadow:0 24px 64px rgba(0,0,0,.22);
      animation:woModalIn .18s ease;
    }
    .prd-resume-header {
      background:linear-gradient(135deg,#0f766e 0%,#0d9488 100%);
      padding:16px 20px 13px; border-radius:16px 16px 0 0;
      display:flex; align-items:center; justify-content:space-between; gap:12px;
      flex-shrink:0;
    }
    .prd-resume-title   { color:#fff; font-size:15px; font-weight:800; }
    .prd-resume-subtitle{ color:rgba(255,255,255,.75); font-size:11px; margin-top:2px; }
    .prd-resume-close   {
      background:rgba(255,255,255,.18); border:none; color:#fff;
      width:28px; height:28px; border-radius:50%; font-size:14px;
      cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0;
    }
    .prd-resume-close:hover { background:rgba(255,255,255,.32); }
    .prd-resume-body    { padding:0; overflow-y:auto; flex:1; }
    .prd-resume-table   { width:100%; border-collapse:collapse; font-size:12px; }
    .prd-resume-table th{
      background:#0f766e; color:#fff; padding:9px 12px;
      text-align:center; font-size:11px; font-weight:700;
      white-space:nowrap; border-right:1px solid rgba(255,255,255,.15);
      position:sticky; top:0; z-index:2;
    }
    .prd-resume-table th:first-child { text-align:left; min-width:140px; }
    .prd-resume-table td{
      padding:8px 12px; border-bottom:1px solid #f1f5f9;
      border-right:1px solid #f1f5f9; text-align:center;
      font-size:12px; color:#334155;
    }
    .prd-resume-table td:first-child { text-align:left; font-weight:600; color:#1e293b; padding-left:14px; }
    .prd-resume-table tr:hover td    { background:#f0fdfa; }
    .prd-resume-table tr.prd-resume-total td {
      background:#f0fdf4; font-weight:700; color:#166534;
      border-top:2px solid #16a34a; font-size:12px;
    }
    .prd-resume-table tr.prd-resume-total td:first-child { color:#166534; padding-left:14px; }
    .prd-resume-footer  { padding:12px 20px 14px; display:flex; justify-content:flex-end; gap:10px; border-top:1px solid #f1f5f9; flex-shrink:0; }
    .prd-resume-btn-wa  { background:#16a34a; color:#fff; border:none; border-radius:8px; padding:8px 18px; font-size:12px; font-weight:700; cursor:pointer; }
    .prd-resume-btn-wa:hover  { background:#15803d; }
    .prd-resume-btn-wa.copied { background:#0891b2; }
    .prd-resume-btn-close{ background:#475569; color:#fff; border:none; border-radius:8px; padding:8px 18px; font-size:12px; font-weight:700; cursor:pointer; }
    .prd-resume-btn-close:hover { background:#334155; }
    /* clickable cells in prd resume */
    .prd-resume-link { background:none; border:none; padding:0; font-weight:700; color:#0f766e; cursor:pointer; font-size:12px; text-decoration:underline; text-underline-offset:2px; }
    .prd-resume-link:hover { color:#0d9488; }
    .prd-resume-zero { color:#cbd5e1; }
    /* Periodik Berulang section */
    .prd-berulang-section {
      margin-top:18px; border-top:2px solid #fef08a;
      background:#fefce8; border-radius:0 0 10px 10px;
      padding:12px 14px 10px;
    }
    .prd-berulang-header {
      display:flex; align-items:center; gap:6px;
      font-size:13px; color:#854d0e; margin-bottom:10px; flex-wrap:wrap;
    }
    .prd-berulang-icon { font-size:15px; }
    .prd-berulang-badge {
      background:#fde047; color:#713f12; border-radius:12px;
      padding:1px 9px; font-size:11px; font-weight:700;
    }
    .prd-berulang-hint { color:#a16207; font-size:11px; margin-left:4px; }
    .prd-berulang-table { width:100%; border-collapse:collapse; font-size:12px; }
    .prd-berulang-table th {
      background:#fef08a; color:#713f12; font-weight:700;
      padding:6px 10px; border:1px solid #fde047; white-space:nowrap;
    }
    .prd-berulang-table td {
      padding:6px 10px; border:1px solid #fef9c3;
      background:#fff;
    }
    .prd-berulang-table tr:hover td { background:#fef9c3; }
    .prd-berulang-mesin { font-weight:600; color:#1e293b; max-width:260px; }
    .prd-berulang-cnt {
      background:#ef4444; color:#fff; border-radius:12px;
      padding:1px 10px; font-size:12px; font-weight:700; white-space:nowrap;
    }
    /* Periodik Drilldown */
    #prdDrillOverlay {
      display:none; position:fixed; inset:0;
      background:rgba(15,23,42,.45); z-index:9200;
      align-items:center; justify-content:center;
    }
    #prdDrillOverlay.open { display:flex; }
    #prdDrillModal {
      background:#fff; border-radius:14px;
      width:96%; max-width:860px; max-height:82vh;
      overflow:hidden; display:flex; flex-direction:column;
      box-shadow:0 20px 60px rgba(0,0,0,.25);
      animation:woModalIn .15s ease;
    }
    .prd-drill-header {
      background:linear-gradient(135deg,#0f766e 0%,#0d9488 100%);
      padding:14px 18px 12px; border-radius:14px 14px 0 0;
      display:flex; align-items:center; justify-content:space-between; gap:10px; flex-shrink:0;
    }
    .prd-drill-title   { color:#fff; font-size:14px; font-weight:800; }
    .prd-drill-subtitle{ color:rgba(255,255,255,.75); font-size:11px; margin-top:2px; }
    .prd-drill-close   { background:rgba(255,255,255,.18); border:none; color:#fff; width:28px; height:28px; border-radius:50%; font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
    .prd-drill-close:hover { background:rgba(255,255,255,.32); }
    .prd-drill-body    { padding:0; overflow-y:auto; flex:1; }
    .prd-drill-table   { width:100%; border-collapse:collapse; font-size:12px; }
    .prd-drill-table th{ background:#0f766e; color:#fff; padding:9px 12px; font-size:11px; font-weight:700; text-align:left; border-right:1px solid rgba(255,255,255,.15); position:sticky; top:0; z-index:2; white-space:nowrap; }
    .prd-drill-table th:first-child { text-align:center; }
    .prd-drill-table td{ padding:8px 12px; border-bottom:1px solid #f1f5f9; border-right:1px solid #f1f5f9; font-size:11px; color:#334155; vertical-align:top; overflow:hidden; text-overflow:ellipsis; }
    .prd-drill-table tr:hover td { background:#f0fdfa; }
    .prd-drill-table td.prd-drill-no { text-align:center; color:#94a3b8; font-size:10px; width:32px; }
    .prd-drill-table td.prd-drill-mesin { font-weight:600; color:#0f172a; }
    .prd-drill-footer  { padding:10px 18px 14px; display:flex; justify-content:flex-end; border-top:1px solid #f1f5f9; flex-shrink:0; }
    .prd-drill-btn-close { background:#475569; color:#fff; border:none; border-radius:8px; padding:7px 18px; font-size:12px; font-weight:700; cursor:pointer; }
    .prd-drill-btn-close:hover { background:#334155; }
    /* WA Toast is shared, no new CSS needed */

    /* ===== WO RESUME MODAL ===== */
    #woResumeOverlay {
      display: none; position: fixed; inset: 0;
      background: rgba(15,23,42,.55); z-index: 9100;
      align-items: center; justify-content: center;
    }
    #woResumeOverlay.open { display: flex; }
    #woResumeModal {
      background: #fff; border-radius: 16px;
      width: 98%; max-width: 1000px; max-height: 88vh;
      overflow: hidden; display: flex; flex-direction: column;
      box-shadow: 0 24px 64px rgba(0,0,0,.22);
      animation: woModalIn .18s ease;
    }
    .wo-resume-header {
      background: linear-gradient(135deg,#0891b2 0%,#0e7490 100%);
      padding: 16px 20px 13px; border-radius: 16px 16px 0 0;
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      flex-shrink: 0;
    }
    .wo-resume-title { color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .3px; }
    .wo-resume-subtitle { color: rgba(255,255,255,.75); font-size: 11px; margin-top: 2px; }
    .wo-resume-close {
      background: rgba(255,255,255,.18); border: none; color: #fff;
      width: 28px; height: 28px; border-radius: 50%; font-size: 14px;
      cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .wo-resume-close:hover { background: rgba(255,255,255,.32); }
    .wo-resume-body { padding: 0; overflow-y: auto; flex: 1; }
    .wo-resume-table { width: 100%; border-collapse: collapse; font-size: 12px; }
    .wo-resume-table th {
      background: #0891b2; color: #fff; padding: 9px 12px;
      text-align: center; font-size: 11px; font-weight: 700;
      white-space: nowrap; border-right: 1px solid rgba(255,255,255,.15);
      position: sticky; top: 0; z-index: 2;
    }
    .wo-resume-table th:first-child { text-align: left; min-width: 140px; }
    .wo-resume-table th.wo-th-berulang { background: #b91c1c; }
    .wo-resume-table td {
      padding: 8px 12px; border-bottom: 1px solid #f1f5f9;
      border-right: 1px solid #f1f5f9; text-align: center;
      font-size: 12px; color: #334155;
    }
    .wo-resume-table td:first-child { text-align: left; font-weight: 600; color: #1e293b; padding-left: 16px; }
    .wo-resume-table tr:hover td { background: #f0f9ff; }
    .wo-resume-table tr.wo-resume-total td {
      background: #f0fdf4; font-weight: 700; color: #166534;
      border-top: 2px solid #16a34a; font-size: 12px;
    }
    .wo-resume-table tr.wo-resume-total td:first-child { color: #166534; padding-left: 16px; }
    .wo-resume-num { font-weight: 700; color: #0891b2; }
    .wo-resume-zero { color: #cbd5e1; }
    .wo-resume-footer {
      padding: 12px 20px 14px; display: flex; justify-content: flex-end;
      border-top: 1px solid #f1f5f9; flex-shrink: 0;
    }
    .wo-resume-btn-close {
      background: #475569; color: #fff; border: none; border-radius: 8px;
      padding: 8px 20px; font-size: 12px; font-weight: 700; cursor: pointer;
    }
    .wo-resume-btn-close:hover { background: #334155; }
    .wo-resume-btn-wa {
      background: #16a34a; color: #fff; border: none; border-radius: 8px;
      padding: 8px 18px; font-size: 12px; font-weight: 700; cursor: pointer;
    }
    .wo-resume-btn-wa:hover { background: #15803d; }
    .wo-resume-btn-wa.copied { background: #0891b2; }

    /* ===== WO DRILLDOWN POPUP ===== */
    #woDrillOverlay {
      display: none; position: fixed; inset: 0;
      background: rgba(15,23,42,.45); z-index: 9200;
      align-items: center; justify-content: center;
    }
    #woDrillOverlay.open { display: flex; }
    #woDrillModal {
      background: #fff; border-radius: 14px;
      width: 96%; max-width: 900px; max-height: 82vh;
      overflow: hidden; display: flex; flex-direction: column;
      box-shadow: 0 20px 60px rgba(0,0,0,.25);
      animation: woModalIn .15s ease;
    }
    .wo-drill-header {
      background: linear-gradient(135deg,#1e40af 0%,#1d4ed8 100%);
      padding: 14px 18px 12px; border-radius: 14px 14px 0 0;
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      flex-shrink: 0;
    }
    .wo-drill-title { color: #fff; font-size: 14px; font-weight: 800; }
    .wo-drill-subtitle { color: rgba(255,255,255,.75); font-size: 11px; margin-top: 2px; }
    .wo-drill-close {
      background: rgba(255,255,255,.18); border: none; color: #fff;
      width: 28px; height: 28px; border-radius: 50%; font-size: 14px;
      cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .wo-drill-close:hover { background: rgba(255,255,255,.32); }
    .wo-drill-body { padding: 0; overflow-y: auto; flex: 1; }
    .wo-drill-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
    .wo-drill-table colgroup col:nth-child(1) { width: 36px; }
    .wo-drill-table colgroup col:nth-child(2) { width: 150px; }
    .wo-drill-table colgroup col:nth-child(3) { width: 35%; }
    .wo-drill-table colgroup col:nth-child(4) { width: 120px; }
    .wo-drill-table colgroup col:nth-child(5) { width: auto; }
    .wo-drill-table th {
      background: #1e40af; color: #fff; padding: 9px 12px;
      font-size: 11px; font-weight: 700; text-align: left;
      border-right: 1px solid rgba(255,255,255,.15);
      position: sticky; top: 0; z-index: 2; white-space: nowrap;
    }
    .wo-drill-table th:first-child { text-align: center; }
    .wo-drill-table td {
      padding: 8px 12px; border-bottom: 1px solid #f1f5f9;
      border-right: 1px solid #f1f5f9; font-size: 11px; color: #334155;
      vertical-align: top; overflow: hidden; text-overflow: ellipsis;
    }
    .wo-drill-table tr:hover td { background: #eff6ff; }
    .wo-drill-table td.wo-drill-no { text-align: center; color: #94a3b8; font-size: 10px; }
    .wo-drill-table td.wo-drill-nowo { font-weight: 700; color: #4f46e5; white-space: nowrap; }
    .wo-drill-table td.wo-drill-repeat { color: #dc2626; font-weight: 700; }
    .wo-drill-footer {
      padding: 10px 18px 14px; display: flex; justify-content: flex-end;
      border-top: 1px solid #f1f5f9; flex-shrink: 0;
    }
    .wo-drill-btn-close {
      background: #475569; color: #fff; border: none; border-radius: 8px;
      padding: 7px 18px; font-size: 12px; font-weight: 700; cursor: pointer;
    }
    .wo-drill-btn-close:hover { background: #334155; }
    /* clickable count cells in resume table */
    .wo-resume-link {
      background: none; border: none; padding: 0; margin: 0;
      font-weight: 700; color: #0891b2; cursor: pointer;
      font-size: 12px; text-decoration: underline; text-underline-offset: 2px;
    }
    .wo-resume-link:hover { color: #0e7490; }
    .wo-resume-link-red { color: #dc2626; }
    .wo-resume-link-red:hover { color: #b91c1c; }

    /* ===== TAGIHAN SUB-MENU BAR ===== */
    #tagihanSubBar {
      display: none;
      background: #1a2744;
      border-bottom: 1px solid rgba(255,255,255,0.10);
      padding: 0 14px;
      align-items: center;
      gap: 4px;
    }
    #tagihanSubBar.visible { display: flex; }
    #scmSubBar {
      display: none;
      background: #1a2744;
      border-bottom: 1px solid rgba(255,255,255,0.10);
      padding: 0 14px;
      align-items: center;
      gap: 4px;
    }
    #scmSubBar.visible { display: flex; }
    .scm-sub-label {
      font-size: 10px; font-weight: 700; color: #94a3b8;
      letter-spacing: .5px; text-transform: uppercase;
      margin-right: 4px; white-space: nowrap; padding: 6px 0;
    }
    .btn-scm-sub {
      background: transparent; border: none; cursor: pointer;
      color: #94a3b8; font-size: 11px; font-weight: 700;
      padding: 6px 14px; border-radius: 4px 4px 0 0;
      white-space: nowrap; letter-spacing: .3px;
      border-bottom: 3px solid transparent;
      transition: color .15s, border-color .15s;
    }
    .btn-scm-sub:hover { color: #fff; }
    .btn-scm-sub.active { color: #fb923c; border-bottom-color: #fb923c; background: rgba(255,255,255,0.06); }
    .scm-row:hover { background: #dcfce7 !important; }
    .scm-row.selected { background: #16a34a !important; outline: 3px solid #14532d; outline-offset: -2px; }
    .scm-row.selected td { color: #fff !important; }
    .scm-row.selected span { color: #fff !important; }
    .scm-row.selected div { color: #fff !important; }
    .tg-sub-label {
      font-size: 10px; font-weight: 700; color: #94a3b8;
      letter-spacing: .5px; text-transform: uppercase;
      margin-right: 4px; white-space: nowrap; padding: 6px 0;
    }
    .btn-tg-sub {
      background: transparent; border: none; cursor: pointer;
      color: #94a3b8; font-size: 11px; font-weight: 700;
      padding: 6px 14px; border-radius: 4px 4px 0 0;
      white-space: nowrap; letter-spacing: .3px;
      border-bottom: 3px solid transparent;
      transition: all 0.15s;
    }
    .btn-tg-sub:hover { color: #e2e8f0; background: rgba(255,255,255,0.06); }
    .btn-tg-sub.active { color: #fef3c7; background: rgba(245,158,11,0.15); border-bottom-color: #f59e0b; }
    .tg-sub-badge {
      display: inline-block; font-size: 9px; font-weight: 800;
      padding: 1px 5px; border-radius: 8px; margin-left: 4px;
      vertical-align: middle; line-height: 14px;
    }
    .tg-sub-badge-nd  { background: #1769d5; color: #fff; }
    .tg-sub-badge-kit { background: #d97706; color: #fff; }
    .tg-sub-badge-cop { background: #0f766e; color: #fff; }

    /* ===== TAGIHAN KIT PANEL ===== */
    #tagihanKitPanel {
      display: none; padding: 10px 14px 16px;
      background: #f0f4f9; min-height: 200px;
      font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    }
    /* Toolbar KIT — reuse .tg-* classes, warna aksen oranye/kuning */
    .tgk-toolbar {
      display: flex; align-items: flex-end; gap: 8px; flex-wrap: nowrap;
      background: #fff; border-radius: 8px; padding: 8px 12px;
      margin-bottom: 10px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.07);
      overflow-x: auto;
      border-left: 4px solid #d97706;
    }
    .tgk-toolbar-title {
      font-size: 13px; font-weight: 800; color: #92400e;
      margin-right: 2px; white-space: nowrap; align-self: center;
      letter-spacing: .2px; flex-shrink: 0;
    }
    .tgk-cache-info {
      font-size: 9px; color: #92400e; background: #fef9c3;
      border: 1px solid #fde68a; border-radius: 10px;
      padding: 2px 8px; white-space: nowrap; align-self: center;
      flex-shrink: 0; letter-spacing: .2px;
    }
    .tgk-btn-refresh { background: #d97706; color: #fff; }
    .tgk-btn-refresh:hover { background: #b45309; }
    .tgk-btn-reset { background: #e2e8f0; color: #475569; }
    .tgk-btn-reset:hover { background: #cbd5e1; }
    .tgk-btn-excel { background: #166534 !important; color: #fff !important; }
    .tgk-btn-excel:hover { background: #14532d !important; }

    /* Summary KIT — aksen oranye/kuning/hijau */
    #tgkSummary {
      display: grid;
      grid-template-columns: 1.3fr repeat(var(--tgk-card-count, 6), 1fr);
      gap: 8px; margin-bottom: 10px; overflow-x: auto;
    }
    /* Pivot KIT */
    .tgk-pivot-wrap {
      background: #fff; border-radius: 8px; overflow: hidden;
      box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    }
    .tgk-pivot-title {
      font-size: 11px; font-weight: 800; color: #fff;
      background: linear-gradient(90deg,#92400e 0%,#d97706 100%);
      padding: 8px 14px; letter-spacing: .3px;
    }
    .tgk-table {
      width: 100%; border-collapse: collapse;
      font-size: 11px; color: #1e293b;
    }
    .tgk-table thead th {
      background: #1e3a5f; color: #fff; font-size: 10px;
      font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
      padding: 7px 10px; border-right: 1px solid rgba(255,255,255,0.15);
      white-space: nowrap; text-align: right;
    }
    .tgk-table thead th:first-child { text-align: left; }
    .tgk-table thead th.tgk-th-unit { text-align: left; min-width: 160px; }
    .tgk-table tbody tr:hover { background: #f0f7ff; }
    .tgk-table tbody tr:nth-child(even) { background: #f8fafc; }
    .tgk-table tbody tr:nth-child(even):hover { background: #e8f4fd; }
    .tgk-table td {
      padding: 6px 10px; border-bottom: 1px solid #e2e8f0;
      border-right: 1px solid #f1f5f9;
      text-align: right; vertical-align: middle;
    }
    .tgk-table td.tgk-td-unit { text-align: left; font-weight: 600; color: #1e3a5f; }
    .tgk-table td.tgk-td-total { font-weight: 800; color: #1e3a5f; }
    .tgk-table tfoot tr { background: #1e3a5f !important; }
    .tgk-table tfoot td {
      color: #fff; font-weight: 800; font-size: 11px;
      padding: 8px 10px; border-color: rgba(255,255,255,0.15);
    }
    /* Cell nilai + badge qty di KIT — sama seperti ND: qty kiri, nilai kanan */
    .tgk-cell { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
    .tgk-cell-val { font-weight: 700; font-size: 11px; }
    .tgk-cell-qty {
      font-size: 10px; font-weight: 800; color: #fff;
      background: #64748b; border-radius: 4px;
      padding: 1px 7px; line-height: 16px;
      display: inline-block; cursor: pointer;
      border: 1px solid rgba(0,0,0,.12);
      transition: background .12s, transform .08s;
      min-width: 22px; text-align: center; flex-shrink: 0;
    }
    .tgk-cell-qty:hover { filter: brightness(1.2); transform: scale(1.1); }
    /* Warna badge qty per status KIT */
    .tgk-cell-qty.st-akrual     { background: #1769d5; }
    .tgk-cell-qty.st-create     { background: #09a957; }
    .tgk-cell-qty.st-faktur     { background: #7c3aed; }
    .tgk-cell-qty.st-lunas      { background: #0ea5e9; }
    .tgk-cell-qty.st-verif-user { background: #0891b2; }
    .tgk-cell-qty.st-verif-keu  { background: #7e22ce; }
    .tgk-cell-qty.st-dok        { background: #ea580c; }
    .tgk-loading { padding: 40px 20px; text-align: center; color: #64748b; font-size: 13px; }

    /* Modal detail KIT — struktur sama seperti modal ND */
    #tgkDetailModal {
      display: none; position: fixed; inset: 0; z-index: 9999;
      background: rgba(0,0,0,.5); align-items: center; justify-content: center;
    }
    #tgkDetailModal.open { display: flex; }
    .tgk-modal-box {
      background: #fff; border-radius: 10px;
      width: min(860px, 96vw); max-height: 85vh;
      box-shadow: 0 8px 40px rgba(0,0,0,.3);
      display: flex; flex-direction: column;
    }
    .tgk-modal-header {
      background: #92400e;
      color: #fff; padding: 13px 18px;
      border-radius: 10px 10px 0 0;
      display: flex; align-items: center; justify-content: space-between;
      flex-shrink: 0;
    }
    .tgk-modal-title { font-size: 13px; font-weight: 800; line-height: 1.5; }
    .tgk-modal-close {
      background: rgba(255,255,255,.18); border: none; color: #fff;
      border-radius: 50%; width: 28px; height: 28px; cursor: pointer;
      font-size: 15px; flex-shrink: 0; margin-left: 12px;
    }
    .tgk-modal-body { overflow-y: auto; flex: 1; min-height: 0; }
    .tgk-modal-table { width: 100%; border-collapse: collapse; font-size: 13px; font-family: inherit; table-layout: fixed; }
    .tgk-modal-table thead th {
      background: #fef3c7; color: #92400e; padding: 10px 10px;
      text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .5px;
      position: sticky; top: 0; z-index: 2; border-bottom: 2px solid #fcd34d;
      white-space: nowrap;
    }
    .tgk-modal-table thead th.num  { text-align: center; }
    .tgk-modal-table thead th.val  { text-align: right; }
    .tgk-modal-table tbody td {
      padding: 8px 10px; border-bottom: 1px solid #eef2f7;
      vertical-align: middle;
    }
    .tgk-modal-table tfoot td {
      padding: 12px 14px;
    }
    .tgk-modal-table tr:hover td { background: #fffbeb; }

    /* COP detail modal — pola identik ND, buka/tutup via style.display di JS */
    .tgk-status-badge {
      display: inline-block; font-size: 9px; font-weight: 700;
      padding: 1px 7px; border-radius: 8px; white-space: nowrap;
    }

    /* ===== TAGIHAN SUB-MENU BAR ===== */
    #tagihanSubBar {
      display: none; /* tampil hanya saat mode tagihan aktif */
      background: #1e3a5f; padding: 0 12px;
      border-top: 1px solid rgba(255,255,255,0.08);
    }
    .tg-sub-btn {
      background: transparent; border: none; cursor: pointer;
      color: #94a3b8; font-size: 11px; font-weight: 700;
      padding: 6px 16px; border-radius: 0;
      white-space: nowrap; letter-spacing: .4px;
      border-bottom: 3px solid transparent;
      transition: all 0.15s; display: inline-flex; align-items: center; gap: 5px;
    }
    .tg-sub-btn:hover { color: #fff; background: rgba(255,255,255,0.07); }
    .tg-sub-btn.active { color: #fef3c7; border-bottom-color: #f59e0b; background: rgba(245,158,11,0.10); }
    .tg-sub-btn[data-sub="kit"].active { color: #a7f3d0; border-bottom-color: #10b981; background: rgba(16,185,129,0.10); }
    .tg-sub-btn[data-sub="cop"].active { color: #99f6e4; border-bottom-color: #0f766e; background: rgba(15,118,110,0.10); }
    .tg-sub-dot {
      display: inline-block; width: 7px; height: 7px;
      border-radius: 50%; background: currentColor; opacity: .7;
    }

    /* ===== TAGIHAN KIT PANEL ===== */
    #tagihanKitPanel {
      display: none; padding: 10px 14px 16px;
      background: #f0f4f9; min-height: 200px;
      font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    }
    .tgk-toolbar {
      display: flex; align-items: flex-end; gap: 8px; flex-wrap: nowrap;
      background: #fff; border-radius: 8px; padding: 8px 12px;
      margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.07);
      overflow-x: auto;
    }
    .tgk-toolbar-title {
      font-size: 13px; font-weight: 800; color: #065f46;
      margin-right: 2px; white-space: nowrap; align-self: center;
      letter-spacing: .2px; flex-shrink: 0;
    }
    .tgk-filter-group { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
    .tgk-filter-label {
      font-size: 9px; font-weight: 700; color: #64748b;
      text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
    }
    .tgk-filter-select {
      font-size: 11px; padding: 3px 7px; border: 1px solid #cbd5e1;
      border-radius: 4px; background: #fff; color: #1e293b;
      cursor: pointer; width: auto; min-width: 0; max-width: 170px; height: 26px;
    }
    .tgk-filter-input {
      font-size: 11px; padding: 3px 6px; border: 1px solid #cbd5e1;
      border-radius: 4px; background: #fff; color: #1e293b;
      cursor: pointer; width: 108px; height: 26px;
    }
    .tgk-btn-refresh, .tgk-btn-reset {
      border: none; border-radius: 4px; padding: 0 12px;
      font-size: 11px; font-weight: 700; cursor: pointer;
      white-space: nowrap; height: 26px; flex-shrink: 0;
      display: inline-flex; align-items: center; gap: 4px;
    }
    .tgk-btn-refresh { background: #059669; color: #fff; }
    .tgk-btn-refresh:hover { background: #047857; }
    .tgk-btn-reset   { background: #e2e8f0; color: #475569; }
    .tgk-btn-reset:hover { background: #cbd5e1; }
    .tgk-summary {
      display: grid;
      grid-template-columns: 1.3fr repeat(var(--tgk-card-count, 6), 1fr);
      gap: 8px; margin-bottom: 10px; overflow-x: auto;
    }
    .tgk-pivot-wrap {
      background: #fff; border-radius: 10px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.07); overflow: hidden;
    }
    .tgk-pivot-title {
      padding: 8px 14px; font-size: 12px; font-weight: 700;
      color: #1e3a5f; border-bottom: 1px solid #e2e8f0; background: #f8fafc;
    }
    .tgk-schedule-badge {
      display: inline-flex; align-items: center; gap: 4px;
      background: #ecfdf5; border: 1px solid #6ee7b7;
      color: #065f46; font-size: 9px; font-weight: 700;
      padding: 2px 7px; border-radius: 10px; white-space: nowrap;
      letter-spacing: .3px; align-self: center;
    }
    .tgk-loading { padding: 32px; text-align: center; color: #64748b; font-size: 13px; }
    /* KIT status color overrides */
    .tgk-status-lunas     { --sc-accent: #16a34a; --sc-wave: #f0fdf4; }
    .tgk-status-akrual    { --sc-accent: #1769d5; --sc-wave: #eef6ff; }
    .tgk-status-invoice   { --sc-accent: #09a957; --sc-wave: #f0fdf4; }
    .tgk-status-faktur    { --sc-accent: #9333ea; --sc-wave: #faf5ff; }
    .tgk-status-verif     { --sc-accent: #0891b2; --sc-wave: #ecfeff; }
    .tgk-status-other     { --sc-accent: #e85c1a; --sc-wave: #fff7ed; }

    /* ===== MGT KONTRAK PANEL (PEMBANGKIT DASHBOARD) ===== */
    #mgtKontrakPanel {
      display: none; padding: 10px 14px 16px;
      background: #f0f4f9; min-height: 200px;
      font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    }
    #mgtKontrakPanel.visible { display: block; }
    .mk-loading { text-align: center; padding: 40px; color: #64748b; font-size: 13px; }

    /* -- mk Header -- */
    .mk-header {
      display: flex; align-items: center; justify-content: space-between;
      background: linear-gradient(90deg,#1e3a5f 0%,#1e40af 100%);
      border-radius: 10px; padding: 10px 16px; margin-bottom: 12px;
      flex-wrap: wrap; gap: 8px;
    }
    .mk-header-left { display: flex; align-items: center; gap: 10px; }
    .mk-header-logo {
      width: 36px; height: 36px; background: #fff; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 20px; color: #1e40af; flex-shrink: 0;
    }
    .mk-header-title { color: #fff; }
    .mk-header-title h2 { font-size: 15px; font-weight: 800; margin: 0; letter-spacing: .2px; }
    .mk-header-title p  { font-size: 10px; color: #bfdbfe; margin: 1px 0 0; }
    .mk-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .mk-header-badge {
      background: rgba(255,255,255,0.15); color: #e0f2fe;
      font-size: 10px; font-weight: 600; border-radius: 6px;
      padding: 4px 10px; white-space: nowrap;
    }
    .mk-btn-refresh {
      background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.3);
      border-radius: 6px; font-size: 11px; font-weight: 700; padding: 4px 12px; cursor: pointer;
      transition: background .15s;
    }
    .mk-btn-refresh:hover { background: rgba(255,255,255,0.3); }

    /* -- mk KPI Row -- */
    .mk-kpi-row {
      display: grid; grid-template-columns: repeat(5,1fr);
      gap: 8px; margin-bottom: 12px;
    }
    .mk-kpi-card {
      background: #fff; border-radius: 10px;
      box-shadow: 0 1px 5px rgba(0,0,0,0.08);
      padding: 12px 14px; display: flex; align-items: center; gap: 10px;
      min-width: 0;
    }
    .mk-kpi-icon {
      width: 36px; height: 36px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 17px; flex-shrink: 0;
    }
    .mk-kpi-body { min-width: 0; flex: 1; }
    .mk-kpi-label { font-size: 9px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
    .mk-kpi-value { font-size: 22px; font-weight: 800; line-height: 1.15; margin: 2px 0 1px; }
    .mk-kpi-sub   { font-size: 9px; color: #94a3b8; }

    /* -- mk Mid Row -- */
    .mk-mid-row {
      display: grid; grid-template-columns: 1fr 1.2fr 1.4fr;
      gap: 10px; margin-bottom: 12px;
      align-items: stretch;
    }
    .mk-card {
      background: #fff; border-radius: 10px;
      box-shadow: 0 1px 5px rgba(0,0,0,0.07); padding: 12px 14px;
      min-width: 0; overflow: hidden;
    }
    .mk-card-title {
      font-size: 11px; font-weight: 800; color: #1e3a5f;
      margin-bottom: 10px; letter-spacing: .2px;
    }

    /* -- mk Donut -- */
    .mk-donut-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
    .mk-donut-svg  { flex-shrink: 0; }
    .mk-legend { display: flex; flex-direction: column; gap: 5px; }
    .mk-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #334155; }
    .mk-legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

    /* -- mk Bar Chart -- */
    .mk-bar-row { display: flex; flex-direction: column; gap: 8px; }
    .mk-bar-item { min-width: 0; }
    .mk-bar-labels { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
    .mk-bar-name   { font-size: 11px; font-weight: 600; color: #334155; }
    .mk-bar-counts { font-size: 10px; color: #64748b; white-space: nowrap; }
    .mk-bar-track  { height: 10px; background: #f1f5f9; border-radius: 5px; overflow: hidden; position: relative; }
    .mk-bar-aktif  { height: 100%; position: absolute; left: 0; top: 0; border-radius: 5px 0 0 5px; transition: width .4s; }
    .mk-bar-nonaktif { height: 100%; position: absolute; top: 0; border-radius: 0 5px 5px 0; transition: left .4s, width .4s; }

    /* -- mk Ringkasan -- */
    .mk-ring-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
    .mk-ring-item {
      border-radius: 8px; padding: 6px 8px;
      display: flex; align-items: flex-start; gap: 6px;
    }
    .mk-ring-icon {
      width: 22px; height: 22px; border-radius: 5px;
      display: flex; align-items: center; justify-content: center;
      font-size: 11px; flex-shrink: 0; color: #fff;
    }
    .mk-ring-body { min-width: 0; }
    .mk-ring-title { font-size: 10px; font-weight: 700; line-height: 1.3; }
    .mk-ring-sub   { font-size: 9px; color: #64748b; margin-top: 1px; }

    /* -- mk Table Section -- */
    .mk-table-section {
      background: #fff; border-radius: 10px;
      box-shadow: 0 1px 5px rgba(0,0,0,0.07); overflow: hidden;
      display: flex; flex-direction: column;
    }
    .mk-table-header {
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
      padding: 10px 14px; border-bottom: 1px solid #e2e8f0;
      background: #f8fafc;
    }
    .mk-table-header-title { font-size: 12px; font-weight: 800; color: #1e3a5f; flex: 1; white-space: nowrap; }
    .mk-table-search {
      font-size: 11px; padding: 4px 9px; border: 1px solid #cbd5e1;
      border-radius: 6px; background: #fff; color: #1e293b; width: 160px;
      outline: none;
    }
    .mk-table-search:focus { border-color: #3b82f6; }
    .mk-table-filters { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
    .mk-filter-btn {
      border: 1px solid #cbd5e1; background: #f1f5f9; color: #64748b;
      border-radius: 6px; font-size: 10px; font-weight: 700; padding: 3px 10px;
      cursor: pointer; opacity: .5; transition: all .15s;
    }
    .mk-filter-btn.active-aktif    { background: #dcfce7; border-color: #16a34a; color: #15803d; opacity: 1; }
    .mk-filter-btn.active-nonaktif { background: #fef9c3; border-color: #ca8a04; color: #854d0e; opacity: 1; }
    .mk-filter-up {
      font-size: 11px; padding: 3px 7px; border: 1px solid #cbd5e1;
      border-radius: 6px; background: #fff; color: #1e293b; cursor: pointer;
      max-width: 180px;
    }
    .mk-table-wrap { overflow-x: auto; overflow-y: auto; max-height: 420px; }
    .mk-table { width: 100%; border-collapse: collapse; font-size: 11px; color: #1e293b; }
    .mk-table thead th {
      background: #1e3a5f; color: #fff; font-size: 9.5px; font-weight: 700;
      letter-spacing: .4px; text-transform: uppercase; padding: 7px 10px;
      white-space: nowrap; border-right: 1px solid rgba(255,255,255,0.12);
      text-align: left;
      position: sticky; top: 0; z-index: 2;
    }
    .mk-table thead th.r { text-align: right; }
    .mk-table tbody tr:hover { background: #f0f7ff; }
    .mk-table tbody tr:nth-child(even) { background: #f8fafc; }
    .mk-table tbody tr:nth-child(even):hover { background: #e8f4fd; }
    .mk-table td {
      padding: 6px 10px; border-bottom: 1px solid #e2e8f0;
      border-right: 1px solid #f1f5f9; vertical-align: middle;
    }
    .mk-table td.nama { max-width: 200px; white-space: normal; word-wrap: break-word; }
    .mk-table td.nilai { text-align: right; font-weight: 700; color: #1e3a5f; white-space: nowrap; }
    .mk-status-badge {
      display: inline-block; font-size: 9px; font-weight: 700;
      padding: 2px 8px; border-radius: 8px; white-space: nowrap;
    }
    .mk-status-aktif    { background: #dcfce7; color: #15803d; }
    .mk-status-nonaktif { background: #fef9c3; color: #854d0e; }
    .mk-status-pra      { background: #ede9fe; color: #6b21a8; }
    .mk-status-other    { background: #f1f5f9; color: #475569; }
    .mk-table td.num    { text-align: center; color: #94a3b8; font-size: 10px; }
    .mk-legend-lbl { flex: 1; }
    .mk-legend-val { font-weight: 700; color: #1e3a5f; }

    /* -- mk Responsive -- */
    @media (max-width: 1200px) {
      .mk-mid-row { grid-template-columns: 1fr 1.2fr 1.4fr; }
    }
    @media (max-width: 900px) {
      .mk-kpi-row { grid-template-columns: repeat(3,1fr); }
      .mk-mid-row { grid-template-columns: 1fr 1fr; }
      .mk-mid-row .mk-card:last-child { grid-column: span 2; }
    }
    @media (max-width: 640px) {
      .mk-kpi-row { grid-template-columns: repeat(2,1fr); }
      .mk-mid-row { grid-template-columns: 1fr; }
      .mk-mid-row .mk-card:last-child { grid-column: span 1; }
      .mk-table-header { flex-direction: column; align-items: flex-start; }
      .mk-table-search { width: 100%; }
    }

    /* ===== COP TAGIHAN PANEL ===== */
    #tagihanCopPanel {
      display: none; padding: 10px 14px 16px;
      background: #f0f4f9; min-height: 200px;
      font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    }
    /* Toolbar COP — reuse .tg-* classes, warna aksen oranye/kuning */
    .tgc-toolbar {
      display: flex; align-items: flex-end; gap: 8px; flex-wrap: nowrap;
      background: #fff; border-radius: 8px; padding: 8px 12px;
      margin-bottom: 10px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.07);
      overflow-x: auto;
      border-left: 4px solid #d97706;
    }
    .tgc-toolbar-title {
      font-size: 13px; font-weight: 800; color: #92400e;
      margin-right: 2px; white-space: nowrap; align-self: center;
      letter-spacing: .2px; flex-shrink: 0;
    }
    .tgc-cache-info {
      font-size: 9px; color: #92400e; background: #fef9c3;
      border: 1px solid #fde68a; border-radius: 10px;
      padding: 2px 8px; white-space: nowrap; align-self: center;
      flex-shrink: 0; letter-spacing: .2px;
    }
    .tgc-btn-refresh { background: #d97706; color: #fff; }
    .tgc-btn-refresh:hover { background: #b45309; }
    .tgc-btn-reset { background: #e2e8f0; color: #475569; }
    .tgc-btn-reset:hover { background: #cbd5e1; }

    /* Summary COP — aksen oranye/kuning/hijau */
    #tgcSummary {
      display: grid;
      grid-template-columns: 1.3fr repeat(var(--tgk-card-count, 6), 1fr);
      gap: 8px; margin-bottom: 10px; overflow-x: auto;
    }
    /* Pivot COP */
    .tgc-pivot-wrap {
      background: #fff; border-radius: 8px; overflow: hidden;
      box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    }
    .tgc-pivot-title {
      font-size: 11px; font-weight: 800; color: #fff;
      background: linear-gradient(90deg,#92400e 0%,#d97706 100%);
      padding: 8px 14px; letter-spacing: .3px;
    }
    .tgc-table {
      width: 100%; border-collapse: collapse;
      font-size: 11px; color: #1e293b;
    }
    .tgc-table thead th {
      background: #1e3a5f; color: #fff; font-size: 10px;
      font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
      padding: 7px 10px; border-right: 1px solid rgba(255,255,255,0.15);
      white-space: nowrap; text-align: right;
    }
    .tgc-table thead th:first-child { text-align: left; }
    .tgc-table thead th.tgc-th-unit { text-align: left; min-width: 160px; }
    .tgc-table tbody tr:hover { background: #f0f7ff; }
    .tgc-table tbody tr:nth-child(even) { background: #f8fafc; }
    .tgc-table tbody tr:nth-child(even):hover { background: #e8f4fd; }
    .tgc-table td {
      padding: 6px 10px; border-bottom: 1px solid #e2e8f0;
      border-right: 1px solid #f1f5f9;
      text-align: right; vertical-align: middle;
    }
    .tgc-table td.tgc-td-unit { text-align: left; font-weight: 600; color: #1e3a5f; }
    .tgc-table td.tgc-td-total { font-weight: 800; color: #1e3a5f; }
    .tgc-table tfoot tr { background: #1e3a5f !important; }
    .tgc-table tfoot td {
      color: #fff; font-weight: 800; font-size: 11px;
      padding: 8px 10px; border-color: rgba(255,255,255,0.15);
    }
    /* Cell nilai + badge qty di COP — sama seperti ND: qty kiri, nilai kanan */
    .tgc-cell { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
    .tgc-cell-val { font-weight: 700; font-size: 11px; }
    .tgc-cell-qty {
      font-size: 10px; font-weight: 800; color: #fff;
      background: #64748b; border-radius: 4px;
      padding: 1px 7px; line-height: 16px;
      display: inline-block; cursor: default;
      border: 1px solid rgba(0,0,0,.12);
      min-width: 22px; text-align: center; flex-shrink: 0;
    }
    /* Warna badge qty per status KIT */
    .tgc-cell-qty.age-lte30 { background: #16a34a; }
    .tgc-cell-qty.age-gt30  { background: #0891b2; }
    .tgc-cell-qty.age-gt60  { background: #d97706; }
    .tgc-cell-qty.age-gt6m  { background: #ea580c; }
    .tgc-cell-qty.age-gt1y  { background: #dc2626; }
    .tgc-cell-qty.age-gt2y  { background: #7e22ce; }
    .tgc-loading { padding: 40px 20px; text-align: center; color: #64748b; font-size: 13px; }

    .tgc-status-badge {
      display: inline-block; font-size: 9px; font-weight: 700;
      padding: 1px 7px; border-radius: 8px; white-space: nowrap;
    }

    /* ===== TAGIHAN SUB-MENU BAR ===== */
    #tagihanSubBar {
      display: none; /* tampil hanya saat mode tagihan aktif */
      background: #1e3a5f; padding: 0 12px;
      border-top: 1px solid rgba(255,255,255,0.08);
    }
    .tg-sub-btn {
      background: transparent; border: none; cursor: pointer;
      color: #94a3b8; font-size: 11px; font-weight: 700;
      padding: 6px 16px; border-radius: 0;
      white-space: nowrap; letter-spacing: .4px;
      border-bottom: 3px solid transparent;
      transition: all 0.15s; display: inline-flex; align-items: center; gap: 5px;
    }
    .tg-sub-btn:hover { color: #fff; background: rgba(255,255,255,0.07); }
    .tg-sub-btn.active { color: #fef3c7; border-bottom-color: #f59e0b; background: rgba(245,158,11,0.10); }
    .tg-sub-btn[data-sub="kit"].active { color: #a7f3d0; border-bottom-color: #10b981; background: rgba(16,185,129,0.10); }
    .tg-sub-btn[data-sub="cop"].active { color: #99f6e4; border-bottom-color: #0f766e; background: rgba(15,118,110,0.10); }
    .tg-sub-dot {
      display: inline-block; width: 7px; height: 7px;
      border-radius: 50%; background: currentColor; opacity: .7;
    }

    /* ===== COP TAGIHAN PANEL ===== */
    #tagihanCopPanel {
      display: none; padding: 10px 14px 16px;
      background: #f0f4f9; min-height: 200px;
      font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    }
    .tgc-toolbar {
      display: flex; align-items: flex-end; gap: 8px; flex-wrap: nowrap;
      background: #fff; border-radius: 8px; padding: 8px 12px;
      margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.07);
      overflow-x: auto;
    }
    .tgc-toolbar-title {
      font-size: 13px; font-weight: 800; color: #065f46;
      margin-right: 2px; white-space: nowrap; align-self: center;
      letter-spacing: .2px; flex-shrink: 0;
    }
    .tgk-filter-group { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
    .tgk-filter-label {
      font-size: 9px; font-weight: 700; color: #64748b;
      text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
    }
    .tgk-filter-select {
      font-size: 11px; padding: 3px 7px; border: 1px solid #cbd5e1;
      border-radius: 4px; background: #fff; color: #1e293b;
      cursor: pointer; width: auto; min-width: 0; max-width: 170px; height: 26px;
    }
    .tgk-filter-input {
      font-size: 11px; padding: 3px 6px; border: 1px solid #cbd5e1;
      border-radius: 4px; background: #fff; color: #1e293b;
      cursor: pointer; width: 108px; height: 26px;
    }
    .tgc-btn-refresh, .tgc-btn-reset {
      border: none; border-radius: 4px; padding: 0 12px;
      font-size: 11px; font-weight: 700; cursor: pointer;
      white-space: nowrap; height: 26px; flex-shrink: 0;
      display: inline-flex; align-items: center; gap: 4px;
    }
    .tgc-btn-refresh { background: #059669; color: #fff; }
    .tgc-btn-refresh:hover { background: #047857; }
    .tgc-btn-reset   { background: #e2e8f0; color: #475569; }
    .tgc-btn-reset:hover { background: #cbd5e1; }
    .tgk-summary {
      display: grid;
      grid-template-columns: 1.3fr repeat(var(--tgk-card-count, 6), 1fr);
      gap: 8px; margin-bottom: 10px; overflow-x: auto;
    }
    .tgc-pivot-wrap {
      background: #fff; border-radius: 10px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.07); overflow: hidden;
    }
    .tgc-pivot-title {
      padding: 8px 14px; font-size: 12px; font-weight: 700;
      color: #1e3a5f; border-bottom: 1px solid #e2e8f0; background: #f8fafc;
    }
    .tgk-schedule-badge {
      display: inline-flex; align-items: center; gap: 4px;
      background: #ecfdf5; border: 1px solid #6ee7b7;
      color: #065f46; font-size: 9px; font-weight: 700;
      padding: 2px 7px; border-radius: 10px; white-space: nowrap;
      letter-spacing: .3px; align-self: center;
    }
    .tgc-loading { padding: 32px; text-align: center; color: #64748b; font-size: 13px; }
    /* COP Tagihan — warna badge bucket umur piutang */
    .tgc-cell-qty.age-lte30 { background: #16a34a; }   /* ≤30 hari  — hijau */
    .tgc-cell-qty.age-gt30  { background: #0891b2; }   /* >30 hari  — biru teal */
    .tgc-cell-qty.age-gt60  { background: #d97706; }   /* >60 hari  — oranye */
    .tgc-cell-qty.age-gt6m  { background: #ea580c; }   /* >6 bulan  — oranye tua */
    .tgc-cell-qty.age-gt1y  { background: #dc2626; }   /* >1 tahun  — merah */
    .tgc-cell-qty.age-gt2y  { background: #7e22ce; }   /* >2 tahun  — ungu */
    /* COP pivot header bucket warna */
    .tgc-th-lte30 { background: #15803d !important; }
    .tgc-th-gt30  { background: #0e7490 !important; }
    .tgc-th-gt60  { background: #b45309 !important; }
    .tgc-th-gt6m  { background: #c2410c !important; }
    .tgc-th-gt1y  { background: #b91c1c !important; }
    .tgc-th-gt2y  { background: #6b21a8 !important; }

    /* ===== MGT KONTRAK PANEL (PEMBANGKIT DASHBOARD) — responsive block ===== */
    /* (styles defined in primary CSS block above) */

    .tg-empty { color: #cbd5e1; font-size: 13px; }
    #mgtKontrakPanel.visible { display: block; }

    .tg-empty { color: #cbd5e1; font-size: 13px; }

    /* ===== TAGIHAN PANEL ===== */
    /* ===== TAGIHAN PANEL ===== */
    #tagihanPanel {
      display: none; padding: 10px 14px 16px;
      background: #f0f4f9; min-height: 200px;
      font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    }
    #tagihanPanel.visible { display: block; }

    /* --- Toolbar filter --- */
    .tg-toolbar {
      display: flex; align-items: flex-end; gap: 8px; flex-wrap: nowrap;
      background: #fff; border-radius: 8px; padding: 8px 12px;
      margin-bottom: 10px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.07);
      overflow-x: auto;
    }
    .tg-toolbar-title {
      font-size: 13px; font-weight: 800; color: #1e3a5f;
      margin-right: 2px; white-space: nowrap; align-self: center;
      letter-spacing: .2px; flex-shrink: 0;
    }
    .tg-filter-group { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
    .tg-filter-label {
      font-size: 9px; font-weight: 700; color: #64748b;
      text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
    }
    .tg-filter-select {
      font-size: 11px; padding: 3px 7px; border: 1px solid #cbd5e1;
      border-radius: 4px; background: #fff; color: #1e293b;
      cursor: pointer; width: auto; min-width: 0; max-width: 160px; height: 26px;
    }
    .tg-filter-input {
      font-size: 11px; padding: 3px 6px; border: 1px solid #cbd5e1;
      border-radius: 4px; background: #fff; color: #1e293b;
      cursor: pointer; width: 108px; height: 26px;
    }
    .tg-btn-refresh, .tg-btn-reset, .tg-btn-resume {
      border: none; border-radius: 4px; padding: 0 12px;
      font-size: 11px; font-weight: 700; cursor: pointer;
      white-space: nowrap; height: 26px; flex-shrink: 0;
      display: inline-flex; align-items: center; gap: 4px;
    }
    .tg-btn-refresh { background: #0284c7; color: #fff; }
    .tg-btn-refresh:hover { background: #0369a1; }
    .tg-btn-reset { background: #e2e8f0; color: #475569; }
    .tg-btn-reset:hover { background: #cbd5e1; }
    .tg-btn-resume { background: #16a34a; color: #fff; }
    .tg-btn-resume:hover { background: #15803d; }

    /* --- Summary cards --- */
    .tg-summary {
      display: flex; gap: 8px; flex-wrap: nowrap; margin-bottom: 10px;
      overflow-x: auto; padding-bottom: 2px;
    }
    /* --- Summary cards (new design: grid, wave, line) --- */
    .tg-summary {
      display: grid;
      grid-template-columns: 1.3fr repeat(var(--tg-card-count, 6), 1fr);
      gap: 8px; margin-bottom: 10px;
      overflow-x: auto;
    }
    .tg-summary-card-main,
    .tg-summary-card {
      position: relative; overflow: hidden;
      border-radius: 12px;
      border: 1px solid #e1e8f0;
      border-top: 4px solid var(--sc-accent, #1769d5);
      box-shadow: 0 4px 12px rgba(27,76,122,.10);
      padding: 12px 14px;
      display: flex; flex-direction: column;
      background: #fff;
      min-width: 0;
    }
    /* wave decoration */
    .tg-summary-card::after, .tg-summary-card-main::after {
      content: ''; position: absolute;
      width: 150%; height: 60px;
      left: -25%; bottom: -34px;
      background: var(--sc-wave, #eef6ff);
      border-radius: 50% 50% 0 0;
      transform: rotate(-3deg);
    }
    /* === TOTAL card === */
    .tg-summary-card-main {
      --sc-accent: #1769d5;
      background: linear-gradient(145deg, #1769d5 0%, #0f72d9 65%, #0a5fc4 100%);
      border: none;
      box-shadow: 0 6px 16px rgba(20,95,180,.25);
      color: #fff;
    }
    .tg-summary-card-main::after { background: rgba(255,255,255,.08); }
    .tg-summary-card-main .tg-sc-icon {
      background: rgba(255,255,255,.20); color: #fff;
    }
    .tg-summary-card-main .tg-sc-label {
      color: rgba(255,255,255,.90); border-bottom-color: rgba(255,255,255,.25);
    }
    .tg-summary-card-main .tg-sc-val   { color: #fff; font-size: 26px; }
    .tg-summary-card-main .tg-sc-sub   {
      background: rgba(255,255,255,.18); color: #fff;
    }
    /* === Status cards shared === */
    .tg-sc-icon {
      width: 38px; height: 38px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 18px; margin-bottom: 8px;
      position: relative; z-index: 2; flex-shrink: 0;
    }
    .tg-sc-label {
      font-size: 11px; font-weight: 800; color: #173b62;
      text-transform: uppercase; letter-spacing: .3px;
      white-space: normal; line-height: 1.2;
      border-bottom: 2px solid currentColor; padding-bottom: 5px; margin-bottom: 6px;
      position: relative; z-index: 2;
    }
    /* gradient line seperti referensi */
    .tg-sc-line {
      width: 100%; height: 2px; margin-bottom: 7px;
      background: linear-gradient(to right, var(--sc-accent,#1769d5) 55%, #dce8f5 55%);
      position: relative; z-index: 2;
    }
    .tg-sc-val {
      font-size: 20px; font-weight: 800;
      color: var(--sc-accent, #1769d5);
      letter-spacing: -.3px; white-space: nowrap;
      line-height: 1.2; position: relative; z-index: 2;
    }
    .tg-sc-sub {
      margin-top: auto; padding-top: 8px;
      background: var(--sc-pill, #e5f0ff);
      border-radius: 20px; padding: 5px 11px;
      font-size: 11px; font-weight: 600;
      color: #244d73; white-space: nowrap;
      display: inline-flex; align-items: center; gap: 4px;
      position: relative; z-index: 3; width: fit-content;
    }
    /* hide legacy classes */
    .tg-summary-label, .tg-summary-val, .tg-summary-sub { display: none; }
    .tg-status-dot { display: none; }

    /* --- Pivot wrapper --- */
    .tg-pivot-wrap {
      background: #fff; border-radius: 8px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.07);
      padding: 10px 12px; overflow-x: auto;
    }
    .tg-pivot-title {
      font-size: 11px; font-weight: 800; color: #1e3a5f;
      margin-bottom: 8px; letter-spacing: .3px;
    }

    /* --- Pivot table --- */
    .tg-pivot-table {
      border-collapse: collapse; width: 100%;
      font-size: 11px; font-family: inherit;
    }
    .tg-pivot-table thead th {
      background: #1e3a5f; color: #fff;
      padding: 6px 10px;
      text-align: center; font-weight: 700; white-space: nowrap;
      border: 1px solid #2d5080; font-size: 10px;
      letter-spacing: .3px; text-transform: uppercase;
    }
    .tg-pivot-table thead th.row-hdr {
      text-align: left; white-space: nowrap; min-width: 140px; width: 1%; max-width: 220px;
    }
    .tg-pivot-table tbody tr:nth-child(odd)  { background: #fff; }
    .tg-pivot-table tbody tr:nth-child(even) { background: #f8fafc; }
    .tg-pivot-table tbody tr:hover { background: #dbeafe; transition: background .1s; }
    .tg-pivot-table tbody td {
      padding: 5px 8px; border: 1px solid #e2e8f0;
      white-space: nowrap; color: #334155;
      vertical-align: middle; font-size: 11px;
    }
    .tg-pivot-table tbody td.row-hdr {
      text-align: left; font-weight: 700; color: #1e3a5f;
      font-size: 11px; width: 1%; white-space: nowrap;
      background: #f1f5f9; border-right: 2px solid #cbd5e1;
      vertical-align: middle; padding: 5px 10px;
    }

    /* --- Cell content --- */
    .tg-cell-nilai {
      font-size: 11px; font-weight: 700; color: #1e293b; display: inline;
    }
    .tg-cell-qty   { display: none; }
    .tg-cell-qty-badge {
      display: inline-block; background: #dbeafe; color: #1d4ed8;
      border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 800;
    }
    .tg-qty-btn {
      display: inline-block; background: #dbeafe; color: #1d4ed8;
      border-radius: 4px; padding: 1px 7px; font-size: 10px; font-weight: 800;
      cursor: pointer; border: 1px solid #bfdbfe; font-family: inherit;
      transition: background .12s, transform .08s;
      min-width: 22px; text-align: center;
    }
    .tg-qty-btn:hover {
      background: #1d4ed8; color: #fff; border-color: #1d4ed8;
      transform: scale(1.1);
    }

    /* --- Footer grand total --- */
    .tg-pivot-table tfoot tr { background: #1e3a5f !important; }
    .tg-pivot-table tfoot td {
      padding: 5px 8px; font-weight: 800; color: #fff;
      border: 1px solid #2d5080; white-space: nowrap; font-size: 11px;
    }
    .tg-pivot-table tfoot td.row-hdr {
      text-align: left; background: #1e3a5f; color: #fff;
      white-space: nowrap; font-size: 11px; padding: 5px 10px;
    }

    /* --- Misc --- */
    .tg-empty { color: #94a3b8; font-size: 12px; }
    .tg-status-dot {
      display: inline-block; width: 7px; height: 7px;
      border-radius: 50%; margin-right: 4px; vertical-align: middle;
    }
    .tg-loading {
      padding: 40px; text-align: center;
      color: #64748b; font-size: 12px;
    }

    /* ===============================================
       INFO-GRAFIS PANEL -- Professional Dashboard
    ================================================ */
    .infografis-panel {
      display: none; flex: 1 1 0; overflow-y: auto;
      background: #f0f4f9; padding: 14px 16px 20px;
    }
    .infografis-panel.visible { display: block; }

    /* -- Gauge row: 3 kolom simetris -- */
    .ig-gauge-row {
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 12px; margin-bottom: 12px;
    }

    /* Card container: flex row -- gauge kiri, status panel kanan */
    .ig-gauge-card {
      background: #fff; border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      padding: 16px 18px 14px;
      display: flex; flex-direction: column;
      min-height: 0;
    }

    /* -- Header: judul kiri + ikon kanan -- */
    .ig-gauge-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 10px;
    }
    .ig-gauge-title {
      font-size: 16px; font-weight: 900; color: #1e293b;
      letter-spacing: 0.8px; line-height: 1;
    }
    .ig-gauge-subtitle {
      font-size: 9px; color: #94a3b8; font-style: italic;
      margin-top: 2px; font-weight: 400;
    }
    .ig-gauge-icon-big {
      font-size: 22px; line-height: 1; opacity: 0.85;
    }

    /* -- Body: gauge SVG kiri | status panel kanan -- */
    .ig-gauge-body {
      display: flex; flex-direction: row;
      align-items: center; gap: 12px; flex: 1;
    }
    .ig-gauge-left {
      display: flex; flex-direction: column; align-items: center;
      flex: 1; min-width: 0;
    }
    .ig-gauge-svg {
      width: 100%; max-width: 220px; height: auto; overflow: visible;
      display: block;
    }
    .ig-gauge-value-row {
      display: flex; align-items: baseline; gap: 2px;
      margin-top: -2px;
    }
    .ig-gauge-value {
      font-size: 34px; font-weight: 900; line-height: 1;
      letter-spacing: -1px;
    }
    .ig-gauge-unit {
      font-size: 12px; font-weight: 600; color: #64748b;
    }
    .ig-gauge-target {
      font-size: 10px; font-weight: 600; color: #94a3b8;
      margin-top: 3px; letter-spacing: 0.2px;
      text-transform: uppercase;
    }

    /* -- Status panel kanan (legacy base, overridden oleh -v2) -- */
    .ig-gauge-right {
      display: flex; flex-direction: column;
      min-width: 150px; flex-shrink: 0;
      border-left: 1px solid #f1f5f9; padding-left: 14px;
    }
    .ig-status-label {
      font-size: 9px; color: #94a3b8; font-weight: 500;
      text-transform: uppercase; letter-spacing: 0.5px;
    }
    .ig-status-good   { background: #dcfce7; color: #16a34a; }
    .ig-status-warn   { background: #fef3c7; color: #b45309; }
    .ig-status-bad    { background: #fee2e2; color: #dc2626; }
    .ig-status-nodata { background: #f1f5f9; color: #94a3b8; }
    .ig-selisih-label {
      font-size: 9px; color: #94a3b8; font-weight: 500;
      margin-top: 4px;
    }
    .ig-gauge-delta {
      font-size: 18px; font-weight: 900; letter-spacing: -0.5px;
      line-height: 1;
    }
    .ig-delta-good { color: #16a34a; }
    .ig-delta-bad  { color: #dc2626; }
    .ig-delta-none { color: #94a3b8; font-size: 14px; }
    .ig-delta-unit {
      font-size: 10px; font-weight: 600; color: inherit;
    }

    /* -- Panel kanan v2: 4 baris STATUS/TARGET/REALISASI/SELISIH -- */
    .ig-gauge-right-v2 {
      display: flex; flex-direction: column; gap: 6px;
      min-width: 150px; width: 150px; flex-shrink: 0;
      border-left: 1px solid #f1f5f9; padding-left: 14px;
    }
    .igp-row { display: flex; flex-direction: column; gap: 1px; }
    .igp-lbl {
      font-size: 8.5px; font-weight: 700; color: #94a3b8;
      text-transform: uppercase; letter-spacing: 0.6px;
    }
    .igp-val {
      font-size: 15px; font-weight: 800; color: #1e293b; line-height: 1.1;
      white-space: nowrap;
    }
    .igp-desc {
      font-size: 8px; color: #94a3b8; font-weight: 400; white-space: nowrap;
    }
    .ig-gauge-status {
      font-size: 11px; font-weight: 700; padding: 3px 10px;
      border-radius: 16px; display: inline-flex; align-items: center;
      gap: 4px; line-height: 1.3; width: fit-content; white-space: nowrap;
    }
    .igp-status-icon { font-size: 12px; }
    .igp-status-sub  { font-size: 8.5px; font-weight: 400; margin-top: 2px; white-space: nowrap; }
    .ig-gauge-target-lbl {
      font-size: 9px; font-weight: 700; color: #1e3a5f;
      margin-top: 3px; letter-spacing: 0.2px;
      background: #e8f0fe; border-radius: 10px;
      padding: 2px 8px; display: inline-block;
    }

    /* -- Legend zona warna (EFOR/SFC) -- */
    .ig-zone-legend {
      display: flex; align-items: center; flex-wrap: wrap;
      gap: 4px 8px; margin-top: 8px; padding-top: 7px;
      border-top: 1px solid #f1f5f9;
      font-size: 9px; color: #64748b;
    }
    .ig-zone-dot {
      width: 10px; height: 10px; border-radius: 3px;
      display: inline-block; flex-shrink: 0;
    }
    .ig-zone-txt { font-weight: 500; }
    .ig-zone-sep { color: #cbd5e1; font-size: 10px; }

    /* -- Bar charts grid: 3 kolom -- */
    .ig-bar-grid {
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }
    .ig-bar-section {
      background: #fff; border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      padding: 12px 14px 10px;
      display: flex; flex-direction: column;
    }
    /* Header bar section */
    .ig-bar-title {
      font-size: 11px; font-weight: 800; color: #1e293b;
      display: flex; align-items: center; gap: 5px;
      letter-spacing: 0.2px; margin-bottom: 2px;
    }
    .ig-bar-title-count {
      font-size: 10px; color: #94a3b8; font-weight: 400;
    }
    /* Legend */
    .ig-legend {
      display: flex; gap: 10px; flex-wrap: wrap;
      margin-bottom: 8px; margin-top: 4px;
    }
    .ig-legend-item {
      display: flex; align-items: center; gap: 3px;
      font-size: 9px; color: #64748b;
    }
    .ig-legend-dot {
      width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0;
    }
    /* Bar rows */
    .ig-bar-row {
      display: flex; align-items: center; gap: 5px;
      margin-bottom: 5px; min-height: 18px;
    }
    .ig-bar-rank {
      width: 14px; font-size: 9px; font-weight: 700;
      color: #94a3b8; text-align: right; flex-shrink: 0;
    }
    .ig-bar-label {
      width: 130px; font-size: 10px; color: #334155;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      flex-shrink: 0; font-weight: 600;
    }
    .ig-bar-track {
      flex: 1; height: 8px; background: #f1f5f9;
      border-radius: 4px; overflow: hidden;
    }
    .ig-bar-fill {
      height: 100%; border-radius: 4px;
      transition: width 0.5s ease;
    }
    .ig-bar-valtext {
      width: 56px; font-size: 10px; font-weight: 700;
      color: #1e293b; text-align: right; flex-shrink: 0;
    }
    /* Warna kategori */
    .ig-bar-best  { background: #eab308; }
    .ig-bar-low   { background: #3b82f6; }
    .ig-bar-mid   { background: #94a3b8; }
    .ig-bar-worst { background: #ef4444; }
    /* Footer per bar chart */
    .ig-bar-footer {
      margin-top: 8px; padding-top: 7px; border-top: 1px solid #f1f5f9;
      font-size: 10px; font-weight: 600; color: #64748b;
      display: flex; align-items: center; gap: 5px;
    }
    /* Keterangan panel bawah */
    .ig-keterangan {
      background: #fff; border-radius: 10px;
      box-shadow: 0 1px 5px rgba(0,0,0,0.07);
      padding: 9px 16px; margin-top: 12px;
      font-size: 10px; color: #64748b;
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    }
    .ig-keterangan-icon { color: #3b82f6; font-size: 13px; flex-shrink: 0; }
    .ig-ket-item { display: flex; align-items: center; gap: 3px; }
    .ig-ket-sep  { color: #cbd5e1; font-weight: 900; padding: 0 2px; }

    /* ===== TABEL RANKING (FOH+EFDH)xDMN ===== */
    .ig-fohe-wrap {
      background: #fff; border-radius: 10px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.08);
      padding: 14px 16px 12px; margin-top: 14px;
    }
    .ig-fohe-title {
      font-size: 12px; font-weight: 800; color: #1e3a5f;
      letter-spacing: .3px; margin-bottom: 10px;
      display: flex; align-items: center; gap: 8px;
    }
    .ig-fohe-title-spacer { flex: 1; }
    .ig-fohe-excel-btn {
      display: inline-flex; align-items: center; gap: 4px;
      background: #1d6f42; color: #fff; border: none; border-radius: 5px;
      padding: 3px 9px; font-size: 10px; font-weight: 700; cursor: pointer;
      white-space: nowrap; flex-shrink: 0; line-height: 1.5;
      box-shadow: 0 1px 4px rgba(0,0,0,.18);
    }
    .ig-fohe-excel-btn:hover { background: #15532e; }
    .ig-fohe-excel-btn svg { flex-shrink:0; }
    .ig-fohe-subtitle {
      font-size: 10px; font-weight: 400; color: #64748b; margin-left: 4px;
    }
    .ig-fohe-table {
      width: 100%; border-collapse: collapse;
      font-size: 10.5px; color: #1e293b;
    }
    .ig-fohe-table thead th {
      background: #1e3a5f; color: #fff;
      padding: 6px 10px; text-align: left;
      font-size: 10px; font-weight: 700;
      position: sticky; top: 0;
    }
    .ig-fohe-table thead th.num { text-align: right; }
    .ig-fohe-table tbody tr:nth-child(even) { background: #f1f5f9; }
    .ig-fohe-table tbody tr:hover { background: #dbeafe; }
    .ig-fohe-table tbody td {
      padding: 5px 10px; border-bottom: 1px solid #e2e8f0;
    }
    .ig-fohe-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
    .ig-fohe-table tbody td.rank {
      font-weight: 800; color: #1e3a5f; text-align: center; width: 32px;
    }
    .ig-fohe-table tbody tr.rank-top3 td.rank { color: #b45309; }
    .ig-fohe-table tbody tr.rank-top3 { background: #fefce8; }
    .ig-fohe-table tbody tr.rank-top3:nth-child(even) { background: #fef9c3; }
    .ig-fohe-hidden { display: none; }
    .ig-fohe-btn {
      display: flex; align-items: center; justify-content: center;
      gap: 6px; margin-top: 10px;
      background: #f1f5f9; border: 1px solid #cbd5e1;
      border-radius: 7px; padding: 7px 18px;
      font-size: 11px; font-weight: 700; color: #1e3a5f;
      cursor: pointer; width: 100%;
      transition: background .15s;
    }
    .ig-fohe-btn:hover { background: #dbeafe; border-color: #93c5fd; }

    /* =====================
       PETA KINERJA NUSA DAYA (SVG)
       ===================== */
    .peta-wrap {
      background: #f0f4f8; border-radius: 12px; overflow: hidden;
      box-shadow: 0 4px 18px rgba(0,0,0,0.32);
      font-family: 'Segoe UI', Arial, sans-serif;
    }
    .peta-header {
      display: flex; align-items: center; justify-content: center;
      padding: 10px 16px 6px; gap: 8px;
    }
    .peta-header-icon { font-size: 16px; }
    .peta-title {
      text-align: center; font-size: 13px; font-weight: 800;
      color: #e2e8f0; letter-spacing: 1.8px;
      text-transform: uppercase;
    }
    .peta-svg-wrap {
      position: relative; width: 100%; line-height: 0;
    }
    .peta-svg-wrap svg { width: 100%; height: auto; display: block; }
    /* UP Card overlay */
    .peta-up-card {
      position: absolute; transform: translate(-50%, -50%);
      cursor: pointer; z-index: 10;
      transition: transform 0.15s, z-index 0s;
    }
    .peta-up-card:hover { transform: translate(-50%, -50%) scale(1.08); z-index: 50; }
    .peta-up-inner {
      background: rgba(10,30,70,0.96);
      border: 1.5px solid rgba(255,255,255,0.22);
      border-radius: 8px;
      padding: 6px 9px 6px;
      box-shadow: 0 3px 14px rgba(0,0,0,0.65);
      min-width: 148px; text-align: left;
      backdrop-filter: blur(6px);
    }
    .peta-up-card:hover .peta-up-inner {
      border-color: rgba(255,255,255,0.55);
      box-shadow: 0 6px 24px rgba(0,0,0,0.8);
    }
    .peta-kpi-hdr {
      display: flex; align-items: center; gap: 6px;
      margin-bottom: 5px;
    }
    .peta-up-label {
      font-size: 9.5px; font-weight: 800; color: #e2e8f0;
      letter-spacing: 0.4px; white-space: nowrap;
      text-transform: uppercase; line-height: 1.2;
    }
    .peta-up-statusdot {
      width: 9px; height: 9px; border-radius: 50%;
      border: 1.5px solid rgba(255,255,255,0.6);
      flex-shrink: 0;
    }
    .peta-kpi-tbl {
      width: 100%; border-collapse: collapse;
      font-size: 9.5px; color: #cbd5e1;
    }
    .peta-kpi-tbl th {
      font-size: 8.5px; font-weight: 700; color: #7dd3fc;
      padding: 2px 5px 3px; text-align: center;
      border-bottom: 1px solid rgba(100,180,255,0.2);
      white-space: nowrap; letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .peta-kpi-tbl td {
      padding: 2px 5px; text-align: center;
      white-space: nowrap; line-height: 1.5;
    }
    .peta-kpi-tbl td:first-child {
      font-size: 9px; font-weight: 700; color: #94a3b8;
      text-align: left;
    }
    .peta-kpi-tbl tbody tr:not(:last-child) td {
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .peta-kpi-tbl .kpi-good { color: #4ade80; font-weight: 800; }
    .peta-kpi-tbl .kpi-bad  { color: #f87171; font-weight: 800; }
    .peta-kpi-tbl .kpi-warn { color: #fbbf24; font-weight: 800; }
    .peta-kpi-tbl .kpi-na   { color: #475569; }
    .peta-up-dot-row {
      display: flex; align-items: center; justify-content: center;
      gap: 4px; margin: 2px 0 1px;
    }
    .peta-up-eaf {
      font-size: 11px; font-weight: 900; line-height: 1;
    }
    .peta-up-kpirow {
      display: flex; gap: 4px; justify-content: center;
      margin-top: 1px;
    }
    .peta-up-kpibadge {
      font-size: 7px; font-weight: 700; padding: 1px 4px;
      border-radius: 3px; line-height: 1.3;
      background: rgba(255,255,255,0.08); color: #94a3b8;
      white-space: nowrap;
    }
    .peta-up-kpibadge.good  { background: rgba(22,163,74,0.2);  color: #4ade80; }
    .peta-up-kpibadge.bad   { background: rgba(220,38,38,0.2);  color: #f87171; }
    .peta-up-kpibadge.warn  { background: rgba(245,158,11,0.2); color: #fbbf24; }
    .peta-up-nodata { font-size: 8px; color: #64748b; margin-top: 1px; }
    /* Connector line from card to island */
    /* Legend */
    .peta-legend {
      display: flex; gap: 14px; padding: 7px 16px 9px;
      align-items: center; flex-wrap: wrap;
      font-size: 9px; color: #334155; background: rgba(30,80,160,0.08);
    }
    .peta-leg-dot {
      width: 9px; height: 9px; border-radius: 50%;
      display: inline-block; margin-right: 4px;
      border: 1.5px solid rgba(255,255,255,0.3);
      vertical-align: middle;
    }

    /* -- Monthly Section (tabel + grouped bar) -- */
    .ig-monthly-section {
      background: #fff; border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      padding: 14px 16px 12px; margin-top: 14px;
    }
    .ig-monthly-title {
      font-size: 12px; font-weight: 800; color: #1e293b;
      letter-spacing: 0.3px; margin-bottom: 10px;
      display: flex; align-items: center; gap: 6px;
      border-bottom: 2px solid #e2e8f0; padding-bottom: 8px;
    }
    .ig-monthly-unit {
      font-size: 10px; font-weight: 400; color: #64748b; margin-left: 4px;
    }
    .ig-monthly-wrap {
      display: flex; flex-direction: column; gap: 14px;
    }
    /* Tabel bulanxUID */
    .ig-monthly-tbl {
      border-collapse: collapse; font-size: 10px;
      table-layout: fixed;
    }
    .ig-monthly-tbl th {
      background: #1e3a5f; color: #93c5fd; font-size: 9.5px; font-weight: 700;
      padding: 4px 6px; text-align: center; white-space: nowrap;
      border: 1px solid #2d5a9e;
    }
    .ig-monthly-tbl th.tbl-row-hdr {
      text-align: left; min-width: 44px;
    }
    .ig-monthly-tbl td {
      border: 1px solid #e2e8f0; padding: 3px 6px;
      text-align: right; font-size: 9.5px; color: #334155; white-space: nowrap;
    }
    .ig-monthly-tbl td.row-hdr {
      background: #f8fafc; color: #475569; font-weight: 700;
      text-align: left; white-space: nowrap;
    }
    .ig-monthly-tbl tr:nth-child(even) td:not(.row-hdr) { background: #f8fafc; }
    .ig-monthly-tbl tr:hover td { background: #eff6ff!important; }
    /* Grouped bar chart SVG container */
    .ig-mbar-svg {
      display: block;
    }
    /* Legend bulan di monthly section */
    .ig-monthly-legend {
      display: flex; flex-wrap: wrap; gap: 8px;
      margin-bottom: 8px;
    }
    .ig-monthly-legend-item {
      display: flex; align-items: center; gap: 4px;
      font-size: 9.5px; color: #475569;
    }
    .ig-monthly-legend-dot {
      width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
    }

    /* ==============================================
       DATA ASSET -- filter bar + table
    ============================================== */

    /* Filter bar inline di bawah tab DATA ASSET */
    .asset-filter-bar {
      display: none; align-items: center; gap: 8px; flex-wrap: wrap;
      padding: 7px 12px; background: #f8fafc;
      border-bottom: 1px solid #e2e8f0;
    }
    .asset-filter-bar.visible { display: flex; }
    .asset-filter-label {
      font-size: 10px; font-weight: 700; color: #475569;
      white-space: nowrap; text-transform: uppercase; letter-spacing: 0.4px;
    }

    /* Wrapper dropdown filter */
    .af-dropdown-wrap {
      position: relative; display: inline-block;
    }
    .af-btn {
      display: flex; align-items: center; gap: 5px;
      background: #fff; border: 1px solid #cbd5e1; border-radius: 5px;
      padding: 4px 10px; font-size: 11px; font-weight: 600; color: #334155;
      cursor: pointer; white-space: nowrap; min-width: 120px;
      justify-content: space-between;
    }
    .af-btn:hover { border-color: #0369a1; color: #0369a1; }
    .af-btn.active { border-color: #0369a1; background: #e0f2fe; color: #0369a1; }
    .af-btn-arrow { font-size: 8px; color: #94a3b8; margin-left: 4px; }

    /* Panel dropdown */
    .af-panel {
      display: none; position: absolute; top: calc(100% + 4px); left: 0;
      background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.12); z-index: 500;
      min-width: 200px; max-height: 320px;
      display: none; flex-direction: column;
    }
    .af-panel.open { display: flex; }


    /* Semua / Reset baris atas */
    .af-actions {
      display: flex; align-items: center; justify-content: space-between;
      padding: 5px 10px; border-bottom: 1px solid #f1f5f9; flex-shrink: 0;
    }
    .af-action-btn {
      font-size: 10px; font-weight: 700; color: #0369a1;
      background: none; border: none; cursor: pointer; padding: 2px 4px;
    }
    .af-action-btn:hover { text-decoration: underline; }
    .af-count-badge {
      font-size: 10px; color: #94a3b8;
    }

    /* Daftar checkbox */
    .af-list {
      overflow-y: auto; flex: 1; padding: 4px 0;
    }
    .af-item {
      display: flex; align-items: center; gap: 8px;
      padding: 5px 12px; cursor: pointer; font-size: 11px; color: #334155;
      transition: background 0.1s;
    }
    .af-item:hover { background: #f0f9ff; }
    .af-item input[type=checkbox] { cursor: pointer; accent-color: #0369a1; flex-shrink: 0; }
    .af-item-label { flex: 1; }
    .af-item-count { font-size: 9px; color: #94a3b8; }
    .af-item.hidden { display: none; }   /* hasil search */

    /* Search box di dalam panel Type */
    .af-search-wrap {
      padding: 6px 8px; border-bottom: 1px solid #f1f5f9; flex-shrink: 0;
    }
    .af-search {
      width: 100%; box-sizing: border-box;
      padding: 5px 8px; font-size: 11px; color: #334155;
      border: 1px solid #cbd5e1; border-radius: 5px; outline: none;
      background: #f8fafc;
    }
    .af-search:focus { border-color: #0369a1; background: #fff; }

    /* Reset filter chip */
    .af-reset-chip {
      font-size: 10px; font-weight: 700; color: #dc2626; background: #fee2e2;
      border: none; border-radius: 12px; padding: 3px 10px; cursor: pointer;
      white-space: nowrap;
    }
    .af-reset-chip:hover { background: #fca5a5; }

    /* -- DATA ASSET table -- */
    #assetTable { width: 100%; border-collapse: collapse; font-size: 11px; background: #fff; }
    #assetTable thead th {
      background: #0c4a6e; color: #fff; font-size: 10px; font-weight: 700;
      padding: 6px 8px; white-space: nowrap; text-align: center;
      border-right: 1px solid rgba(255,255,255,0.15); position: sticky; top: 0; z-index: 2;
    }
    #assetTable thead th.text-left { text-align: left; }
    #assetTable thead th.asset-id-th { background: #1e3a5f; }
    #assetTable tbody tr.asset-row { border-bottom: 1px solid #f1f5f9; }
    #assetTable tbody tr.asset-row:hover td { background: #f0f9ff !important; }
    #assetTable tbody tr.asset-stripe td { background: #f8fbff; }
    .asset-id-cell {
      font-size: 10px; color: #334155; padding: 4px 8px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      max-width: 140px;
    }
    /* Summary bar */
    .asset-summary {
      display: flex; align-items: center; gap: 8px;
      padding: 7px 12px; background: #0c4a6e; color: #fff;
      font-size: 11px; flex-wrap: wrap;
    }
    .asset-sum-item { color: #bae6fd; }
    .asset-sum-item strong { color: #fff; }
    .asset-sum-sep { color: #38bdf8; font-weight: 900; }

    /* Excel btn di kanan */
    .btn-excel {
      background: #1a8a3a; color: #fff; border: none;
      padding: 5px 14px; border-radius: 4px; font-size: 11px;
      font-weight: 700; cursor: pointer; white-space: nowrap;
    }
    .btn-excel:hover { background: #157030; }

    /* Reload btn di topbar */
    .btn-reload-top {
      background: #e0f2d0; color: #1a5200; border: 1px solid #a8d8a0;
      padding: 5px 12px; border-radius: 4px; font-size: 11px;
      font-weight: 700; cursor: pointer; white-space: nowrap; margin-left: auto;
    }
    .btn-reload-top:hover { background: #c0e8c0; color: #0a4000; }
    .btn-reload-top:disabled { background: #d8e8d8; color: #88a888; cursor: not-allowed; }

    /* -- SIMULASI DROPDOWN TAB -- */
    .sim-tab-wrap {
      position: relative; display: inline-block;
    }
    .sim-tab-btn {
      background: transparent; border: none; cursor: pointer;
      color: #0f172a; font-size: 12px; font-weight: 700;
      padding: 0 18px; height: 42px; border-bottom: 3px solid transparent;
      white-space: nowrap; transition: color 0.15s, border-color 0.15s;
      letter-spacing: 0.3px; display: flex; align-items: center; gap: 5px;
    }
    .sim-tab-btn:hover { color: #000; }
    .sim-tab-btn.active {
      color: #000; border-bottom: 3px solid #b45309;
      background: rgba(255,255,255,0.18);
    }
    .sim-tab-btn .sim-arrow {
      font-size: 8px; margin-top: 1px; transition: transform 0.15s;
    }
    .sim-tab-btn.open .sim-arrow { transform: rotate(180deg); }

    .sim-dropdown {
      display: none; position: absolute; top: 100%; left: 0;
      background: #1e293b; border-radius: 6px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.25);
      min-width: 160px; z-index: 999; overflow: hidden;
      border: 1px solid #334155;
    }
    .sim-dropdown.open { display: block; }
    .sim-dd-item {
      display: block; width: 100%; text-align: left;
      background: none; border: none; cursor: pointer;
      padding: 9px 16px; font-size: 12px; font-weight: 700;
      color: #e2e8f0; letter-spacing: 0.3px;
      transition: background 0.12s, color 0.12s;
      white-space: nowrap;
    }
    .sim-dd-item:hover { background: #334155; color: #fff; }
    .sim-dd-item.eaf  { border-left: 3px solid #4ade80; }
    .sim-dd-item.efor { border-left: 3px solid #c084fc; }
    .sim-dd-item.sfc  { border-left: 3px solid #fb923c; }
    .sim-dd-item.eaf:hover  { background: #14532d; }
    .sim-dd-item.efor:hover { background: #3b0764; }
    .sim-dd-item.sfc:hover  { background: #431407; }

    /* -- TOMBOL PRINT PDF (di panel infografis) -- */
    .btn-ig-pdf {
      background: #dc2626; color: #fff; border: none;
      padding: 5px 14px; border-radius: 6px; font-size: 11px;
      font-weight: 700; cursor: pointer; white-space: nowrap;
      display: inline-flex; align-items: center; gap: 5px;
      letter-spacing: 0.3px; transition: background 0.15s;
    }
    .btn-ig-pdf:hover { background: #b91c1c; }
    .btn-ig-pdf:active { background: #991b1b; }

    /* -- FILTER SIDEBAR -- */
    .sidebar-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.35); z-index: 200;
    }
    .sidebar-overlay.open { display: block; }

    .filter-sidebar {
      position: fixed; top: 0; left: -320px; width: 300px; height: 100vh;
      background: #fff; z-index: 300;
      box-shadow: 4px 0 20px rgba(0,0,0,0.18);
      transition: left 0.28s cubic-bezier(.4,0,.2,1);
      display: flex; flex-direction: column;
    }
    .filter-sidebar.open { left: 0; }

    .sidebar-header {
      background: #0284c7; color: #fff;
      padding: 12px 16px; display: flex; align-items: center;
      justify-content: space-between; flex-shrink: 0;
    }
    .sidebar-header span { font-size: 13px; font-weight: 700; letter-spacing: 0.5px; }
    .sidebar-close {
      background: none; border: none; color: #fff;
      font-size: 20px; cursor: pointer; line-height: 1; padding: 2px 4px;
    }
    .sidebar-close:hover { color: #38bdf8; }

    .sidebar-body {
      padding: 14px 16px; flex: 1; overflow-y: auto; overflow-x: visible;
      display: flex; flex-direction: column; gap: 12px;
    }
    .sb-group { display: flex; flex-direction: column; gap: 4px; }
    .sb-label {
      font-size: 11px; color: #444466; font-weight: 700;
    }
    .sb-select {
      background: #fff; color: #222244;
      border: 1px solid #b0bcd0; border-radius: 4px;
      padding: 5px 8px; font-size: 11px; cursor: pointer; outline: none; width: 100%;
    }
    .sb-select:focus { border-color: #0ea5e9; }

    /* -- TARGET KPI PANEL -- */
    /* -- TARGET KPI -- sidebar strip -- */
    .kpi-section-title {
      font-size: 11px; font-weight: 800; color: #0369a1;
      text-transform: uppercase; letter-spacing: 0.5px;
      border-top: 2px solid #bae6fd; padding-top: 10px; margin-top: 2px;
    }
    .kpi-sidebar-row {
      display: flex; align-items: center; gap: 8px;
    }
    .kpi-sidebar-row label { font-size: 11px; font-weight: 700; color: #444466; white-space: nowrap; }
    .kpi-year-sel {
      background: #fff; color: #222244;
      border: 1px solid #b0bcd0; border-radius: 4px;
      padding: 4px 8px; font-size: 11px; cursor: pointer; outline: none; flex: 1;
    }
    .kpi-year-sel:focus { border-color: #0ea5e9; }
    .kpi-open-btn {
      background: #0ea5e9; color: #fff; border: none;
      padding: 6px 10px; border-radius: 4px; font-size: 11px;
      font-weight: 700; cursor: pointer; white-space: nowrap;
    }
    .kpi-open-btn:hover { background: #0369a1; }

    /* -- TARGET KPI -- modal -- */
    .kpi-modal-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.45); z-index: 3000;
      align-items: center; justify-content: center;
    }
    .kpi-modal-overlay.open { display: flex; }
    .kpi-modal {
      background: #fff; border-radius: 8px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.28);
      width: 460px; max-width: 96vw;
      max-height: 82vh;
      display: flex; flex-direction: column;
      overflow: hidden;
    }
    .kpi-modal-header {
      background: #0284c7; color: #fff;
      padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
      flex-shrink: 0;
    }
    .kpi-modal-title { font-size: 13px; font-weight: 800; letter-spacing: 0.3px; }
    .kpi-modal-close {
      background: none; border: none; color: #fff;
      font-size: 18px; cursor: pointer; line-height: 1; padding: 0 4px;
    }
    .kpi-modal-close:hover { color: #bae6fd; }
    .kpi-modal-body {
      flex: 1; overflow-y: auto; padding: 12px 14px;
    }
    .kpi-modal-year-row {
      display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
    }
    .kpi-modal-year-row label { font-size: 12px; font-weight: 700; color: #334155; white-space: nowrap; }
    .kpi-modal-year-sel {
      background: #f8fafc; color: #0f172a;
      border: 1px solid #94a3b8; border-radius: 4px;
      padding: 5px 8px; font-size: 12px; cursor: pointer; outline: none;
    }
    .kpi-modal-year-sel:focus { border-color: #0ea5e9; }
    .kpi-table {
      width: 100%; border-collapse: collapse; font-size: 11px;
    }
    .kpi-table th {
      background: #0284c7; color: #fff; font-weight: 700;
      padding: 6px 8px; text-align: center; white-space: nowrap;
      border: 1px solid #0369a1; position: sticky; top: 0; z-index: 1;
    }
    .kpi-table th.kpi-uid-th { text-align: left; min-width: 120px; }
    .kpi-table td {
      border: 1px solid #e2e8f0; padding: 3px 4px; background: #fff;
    }
    .kpi-table tr:nth-child(even) td { background: #f8fafc; }
    .kpi-table td.kpi-uid-td {
      font-size: 11px; font-weight: 600; color: #1e293b;
      white-space: nowrap; padding: 4px 8px;
    }
    .kpi-section-sep {
      font-size: 11px; font-weight: 800; color: #0369a1;
      text-transform: uppercase; letter-spacing: 0.5px;
      border-top: 2px solid #bae6fd; padding-top: 8px; margin-top: 14px; margin-bottom: 6px;
    }
    .kpi-section-sep:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
    .kpi-section-kumulative { color: #7c3aed; border-color: #ddd6fe; }
    .kpi-input {
      width: 68px; border: 1px solid #cbd5e1; border-radius: 3px;
      outline: none; background: #fff;
      font-size: 11px; text-align: right; color: #0f172a;
      padding: 3px 5px;
    }
    .kpi-input:focus { border-color: #0ea5e9; background: #eff6ff; }
    .kpi-modal-footer {
      padding: 10px 14px; border-top: 1px solid #e2e8f0;
      display: flex; align-items: center; gap: 10px; flex-shrink: 0;
    }
    .kpi-save-btn {
      flex: 1; background: #0ea5e9; color: #fff; border: none;
      padding: 8px 0; border-radius: 4px; font-size: 12px;
      font-weight: 700; cursor: pointer;
    }
    .kpi-save-btn:hover { background: #0369a1; }
    .kpi-saved-msg {
      font-size: 11px; color: #16a34a; font-weight: 700; white-space: nowrap;
    }

    .sidebar-footer {
      padding: 12px 16px; border-top: 1px solid #d0d8e8;
      display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
    }
    /* baris atas: Reset + Reload */
    .sidebar-footer-top {
      display: flex; gap: 8px; width: 100%;
    }
    /* baris bawah: Tampilkan full width */
    .sidebar-footer-bottom {
      width: 100%;
    }
    .btn-show {
      width: 100%; background: #0ea5e9; color: #fff; border: none;
      padding: 8px 0; border-radius: 4px; font-size: 12px;
      font-weight: 700; cursor: pointer;
    }
    .btn-show:hover { background: #0369a1; }
    .btn-show:disabled { background: #7dd3fc; cursor: not-allowed; }
    .btn-reset {
      flex: 1; background: #e8ecf4; color: #445566; border: 1px solid #b0bcd0;
      padding: 7px 0; border-radius: 4px; font-size: 11px; cursor: pointer;
    }
    .btn-reset:hover { background: #c8d0e0; color: #111133; }
    .btn-reload {
      flex: 1; background: #e8f4e8; color: #1a6010; border: 1px solid #90c890;
      padding: 7px 0; border-radius: 4px; font-size: 11px;
      font-weight: 700; cursor: pointer; white-space: nowrap;
    }
    .btn-reload:hover { background: #c0e8c0; color: #0a4000; }
    .btn-reload:disabled { background: #d8e8d8; color: #88a888; cursor: not-allowed; }
    .reload-status {
      width: 100%; font-size: 10px; text-align: center;
      color: #1a6010; min-height: 14px; display: none;
      padding: 2px 0; background: #f0fdf4;
    }
    .reload-status.error { color: #a01010; background: #fff1f2; }

    /* Mutual-exclusive note -- muncul saat filter pasangan aktif */
    .sb-mutex-note {
      font-size: 10px; color: #b45309; margin-top: 3px;
      padding: 2px 6px; background: #fef3c7; border-radius: 3px;
      border: 1px solid #fde68a;
    }

    /* MULTI-SELECT CHECKLIST DROPDOWN -- di dalam sidebar */
    .ms-wrap { position: relative; display: block; }
    .ms-btn {
      background: #fff; color: #222244;
      border: 1px solid #b0bcd0; border-radius: 4px;
      padding: 5px 24px 5px 8px; font-size: 11px; cursor: pointer;
      width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      text-align: left; position: relative; outline: none;
    }
    .ms-btn::after {
      content: 'v'; position: absolute; right: 7px; top: 50%;
      transform: translateY(-50%); color: #0ea5e9; font-size: 10px;
    }
    .ms-btn:hover { border-color: #0ea5e9; }
    .ms-btn:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; border-color: #e2e8f0; }
    .ms-btn:disabled::after { color: #94a3b8; }
    .ms-dropdown {
      display: none; position: absolute;
      background: #f8fafc; border: 1px solid #b0bcd0; border-radius: 4px;
      margin-top: 3px; left: 0; right: 0;
      max-height: 220px; overflow-y: auto;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      z-index: 9999;
    }
    .ms-dropdown.open { display: block; }
    .ms-wrap { position: relative; display: block; }
    .ms-item {
      display: flex; align-items: center; gap: 7px;
      padding: 5px 10px; font-size: 11px; color: #333355;
      cursor: pointer; user-select: none;
    }
    .ms-item:hover { background: #e0f2fe; color: #111133; }
    .ms-item input[type=checkbox] {
      accent-color: #0ea5e9; width: 13px; height: 13px;
      flex-shrink: 0; cursor: pointer;
    }
    .ms-item.select-all { border-bottom: 1px solid #d0d8e8; color: #0ea5e9; font-weight: 700; }

    /* -- EFOR SUB-BAR -- */
    /* -- SUBBAR (shared base) -- */
    .efor-subbar, .eaf-subbar {
      display: none;
      padding: 4px 16px; gap: 6px; align-items: center;
    }
    .efor-subbar.visible { display: flex; background: #f0e8f8; border-bottom: 2px solid #c090e0; }
    .eaf-subbar.visible  { display: flex; background: #e8f5e9; border-bottom: 2px solid #81c784; }

    .efor-subbar-label {
      font-size: 10px; color: #600878; font-weight: 700;
      letter-spacing: 0.4px; margin-right: 4px;
    }
    .eaf-subbar-label {
      font-size: 10px; color: #1b5e20; font-weight: 700;
      letter-spacing: 0.4px; margin-right: 4px;
    }

    .efor-mode-btn {
      background: #fff; color: #600878;
      border: 1px solid #c090e0; border-radius: 12px;
      padding: 2px 12px; font-size: 10px; font-weight: 700;
      cursor: pointer; transition: background 0.15s, color 0.15s;
      white-space: nowrap;
    }
    .efor-mode-btn:hover { background: #e8d0f8; }
    .efor-mode-btn.active { background: #600878; color: #fff; border-color: #400058; }

    .eaf-mode-btn {
      background: #fff; color: #1b5e20;
      border: 1px solid #81c784; border-radius: 12px;
      padding: 2px 12px; font-size: 10px; font-weight: 700;
      cursor: pointer; transition: background 0.15s, color 0.15s;
      white-space: nowrap;
    }
    .eaf-mode-btn:hover { background: #c8e6c9; }
    .eaf-mode-btn.active { background: #2e7d32; color: #fff; border-color: #1b5e20; }

    /* -- SIMULASI: checkbox per mesin di lvl-4 -- */
    .sim-cb-wrap {
      display: inline-flex; align-items: center; margin-right: 4px;
    }
    .sim-cb {
      width: 14px; height: 14px; cursor: pointer; accent-color: #0369a1;
      flex-shrink: 0;
    }
    tr.lvl-4.sim-excluded td {
      opacity: 0.38 !important;
      text-decoration: line-through;
      background: #fff0f0 !important;
    }
    tr.lvl-4.sim-excluded td:first-child {
      text-decoration: none;
    }
    /* RUN button di subbar */
    .sim-run-btn {
      background: #dc2626; color: #fff; border: none;
      border-radius: 12px; padding: 3px 14px; font-size: 10px; font-weight: 800;
      cursor: pointer; letter-spacing: 0.4px; white-space: nowrap;
      transition: background 0.15s; margin-left: 8px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    }
    .sim-run-btn:hover { background: #b91c1c; }
    .sim-run-btn:active { background: #991b1b; transform: scale(0.97); }
    /* Badge jumlah excluded */
    .sim-excl-badge {
      display: none; background: #dc2626; color: #fff;
      border-radius: 10px; padding: 1px 7px; font-size: 10px; font-weight: 700;
      margin-left: 4px; white-space: nowrap;
    }
    .sim-excl-badge.visible { display: inline-block; }
    /* Reset sim button */
    .sim-reset-btn {
      background: #64748b; color: #fff; border: none;
      border-radius: 12px; padding: 3px 10px; font-size: 10px; font-weight: 700;
      cursor: pointer; white-space: nowrap; margin-left: 4px;
      transition: background 0.15s;
    }
    .sim-reset-btn:hover { background: #475569; }

    /* -- SFC SUBBAR -- */
    .sfc-subbar {
      display: none;
      padding: 4px 16px; gap: 6px; align-items: center;
    }
    .sfc-subbar.visible { display: flex; background: #fff3e0; border-bottom: 2px solid #fb923c; }
    .sfc-subbar-label {
      font-size: 10px; color: #7c2d12; font-weight: 700;
      letter-spacing: 0.4px; margin-right: 4px;
    }
    .sfc-kinerja-label {
      font-size: 10px; color: #7c2d12; font-weight: 700; white-space: nowrap;
    }
    .sfc-kinerja-sel {
      font-size: 11px; border: 1.5px solid #fb923c; border-radius: 4px;
      padding: 2px 6px; background: #fff; color: #7c2d12; font-weight: 700;
      cursor: pointer; outline: none;
    }
    .sfc-kinerja-sel:focus { border-color: #ea580c; }
    /* -- Toggle "1 Tahun" button di subbar -- */
    .sim-1tahun-btn {
      background: #fff; color: #0369a1;
      border: 1.5px solid #0369a1; border-radius: 12px;
      padding: 2px 12px; font-size: 10px; font-weight: 700;
      cursor: pointer; white-space: nowrap; margin-left: 8px;
      transition: background 0.15s, color 0.15s;
    }
    .sim-1tahun-btn:hover { background: #e0f2fe; }
    .sim-1tahun-btn.active { background: #0369a1; color: #fff; border-color: #0369a1; }
    /* -- Baris hasil generate (clone bulan kosong) -- */
    tr.lvl-4.sim-generated td {
      background: #fffde7 !important;
      color: #7c5c00 !important;
    }
    tr.lvl-4.sim-generated.sim-excluded td {
      opacity: 0.38 !important;
      text-decoration: line-through;
      background: #fff8e1 !important;
    }
    tr.lvl-4.sim-generated.sim-excluded td:first-child {
      text-decoration: none;
    }
    .sim-gen-badge {
      display: inline-block; background: #f59e0b; color: #fff;
      border-radius: 3px; padding: 0 4px; font-size: 9px; font-weight: 800;
      margin-left: 4px; vertical-align: middle; letter-spacing: 0.3px;
    }
    tr.lvl-2.sim-gen-bulan td {
      background: #fffff0 !important;
      color: #7c5c00 !important;
    }
    /* -- Tombol "Pilih Mesin" di lvl-1 AMC row -- */
    .sim-mesin-btn {
      display: inline-flex; align-items: center; gap: 3px;
      background: #1e40af; color: #fff; border: none;
      border-radius: 4px; padding: 2px 7px; font-size: 10px; font-weight: 700;
      cursor: pointer; margin-left: 8px; white-space: nowrap;
      transition: background 0.15s; vertical-align: middle;
      letter-spacing: 0.2px;
    }
    .sim-mesin-btn:hover { background: #1d4ed8; }
    .sim-mesin-btn.has-excl { background: #dc2626; }
    .sim-mesin-btn.has-excl:hover { background: #b91c1c; }

    /* -- Modal overlay -- */
    .sim-modal-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.55); z-index: 2000;
      align-items: center; justify-content: center;
    }
    .sim-modal-overlay.open { display: flex; }
    .sim-modal {
      background: #fff; border-radius: 10px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.3);
      width: 520px; max-width: 96vw; height: 90vh;
      display: flex; flex-direction: column; overflow: hidden;
    }
    .sim-modal-header {
      background: #1e293b; color: #fff;
      padding: 11px 16px; display: flex; align-items: center; gap: 10px;
      flex-shrink: 0;
    }
    .sim-modal-title {
      font-size: 13px; font-weight: 800; flex: 1; letter-spacing: 0.3px;
    }
    .sim-modal-close {
      background: none; border: none; color: #94a3b8;
      font-size: 18px; cursor: pointer; line-height: 1; padding: 0 4px;
    }
    .sim-modal-close:hover { color: #fff; }
    .sim-modal-toolbar {
      padding: 7px 14px; background: #f8fafc;
      border-bottom: 1px solid #e2e8f0;
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
      flex-shrink: 0;
    }
    .sim-modal-toolbar-btn {
      background: #e2e8f0; color: #334155; border: none;
      border-radius: 6px; padding: 3px 10px; font-size: 10px; font-weight: 700;
      cursor: pointer; transition: background 0.12s;
    }
    .sim-modal-toolbar-btn:hover { background: #cbd5e1; }
    .sim-modal-body {
      flex: 1 1 0; overflow-y: auto; padding: 8px 0;
      min-height: 120px;
    }
    /* Sentral group header dalam modal */
    .sim-modal-sentral {
      padding: 5px 14px 3px;
      font-size: 10px; font-weight: 800; color: #64748b;
      letter-spacing: 0.5px; text-transform: uppercase;
      background: #f1f5f9; border-top: 1px solid #e2e8f0;
      margin-top: 2px;
    }
    .sim-modal-sentral:first-child { margin-top: 0; border-top: none; }
    /* Mesin item dalam modal */
    .sim-modal-mesin-item {
      display: flex; align-items: center; gap: 8px;
      padding: 5px 20px; cursor: pointer;
      transition: background 0.1s; user-select: none;
    }
    .sim-modal-mesin-item:hover { background: #f0f9ff; }
    .sim-modal-mesin-item input[type=checkbox] {
      width: 14px; height: 14px; cursor: pointer;
      accent-color: #0369a1; flex-shrink: 0;
    }
    .sim-modal-mesin-label {
      font-size: 11px; color: #1e293b; font-weight: 500;
    }
    .sim-modal-mesin-item.excl .sim-modal-mesin-label {
      color: #dc2626; text-decoration: line-through; opacity: 0.7;
    }
    .sim-modal-footer {
      padding: 9px 14px; background: #f8fafc;
      border-top: 1px solid #e2e8f0;
      display: flex; align-items: center; gap: 8px; justify-content: flex-end;
      flex-shrink: 0;
    }
    .sim-modal-apply {
      background: #dc2626; color: #fff; border: none;
      border-radius: 6px; padding: 5px 18px; font-size: 11px; font-weight: 800;
      cursor: pointer; transition: background 0.15s;
    }
    .sim-modal-apply:hover { background: #b91c1c; }
    .sim-modal-cancel {
      background: #e2e8f0; color: #334155; border: none;
      border-radius: 6px; padding: 5px 14px; font-size: 11px; font-weight: 700;
      cursor: pointer; transition: background 0.15s;
    }
    .sim-modal-cancel:hover { background: #cbd5e1; }
    /* Bulan section di modal simulasi */
    .sim-modal-bulan-section {
      padding: 7px 14px 8px;
      background: #f0f4ff;
      border-top: 2px solid #c7d2fe;
      flex-shrink: 0;
      max-height: 160px; overflow-y: auto;
    }
    .sim-modal-bulan-title {
      font-size: 10px; font-weight: 800; color: #3730a3;
      letter-spacing: 0.4px; text-transform: uppercase;
      margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
    }
    .sim-modal-bulan-title span { font-weight: 400; color: #6366f1; font-size: 9px; }
    .sim-modal-bulan-toolbar {
      display: flex; gap: 5px; margin-bottom: 6px;
    }
    .sim-modal-bulan-toolbar-btn {
      background: #c7d2fe; color: #312e81; border: none;
      border-radius: 5px; padding: 2px 8px; font-size: 9px; font-weight: 700;
      cursor: pointer; transition: background 0.12s;
    }
    .sim-modal-bulan-toolbar-btn:hover { background: #a5b4fc; }
    .sim-modal-bulan-grid {
      display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px;
    }
    .sim-modal-bulan-item {
      display: flex; align-items: center; gap: 4px;
      padding: 3px 5px; border-radius: 5px;
      cursor: pointer; user-select: none;
      font-size: 10px; font-weight: 600; color: #374151;
      background: #e0e7ff; transition: background 0.1s;
    }
    .sim-modal-bulan-item:hover { background: #c7d2fe; }
    .sim-modal-bulan-item.active {
      background: #4f46e5; color: #fff;
    }
    .sim-modal-bulan-item.active:hover { background: #4338ca; }
    .sim-modal-bulan-item input[type=checkbox] {
      width: 12px; height: 12px; cursor: pointer;
      accent-color: #4f46e5; flex-shrink: 0;
    }
    .sim-modal-bulan-note {
      font-size: 9px; color: #6366f1; margin-top: 5px; font-style: italic;
    }

    /* INFO BAR */
    .info-bar {
      background: #f8f9fc; padding: 3px 16px;
      font-size: 10px; color: #6677aa;
      border-bottom: 1px solid #d0d8e8;
      display: flex; align-items: center; gap: 10px;
    }
    .info-bar span { color: #0ea5e9; font-weight: 700; }
    /* Tab indicator pill */
    .tab-pill {
      display: inline-block; padding: 1px 8px; border-radius: 10px;
      font-size: 10px; font-weight: 700;
      background: #0284c7; color: #fff;
    }
    .tab-pill.eaf   { background: #1a6010; }
    .tab-pill.efor  { background: #600878; }
    .tab-pill.sfc   { background: #7a3010; }
    .tab-pill.asset { background: #0369a1; }

    /* TABLE */
    /* sticky header: wrapper harus overflow kedua arah,
       flex: 1 + overflow: auto = isi sisa tinggi body (bukan fixed pixel) */
    .table-wrapper {
      flex: 1 1 0;    /* ambil sisa ruang dari flex-column body */
      overflow-x: auto;
      overflow-y: auto;
      min-height: 0;  /* penting untuk flex child agar shrink bisa bekerja */
      background: #fff;
    }
    table { width: 100%; border-collapse: collapse; font-size: 11px; background: #fff; }

    thead th {
      background: #0284c7; color: #ffffff; font-weight: 700;
      padding: 7px 6px; text-align: center;
      border: 1px solid #0369a1; white-space: nowrap;
      font-size: 10.5px;
      position: sticky; top: 0; z-index: 10;
    }
    th.calc-col  { background: #0369a1 !important; color: #ffffff !important; border-color: #38bdf8 !important; }
    th.bbm-col   { background: #7a4000 !important; color: #ffffff !important; border-color: #aa6010 !important; }
    th.eaf-col   { background: #1a6010 !important; color: #ffffff !important; border-color: #2a9020 !important; }
    /* sub-group jam di bawah EAF -- warna lebih muda */
    th.eaf-col.jam-col { background: #2a8020 !important; border-color: #3aaa30 !important; }
    th.efor-col  { background: #600878 !important; color: #ffffff !important; border-color: #9020a8 !important; }
    th.sfc-col   { background: #7a3010 !important; color: #ffffff !important; border-color: #b05020 !important; }
    /* Target KPI column header */
    th.tgt-col   { background: #1e3a5f !important; color: #93c5fd !important; border-color: #2d5a9e !important;
                   font-size: 10px !important; white-space: nowrap !important; }
    /* Target KPI cell */
    td.tgt-cell  { text-align: center !important; font-size: 11px !important;
                   font-weight: 600 !important; color: #475569 !important;
                   white-space: nowrap !important; background: #f1f5f9 !important; }

    /* td EAF/EFOR/SFC */
    td.eaf-col   { color: #1a7010 !important; font-weight: 700; }
    td.efor-col  { color: #8010a0 !important; font-weight: 700; }
    td.sfc-col   { color: #7a3010 !important; font-weight: 700; }

    tbody tr:nth-child(odd)  { background: #ffffff; }
    tbody tr:nth-child(even) { background: #f0f9ff; }
    tbody tr:hover { background: #e0f2fe; }

    td {
      padding: 5px 6px; border: 1px solid #d0d8e8;
      text-align: center; white-space: nowrap; color: #222244;
    }
    td.text-left  { text-align: left; color: #1a1a3a; }
    td.num-col    { color: #0284c7; text-align: right; font-weight: 500; }
    td.calc-val   { color: #0369a1; font-weight: 600; }
    td.bbm-val    { color: #7a4000; font-weight: 600; }

    /* ======== TREE ROWS -- tema putih/terang, teks hitam kontras ======== */

    /* Level 1 -- UID: abu gelap, teks hitam tebal */
    tr.lvl-1 td {
      background: #e2e8f0 !important;
      color: #0f172a !important;
      font-weight: 800 !important;
      border: 1px solid #94a3b8 !important;
      font-size: 11.5px;
    }
    tr.lvl-1 td.num-col  { color: #0369a1 !important; text-align: right; }
    tr.lvl-1 td.eaf-col  { color: #166534 !important; font-weight: 800 !important; }
    tr.lvl-1 td.efor-col { color: #6b21a8 !important; font-weight: 800 !important; }
    tr.lvl-1 td.calc-val { color: #0369a1 !important; }
    tr.lvl-1 td.bbm-val  { color: #92400e !important; }
    tr.lvl-1 td.sfc-col  { color: #92400e !important; font-weight: 800 !important; }

    /* Level 2 -- Bulan: kuning sangat muda, teks hitam */
    tr.lvl-2 td {
      background: #fefce8 !important;
      color: #1c1917 !important;
      font-weight: 700 !important;
      border: 1px solid #fde047 !important;
    }
    tr.lvl-2 td.num-col  { color: #0369a1 !important; text-align: right; font-weight: 700; }
    tr.lvl-2 td.eaf-col  { color: #166534 !important; font-weight: 700 !important; }
    tr.lvl-2 td.efor-col { color: #6b21a8 !important; font-weight: 700 !important; }
    tr.lvl-2 td.calc-val { color: #0369a1 !important; }
    tr.lvl-2 td.bbm-val  { color: #92400e !important; }
    tr.lvl-2 td.sfc-col  { color: #92400e !important; font-weight: 700 !important; }

    /* Level 3 -- Sentral: biru sangat muda, teks hitam */
    tr.lvl-3 td {
      background: #f0f9ff !important;
      color: #0f172a !important;
      font-weight: 700 !important;
      border: 1px solid #bae6fd !important;
    }
    tr.lvl-3 td.num-col  { color: #0369a1 !important; text-align: right; font-weight: 700; }
    tr.lvl-3 td.eaf-col  { color: #166534 !important; font-weight: 700 !important; }
    tr.lvl-3 td.efor-col { color: #6b21a8 !important; font-weight: 700 !important; }
    tr.lvl-3 td.calc-val { color: #0369a1 !important; }
    tr.lvl-3 td.bbm-val  { color: #92400e !important; }
    tr.lvl-3 td.sfc-col  { color: #92400e !important; font-weight: 700 !important; }

    /* Level 4 -- Mesin leaf: putih zebra, teks hitam */
    tr.lvl-4:nth-child(odd)  td { background: #ffffff !important; }
    tr.lvl-4:nth-child(even) td { background: #f8fafc !important; }
    tr.lvl-4:hover td { background: #e0f2fe !important; }
    tr.lvl-4 td {
      color: #111827 !important;
      font-weight: 400;
      border: 1px solid #e2e8f0 !important;
    }
    tr.lvl-4 td.num-col  { color: #0369a1 !important; text-align: right; font-weight: 500; }
    tr.lvl-4 td.text-left { color: #111827 !important; }
    tr.lvl-4 td.eaf-col  { color: #166534 !important; font-weight: 700 !important; }
    tr.lvl-4 td.efor-col { color: #6b21a8 !important; font-weight: 700 !important; }
    tr.lvl-4 td.calc-val { color: #0369a1 !important; }
    tr.lvl-4 td.bbm-val  { color: #92400e !important; }
    tr.lvl-4 td.sfc-col  { color: #92400e !important; font-weight: 700; }

    /* Level 5 -- (unused) */
    tr.lvl-5:nth-child(odd)  { background: #ffffff; }
    tr.lvl-5:nth-child(even) { background: #f8fafc; }
    tr.lvl-5:hover { background: #e0f2fe; }
    tr.lvl-5 td {
      color: #111827;
      border: 1px solid #e2e8f0;
    }
    tr.lvl-5 td.num-col   { color: #0369a1 !important; text-align: right; }
    tr.lvl-5 td.text-left { color: #111827 !important; }
    tr.lvl-5 td.eaf-col   { color: #166534 !important; font-weight: 700; }
    tr.lvl-5 td.efor-col  { color: #6b21a8 !important; font-weight: 700; }
    tr.lvl-5 td.calc-val  { color: #0369a1 !important; }
    tr.lvl-5 td.bbm-val   { color: #92400e !important; }
    tr.lvl-5 td.sfc-col   { color: #92400e !important; font-weight: 700; }

    /* Toggle button */
    .toggle-btn {
      display: inline-flex; align-items: center; justify-content: center;
      width: 18px; height: 18px; border-radius: 3px;
      background: #0ea5e9; color: #ffffff;
      font-size: 12px; font-weight: 900; cursor: pointer;
      margin-right: 6px; border: 1px solid #0369a1;
      user-select: none; flex-shrink: 0; vertical-align: middle;
      transition: background 0.15s;
      position: relative; z-index: 1;
      pointer-events: auto;
    }
    .toggle-btn:hover { background: #0369a1; }
    tr.lvl-1 .toggle-btn { background: #ffffff33; color: #fff; border-color: #ffffff88; }
    tr.lvl-1 .toggle-btn:hover { background: #ffffff55; }

    /* Tree cell -- selalu rata kiri, padding minimal */
    td.tree-cell {
      text-align: left !important;
      padding: 5px 6px 5px 4px !important;
      white-space: nowrap;
    }
    /* Spacer untuk indent per level */
    .sp { display: inline-block; width: 16px; flex-shrink: 0; }
    /* Wrapper dalam tree-cell */
    .tree-inner { display: flex; align-items: center; gap: 0; }

    /* GRAND TOTAL */
    tr.grand-total-row td {
      background: #0f2850 !important;
      color: #ffffff !important;
      font-weight: 800 !important;
      border: 1px solid #2a4a80 !important;
      font-size: 11.5px;
    }
    tr.grand-total-row td.num-col  { color: #80ffcc !important; text-align: right; }
    tr.grand-total-row td.eaf-col  { color: #b0ff70 !important; }
    tr.grand-total-row td.efor-col { color: #f8c0ff !important; }
    tr.grand-total-row td.calc-val { color: #80e8ff !important; }
    tr.grand-total-row td.bbm-val  { color: #ffd080 !important; }
    tr.grand-total-row td.sfc-col  { color: #ffc090 !important; }
    tr.grand-total-row td.tgt-cell { background: #162a4a !important; color: #93c5fd !important; }

    /* KPI Achievement colors -- harus menang vs semua lvl-X rules */
    td.kpi-good,
    tr.lvl-1 td.kpi-good, tr.lvl-2 td.kpi-good,
    tr.lvl-3 td.kpi-good, tr.lvl-4 td.kpi-good,
    tr.grand-total-row td.kpi-good {
      background: #dcfce7 !important;
      color: #15803d !important;
      font-weight: 700 !important;
    }
    td.kpi-bad,
    tr.lvl-1 td.kpi-bad, tr.lvl-2 td.kpi-bad,
    tr.lvl-3 td.kpi-bad, tr.lvl-4 td.kpi-bad,
    tr.grand-total-row td.kpi-bad {
      background: #fee2e2 !important;
      color: #dc2626 !important;
      font-weight: 700 !important;
    }

    /* KONDISI column -- warna berdasarkan status */
    td.kondisi-col { text-align: center; font-weight: 700; letter-spacing: 0.3px; }
    td.kondisi-col.k-op    { color: #0a7a20 !important; }  /* BEROPERASI = hijau gelap */
    td.kondisi-col.k-sb    { color: #8a6000 !important; }  /* STANDBY    = coklat/emas */
    td.kondisi-col.k-err   { color: #cc1010 !important; }  /* GANGGUAN   = merah */
    td.kondisi-col.k-other { color: #445566 !important; }  /* lainnya    = abu gelap */

    /* LOADING / ERROR */
    .loading { text-align: center; padding: 60px; color: #0ea5e9; font-size: 15px; }
    .loading .spinner {
      width: 40px; height: 40px;
      border: 4px solid #bae6fd; border-top: 4px solid #0ea5e9;
      border-radius: 50%; animation: spin 0.8s linear infinite;
      margin: 0 auto 14px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .error-box {
      background: #fff0f0; border: 1px solid #e08080;
      border-radius: 6px; padding: 20px; margin: 20px;
      color: #cc2020; font-size: 13px;
    }
    .no-data { text-align: center; padding: 40px; color: #7788aa; font-size: 13px; }

    /* Tab panel cache -- hanya panel aktif yang tampil */
    .tab-panel { display: block; }

    ::-webkit-scrollbar { width: 7px; height: 7px; }
    ::-webkit-scrollbar-track { background: #f0f2f5; }
    ::-webkit-scrollbar-thumb { background: #b0c0d8; border-radius: 4px; }

    /* ===== PRINT STYLES ===== */
    /* body.ig-printing: sembunyikan semua kecuali #igPrintRoot */
    @page { size: A4 landscape; margin: 12mm 14mm 10mm 14mm; }
    @media print {
      body > * { display: none !important; }
      body > #igPrintRoot { display: block !important; }
      #igPrintRoot * { overflow: visible !important; }
      svg { overflow: visible !important; }
      * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    }
    /* igPrintRoot selalu tersembunyi saat tidak print */
    #igPrintRoot { display: none; }

    /* ===== KINERJA FILTER BAR (r77 — toggle button + panel vertikal) ===== */
    .kinerja-filter-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      background: #1a2236;
      border-bottom: 1px solid #2d3a52;
      position: relative;
    }
    /* Tombol toggle filter */
    .kf-toggle-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #222e45;
      border: 1px solid #2d3f5e;
      border-radius: 6px;
      color: #c8d8f0;
      font-size: 12px;
      font-weight: 600;
      padding: 5px 12px;
      cursor: pointer;
      letter-spacing: 0.03em;
      transition: background 0.15s, border-color 0.15s;
      white-space: nowrap;
    }
    .kf-toggle-btn:hover { background: #2a3a58; border-color: #4a6fa5; }
    .kf-toggle-btn.active { background: #1e3a6e; border-color: #3b82f6; color: #93c5fd; }
    /* Badge jumlah filter aktif */
    .kf-active-badge {
      background: #3b82f6;
      color: #fff;
      border-radius: 99px;
      font-size: 10px;
      font-weight: 700;
      padding: 1px 6px;
      min-width: 18px;
      text-align: center;
    }
    /* Ringkasan filter aktif di sebelah tombol */
    .kf-active-summary {
      font-size: 11px;
      color: #7b90b0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 500px;
    }

    /* ===== PANEL FILTER VERTIKAL ===== */
    .kf-panel {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 280px;
      height: 100vh;
      background: #151f32;
      border-right: 1px solid #2d3a52;
      z-index: 1100;
      flex-direction: column;
      box-shadow: 4px 0 24px rgba(0,0,0,0.5);
      overflow: hidden;
    }
    .kf-panel.open { display: flex; }
    .kf-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      background: #1a2236;
      border-bottom: 1px solid #2d3a52;
      font-size: 13px;
      font-weight: 700;
      color: #c8d8f0;
      flex-shrink: 0;
    }
    .kf-panel-close {
      background: none;
      border: none;
      color: #7b90b0;
      font-size: 16px;
      cursor: pointer;
      padding: 2px 6px;
      border-radius: 4px;
      line-height: 1;
    }
    .kf-panel-close:hover { background: #2d3a52; color: #fff; }
    .kf-panel-body {
      flex: 1;
      overflow-y: auto;
      padding: 10px 0;
      scrollbar-width: thin;
      scrollbar-color: #2d3a52 transparent;
    }
    .kf-panel-body::-webkit-scrollbar { width: 5px; }
    .kf-panel-body::-webkit-scrollbar-track { background: transparent; }
    .kf-panel-body::-webkit-scrollbar-thumb { background: #2d3a52; border-radius: 4px; }
    .kf-panel-footer {
      display: flex;
      gap: 8px;
      padding: 12px 16px;
      background: #1a2236;
      border-top: 1px solid #2d3a52;
      flex-shrink: 0;
    }
    /* Group di dalam panel */
    .kf-panel-group {
      padding: 8px 16px 10px;
      border-bottom: 1px solid #1e2d45;
    }
    .kf-panel-group:last-child { border-bottom: none; }
    .kf-panel-group-label {
      font-size: 10px;
      font-weight: 700;
      color: #7b90b0;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .kf-panel-select {
      width: 100%;
      background: #1e2d45;
      border: 1px solid #2d3f5e;
      border-radius: 5px;
      color: #c8d8f0;
      font-size: 12px;
      font-weight: 500;
      padding: 5px 8px;
      outline: none;
      cursor: pointer;
    }
    .kf-panel-select:focus { border-color: #3b82f6; }
    .kf-panel-select option { background: #1a2236; }

    /* Checkbox list (Bulan & Wilayah) */
    .kf-cb-list {
      display: flex;
      flex-direction: column;
      gap: 3px;
      max-height: 180px;
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: #2d3a52 transparent;
    }
    .kf-cb-list::-webkit-scrollbar { width: 4px; }
    .kf-cb-list::-webkit-scrollbar-thumb { background: #2d3a52; border-radius: 3px; }
    .kf-cb-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 4px 6px;
      border-radius: 4px;
      cursor: pointer;
      transition: background 0.1s;
    }
    .kf-cb-item:hover { background: #1e2d45; }
    .kf-cb-item input[type="checkbox"] {
      width: 14px;
      height: 14px;
      accent-color: #3b82f6;
      cursor: pointer;
      flex-shrink: 0;
    }
    .kf-cb-item label {
      font-size: 12px;
      color: #c8d8f0;
      cursor: pointer;
      line-height: 1.3;
      user-select: none;
    }
    /* Tombol Semua/Reset di atas checkbox */
    .kf-cb-selectall {
      background: #222e45;
      border: 1px solid #2d3f5e;
      border-radius: 3px;
      color: #7b90b0;
      font-size: 9px;
      font-weight: 600;
      padding: 1px 6px;
      cursor: pointer;
      letter-spacing: 0.03em;
      margin-left: auto;
    }
    .kf-cb-selectall:first-of-type { margin-left: 0; }
    .kf-cb-selectall:hover { background: #2a3a58; color: #c8d8f0; }

    /* Overlay gelap transparan untuk close panel saat klik luar */
    .kf-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 1099;
      background: rgba(0,0,0,0.35);
    }
    .kf-overlay.open { display: block; }

    /* Tombol Apply/Reset di footer panel */
    .kf-btn {
      border: none;
      border-radius: 5px;
      font-size: 11px;
      font-weight: 600;
      padding: 7px 14px;
      cursor: pointer;
      letter-spacing: 0.03em;
      transition: background 0.15s;
      flex: 1;
    }
    .kf-btn-apply { background: #2563eb; color: #fff; }
    .kf-btn-apply:hover { background: #1d4ed8; }
    .kf-btn-reset { background: #374151; color: #c8d8f0; }
    .kf-btn-reset:hover { background: #4b5563; }


/* ===================================================================
   KAJIAN MENU — Full layout
   =================================================================== */

/* ---- Header bar ---- */
/* ---- KAJIAN SUB-TAB BAR (menggantikan kajian-header-bar) ---- */
.kajian-subtab-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; background: #1e40af;
  border-bottom: 2px solid #1d4ed8;
  position: sticky; top: 0; z-index: 20; min-height: 42px;
}
.kajian-subtab-left {
  display: flex; align-items: center; gap: 4px;
}
.kajian-brand {
  font-size: 13px; font-weight: 700; color: #fff;
  letter-spacing: .5px; padding-right: 12px;
  border-right: 1px solid rgba(255,255,255,.25); margin-right: 8px;
}
.kajian-subtab-btn {
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.2); border-bottom: none;
  border-radius: 6px 6px 0 0; padding: 8px 16px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s;
  margin-top: 4px;
}
.kajian-subtab-btn:hover { background: rgba(255,255,255,.22); color: #fff; }
.kajian-subtab-btn.active {
  background: #fff; color: #1e40af; border-color: #bfdbfe;
}

/* ===== ROT PREVIEW (Neraca Daya) ===== */
.rot-preview-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px;
}
.rot-preview-title {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: #1e293b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rot-preview-subtitle {
  font-size: 13px;
  text-align: center;
  color: #374151;
  margin-bottom: 2px;
  font-weight: 600;
}
.rot-preview-date {
  font-size: 11px;
  text-align: center;
  color: #6b7280;
  margin-bottom: 16px;
}
.rot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rot-table th {
  background: #e8f0fe;
  color: #1e3a8a;
  font-weight: 700;
  text-align: center;
  padding: 7px 8px;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}
.rot-table td {
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
}
.rot-table tbody tr:hover { filter: brightness(0.97); }

/* ── ROT PLTD checkbox list ── */
.rot-pltd-cb-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
}
.rot-pltd-cb-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  transition: background 0.12s;
}
.rot-pltd-cb-item:hover { background: #e5e7eb; }
.rot-pltd-cb-item input[type=checkbox] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #1d4ed8;
  width: 14px; height: 14px;
}
.rot-pltd-cb-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rot-pltd-cb-count {
  font-size: 10px;
  color: #6b7280;
  font-weight: 400;
}
/* Sub-header nama PLTD di checklist mesin */
.rot-mesin-pltd-header {
  font-size: 11px;
  font-weight: 700;
  color: #1e40af;
  background: #dbeafe;
  padding: 3px 6px;
  border-radius: 4px;
  margin: 6px 0 2px 0;
}

/* ---- legacy .kajian-header-bar (tidak dipakai, dijaga compat) ---- */
.kajian-header-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: #1e40af;
  border-bottom: 2px solid #1d4ed8;
  position: sticky; top: 0; z-index: 20;
}
.kajian-title {
  font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .5px;
}
.kajian-header-actions { display: flex; gap: 8px; }
.kajian-btn-print {
  background: #fff; color: #1d4ed8; border: none; border-radius: 6px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
.kajian-btn-print:hover { background: #dbeafe; }
.kajian-btn-reset {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer;
  transition: background .2s;
}
.kajian-btn-reset:hover { background: rgba(255,255,255,.25); }

/* ---- Split layout ---- */
.kajian-split {
  display: flex; gap: 0; height: calc(100vh - 90px); overflow: hidden;
}
.kajian-left {
  width: 42%; min-width: 320px; overflow-y: auto;
  border-right: 2px solid #e2e8f0; padding: 12px 14px 40px;
  background: #f8fafc;
}
.kajian-right {
  flex: 1; overflow-y: auto; padding: 16px 20px 40px;
  background: #e5e7eb;
}
.kajian-section-title {
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  color: #1e40af; text-transform: uppercase; padding: 4px 0 10px;
  border-bottom: 2px solid #bfdbfe; margin-bottom: 12px;
}

/* ---- Blok warna ---- */
.kajian-block {
  border-radius: 8px; padding: 10px 12px 12px; margin-bottom: 14px;
  border: 1.5px solid transparent;
}
.kajian-block-label {
  font-size: 10px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; margin-bottom: 10px; padding-bottom: 5px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
/* KUNING — manual */
.kajian-yellow {
  background: #fefce8;
  border-color: #fde68a;
}
.kajian-yellow .kajian-block-label { color: #92400e; }
/* HIJAU — PLTD dari share */
.kajian-green {
  background: #f0fdf4;
  border-color: #86efac;
}
.kajian-green .kajian-block-label { color: #166534; }
/* MERAH — hasil lanjutan dari PLTD */
.kajian-red {
  background: #fff1f2;
  border-color: #fecdd3;
}
.kajian-red .kajian-block-label { color: #991b1b; }
/* PINK — pejabat */
.kajian-pink {
  background: #fdf4ff;
  border-color: #e9d5ff;
}
.kajian-pink .kajian-block-label { color: #7e22ce; }

.kajian-blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.kajian-blue .kajian-block-label { color: #1e40af; }

.kajian-gray {
  background: #f9fafb;
  border-color: #e5e7eb;
}
.kajian-gray .kajian-block-label { color: #374151; }

/* ---- Field ---- */
.kajian-field {
  margin-bottom: 9px;
}
.kajian-field label {
  display: block; font-size: 12px; font-weight: 600; color: #374151;
  margin-bottom: 4px; letter-spacing: 0;
}
.kajian-field input[type=text],
.kajian-field input[type=date],
.kajian-field textarea {
  width: 100%; background: #ffffff; border: 1.5px solid #d1d5db;
  color: #111827; border-radius: 8px; padding: 7px 10px;
  font-size: 12.5px; outline: none; resize: vertical;
  font-family: inherit; box-sizing: border-box; transition: border-color .2s, box-shadow .2s;
}
.kajian-field input:focus, .kajian-field textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
/* Border aksen per blok */
.kajian-yellow .kajian-field input,
.kajian-yellow .kajian-field textarea { border-color: #fde68a; }
.kajian-yellow .kajian-field input:focus,
.kajian-yellow .kajian-field textarea:focus { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.kajian-green .kajian-field input,
.kajian-green .kajian-field textarea { border-color: #86efac; }
.kajian-green .kajian-field input:focus,
.kajian-green .kajian-field textarea:focus { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.kajian-red .kajian-field input,
.kajian-red .kajian-field textarea { border-color: #fecdd3; }
.kajian-red .kajian-field input:focus,
.kajian-red .kajian-field textarea:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.kajian-pink .kajian-field input,
.kajian-pink .kajian-field textarea { border-color: #e9d5ff; }
.kajian-pink .kajian-field input:focus,
.kajian-pink .kajian-field textarea:focus { border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168,85,247,.12); }

.kajian-row2 { display: flex; gap: 8px; }
.kajian-row2 .kajian-field { flex: 1; }

/* ---- PLTD Search dropdown ---- */
.kajian-pltd-search { position: relative; }
.kajian-pltd-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: #fff; border: 1.5px solid #3b82f6; border-radius: 8px;
  max-height: 200px; overflow-y: auto; display: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.kajian-pltd-dropdown.open { display: block; }
.kpd-item {
  padding: 7px 10px; cursor: pointer; font-size: 12px; color: #1f2937;
  border-bottom: 1px solid #f3f4f6; transition: background .15s;
}
.kpd-item:hover { background: #eff6ff; }
.kpd-item .kpd-uid { font-size: 10px; color: #2563eb; font-weight: 700; }

/* ---- Chips terpilih ---- */
.kajian-pltd-chips {
  min-height: 34px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: #f0fdf4; border: 1.5px solid #86efac;
  border-radius: 8px; padding: 6px 8px;
}
.kajian-chips-empty { color: #9ca3af; font-size: 11px; font-style: italic; }
.kajian-chip {
  display: flex; align-items: center; gap: 4px;
  background: #dcfce7; border: 1px solid #86efac;
  border-radius: 12px; padding: 3px 8px 3px 9px; font-size: 11px; color: #166534;
}
.kajian-chip button {
  background: none; border: none; color: #ef4444; cursor: pointer;
  padding: 0 2px; font-size: 13px; line-height: 1;
}

/* ---- Tabel mesin / neraca dalam form ---- */
.kajian-mesin-table-wrap, .kajian-neraca-wrap {
  overflow-x: auto; border-radius: 8px;
  border: 1.5px solid #fecdd3; background: #fff;
}
.kajian-empty-hint {
  padding: 12px 10px; font-size: 11px; color: #9ca3af; font-style: italic; text-align: center;
}
.kajian-mesin-table-wrap table, .kajian-neraca-wrap table {
  width: 100%; border-collapse: collapse; font-size: 11px;
}
.kajian-mesin-table-wrap th, .kajian-neraca-wrap th {
  background: #fef2f2; color: #991b1b; padding: 5px 8px;
  text-align: left; font-weight: 700; font-size: 10px; text-transform: uppercase;
  border-bottom: 1.5px solid #fecdd3; white-space: nowrap;
}
.kajian-mesin-table-wrap td, .kajian-neraca-wrap td {
  padding: 5px 8px; color: #1f2937; border-bottom: 1px solid #fef2f2;
}

/* ---- TTD pejabat row ---- */
.kajian-ttd-row { display: flex; gap: 10px; }
.kajian-ttd-col { flex: 1; }

/* ---- Tombol kecil dalam form ---- */
.kajian-btn-sm {
  padding: 4px 10px; font-size: 11px; font-weight: 600;
  border: none; border-radius: 6px; cursor: pointer; transition: background .2s;
}
.kajian-btn-add { background: #d1fae5; color: #065f46; }
.kajian-btn-add:hover { background: #a7f3d0; }
.kajian-btn-del { background: #fee2e2; color: #991b1b; }
.kajian-btn-del:hover { background: #fecaca; }

/* ---- Checkbox mesin ---- */
.kj-mesin-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 5px 6px; border-radius: 6px; cursor: pointer;
  transition: background .15s; border-bottom: 1px solid rgba(0,0,0,.04);
}
.kj-mesin-item:hover { background: rgba(239,68,68,.06); }
.kj-mesin-item input[type=checkbox] {
  margin-top: 2px; accent-color: #ef4444; width: 14px; height: 14px; cursor: pointer; flex-shrink: 0;
}

/* ---- Custom PLTD Dropdown ---- */
.kj-drop-item {
  padding: 7px 12px; cursor: pointer;
  border-bottom: 1px solid #f0fdf4;
  transition: background .12s;
}
.kj-drop-item:hover { background: #dcfce7; }
.kj-drop-item:last-child { border-bottom: none; }
#kjPltdDropList::-webkit-scrollbar { width: 4px; }
#kjPltdDropList::-webkit-scrollbar-thumb { background: #86efac; border-radius: 4px; }
.kj-mesin-label { font-size: 11.5px; color: #1f2937; line-height: 1.4; }
.kj-mesin-sub { font-size: 10px; color: #6b7280; margin-top: 1px; }
.kj-mesin-kondisi {
  font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 10px;
  display: inline-block; margin-left: 4px;
}
.kj-mesin-kondisi.rusak { background: #fee2e2; color: #991b1b; }
.kj-mesin-kondisi.standby { background: #dbeafe; color: #1d4ed8; }
.kj-mesin-kondisi.beroperasi { background: #dcfce7; color: #166534; }
.kj-mesin-kondisi.other { background: #f3f4f6; color: #374151; }
.kj-mesin-spare-row { margin-top: 3px; }
.kj-mesin-spare-tag {
  display: inline-block; font-size: 9.5px; background: #fef9c3;
  color: #92400e; border: 1px solid #fde68a; border-radius: 4px;
  padding: 1px 6px; font-weight: 600; line-height: 1.5;
}

/* ---- Spare Part table di form ---- */
.kj-spare-mesin-header {
  font-size: 11px; font-weight: 700; color: #991b1b;
  background: #fef2f2; border-radius: 6px 6px 0 0;
  padding: 5px 8px; border: 1px solid #fecdd3; border-bottom: none;
  margin-top: 10px;
}
.kj-spare-table-wrap {
  border: 1px solid #fecdd3; border-radius: 0 0 6px 6px;
  overflow-x: auto; margin-bottom: 6px;
}
.kj-spare-table {
  width: 100%; border-collapse: collapse; font-size: 11px;
}
.kj-spare-table th {
  background: #fff1f2; color: #991b1b; padding: 4px 6px;
  font-size: 10px; font-weight: 700; text-align: center;
  border-bottom: 1px solid #fecdd3; white-space: nowrap;
}
.kj-spare-table td {
  padding: 3px 4px; border-bottom: 1px solid #fef2f2; vertical-align: middle;
}
.kj-spare-table tr:last-child td { border-bottom: none; }
.kj-spare-table td.kj-total-row {
  background: #fef2f2; font-weight: 700; text-align: right;
}
/* input dalam tabel spare */
.kj-spare-table select,
.kj-spare-table input[type=text],
.kj-spare-table input[type=number] {
  width: 100%; background: #fff; border: 1px solid #fecdd3;
  color: #111827; border-radius: 4px; padding: 3px 5px;
  font-size: 11px; outline: none; font-family: inherit;
  box-sizing: border-box;
}
.kj-spare-table select:focus,
.kj-spare-table input:focus { border-color: #ef4444; }
.kj-spare-table .col-no    { width: 22px; text-align: center; color: #9ca3af; font-size: 10px; }
.kj-spare-table .col-part  { min-width: 110px; }
.kj-spare-table .col-sat   { width: 52px; }
.kj-spare-table .col-qty   { width: 42px; }
.kj-spare-table .col-harga { width: 88px; }
.kj-spare-table .col-total { width: 88px; text-align: right; color: #374151; }
.kj-spare-table .col-del   { width: 20px; text-align: center; }
.kj-spare-del-btn {
  background: none; border: none; color: #ef4444; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 2px;
}
.kj-spare-del-btn:hover { color: #b91c1c; }
.kj-spare-subtotal {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 6px; padding: 3px 6px 4px;
  font-size: 11px; color: #991b1b; font-weight: 700;
  background: #fef2f2; border: 1px solid #fecdd3;
  border-top: none; border-radius: 0 0 6px 6px; margin-bottom: 8px;
}

/* ================================================================
   PREVIEW KANAN
   ================================================================ */
.kajian-preview {
  background: #fff; color: #1a1a1a;
  border-radius: 4px;
  padding: 2.54cm;
  max-width: 21cm;
  margin: 0 auto;
  min-height: 29.7cm;
  font-family: 'Times New Roman', Times, serif; font-size: 12pt;
  line-height: 1.6;
  box-shadow: 0 2px 16px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.06);
}
.kpv-placeholder {
  padding: 60px 20px; text-align: center; color: #94a3b8;
  font-family: inherit; font-style: italic; font-size: 13px;
}

/* Preview typography */
.kpv-title {
  text-align: center; font-size: 13pt; font-weight: 700;
  text-transform: uppercase; margin: 0 0 18px;
  padding-bottom: 8px; border-bottom: 2px solid #000;
}
.kpv-h1   { font-size: 12pt; font-weight: 700; margin: 16px 0 6px 0; }
.kpv-h2   { font-size: 12pt; font-weight: 700; margin: 10px 0 6px 20px; }
.kpv-h3   { font-size: 11pt; font-weight: 700; margin: 10px 0 4px 20px; }
.kpv-p    { margin: 6px 0 6px 0; font-size: 11pt; text-align: justify; line-height: 1.7; }
.kpv-p.kpv-bold { font-weight: 700; }
.kpv-caption { font-size: 10.5pt; font-weight: 700; margin: 14px 0 4px; text-align: center; }

/* Preview tables */
.kpv-tbl-wrap { overflow-x: visible; margin: 4px 0 14px; }
.kpv-tbl {
  width: 100%; border-collapse: collapse;
  font-size: 7.5pt; table-layout: fixed;
}
.kpv-tbl th {
  background: #0a7c94; color: #fff; padding: 3px 4px;
  border: 1px solid #075f72; font-weight: 700; text-align: center;
  word-break: break-word; white-space: normal; line-height: 1.3;
}
.kpv-tbl td {
  border: 1px solid #aaa; padding: 3px 4px; vertical-align: middle;
  word-break: break-word; white-space: normal; line-height: 1.3;
}
.kpv-tbl .tc { text-align: center; }
.kpv-tbl .tr { text-align: right; }
.kpv-tbl .tl { text-align: left; }
.kpv-tbl-jumlah { background: #9fd5e1; }
.kpv-tbl-jumlah td { font-weight: 700; }

/* TTD */
.kpv-ttd-tbl {
  width: 100%; border-collapse: collapse;
  margin-top: 28px; font-size: 11pt;
}
.kpv-ttd-tbl td { padding: 4px 8px; border: none; width: 50%; text-align: center; }
.kpv-ttd-space  { height: 56px; border-bottom: 1px solid #333 !important; }

/* ---- Print mode ---- */
@media print {
  .kajian-left, .kajian-header-bar, .kajian-subtab-bar { display: none !important; }
  .kajian-right { width: 100% !important; overflow: visible !important; padding: 0 !important; background: none !important; }
  .kajian-split { height: auto !important; }
  .kajian-preview { box-shadow: none; padding: 2.54cm; max-width: none; margin: 0; border-radius: 0; }
}

/* ================================================================
   KAJIAN REPORTING PANEL
   ================================================================ */
.kjr-container {
  display: flex; flex-direction: column; height: calc(100vh - 46px);
  overflow: hidden; background: #f0f4f8;
}

/* Filter bar */
.kjr-filter-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 16px; background: #fff;
  border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.kjr-filter-group { display: flex; align-items: center; gap: 6px; }
.kjr-filter-label { font-size: 11px; font-weight: 600; color: #64748b; white-space: nowrap; }
.kjr-select {
  font-size: 11.5px; border: 1px solid #cbd5e1; border-radius: 6px;
  padding: 4px 8px; background: #f8fafc; color: #1e293b;
  outline: none; cursor: pointer; min-width: 140px;
}
.kjr-select:focus { border-color: #3b82f6; background: #fff; }
.kjr-btn-refresh {
  background: #1d4ed8; color: #fff; border: none; border-radius: 6px;
  padding: 5px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s; margin-left: auto;
}
.kjr-btn-refresh:hover { background: #1e40af; }

/* Stats row */
.kjr-stats-row {
  display: flex; gap: 10px; padding: 12px 16px;
  flex-shrink: 0; flex-wrap: wrap;
}
.kjr-stat-card {
  flex: 1; min-width: 100px; border-radius: 10px; padding: 10px 14px;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.kjr-stat-val { font-size: 22px; font-weight: 800; line-height: 1.1; }
.kjr-stat-lbl { font-size: 10px; font-weight: 600; margin-top: 3px; opacity: .8; text-align: center; }
.kjr-stat-blue   { background: #dbeafe; color: #1e40af; }
.kjr-stat-green  { background: #dcfce7; color: #166534; }
.kjr-stat-yellow { background: #fef9c3; color: #92400e; }
.kjr-stat-red    { background: #fee2e2; color: #991b1b; }
.kjr-stat-orange { background: #ffedd5; color: #9a3412; }
.kjr-stat-purple { background: #ede9fe; color: #5b21b6; }

/* Table area */
.kjr-table-wrap {
  flex: 1; display: flex; flex-direction: column;
  margin: 0 16px 12px; border-radius: 10px;
  background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.08);
  overflow: hidden; min-height: 0;
}
.kjr-table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.kjr-table-title { font-size: 12px; font-weight: 700; color: #1e293b; }
.kjr-table-count { font-size: 11px; color: #64748b; }
.kjr-table-scroll { flex: 1; overflow: auto; }
.kjr-placeholder {
  padding: 40px; text-align: center; color: #94a3b8;
  font-size: 13px;
}

/* Reporting table */
.kjr-table {
  width: 100%; border-collapse: collapse; font-size: 11px;
}
.kjr-table thead th {
  background: #f1f5f9; color: #475569; font-weight: 700;
  padding: 7px 10px; text-align: left; border-bottom: 2px solid #e2e8f0;
  position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
.kjr-table tbody tr { border-bottom: 1px solid #f1f5f9; }
.kjr-table tbody tr:hover { background: #f8fafc; }
.kjr-table tbody td { padding: 6px 10px; color: #334155; vertical-align: middle; }
.kjr-table .col-no  { width: 34px; text-align: center; color: #94a3b8; }
.kjr-table .col-daya { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kjr-kondisi-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.kjr-kondisi-beroperasi { background: #dcfce7; color: #166534; }
.kjr-kondisi-standby    { background: #dbeafe; color: #1e40af; }
.kjr-kondisi-rusak      { background: #fee2e2; color: #991b1b; }
.kjr-kondisi-pemeliharaan { background: #ffedd5; color: #9a3412; }
.kjr-kondisi-other      { background: #f1f5f9; color: #475569; }
.kjr-spare-tag {
  display: inline-block; font-size: 9.5px; background: #fef9c3;
  color: #92400e; border: 1px solid #fde68a; border-radius: 3px;
  padding: 1px 5px; font-weight: 600;
}
