:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --indigo: #4f46e5;
  --indigo-soft: #eef2ff;
  --teal: #0d9488;
  --teal-soft: #f0fdfa;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --rose: #e11d48;
  --rose-soft: #fff1f2;
  --purple: #7c3aed;
  --purple-soft: #f5f3ff;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.22);
}

[data-theme="dark"] {
  --bg: #090e1a;
  --surface: #111827;
  --surface-2: #1a2234;
  --surface-glass: rgba(17, 24, 39, 0.86);
  --border: #243047;
  --border-strong: #374764;
  --text: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-light: #94a3b8;
  --primary: #3b82f6;
  --primary-dark: #60a5fa;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --indigo: #818cf8;
  --indigo-soft: rgba(99, 102, 241, 0.16);
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.13);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.15);
  --purple: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.15);
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ==================== TOPBAR ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #0d9488 100%);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}
.brand-title { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.brand-year {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  margin-left: 3px;
}
.brand-sub { font-size: 11.5px; color: var(--text-light); }

.main-nav {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.nav-pill {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.nav-pill:hover { color: var(--text); }
.nav-pill.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.topbar-right { display: flex; align-items: center; gap: 8px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-soft);
}
.pulse-dot.loading { background: var(--amber); animation: pulse 1.2s infinite; }
.pulse-dot.error { background: var(--rose); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }

.load-progress-track {
  height: 3px;
  background: transparent;
  overflow: hidden;
}
.load-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #0d9488, #4f46e5);
  transition: width 0.3s ease, opacity 0.4s ease;
}

/* ==================== LAYOUT & BUTTONS ==================== */
.shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 22px 48px;
}
.view-section { display: none; }
.view-section.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.btn {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.btn-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.btn-gradient:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-gradient:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary); }
.btn-ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ==================== HERO ==================== */
.hero-strip {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(79, 70, 229, 0.07) 55%, rgba(13, 148, 136, 0.08) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-ai {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.11) 0%, rgba(124, 58, 237, 0.09) 55%, rgba(13, 148, 136, 0.09) 100%);
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--primary);
  margin-bottom: 4px;
}
.hero-strip h1 { margin: 0 0 5px; font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.hero-strip p { margin: 0; color: var(--text-muted); font-size: 13.5px; max-width: 780px; }
.hero-cta { display: flex; gap: 8px; flex-wrap: wrap; }

.ai-badge-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}
.ai-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--purple); }

