/* =====================================================================
   WIZARD THEME — Daftar Kepentingan Pribadi
   Tema: Emerald Gov-Tech 🌿
   Struktur: Tokens → Base → Layout → Komponen → State → Responsive
   ===================================================================== */

/* ------------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------------ */
:root {
  /* ===== Palette (tema Emerald) ===== */
  --primary: #1e40af;          /* Emerald-700 — aksi utama */
  --primary-hover: #1e3a8a;    /* Emerald-800 — hover */
  --primary-light: #dbeafe;    /* Emerald-100 — aksen sangat muda */
  --primary-soft: #eff6ff;     /* Emerald-50  — bg soft (panel/badge) */
  --accent: #0ea5e9;           /* Emerald-500 — sekunder / done / gradient */

  /* ===== Netral ===== */
  --bg: #f0f2f5;               /* latar halaman */
  --surface: #ffffff;          /* kartu / form */
  --border: #cbd5e1;
  --border-hover: #94a3b8;

  /* ===== Teks ===== */
  --text: #0f172a;
  --text-muted: #475569;

  /* ===== Status & Disabled ===== */
  --danger: #ef4444;
  --danger-soft: #fff1f2;
  --danger-border: #fecdd3;
  --ok: #10b981;
  --ok-glow: rgb(52 211 153 / 0.3);
  --disabled-bg: #f1f5f9;
  --disabled-text: #94a3b8;

  /* ===== Glow (bayangan berwarna emerald) ===== */
  --glow: rgb(16 185 129 / 0.15);
  --glow-strong: rgb(16 185 129 / 0.35);
  --glow-card: rgb(16 185 129 / 0.05);
  --glow-toast: rgb(4 120 87 / 0.25);

  /* ===== Bentuk & Font ===== */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.15), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.15), 0 4px 6px -4px rgb(0 0 0 / 0.1);
 --sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
    --sans-body: 'Inter', ui-sans-serif, system-ui, sans-serif;

  /* ===== Alias kompatibilitas (warisan) ===== */
  --navy: var(--primary);
  --navy-700: var(--primary-hover);
  --blue: var(--accent);
  --blue-100: var(--primary-light);
  --secondary: var(--accent);
  --gold: #d97706;
}

/* ------------------------------------------------------------------
   2. BASE & RESET
   ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: var(--sans); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
   3. TOPBAR
   ------------------------------------------------------------------ */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px var(--glow-card);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.agency-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.agency-logo img { width: 100%; height: 100%; object-fit: contain; }
.topbar h1 { color: var(--navy); font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -0.2px; }
.topbar p { color: var(--text-muted); font-size: 12px; margin: 2px 0 0; font-weight: 500; }

/* ------------------------------------------------------------------
   4. WIZARD LAYOUT (shell)
   ------------------------------------------------------------------ */
.wizard-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 80px; /* ruang bawah untuk nav mengambang */
}
@media (min-width: 900px) {
  .wizard-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
  }
}

/* Sidebar */
.wizard-sidebar { display: none; }
@media (min-width: 900px) {
  .wizard-sidebar { display: block; position: sticky; top: 32px; }
}
.sidebar-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.sidebar-sub { font-size: 12px; color: var(--text-muted); margin: 0 0 24px; }

/* Kolom utama */
.wizard-main { min-width: 0; }
.doc-title { margin: 0 0 16px; }
@media (min-width: 900px) { .doc-title { display: none; } }
.doc-title h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; color: var(--text); letter-spacing: -0.5px; }
.doc-title p { margin: 0; color: var(--text-muted); font-size: 14px; }

/* ------------------------------------------------------------------
   5. PROGRESS — Stepper Sidebar & Bar Mobile
   ------------------------------------------------------------------ */
