/* 
  Pemilu Blimbing 2024 — Design System inspired by apmix.ai
  Typography: Sora (Headings), Manrope (Body/UI), JetBrains Mono (Numbers/Stats)
  Aesthetic: Precision obsidian dark-mode, micro-borders, glassmorphism dock
*/

:root {
  color-scheme: dark;
  --paper: #090a0e;
  --sidebar-bg: #0d0f14;
  --card-bg: #13151c;
  --card-hover: #191c26;
  --card-active: #1d212e;
  
  --line: #20232e;
  --line-light: rgba(255, 255, 255, 0.09);
  --line-highlight: rgba(255, 255, 255, 0.18);
  
  --ink: #f8fafc;
  --ink-secondary: #cbd5e1;
  --ink-mute: #848c9e;
  --ink-faint: #4e5566;
  
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;
  
  --font-display: "Sora", system-ui, -apple-system, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --shadow-float: 0 16px 36px -4px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--line);
  --shadow-card: 0 4px 16px -2px rgba(0, 0, 0, 0.45);
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* Utility font classes */
.font-mono {
  font-family: var(--font-mono) !important;
}

/* Custom Slim Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- SIDEBAR (apmix dark dashboard panel) ---------- */
#sidebar {
  width: 420px;
  min-width: 420px;
  max-width: 420px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 500;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

#app.sidebar-hidden #sidebar {
  margin-left: -420px;
  opacity: 0;
  pointer-events: none;
}

/* Header */
#sidebar header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-sidebar-toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-faint);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sidebar-toggle:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-light);
}

.ctrl-btn-sidebar {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-light);
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ctrl-btn-sidebar:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-highlight);
  color: #ffffff;
}

#app.sidebar-hidden .ctrl-btn-sidebar {
  background: #ffffff;
  color: #090a0e;
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

#app.sidebar-hidden .ctrl-btn-sidebar svg {
  stroke: #090a0e;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--ink-secondary);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.brand-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  color: var(--ink-mute);
  font-size: 11.5px;
  margin-top: 4px;
}

/* Stats Cards Grid */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--line);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--line-highlight);
  background: var(--card-hover);
}

.card .num {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: -0.01em;
}

.card .lbl {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  margin-top: 2px;
}

/* Segmented Control Tabs (apmix pill bar) */
.tabs-wrapper {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar-bg);
}

.sidebar-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  padding: 7px 4px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: #ffffff;
  color: #090a0e;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tab-btn.active svg {
  stroke: #090a0e;
}

/* Tab Content Areas */
.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.tab-content.active {
  display: block;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
}

.badge-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
}

.section-desc {
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.45;
  margin-bottom: 12px;
}

.btn-pill-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-pill-sm:hover {
  background: var(--card-hover);
  border-color: var(--line-highlight);
}

/* Party List Leaderboard (refined, sleek, apmix minimalist style) */
.party-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.party-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.party-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
}

.party-card.active {
  background: rgba(56, 189, 248, 0.04);
  border-color: rgba(56, 189, 248, 0.35);
}

.party-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.party-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  width: 14px;
}

.party-pill {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.party-name-wrap {
  flex: 1;
  min-width: 0;
}

.party-code {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0;
  color: #f1f5f9;
}

.party-wins-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.party-fullname {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  opacity: 0.85;
}

.party-stats-right {
  text-align: right;
  flex-shrink: 0;
}

.party-votes {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  color: #e2e8f0;
}

.party-pct {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10.5px;
  color: var(--ink-mute);
}

.party-bar-bg {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 1px;
  margin-top: 6px;
  overflow: hidden;
}

.party-bar-fill {
  height: 100%;
  border-radius: 1px;
  opacity: 0.85;
  transition: width 0.4s ease;
}

/* Kelurahan List Items (refined) */
.kel-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.kel-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kel-item:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
}

.kel-item.active {
  background: rgba(56, 189, 248, 0.04);
  border-color: rgba(56, 189, 248, 0.35);
}

.kel-info-main {
  display: flex;
  flex-direction: column;
}

.kel-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.kel-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-mute);
  margin-top: 1px;
  opacity: 0.85;
}

.kel-winner-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Caleg List Items (refined) */
.caleg-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.caleg-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.caleg-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.caleg-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  width: 14px;
}

