*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg: #F5F7FA; --white: #FFFFFF; --navy: #0D2B6E; --navy-mid: #1A3F9A;
    --blue: #40a9de; --blue-light: #E6F4FB; --blue-mid: #BEE3F4;
    --blue-btn: #2b8fc4; --blue-btn-hover: #2179a8;
    --green: #10B981; --green-light: #ECFDF5;
    --red: #EF4444; --red-light: #FEF2F2;
    --yellow: #F59E0B; --yellow-light: #FFFBEB;
    --ink: #111827; --muted: #6B7694; --border: #E3E8F0;
    --sans: 'Plus Jakarta Sans', sans-serif;
  }
  body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 400; min-height: 100vh; -webkit-font-smoothing: antialiased; }

  /* LOGIN */
  .login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
  .login-box { background: var(--white); border: 1.5px solid var(--border); border-radius: 18px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 8px 32px rgba(13,43,110,0.1); animation: rise 0.5s ease forwards; }
  .login-logo { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
  .login-logo span { color: var(--blue); }
  .login-sub { font-size: 12px; color: var(--muted); margin-bottom: 28px; }
  .login-title { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 22px; letter-spacing: -0.02em; }
  .login-err { background: var(--red-light); color: var(--red); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: none; }

  /* FORMS */
  .form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
  .form-label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
  .form-input { padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; font-family: var(--sans); color: var(--ink); background: var(--bg); outline: none; transition: border-color 0.2s, background 0.2s; width: 100%; }
  .form-input:focus { border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 3px rgba(64,169,222,0.15); }

  /* BUTTONS */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 22px; border-radius: 100px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1.5px solid transparent; font-family: var(--sans); transition: all 0.2s; letter-spacing: 0.01em; }
  .btn-primary { background: var(--blue-btn); color: #fff; border-color: var(--blue-btn); box-shadow: 0 2px 10px rgba(43,143,196,0.25); }
  .btn-primary:hover { background: var(--blue-btn-hover); border-color: var(--blue-btn-hover); }
  .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
  .btn-secondary { background: var(--white); color: var(--navy); border-color: var(--border); }
  .btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
  .btn-full { width: 100%; }
  .btn-sm { padding: 5px 14px; font-size: 11px; }

  /* APP */
  .app { display: none; }
  .app.visible { display: flex; }

  /* SIDEBAR */
  .sidebar { position: fixed; top: 0; left: 0; width: 232px; height: 100vh; background: #fff; display: flex; flex-direction: column; padding: 24px 0; z-index: 100; border-right: 1px solid #EDEFF2; }
  .sidebar-logo { padding: 0 20px 20px; border-bottom: 1px solid #EDEFF2; margin-bottom: 14px; }
  .sidebar-logo-title { font-size: 14px; font-weight: 800; color: var(--navy); }
  .sidebar-logo-title span { color: #40a9de; }
  .sidebar-logo-sub { font-size: 10px; color: var(--muted); margin-top: 3px; }
  .nav-group-label { font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #A6AEBF; padding: 0 20px; margin: 16px 0 6px; }
  .nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 16px; margin: 1px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; color: #6B7280; cursor: pointer; border: none; background: none; width: calc(100% - 24px); text-align: left; transition: color 0.15s, background 0.15s; font-family: var(--sans); }
  .nav-item:hover { color: var(--navy); background: #F4F6F9; }
  .nav-item.active { color: #40a9de; background: rgba(64,169,222,0.1); font-weight: 600; }
  .nav-icon { font-size: 15px; width: 20px; text-align: center; display: flex; align-items: center; justify-content: center; }
  .nav-icon svg { width: 18px; height: 18px; }
  .sidebar-footer { margin-top: auto; padding: 16px 20px; border-top: 1px solid #EDEFF2; }
  .sidebar-user { display: flex; align-items: center; gap: 10px; }
  .user-avatar { width: 34px; height: 34px; border-radius: 50%; background: #40a9de; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
  .user-name { font-size: 12px; font-weight: 600; color: var(--navy); }
  .user-role-text { font-size: 10px; color: var(--muted); }
  .logout-btn { background: none; border: none; color: var(--muted); font-size: 11px; cursor: pointer; font-family: var(--sans); margin-top: 6px; padding: 0; transition: color 0.2s; }
  .logout-btn:hover { color: var(--red); }

  /* MAIN */
  .main { margin-left: 232px; padding: 32px; min-height: 100vh; }
  .topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
  .page-title { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }
  .page-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .topbar-right { display: flex; gap: 10px; }

  /* SECTIONS */
  .section { display: none; }
  .section.active { display: block; animation: fadeIn 0.3s ease; }
  @keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
  @keyframes rise { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* STATS */
  .stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
  .stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
  .stat-grid-3 { grid-template-columns: repeat(3,1fr); }
  .stat-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(13,43,110,0.04); transition: box-shadow 0.2s, transform 0.2s; }
  .stat-card:hover { box-shadow: 0 4px 16px rgba(13,43,110,0.08); transform: translateY(-2px); }
  .stat-label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
  .stat-value { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; line-height: 1; margin-bottom: 8px; }
  .stat-badge { display: inline-flex; padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
  .badge-green { background: var(--green-light); color: var(--green); }
  .badge-red { background: var(--red-light); color: var(--red); }
  .badge-yellow { background: var(--yellow-light); color: var(--yellow); }
  .badge-blue { background: var(--blue-light); color: var(--blue); }

  /* CARD & TABLE */
  .card { background: var(--white); border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(13,43,110,0.04); }
  .card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1.5px solid var(--border); background: var(--bg); }
  .card-title { font-size: 14px; font-weight: 700; color: var(--navy); }
  .card-body { padding: 20px; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  table { width: 100%; border-collapse: collapse; }
  th { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 11px 16px; text-align: left; background: var(--bg); border-bottom: 1.5px solid var(--border); }
  td { padding: 12px 16px; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--border); vertical-align: middle; }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: #FAFBFD; }
  .tag { display: inline-flex; padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
  .tag-green { background: var(--green-light); color: var(--green); }
  .tag-red { background: var(--red-light); color: var(--red); }
  .tag-yellow { background: var(--yellow-light); color: var(--yellow); }
  .tag-blue { background: var(--blue-light); color: var(--blue); }
  .empty { text-align: center; padding: 40px 20px; color: var(--muted); }
  .empty-icon { margin-bottom: 10px; display: flex; justify-content: center; }
  .empty-text { font-size: 13px; }
  .spinner { width: 24px; height: 24px; border: 2.5px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 10px; }
  .loading { text-align: center; padding: 40px; color: var(--muted); font-size: 13px; }

  /* MODAL */
  .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; display: none; align-items: center; justify-content: center; }
  .modal-overlay.open { display: flex; }
  .modal { background: var(--white); border-radius: 18px; width: 100%; max-width: 480px; padding: 32px; box-shadow: 0 24px 64px rgba(13,43,110,0.18); animation: rise 0.25s ease; border: 1.5px solid var(--border); }
  .modal-title { font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 22px; letter-spacing: -0.02em; }
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .fg { display: flex; flex-direction: column; gap: 6px; }
  .fg.full { grid-column: 1/-1; }
  .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
  .detail-box { background: var(--blue-light); border: 1.5px solid var(--blue-mid); border-radius: 10px; padding: 14px; font-size: 13px; line-height: 1.8; color: var(--navy); margin-bottom: 18px; }
  .catatan-box { background: var(--blue-light); border-left: 3px solid var(--blue); border-radius: 6px; padding: 8px 12px; font-size: 12px; color: var(--navy); }
  .cb-col { width:40px; min-width:40px; max-width:40px; padding:6px 8px; text-align:center; vertical-align:middle; box-sizing:border-box; }
  input[type=checkbox] { width:15px; height:15px; cursor:pointer; accent-color:var(--blue); display:inline-block; vertical-align:middle; margin:0; }
  .bulk-bar { display:none; align-items:center; gap:12px; background:var(--navy); color:#fff; padding:10px 16px; border-radius:10px; margin-bottom:12px; font-size:13px; }
  .bulk-bar.visible { display:flex; }
  .bulk-count { font-weight:700; }
  .btn-bulk-del { background:var(--red); border:none; border-radius:8px; color:#fff; font-size:12px; font-weight:600; padding:6px 14px; cursor:pointer; font-family:var(--sans); }
  .btn-bulk-del:hover { opacity:0.85; }
  .btn-bulk-cancel { background:rgba(255,255,255,0.15); border:none; border-radius:8px; color:#fff; font-size:12px; font-weight:600; padding:6px 14px; cursor:pointer; font-family:var(--sans); }

/* ===================================== */

@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  @page { margin: 0; size: A4; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
#print-area { display: none; }
.inv-print { font-family: 'Plus Jakarta Sans', sans-serif; padding: 40px; max-width: 700px; margin: 0 auto; color: #111; }
.inv-print-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 2px solid #0D2B6E; }
.inv-print-logo { font-size: 20px; font-weight: 800; color: #0D2B6E; }
.inv-print-logo span { color: #40a9de; }
.inv-print-meta { text-align: right; font-size: 12px; color: #666; }
.inv-print-meta h2 { font-size: 24px; font-weight: 800; color: #0D2B6E; margin-bottom: 4px; }
.inv-from-to { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.inv-party-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #999; margin-bottom: 6px; }
.inv-party-name { font-size: 15px; font-weight: 700; color: #0D2B6E; margin-bottom: 4px; }
.inv-party-detail { font-size: 12px; color: #555; line-height: 1.6; }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.inv-table th { background: #0D2B6E; color: white; padding: 10px 14px; text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.inv-table td { padding: 12px 14px; border-bottom: 1px solid #eee; font-size: 13px; }
.inv-totals { width: 100%; margin-top: 8px; }
.inv-total-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.inv-total-row span:last-child { text-align: left; }
.inv-total-row.final { border-top: 2px solid #0D2B6E; margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 15px; color: #0D2B6E; }
.inv-footer { margin-top: 48px; display: flex; justify-content: space-between; font-size: 12px; color: #666; }
.inv-ttd-box { text-align: center; }
.inv-ttd-line { width: 160px; border-top: 1px solid #333; margin: 40px auto 6px; }
.inv-emeterai { background: #FFFBEB; border: 1px solid #F59E0B; border-radius: 6px; padding: 8px 12px; font-size: 11px; color: #92400E; margin-bottom: 16px; }

/* ===================================== */

/* ── DUAL DASHBOARD TOGGLE ── */
  .dual-tab {
    border: none; background: transparent; padding: 8px 16px;
    border-radius: 8px; font-size: 13px; font-weight: 600;
    color: var(--muted); cursor: pointer; font-family: var(--sans);
    transition: background 0.2s, color 0.2s;
  }
  .dual-tab-active {
    background: #fff; color: var(--blue);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  /* ── EDITOR WEB: Desktop = tabel, Mobile = card stack ── */
  .ew-mobile-cards { display: none; }
  .ew-card {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    padding: 14px; margin-bottom: 10px; display: flex; gap: 12px;
  }
  .ew-card-checkbox { padding-top: 2px; }
  .ew-card-body { flex: 1; min-width: 0; }
  .ew-card-title {
    font-size: 13px; font-weight: 700; color: var(--blue);
    margin-bottom: 8px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; text-decoration: none;
  }
  .ew-card-meta {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    font-size: 11px; color: var(--muted); margin-bottom: 10px;
  }
  .ew-card-meta-item { display: flex; align-items: center; gap: 4px; }
  .ew-card-meta-item strong { color: var(--navy); font-weight: 700; }
  .ew-card-author { font-size: 12px; margin-bottom: 10px; }
  .ew-card-actions { display: flex; gap: 8px; flex-wrap: nowrap; }
  .ewc-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    gap: 5px; padding: 9px 12px; border-radius: 10px;
    font-size: 12.5px; font-weight: 600; cursor: pointer;
    font-family: var(--sans); text-decoration: none;
    background: #F4F6F9; color: var(--navy); border: 1px solid #E3E8F0;
    transition: background 0.15s;
  }
  .ewc-btn:active { background: #E8ECF2; }
  .ewc-btn-danger { background: #FEF2F2; color: var(--red); border-color: #FBD5D5; }
  .ewc-btn-danger:active { background: #FCE4E4; }

  /* ── MOBILE BOTTOM NAV (Opsi 1: elemen terpisah) ── */
  #mobile-bottom-nav { display: none; }
  #mobile-drawer, #mobile-drawer-overlay { display: none; }

  /* ── MOBILE RESPONSIVE ── */
  @media (max-width: 768px) {
    /* Kunci lebar — cegah horizontal overflow / tampilan "ter-zoom" */
    html, body {
      overflow-x: hidden; max-width: 100%; width: 100%;
      margin: 0; padding: 0;
    }
    .app, .main, .section, .login-page {
      max-width: 100%; overflow-x: hidden; box-sizing: border-box;
    }
    /* Elemen lebar tetap → ikut layar */
    .card, .stat-card, .topbar, .modal-box { max-width: 100%; box-sizing: border-box; }
    .section:not(.active) { display: none !important; }

    .ew-desktop-table { display: none !important; }
    .ew-mobile-cards { display: block !important; }

    /* Sembunyikan sidebar lama sepenuhnya — diganti bottom nav baru */
    .sidebar { display: none !important; }

    /* Bottom nav baru — hanya tampil setelah login (class .nav-ready) */
    #mobile-bottom-nav { display: none; }
    #mobile-bottom-nav.nav-ready {
      display: flex; position: fixed; bottom: 0; left: 0; right: 0;
      height: 64px; background: #fff; z-index: 200;
      border-top: 1px solid #EDEFF2;
      box-shadow: 0 -2px 16px rgba(13,43,110,0.05);
      padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mnav-item {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; justify-content: center; gap: 4px;
      background: none; border: none; cursor: pointer;
      color: #8A93A6; font-family: var(--sans);
      font-size: 10.5px; font-weight: 600; padding: 8px 4px;
      transition: color 0.15s; position: relative;
      -webkit-tap-highlight-color: transparent;
    }
    .mnav-item .mnav-icon {
      line-height: 0;
      transition: transform 0.15s;
      display: flex; align-items: center; justify-content: center;
    }
    .mnav-item.active { color: #40a9de; }
    .mnav-item.active .mnav-icon {
      transform: translateY(-1px);
    }
    .mnav-badge {
      position: absolute; top: 5px; right: 50%; margin-right: -22px;
      background: #EF4444; color: #fff; font-size: 9px; font-weight: 700;
      border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center;
      border: 1.5px solid #fff;
    }

    /* Drawer ☰ */
    #mobile-drawer-overlay {
      display: block; position: fixed; inset: 0;
      background: rgba(0,0,0,0.5); z-index: 300; opacity: 0;
      pointer-events: none; transition: opacity 0.25s;
    }
    #mobile-drawer-overlay.open { opacity: 1; pointer-events: auto; }
    #mobile-drawer {
      display: flex; flex-direction: column;
      position: fixed; top: 0; right: 0; bottom: 0;
      width: 80%; max-width: 320px; background: #fff;
      z-index: 301; transform: translateX(100%);
      transition: transform 0.25s; box-shadow: -4px 0 24px rgba(0,0,0,0.2);
    }
    #mobile-drawer.open { transform: translateX(0); }
    #mobile-drawer-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 18px 20px; border-bottom: 1px solid var(--border);
    }
    #mobile-drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; }
    .mdrawer-item {
      display: flex; align-items: center; gap: 12px;
      width: 100%; padding: 13px 20px; background: none; border: none;
      cursor: pointer; font-family: var(--sans); font-size: 14px;
      font-weight: 600; color: var(--navy); text-align: left;
    }
    .mdrawer-item:active { background: var(--blue-light); }
    .mdrawer-item .mdrawer-icon { display: flex; align-items: center; justify-content: center; color: #6B7280; }
    .mdrawer-label {
      padding: 14px 20px 6px; font-size: 11px; font-weight: 700;
      color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
    }

    /* Akun Saya & section dengan max-width wrapper → full width di mobile */
    #section-akun-saya > div[style*="max-width"],
    #section-gaji-kar > div[style*="max-width"] {
      max-width: 100% !important;
    }

    /* Main content */
    .main {
      margin-left: 0 !important; padding: 16px 12px;
      padding-bottom: 78px;
      min-height: auto !important;
      width: 100%; box-sizing: border-box;
    }
    /* .app hanya tampil setelah login (punya class .visible) */
    .app.visible { display: block !important; }
    /* Tinggi halaman murni ikut konten — cegah scroll kosong */
    html, body { height: auto !important; min-height: 0 !important; }
    /* Login page: pakai dvh (akurat di mobile, tidak termasuk area address bar) */
    .login-page { min-height: 100dvh; padding: 24px 16px; box-sizing: border-box; }
    .topbar {
      flex-direction: column; align-items: flex-start;
      gap: 10px; padding: 0 0 16px 0;
    }
    .topbar-right {
      width: 100%; display: flex; flex-wrap: wrap; gap: 8px;
    }
    .topbar-right button { font-size: 12px; padding: 8px 12px; }
    .topbar-right select, .topbar-right input[type="number"] { font-size: 12px; padding: 8px 10px; }

    /* iOS Safari auto-zoom saat fokus input kalau font < 16px.
       Paksa 16px di mobile supaya tidak zoom. */
    .form-input, input, select, textarea { font-size: 16px !important; }

    /* Stats — grid 2 kolom di mobile (berlaku untuk .stats-grid & .stat-grid) */
    .stats-grid, .stat-grid, .stat-grid-3 {
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 10px !important;
    }
    .stat-card { padding: 15px 14px; }
    .stat-value { font-size: 17px; line-height: 1.15; word-break: normal; }
    .stat-label { font-size: 10px; margin-bottom: 6px; }
    .stat-badge { white-space: nowrap; font-size: 10px; padding: 3px 8px; margin-top: 2px; }

    /* Layout */
    .two-col { grid-template-columns: 1fr !important; gap: 12px; }
    .card { border-radius: 12px; margin-bottom: 12px; }
    .card-body { padding: 14px; }

    /* Tabel scroll horizontal */
    .card > table, .card > div > table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
    td, th { padding: 10px 12px !important; font-size: 12px !important; }
    .btn-sm { padding: 5px 10px !important; font-size: 11px !important; }

    /* Sembunyikan kolom tidak penting di tabel */
    .col-hide-mobile { display: none !important; }

    /* Modal */
    .modal-overlay { align-items: flex-end; }
    .modal {
      margin: 0; border-radius: 20px 20px 0 0 !important;
      max-width: 100% !important;
      max-height: 88dvh;
      overflow-y: auto;
      padding: 20px 16px;
      /* Ruang ekstra di bawah supaya tombol terakhir tidak ketutup bottom nav */
      padding-bottom: 88px;
    }
    .form-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .fg { grid-column: span 1 !important; }
    .modal-actions { flex-direction: column; gap: 8px; margin-top: 18px; }
    .modal-actions button { width: 100%; }

    /* Typography */
    .page-title { font-size: 20px; }
    .page-subtitle { font-size: 12px; }

    /* Bulk bar */
    .bulk-bar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  }
.slip-print { font-family: 'Plus Jakarta Sans', sans-serif; padding: 40px; max-width: 680px; margin: 0 auto; color: #111; }
.slip-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 2px solid #0D2B6E; }
.slip-company-name { font-size: 18px; font-weight: 800; color: #0D2B6E; margin-bottom: 4px; }
.slip-company-detail { font-size: 11px; color: #666; line-height: 1.7; }
.slip-logo { font-size: 28px; font-weight: 800; color: #40a9de; border: 2px solid #40a9de; border-radius: 8px; padding: 6px 12px; }
.slip-title { font-size: 16px; font-weight: 800; color: #0D2B6E; margin-bottom: 4px; }
.slip-period { font-size: 13px; color: #666; margin-bottom: 24px; }
.slip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.slip-field { display: flex; flex-direction: column; gap: 2px; }
.slip-field-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: #999; font-weight: 600; }
.slip-field-val { font-size: 13px; color: #111; font-weight: 500; }
.slip-table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.slip-table td { padding: 8px 0; font-size: 13px; border-bottom: 1px solid #eee; }
.slip-table td:last-child { text-align: right; font-weight: 600; }
.slip-thp { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 14px 16px; background: #0D2B6E; border-radius: 8px; }
.slip-thp-label { font-size: 13px; font-weight: 700; color: #fff; }
.slip-thp-val { font-size: 20px; font-weight: 800; color: #fff; }
.slip-timestamp { margin-top: 32px; font-size: 10px; color: #aaa; text-align: right; }

/* Sembunyikan elemen impresi — Meta deprecated impresi sejak Jan 2025.
   Untuk mengaktifkan kembali, hapus 2 rule di bawah ini. */
.hide-impresi { display: none !important; }
td.hide-impresi, th.hide-impresi { display: none !important; }

/* ─── ANALYTICS / PENGGUNAAN DASHBOARD ─── */
.analytics-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(13,43,110,0.04);
}
.analytics-card-danger { border-left: 3px solid var(--red); }
.analytics-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.analytics-card-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  margin-top: -8px;
}
.analytics-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.analytics-bar-row { margin-bottom: 12px; }
.analytics-bar-row:last-child { margin-bottom: 0; }
.analytics-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}
.analytics-bar-name { color: var(--navy); font-weight: 600; }
.analytics-bar-count { color: var(--muted); }
.analytics-bar-track {
  background: #f0f4f8;
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}
.analytics-bar-fill { height: 100%; background: var(--blue); }
.analytics-bar-fill-green { background: var(--green); }
.analytics-bar-context {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.analytics-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 8px 0;
}
.analytics-unused-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.analytics-unused-tag {
  display: inline-block;
  background: #fef2f2;
  color: #b91c1c;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 500;
}
.analytics-footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
  font-style: italic;
}

@media (max-width: 768px) {
  .analytics-grid-2col { grid-template-columns: 1fr; }
}

/* Modal varian lebih lebar untuk konten kompleks (mis. analytics detail) */
.modal-wide { max-width: 720px; }

/* Analytics detail modal — struktur section */
.analytics-detail-header {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border-radius: 10px;
  margin-bottom: 18px;
}
.analytics-detail-stat { text-align: center; }
.analytics-detail-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}
.analytics-detail-stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.analytics-detail-section {
  margin-bottom: 18px;
}
.analytics-detail-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.analytics-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.analytics-timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 7px 10px;
  background: var(--bg);
  border-radius: 6px;
}
.analytics-timeline-event {
  color: var(--navy);
  font-weight: 500;
}
.analytics-timeline-time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.analytics-timeline-type-action { color: var(--green); font-weight: 600; }
.analytics-timeline-type-page { color: var(--blue); }

/* Row klikable di tabel user aktif */
.analytics-user-row { cursor: pointer; transition: background 0.15s; }
.analytics-user-row:hover { background: var(--bg); }

@media (max-width: 768px) {
  .modal-wide { max-width: 100%; }
  .analytics-detail-header { grid-template-columns: repeat(2, 1fr); }
}