/* ---- Mobile: bar tipis ---- */
.mobile-progress { margin: 0 0 24px; }
@media (min-width: 900px) { .mobile-progress { display: none; } }
.mobile-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.mobile-progress-head strong { color: var(--primary); font-weight: 600; }
.mobile-progress-track { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.mobile-progress-fill {
  height: 100%;
  width: 14.28%; /* 1/7 langkah — diupdate JS */
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Desktop: track vertikal ---- */
.step-track { list-style: none; margin: 0; padding: 0; position: relative; }
.step-track::before {
  content: "";
  position: absolute;
  left: 19px; top: 12px; bottom: 12px;
  width: 2px;
  background: var(--border);
}
.step-dot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 8px;
  text-align: left;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.step-dot:hover { background: var(--primary-light); }
.step-node {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.step-check { display: none; width: 16px; height: 16px; }
.step-label { font-size: 14px; font-weight: 500; color: var(--text-muted); transition: color 0.2s ease; }

/* State stepper */
.step-dot.active .step-node {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 6px var(--primary-light);
}
.step-dot.active .step-label { color: var(--primary); font-weight: 600; }
.step-dot.done .step-node { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-dot.done .step-node .step-num { display: none; }
.step-dot.done .step-node .step-check { display: block; }
.step-dot.done .step-label { color: var(--text); }

/* Notice */
.notice {
  display: flex;
  gap: 12px;
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 0 0 32px;
  font-size: 13.5px;
  color: var(--navy);
  line-height: 1.5;
}
.notice .icon { flex-shrink: 0; font-size: 18px; color: var(--primary); }

/* ------------------------------------------------------------------
   6. FORM & SECTION
   ------------------------------------------------------------------ */
form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.form-section { padding: 32px; display: none; }
.form-section.step-active { display: block; animation: fadeIn 0.4s ease; }
@media (max-width: 600px) { .form-section { padding: 20px; } }

.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.section-head h3 { font-size: 18px; font-weight: 700; margin: 0; color: var(--navy); }
.section-hint { margin: 0 0 24px 40px; font-size: 13.5px; color: var(--text-muted); }
.section-body { margin-left: 0; }

/* Padding ekstra untuk section identitas (grid padat) */
.form-section[data-step="1"] .section-body { padding-bottom: 20px; }

/* ------------------------------------------------------------------
   7. INPUT & FIELD
   ------------------------------------------------------------------ */
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin: 16px 0 8px; }
.field-label .req { color: var(--danger); margin-left: 4px; }

input[type="text"],
textarea,
select {
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
input:disabled, select:disabled {
  background: var(--disabled-bg);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.8;
}
textarea { resize: vertical; min-height: 80px; }

/* Arrow custom untuk select native */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Field manual untuk opsi "Lainnya..." */
.manual-field { margin-top: 8px; display: none; }
.manual-field.show { display: block; }

/* ------------------------------------------------------------------
   8. SELECT2 OVERRIDES
   ------------------------------------------------------------------ */
.select2-container { width: 100% !important; max-width: 100%; }
.select2-container .select2-selection--single { width: 100%; }
.select2-container .select2-selection__rendered {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------------
   9. COMBOBOX (custom dropdown)
   ------------------------------------------------------------------ */
.combo-wrap { position: relative; }
select.combo-source { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
input.combo-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.combo-list {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px var(--glow);
  max-height: 200px;
  overflow-y: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  display: none;
  z-index: 99;
}
.combo-list.show { display: block; animation: slideDown 0.2s ease; }
.combo-option { padding: 10px 14px; font-size: 14px; cursor: pointer; color: var(--text); }
.combo-option:hover, .combo-option.selected { background: var(--primary-soft); color: var(--primary-hover); }
.combo-empty { padding: 10px 14px; font-size: 13px; color: var(--text-muted); }

/* ------------------------------------------------------------------
   10. GRID & DYNAMIC ROWS
   ------------------------------------------------------------------ */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 600px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.rows-wrap { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.row-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  position: relative;
  box-shadow: 0 2px 8px var(--glow-card);
  transition: border-color 0.2s ease;
}
.row-card:hover { border-color: var(--border-hover); }
.row-section-group { margin-bottom: 20px; }
.row-section-group > div { min-width: 0; } /* kunci grid menyusut */

.row-index {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.row-remove {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.row-remove:hover { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }

.btn-add {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--primary-hover);
  background: var(--primary-soft);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  cursor: pointer;
  width: 100%;
  margin-top: 16px;
  transition: all 0.2s;
}
.btn-add:hover { background: var(--primary); color: #fff; border-style: solid; }

/* ------------------------------------------------------------------
   11. RADIO SITUASI & CHIPS
   ------------------------------------------------------------------ */
.situasi-radio { display: flex; gap: 20px; margin-top: 8px; }
.radio-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.radio-opt input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

.situasi-options { display: none; margin-top: 16px; padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.situasi-options.show { display: block; }

.situasi-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.situasi-search {
  flex: 1;
  min-width: 180px;
  font-size: 13px;
  padding: 10px 14px 10px 36px !important;
  background-color: var(--surface) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 12px center !important;
  border-radius: 999px !important;
}
.situasi-actions { display: flex; gap: 8px; }
.situasi-actions button {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.situasi-actions button:hover { border-color: var(--border-hover); color: var(--text); }
.situasi-list { display: flex; flex-wrap: wrap; gap: 10px; max-height: 220px; overflow-y: auto; }
.situasi-count { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* Chip checkbox */
.check-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}
.check-opt.hide { display: none; }
.check-opt:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-hover); }
.check-opt input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.check-opt .chip-box {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid var(--text-muted);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.check-opt .chip-box svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.5); transition: all 0.2s ease; }
.check-opt.is-checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-opt.is-checked .chip-box { background: transparent; border-color: #fff; }
.check-opt.is-checked .chip-box svg { opacity: 1; transform: scale(1); }
.check-opt.is-checked .chip-box svg path { stroke: #fff; }

/* ------------------------------------------------------------------
   12. YES/NO TOGGLE & CONDITIONAL BLOCK
   ------------------------------------------------------------------ */
.yn-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.yn-row:first-of-type { border-top: none; padding-top: 8px; }
.yn-row p { margin: 0; font-size: 14px; max-width: 600px; line-height: 1.6; }

.yn-toggle {
  display: flex;
  background: var(--bg);
  border-radius: 8px;
  padding: 4px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.yn-toggle button {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 20px;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  border-radius: 6px;
  transition: all 0.2s;
}
.yn-toggle button.on.yes { background: var(--ok); color: #fff; box-shadow: 0 2px 6px var(--ok-glow); }
.yn-toggle button.on.no { background: var(--text-muted); color: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.1); }

.conditional-block {
  margin-top: 8px;
  padding: 24px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: none;
  animation: fadeIn 0.3s ease;
}
.conditional-block.show { display: block; }

/* ------------------------------------------------------------------
   13. NAVIGASI & TOMBOL
   ------------------------------------------------------------------ */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.step-indicator-text { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.btn-secondary {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover:not(:disabled) { background: var(--bg); border-color: var(--border-hover); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--glow-strong); }
.btn-primary:disabled { background: var(--disabled-text); cursor: not-allowed; }

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--glow-strong);
  transition: all 0.2s ease;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--glow-strong); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; background: var(--disabled-text); box-shadow: none; transform: none; }
.btn-submit:disabled:hover { transform: none; box-shadow: none; }

/* ------------------------------------------------------------------
   14. AFFIDAVIT
   ------------------------------------------------------------------ */
.affidavit {
  padding: 24px 32px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  background: var(--primary-soft);
  border-top: 1px solid var(--border);
  display: none;
}
.affidavit.step-active { display: block; }
.agree-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.agree-check input[type="checkbox"] {
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.actions { padding: 0 32px 32px; display: none; justify-content: flex-end; background: var(--primary-soft); }
.actions.step-active { display: flex; }

/* ------------------------------------------------------------------
   15. TOAST & MISC
   ------------------------------------------------------------------ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px var(--glow-toast);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer.note { text-align: center; color: var(--text-muted); font-size: 12px; font-weight: 500; margin-top: 24px; }

/* ------------------------------------------------------------------
   16. ANIMASI (dikelompokkan)
   ------------------------------------------------------------------ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------
   17. RESPONSIVE (media query dikumpulkan di sini)
   ------------------------------------------------------------------ */
@media (max-width: 600px) {
  .wizard-nav { flex-wrap: wrap; padding: 16px; gap: 12px; justify-content: center; }
  .step-indicator-text { width: 100%; text-align: center; order: -1; margin-bottom: 4px; font-size: 12px; }
  .btn-secondary, .btn-primary { flex: 1; padding: 10px 12px; font-size: 13px; text-align: center; white-space: nowrap; justify-content: center; display: flex; }
}

/* ------------------------------------------------------------------
   5b. SIDEBAR CARD (pemanis stepper vertikal)
   ------------------------------------------------------------------ */
.wizard-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px 16px;
}

/* Header */
.sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 16px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.sidebar-head-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--primary-light);
}
.sidebar-head-icon svg { width: 20px; height: 20px; }
.sidebar-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 2px; line-height: 1.3; }
.sidebar-sub { font-size: 11.5px; color: var(--text-muted); margin: 0; font-weight: 500; }

/* Step item — lebih compact & pill */
.step-dot { border-radius: 12px; padding: 10px; gap: 12px; }
.step-dot:hover { background: var(--primary-soft); }
.step-dot.active {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary-light); /* border tanpa menggeser layout */
}
.step-dot .step-label { flex: 1; font-size: 13.5px; }

/* Status tag */
.step-status { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.step-tag { padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.step-dot.done .step-tag { color: var(--accent); background: var(--primary-light); }
.step-dot.active .step-tag { color: #fff; background: var(--primary); }
.step-dot:not(.done):not(.active) .step-tag { display: none; }

/* Footer progres */
.sidebar-footer {
  margin-top: 12px;
  padding: 14px 8px 4px;
  border-top: 1px dashed var(--border);
}
.sidebar-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.sidebar-progress-head strong { color: var(--primary); font-size: 12px; }
.sidebar-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sidebar-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------------------------------------------
   6b. PEMANIS MAIN (doc-title, mobile progress, notice, affidavit)
   ------------------------------------------------------------------ */

/* Header halaman (mobile) */
.doc-title { display: flex; align-items: flex-start; gap: 14px; padding: 6px 2px; }
.doc-title-badge {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--primary-light);
}
.doc-title-badge svg { width: 20px; height: 20px; }
.doc-title h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; margin: 2px 0 4px; }
.doc-title p { margin: 0; line-height: 1.5; }

/* Mobile progress — kartu senada sidebar */
.mobile-progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px 16px;
}
.mobile-progress-fill {
  background: linear-gradient(90deg, var(--accent), var(--primary));
}
.mobile-progress-head { margin-bottom: 10px; }

/* Notice — emerald soft + ikon kotak */
.notice {
  background: var(--primary-soft);
  border: 1px solid var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
}
.notice-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px var(--glow-card);
}
.notice-icon svg { width: 16px; height: 16px; }
.notice-body strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 2px; }

/* Section badge — lebih tegas */
.section-badge {
  width: 32px; height: 32px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--primary-light);
}

/* Affidavit — kartu dengan header */
.affidavit {
  background: var(--primary-soft);
  border-top: 2px solid var(--primary-light);
}
.affidavit-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--primary-hover);
  font-size: 14px;
}
.affidavit-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px var(--glow);
}
.affidavit-icon svg { width: 16px; height: 16px; }
.affidavit .agree-check span { font-size: 13px; color: var(--text); }

