/* ===== MODERN SEBARAN ALUMNI CSS ===== */
/* Generated: UI/UX Modernization for CDC Tracer Study */

/* --- Base & Layout --- */
.sebaran-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f8fafc;
  min-height: 100vh;
}

/* --- Sticky Header --- */
.sebaran-header {
  position: static;
  top: auto;
  z-index: auto;
  background: #fff;
  padding: 14px 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
}

.sebaran-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sebaran-header-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.sebaran-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.sebaran-breadcrumb a {
  color: #22c55e;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.sebaran-breadcrumb a:hover {
  color: #16a34a;
  text-decoration: underline;
}

.sebaran-breadcrumb .sep {
  color: #9ca3af;
}

/* --- Floating Back Button --- */
.btn-back-national {
  position: fixed;
  top: 76px;
  left: 24px;
  z-index: 500;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
}

.btn-back-national:hover {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #16a34a;
}

.btn-back-national.visible {
  display: inline-flex;
}

/* --- Filter Bar --- */
.sebaran-filter-bar {
  background: #fff;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sebaran-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sebaran-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
}

.sebaran-filter-select {
  min-width: 260px;
}

.sebaran-filter-select .select2-selection {
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  height: auto !important;
  font-size: 13px;
}

.sebaran-filter-select .select2-selection:hover {
  border-color: #22c55e !important;
}

.btn-reset-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-filter:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

/* --- Summary Cards --- */
.summary-section {
  padding: 20px 24px 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1400px;
}

.summary-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid #f1f5f9;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: #f0fdf4;
  color: #22c55e;
}

.summary-icon.blue {
  background: #eff6ff;
  color: #3b82f6;
}

.summary-icon.orange {
  background: #fff7ed;
  color: #f97316;
}

.summary-icon.purple {
  background: #faf5ff;
  color: #a855f7;
}

.summary-body {
  flex: 1;
  min-width: 0;
}

.summary-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 28px;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.2;
  margin-bottom: 6px;
}

.summary-trend {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.summary-trend.up {
  color: #22c55e;
}

.summary-trend.down {
  color: #ef4444;
}

.summary-trend.neutral {
  color: #6b7280;
}

.summary-sparkline {
  margin-top: 8px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.summary-sparkline-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  transition: width 1s ease;
}

/* --- Dashboard Layout --- */
.sebaran-dashboard {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
  padding: 20px 24px;
  align-items: stretch;
  max-width: 1600px;
}

/* --- Map Panel --- */
.map-panel-wrapper {
  position: relative;
}

.map-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  overflow: hidden;
  border: 1px solid #f1f5f9;
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
  flex-wrap: wrap;
}

.map-breadcrumb-info {
  font-size: 13px;
  color: #6b7280;
}

.map-breadcrumb-info strong {
  color: #1f2937;
  font-size: 15px;
  display: block;
  margin-top: 2px;
}

#map {
  height: 520px;
  border-radius: 0 0 14px 14px;
  background: #eef7f1;
}

/* Leaflet Overrides */
.leaflet-interactive {
  transition: fill-opacity 0.3s, stroke-width 0.3s, stroke 0.3s;
  cursor: pointer;
}

.leaflet-interactive:hover {
  stroke: #1f2937 !important;
  stroke-width: 2px !important;
  fill-opacity: 0.85 !important;
}

/* Marker Cluster */
.marker-cluster {
  background: #22c55e !important;
  border-radius: 50% !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(34,197,94,0.35) !important;
  border: 2px solid #fff !important;
}

.marker-cluster div {
  background: transparent !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 14px !important;
}

/* Area Labels */
.area-count-label {
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: auto;
  cursor: pointer;
}

.area-count-label .label-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15,23,42,0.12);
  color: #0f172a;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
  box-shadow: 0 3px 10px rgba(15,23,42,0.1);
  white-space: nowrap;
}

/* Popup Modern */
.alumni-popup-card {
  min-width: 220px;
  font-family: inherit;
}

.alumni-popup-title {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 4px;
  color: #1f2937;
}

.alumni-popup-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
}

.alumni-popup-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #374151;
}