.caleg-name {
  font-size: 12px;
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caleg-votes {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* Search Tab */
.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  font-family: var(--font-body);
  font-size: 13px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  outline: none;
  transition: all 0.15s ease;
}

.search-input-wrap input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.results {
  list-style: none;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.results li {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  margin-bottom: 5px;
  transition: all 0.15s ease;
}

.results li:hover {
  background: var(--card-hover);
  border-color: var(--line-highlight);
}

.r-head {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.r-sub {
  color: var(--ink-mute);
  font-size: 11px;
  margin-top: 2px;
}

.extremes {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ext-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.ext-label {
  color: var(--ink-mute);
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.ext-val {
  font-weight: 600;
  color: var(--accent-cyan);
  cursor: pointer;
  font-size: 12.5px;
}

.ext-val:hover {
  text-decoration: underline;
}

.ext-sub {
  font-family: var(--font-mono);
  color: var(--ink-mute);
  font-size: 11px;
}

/* Sidebar Footer */
#sidebar footer {
  margin-top: auto;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--sidebar-bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--ink-faint);
}

.footer-tag {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ---------- MAIN MAP WRAPPER ---------- */
#map-wrap {
  flex: 1;
  position: relative;
  height: 100%;
  background: #06070a;
}

#map {
  position: absolute;
  inset: 0;
  background: #06070a;
}

/* Floating Island Dock (apmix.ai inspired glassmorphism toolbar) */
.map-controls {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(13, 15, 20, 0.90);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  max-width: calc(100% - 32px);
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ctrl-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* Segmented Dock */
.segmented-dock {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--ink-secondary);
  padding: 5px 11px;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ctrl-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.ctrl-btn.active {
  background: #ffffff;
  color: #090a0e;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.ctrl-btn.active .dot-indicator {
  background: #090a0e;
}

/* Custom Select Dropdowns */
.custom-select-wrap select, select {
  color-scheme: dark;
  background-color: #13151c;
  border: 1px solid var(--line-light);
  color: #f1f5f9;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 220px;
}

.custom-select-wrap select:focus, select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.custom-select-wrap select option, select option {
  background-color: #13151c;
  color: #f1f5f9;
  padding: 6px 10px;
}

/* Toggle Switch Pill */
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-pill input {
  display: none;
}

.toggle-track {
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  border: 1px solid var(--line);
}

.toggle-thumb {
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.toggle-pill input:checked + .toggle-track {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.toggle-pill input:checked + .toggle-track .toggle-thumb {
  transform: translateX(14px);
  background: #090a0e;
}

.toggle-text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

/* Unified Floating Legend Card (apmix card style) */
.map-legend {
  position: absolute;
  bottom: 24px;
  right: 16px;
  z-index: 1000;
  background: rgba(13, 15, 20, 0.92);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 11px 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  width: 250px;
  transition: all 0.2s ease;
}

.map-legend:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.legend-summary-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legend-summary-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.legend-summary-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.legend-info-text {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-body);
}

.legend-info-text b {
  color: #fff;
  font-weight: 700;
}

.legend-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 9px 0 8px;
}

.legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legend-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.legend-chip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  color: var(--ink-mute);
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 5px currentColor;
}

/* ---------- LEAFLET POPUP (apmix terminal card theme) ---------- */
.leaflet-popup-content-wrapper {
  background: rgba(14, 16, 22, 0.96) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-highlight) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-float) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-family: var(--font-body) !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  background: rgba(14, 16, 22, 0.96) !important;
  border: 1px solid var(--line-highlight) !important;
}

.tps-popup {
  padding: 14px 16px;
  min-width: 270px;
}

.tps-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.tps-popup-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.tps-popup-kel {
  font-size: 11px;
  color: var(--ink-mute);
}

.tps-popup-winner {
  padding: 2.5px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.tps-popup-addr {
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 10px;
  line-height: 1.35;
}

.tps-popup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  margin-bottom: 10px;
  text-align: center;
}

.tps-popup-grid .g-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.tps-popup-grid .g-lbl {
  font-size: 9.5px;
  color: var(--ink-mute);
}

.tps-popup-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.tps-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.tps-bar-label {
  width: 65px;
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tps-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.tps-bar-prog {
  height: 100%;
  border-radius: var(--radius-full);
}

.tps-bar-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  width: 52px;
  text-align: right;
}

.tps-popup-caleg {
  font-size: 11px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border-left: 3px solid var(--accent-cyan);
  margin-bottom: 8px;
}

.tps-popup-link {
  text-align: right;
}

.tps-popup-link a {
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.tps-popup-link a:hover {
  text-decoration: underline;
}

/* Tooltip Customization */
.leaflet-tooltip {
  background: rgba(13, 15, 20, 0.95) !important;
  color: #fff !important;
  border: 1px solid var(--line-light) !important;
  border-radius: 7px !important;
  padding: 5px 9px !important;
  font-size: 11.5px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(12px) !important;
}

.bnd-tip {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.3px !important;
}

/* ---------- VERTICAL RIGHT DOCK (OSIRIS STYLE) ---------- */
.right-dock {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  background: rgba(13, 15, 20, 0.90);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-full);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dock-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dock-btn.active {
  background: #ffffff;
  color: #090a0e;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.dock-btn.active svg {
  stroke: #090a0e;
}

.dock-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13, 15, 20, 0.95);
  border: 1px solid var(--line-light);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.dock-btn:hover .dock-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

/* ---------- DYNAMIC RIGHT SLIDE-OVER PANEL ---------- */
.right-panel {
  position: absolute;
  right: 16px;
  top: 16px;
  bottom: 16px;
  width: 420px;
  max-width: calc(100vw - 32px);
  z-index: 1001;
  background: rgba(13, 15, 20, 0.96);
  border: 1px solid var(--line-highlight);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(calc(100% + 30px));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.right-panel.open {
  transform: translateX(0);
}

/* Right Panel Header */
.right-panel-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.panel-badge-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.rp-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: #fff;
  background: var(--accent-rose);
}

.rp-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  padding: 1.5px 6px;
  border-radius: var(--radius-full);
}

.rp-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.rp-subtitle {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.btn-panel-close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-mute);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-panel-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: var(--line-light);
}

/* Right Panel Tabs */
.right-panel-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--line);
  padding: 4px 8px;
  gap: 3px;
}

.rp-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  padding: 6px 2px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: center;
}

.rp-tab-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.rp-tab-btn.active {
  background: #ffffff;
  color: #090a0e;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Right Panel Body */
.right-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}

