/* ==========================================================================
   PKB CALEG & INKAMBEN MOBILE - STYLESHEET
   Mobile-First, Zero Horizontal Scroll, Ultra Modern Glassmorphism
   ========================================================================== */

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #10b981;
  --primary-soft: rgba(16, 185, 129, 0.14);
  --primary-glow: rgba(16, 185, 129, 0.35);

  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-soft: rgba(59, 130, 246, 0.15);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.15);

  /* Status Pembinaan Colors */
  --status-kenal: #64748b;
  --status-kenal-bg: rgba(100, 116, 139, 0.15);
  --status-dibina: #3b82f6;
  --status-dibina-bg: rgba(59, 130, 246, 0.15);
  --status-dikunci: #f59e0b;
  --status-dikunci-bg: rgba(245, 158, 11, 0.18);
  --status-dijaga: #10b981;
  --status-dijaga-bg: rgba(16, 185, 129, 0.18);

  /* Dark Theme as Default */
  --bg-main: #0a0f1d;
  --bg-card: #131b2e;
  --bg-card-elevated: #1a253f;
  --bg-glass: rgba(15, 23, 42, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --input-bg: #0d1424;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px var(--primary-glow);
}

[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-elevated: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.90);
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --input-bg: #f8fafc;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 4px 20px rgba(5, 150, 105, 0.2);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Outer Wrapper to Constrain to Phone Form Factor */
.app-viewport {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-main);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Top App Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: calc(10px + var(--safe-top)) 16px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.header-info {
  min-width: 0;
}

.candidate-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.candidate-badge-dapil {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-button:active {
  transform: scale(0.92);
  background: var(--primary-soft);
}

/* Admin Switcher Bar (Visible only when admin) */
.admin-switcher-bar {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(59, 130, 246, 0.15));
  border-bottom: 1px solid var(--accent-soft);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.admin-badge {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-select-caleg {
  flex: 1;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

/* Main Content Area */
.app-content {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(88px + var(--safe-bottom));
  overflow-y: auto;
  overflow-x: hidden;
}

.tab-view {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 60;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 6px 8px calc(8px + var(--safe-bottom)) 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 2px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: -0.2px;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

.nav-item.active {
  color: var(--primary-light);
}

.nav-item.active svg {
  transform: translateY(-2px);
  stroke: var(--primary-light);
}

.nav-item:active {
  transform: scale(0.92);
}

/* Card Components */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-light);
}

/* Candidate Hero Card (Beranda) */
.hero-candidate-card {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.hero-glow-blob {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.hero-candidate-flex {
  display: flex;
  align-items: center;
  gap: 14px;
}

.candidate-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.candidate-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
  background: #1e293b;
}

.candidate-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #047857);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  border: 3px solid var(--primary-light);
}

.candidate-info-box {
  min-width: 0;
  flex: 1;
}

.hero-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.hero-candidate-name {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-candidate-sub {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 2px;
}

/* Metric KPI Grids */
.metric-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

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

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.metric-sub {
  font-size: 10px;
  color: var(--text-dim);
}

/* Status Pembinaan Funnel / Pipeline */
.status-funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.funnel-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.funnel-step:active {
  transform: scale(0.95);
}

.funnel-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.funnel-step.step-kenal::before { background: var(--status-kenal); }
.funnel-step.step-dibina::before { background: var(--status-dibina); }
.funnel-step.step-dikunci::before { background: var(--status-dikunci); }
.funnel-step.step-dijaga::before { background: var(--status-dijaga); }

.funnel-val {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.funnel-step.step-kenal .funnel-val { color: var(--status-kenal); }
.funnel-step.step-dibina .funnel-val { color: var(--status-dibina); }
.funnel-step.step-dikunci .funnel-val { color: var(--status-dikunci); }
.funnel-step.step-dijaga .funnel-val { color: var(--status-dijaga); }

.funnel-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: capitalize;
  cursor: pointer;
  border: 1px solid transparent;
}

.status-badge.Kenal {
  background: var(--status-kenal-bg);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.3);
}

.status-badge.Dibina {
  background: var(--status-dibina-bg);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.status-badge.Dikunci {
  background: var(--status-dikunci-bg);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.status-badge.Dijaga, .status-badge.Dieksekusi {
  background: var(--status-dijaga-bg);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Member List & Quick Status Cycler */
.search-filter-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--primary-light);
}

.filter-pills-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-pills-scroll::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Member Card */
.member-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.member-item-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.member-item-card:active {
  background: var(--bg-card-elevated);
  transform: scale(0.99);
}

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

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-meta {
  min-width: 0;
}

.member-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-loc {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.status-cycle-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

/* Roadmap List Items */
.roadmap-item {
  position: relative;
  padding-left: 24px;
  margin-bottom: 14px;
}

.roadmap-item::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: -14px;
  width: 2px;
  background: var(--border-color);
}

.roadmap-item:last-child::before {
  display: none;
}

.roadmap-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid var(--bg-main);
  box-shadow: 0 0 8px var(--primary-glow);
}

.roadmap-dot.status-rencana { background: var(--text-dim); }
.roadmap-dot.status-berjalan { background: var(--accent); }
.roadmap-dot.status-selesai { background: var(--primary-light); }

.roadmap-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.roadmap-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.roadmap-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.roadmap-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-top: 6px;
}

/* Modal / Logistik Items */
.logistik-summary-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}