/* Wizard nav — bersihkan latar */
.wizard-nav { background: var(--surface); }

/* YN toggle — senada emerald */
.yn-toggle { border-radius: 10px; }
.yn-toggle button.on.yes { background: var(--ok); }
.yn-toggle button.on.no { background: var(--text-muted); }

/* ================================================================
   LAYOUT SERAGAM — gaya mobile dipakai di semua ukuran layar
   (matikan sidebar desktop agar tidak tumpang tindih)
   ================================================================ */
.wizard-shell {
  display: block;              /* nonaktifkan grid 2 kolom */
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.wizard-sidebar { display: none !important; }  /* sembunyikan sidebar */

.doc-title { display: flex; }                  /* header selalu tampil */
.mobile-progress { display: block; }           /* progress selalu tampil */

@media (min-width: 900px) {
  /* Kunci: batalkan semua aturan desktop lama */
  .wizard-shell { display: block; }
  .wizard-sidebar { display: none !important; }
  .doc-title { display: flex; }
  .mobile-progress { display: block; }
}
/* ================================================================
   BODY & TOPBAR — v2: lembut tapi KONTRAS (tidak menyatu)
   ================================================================ */

/* ---- 1. Body: abu-abu bersih, jelas lebih gelap dari kartu putih ---- */
body {
  background: linear-gradient(180deg, #f1f4f8 0%, #e9edf2 100%);
  background-attachment: fixed;
}

/* Glow emerald opsional — SANGAT tipis, hanya sentuhan di pojok atas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(1000px 360px at 50% -8%, rgb(16 185 129 / 0.05), transparent 60%);
  pointer-events: none;
}

/* ---- 2. Topbar: putih SOLID, pisah tegas dari body ---- */
.topbar {
  background: #ffffff;                    /* solid, bukan translucent */
  border-bottom: 1px solid #d8dee7;       /* garis pemisah yang jelas */
  backdrop-filter: none;                  /* matikan blur */
  box-shadow: 0 4px 12px -6px rgb(15 23 42 / 0.08);
}

/* Strip aksen gradien 3px tetap dipertahankan — satu-satunya "warna" topbar */
.topbar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary) 50%, var(--accent));
}