.alumni-popup-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.alumni-popup-actions {
  display: flex;
  gap: 8px;
}

.alumni-popup-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.alumni-popup-actions .btn-primary {
  background: #22c55e;
  color: #fff;
}

.alumni-popup-actions .btn-primary:hover {
  background: #16a34a;
}

.alumni-popup-actions .btn-outline {
  background: #fff;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.alumni-popup-actions .btn-outline:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Leaflet Popup Style Override */
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: 16px !important;
  font-family: inherit !important;
  min-width: 200px !important;
}

.leaflet-popup-tip {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

/* --- Loading State --- */
.map-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 700;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  border-radius: 14px;
}

.map-loading-overlay.active {
  display: flex;
}

.map-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 32px 40px;
  border: 1px solid rgba(45,140,84,0.12);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(31,41,55,0.12);
  text-align: center;
}

.map-loading-icon {
  font-size: 32px;
}

.map-loading-text {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
}

.map-loading-text small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 400;
}

.map-loading-bar {
  width: 200px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.map-loading-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

/* --- Ranking Panel --- */
.ranking-panel-wrapper {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  max-height: 580px;
}

.ranking-panel-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.ranking-panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 12px;
}

.ranking-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
}

.ranking-tab {
  flex: 1;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  background: transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ranking-tab.active {
  background: #fff;
  color: #22c55e;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ranking-search {
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.ranking-search-input {
  width: 100%;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 14px;
  color: #1f2937;
  font: inherit;
  font-size: 13px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ranking-search-input:focus {
  border-color: rgba(34,197,94,0.45);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.08);
}

.ranking-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  background: #fafafa;
}

.ranking-item:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(34,197,94,0.06);
}

.ranking-item.highlighted {
  background: #f0fdf4;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.1);
}

.ranking-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #4b5563;
  flex-shrink: 0;
}

.ranking-medal {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.ranking-item[data-rank="1"] .ranking-number {
  background: #fef3c7;
  color: #d97706;
}

.ranking-item[data-rank="2"] .ranking-number {
  background: #e5e7eb;
  color: #6b7280;
}

.ranking-item[data-rank="3"] .ranking-number {
  background: #ffedd5;
  color: #c2410c;
}

.ranking-name {
  font-weight: 700;
  color: #1f2937;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-subtitle {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-total {
  font-weight: 800;
  color: #22c55e;
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.ranking-progress {
  grid-column: 1 / -1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.ranking-progress-bar {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.ranking-empty {
  padding: 32px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

.ranking-panel-footer {
  padding: 12px 18px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 8px;
}

.ranking-panel-footer .btn {
  flex: 1;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}

.ranking-panel-footer .btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* --- Map Legend --- */
.map-legend-control {
  background: rgba(255,255,255,0.96) !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(31,41,55,0.14) !important;
  color: #374151 !important;
  line-height: 1.4 !important;
  font-size: 12px !important;
  border: 1px solid #f1f5f9 !important;
}

.map-legend-control strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #1f2937;
}

.map-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  white-space: nowrap;
}

.map-legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(31,41,55,0.12);
  flex-shrink: 0;
}

/* --- Modal Modern --- */
#exampleModal .modal-dialog {
  max-width: min(1140px, 94vw);
  width: 94vw;
  margin: 24px auto;
}

#exampleModal .modal-content {
  border-radius: 14px;
  overflow: hidden;
  border: none;
  box-shadow: 0 24px 60px rgba(0,0,0,0.16);
}

#exampleModal .modal-header {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#exampleModal .modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header .close {
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #6b7280;
  transition: all 0.2s;
}

.modal-header .close:hover {
  background: #e5e7eb;
  color: #374151;
}

.modal-filter-bar {
  padding: 12px 24px;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.modal-filter-bar .form-control {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  min-width: 160px;
}

.modal-filter-bar .form-control:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.08);
  outline: none;
}

#exampleModal .modal-body {
  padding: 16px 24px;
  overflow-x: hidden;
}

#exampleModal .modal-footer {
  padding: 12px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-footer .btn-export-group {
  display: flex;
  gap: 8px;
}