.rp-content {
  display: none;
}

.rp-content.active {
  display: block;
}

/* Metric Cards in Right Panel */
.rp-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.rp-metric-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

.rp-m-val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.rp-m-lbl {
  font-size: 10px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.rp-section-label {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.rp-hint {
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-bottom: 8px;
  line-height: 1.35;
}

/* AI Box */
.ai-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.ai-box-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ai-sparkle {
  color: var(--accent-cyan);
}

.ai-narrative {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* Ideology Balance */
.rp-ideology-wrap {
  margin-bottom: 12px;
}

.ideology-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  display: flex;
  overflow: hidden;
  margin-top: 4px;
}

.ideo-bar-nas {
  background: #dc2626;
  height: 100%;
}

.ideo-bar-aga {
  background: #10b981;
  height: 100%;
}

.ideo-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-top: 4px;
}

/* Battleground TPS List */
.rp-battleground-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bg-tps-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bg-tps-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-highlight);
}

.bg-tps-no {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  color: var(--accent-cyan);
}

.bg-tps-desc {
  font-size: 11px;
  color: var(--ink-secondary);
}

.bg-tps-margin {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.ai-recom-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
}

.recom-title {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 4px;
}

.recom-text {
  font-size: 11px;
  color: var(--ink-secondary);
  line-height: 1.4;
}

/* Coalition Simulator */
.sim-header {
  margin-bottom: 12px;
}

.sim-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.sim-sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.sim-scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.sim-team {
  text-align: center;
  flex: 1;
}

.team-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.team-a .team-label { color: #38bdf8; }
.team-b .team-label { color: #f43f5e; }

.team-votes {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-top: 2px;
}

.team-pct {
  font-size: 16px;
  font-weight: 700;
}
.team-a .team-pct { color: #38bdf8; }
.team-b .team-pct { color: #f43f5e; }

.sim-vs {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  padding: 0 8px;
}

.sim-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  display: flex;
  overflow: hidden;
  margin-bottom: 8px;
}

.sim-prog-a {
  background: #38bdf8;
  height: 100%;
  transition: width 0.3s ease;
}

.sim-prog-b {
  background: #f43f5e;
  height: 100%;
  transition: width 0.3s ease;
}

.sim-verdict-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11px;
  text-align: center;
  margin-bottom: 12px;
  color: var(--ink-secondary);
}

.sim-pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.party-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.12s ease;
}

.sim-check-label:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sim-check-label input {
  accent-color: var(--accent-cyan);
}

/* Anomaly Tab */
.audit-header {
  margin-bottom: 12px;
}

.audit-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.audit-sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.rp-anomalies-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anomaly-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
}
.anomaly-item.warning { border-left-color: #ef4444; }
.anomaly-item.notice { border-left-color: #38bdf8; }

.anom-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.anom-tps {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}

.anom-type {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--accent-amber);
}

.anom-desc {
  font-size: 11px;
  color: var(--ink-mute);
}

/* Chatbot AI Tab */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 380px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}

.chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.45;
}

.chat-bubble.bot {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #fb923c;
  color: var(--ink-secondary);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.chat-bot-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-robot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #fb923c;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.2);
}

.chat-robot-badge .robot-icon,
.chat-robot-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.chat-bot-label {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  color: #fb923c;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.chat-bot-body {
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.chat-bubble.user {
  background: #38bdf8;
  color: #090a0e;
  font-weight: 600;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}

.prompt-chip {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.12s ease;
}

.prompt-chip:hover {
  color: #fff;
  border-color: var(--line-highlight);
  background: rgba(255, 255, 255, 0.09);
}

.chat-input-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.chat-input-row input {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--line);
  color: #fff;
  padding: 7px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 11.5px;
  outline: none;
}
.chat-input-row input:focus {
  border-color: var(--accent-cyan);
}

.btn-chat-send {
  background: #ffffff;
  color: #090a0e;
  font-weight: 700;
  border: none;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
}


/* ========================================================
   FILTER ANALITIK SIMPUL & INTERACTIVE MODAL STYLES
   ======================================================== */

/* Analytics Summary Card in Right Panel */
.filter-analytics-card {
  background: rgba(14, 18, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.filter-analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-analytics-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.filter-badge-active {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.filter-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.filter-stat-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
}

.filter-stat-label {
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-bottom: 2px;
  font-weight: 500;
}

.filter-stat-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.filter-stat-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.flt-top-parties-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.flt-top-parties-label {
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-right: 4px;
}

.flt-party-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Filter Controls & Preset Chips */
.flt-controls-section {
  margin-bottom: 16px;
}

.flt-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-mute);
  margin-bottom: 8px;
}

.flt-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.flt-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink-mute);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.flt-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.flt-chip.active {
  background: #ffffff;
  color: #090a0e;
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.flt-filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.flt-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flt-select-wrap label {
  font-size: 10.5px;
  color: var(--ink-mute);
  font-weight: 600;
}

.flt-select-wrap select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  outline: none;
  cursor: pointer;
  width: 100%;
}

.flt-select-wrap select option {
  background: #0f141f;
  color: #ffffff;
}

.flt-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.flt-search-wrap input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 7px 10px;
  padding-right: 80px;
  border-radius: 6px;
  font-size: 11.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.flt-search-wrap input:focus {
  border-color: #38bdf8;
  background: rgba(255, 255, 255, 0.06);
}