.logistik-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logistik-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.logistik-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.logistik-amount {
  text-align: right;
}

.logistik-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.badge-tersedia {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.badge-kebutuhan {
  font-size: 10px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

/* Tim Pemenangan Items */
.tim-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tim-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--info), #1d4ed8);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tim-meta {
  min-width: 0;
  flex: 1;
}

.tim-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tim-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-light);
}

.tim-area {
  font-size: 10px;
  color: var(--text-dim);
}

.tim-target-badge {
  text-align: right;
  flex-shrink: 0;
}

.tim-target-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
}

.tim-target-lbl {
  font-size: 10px;
  color: var(--text-muted);
}

/* Floating Action Button (FAB) */
.fab-add {
  position: fixed;
  bottom: calc(76px + var(--safe-bottom));
  right: calc(50% - 220px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--primary-glow);
  z-index: 55;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 480px) {
  .fab-add {
    right: 18px;
  }
}

.fab-add:active {
  transform: scale(0.9);
}

/* Modals & Bottom Sheets */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  background: var(--bg-card);
  width: 100%;
  max-width: 480px;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border-top: 1px solid var(--border-color);
  padding: 20px 18px calc(24px + var(--safe-bottom)) 18px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-color);
  margin: 0 auto 16px auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary-light);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Quick Status Picker Popup */
.status-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.status-pick-option {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card-elevated);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.status-pick-option:active {
  transform: scale(0.96);
}

.status-pick-option.selected {
  border-color: var(--primary-light);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #0f172a;
  color: #fff;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
  text-align: center;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-dim);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 12px;
}

/* ==========================================================================
   RENSTRA (RENCANA STRATEGIS) STYLES
   ========================================================================== */

/* Subnav pill scroller */
.renstra-subnav-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 8px;
}

.renstra-subnav-scroll::-webkit-scrollbar {
  display: none;
}

.renstra-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.renstra-pill:hover, .renstra-pill.active {
  background: var(--primary-light);
  color: #042416;
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.renstra-pill .pill-badge {
  background: rgba(0,0,0,0.15);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
}

.renstra-pill.active .pill-badge {
  background: #042416;
  color: #fff;
}

/* Renstra Banner / Header */
.renstra-header-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 95, 70, 0.2) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.renstra-header-banner h2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.renstra-header-banner p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* SWOT Card */
.swot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  position: relative;
  transition: border-color 0.2s;
}

