*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-family: 'Inter', system-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: 200px; z-index: 30;
  display: flex; flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.2s 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: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo-img {
  width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
}

.sidebar-title {
  flex: 1; font-weight: 600; font-size: 13px;
  color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-nav-wrap { padding: 10px 10px; }

.nav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text-faint); text-transform: uppercase;
  padding: 0 8px; margin-bottom: 4px;
}

.nav-list { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px; font-weight: 400;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--bg-gray1); }
.nav-item.active {
  background: var(--blue-50);
  color: #3b82f6;
  font-weight: 500;
}
.nav-item.active .nav-icon { color: #3b82f6; }
.nav-icon { flex-shrink: 0; color: var(--text-faint); }

/* 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: 200px; }

/* 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 inside cara */
.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; }

/* Left panel */
.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 */
.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 */
.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 content */
.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 table */
.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 buttons (mode selector) */
.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; }

/* Drop zone DP */
.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; }

/* Process button row */
.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); }

/* Error box */
.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; }

/* Results section */
.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 */
.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 */
.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);
}

/* ── 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; }
}