.flt-match-pill {
  position: absolute;
  right: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-mute);
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* List of Filtered TPS Cards */
.flt-tps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.flt-tps-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.flt-tps-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.flt-tps-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.flt-tps-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flt-tps-no-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
}

.flt-tps-kel {
  font-size: 11.5px;
  color: var(--ink-mute);
}

.flt-tps-metric-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.flt-tps-metric-tag.warn {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.flt-tps-metric-tag.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.flt-tps-metric-tag.good {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.flt-tps-addr {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flt-tps-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.flt-tps-winner-info {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.flt-winner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.flt-tps-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flt-btn-goto-map {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.flt-btn-goto-map:hover {
  background: #38bdf8;
  color: #090a0e;
  border-color: #38bdf8;
}

/* ========================================================
   MODAL POP-UP DETAIL SIMPUL TPS
   ======================================================== */
.tps-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tps-modal-container {
  background: #0f141f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.tps-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.tps-modal-header-left {
  flex: 1;
}

.tps-modal-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tps-modal-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #dc2626;
}

.tps-modal-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-mute);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tps-modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.tps-modal-address {
  font-size: 12px;
  color: var(--ink-mute);
  margin: 4px 0 0;
}

.tps-modal-close {
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.tps-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.tps-modal-body {
  padding: 18px 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.tps-modal-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.tps-modal-m-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
}

.tps-m-label {
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 2px;
}

.tps-m-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.tps-m-sub {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.tps-modal-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-mute);
  margin-bottom: 10px;
}

.tps-modal-parties {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.tps-modal-party-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.tps-modal-party-left {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 140px;
  flex-shrink: 0;
}

.tps-party-rank {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  width: 14px;
}

.tps-party-name {
  font-weight: 700;
  color: #ffffff;
}

.tps-modal-bar-wrap {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
}

.tps-modal-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.tps-modal-party-right {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: right;
  width: 100px;
  flex-shrink: 0;
}

.tps-modal-info-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-mute);
}

.tps-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #38bdf8;
  color: #090a0e;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary-action:hover {
  background: #7dd3fc;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.btn-secondary-action {
  background: transparent;
  color: var(--ink-mute);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary-action:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}


/* ========================================================
   INTELLIGENCE HUB — WAR ROOM SIDEBAR TAB
   ======================================================== */

/* Intel tab special styling */
.tab-btn-intel {
  background: linear-gradient(135deg, rgba(56,189,248,0.1) 0%, rgba(99,102,241,0.08) 100%);
  border: 1px solid rgba(56,189,248,0.2) !important;
  color: #38bdf8 !important;
  position: relative;
}
.tab-btn-intel.active {
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  color: #090a0e !important;
  border-color: #38bdf8 !important;
}
.tab-btn-intel::after {
  content: '';
  position: absolute;
  top: 3px; right: 3px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  animation: intelPulse 2s ease-in-out infinite;
}
.tab-btn-intel.active::after { display: none; }
@keyframes intelPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.6); }
}

.intel-tab-content {
  padding: 0 !important;
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.intel-tab-content.active { display: flex; }

/* Intel Header */
.intel-header {
  background: linear-gradient(135deg, rgba(56,189,248,0.08) 0%, rgba(99,102,241,0.06) 100%);
  border-bottom: 1px solid rgba(56,189,248,0.15);
  padding: 12px 14px 10px;
  flex-shrink: 0;
}
.intel-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.intel-header-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(56,189,248,0.7);
  text-transform: uppercase;
}
.intel-party-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(56,189,248,0.15);
  color: #38bdf8;
  border: 1px solid rgba(56,189,248,0.3);
}
.intel-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-mute);
}
.intel-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.intel-status-dot.ready { background: #34d399; box-shadow: 0 0 6px #34d399; }
.intel-status-dot.loading {
  background: #fbbf24;
  animation: intelPulse 1s ease-in-out infinite;
}

/* Action Row */
.intel-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

/* Balanced Segmented Tab Switcher (Analisis 2024 vs Pre-2029) */
.intel-tabs-segmented {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: 1;
}

.intel-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute, #94a3b8);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.intel-tab-btn:hover:not(:disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.intel-tab-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Tab 1: Analisis 2024 Active State */
#btn-drawer-intel-compute.intel-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 700;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

/* Tab 2: Pre-2029 Active State */
#btn-drawer-intel-pre2029.intel-tab-btn.active {
  background: linear-gradient(135deg, #a855f7 0%, #f59e0b 100%);
  color: #ffffff;
  font-weight: 700;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
}

/* Radar Action Pill */
.intel-btn-radar-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 15px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 9px;
  color: #38bdf8;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.intel-btn-radar-pill:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.intel-btn-radar-pill:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .intel-btn-radar-pill span {
    display: none;
  }
  .intel-btn-radar-pill {
    padding: 0 10px;
  }
}

/* Content Area */
.intel-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 20px;
}

.intel-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--ink-mute);
}
.intel-empty-icon { font-size: 28px; margin-bottom: 10px; }
.intel-empty-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.intel-empty-desc { font-size: 11.5px; line-height: 1.6; }