.modal-footer .btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
}

.modal-footer .btn:hover {
  background: #f9fafb;
}

.modal-footer .btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.modal-footer .btn-danger:hover {
  background: #dc2626;
}

/* DataTables Styling */
#table_satuan {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

#table_satuan thead th {
  background: #f8fafc;
  padding: 10px 12px;
  font-weight: 700;
  color: #4b5563;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

#table_satuan tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  vertical-align: top;
}

#table_satuan tbody tr:hover td {
  background: #f8fafc;
}

#table_satuan td.child {
  background: #fafafa;
  padding: 12px 16px;
}

.dataTables_info {
  font-size: 12px;
  color: #6b7280;
}

.dataTables_paginate .paginate_button {
  padding: 6px 12px !important;
  border-radius: 6px !important;
  border: 1px solid #e5e7eb !important;
  margin: 0 2px !important;
  font-size: 13px !important;
}

.dataTables_paginate .paginate_button.current {
  background: #22c55e !important;
  color: #fff !important;
  border-color: #22c55e !important;
}

/* --- Empty State --- */
.map-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #9ca3af;
}

.map-empty-state.visible {
  display: flex;
}

.map-empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.map-empty-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: #4b5563;
  margin: 0 0 8px;
}

.map-empty-state p {
  font-size: 13px;
  margin: 0 0 16px;
}

.map-empty-state .btn {
  padding: 10px 20px;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.map-empty-state .btn:hover {
  background: #16a34a;
}

/* --- Mobile Responsive --- */
@media (max-width: 1200px) {
  .sebaran-dashboard {
    grid-template-columns: 1fr 360px;
  }
  .ranking-panel-wrapper {
    max-height: 520px;
  }
}

@media (max-width: 991px) {
  .sebaran-dashboard {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ranking-panel-wrapper {
    max-height: none;
  }
  
  #map {
    height: 420px;
  }
  
  .btn-back-national {
    top: 68px;
    left: 16px;
    padding: 8px 14px;
    font-size: 12px;
  }
  
  .sebaran-header {
    padding: 12px 16px;
  }
  
  .sebaran-header-title {
    font-size: 16px;
  }
  
  .sebaran-filter-bar {
    padding: 12px 16px;
  }
  
  .sebaran-filter-select {
    min-width: 200px;
  }
  
  .summary-section {
    padding: 16px 16px 0;
  }
  
  .sebaran-dashboard {
    padding: 16px;
  }
  
  .summary-value {
    font-size: 22px;
  }
  
  #exampleModal .modal-dialog {
    margin: 12px auto;
    width: calc(100vw - 24px);
    max-width: none;
  }
}