/* ---- 3. Form card: batas lebih tegas biar "nempel" di body ---- */
form {
  border: 1px solid #cbd5e1;
  box-shadow:
    0 1px 2px rgb(15 23 42 / 0.05),
    0 12px 28px -16px rgb(15 23 42 / 0.18);
}

/* ---- 4. Logo: ring netral (bukan hijau) ---- */
.agency-logo {
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}
/* ================================================================
   KONTRAS INPUT, TOGGLE & PANEL — konsisten dengan topbar baru
   ================================================================ */

/* ---- 1. Input: border lebih pekat + bayangan dalam halus ---- */
input[type="text"],
textarea,
select {
  border-color: #b9c4d1;                        /* lebih gelap dari #cbd5e1 */
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.04);
}
input[type="text"]:hover,
textarea:hover,
select:hover {
  border-color: #94a3b8;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(4 120 87 / 0.12);   /* ring emerald tegas, bukan wash */
}

/* Disabled: jelas beda, pakai border putus-putus */
input:disabled,
select:disabled {
  background: #eef1f5;
  border-style: dashed;
  border-color: #cbd5e1;
}

/* ---- 2. Field label: teks lebih gelap + bintang wajib mencolok ---- */
label.field-label { color: #1e293b; }
label.field-label .req {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 5px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
}

/* ---- 3. Yes/No toggle: segmented control yang tegas ---- */
.yn-toggle {
  background: #e9edf2;                          /* wadah lebih gelap */
  border-color: #cbd5e1;
  border-radius: 10px;
  padding: 3px;
  box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.05);
}
.yn-toggle button { border-radius: 8px; font-weight: 600; }
.yn-toggle button.on.yes {
  background: var(--ok);
  box-shadow: 0 2px 6px rgb(16 185 129 / 0.35);
}
.yn-toggle button.on.no {
  background: #475569;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.12);
}