.intel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  gap: 12px;
  color: var(--ink-mute);
  font-size: 12px;
}
.intel-spinner {
  width: 24px; height: 24px;
  border: 2px solid rgba(56,189,248,0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Pilar Sections ---- */
.intel-section {
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.intel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.intel-section-header:hover { background: rgba(255,255,255,0.05); }
.intel-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
}
.intel-section-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.intel-section-body { padding: 12px; }
.intel-section-body.collapsed { display: none; }

/* Pilar 1: Health Card */
.intel-health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}
.intel-health-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.intel-h-label { font-size: 9.5px; color: var(--ink-mute); margin-bottom: 3px; }
.intel-h-val { font-family: var(--font-mono); font-size: 16px; font-weight: 700; line-height: 1.1; }
.intel-h-sub { font-size: 9px; color: rgba(255,255,255,0.4); margin-top: 1px; }

.intel-ranking-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  font-size: 11.5px;
}
.intel-rank-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  width: 18px;
  text-align: right;
}
.intel-rank-party { font-weight: 700; flex: 1; }
.intel-rank-bar-wrap {
  width: 60px; height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
}
.intel-rank-bar-fill { height: 100%; border-radius: 3px; }
.intel-rank-pct {
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: right;
  width: 36px;
}
.intel-rank-wins { font-size: 10px; color: var(--ink-mute); width: 50px; text-align: right; }

