/* ========================================================
       1. GLOBAL VARIABLES & THEMING
       ======================================================== */
    *, *::before, *::after { 
      box-sizing: border-box; 
    }
    
    :root { 
      --primary: #2563eb; 
      --primary-hover: #1d4ed8; 
      --sidebar-bg: #0f172a; 
      --bg-color: #f1f5f9; 
      --bg-card: #ffffff; 
      --text-main: #1e293b; 
      --text-muted: #64748b; 
      --border-color: #e2e8f0; 
      --input-bg: #ffffff; 
      --glass-bg: rgba(255, 255, 255, 0.85); 
      --timeline-line: #cbd5e1;
    }
    
    html.dark-mode { 
      --bg-color: #0f172a; 
      --bg-card: #1e293b; 
      --text-main: #f8fafc; 
      --text-muted: #94a3b8; 
      --border-color: #334155; 
      --input-bg: #0f172a; 
      --glass-bg: rgba(30, 41, 59, 0.85); 
      --timeline-line: #475569;
    }
    
    html, body { 
      margin: 0; 
      padding: 0; 
      width: 100vw; 
      height: 100vh; 
      overflow: hidden !important; 
      font-family: 'Plus Jakarta Sans', sans-serif; 
      background-color: var(--bg-color); 
      color: var(--text-main); 
      transition: background-color 0.4s, color 0.4s; 
    }
    
    .app-layout { 
      display: flex; 
      height: 100vh; 
      width: 100vw; 
      overflow: hidden; 
      position: absolute; 
      top: 0; 
      left: 0; 
    }

    /* ========================================================
       2. SIDEBAR & BRANDING (SIMETRIS)
       ======================================================== */
    .sidebar { 
      position: fixed; 
      top: 0; 
      left: 0; 
      bottom: 0; 
      width: 280px; 
      background: linear-gradient(180deg, var(--sidebar-bg) 0%, #1e293b 100%); 
      color: white; 
      display: flex; 
      flex-direction: column; 
      box-shadow: 4px 0 15px rgba(0,0,0,0.05); 
      z-index: 1000; 
      transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
      overflow-y: auto; 
      overflow-x: hidden; 
    }
    
    .sidebar.collapsed { 
      width: 80px; 
    }
    
    .brand { 
      width: 100%; 
      padding: 25px 20px; 
      display: flex; 
      align-items: center; 
      justify-content: space-between; 
      transition: padding 0.3s; 
      gap: 10px;
    }
    
    .sidebar.collapsed .brand { 
      justify-content: center; 
      padding: 25px 0; 
    }
    
    .brand-info { 
      display: flex; 
      align-items: center; 
      gap: 12px; 
      flex: 1; 
      min-width: 0; 
      transition: opacity 0.3s;
    }
    
    .sidebar.collapsed .brand-info { 
      width: 0; 
      opacity: 0; 
      display: none; 
    }
    
    .brand-logo { 
      width: 48px; 
      height: 48px; 
      flex-shrink: 0; 
      object-fit: cover; 
      background-color: #ffffff; 
      border-radius: 50%; 
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); 
      padding: 2px;
    }
    
    .brand-text { 
      display: flex; 
      flex-direction: column; 
      justify-content: center; 
    }
    
    .brand-text h2 { 
      margin: 0 0 2px 0; 
      font-size: 17px; 
      font-weight: 800; 
      color: #f8fafc; 
      letter-spacing: 1px; 
    }
    
    .brand-text p { 
      margin: 0; 
      font-size: 9px; 
      color: #cbd5e1; 
      font-weight: 500; 
      line-height: 1.4; 
      white-space: nowrap; 
    }
    
    .sidebar-toggle-btn { 
      background: rgba(255, 255, 255, 0.1); 
      border: none; 
      color: white; 
      width: 36px; 
      height: 36px; 
      border-radius: 8px; 
      cursor: pointer; 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      transition: 0.3s; 
      flex-shrink: 0; 
    }
    
    .sidebar-toggle-btn:hover { 
      background: rgba(255, 255, 255, 0.2); 
      transform: scale(1.05); 
    }

    /* ========================================================
       3. NAVIGATION MENU
       ======================================================== */
    .nav-menu { 
      padding: 10px 15px; 
      display: flex; 
      flex-direction: column; 
      align-items: center; 
      flex-grow: 1;
    }
    
    .sidebar.collapsed .nav-menu { 
      padding: 10px; 
    }
    
    .nav-btn { 
      width: 100%; 
      max-width: 250px; 
      background: none; 
      border: none; 
      color: #cbd5e1; 
      padding: 14px 20px; 
      text-align: left; 
      font-size: 14px; 
      font-weight: 600; 
      cursor: pointer; 
      transition: 0.3s; 
      border-radius: 8px; 
      margin-bottom: 5px; 
      display: flex; 
      align-items: center; 
      gap: 15px; 
    }
    
    .nav-btn svg { 
      width: 20px; 
      height: 20px; 
      flex-shrink: 0; 
      opacity: 0.8; 
      transition: transform 0.3s; 
    }
    
    .nav-btn:hover { 
      background-color: rgba(255, 255, 255, 0.05); 
      color: white; 
      transform: translateX(5px); 
    }
    
    .nav-btn:hover svg { 
      transform: scale(1.1); 
    }
    
    .nav-btn.active { 
      background-color: var(--primary); 
      color: white; 
      box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); 
      transform: translateY(-2px); 
    }
    
    .nav-text { 
      white-space: nowrap; 
      transition: opacity 0.3s; 
    }
    
    .sidebar.collapsed .nav-btn { 
      width: 50px; 
      padding: 14px 0; 
      justify-content: center; 
    }
    
    .sidebar.collapsed .nav-btn:hover { 
      transform: scale(1.1); 
    }
    
    .sidebar.collapsed .nav-text { 
      display: none; 
    } 

    /* ========================================================
       4. BOTTOM ACTIONS (THEME & FOOTER)
       ======================================================== */
    .bottom-actions { 
      padding: 15px; 
      border-top: 1px solid rgba(255, 255, 255, 0.05); 
      display: flex; 
      flex-direction: column; 
      align-items: center; 
      width: 100%;
    }
    
    .theme-switch-wrapper { 
      display: flex; 
      align-items: center; 
      justify-content: space-between; 
      width: 100%; 
      max-width: 250px; 
      padding: 10px 15px; 
      color: #cbd5e1; 
      font-size: 13px; 
      font-weight: 600; 
      margin-bottom: 5px; 
      border-radius: 8px;
    }
    
    .theme-switch { 
      position: relative; 
      display: inline-block; 
      width: 48px; 
      height: 26px; 
      flex-shrink: 0; 
    }
    
    .theme-switch input { 
      opacity: 0; 
      width: 0; 
      height: 0; 
    }
    
    .theme-slider { 
      position: absolute; 
      cursor: pointer; 
      top: 0; 
      left: 0; 
      right: 0; 
      bottom: 0; 
      background-color: rgba(255, 255, 255, 0.2); 
      transition: .4s; 
      border-radius: 34px; 
    }
    
    .theme-slider:before { 
      position: absolute; 
      content: ""; 
      height: 20px; 
      width: 20px; 
      left: 3px; 
      bottom: 3px; 
      background-color: white; 
      transition: .4s; 
      border-radius: 50%; 
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); 
      z-index: 2;
    }
    
    input:checked + .theme-slider { 
      background-color: var(--primary); 
    }
    
    input:checked + .theme-slider:before { 
      transform: translateX(22px); 
    }
    
    .theme-slider svg { 
      position: absolute; 
      top: 5px; 
      width: 14px; 
      height: 14px; 
      z-index: 1; 
      pointer-events: none; 
      transition: 0.4s; 
    }
    
    .theme-slider svg.icon-sun { 
      left: 6px; 
      color: #facc15; 
      opacity: 0; 
      transform: scale(0.5); 
    }
    
    .theme-slider svg.icon-moon { 
      right: 6px; 
      color: #cbd5e1; 
      opacity: 1; 
      transform: scale(1); 
    }
    
    input:checked + .theme-slider svg.icon-sun { 
      opacity: 1; 
      transform: scale(1); 
    }
    
    input:checked + .theme-slider svg.icon-moon { 
      opacity: 0; 
      transform: scale(0.5); 
    }
    
    .sidebar.collapsed .theme-switch-wrapper { 
      padding: 10px 0; 
      justify-content: center; 
    }
    
    .sidebar.collapsed .theme-switch-text { 
      display: none; 
    }
    
    .sidebar-footer { 
      width: 100%; 
      padding: 15px; 
      text-align: center; 
      font-size: 10px; 
      color: #64748b; 
      white-space: nowrap; 
      transition: opacity 0.3s; 
      line-height: 1.5;
    }
    
    .sidebar.collapsed .sidebar-footer { 
      opacity: 0; 
      visibility: hidden; 
      height: 0; 
      padding: 0;
    }

    /* ========================================================
       5. MOBILE HEADER & OVERLAY
       ======================================================== */
    .mobile-header-glass { 
      display: none; 
      position: fixed; 
      top: 0; 
      left: 0; 
      width: 100%; 
      height: 65px; 
      background: var(--glass-bg); 
      backdrop-filter: blur(12px); 
      border-bottom: 1px solid var(--border-color); 
      z-index: 800; 
      align-items: center; 
      justify-content: space-between; 
      padding: 0 20px; 
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); 
    }
    
    .mobile-header-title { 
      font-size: 14px; 
      font-weight: 700; 
      color: var(--text-main); 
      display: flex; 
      align-items: center; 
      gap: 10px; 
    }
    
    .mobile-menu-btn { 
      background: transparent; 
      border: none; 
      width: 38px; 
      height: 38px; 
      color: var(--text-main); 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      cursor: pointer; 
    }
    
    .mobile-overlay { 
      position: fixed; 
      top: 0; 
      left: 0; 
      width: 100vw; 
      height: 100vh; 
      background: rgba(15, 23, 42, 0.5); 
      z-index: 900; 
      display: none; 
      backdrop-filter: blur(4px); 
      transition: opacity 0.4s; 
      opacity: 0; 
    }
    
    .mobile-overlay.active { 
      display: block; 
      opacity: 1; 
    }

    /* ========================================================
       6. CONTENT WRAPPER & TAB ANIMATION
       ======================================================== */
    .content-wrapper { 
      margin-left: 280px; 
      height: 100vh; 
      position: relative; 
      transition: margin-left 0.4s, width 0.4s; 
      display: flex; 
      flex-direction: column; 
      width: calc(100% - 280px); 
      overflow: hidden; 
      background: var(--bg-color); 
    }
    
    .sidebar.collapsed ~ .content-wrapper { 
      margin-left: 80px; 
      width: calc(100% - 80px); 
    }
    
    .main-scroller { 
      position: absolute; 
      top: 0; 
      left: 0; 
      right: 0; 
      bottom: 0; 
      overflow-y: auto !important; 
      overflow-x: hidden; 
      scroll-behavior: smooth;
    }
    
    .content-inner { 
      padding: 30px 40px 100px 40px; 
      width: 100%; 
      max-width: 1250px; 
      margin: 0 auto; 
      box-sizing: border-box; 
      position: relative; 
    }
    
    .header-title { 
      margin-bottom: 25px; 
    }
    
    .header-title h1 { 
      margin: 0; 
      font-size: 24px; 
      font-weight: 700; 
      letter-spacing: -0.5px; 
    }
    
    .header-title p { 
      margin: 6px 0 0 0; 
      color: var(--text-muted); 
      font-size: 14px; 
    }
    
    .card { 
      background: var(--bg-card); 
      padding: 30px; 
      border-radius: 16px; 
      box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08); 
      border: 1px solid var(--border-color); 
      width: 100%; 
      box-sizing: border-box; 
      opacity: 0; 
      visibility: hidden; 
      transform: translateY(15px); 
      transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s; 
      position: absolute; 
      top: 30px; 
      left: 40px; 
      right: 40px; 
      pointer-events: none; 
      z-index: 1; 
      width: calc(100% - 80px);
    }
    
    .card.active { 
      opacity: 1; 
      visibility: visible; 
      transform: translateY(0); 
      position: relative; 
      top: 0; 
      left: 0; 
      right: 0; 
      pointer-events: auto; 
      z-index: 2; 
      width: 100%; 
    }

    /* ========================================================
       7. ANIMATIONS & SPINNERS
       ======================================================== */
    .skeleton-loader { 
      background: linear-gradient(90deg, var(--bg-color) 25%, var(--border-color) 50%, var(--bg-color) 75%); 
      background-size: 200% 100%; 
      animation: shimmer 1.5s infinite linear; 
      border-radius: 6px; 
    }
    
    @keyframes shimmer { 
      0% { background-position: -200% 0; } 
      100% { background-position: 200% 0; } 
    }
    
    @keyframes fadeIn { 
      from { opacity: 0; transform: translateY(10px); } 
      to { opacity: 1; transform: translateY(0); } 
    }
    
    @keyframes shakeModal { 
      0%, 100% { transform: scale(1) translateX(0); } 
      20%, 60% { transform: scale(1) translateX(-8px); } 
      40%, 80% { transform: scale(1) translateX(8px); } 
    }
    
    .modal-shake { 
      animation: shakeModal 0.4s both; 
      border-color: #ef4444 !important; 
    }
    
    .spin-svg { 
      animation: spinSVG 1s linear infinite; 
      height: 18px; 
      width: 18px; 
      display: inline-block; 
      flex-shrink: 0;
    }
    
    @keyframes spinSVG { 
      100% { transform: rotate(360deg); } 
    }

    /* ========================================================
       8. DASHBOARD ELEMENTS
       ======================================================== */
    .dashboard-layout-v2 { 
      display: grid; 
      grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); 
      gap: 20px; 
      width: 100%; 
    }
    
    .left-panel, .right-panel { 
      display: flex; 
      flex-direction: column; 
      gap: 20px; 
    }
    
    .welcome-banner { 
      background: linear-gradient(135deg, #1e3a8a 0%, var(--primary) 100%); 
      color: white; 
      padding: 25px 30px; 
      border-radius: 16px; 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      flex-wrap: wrap; 
      gap: 15px;
    }
    
    .welcome-banner h2 { 
      margin: 0 0 5px 0; 
      font-size: 20px; 
      font-weight: 700; 
    }
    
    .welcome-banner p { 
      margin: 0; 
      font-size: 13px; 
      color: #e0e7ff; 
      line-height: 1.5; 
    }
    
    .datetime-badge { 
      background: rgba(255, 255, 255, 0.15); 
      padding: 10px 16px; 
      border-radius: 8px; 
      font-size: 12px; 
      font-weight: 600; 
      display: flex; 
      align-items: center; 
      gap: 8px; 
      border: 1px solid rgba(255, 255, 255, 0.2); 
      
      /* --- V2.6.1 ANTI-GOYANG --- */
      font-variant-numeric: tabular-nums; /* Rahasia agar angka punya lebar yang sama rata */
      min-width: 285px; /* Mengunci lebar kotak agar tidak kembang kempis */
      justify-content: center; /* Teks tetap di tengah */
    }
    
    .dashboard-grid { 
      display: grid; 
      grid-template-columns: repeat(4, minmax(0, 1fr)); 
      gap: 15px; 
      margin-bottom: 25px; 
      margin-top: 20px;
    }
    
    .stat-card { 
      background: var(--bg-card); 
      border: 1px solid var(--border-color); 
      border-radius: 12px; 
      padding: 20px; 
      display: flex; 
      flex-direction: column; 
      justify-content: center; 
      transition: transform 0.3s, box-shadow 0.3s; 
    }
    
    .stat-card:hover { 
      transform: translateY(-5px); 
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); 
    }
    
    .stat-card .val { 
      font-size: 28px; 
      font-weight: 800; 
      color: var(--text-main); 
      margin: 0 0 5px 0; 
    }
    
    .stat-card .lbl { 
      font-size: 11px; 
      color: var(--text-muted); 
      font-weight: 700; 
      text-transform: uppercase; 
    }
    
    .icon-wrapper { 
      width: 44px; 
      height: 44px; 
      border-radius: 10px; 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      margin-bottom: 12px; 
    }
    
    .chart-container { 
      background: var(--bg-card); 
      border: 1px solid var(--border-color); 
      border-radius: 12px; 
      padding: 15px; 
      height: 230px; 
      display: flex; 
      justify-content: center; 
      align-items: center;
    }
    
    .chart-grid { 
      display: grid; 
      grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); 
      gap: 15px; 
    }
    
    .system-card { 
      background: var(--bg-card); 
      border: 1px solid var(--border-color); 
      border-radius: 12px; 
      padding: 20px; 
    }
    
    .system-header { 
      font-size: 13px; 
      font-weight: 800; 
      color: var(--text-main); 
      margin-bottom: 15px; 
      padding-bottom: 12px; 
      border-bottom: 1px solid var(--border-color); 
      display: flex; 
      align-items: center; 
      justify-content: space-between; 
      gap: 8px;
    }
    
    .system-row { 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      font-size: 12px; 
      color: var(--text-muted); 
      margin-bottom: 12px; 
      border-bottom: 1px dashed var(--border-color); 
      padding-bottom: 8px;
    }
    
    .system-val { 
      font-weight: 700; 
      color: var(--text-main); 
      text-align: right;
    }
    
    .quick-actions-grid { 
      display: grid; 
      grid-template-columns: repeat(2, minmax(0, 1fr)); 
      gap: 12px; 
    }
    
    .quick-action-card { 
      background: var(--bg-card); 
      border: 1px solid var(--border-color); 
      border-radius: 12px; 
      padding: 15px; 
      display: flex; 
      align-items: center; 
      gap: 12px; 
      cursor: pointer; 
      transition: 0.3s; 
    }
    
    .quick-action-card:hover { 
      border-color: var(--primary); 
      transform: translateY(-4px); 
      box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1); 
    }
    
    .quick-action-icon { 
      width: 40px; 
      height: 40px; 
      border-radius: 10px; 
      display: flex; 
      justify-content: center; 
      align-items: center; 
      flex-shrink: 0;
    }
    
    .quick-action-text h4 { 
      margin: 0 0 4px 0; 
      font-size: 13px; 
      color: var(--text-main); 
      font-weight: 700; 
    }
    
    .quick-action-text p { 
      margin: 0; 
      font-size: 10px; 
      color: var(--text-muted); 
    }
    
    .section-title { 
      font-size: 12px; 
      font-weight: 800; 
      color: var(--text-muted); 
      margin-bottom: 10px; 
      text-transform: uppercase; 
      display: flex; 
      justify-content: space-between; 
      align-items: center;
    }
    
    .chip-container { 
      display: flex; 
      gap: 8px; 
      flex-wrap: wrap; 
      margin-bottom: 15px; 
      align-items: center;
    }
    
    .chip-btn { 
      background: var(--bg-card); 
      border: 1px solid var(--border-color); 
      color: var(--text-muted); 
      padding: 6px 14px; 
      border-radius: 20px; 
      font-size: 11px; 
      font-weight: 700; 
      cursor: pointer; 
      transition: 0.3s;
    }
    
    .chip-btn:hover { 
      background: rgba(0, 0, 0, 0.05); 
    }
    
    .chip-btn.active { 
      background: rgba(37, 99, 235, 0.1); 
      border-color: var(--primary); 
      color: var(--primary); 
    }

    /* ========================================================
       9. FORMS & BUTTONS
       ======================================================== */
    .form-grid { 
      display: grid; 
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
      gap: 24px; 
      margin-bottom: 30px; 
    }
    
    .form-group { 
      display: flex; 
      flex-direction: column; 
      width: 100%; 
      min-width: 0; 
    }
    
    .form-group.full { 
      grid-column: 1 / -1; 
    }
    
    label { 
      font-weight: 600; 
      font-size: 13px; 
      margin-bottom: 8px; 
      color: var(--text-main); 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
    }
    
    .draft-badge { 
      font-size: 10px; 
      color: #10b981; 
      font-weight: 700; 
      display: none; 
      background: rgba(16, 185, 129, 0.1); 
      padding: 2px 6px; 
      border-radius: 4px; 
    }
    
    .btn-ocr { 
      background: linear-gradient(135deg, #10b981 0%, #059669 100%); 
      color: white; 
      border: none; 
      padding: 6px 12px; 
      border-radius: 6px; 
      font-size: 11px; 
      font-weight: 700; 
      cursor: pointer; 
      display: inline-flex; 
      align-items: center; 
      gap: 5px; 
      transition: 0.3s; 
    }
    
    .btn-ocr:hover { 
      opacity: 0.9; 
      transform: translateY(-1px); 
      box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); 
    }
    
    input[type="text"], input[type="password"], input[type="date"], select { 
      width: 100%; 
      padding: 12px 16px; 
      border: 1px solid var(--border-color); 
      border-radius: 6px; 
      font-family: inherit; 
      font-size: 14px; 
      color: var(--text-main); 
      outline: none; 
      background-color: var(--input-bg); 
      transition: 0.3s; 
    }
    
    input[type="date"] { 
      min-height: 44px; 
      display: block; 
    }
    
    html.dark-mode input[type="date"]::-webkit-calendar-picker-indicator { 
      filter: invert(1); 
    }
    
    input:focus, select:focus { 
      border-color: var(--primary); 
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); 
    }
    
    input:disabled { 
      background-color: rgba(0, 0, 0, 0.05); 
      color: var(--text-muted); 
      opacity: 1; 
    }
    
    .atomic-grid { 
      display: flex; 
      gap: 8px; 
      align-items: center; 
      flex-wrap: wrap; 
      margin-bottom: 10px; 
    }
    
    .atomic-grid input, .atomic-grid select { 
      padding: 10px 12px; 
      height: 44px; 
      margin: 0; 
    }
    
    .txt-slash { 
      font-weight: 800; 
      color: var(--text-muted); 
      font-size: 16px; 
    }
    
    .amber-box { 
      background: rgba(245, 158, 11, 0.05); 
      border: 1px solid rgba(245, 158, 11, 0.3); 
      padding: 15px; 
      border-radius: 8px; 
      margin-bottom: 15px; 
      display: none; 
      animation: fadeIn 0.4s; 
    }
    
    .switch-amber input:checked + .theme-slider { 
      background-color: #f59e0b; 
      border-color: #f59e0b; 
    }
    
    .preview-text { 
      font-size: 15px; 
      font-weight: 800; 
      color: var(--primary); 
      background: rgba(37, 99, 235, 0.05); 
      padding: 10px 15px; 
      border-radius: 8px; 
      border: 1px dashed var(--primary); 
      display: inline-block; 
      margin-top: 10px; 
      word-break: break-all;
    }
    
    .smart-hint { 
      font-size: 12px; 
      color: #2563eb; 
      font-weight: 700; 
      margin-top: 10px; 
      display: flex; 
      align-items: center; 
      gap: 5px; 
      background: rgba(37, 99, 235, 0.1); 
      padding: 8px 12px; 
      border-radius: 6px; 
      animation: fadeIn 0.4s;
    }

    .btn-primary { 
      background-color: var(--primary); 
      color: white; 
      border: none; 
      padding: 16px; 
      width: 100%; 
      border-radius: 8px; 
      font-weight: 600; 
      cursor: pointer; 
      margin-top: 10px; 
      font-size: 14px; 
      display: flex; 
      justify-content: center; 
      align-items: center; 
      gap: 10px; 
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); 
      transition: 0.3s; 
      position: relative; 
      z-index: 10; 
      overflow: hidden; 
    }
    
    .btn-primary:hover { 
      background-color: var(--primary-hover); 
      transform: translateY(-2px); 
      box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); 
    }
    
    .btn-primary:disabled { 
      background-color: var(--text-muted); 
      cursor: not-allowed; 
      transform: none; 
      box-shadow: none; 
    }
    
    .btn-secondary { 
      background-color: var(--bg-color); 
      color: var(--text-main); 
      border: 1px solid var(--border-color); 
      padding: 12px 16px; 
      border-radius: 8px; 
      font-weight: 600; 
      cursor: pointer; 
      font-size: 13px; 
      display: inline-flex; 
      align-items: center; 
      justify-content: center; 
      gap: 8px; 
      transition: 0.3s; 
      z-index: 10;
    }
    
    .btn-secondary:hover { 
      background-color: rgba(0, 0, 0, 0.05); 
      border-color: #cbd5e1; 
      transform: translateY(-1px); 
    }

    /* ========================================================
       10. UPLOAD AREA (DRAG & DROP)
       ======================================================== */
    .upload-area { 
      position: relative; 
      border: 2px dashed var(--border-color); 
      border-radius: 12px; 
      padding: 40px 20px; 
      text-align: center; 
      background-color: var(--bg-color); 
      transition: 0.3s; 
      display: block; 
      width: 100%; 
      box-sizing: border-box; 
      overflow: hidden; 
    }
    
    .upload-area:hover { 
      background-color: rgba(37, 99, 235, 0.02); 
      border-color: #cbd5e1; 
    }
    
    .upload-area.dragover { 
      border-color: var(--primary); 
      background-color: rgba(37, 99, 235, 0.08); 
      border-style: solid; 
      transform: scale(1.02); 
      box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1); 
    }
    
    .upload-area svg { 
      width: 44px; 
      height: 44px; 
      color: var(--text-muted); 
      margin-bottom: 15px; 
      transition: 0.4s; 
      pointer-events: none;
    }
    
    .upload-area.dragover svg { 
      color: var(--primary); 
      transform: scale(1.2) translateY(-5px); 
    }
    
    .upload-text { 
      display: block; 
      font-size: 14px; 
      font-weight: 600; 
      color: var(--text-main); 
      pointer-events: none; 
    }
    
    .upload-hint { 
      display: block; 
      font-size: 12px; 
      color: var(--text-muted); 
      margin-top: 5px; 
      pointer-events: none; 
    }
    
    .file-overlay { 
      position: absolute; 
      top: 0; 
      left: 0; 
      width: 100%; 
      height: 100%; 
      opacity: 0; 
      cursor: pointer; 
      z-index: 10; 
    }
    
    .fileNameDisplay { 
      font-size: 13px; 
      font-weight: 600; 
      color: var(--primary); 
      margin-top: 15px; 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      gap: 8px; 
      animation: fadeIn 0.3s;
    }

    /* ========================================================
       11. TABLES, LISTS & ACTIONS
       ======================================================== */
    .table-container { 
      width: 100%; 
      overflow-x: auto; 
      background: var(--bg-card); 
      border: 1px solid var(--border-color); 
      border-radius: 12px; 
      margin-bottom: 10px; 
    }
    
    .riwayat-table { 
      width: 100%; 
      min-width: 600px; 
      border-collapse: collapse; 
      font-size: 12px; 
      text-align: left; 
    } 
    
    .riwayat-table th { 
      padding: 14px 15px; 
      color: var(--text-muted); 
      background-color: var(--bg-color); 
      border-bottom: 2px solid var(--border-color); 
      text-transform: uppercase; 
      font-size: 10px; 
      white-space: nowrap; 
    }
    
    .riwayat-table td { 
      padding: 14px 15px; 
      border-bottom: 1px solid var(--border-color); 
      color: var(--text-main); 
      vertical-align: middle; 
      transition: 0.2s;
    }
    
    .riwayat-table tbody tr:hover td { 
      background-color: rgba(0,0,0,0.01); 
    }
    
    .badge-masuk { 
      background: rgba(16, 185, 129, 0.1); 
      color: #10b981; 
      padding: 4px 8px; 
      border-radius: 4px; 
      font-size: 10px; 
      font-weight: 700; 
      display: inline-block; 
      white-space: nowrap;
    }
    
    .badge-keluar { 
      background: rgba(147, 51, 234, 0.1); 
      color: #9333ea; 
      padding: 4px 8px; 
      border-radius: 4px; 
      font-size: 10px; 
      font-weight: 700; 
      display: inline-block; 
      white-space: nowrap;
    }
    
    .badge-sisipan { 
      background: rgba(245, 158, 11, 0.2); 
      color: #d97706; 
      padding: 2px 6px; 
      border-radius: 4px; 
      font-size: 9px; 
      font-weight: 800; 
      margin-left: 6px; 
      vertical-align: middle; 
      text-transform: uppercase; 
    }
    
    .row-revisi { 
      background-color: #fef2f2 !important; 
    }
    
    .row-revisi td { 
      border-bottom: 1px solid #fecaca !important; 
    }

    /* --- V2.6.1 FIX: Penyesuaian Warna Baris Revisi di Mode Gelap --- */
    html.dark-mode .row-revisi { 
      background-color: rgba(239, 68, 68, 0.05) !important; /* Merah transparan yang kalem */
    }
    
    html.dark-mode .row-revisi td { 
      border-bottom: 1px solid rgba(239, 68, 68, 0.15) !important; /* Garis batas lebih gelap */
    }
    
    .row-revisi td span, .row-revisi td strong, .row-revisi td div.copyable-text { 
      text-decoration: line-through !important; 
      color: #ef4444 !important; 
      opacity: 0.8; 
    }
    
    .row-revisi .badge-revisi { 
      text-decoration: none !important; 
      display: inline-block; 
      background: rgba(239, 68, 68, 0.1); 
      color: #ef4444 !important; 
      padding: 4px 8px; 
      font-size: 10px; 
      font-weight: 800; 
      border-radius: 4px; 
      margin-top: 4px; 
      border: 1px solid rgba(239, 68, 68, 0.3); 
      opacity: 1 !important;
    }
    
    .row-revisi td .action-btn { 
      text-decoration: none !important; 
      opacity: 1 !important; 
      color: inherit !important;
    }
    
    .action-btn { 
      background: none; 
      border: none; 
      cursor: pointer; 
      padding: 6px; 
      border-radius: 6px; 
      display: inline-flex; 
      align-items: center; 
      justify-content: center; 
      z-index: 10; 
      transition: 0.2s; 
    }
    
    .action-btn:hover { 
      transform: scale(1.15); 
    }
    
    .action-btn.view { 
      color: #3b82f6; 
      background: rgba(59, 130, 246, 0.1); 
    }
    .action-btn.view:hover { 
      background: rgba(59, 130, 246, 0.2); 
    }

    .action-btn.edit { 
      color: #f59e0b; 
      background: rgba(245, 158, 11, 0.1); 
    }
    
    .action-btn.edit:hover { 
      background: rgba(245, 158, 11, 0.2); 
    }
    
    .action-btn.delete { 
      color: #ef4444; 
      background: rgba(239, 68, 68, 0.1); 
    }
    
    .action-btn.delete:hover { 
      background: rgba(239, 68, 68, 0.2); 
    }
    
    .admin-only { 
      display: none !important; 
    }
    
    body.admin-mode .admin-only { 
      display: flex !important; 
    }
    
    body.admin-mode .admin-only.inline { 
      display: inline-flex !important; 
    }
    
    .copyable-text { 
      color: var(--primary); 
      display: inline-flex; 
      align-items: center; 
      gap: 5px; 
      margin-bottom: 2px; 
      cursor: pointer; 
      padding: 2px 4px; 
      margin-left:-4px; 
      border-radius: 4px; 
      transition: 0.2s;
    }
    
    .copyable-text:hover { 
      background-color: rgba(37,99,235,0.1); 
    }
    
    .copyable-text svg { 
      width: 12px; 
      height: 12px; 
      opacity: 0.5; 
    }
    
    .search-box { 
      position: relative; 
      margin-bottom: 0; 
      flex: 1; 
      min-width: 200px;
    }
    
    .search-box svg { 
      position: absolute; 
      left: 16px; 
      top: 50%; 
      transform: translateY(-50%); 
      color: var(--text-muted); 
      width: 20px; 
      height: 20px; 
    }
    
    .search-box input { 
      width: 100%; 
      padding-left: 45px; 
      border-radius: 10px; 
      font-size: 14px; 
      border: 2px solid var(--border-color); 
      height: 48px; 
      box-sizing: border-box; 
      transition: 0.3s;
    }
    
    .pagination-container { 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      margin-top: 20px; 
      padding: 0 10px; 
      font-size: 13px; 
      color: var(--text-muted); 
      font-weight: 600;
    }
    
    .pagination-btns { 
      display: flex; 
      gap: 8px; 
    }
    
    .desktop-only { display: flex; } 
    .mobile-only { display: none; }
    
    .empty-state { 
      padding: 40px 20px; 
      text-align: center; 
      color: #94a3b8; 
    }
    
    .empty-state svg { 
      width: 48px; 
      height: 48px; 
      color: #cbd5e1; 
      margin-bottom: 12px; 
    }

    /* ========================================================
       12. MODALS, TOAST, & OVERLAYS
       ======================================================== */
    #gatewayScreen { 
      position: fixed; 
      top: 0; 
      left: 0; 
      width: 100vw; 
      height: 100vh; 
      background: #0f172a; 
      z-index: 50000; 
      display: flex; 
      flex-direction: column; 
      align-items: center; 
      justify-content: flex-start; 
      padding-top: 8vh; 
      overflow-y: auto; 
      color: white; 
      transition: opacity 0.5s ease-in-out; 
    }
    
    .gateway-container { 
      text-align: center; 
      max-width: 700px; 
      width: 90%; 
      margin: 0 auto 50px auto; 
      animation: fadeIn 0.8s ease; 
    }
    
    .modal-overlay { 
      position: fixed; 
      top: 0; 
      left: 0; 
      width: 100vw; 
      height: 100vh; 
      background: rgba(15, 23, 42, 0.7); 
      z-index: 99999; 
      display: none; 
      justify-content: center; 
      align-items: center; 
      backdrop-filter: blur(4px); 
      opacity: 0; 
      transition: opacity 0.3s; 
    }
    
    .modal-overlay.active { 
      display: flex; 
      opacity: 1; 
    }
    
    .modal-content { 
      background: var(--bg-card); 
      padding: 30px; 
      border-radius: 16px; 
      width: 90%; 
      max-width: 500px; 
      max-height: 90vh; 
      overflow-y: auto; 
      box-sizing: border-box; 
      border: 1px solid var(--border-color); 
      transform: scale(0.95) translateY(20px); 
      transition: 0.4s; 
      opacity: 0; 
    }
    
    .modal-overlay.active .modal-content { 
      transform: scale(1) translateY(0); 
      opacity: 1; 
    }

    .toast { 
      position: fixed; 
      top: 30px; 
      right: 30px; 
      bottom: auto; 
      background: #1e293b; 
      color: white; 
      padding: 16px 24px; 
      border-radius: 12px; 
      font-size: 14px; 
      font-weight: 600; 
      display: flex; 
      align-items: center; 
      gap: 12px; 
      box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
      transform: translateX(120%); 
      opacity: 0; 
      transition: 0.5s; 
      z-index: 999999; 
      pointer-events: none;
    }
    
    .toast.show { 
      transform: translateX(0); 
      opacity: 1; 
    }
    
    #modalPratinjauPDF .modal-content { 
      width: 95%; 
      max-width: 900px; 
      height: 90vh; 
      padding: 20px; 
      display: flex; 
      flex-direction: column; 
      border-top: 5px solid var(--primary);
    }
    
    .pdf-iframe-container { 
      flex: 1; 
      background: var(--bg-color); 
      border-radius: 8px; 
      overflow: hidden; 
      border: 1px solid var(--border-color); 
      margin-top: 15px;
    }
    
    .terminal-modal .modal-content { 
      background: #0f172a; 
      color: #10b981; 
      font-family: monospace; 
      border: 1px solid #334155; 
      max-width: 600px; 
      padding: 20px;
    }
    
    .terminal-header { 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      border-bottom: 1px solid #334155; 
      padding-bottom: 15px; 
      margin-bottom: 15px; 
      font-family: 'Plus Jakarta Sans', sans-serif; 
    }

    /* ========================================================
       13. TTE & QR CANVAS
       ======================================================== */
    .pdf-preview-container { 
      display: none; 
      margin-top: 25px; 
      padding: 20px; 
      background: var(--bg-color); 
      border-radius: 8px; 
      border: 1px solid var(--border-color); 
      text-align: center; 
      user-select: none; 
      box-sizing: border-box; 
      animation: fadeIn 0.4s;
    }
    
    .pdf-canvas-wrapper { 
      position: relative; 
      display: inline-block; 
      box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
      border: 1px solid var(--text-muted); 
      background: white; 
      margin-top: 15px; 
      overflow: hidden; 
      max-width: 100%;
    }
    
    #pdfCanvas { 
      display: block; 
      max-width: 100%; 
      height: auto; 
      cursor: crosshair; 
    }
    
    .qr-box { 
      position: absolute; 
      border: 3px dashed #94a3b8; 
      background: rgba(255,255,255,0.85); 
      border-radius: 4px; 
      pointer-events: auto; 
      cursor: grab; 
      z-index: 10; 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      text-align: center; 
      font-size: 11px; 
      font-weight: 700; 
      color: #475569; 
      padding: 5px; 
      overflow: hidden; 
      box-sizing: border-box; 
      transition: box-shadow 0.2s, border-color 0.2s;
    }
    
    .qr-box.active { 
      border-color: var(--primary); 
      background: rgba(37,99,235,0.15); 
      color: var(--primary); 
      box-shadow: 0 0 0 4px rgba(37,99,235,0.3); 
      z-index: 15; 
    }
    
    .stamp-badge { 
      background: rgba(37,99,235,0.1); 
      border: 1px solid rgba(37,99,235,0.2); 
      color: var(--primary); 
      padding: 6px 12px; 
      border-radius: 20px; 
      font-size: 12px; 
      font-weight: 600; 
      display: inline-flex; 
      align-items: center; 
      gap: 8px; 
      margin-bottom: 5px; 
      animation: fadeIn 0.3s;
    }
    
    .stamp-badge button { 
      background: none; 
      border: none; 
      color: #ef4444; 
      cursor: pointer; 
      font-size: 14px; 
      font-weight: bold; 
      padding: 0; 
      line-height: 1; 
      transition: 0.2s;
    }
    
    .stamp-badge button:hover { 
      transform: scale(1.2); 
    }
    
    .resize-controls { 
      display: none; 
      align-items: center; 
      justify-content: center; 
      gap: 15px; 
      margin-top: 15px; 
      background: var(--bg-card); 
      padding: 15px; 
      border-radius: 8px; 
      border: 1px solid var(--border-color); 
      flex-wrap: wrap; 
      box-sizing: border-box; 
      animation: fadeIn 0.3s;
    }
    
    input[type="range"] { 
      -webkit-appearance: none; 
      appearance: none;
      width: 200px; 
      height: 8px; 
      background: var(--border-color); 
      border-radius: 5px; 
      outline: none; 
      margin: 10px 0;
    }
    
    input[type="range"]::-webkit-slider-thumb { 
      -webkit-appearance: none; 
      appearance: none; 
      width: 24px; 
      height: 24px; 
      border-radius: 50%; 
      background: var(--primary); 
      cursor: pointer; 
      box-shadow: 0 2px 5px rgba(0,0,0,0.3); 
      transition: 0.1s;
    }
    
    input[type="range"]::-webkit-slider-thumb:hover { 
      transform: scale(1.1); 
    }

    /* ========================================================
       14. VERIFICATION BOX (LAMPU LALU LINTAS)
       ======================================================== */
    .validation-grid { 
      display: grid; 
      gap: 20px; 
      margin-bottom: 20px;
    }
    
    .val-box { 
      border: 2px dashed var(--border-color); 
      background: var(--bg-card); 
      padding: 40px 20px; 
      border-radius: 12px; 
      text-align: center; 
      position: relative; 
      transition: 0.3s; 
      cursor: pointer;
    }
    
    .val-box:hover { 
      background-color: rgba(0,0,0,0.02); 
      border-color: #cbd5e1; 
    }
    
    .val-box.dragover { 
      border-color: var(--primary); 
      background: rgba(37,99,235,0.08); 
      transform: scale(1.02); 
      box-shadow: 0 10px 30px rgba(37,99,235,0.1); 
    }
    
    .val-box.active { 
      border-color: var(--primary); 
      border-style: solid; 
      background: rgba(37,99,235,0.02); 
    }
    
    .val-status { 
      font-size: 14px; 
      margin-top: 20px; 
      padding: 20px; 
      border-radius: 8px; 
      display: none; 
      border-width: 1px; 
      border-style: solid; 
      animation: fadeIn 0.5s; 
    }
    
    .val-status.green { 
      display: block; 
      background: rgba(16, 185, 129, 0.1); 
      color: #059669; 
      border-color: rgba(16, 185, 129, 0.3); 
    }
    
    .val-status.yellow { 
      display: block; 
      background: rgba(245, 158, 11, 0.1); 
      color: #d97706; 
      border-color: rgba(245, 158, 11, 0.3); 
    }
    
    .val-status.red { 
      display: block; 
      background: rgba(239, 68, 68, 0.1); 
      color: #dc2626; 
      border-color: rgba(239, 68, 68, 0.3); 
    }

    /* GATEWAY & CERTIFICATE UI */
    .gateway-logo { 
      width: 90px; 
      height: 90px; 
      border-radius: 50%; 
      background: white; 
      padding: 5px; 
      margin-bottom: 25px; 
      box-shadow: 0 10px 25px rgba(0,0,0,0.5); 
    }
    
    .gateway-title { font-size: 32px; font-weight: 800; letter-spacing: 1px; margin: 0 0 10px 0; }
    .gateway-subtitle { color: #94a3b8; font-size: 15px; margin-bottom: 40px; line-height: 1.6; }
    .gateway-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    
    .gw-card { 
      background: #1e293b; 
      border: 1px solid #334155; 
      padding: 35px 25px; 
      border-radius: 16px; 
      cursor: pointer; 
      transition: 0.4s; 
      display: flex; 
      flex-direction: column; 
      align-items: center; 
    }
    
    .gw-card:hover { 
      transform: translateY(-8px); 
      border-color: var(--primary); 
      box-shadow: 0 15px 35px rgba(37,99,235,0.25); 
      background: #233147; 
    }
    
    .gw-icon { 
      width: 56px; 
      height: 56px; 
      background: rgba(255,255,255,0.05); 
      border-radius: 14px; 
      display: flex; 
      justify-content: center; 
      align-items: center; 
      margin-bottom: 20px; 
      color: #60a5fa; 
      transition: 0.3s;
    }
    
    .gw-card:hover .gw-icon { transform: scale(1.1); color: #93c5fd; }
    .gw-card-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
    .gw-card-desc { font-size: 12px; color: #94a3b8; line-height: 1.5; }

    .tte-cert-card { 
      background: var(--bg-card); 
      border: 1px solid var(--border-color); 
      border-radius: 12px; 
      padding: 30px; 
      text-align: left; 
      box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
      max-width: 600px; 
      margin: 0 auto; 
      animation: fadeIn 0.6s; 
    }
    
    .tte-cert-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
    .tte-cert-icon { width: 50px; height: 50px; background: #10b981; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
    .tte-cert-title h2 { margin: 0 0 5px 0; color: #059669; font-size: 20px; }
    .tte-cert-title p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
    .tte-data-row { margin-bottom: 15px; }
    .tte-data-lbl { display: block; font-size: 10px; text-transform: uppercase; font-weight: 800; color: var(--text-muted); margin-bottom: 4px; }
    .tte-data-val { font-size: 14px; font-weight: 600; color: var(--text-main); }
    .tte-hash-box { margin-top: 15px; padding: 10px; background: var(--bg-color); border-radius: 6px; border: 1px dashed var(--border-color); font-family: monospace; font-size: 11px; word-break: break-all; color: var(--text-muted); }

    /* ========================================================
       14.5. TABLET & SPLIT-SCREEN RESPONSIVE (V2.6.1 FIX)
       ======================================================== */
    @media (max-width: 1150px) {
      .dashboard-grid { 
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* Jadikan kotak atas 2 baris */
      }
      .dashboard-layout-v2 { 
        grid-template-columns: minmax(0, 1fr); /* Paksa panel kiri & kanan bertumpuk atas-bawah */
      }
      .chart-grid {
        grid-template-columns: minmax(0, 1fr); /* Grafik menyesuaikan layar */
      }
      .adzan-card {
        padding: 25px 20px; /* Sedikit dilonggarkan agar tidak sesak */
      }
    }

    /* ========================================================
       15. MEDIA QUERIES (MOBILE RESPONSIVE)
       ======================================================== */
    @media (max-width: 768px) {
      .desktop-only { display: none !important; } 
      .mobile-only { display: flex !important; }
      
      .mobile-header-glass { 
        display: flex !important; 
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 60px; 
        background: var(--glass-bg); 
        backdrop-filter: blur(10px); 
        z-index: 800; 
        align-items: center; 
        justify-content: space-between; 
        padding: 0 20px; 
        border-bottom: 1px solid var(--border-color); 
      }
      
      .sidebar { transform: translateX(-100%); width: 280px !important; }
      .sidebar.mobile-open { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
      .sidebar .brand-info, .sidebar .nav-text, .sidebar .sidebar-footer { opacity: 1 !important; visibility: visible !important; width: auto !important; display: flex !important;}
      .sidebar .brand { justify-content: space-between; padding: 25px 20px;}
      .sidebar .nav-btn { width: 250px !important; padding: 14px 20px !important; justify-content: flex-start !important; }
      
      .content-wrapper { margin-left: 0 !important; width: 100vw; overflow: hidden; }
      .main-scroller { top: 60px; padding-bottom: 80px; }
      .content-inner { padding: 15px 10px 150px 10px !important; }
      
      /* Fix Mobile Tabs Position */
      .card { padding: 20px 15px; width: calc(100% - 20px); border-radius: 12px; left: 10px; right: 10px; }
      .card.active { width: 100%; left: 0; right: 0; }
      
      .dashboard-layout-v2 { grid-template-columns: minmax(0, 1fr); gap: 15px; }
      .chart-grid { grid-template-columns: minmax(0, 1fr); }
      .welcome-banner { flex-direction: column; text-align: center; padding: 20px 15px; border-radius: 12px;}
      .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
      .quick-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
      .form-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
      .gateway-cards { grid-template-columns: 1fr; }
      
      .toast { top: 20px; right: 20px; left: 20px; transform: translateY(-150%); }
      .toast.show { transform: translateY(0); }
    }

      /* ========================================================
       /* ========================================================
       16. ANIMASI DINAMIS (REFRESH & SIDEBAR) SUPER KUAT
       ======================================================== */
    @keyframes putaranBaling {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .spin-sync {
        animation: putaranBaling 1s linear infinite !important;
        transform-origin: center !important; /* Pastikan berputar di poros tengah */
    }
    
    .putar-balik {
        transform: rotate(180deg) !important;
    }

    /* Targetkan langsung ke tombol yang memanggil fungsi */
    [onclick="toggleSidebar()"] {
        transition: transform 0.3s ease-in-out !important;
    }

    /* ========================================================
       17. ANIMASI SIDEBAR (SIHIR CSS MURNI)
       ======================================================== */
    /* 1. Beri tahu tombol cara berputar yang mulus */
    #sidebarToggle {
        transition: transform 0.3s ease-in-out !important;
    }

    /* 2. Jika sidebar sedang 'collapsed' (menciut), paksa tombol berputar 180 derajat! */
    #appSidebar.collapsed #sidebarToggle {
        transform: rotate(180deg) !important;
    }

    /* ========================================================
       18. SERVER-SIDE RENDERING (ANTI-KEDIP MODE PUBLIK)
       ======================================================== */
    body.mode-publik #gatewayScreen,
    body.mode-publik .sidebar,
    body.mode-publik .mobile-header-glass {
        display: none !important;
    }
    body.mode-publik .content-wrapper {
        margin-left: 0 !important;
        width: 100vw !important;
    }

    /* Tombol Exit Mode Publik - Posisi Pasti di Pojok Kanan Atas Card */
    .btn-publik-exit {
        display: none !important;
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 100;
    }
    
    body.mode-publik .btn-publik-exit {
        display: inline-flex !important;
    }

    /* Beri ruang di header agar teks tidak menabrak tombol di layar kecil */
    body.mode-publik .header-title {
        padding-right: 140px;
    }

    @media (max-width: 768px) {
        body.mode-publik .header-title { padding-right: 0; padding-top: 50px; }
        .btn-publik-exit { top: 15px; right: 15px; width: auto; }
    }

    /* ========================================================
       19. SIHIR HILANGKAN SCROLLBAR SIDEBAR
       ======================================================== */
    /* Untuk Chrome, Safari, dan Opera */
    .sidebar::-webkit-scrollbar {
        display: none !important;
    }
    /* Untuk Firefox dan IE/Edge */
    .sidebar {
        -ms-overflow-style: none !important;  
        scrollbar-width: none !important;  
    }

    /* ========================================================
       20. WIDGET PENGINGAT ADZAN & POP-UP (V2.5.11)
       ======================================================== */
    .adzan-card {
        background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.05) 100%);
        border: 1px solid var(--border-color);
        border-left: 4px solid #10b981;
        border-radius: 12px;
        padding: 35px 25px; /* <-- DIPERBESAR SECARA VERTIKAL agar lebih gagah */
        display: flex;
        align-items: center;
        gap: 20px;
        /* margin-bottom DIHAPUS agar jarak diatur otomatis oleh sistem Grid utama */
        transition: transform 0.3s, box-shadow 0.3s;
    }
    
    .adzan-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(16, 185, 129, 0.1);
    }
    .adzan-icon {
        width: 50px; height: 50px; flex-shrink: 0; /* Diperbesar */
        border-radius: 12px;
        background: rgba(16, 185, 129, 0.1);
        color: #10b981;
        display: flex; align-items: center; justify-content: center;
    }
    .adzan-info h4 { margin: 0 0 6px 0; font-size: 14px; color: var(--text-main); font-weight: 800; }
    .adzan-info p { 
        margin: 0; 
        font-size: 14px; 
        color: var(--primary); 
        font-weight: 800; 
        font-variant-numeric: tabular-nums; /* Rahasia agar angka tidak goyang-goyang */
        letter-spacing: 0.5px; 
    }
    .adzan-time { margin-left: auto; font-size: 24px; font-weight: 800; color: #10b981; } /* Diperbesar */

    /* Tombol Lokasi Interaktif */
    .lokasi-badge {
        font-size: 10px; 
        font-weight: 700; 
        color: var(--primary); 
        background: rgba(37,99,235,0.1); 
        padding: 5px 10px; 
        border-radius: 6px; 
        margin-left: 10px;
        cursor: pointer;
        transition: 0.2s;
        border: 1px solid rgba(37,99,235,0.2);
        display: inline-flex;
        align-items: center;
        gap: 5px;
        text-transform: none;
        vertical-align: middle;
    }
    .lokasi-badge:hover {
        background: rgba(37,99,235,0.2);
        transform: scale(1.05);
    }

    .modal-adzan-content {
        text-align: center;
        padding: 40px 30px !important;
        background: linear-gradient(180deg, var(--bg-card) 0%, rgba(16,185,129,0.05) 100%) !important;
        border: 1px solid rgba(16,185,129,0.3) !important;
    }

    /* ========================================================
       21. ANIMASI POP-UP ADZAN ELEGAN
       ======================================================== */
    .pulse-ring-wrapper {
        position: relative;
        width: 80px;
        height: 80px;
        margin: 0 auto 25px auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .pulse-ring {
        position: absolute;
        width: 100%;
        height: 100%;
        background: rgba(16, 185, 129, 0.4);
        border-radius: 50%;
        z-index: 1;
        animation: pulsing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    }
    .adzan-bell-icon {
        position: relative;
        width: 64px;
        height: 64px;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 2;
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
        animation: bellShake 4s infinite;
    }
    
    @keyframes pulsing {
        0% { transform: scale(0.8); opacity: 1; }
        100% { transform: scale(1.8); opacity: 0; }
    }
    
    @keyframes bellShake {
        0%, 10%, 100% { transform: rotate(0); }
        2%, 6% { transform: rotate(15deg); }
        4%, 8% { transform: rotate(-15deg); }
    }

/* ========================================================
22. VISUAL ANALYSIS RENDERER (V2.6.2)
======================================================== */
.analysis-container {
    position: relative; 
    overflow: auto; 
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex; 
    justify-content: center; 
    align-items: flex-start;
    min-height: 400px;
    padding: 20px;
}

#pdf-render-canvas {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
    border-radius: 4px; 
    max-width: 100%; 
    height: auto;
}

.highlight-layer {
    position: absolute; 
    top: 20px; /* Sejajar dengan padding container */
    left: 50%; 
    transform: translateX(-50%); 
    pointer-events: none;
}

.highlight-box {
    position: absolute; 
    background-color: rgba(239, 68, 68, 0.25);
    border: 2px solid #ef4444; 
    z-index: 10; 
    border-radius: 4px;
    animation: blinkHighlight 1.5s infinite alternate ease-in-out;
}

@keyframes blinkHighlight {
    0% { opacity: 0.3; }
    100% { opacity: 1; box-shadow: 0 0 12px rgba(239, 68, 68, 0.6); }
}