/* ---- 4. Conditional block & panel situasi: latar lebih tegas + aksen emerald ---- */
.conditional-block,
.situasi-options {
  background: #f5f7fa;                          /* sedikit lebih gelap dari kartu */
  border: 1px solid #d6dde6;
  border-left: 3px solid var(--accent);         /* aksen kiri — nyambung ke notice */
  border-radius: var(--radius-sm);
}

/* ---- 5. Chip: border lebih jelas biar menonjol dari panel ---- */
.check-opt { border-color: #b9c4d1; background: #ffffff; }
.check-opt:hover { border-color: var(--primary); }

.conditional-block, .situasi-options {
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

/* ================================================================
   TOMBOL NAV — Gov Blue (hanya tombol; token emerald tidak diubah)
   ================================================================ */

/* ---- "Selanjutnya →" & tombol utama ---- */
.btn-primary {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  border: 1px solid #1e40af;
  color: #ffffff;
  box-shadow: 0 2px 6px rgb(29 78 216 / 0.25);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -4px rgb(29 78 216 / 0.4);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #f8fafc;
}

/* ---- "← Sebelumnya" & tombol sekunder ---- */
.btn-secondary {
  background: #ffffff;
  border: 1px solid #bfdbfe;         /* biru-200 */
  color: #1d4ed8;                     /* biru-700 */
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}
.btn-secondary:hover:not(:disabled) {
  background: #eff6ff;                /* biru-50 */
  border-color: #93c5fd;              /* biru-300 */
  color: #1e40af;
}
.btn-secondary:active:not(:disabled) { background: #dbeafe; }
.btn-secondary:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
}

/* ---- Submit Laporan: ikut biru biar satu keluarga tombol aksi ---- */
.btn-submit {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: 1px solid #1e40af;
  box-shadow: 0 4px 12px rgb(29 78 216 / 0.3);
}
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgb(29 78 216 / 0.4);
}
.btn-submit:active { transform: translateY(0); }

/* ---- Fokus keyboard ---- */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.25);
}