.swot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.swot-badge.kekuatan {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.swot-badge.kelemahan {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.swot-badge.peluang {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.swot-badge.ancaman {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.swot-content {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 8px;
}

.swot-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  font-size: 11px;
}

.swot-action {
  color: var(--text-muted);
  line-height: 1.4;
}

.swot-action strong {
  color: var(--primary-light);
}

/* Visi & Misi Card */
.visimisi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.visimisi-card.visi {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-card) 100%);
}

.visimisi-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.visimisi-tag.visi {
  background: #10b981;
  color: #042416;
}

.visimisi-tag.misi {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

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

/* Program Card */
.program-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}

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

.program-kategori-chip {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-light);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
}

.program-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 6px;
}

.program-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}

.program-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.program-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* KPI Card */
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.kpi-indikator {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.kpi-program-ref {
  font-size: 11px;
  color: var(--primary-light);
  margin-bottom: 10px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
  text-align: center;
}

.kpi-year-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
}

.kpi-year-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.kpi-year-val {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-light);
}

.kpi-kondisi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  background: rgba(255,255,255,0.03);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* Anggaran Card */
.anggaran-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}

.anggaran-total-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.anggaran-total-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.anggaran-total-val {
  font-size: 18px;
  font-weight: 800;
  color: #34d399;
}

.anggaran-item-amount {
  font-size: 14px;
  font-weight: 800;
  color: #34d399;
  text-align: right;
}

/* Agenda Card */
.agenda-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}

.agenda-month-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.agenda-month-tag {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

/* ==========================================================================
   APP MENU GRID LAUNCHER (HOME SCREEN - 9 MENUS)
   ========================================================================== */
.app-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.app-menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.app-menu-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.app-menu-card:active {
  transform: scale(0.95);
}

.app-menu-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 22px;
  color: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.app-menu-card:hover .app-menu-icon {
  transform: scale(1.08);
}

/* Icon Gradient Variants */
.icon-grad-dashboard {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.icon-grad-anggota {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.icon-grad-struktur {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.icon-grad-bantuan {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.icon-grad-pemenangan {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.icon-grad-hasilsuara {
  background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
}

.icon-grad-agenda {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.icon-grad-mediacenter {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}

.icon-grad-renstra {
  background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.app-menu-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.app-menu-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* Back navigation subheader */
.view-header-back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-light);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-home:active {
  transform: scale(0.95);
}

.view-sub-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

/* ==========================================================================
   STRUKTUR ORGANISASI STYLES
   ========================================================================== */
.struktur-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.struktur-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-elevated), var(--border-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--primary-light);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.struktur-info {
  flex: 1;
  min-width: 0;
}

.struktur-nama {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.struktur-jabatan {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 3px;
}

.struktur-wilayah {
  font-size: 10px;
  color: var(--text-dim);
}

.struktur-badge-level {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.struktur-badge-level.dpc {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.struktur-badge-level.dpac {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.struktur-badge-level.dprt {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   BANTUAN & ASPIRASI STYLES
   ========================================================================== */
.bantuan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.bantuan-badge-status {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
}

.bantuan-badge-status.diajukan {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.bantuan-badge-status.diverifikasi {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.bantuan-badge-status.selesai {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* ==========================================================================
   HASIL SUARA STYLES
   ========================================================================== */
.hasilsuara-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.hasilsuara-row-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.hasilsuara-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-elevated);
  margin: 6px 0;
  overflow: hidden;
}

.hasilsuara-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #10b981, #059669);
}

/* ==========================================================================
   MEDIA CENTER STYLES
   ========================================================================== */
.mcs-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.mcs-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.mcs-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.mcs-social-btn.ig:hover { background: #e1306c; color: #fff; border-color: #e1306c; }
.mcs-social-btn.tiktok:hover { background: #000; color: #fff; border-color: #333; }
.mcs-social-btn.fb:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.mcs-social-btn.x:hover { background: #000; color: #fff; border-color: #333; }

/* Profil Menu Card */
.profil-menu-list {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
}

.profil-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.2s;
}

.profil-menu-item:last-child {
  border-bottom: none;
}

.profil-menu-item:active {
  background: var(--bg-elevated);
}

