*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; }

body { background: #f9fafb; color: #111827; line-height: 1.5; }

a { text-decoration: none; color: inherit; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

input, textarea, select { font-family: inherit; }

.hidden { display: none !important; }

/* ── Dark mode vars ────────────────────────── */
:root {
  --bg-body:       #f9fafb;
  --bg-white:      #ffffff;
  --bg-sidebar:    #ffffff;
  --bg-header:     #ffffff;
  --bg-footer:     #ffffff;
  --bg-input:      #ffffff;
  --bg-gray1:      #f3f4f6;
  --bg-gray2:      #e5e7eb;
  --bg-table-head: #eff6ff;
  --bg-upload:     #ffffff;
  --bg-card:       #ffffff;

  --border:        #e5e7eb;
  --border-dark:   #d1d5db;

  --text-main:     #111827;
  --text-sub:      #4b5563;
  --text-muted:    #6b7280;
  --text-faint:    #9ca3af;
  --text-placeholder: #d1d5db;

  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;

  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;

  --red-50:  #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;

  --orange-50:  #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;

  --purple-100: #f3e8ff;
  --purple-700: #7e22ce;
}

html.dark {
  --bg-body:       #030712;
  --bg-white:      #1f2937;
  --bg-sidebar:    #111827;
  --bg-header:     #111827;
  --bg-footer:     #111827;
  --bg-input:      #1f2937;
  --bg-gray1:      #1f2937;
  --bg-gray2:      #374151;
  --bg-table-head: rgba(30,58,138,0.3);
  --bg-upload:     #1f2937;
  --bg-card:       #111827;

  --border:        #374151;
  --border-dark:   #4b5563;

  --text-main:     #f9fafb;
  --text-sub:      #d1d5db;
  --text-muted:    #9ca3af;
  --text-faint:    #6b7280;
  --text-placeholder: #4b5563;

  --blue-50:  rgba(239,246,255,0.05);
  --blue-100: rgba(219,234,254,0.15);
  --blue-200: rgba(191,219,254,0.2);
  --blue-300: #93c5fd;
  --blue-700: #93c5fd;
  --blue-900: rgba(30,58,138,0.4);

  --green-50:  rgba(240,253,244,0.05);
  --green-100: rgba(220,252,231,0.15);
  --green-700: #86efac;

  --red-50:   rgba(254,242,242,0.05);
  --red-100:  rgba(254,226,226,0.15);
  --red-700:  #fca5a5;

  --orange-50:  rgba(255,247,237,0.05);
  --orange-100: rgba(255,237,213,0.15);
  --orange-700: #fdba74;

  --purple-100: rgba(243,232,255,0.15);
  --purple-700: #d8b4fe;
}

/* ── Layout ────────────────────────────────── */
.app-root { display: flex; height: 100dvh; overflow: hidden; background: var(--bg-body); }

/* Sidebar */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100%; width: 220px; z-index: 30;
  display: flex; flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}
.sidebar.is-open { transform: translateX(0); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 20;
}
.sidebar-overlay.is-visible { display: block; }

.sidebar-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo-img {
  width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}

.sidebar-title {
  flex: 1; font-weight: 700; font-size: 14px;
  color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-nav-wrap { padding: 12px; }

.nav-section-label {
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  color: var(--text-faint); text-transform: uppercase;
  padding: 8px; margin-bottom: 4px;
}

.nav-list { display: flex; flex-direction: column; gap: 6px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-sub);
  transition: all 0.2s;
  border: 1px solid transparent;
}
.nav-item:hover { 
  background: var(--bg-gray1); 
  color: var(--text-main);
  transform: translateX(4px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,0.1) 0%, rgba(59,130,246,0.02) 100%);
  color: #3b82f6;
  border: 1px solid #3b82f6;
  box-shadow: 0 4px 12px rgba(59,130,246,0.15);
}
html.dark .nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,0.15) 0%, rgba(59,130,246,0.02) 100%);
  color: #60a5fa;
  border: 1px solid #60a5fa;
  box-shadow: 0 4px 12px rgba(96,165,250,0.2);
}
.nav-item.active .nav-icon { color: #3b82f6; }
html.dark .nav-item.active .nav-icon { color: #60a5fa; }
.nav-icon { flex-shrink: 0; color: var(--text-faint); transition: color 0.2s; }
.nav-item:hover .nav-icon { color: var(--text-main); }
html.dark .sidebar {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border: 1px solid #1e293b;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
html.dark .sidebar-header {
  border-bottom: 1px solid #1e293b;
  background: linear-gradient(135deg, rgba(59,130,246,0.1), transparent);
}

/* Main area */
.main-area {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-body);
  transition: margin-left 0.2s;
}
.main-area.shifted { margin-left: 220px; }

/* Header */
.app-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.header-logo-img {
  width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
}
.header-title { flex: 1; font-weight: 600; font-size: 13px; color: var(--text-main); }

/* Icon buttons */
.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s;
}
.btn-icon:hover { color: var(--text-main); }

.btn-dark-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-gray1);
  color: var(--text-muted);
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-dark-toggle:hover { background: var(--bg-gray2); }
html.dark .btn-dark-toggle { color: #eab308; }

/* Page content */
.page-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

/* Footer */
.app-footer {
  flex-shrink: 0; text-align: center; padding: 6px 0;
  font-size: 11px; color: var(--text-faint);
  background: var(--bg-footer);
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────
   PAGE: Cek Selisih
   ───────────────────────────────────────────── */
.page-cek-selisih { display: flex; height: 100%; overflow: hidden; }

.cek-main { flex: 1; padding: 22px 24px; overflow-y: auto; min-width: 0; }

.page-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.page-title-row .title-block { flex: 1; }
.page-title-row h1 { font-size: 18px; font-weight: 700; color: var(--text-main); }
.page-title-row p { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-top: 3px; }

.btn-cara {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 8px;
  border: 1px solid #93c5fd; background: var(--blue-50);
  color: #3b82f6; cursor: pointer;
  transition: background 0.15s;
}
.btn-cara:hover, .btn-cara.active { background: var(--blue-100); }
html.dark .btn-cara { border-color: #1e3a8a; color: #93c5fd; }

.btn-reset {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 8px;
  border: 1px solid #fdba74;
  background: var(--orange-50); color: var(--orange-600);
  cursor: pointer; transition: background 0.15s;
}
.btn-reset:hover { background: var(--orange-100); }
html.dark .btn-reset { border-color: #92400e; color: #fdba74; }

.textarea-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 640px) { .textarea-grid { grid-template-columns: 1fr; } }

.textarea-label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 5px;
}
.textarea-input {
  width: 100%; height: 176px; padding: 10px 12px;
  font-size: 12px; font-family: 'Courier New', monospace;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-input); color: var(--text-main);
  resize: none; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea-input::placeholder { color: var(--text-placeholder); }
.textarea-input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(147,197,253,0.3); }

.error-msg { font-size: 12px; color: #ef4444; margin-bottom: 10px; }

.btn-cek {
  display: inline-flex; align-items: center; gap: 7px;
  background: #22c55e; color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 9px 18px; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: background 0.15s;
}
.btn-cek:hover { background: #16a34a; }

/* Results section */
.results-section { margin-top: 22px; }
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.results-left { display: flex; align-items: center; gap: 10px; }
.results-title { font-size: 13px; font-weight: 600; color: var(--text-sub); }

.badge-selisih { font-size: 11px; background: var(--red-100); color: var(--red-700); padding: 2px 8px; border-radius: 999px; font-weight: 500; }
html.dark .badge-selisih { background: rgba(239,68,68,0.2); }
.badge-ok { font-size: 11px; background: var(--green-100); color: var(--green-700); padding: 2px 8px; border-radius: 999px; font-weight: 500; }
html.dark .badge-ok { background: rgba(34,197,94,0.2); }

.results-actions { display: flex; align-items: center; gap: 6px; }

.btn-copy {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-white); color: var(--text-sub);
  transition: background 0.15s;
}
.btn-copy:hover { background: var(--bg-gray1); }
.btn-copy.copied { background: var(--green-50); color: var(--green-700); border-color: #86efac; }
html.dark .btn-copy.copied { background: rgba(34,197,94,0.1); border-color: #166534; }

.btn-export-csv {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  padding: 5px 10px; border-radius: 6px;
  background: #3b82f6; color: #fff; border: 1px solid #3b82f6;
  transition: background 0.15s;
}
.btn-export-csv:hover { background: #2563eb; }

.total-selisih-box {
  margin-bottom: 10px; padding: 10px 12px;
  background: var(--orange-50); border: 1px solid #fed7aa;
  border-radius: 8px; font-size: 13px;
  color: var(--orange-700);
}
html.dark .total-selisih-box { background: rgba(249,115,22,0.1); border-color: #92400e; }
.total-selisih-box span { font-weight: 700; }

/* Results table */
.table-wrap {
  background: var(--bg-white);
  border: 2px solid #bfdbfe; border-radius: 8px; overflow: hidden;
}
html.dark .table-wrap { border-color: #1e3a8a; }

.results-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.results-table thead tr { background: var(--bg-table-head); border-bottom: 2px solid #bfdbfe; }
html.dark .results-table thead tr { border-bottom-color: #1e3a8a; }
.results-table th {
  padding: 9px 14px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #3b82f6;
}
html.dark .results-table th { color: #93c5fd; }
.results-table th.text-right { text-align: right; }
.results-table th.text-center { text-align: center; }
.results-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  background: rgba(254,242,242,0.35);
  transition: background 0.12s;
}
html.dark .results-table tbody tr { border-bottom-color: #374151; background: rgba(239,68,68,0.06); }
.results-table tbody tr:last-child { border-bottom: none; }
.results-table tbody tr:hover { background: rgba(254,242,242,0.8); }
html.dark .results-table tbody tr:hover { background: rgba(239,68,68,0.15); }
.results-table td { padding: 9px 14px; color: var(--text-main); }
.results-table td.text-right { text-align: right; font-family: 'Courier New', monospace; color: var(--text-sub); }
.results-table td.text-center { text-align: center; }
.results-table td.cell-id { font-weight: 500; }
.results-table td.cell-selisih { font-family: 'Courier New', monospace; font-weight: 700; text-align: right; }
.cell-selisih.positive { color: #3b82f6; }
.cell-selisih.negative { color: #ef4444; }
.cell-dash { color: var(--text-placeholder); }

.badge-beda { font-size: 11px; background: var(--red-100); color: var(--red-700); padding: 2px 8px; border-radius: 999px; }
html.dark .badge-beda { background: rgba(239,68,68,0.25); color: #fca5a5; }
.badge-hanya1 { font-size: 11px; background: var(--orange-100); color: var(--orange-700); padding: 2px 8px; border-radius: 999px; }
html.dark .badge-hanya1 { background: rgba(249,115,22,0.2); color: #fdba74; }
.badge-hanya2 { font-size: 11px; background: var(--purple-100); color: var(--purple-700); padding: 2px 8px; border-radius: 999px; }
html.dark .badge-hanya2 { background: rgba(168,85,247,0.2); color: #d8b4fe; }

/* Right sidebar (Cara panel) */
.cek-sidebar {
  width: 240px; flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--bg-white);
  padding: 18px;
  overflow-y: auto;
}

.cara-header { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.cara-icon-box {
  width: 20px; height: 20px; border-radius: 4px; background: #ef4444;
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.cara-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-main); }

.cara-text { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.cara-list { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; padding-left: 16px; }
.cara-list li { font-weight: 500; }

.contoh-table { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 6px; font-size: 10px; }
.contoh-head { display: grid; grid-template-columns: 24px 1fr 1fr; background: var(--bg-gray1); border-bottom: 1px solid var(--border); }
.contoh-head-cell { padding: 3px 6px; text-align: center; font-weight: 700; color: var(--text-faint); font-size: 10px; }
.contoh-head-cell:not(:last-child) { border-right: 1px solid var(--border); }
.contoh-row { display: grid; grid-template-columns: 24px 1fr 1fr; border-bottom: 1px solid var(--bg-gray1); }
.contoh-row:last-child { border-bottom: none; }
.contoh-cell { padding: 3px 6px; }
.contoh-cell.num { text-align: center; color: var(--text-faint); background: var(--bg-gray1); border-right: 1px solid var(--border); }
.contoh-cell.val { background: #fefce8; color: var(--text-main); font-size: 10px; }
html.dark .contoh-cell.val { background: rgba(254,240,138,0.1); }
.contoh-cell.val:not(:last-child) { border-right: 1px solid var(--bg-gray1); }
.contoh-cell.val.right { text-align: right; }

.cara-hint { font-size: 10px; color: var(--text-faint); margin-bottom: 8px; }

.btn-coba {
  width: 100%; font-size: 11px; font-weight: 500;
  background: #3b82f6; color: #fff;
  padding: 6px 0; border-radius: 6px; margin-bottom: 14px;
  transition: background 0.15s;
}
.btn-coba:hover { background: #2563eb; }

.info-box {
  padding: 10px; background: var(--green-50);
  border: 1px solid #86efac; border-radius: 8px;
}
html.dark .info-box { background: rgba(34,197,94,0.08); border-color: #166534; }
.info-box-title { font-size: 11px; font-weight: 700; color: var(--green-700); margin-bottom: 6px; }
.info-box-row {
  display: flex; justify-content: space-between;
  font-size: 10px; font-family: 'Courier New', monospace;
  color: var(--text-sub); margin-bottom: 2px;
}
.info-box-row .ok { color: var(--green-600); }

/* ─────────────────────────────────────────────
   PAGE: Biaya Lain-lain
   ───────────────────────────────────────────── */
.page-biaya { display: flex; height: 100%; overflow: hidden; }

.biaya-left {
  width: 240px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-white);
  display: flex; flex-direction: column;
  padding: 14px; gap: 14px;
  overflow-y: auto;
}

.biaya-left h1 { font-size: 13px; font-weight: 700; color: var(--text-main); }
.biaya-left p { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.upload-panel { display: flex; flex-direction: column; gap: 6px; }

.upload-panel-header { display: flex; align-items: center; gap: 5px; }
.upload-panel-label {
  flex: 1; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
}
.btn-cara-sm {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 500;
  padding: 2px 6px; border-radius: 4px;
  border: 1px solid #93c5fd; background: var(--blue-50); color: #3b82f6;
  cursor: pointer; transition: background 0.15s;
}
.btn-cara-sm:hover { background: var(--blue-100); }
html.dark .btn-cara-sm { border-color: #1e3a8a; color: #93c5fd; }

.drop-zone {
  border: 2px dashed var(--border-dark);
  border-radius: 8px; padding: 18px 10px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; background: var(--bg-upload);
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.drop-zone:hover, .drop-zone.dragging { border-color: #60a5fa; background: var(--blue-50); }
.drop-zone .upload-icon { margin-bottom: 5px; color: var(--text-placeholder); }
.drop-zone .drop-label { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.drop-zone .drop-hint { font-size: 10px; color: var(--text-faint); margin-top: 2px; }
.drop-zone .file-error { font-size: 10px; color: #ef4444; margin-top: 4px; }

.file-card {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; background: var(--bg-white);
}
.file-card-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.file-icon { color: #22c55e; flex-shrink: 0; margin-top: 2px; }
.file-name { font-size: 11px; font-weight: 500; color: var(--text-main); word-break: break-all; }
.file-meta { font-size: 10px; color: var(--text-faint); margin-top: 2px; }
.file-card-error { font-size: 11px; color: #ef4444; margin-bottom: 6px; }
.file-card-actions { display: flex; gap: 6px; }

.btn-proses {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  padding: 7px 10px; border-radius: 6px;
  background: #22c55e; color: #fff;
  transition: background 0.15s;
}
.btn-proses:hover { background: #16a34a; }
.btn-proses:disabled { background: var(--bg-gray1); color: var(--text-faint); cursor: not-allowed; }

.btn-hapus {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  padding: 7px 10px; border-radius: 6px;
  border: 1px solid #fca5a5; color: #ef4444; background: transparent;
  transition: background 0.15s;
}
.btn-hapus:hover { background: var(--red-50); }
html.dark .btn-hapus { border-color: #7f1d1d; }

.biaya-main { flex: 1; overflow-y: auto; padding: 18px 20px; }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; color: var(--text-placeholder);
  gap: 10px;
}
.empty-state p { font-size: 13px; }

.data-tables { display: flex; flex-direction: column; gap: 22px; }
.data-table-section {}
.data-table-title { font-size: 13px; font-weight: 700; color: var(--text-sub); margin-bottom: 7px; }

.data-table-wrap {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--bg-white);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead tr { background: var(--bg-table-head); border-bottom: 2px solid #bfdbfe; }
html.dark .data-table thead tr { border-bottom-color: #1e3a8a; }
.data-table th {
  padding: 7px 10px; font-size: 11px; font-weight: 700;
  color: #3b82f6; text-align: left;
}
html.dark .data-table th { color: #93c5fd; }
.data-table th.text-right { text-align: right; }
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(59,130,246,0.04); }
html.dark .data-table tbody tr:hover { background: rgba(59,130,246,0.08); }
.data-table td { padding: 7px 10px; color: var(--text-main); }
.data-table td.text-right { text-align: right; font-family: 'Courier New', monospace; font-weight: 500; }
.data-table tfoot tr { background: var(--bg-table-head); border-top: 2px solid #bfdbfe; }
html.dark .data-table tfoot tr { border-top-color: #1e3a8a; }
.data-table tfoot td { padding: 7px 10px; }
.data-table tfoot .total-label { font-size: 11px; font-weight: 700; color: #3b82f6; }
html.dark .data-table tfoot .total-label { color: #93c5fd; }
.data-table tfoot .total-val { text-align: right; font-family: 'Courier New', monospace; font-weight: 700; color: var(--text-main); }

/* ── Steps Modal ───────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
}
.modal-box {
  position: relative;
  background: var(--bg-white);
  border: 2px solid #93c5fd;
  border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 100%; max-width: 380px;
  padding: 18px 20px;
}
html.dark .modal-box { border-color: #1e3a8a; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-title-row { display: flex; align-items: center; gap: 7px; }
.modal-icon-box {
  width: 24px; height: 24px; border-radius: 999px; background: #3b82f6;
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.modal-title { font-size: 13px; font-weight: 700; color: var(--text-main); }
.btn-modal-close { color: var(--text-faint); transition: color 0.15s; padding: 4px; }
.btn-modal-close:hover { color: var(--text-main); }
.modal-steps { display: flex; flex-direction: column; gap: 9px; }
.modal-step { display: flex; gap: 9px; font-size: 11px; color: var(--text-sub); line-height: 1.5; }
.step-num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 999px;
  background: var(--blue-100); color: #3b82f6;
  border: 1px solid #93c5fd;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px; margin-top: 1px;
}
html.dark .step-num { background: rgba(30,58,138,0.4); color: #93c5fd; }

/* ─────────────────────────────────────────────
   PAGE: Cek Selisih DP PGA
   ───────────────────────────────────────────── */
.page-dp { height: 100%; overflow-y: auto; background: var(--bg-body); }

.dp-inner { max-width: 900px; margin: 0 auto; padding: 22px 16px; display: flex; flex-direction: column; gap: 18px; }

.dp-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
}

.dp-section-header { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.dp-step-badge {
  width: 24px; height: 24px; border-radius: 999px; background: #3b82f6;
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dp-section-title { font-weight: 600; font-size: 14px; color: var(--text-main); flex: 1; }
.dp-section-desc { font-size: 12px; color: var(--text-muted); }

.btn-refresh {
  margin-left: auto;
  padding: 4px 10px; font-size: 11px; font-weight: 700;
  border-radius: 7px; background: #ef4444; color: #fff;
  transition: background 0.15s;
}
.btn-refresh:hover { background: #dc2626; }

.tab-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-btn {
  padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: var(--bg-gray1); color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.tab-btn:hover { background: var(--blue-50); color: #3b82f6; }
html.dark .tab-btn:hover { background: rgba(59,130,246,0.15); }
.tab-btn.active { background: #3b82f6; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.col-hint { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.col-hint b { color: var(--text-main); }
.badge-only-paid {
  display: inline-block; font-size: 10px; font-weight: 700;
  background: var(--green-100); color: var(--green-700);
  padding: 1px 6px; border-radius: 4px; margin-left: 6px;
}
html.dark .badge-only-paid { background: rgba(34,197,94,0.2); color: #86efac; }

.dp-dropzone {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 20px; display: flex; flex-direction: column; align-items: center;
  cursor: pointer; background: var(--bg-gray1);
  transition: border-color 0.15s, background 0.15s; text-align: center; gap: 6px;
}
.dp-dropzone:hover, .dp-dropzone.dragging { border-color: #60a5fa; background: var(--blue-50); }
html.dark .dp-dropzone:hover { background: rgba(59,130,246,0.1); }
.dp-dropzone-icon { font-size: 28px; }
.dp-dropzone-label { font-size: 13px; font-weight: 500; color: var(--text-main); }
.dp-dropzone-hint { font-size: 11px; color: var(--text-muted); }
.dp-file-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; }
.dp-file-chip {
  font-size: 11px; background: var(--blue-100); color: #3b82f6;
  padding: 2px 8px; border-radius: 999px; font-weight: 500;
}
html.dark .dp-file-chip { background: rgba(59,130,246,0.2); }

.btn-clear-files { font-size: 11px; color: #ef4444; background: none; border: none; cursor: pointer; }
.btn-clear-files:hover { text-decoration: underline; }

.dp-process-row { display: flex; gap: 10px; }
.btn-process-dp {
  flex: 1; padding: 12px 18px; border-radius: 12px;
  font-size: 13px; font-weight: 700;
  background: #3b82f6; color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: background 0.15s;
}
.btn-process-dp:hover { background: #2563eb; }
.btn-process-dp:disabled { background: var(--bg-gray1); color: var(--text-faint); cursor: not-allowed; box-shadow: none; }
.btn-reset-dp {
  padding: 12px 14px; border-radius: 12px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-white);
  transition: background 0.15s;
}
.btn-reset-dp:hover { background: var(--bg-gray1); }

.dp-error {
  background: var(--red-50); border: 1px solid #fca5a5;
  color: var(--red-700); border-radius: 12px;
  padding: 12px 14px; font-size: 13px;
}
html.dark .dp-error { background: rgba(239,68,68,0.1); border-color: #7f1d1d; }

.dp-results {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.dp-results-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
@media (min-width: 600px) {
  .dp-results-header { flex-direction: row; align-items: center; }
}
.dp-results-title { font-weight: 600; font-size: 14px; color: var(--text-main); }
.dp-results-meta { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.dp-total-selisih { font-size: 13px; font-weight: 700; margin-top: 2px; }
.dp-total-positive { color: var(--green-700); }
.dp-total-negative { color: var(--red-600); }
html.dark .dp-total-positive { color: #86efac; }
html.dark .dp-total-negative { color: #fca5a5; }

.dp-results-actions { display: flex; gap: 6px; margin-left: auto; }
.btn-dp-copy, .btn-dp-export {
  padding: 6px 12px; font-size: 11px; font-weight: 500; border-radius: 8px;
  transition: background 0.15s;
}
.btn-dp-copy {
  border: 1px solid var(--border);
  background: var(--bg-white); color: var(--text-sub);
}
.btn-dp-copy:hover { background: var(--bg-gray1); }
.btn-dp-export { background: #3b82f6; color: #fff; }
.btn-dp-export:hover { background: #2563eb; }

.dp-tab-bar {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(249,250,251,0.5);
  padding: 0 14px;
}
html.dark .dp-tab-bar { background: rgba(31,41,55,0.3); }
.dp-tab-btn {
  padding: 9px 12px; font-size: 12px; font-weight: 500;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.dp-tab-btn:hover { color: var(--text-main); border-bottom-color: var(--border); }
.dp-tab-btn.active { border-bottom-color: #3b82f6; color: #3b82f6; background: var(--bg-white); }
html.dark .dp-tab-btn.active { background: var(--bg-card); color: #93c5fd; border-bottom-color: #93c5fd; }
.dp-tab-count {
  display: inline-block; margin-left: 5px;
  font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 999px;
  background: var(--bg-gray1); color: var(--text-muted);
}
.dp-tab-btn.active .dp-tab-count { background: var(--blue-100); color: #3b82f6; }
html.dark .dp-tab-btn.active .dp-tab-count { background: rgba(59,130,246,0.2); color: #93c5fd; }

.dp-table-scroll { overflow-x: auto; }
.dp-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 700px; }
.dp-table thead tr { background: var(--bg-gray1); }
.dp-table th {
  padding: 10px 14px; text-align: left;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
}
.dp-table th.text-right { text-align: right; }
.dp-table tbody tr { border-top: 1px solid var(--border); transition: background 0.12s; }
.dp-table tbody tr:hover { background: rgba(249,250,251,0.8); }
html.dark .dp-table tbody tr:hover { background: rgba(31,41,55,0.6); }
.dp-table td { padding: 9px 14px; color: var(--text-main); }
.dp-table td.num { text-align: right; font-family: 'Courier New', monospace; font-size: 11px; color: var(--text-sub); }
.dp-table td.mono { font-family: 'Courier New', monospace; font-size: 11px; }

.dp-empty-state { padding: 40px 20px; text-align: center; color: var(--text-faint); }
.dp-empty-state .emoji { font-size: 28px; margin-bottom: 6px; }
.dp-empty-state p { font-weight: 500; font-size: 13px; }

.badge-status {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 500;
}
.badge-paid { background: var(--bg-gray1); color: var(--text-sub); }
.badge-sesuai { background: var(--green-100); color: var(--green-700); }
html.dark .badge-sesuai { background: rgba(34,197,94,0.2); color: #86efac; }
.badge-selisih-dp { background: var(--red-100); color: var(--red-700); }
html.dark .badge-selisih-dp { background: rgba(239,68,68,0.2); color: #fca5a5; }
.badge-tidak-bank { background: var(--orange-100); color: var(--orange-700); }
html.dark .badge-tidak-bank { background: rgba(249,115,22,0.2); color: #fdba74; }
.badge-tidak-sumber { background: var(--blue-100); color: #3b82f6; }
html.dark .badge-tidak-sumber { background: rgba(59,130,246,0.2); color: #93c5fd; }

.dp-selisih-positive {
  display: inline-block; padding: 2px 7px; border-radius: 5px; font-family: 'Courier New', monospace;
  font-size: 11px; font-weight: 700;
  background: var(--green-100); color: var(--green-700);
}
html.dark .dp-selisih-positive { background: rgba(34,197,94,0.2); color: #86efac; }
.dp-selisih-negative {
  display: inline-block; padding: 2px 7px; border-radius: 5px; font-family: 'Courier New', monospace;
  font-size: 11px; font-weight: 700;
  background: var(--red-100); color: var(--red-700);
}
html.dark .dp-selisih-negative { background: rgba(239,68,68,0.2); color: #fca5a5; }
.dp-selisih-zero {
  display: inline-block; padding: 2px 7px; border-radius: 5px; font-family: 'Courier New', monospace;
  font-size: 11px; font-weight: 700;
  background: var(--bg-gray1); color: var(--text-faint);
}

/* ─────────────────────────────────────────────
   PAGE: Cek Selisih WD PGA
   ───────────────────────────────────────────── */
.page-wd {
  height: 100%; overflow-y: auto;
  background: var(--bg-body); color: var(--text-main);
  position: relative;
}
.wd-inner { padding: 24px; }

.wd-title    { font-size: 1.5rem; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.wd-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 28px; }

.wd-upload-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px;
}
@media (max-width: 640px) { .wd-upload-grid { grid-template-columns: 1fr; } }

.wd-upload-card {
  background: var(--bg-white); border: 2px dashed var(--border-dark);
  border-radius: 12px; padding: 20px; cursor: pointer; transition: border-color 0.2s;
}
.wd-upload-card:hover { border-color: #3b82f6; }
.wd-upload-card.loaded { border-color: #22c55e; border-style: solid; }
.wd-upload-card label {
  display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.wd-file-name {
  font-size: 0.82rem; color: var(--text-sub); margin-top: 8px; word-break: break-all; line-height: 1.6;
}
.wd-file-name.ok { color: #16a34a; }
html.dark .wd-file-name.ok { color: #22c55e; }
.page-wd input[type="file"] { display: none; }

.wd-upload-btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bg-gray2);
  color: var(--text-main); border: none; padding: 8px 16px; border-radius: 8px;
  font-size: 0.85rem; cursor: pointer; transition: background 0.2s;
}
.wd-upload-btn:hover { background: var(--border-dark); }

.wd-btn-clear {
  display: inline-flex; align-items: center; gap: 6px; background: #7f1d1d;
  color: #fca5a5; border: none; padding: 8px 12px; border-radius: 8px;
  font-size: 0.8rem; cursor: pointer; margin-left: 6px; transition: background 0.2s;
}
.wd-btn-clear:hover { background: #991b1b; }

.wd-desc { font-size: 0.75rem; color: var(--text-faint); margin-top: 10px; line-height: 1.5; }

.wd-file-count-badge {
  display: inline-block; background: #1d4ed8; color: #bfdbfe;
  font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px;
}

.wd-action-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.wd-btn-proses {
  background: #3b82f6; color: white; border: none;
  padding: 10px 28px; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.wd-btn-proses:hover { background: #2563eb; }
.wd-btn-proses:disabled { background: var(--bg-gray2); color: var(--text-muted); cursor: not-allowed; }

.wd-summary-bar { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.wd-stat {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 18px; min-width: 140px;
}
.wd-stat .val { font-size: 1.4rem; font-weight: 700; }
.wd-stat .lbl { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.wd-stat.red    .val { color: #dc2626; }
.wd-stat.yellow .val { color: #d97706; }
.wd-stat.blue   .val { color: #2563eb; }
.wd-stat.green  .val { color: #16a34a; }
html.dark .wd-stat.red    .val { color: #f87171; }
html.dark .wd-stat.yellow .val { color: #fbbf24; }
html.dark .wd-stat.blue   .val { color: #60a5fa; }
html.dark .wd-stat.green  .val { color: #4ade80; }

.wd-tabs-bar {
  display: flex; align-items: center; gap: 0; margin-bottom: 0;
  border-bottom: 2px solid var(--border);
}
.wd-tab-btn {
  padding: 10px 22px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  border: none; background: none; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  display: flex; align-items: center; gap: 7px;
}
.wd-tab-btn.active { color: var(--text-main); border-bottom-color: #3b82f6; }
.wd-tab-btn:hover:not(.active) { color: var(--text-sub); }
.wd-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-gray2); color: var(--text-sub); border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px;
}
.wd-tab-btn.active .wd-tab-count { background: #3b82f6; color: white; }
.wd-tab-content { display: none; padding-top: 20px; }
.wd-tab-content.active { display: block; }

.wd-filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.wd-filter-row input {
  background: var(--bg-input); border: 1px solid var(--border-dark); color: var(--text-main);
  padding: 7px 12px; border-radius: 8px; font-size: 0.85rem; outline: none; width: 220px;
}
.wd-filter-row input::placeholder { color: var(--text-placeholder); }
.wd-filter-row input:focus { border-color: #3b82f6; }
.wd-filter-row select {
  background: var(--bg-input); border: 1px solid var(--border-dark); color: var(--text-main);
  padding: 7px 12px; border-radius: 8px; font-size: 0.85rem; outline: none; cursor: pointer;
}
.wd-filter-row select:focus { border-color: #3b82f6; }

.wd-table-wrap {
  overflow-x: auto; border-radius: 12px; border: 1px solid var(--border);
}
.wd-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; min-width: 1150px; }
.wd-table thead tr { background: var(--bg-gray1); }
.wd-table th {
  padding: 11px 12px; text-align: left; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border-dark); white-space: nowrap;
}
.wd-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-main); }
.wd-table tr:last-child td { border-bottom: none; }
.wd-table tbody tr:hover td { background: var(--bg-gray1); }

.wd-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}
.wd-badge-minus { background: #fee2e2; color: #b91c1c; }
.wd-badge-plus  { background: #dcfce7; color: #15803d; }
.wd-badge-only1 { background: #dbeafe; color: #1d4ed8; }
.wd-badge-only2 { background: #f3e8ff; color: #7e22ce; }
html.dark .wd-badge-minus { background: #7f1d1d; color: #fca5a5; }
html.dark .wd-badge-plus  { background: #14532d; color: #86efac; }
html.dark .wd-badge-only1 { background: #1e3a5f; color: #93c5fd; }
html.dark .wd-badge-only2 { background: #4a1d96; color: #c4b5fd; }

.wd-selisih-pos { color: #16a34a; font-weight: 600; }
.wd-selisih-neg { color: #dc2626; font-weight: 600; }
html.dark .wd-selisih-pos { color: #4ade80; }
html.dark .wd-selisih-neg { color: #f87171; }
.wd-username    { font-weight: 700; color: var(--text-main); }
.wd-amount      { font-weight: 600; white-space: nowrap; }

.wd-empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.wd-empty-state .icon { font-size: 3rem; margin-bottom: 12px; }

.wd-btn-export {
  background: #059669; color: white; border: none; padding: 8px 18px;
  border-radius: 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.wd-btn-export:hover { background: #047857; }

.wd-mono-list { list-style: none; }
.wd-mono-list li {
  font-family: monospace; font-size: 0.72rem; color: var(--text-sub);
  padding: 1px 0; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.wd-mono-list li:last-child { border-bottom: none; }
.wd-mono-list li .idx {
  display: inline-block; width: 16px; text-align: right;
  color: var(--text-faint); margin-right: 5px; font-size: 0.65rem;
}
.wd-trx-list { list-style: none; }
.wd-trx-list li {
  font-family: monospace; font-size: 0.72rem; color: #7c3aed;
  padding: 1px 0; border-bottom: 1px solid var(--border); white-space: nowrap;
}
html.dark .wd-trx-list li { color: #c4b5fd; }
.wd-trx-list li:last-child { border-bottom: none; }
.wd-more-tag {
  display: inline-block; background: var(--bg-gray1); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; font-size: 0.68rem; color: var(--text-faint); margin-top: 3px;
}

.wd-btn-done {
  background: #065f46; color: #6ee7b7; border: 1px solid #059669;
  padding: 5px 14px; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s, transform 0.1s; white-space: nowrap;
}
.wd-btn-done:hover { background: #047857; transform: scale(1.05); }
.wd-btn-undone {
  background: var(--bg-gray1); color: var(--text-sub); border: 1px solid var(--border-dark);
  padding: 5px 14px; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.wd-btn-undone:hover { background: var(--bg-gray2); }
.wd-done-ts { font-size: 0.65rem; color: var(--text-faint); margin-top: 3px; }
.wd-col-num { color: var(--text-faint); width: 30px; }

.wd-loading-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 999;
  align-items: center; justify-content: center; flex-direction: column; gap: 12px;
}
.wd-loading-overlay.active { display: flex; }
.wd-spinner {
  width: 40px; height: 40px; border: 4px solid #334155;
  border-top-color: #3b82f6; border-radius: 50%;
  animation: wdSpin 0.7s linear infinite;
}
@keyframes wdSpin { to { transform: rotate(360deg); } }
.wd-loading-text { color: #94a3b8; font-size: 0.9rem; }

/* ── Responsive tweaks ──────────────────────── */
@media (max-width: 768px) {
  .biaya-left { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 50vh; }
  .page-biaya { flex-direction: column; }
  .cek-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--border); max-height: 320px; }
  .page-cek-selisih { flex-direction: column-reverse; }
}

.dp-btn-done {
  background: #065f46; color: #6ee7b7; border: 1px solid #059669;
  padding: 5px 14px; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s, transform 0.1s; white-space: nowrap;
}
.dp-btn-done:hover { background: #047857; transform: scale(1.05); }
.dp-btn-undone {
  background: var(--bg-gray1); color: var(--text-sub); border: 1px solid var(--border-dark);
  padding: 5px 14px; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.no-transition,
.no-transition * {
  transition: none !important;
  animation: none !important;
}

/* Override all nominal values to use Arial font */
.num,
.wd-amount,
.wd-selisih-pos,
.wd-selisih-neg,
.cell-selisih,
.total-val,
.dp-selisih-positive,
.dp-selisih-negative,
.dp-selisih-zero,
.results-table td.text-right,
.data-table td.text-right,
.dp-table td.num {
  font-family: Arial, Helvetica, sans-serif !important;
}

/* Running RGB Border Animation (Rotating gradient border) */
.rgb-btn-card {
  position: relative;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
  background: transparent !important;
  overflow: hidden;
  transition: transform 0.2s !important;
}

.rgb-btn-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff0000, #ff00ff, #0000ff, #00ffff, #00ff00, #ffff00, #ff0000
  );
  animation: rotate-rgb 4s linear infinite;
  z-index: -2;
}

.rgb-btn-card::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  right: 1.5px;
  bottom: 1.5px;
  background: var(--bg-gray1);
  border-radius: 9px;
  z-index: -1;
  transition: background 0.2s !important;
}

.rgb-btn-card:hover {
  transform: translateY(-2px) !important;
}

.rgb-btn-card:hover::after {
  background: var(--blue-50) !important;
}

@keyframes rotate-rgb {
  100% {
    transform: rotate(360deg);
  }
}

/* =============================================
   SYSTEM NOTIFIKASI
   ============================================= */
.notif-container {
  position: relative;
  display: inline-block;
  margin-right: 5px;
}
.btn-notif-toggle {
  position: relative;
  background: var(--bg-gray1);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-notif-toggle:hover {
  background: var(--bg-gray2);
  color: var(--text-main);
  border-color: var(--border-dark);
}
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 9px;
  font-weight: bold;
  height: 15px;
  min-width: 15px;
  padding: 0 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg-header);
  z-index: 10;
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  animation: notifSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
html.dark .notif-dropdown {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.15);
}
@keyframes notifSlide {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.notif-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
}
html.dark .notif-dropdown-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.notif-dropdown-header h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  letter-spacing: 0.3px;
}
.notif-dropdown-header .btn-text {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.notif-dropdown-header .btn-text:hover {
  background: rgba(59, 130, 246, 0.1);
  text-decoration: none;
}
.notif-dropdown-list {
  max-height: 380px;
  overflow-y: auto;
  background: transparent;
  scrollbar-width: thin;
}
.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}
.notif-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}
html.dark .notif-item {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.notif-item:hover {
  background: rgba(59, 130, 246, 0.03);
}
html.dark .notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.notif-item.unread {
  background: rgba(59, 130, 246, 0.02);
}
html.dark .notif-item.unread {
  background: rgba(59, 130, 246, 0.04);
}
.notif-item.unread::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}
.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.notif-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  padding-left: 2px;
}
.notif-time {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}
.notif-msg {
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.45;
  word-break: break-word;
  padding-left: 2px;
}
.notif-sender {
  font-size: 9.5px;
  color: #10b981;
  font-weight: 600;
  align-self: flex-end;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}
.notif-dropdown-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--bg-gray1);
}
html.dark .notif-dropdown-footer {
  background: rgba(17, 24, 39, 0.5);
  border-top-color: rgba(255, 255, 255, 0.08);
}
.notif-dropdown-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white !important;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transition: all 0.2s ease;
}
.notif-dropdown-footer a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
.notif-pagination {
  display: flex;
  gap: 6px;
}
.notif-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
html.dark .notif-page-btn {
  background: rgba(31, 41, 55, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}
.notif-page-btn:hover {
  border-color: var(--border-dark);
  color: var(--text-main);
  background: var(--bg-gray1);
}
.notif-page-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Halaman Semua Notifikasi */
.page-notifikasi {
  width: 100%;
  margin: 0;
  padding: 20px 24px;
  box-sizing: border-box;
}
.notif-list-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 15px;
}
.notif-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.notif-page-header h1 {
  font-size: 20px;
  color: var(--text-main);
}
.notif-row {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.notif-row:hover {
  background: var(--bg-gray1);
}
.notif-row.unread {
  background: rgba(59, 130, 246, 0.04);
  border-left: 4px solid #3b82f6;
}
.notif-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notif-row-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}
.notif-row-time {
  font-size: 11px;
  color: var(--text-muted);
}
.notif-row-msg {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}
.notif-row-sender {
  font-size: 11px;
  color: #10b981;
  font-weight: 500;
  align-self: flex-start;
}
.notif-page-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  gap: 8px;
  background: var(--bg-gray1);
}

/* --- ANIMATIONS FOR HOME PAGE --- */
@keyframes slideUpFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.stagger-1 { animation: slideUpFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; opacity: 0; }
.stagger-2 { animation: slideUpFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.15s; opacity: 0; }
.stagger-3 { animation: slideUpFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.3s; opacity: 0; }
.stagger-4 { animation: slideUpFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.45s; opacity: 0; }
.stagger-5 { animation: slideUpFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.6s; opacity: 0; }
.stagger-6 { animation: slideUpFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.75s; opacity: 0; }

/* 3D Tilt enhancement for rgb-btn-card */
.rgb-btn-card {
  perspective: 1000px;
  transform-style: preserve-3d;
}
.rgb-btn-card:hover {
  transform: translateY(-6px) scale(1.03) rotateX(4deg) rotateY(-2deg) !important;
  box-shadow: -4px 10px 20px rgba(0,0,0,0.15), 0 0 15px rgba(59,130,246,0.3) !important;
}

/* Floating Butterfly Particles */
.butterfly-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.butterfly-particle {
  position: absolute;
  opacity: 0.2;
  animation: floatButterfly 12s infinite linear;
}
.butterfly-particle:nth-child(1) { top: 15%; left: -10%; animation-duration: 15s; animation-delay: 0s; transform: scale(0.8); }
.butterfly-particle:nth-child(2) { top: 60%; left: -10%; animation-duration: 18s; animation-delay: 5s; transform: scale(0.5); }
.butterfly-particle:nth-child(3) { top: 30%; right: -10%; animation-duration: 20s; animation-delay: 2s; transform: scale(1.2); animation-name: floatButterflyReverse; }
.butterfly-particle:nth-child(4) { top: 80%; right: -10%; animation-duration: 14s; animation-delay: 1s; transform: scale(0.9); animation-name: floatButterflyReverse; }
.butterfly-particle:nth-child(5) { top: 40%; left: -10%; animation-duration: 16s; animation-delay: 4s; transform: scale(0.6); }
.butterfly-particle:nth-child(6) { top: 10%; right: -10%; animation-duration: 22s; animation-delay: 7s; transform: scale(1.1); animation-name: floatButterflyReverse; }
.butterfly-particle:nth-child(7) { top: 70%; left: -10%; animation-duration: 17s; animation-delay: 3s; transform: scale(0.7); }
.butterfly-particle:nth-child(8) { top: 25%; left: -10%; animation-duration: 19s; animation-delay: 8s; transform: scale(1.0); }
.butterfly-particle:nth-child(9) { top: 55%; right: -10%; animation-duration: 15s; animation-delay: 6s; transform: scale(0.85); animation-name: floatButterflyReverse; }
.butterfly-particle:nth-child(10) { top: 90%; left: -10%; animation-duration: 21s; animation-delay: 9s; transform: scale(1.3); }

@keyframes floatButterfly {
  0% { transform: translate(0, 0) rotate(0deg) scale(var(--s, 1)); opacity: 0; }
  10% { opacity: 0.4; }
  50% { transform: translate(50vw, -100px) rotate(15deg) scale(var(--s, 1)); }
  90% { opacity: 0.4; }
  100% { transform: translate(110vw, -50px) rotate(-10deg) scale(var(--s, 1)); opacity: 0; }
}
@keyframes floatButterflyReverse {
  0% { transform: translate(0, 0) rotate(0deg) scale(var(--s, 1)); opacity: 0; }
  10% { opacity: 0.3; }
  50% { transform: translate(-50vw, 150px) rotate(-15deg) scale(var(--s, 1)); }
  90% { opacity: 0.3; }
  100% { transform: translate(-110vw, 50px) rotate(10deg) scale(var(--s, 1)); opacity: 0; }
}
.butterfly-svg {
  animation: flapWings 0.3s infinite alternate ease-in-out;
  transform-origin: center;
}
@keyframes flapWings {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0.4); }
}

/* --- Mobile & Tablet Responsiveness --- */
@media (max-width: 768px) {
  /* Layout Adjustments & Universal Vertical Scrolling */
  .page-content {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
  }

  .page-dp,
  .cek-main,
  .ap-shell,
  .ap-content,
  .notif-list-container,
  .page-notifikasi {
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  .main-area.shifted {
    margin-left: 0 !important;
  }
  
  .sidebar {
    width: 260px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  
  /* Header Adjustments */
  .app-header {
    padding: 8px 10px;
    gap: 8px;
  }
  .header-title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Search & Toolbar Controls */
  .search-wrap, 
  .dp-search-bar, 
  #dp-search-input-dp, 
  .dp-search-input {
    width: 100% !important;
    max-width: 100% !important;
  }
  .dp-toolbar, .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* Home & Extension Page Mobile Layout */
  .butterfly-bg {
    display: none !important;
  }
  .page-dp {
    padding: 12px !important;
  }
  .dp-inner {
    padding: 16px !important;
    gap: 16px !important;
  }
  .stagger-1 {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 12px !important;
  }
  .stagger-3 {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center;
  }
  .stagger-3 button {
    width: 100%;
    justify-content: center;
  }

  /* Tables Scrollable Wrapper */
  .table-responsive,
  .dp-table-wrap,
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Admin & Form Panels Mobile */
  .ap-shell {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }
  .ap-sidebar {
    width: calc(100% - 24px) !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 12px 12px 0 12px !important;
    border-right: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-shrink: 0 !important;
  }
  .ap-sidebar-header { display: none !important; }
  .ap-menu {
    flex-direction: row !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .ap-menu-section-label { display: none !important; }
  .ap-menu-item {
    padding: 8px 12px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    width: auto !important;
    white-space: nowrap !important;
  }
  .ap-menu-item:hover {
    transform: none !important;
  }
  .ap-content {
    padding: 12px !important;
    overflow-y: visible !important;
    height: auto !important;
  }

  .admin-form-grid, 
  .form-grid-2col {
    grid-template-columns: 1fr !important;
  }
  .admin-card, .card-panel {
    padding: 14px !important;
  }

  /* Notifications Dropdown Mobile */
  .notif-dropdown {
    width: 90vw !important;
    max-width: 360px !important;
    right: -40px !important;
  }
}

@media (max-width: 480px) {
  /* Extra Small Devices */
  .notif-dropdown {
    right: -70px !important;
  }
  .quick-access-grid,
  .dp-inner div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Premium Google Stitch Style Admin Login Modals ────────────────── */
.premium-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999995;
  padding: 20px;
  animation: premiumFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes premiumFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.premium-modal-box {
  position: relative;
  background: rgba(15, 22, 40, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 24px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 100px rgba(59, 130, 246, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: premiumScaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  z-index: 1;
}

/* Rotating RGB Border */
.premium-modal-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1.5px; /* Border thickness */
  background: linear-gradient(90deg, #ff007f, #7f00ff, #00f0ff, #ff007f);
  background-size: 300% 300%;
  -webkit-mask: 
     linear-gradient(#fff 0 0) content-box, 
     linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
  animation: rgbFlow 6s linear infinite;
}

@keyframes rgbFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes premiumScaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.premium-modal-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.premium-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
  line-height: 1;
}
.premium-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: rotate(90deg);
}

.premium-modal-header {
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.premium-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
  margin-bottom: 4px;
}
.premium-brand-icon svg {
  width: 26px;
  height: 26px;
}

.premium-modal-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.premium-modal-header p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
  max-width: 260px;
}

.premium-modal-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.premium-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.premium-input-wrapper label {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.premium-input-wrapper input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 14px;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.premium-input-wrapper input::placeholder {
  color: #64748b;
}
.premium-input-wrapper input:focus {
  border-color: #3b82f6;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), inset 0 2px 4px rgba(0,0,0,0.2);
}

.premium-submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
  transition: all 0.25s ease;
  text-align: center;
}
.premium-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.4);
}
.premium-submit-btn:active {
  transform: translateY(0);
}

.premium-modal-error {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 13px;
  text-align: center;
}