@media (max-width: 768px) {
  .sebaran-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .sebaran-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .sebaran-filter-group {
    width: 100%;
  }
  
  .sebaran-filter-select {
    width: 100%;
    min-width: auto;
  }
  
  .sebaran-filter-select .select2 {
    width: 100% !important;
  }
  
  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .summary-card {
    padding: 14px;
    gap: 10px;
  }
  
  .summary-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .summary-value {
    font-size: 20px;
  }
  
  .summary-label {
    font-size: 10px;
  }
  
  #map {
    height: 360px;
  }
  
  .ranking-panel-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 38vh;
    border-radius: 20px 20px 0 0;
    z-index: 800;
    transform: translateY(0);
    transition: transform 0.3s ease;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.1);
  }
  
  .ranking-panel-wrapper.collapsed {
    transform: translateY(calc(100% - 56px));
  }
  
  .ranking-panel-handle {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
  }
  
  .ranking-panel-handle::before {
    content: '';
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
  }
  
  .btn-back-national {
    position: fixed;
    top: auto;
    bottom: calc(38vh + 12px);
    left: 12px;
    z-index: 700;
  }
  
  .map-panel-wrapper {
    margin-bottom: 12px;
  }
  
  .sebaran-dashboard {
    padding: 12px;
    display: block;
  }
  
  .modal-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modal-filter-bar .form-control {
    width: 100%;
  }
  
  #exampleModal .modal-header,
  #exampleModal .modal-body,
  #exampleModal .modal-footer {
    padding: 12px 16px;
  }
  
  .map-toolbar {
    padding: 10px 14px;
  }
  
  .map-breadcrumb-info strong {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .sebaran-header-title {
    font-size: 14px;
  }
  
  .summary-value {
    font-size: 24px;
  }
  
  .ranking-panel-title {
    font-size: 14px;
  }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes countUpFlash {
  0% { color: #22c55e; }
  100% { color: #1f2937; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

.animate-countup {
  animation: countUpFlash 0.6s ease;
}

/* Smooth transitions for all interactive elements */
.ranking-item,
.summary-card,
.btn,
.leaflet-interactive,
.ranking-tab {
  will-change: transform;
}

/* Scrollbar styling for ranking list */
.ranking-list::-webkit-scrollbar {
  width: 6px;
}

.ranking-list::-webkit-scrollbar-track {
  background: transparent;
}

.ranking-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.ranking-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* --- Template integration refinements --- */
.sebaran-wrapper {
  width: 90%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 120px 0 96px;
  background: transparent;
  min-height: auto;
}

.sebaran-header {
  position: static;
  z-index: auto;
  padding: 0 0 16px;
  background: transparent;
  box-shadow: none;
  border-bottom: 0;
}

.sebaran-header-title {
  font-size: 24px;
  color: #1f2937;
}

.sebaran-filter-bar {
  border: 1px solid rgba(31, 41, 55, 0.08);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.06);
  margin-bottom: 16px;
  padding: 14px 16px;
}

.summary-section {
  padding: 0;
  margin-bottom: 16px;
}

.summary-grid,
.sebaran-dashboard {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.summary-card,
.map-panel,
.ranking-panel-wrapper {
  border-radius: 8px;
}

.sebaran-dashboard {
  grid-template-columns: minmax(0, 1fr) 360px;
  padding: 0;
}

#map {
  height: 540px;
}

.btn-back-national {
  top: 112px;
  left: 5%;
}

.alumni-popup-hint {
  margin-top: 10px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .sebaran-dashboard {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}

@media (max-width: 991px) {
  .sebaran-wrapper {
    width: calc(100% - 32px);
    padding-top: 108px;
    padding-bottom: 72px;
  }

  .sebaran-dashboard {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #map {
    height: 440px;
  }
}

@media (max-width: 768px) {
  .sebaran-wrapper {
    width: calc(100% - 24px);
    padding-top: 96px;
    padding-bottom: 48px;
  }

  .sebaran-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .sebaran-header-title {
    font-size: 20px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  #map {
    height: 380px;
  }

  .ranking-panel-wrapper {
    position: static;
    width: 100%;
    height: auto;
    max-height: 360px;
    border-radius: 8px;
    transform: none !important;
    z-index: auto;
    box-shadow: 0 10px 28px rgba(31, 41, 55, 0.06);
  }

  .ranking-panel-handle {
    display: none;
  }

  .btn-back-national {
    position: static;
    margin: 0 0 12px;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
  }
}

/* Province total labels */
.area-count-label .label-inner {
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #064e3b;
  font-size: 12px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.16);
}

/* Hover tooltip for alumni totals */
.sebaran-area-tooltip {
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

.area-hover-tooltip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 8px 10px;
  color: #111827;
  line-height: 1.2;
}

.area-hover-tooltip strong {
  font-size: 12px;
  font-weight: 800;
}

.area-hover-tooltip span {
  color: #047857;
  font-size: 12px;
  font-weight: 800;
}

/* Clean loading spinner */
.map-loading-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 10px;
  border: 3px solid rgba(34, 197, 94, 0.18);
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: sebaran-spin 0.8s linear infinite;
  font-size: 0;
  line-height: 0;
}

@keyframes sebaran-spin {
  to { transform: rotate(360deg); }
}

/* Summary card icons */
.summary-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Softer familiar summary icons */
.summary-icon {
  border-radius: 50%;
}

.summary-icon svg {
  width: 23px;
  height: 23px;
}