/* ==================== TABS & KPIS ==================== */
.event-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.event-tab {
  font-family: inherit;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.15s;
}
.event-tab:hover { border-color: var(--primary); color: var(--primary); }
.event-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.event-tab .cnt {
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.18);
}
.event-tab.active .cnt { background: rgba(255, 255, 255, 0.24); color: #fff; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--text-light); }
.kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.kpi-blue { background: var(--primary-soft); }
.kpi-teal { background: var(--teal-soft); }
.kpi-indigo { background: var(--indigo-soft); }
.kpi-amber { background: var(--amber-soft); }
.kpi-value { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.kpi-value-sm { font-size: 17px; padding-top: 3px; }
.kpi-sub { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }

/* ==================== FILTERS ==================== */
.filter-card { padding: 16px; margin-bottom: 14px; }
.search-row { display: flex; gap: 10px; margin-bottom: 12px; }
.search-wrap { flex: 1; position: relative; }
.search-wrap input {
  font-family: inherit;
  width: 100%;
  padding: 10px 36px 10px 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-wrap input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 18px;
  cursor: pointer;
  display: none;
}
.clear-btn.show { display: block; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.field input, .field select {
  font-family: inherit;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.field input:focus, .field select:focus {
  border-color: var(--primary);
  background: var(--surface);
}
.pair-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.filter-bar-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-checks { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); }
.check-item { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; }
.inline-select { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.mini-input, .mini-select {
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
}
.mini-input { width: 66px; }
.timing-text { font-size: 12px; color: var(--text-light); }

/* ==================== TABLE ==================== */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.toolbar-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.hint-text { font-size: 12px; color: var(--text-light); }
.toolbar-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.select-control {
  font-family: inherit;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 11px 12px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  white-space: nowrap;
}
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--primary); }
thead th .sort-ind { margin-left: 4px; opacity: 0.4; }
thead th.sorted .sort-ind { opacity: 1; color: var(--primary); }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; cursor: pointer; }
tbody tr:hover { background: var(--primary-soft); }
tbody td { padding: 12px; vertical-align: top; font-size: 13px; }
.loading-cell { text-align: center; padding: 48px 16px; color: var(--text-light); font-weight: 600; }

.fav-btn {
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--border-strong);
  cursor: pointer;
  padding: 2px;
}
.fav-btn.active, .fav-btn:hover { color: #f59e0b; }

.jabatan-name { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.instansi-sub { font-size: 12.5px; font-weight: 600; color: var(--primary); margin: 2px 0 5px; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.b-cpns { background: var(--rose-soft); color: var(--rose); }
.b-pppk { background: var(--purple-soft); color: var(--purple); }
.b-umum { background: var(--primary-soft); color: var(--primary); }
.b-khusus { background: var(--amber-soft); color: var(--amber); }
.b-str { background: var(--teal-soft); color: var(--teal); }
.b-ok { background: var(--emerald-soft); color: var(--emerald); }
.b-neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

.sal-main { font-weight: 800; color: var(--teal); white-space: nowrap; font-size: 13px; }
.sal-sub { font-size: 11px; color: var(--text-light); white-space: nowrap; }
.sal-bar { margin-top: 5px; height: 4px; width: 112px; background: var(--border); border-radius: 99px; overflow: hidden; }
.sal-bar > div { height: 100%; background: linear-gradient(90deg, #0d9488, #2563eb); border-radius: 99px; }

.clamp-3 {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 245px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  gap: 10px;
  flex-wrap: wrap;
}
.page-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.empty-state { padding: 54px 20px; text-align: center; color: var(--text-light); }
.empty-ico { font-size: 32px; margin-bottom: 8px; }
.empty-state h3 { margin: 0 0 6px; color: var(--text); }

/* ==================== VIEW 2: AI PREDICTOR ==================== */
.predictor-layout {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.profile-card { padding: 18px; position: sticky; top: 76px; }
.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.card-head-row h2 { margin: 0; font-size: 16px; font-weight: 800; }
.preset-row { display: flex; gap: 5px; flex-wrap: wrap; }
.preset-chip {
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 99px;
  cursor: pointer;
}
.preset-chip:hover { background: var(--primary-soft); border-color: var(--primary); }

.form-section-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}
.form-section-title:first-child { margin-top: 2px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cert-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.check-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.check-card:hover { border-color: var(--primary); }

.ai-placeholder { padding: 44px 30px; text-align: center; }
.ai-placeholder-ico { font-size: 42px; margin-bottom: 10px; }
.ai-placeholder h3 { margin: 0 0 8px; font-size: 18px; }
.ai-placeholder p { color: var(--text-muted); max-width: 560px; margin: 0 auto 14px; }
.ai-placeholder ol {
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.mstat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.mstat-lbl { font-size: 11.5px; color: var(--text-light); font-weight: 600; }
.mstat-val { font-size: 20px; font-weight: 800; color: var(--text); margin-top: 2px; }

.ai-summary-card {
  padding: 18px 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--indigo);
}
.ai-mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--indigo-soft);
  color: var(--indigo);
  margin-bottom: 8px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 10px;
  flex-wrap: wrap;
}
.section-heading h3 { margin: 0; font-size: 15.5px; font-weight: 800; }

.rec-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.rec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.rec-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.rec-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rec-rank {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rec-score-box {
  text-align: right;
  flex-shrink: 0;
}
.rec-score-num { font-size: 20px; font-weight: 800; line-height: 1; }
.rec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.rec-col-title { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text-light); margin-bottom: 4px; }

.insights-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.insight-card { padding: 16px; }
.insight-card h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 800; }
.insight-card ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-muted); display: flex; flex-direction: column; gap: 6px; }

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12.5px;
}
.sp-high { background: var(--emerald-soft); color: var(--emerald); }
.sp-mid { background: var(--amber-soft); color: var(--amber); }
.sp-low { background: var(--rose-soft); color: var(--rose); }

/* ==================== VIEW 3: AGENCIES DIRECTORY ==================== */
.agency-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  font-family: inherit;
  padding: 7px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.agency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.agency-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.agency-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.agency-card h3 { margin: 0 0 2px; font-size: 15.5px; font-weight: 800; }
.agency-anno { font-size: 11.5px; color: var(--text-light); font-family: ui-monospace, Consolas, monospace; }
.agency-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ameta {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
}
.ameta-lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-light); }
.ameta-val { font-size: 12.5px; font-weight: 700; margin-top: 2px; }

/* SKB Visual Bar */
.skb-track-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.skb-track-title { font-size: 11.5px; font-weight: 800; color: var(--text-muted); margin-bottom: 6px; }
.skb-bar-visual {
  display: flex;
  height: 9px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 7px;
  gap: 2px;
}
.skb-seg-0 { background: #2563eb; }
.skb-seg-1 { background: #0d9488; }
.skb-seg-2 { background: #f59e0b; }
.skb-seg-3 { background: #e11d48; }
.skb-legend { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; }
.skb-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.skb-elim { border-color: var(--rose); color: var(--rose); background: var(--rose-soft); font-weight: 700; }

/* ==================== MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-head {
  padding: 16px 22px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; }
.modal-instansi { font-size: 13px; font-weight: 700; color: var(--primary); margin: 3px 0 6px; }
.modal-head-actions { display: flex; gap: 6px; flex-shrink: 0; }
.modal-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 12px 22px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.metric-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.metric-box .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-light); }
.metric-box .val { font-size: 14px; font-weight: 800; margin-top: 3px; }
.detail-sec { margin-bottom: 18px; }
.detail-sec h4 { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.detail-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.edu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.edu-chip {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.edu-chip:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.req-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.req-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  display: flex;
  gap: 10px;
  font-size: 13px;
}
.req-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1120px) {
  .predictor-layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .agency-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .kpi-grid, .filter-grid, .detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-grid, .insights-2col { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shell { padding: 12px 12px 36px; }
  .topbar-inner { padding: 10px 12px; }
  .filter-grid, .form-2col, .match-stats-bar, .agency-meta-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