/* Pilar 2: Zone Map */
.intel-zone-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.intel-zone-icon { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.intel-zone-stronghold { background: rgba(16,185,129,0.15); }
.intel-zone-battleground { background: rgba(245,158,11,0.15); }
.intel-zone-growth { background: rgba(56,189,248,0.15); }
.intel-zone-weak { background: rgba(107,114,128,0.15); }
.intel-zone-info { flex: 1; }
.intel-zone-kel { font-size: 12px; font-weight: 700; color: #fff; }
.intel-zone-sub { font-size: 10.5px; color: var(--ink-mute); margin-top: 1px; }
.intel-zone-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.tag-stronghold { background: rgba(16,185,129,0.15); color: #34d399; }
.tag-battleground { background: rgba(245,158,11,0.15); color: #fbbf24; }
.tag-growth { background: rgba(56,189,248,0.15); color: #38bdf8; }
.tag-weak { background: rgba(107,114,128,0.1); color: #94a3b8; }

/* Pilar 3: Flip Calculator */
.intel-flip-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  cursor: pointer;
  transition: opacity 0.15s;
}
.intel-flip-card:hover { opacity: 0.8; }
.intel-flip-no {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  width: 50px;
  color: #fff;
}
.intel-flip-info { flex: 1; font-size: 11px; }
.intel-flip-kel { font-weight: 600; color: #fff; }
.intel-flip-addr { font-size: 10px; color: var(--ink-mute); }
.intel-flip-margin {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.flip-urgent { background: rgba(239,68,68,0.15); color: #f87171; }
.flip-high { background: rgba(245,158,11,0.15); color: #fbbf24; }
.flip-medium { background: rgba(56,189,248,0.12); color: #38bdf8; }

/* Pilar 4: Saksi Matrix */
.intel-saksi-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  cursor: pointer;
}
.intel-saksi-row:hover { opacity: 0.8; }
.saksi-risk-bar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.risk-critical { background: rgba(239,68,68,0.2); color: #f87171; border: 1px solid rgba(239,68,68,0.4); }
.risk-high { background: rgba(245,158,11,0.2); color: #fbbf24; border: 1px solid rgba(245,158,11,0.4); }
.risk-medium { background: rgba(56,189,248,0.15); color: #38bdf8; border: 1px solid rgba(56,189,248,0.3); }
.intel-saksi-info { flex: 1; font-size: 11px; }
.intel-saksi-tps { font-weight: 700; color: #fff; }
.intel-saksi-detail { font-size: 10px; color: var(--ink-mute); margin-top: 1px; }
.intel-saksi-status {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}
.status-menang { background: rgba(16,185,129,0.15); color: #34d399; }
.status-kalah { background: rgba(239,68,68,0.15); color: #f87171; }

/* AI Narrative Section */
.intel-narrative-box {
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}
.intel-narrative-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #a78bfa;
}


/* ========================================================
   BOTTOM FLOATING ISLAND DOCK & FLOATING DRAWERS
   ======================================================== */

.map-bottom-controls {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(13, 15, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: calc(100% - 32px);
}

.map-bottom-controls:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.bottom-dock-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 2px;
}

.bottom-dock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.bottom-dock-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.bottom-dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.bottom-dock-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.bottom-dock-btn.active {
  background: #ffffff;
  color: #090a0e;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.35);
}

.bottom-dock-btn.active .bottom-badge-party {
  background: #090a0e;
  color: #ffffff;
  border-color: rgba(0, 0, 0, 0.3);
}

.bottom-dock-btn.active .bottom-badge-count {
  background: rgba(0, 0, 0, 0.12);
  color: #090a0e;
  border-color: rgba(0, 0, 0, 0.2);
}

.bottom-badge-party {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.bottom-badge-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-mute);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bottom-dock-btn-icon {
  padding: 6px 12px;
}

/* Floating Drawers (Slide Over Glass Panels for Intel & Filter) */
.floating-bottom-drawer {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  max-width: calc(100% - 32px);
  max-height: 75vh;
  z-index: 1050;
  background: rgba(13, 16, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Proportional Ideal Canvas for Intel AI Strategic War Room (~880px) */
#drawer-intel-ai.floating-bottom-drawer {
  width: min(880px, calc(100vw - 32px));
  max-width: min(880px, calc(100vw - 32px));
  max-height: 82vh;
}

@keyframes drawerSlideUp {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.drawer-header-left { flex: 1; }

.drawer-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.drawer-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.drawer-subtitle {
  font-size: 11px;
  color: var(--ink-mute);
  margin: 2px 0 0;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 18px;
}


/* ========================================================
   STRUCTURED AI DOSSIER & NARRATIVE CARDS
   ======================================================== */

.dossier-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.dossier-hero-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.dossier-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.dossier-hero-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
}

.dossier-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.dossier-meta-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink-mute);
}

.dossier-section-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.dossier-section-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
}

.dossier-sec-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dossier-sec-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #090a0e;
  background: #38bdf8;
  flex-shrink: 0;
}

.dossier-sec-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.dossier-sec-text {
  font-size: 11.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.dossier-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.dossier-sub-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.dossier-sub-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.dossier-sub-label.stronghold { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.dossier-sub-label.battleground { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.dossier-sub-label.growth { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

.dossier-alert-box {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 9px;
  padding: 10px 12px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.dossier-highlight-box {
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 9px;
  padding: 10px 12px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}


/* ========================================================
   PRE-2029 STRATEGIC ELECTORAL ROADMAP STYLES
   ======================================================== */

.pre2029-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: drawerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* KPI Banner */
.pre2029-hero-banner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.pre2029-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.pre2029-hero-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
}

.pre2029-hero-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 12px;
}

/* 3 Big KPI Grid */
.pre2029-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.pre2029-kpi-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 10px 8px;
  text-align: center;
}

.pre2029-kpi-label {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pre2029-kpi-val {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.pre2029-kpi-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 3px;
}

/* Timeline 4 Phases */
.pre2029-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  margin-left: 6px;
  padding-left: 18px;
  border-left: 2px solid rgba(168, 85, 247, 0.25);
}

.pre2029-phase-item {
  position: relative;
}

.pre2029-phase-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 10px #a855f7;
  border: 2px solid #090a0e;
}

.pre2029-phase-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pre2029-phase-period {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.pre2029-phase-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.pre2029-phase-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pre2029-phase-li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.pre2029-phase-check {
  color: #34d399;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Scenarios Table */
.pre2029-scenario-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 6px;
}

.pre2029-scenario-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.pre2029-scenario-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
}

.pre2029-scenario-seat {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.pre2029-scenario-desc {
  font-size: 10.5px;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* Pre-2029 Section Cards */
.pre2029-section-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.pre2029-sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pre2029-sec-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pre2029-sec-icon {
  font-size: 14px;
}

.pre2029-sec-title {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.pre2029-sec-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

/* Demographic Priority Grid */
.pre2029-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.pre2029-demo-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
}

.pre2029-demo-kel {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 2px;
}

.pre2029-demo-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
}

.pre2029-demo-reason {
  font-size: 9.5px;
  color: var(--ink-mute);
  margin-top: 3px;
  line-height: 1.35;
}

/* Tactical Note Box */
.pre2029-tactical-box {
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.pre2029-tactical-box b {
  color: #c084fc;
}

/* Flip-30 Operation Cards */
.pre2029-flip-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.pre2029-flip-sum-card {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}

.pre2029-flip-sum-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #f87171;
}

.pre2029-flip-sum-lbl {
  font-size: 9.5px;
  color: var(--ink-mute);
  margin-top: 1px;
}

.pre2029-flip-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}

.pre2029-flip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pre2029-flip-row:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  transform: translateX(3px);
}

.pre2029-flip-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pre2029-flip-badge-tps {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.pre2029-flip-sub {
  font-size: 10.5px;
  color: var(--ink-mute);
}

.pre2029-flip-action {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pre2029-flip-need {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.pre2029-flip-margin-lost {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #f87171;
}

/* Invalid Ballot Box */
.pre2029-invalid-card {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.pre2029-invalid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pre2029-invalid-title {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: #fbbf24;
}

.pre2029-invalid-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ========================================================
   WAR ROOM 2-COLUMN DASHBOARD GRID (FOR WIDE POPUP CANVAS)
   ======================================================== */
.pre2029-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.intel-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 960px) {
  .pre2029-dashboard-grid,
  .intel-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Robot AI Discussion Button (matching coral robot icon in uploaded image) */
.btn-discuss-robot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fb923c;
  cursor: pointer;
  transition: all 0.16s ease;
  margin-top: 6px;
  user-select: none;
}

.btn-discuss-robot:hover {
  background: rgba(249, 115, 22, 0.28);
  border-color: #f97316;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.45);
}

.btn-discuss-robot svg {
  color: #fb923c;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn-discuss-robot:hover svg {
  color: #ffedd5;
  transform: scale(1.12);
}

/* ========================================================
   AI STRATEGY DISCUSSION MODAL (HERMES WAR ROOM)
   ======================================================== */
.ai-discuss-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.ai-discuss-container {
  width: 780px;
  max-width: 100%;
  max-height: 88vh;
  background: rgba(13, 16, 24, 0.98);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 28px rgba(249, 115, 22, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-discuss-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 18px 12px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14) 0%, rgba(13, 16, 24, 0.6) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.ai-discuss-header-left {
  flex: 1;
}

.ai-discuss-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ai-discuss-robot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 6px;
  padding: 2px 7px;
}

.ai-discuss-scope-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
}

.ai-discuss-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.ai-discuss-context-box {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.ai-discuss-context-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fb923c;
  margin-bottom: 2px;
}

.ai-discuss-context-text {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
}

.ai-discuss-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.ai-discuss-msg {
  display: flex;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

.ai-discuss-msg.bot .ai-discuss-msg-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #f97316;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  max-width: 92%;
}

.ai-discuss-msg.user {
  justify-content: flex-end;
}

.ai-discuss-msg.user .ai-discuss-msg-bubble {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(56, 189, 248, 0.1) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #ffffff;
  max-width: 80%;
}

.ai-discuss-msg-bubble h3,
.ai-discuss-msg-bubble h4 {
  margin: 0 0 6px 0;
  color: #fff;
  font-size: 13px;
}
.ai-discuss-msg-bubble h3 { font-size: 14px; color: #fb923c; }
.ai-discuss-msg-bubble ul,
.ai-discuss-msg-bubble ol {
  margin: 4px 0 8px 18px;
  padding: 0;
}
.ai-discuss-msg-bubble li {
  margin-bottom: 4px;
}
.ai-discuss-msg-bubble hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 8px 0;
}

.ai-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.ai-robot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fb923c;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}

.ai-robot-badge .robot-icon,
.ai-robot-badge svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.ai-model-tag {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #fb923c;
  letter-spacing: 0.3px;
}

.ai-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.ai-source-badge.nine-router {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}
.ai-source-badge.local-engine {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ai-discuss-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.ai-discuss-prompt-chip {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ai-discuss-prompt-chip:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fb923c;
  transform: translateY(-1px);
}

.ai-discuss-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(13, 16, 24, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.ai-discuss-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 12px;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.ai-discuss-input-row input:focus {
  border-color: #f97316;
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   ADVANCED ELECTORAL INTELLIGENCE MODULES (BLIMBING WAR ROOM V2.5)
   1. Sainte-Laguë 10-Seat Dynamic Simulator
   2. Micro-Targeting Narasi & Canvassing Scripts
   3. Tactical GPS Canvassing Route Planner (Leaflet Polylines & HUD)
   4. Early Warning: Serangan Fajar Badges
   5. Caleg Transfer Matrix & Internal Cannibalism Audit
   6. Executive Dossier & Buku Saku Saksi PDF Print Engine
   ========================================================================== */

/* 1. Sainte-Laguë Simulator & Sub-mode Switcher */
.sim-mode-toggle-wrap {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
  gap: 4px;
}

.sim-mode-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--ink-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.sim-mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.sim-mode-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.sainte-seats-banner {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}

.sainte-banner-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sainte-chips-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.sainte-seat-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 5px 4px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sainte-seat-chip.kursi-10 {
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.sainte-seat-chip-num {
  font-size: 9px;
  color: var(--ink-mute, #64748b);
  display: block;
}

.sainte-seat-chip-party {
  font-size: 11px;
  font-weight: 700;
  display: block;
  margin: 1px 0;
}

.sainte-seat-chip-quotient {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  color: #94a3b8;
}

.sainte-sliders-container {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.sainte-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.sainte-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.sainte-slider-party-badge {
  width: 58px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sainte-slider-bar {
  flex: 1;
}

.sainte-slider-val {
  width: 65px;
  text-align: right;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: #fff;
}

.sainte-diff-pill {
  font-size: 9.5px;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
}
.sainte-diff-pill.up { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.sainte-diff-pill.down { color: #f87171; background: rgba(248, 113, 113, 0.12); }

/* 2. Micro-Targeting Narasi & Segmentasi Sosiodemografis */
.micro-header {
  margin-bottom: 12px;
}
.micro-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.micro-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.micro-cluster-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.micro-cluster-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.micro-cluster-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-block;
  margin-bottom: 4px;
}

.micro-cluster-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.micro-demog-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.micro-stat-badge {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.micro-issues-title {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  margin: 10px 0 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.micro-issues-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.micro-issues-list li {
  font-size: 11px;
  color: #94a3b8;
  padding: 2px 0 2px 14px;
  position: relative;
  line-height: 1.4;
}

.micro-issues-list li::before {
  content: "•";
  position: absolute;
  left: 3px;
  color: #38bdf8;
  font-weight: bold;
}

.micro-script-box {
  background: rgba(13, 16, 24, 0.8);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

.micro-script-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.micro-script-label {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.btn-copy-script {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 5px;
  font-size: 10.5px;
  padding: 3px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-copy-script:hover {
  background: rgba(52, 211, 153, 0.2);
  border-color: #34d399;
  color: #34d399;
}

.micro-script-text {
  font-size: 11.5px;
  color: #e2e8f0;
  line-height: 1.5;
  font-style: italic;
  margin: 0;
  white-space: pre-line;
}

/* 3. GPS Tactical Canvassing Route Summary Floating HUD */
.route-summary-float {
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(13, 17, 27, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 440px;
  max-width: 90vw;
  animation: fadeInDown 0.25s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.route-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.route-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseRoute 1.5s infinite;
}

@keyframes pulseRoute {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.route-title {
  font-family: var(--font-display, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #38bdf8;
}

.route-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.route-close-btn:hover { color: #fff; }

.route-stats-row {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.route-stat-item {
  text-align: center;
}

.route-stat-val {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.route-stat-lbl {
  font-size: 9.5px;
  color: #64748b;
  margin-top: 1px;
}

.route-sectors-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.route-sector-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.route-sector-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-1px);
}

.sector-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Route Waypoint Marker in Leaflet */
.route-waypoint-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #38bdf8;
  color: #38bdf8;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  transition: transform 0.2s ease;
}
.route-waypoint-marker:hover {
  transform: scale(1.25);
  z-index: 1000;
}
.route-waypoint-marker.utara { border-color: #38bdf8; color: #38bdf8; }
.route-waypoint-marker.tengah { border-color: #fbbf24; color: #fbbf24; }
.route-waypoint-marker.selatan { border-color: #f43f5e; color: #f43f5e; }

/* 4. Early Warning & Serangan Fajar Filter Badge */
.flt-tps-item.rawan-fajar {
  border-left: 3px solid #dc2626 !important;
  background: rgba(220, 38, 38, 0.06);
}

.fajar-risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.18);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

/* 5. Caleg Transfer Launcher & Modal */
.caleg-transfer-launch-box {
  margin-top: 14px;
  padding: 10px 0;
}

.btn-caleg-transfer-launch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.btn-caleg-transfer-launch:hover {
  border-color: #f97316;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(168, 85, 247, 0.22));
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.2);
}

.transfer-btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.transfer-btn-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.transfer-btn-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.transfer-btn-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.transfer-btn-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 1px;
}

.transfer-btn-arrow {
  font-size: 16px;
  color: #f97316;
  font-weight: bold;
}

/* Caleg Transfer Modal Container */
.caleg-transfer-container {
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  width: 100%;
  max-width: 880px;
  max-height: 88vh;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.caleg-transfer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.caleg-transfer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.caleg-transfer-title {
  font-family: var(--font-display, sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 4px 0 2px;
}

.caleg-transfer-desc {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 0;
}

.caleg-transfer-body {
  padding: 18px 22px;
  overflow-y: auto;
  max-height: calc(88vh - 80px);
}

.transfer-control-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.transfer-lbl {
  font-size: 11px;
  color: #94a3b8;
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.transfer-select {
  width: 100%;
  background: #131926;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
}

.transfer-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .transfer-grid-layout { grid-template-columns: 1fr; }
  .transfer-control-panel { grid-template-columns: 1fr; }
}

.transfer-sliders-card,
.cannibal-audit-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px;
}

.transfer-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.transfer-card-icon {
  font-size: 18px;
}

.transfer-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.transfer-card-sub {
  font-size: 10.5px;
  color: #64748b;
}

.transfer-slider-item {
  margin-bottom: 12px;
}

.transfer-slider-row-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.transfer-slider-label {
  font-size: 11px;
  color: #cbd5e1;
}

.transfer-slider-val {
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
}

.transfer-range {
  width: 100%;
  accent-color: #f97316;
  cursor: pointer;
}

.transfer-slider-hint {
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

.transfer-summary-pill {
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  color: #fb923c;
  text-align: center;
  margin-top: 12px;
}

.cannibal-summary-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cannibal-table-wrap {
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.cannibal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.cannibal-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 7px 8px;
  color: #94a3b8;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cannibal-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.cannibal-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.cannibal-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.cannibal-badge.high {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.cannibal-badge.synergy {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.caleg-transfer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-ai-discuss-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #ea580c, #f97316);
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.35);
  transition: all 0.2s ease;
}
.btn-ai-discuss-action:hover {
  background: linear-gradient(135deg, #f97316, #fb923c);
  transform: translateY(-1px);
}

/* 6. Executive Dossier & Buku Saku Saksi Print CSS */
.executive-dossier-print-container {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 15mm;
  }

  body * {
    visibility: hidden;
  }

  .executive-dossier-print-container,
  .executive-dossier-print-container * {
    visibility: visible;
  }

  .executive-dossier-print-container {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    color: #111827;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.4;
  }

  .dossier-print-header {
    border-bottom: 2px solid #1e293b;
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .dossier-print-title {
    font-size: 15pt;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
  }

  .dossier-print-meta {
    font-size: 8.5pt;
    color: #64748b;
  }

  .dossier-print-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .dossier-print-kpi-card {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 6px 8px;
    text-align: center;
  }

  .dossier-print-kpi-val {
    font-size: 12pt;
    font-weight: 800;
    color: #0f172a;
  }

  .dossier-print-kpi-lbl {
    font-size: 7.5pt;
    color: #64748b;
    text-transform: uppercase;
  }

  .dossier-print-section-title {
    font-size: 10.5pt;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 3px;
    margin: 12px 0 6px;
    text-transform: uppercase;
  }

  .dossier-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
    margin-bottom: 12px;
  }

  .dossier-print-table th {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 4px 6px;
    font-weight: 700;
    text-align: left;
  }

  .dossier-print-table td {
    border: 1px solid #cbd5e1;
    padding: 3px 6px;
  }

  .dossier-page-break {
    page-break-before: always;
  }

  .dossier-saksi-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .dossier-saksi-checklist li {
    padding: 4px 0;
    border-bottom: 1px dotted #cbd5e1;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 8.5pt;
  }

  .print-checkbox {
    width: 11px;
    height: 11px;
    border: 1px solid #334155;
    margin-top: 2px;
    flex-shrink: 0;
  }
}