/* Styling Canvas agar responsif dan tidak scroll saat disentuh */
.signature-wrapper {
    border: 2px dashed #dee2e6 !important;
    border-radius: 0.375rem;
    overflow: hidden;
}
#signature-canvas {
    touch-action: none; /* Mencegah scrolling di HP saat tanda tangan */
    cursor: crosshair;
}

.hero-art {
    position: relative;
    flex-shrink: 0;
    width: 320px;
    height: 260px;
}

.hero-art__img {
    width: 100%;
    height: 100%;
    object-fit: contain;

    /* ── Supaya menyatu ── */
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .12));
    border-radius: 14px;
    opacity: .92;
    transition: opacity .3s ease;
}

.hero-art:hover .hero-art__img {
    opacity: 1;
}

/* Jika gambar berlatar putih & ingin blend */
.hero-art__img--blend {
    mix-blend-mode: multiply;
    opacity: .85;
}

/* ================================================================
   DEKLARASI — tambahan khusus
   ================================================================ */

/* Divider antar bagian dalam 1 step */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

/* Tag opsional di judul */
.optional-tag {
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
}

/* Input error shake */
.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgb(239 68 68 / 0.12) !important;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}


/* ================================================================
   SKENARIO ACCORDION (Step 2 Deklarasi)
   ================================================================ */

.skenario-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Accordion Item ---- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.accordion-item:has(.accordion-body.open) {
  border-color: var(--primary);
}

/* ---- Header ---- */
.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  text-align: left;
  transition: background 0.15s;
}
.accordion-header:hover {
  background: var(--primary-light);
}

.accordion-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}
.accordion-body.open ~ .accordion-header .accordion-icon,
.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.accordion-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 999px;
}

/* ---- Body ---- */
.accordion-body {
  display: none;
  padding: 0 16px 12px;
  background: var(--bg);
}
.accordion-body.open {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* ---- Skenario Card (checkbox row) ---- */
.skenario-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.skenario-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgb(5 150 105 / 0.08);
}
.skenario-card:has(.skenario-check:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.skenario-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.skenario-content {
  flex: 1;
  min-width: 0;
}

.skenario-tindakan {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.skenario-potensi {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.potensi-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 1px 8px;
  border-radius: 4px;
  margin-top: 1px;
}

/* ---- Divider ---- */
.free-text-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.free-text-divider::before,
.free-text-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Counter ---- */
.skenario-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
}
.skenario-counter svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* =============================================
   SUMBER KONFLIK ACCORDION — Emerald Gov-Tech
   ============================================= */

/* ── Search Wrapper ── */
.sumber-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.sumber-search-wrap .situasi-search {
  width: 100%;
}

/* ── Accordion Container ── */
.sumber-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Kategori Card ── */
.sumber-kategori {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sumber-kategori:hover {
  border-color: #cbd5e1;
}

.sumber-kategori.is-open {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(5, 150, 105, 0.08);
}

/* ── Header Button ── */
.sumber-kategori-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s ease;
}

.sumber-kategori-header:hover {
  background: #f8fafc;
}

.sumber-kategori-header:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--primary);
}

/* ── Left Side: Checkbox + Title ── */
.sumber-kategori-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.sumber-kategori-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.sumber-kategori-check:disabled {
  cursor: default;
  opacity: 0.7;
}

.sumber-kategori-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  min-width: 0;
}

.sumber-kategori-title strong {
  font-weight: 700;
}

/* ── Count Badge ── */
.sumber-kategori-count {
  flex-shrink: 0;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.sumber-kategori.is-open .sumber-kategori-count {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

/* ── Chevron Icon ── */
.sumber-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.2s ease;
}

.sumber-kategori.is-open .sumber-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

/* ── Description ── */
.sumber-kategori-desc {
  display: none;
  margin: 0 16px 12px 46px;
  padding: 10px 14px;
  background: #f8fafc;
  border-left: 3px solid #a7f3d0;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
}

.sumber-kategori.is-open .sumber-kategori-desc {
  display: block;
  animation: sumberFadeIn 0.25s ease;
}

@keyframes sumberFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Subitems (collapsible chips) ── */
.sumber-subitems {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 16px;
  transform: translateY(-6px);
  transition: max-height 0.35s ease, opacity 0.3s ease,
              transform 0.3s ease, padding 0.3s ease;
}

.sumber-kategori.is-open .sumber-subitems {
  max-height: 6000px;  /* cukup besar untuk konten apa pun */
  opacity: 1;
  transform: translateY(0);
  padding: 0 16px 16px;
}

/* Chips di dalam sub-items */
.sumber-item.check-opt {
  margin: 0;
}

/* Items tersembunyi saat pencarian aktif */
.sumber-item.hide {
  display: none;
}

/* Kategori disembunyikan saat pencarian */
.sumber-kategori.hide {
  display: none;
}

/* ── Total Counter ── */
.sumber-total {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  padding: 12px 16px;
  background: #ecfdf5;
  border: 1px dashed #6ee7b7;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: #047857;
  text-align: center;
}

.sumber-total strong {
  font-size: 15px;
  font-weight: 700;
}

/* ── Empty Search State ── */
.sumber-empty {
  display: none;
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.sumber-empty.show {
  display: block;
}

/* ── Mobile Responsive ── */
@media (max-width: 640px) {
  .sumber-kategori-header {
    padding: 12px 12px;
    gap: 8px;
  }

  .sumber-kategori-title {
    font-size: 13.5px;
  }

  .sumber-kategori-left {
    gap: 8px;
  }

  .sumber-kategori-desc {
    margin: 0 12px 10px 38px;
  }

  .sumber-subitems {
    padding-right: 12px;
    padding-left: 12px;
  }

  .sumber-kategori.is-open .sumber-subitems {
    padding-right: 12px;
    padding-left: 12px;
  }
}

.sumber-kategori-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    transition: background 0.15s;
    border: none;
    width: 100%;
}
.sumber-kategori-header:hover {
    background: var(--primary-soft);
}

.sumber-kategori-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.sumber-kategori-title-btn {
    flex: 1;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: var(--text);
    padding: 0;
    cursor: pointer;
    line-height: 1.4;
}
.sumber-kategori-title-btn strong {
    color: var(--primary-hover);
    font-weight: 700;
}

.sumber-kategori-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sumber-kategori-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sumber-kategori-check {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}
.sumber-kategori-check:disabled {
    cursor: default;
    opacity: 0.45;
}

.sumber-kategori-count {
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sumber-kategori-count.has-selection {
    color: var(--primary);
    background: var(--primary-light);
    border-color: var(--primary);
}

.sumber-chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}
.sumber-kategori.is-open .sumber-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ═══════ Signature Modal ═══════ */
.sig-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sig-modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.sig-modal-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sig-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 0;
}
.sig-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.sig-modal-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.sig-modal-close {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.15s;
}
.sig-modal-close:hover {
  background: #fef2f2;
  border-color: #fecdd3;
  color: var(--danger);
}

.sig-modal-body {
  padding: 20px 24px;
}

.sig-canvas-wrap {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  transition: border-color 0.2s;
}
.sig-canvas-wrap:focus-within,
.sig-canvas-wrap.drawing {
  border-color: var(--primary);
  border-style: solid;
}

#sig-canvas {
  display: block;
  width: 100%;
  height: 200px;
  cursor: crosshair;
  touch-action: none;
}

.sig-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
  transition: opacity 0.2s;
}
.sig-placeholder.hidden {
  opacity: 0;
}

.sig-modal-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}

.btn-sig-tool {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.btn-sig-tool:hover {
  background: #fef2f2;
  border-color: #fecdd3;
  color: var(--danger);
}

.sig-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.sig-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 24px;
}

.btn-sig-cancel {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-sig-cancel:hover {
  background: var(--surface);
  border-color: var(--text-muted);
}

.btn-sig-confirm {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-sig-confirm:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}
.btn-sig-confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Signature badge (after confirmed) ── */
.sig-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ok);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 6px 12px;
  margin-top: 8px;
}
.sig-badge svg { flex-shrink: 0; }

.sig-canvas-wrap {
  position: relative;
  width: 100%;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

.sig-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 200px;
  cursor: crosshair;
  touch-action: none;
}

