@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;
  --primary-900: #064e3b;
  --primary-950: #022c22;

  --dark-bg: #0b1320;
  --dark-card: #111d30;
  --dark-card-border: #1e304d;
  --dark-sidebar: #080f1a;

  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-border: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 35px -5px rgba(6, 78, 59, 0.15), 0 10px 15px -6px rgba(0, 0, 0, 0.08);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

input, button, select, textarea {
  font-family: inherit;
}

body {
  font-family: var(--font-main);
  background-color: #f1f5f9;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: 275px;
  background: #ffffff;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  border-right: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.brand-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 17px;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

.brand-text p {
  font-size: 10.5px;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 2px 0 0 0;
  font-weight: 700;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

/* Custom scrollbar for sidebar-content */
.sidebar-content::-webkit-scrollbar {
  width: 5px;
}
.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-content::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 14px 12px 6px 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #475569;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 3px;
}

.nav-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: #64748b;
  transition: color 0.2s ease;
}

.nav-link:hover {
  background: #f8fafc;
  color: #059669;
}

.nav-link:hover i {
  color: #059669;
}

.nav-link.active {
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
  border-left: 3px solid #10b981;
}

.nav-link.active i {
  color: #059669;
}

.nav-link .badge-counter {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.user-meta h4 {
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.user-meta p {
  font-size: 11px;
  color: #64748b;
  margin: 2px 0 0 0;
  font-weight: 500;
}

/* Main Area */
.app-main {
  flex: 1;
  margin-left: 275px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-navbar {
  height: 68px;
  background: #ffffff;
  border-bottom: 1px solid var(--surface-border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.page-title-wrap h2 {
  font-size: 20px;
  color: #0f172a;
  margin: 0;
}

.page-title-wrap p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.content-body {
  padding: 28px;
  flex: 1;
}

/* Cards & Surfaces */
.sigap-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.sigap-card.card-hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header-clean {
  padding: 20px 24px;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body-clean {
  padding: 24px;
}

/* Stat Widgets */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.emerald::before { background: #10b981; }
.stat-card.rose::before { background: #ef4444; }
.stat-card.dark::before { background: #18181b; }
.stat-card.amber::before { background: #f59e0b; }
.stat-card.blue::before { background: #3b82f6; }

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card.emerald .stat-icon { background: #ecfdf5; color: #059669; }
.stat-card.rose .stat-icon { background: #fef2f2; color: #dc2626; }
.stat-card.dark .stat-icon { background: #f4f4f5; color: #27272a; }
.stat-card.amber .stat-icon { background: #fffbeb; color: #d97706; }
.stat-card.blue .stat-icon { background: #eff6ff; color: #2563eb; }

.stat-value {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: #0f172a;
  line-height: 1.1;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* Badges */
.sigap-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.badge-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-orange { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.badge-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.badge-purple { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.badge-dark { background: #27272a; color: #ffffff; border: 1px solid #3f3f46; }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Buttons */
.btn-sigap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-sigap-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.btn-sigap-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-sigap-secondary {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.btn-sigap-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-sigap-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
}

.btn-sigap-danger:hover {
  background: #b91c1c;
}

.btn-sigap-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Form inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: block;
  letter-spacing: -0.01em;
}

.form-control-sigap {
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  font-size: 13.5px;
  color: #0f172a;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-sizing: border-box;
}

.form-control-sigap:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-control-sigap::placeholder {
  color: #94a3b8;
  font-family: var(--font-main);
  font-weight: 400;
  letter-spacing: normal;
}

select.form-control-sigap {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-right: 36px;
}

/* Tables */
.sigap-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.sigap-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.sigap-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
  color: #1e293b;
  vertical-align: middle;
}

.sigap-table tr:hover td {
  background: #f8fafc;
}

/* GIS Map Container */
.gis-map-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--surface-border);
}

#sigap-gis-map {
  width: 100%;
  height: 100%;
}

.gis-floating-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  max-width: 320px;
}

.gis-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  margin-bottom: 8px;
  font-weight: 500;
}

.gis-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dot-green { background: #10b981; }
.dot-red { background: #ef4444; }
.dot-black { background: #18181b; }
.dot-amber { background: #f59e0b; }

/* Custom Leaflet Marker Pulse & GIS Point Styling */
.sigap-marker-wrapper {
  background: transparent !important;
  border: none !important;
}
/* ========================================================
   HIGH-VISIBILITY SIGAP TREE PIN (POINTER PIN)
   ======================================================== */
.sigap-pin-wrapper {
  background: transparent !important;
  border: none !important;
}

.sigap-tree-pin {
  width: 34px;
  height: 42px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.45));
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  user-select: none;
}

.sigap-tree-pin:hover {
  transform: scale(1.25) translateY(-4px);
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.6));
  z-index: 1000 !important;
}

.sigap-tree-pin .pin-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pin-color, #10b981);
  border: 2.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 15px;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sigap-tree-pin .pin-tip {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #ffffff;
  margin-top: -1.5px;
}

/* Pulsing effect for critical/high-risk trees */
.sigap-tree-pin.pin-danger .pin-badge,
.sigap-tree-pin.pin-perlu_tindakan .pin-badge {
  animation: pinPulseDanger 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pinPulseDanger {
  0%, 100% {
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.4), 0 0 0 0 rgba(239, 68, 68, 0.8);
  }
  50% {
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.4), 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* Base sigap-tree-marker styling with guaranteed high visibility */
.sigap-tree-marker {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border: 2.5px solid #ffffff;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  user-select: none;
  z-index: 100;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sigap-tree-marker i {
  display: inline-block !important;
  font-size: 14px !important;
}

/* Base Marker Palette */
.sigap-tree-marker.marker-baik,
.sigap-tree-marker.marker-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.sigap-tree-marker.marker-perlu_tindakan,
.sigap-tree-marker.marker-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.sigap-tree-marker.marker-ditebang,
.sigap-tree-marker.marker-black {
  background: linear-gradient(135deg, #27272a 0%, #09090b 100%);
}

.sigap-tree-marker.marker-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.sigap-tree-marker:hover {
  transform: translate(-50%, -50%) scale(1.3) !important;
  z-index: 9999 !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.95), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Forced dots mode if user explicitly chooses 'Titik Mikro' */
.map-mode-forced-dots .sigap-tree-marker {
  width: 14px !important;
  height: 14px !important;
  font-size: 0px !important;
}
.map-mode-forced-dots .sigap-tree-marker i {
  display: none !important;
}
.map-mode-forced-dots .sigap-tree-pin {
  transform: scale(0.65);
}

/* Tooltip Khusus GIS Map */
.leaflet-tooltip.sigap-gis-tooltip {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(6px) !important;
  font-family: inherit !important;
}
.leaflet-tooltip.sigap-gis-tooltip::before {
  border-top-color: rgba(15, 23, 42, 0.92) !important;
}

/* ========================================================
   COORDINATE PICKER MAP STYLING (SURVEYOR INPUT POHON)
   ======================================================== */

.sigap-target-wrapper {
  background: transparent !important;
  border: none !important;
}

.sigap-target-pin {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.4), 0 4px 12px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: grab;
  transition: width 0.2s ease, height 0.2s ease, transform 0.15s ease;
  z-index: 1000 !important;
}

.sigap-target-pin:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.15);
}

/* Target Pin scaling based on zoom */
.map-zoom-micro .sigap-target-pin {
  width: 10px !important;
  height: 10px !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.6) !important;
  font-size: 0px !important;
}
.map-zoom-micro .sigap-target-pin i {
  display: none !important;
}

.map-zoom-small .sigap-target-pin {
  width: 14px !important;
  height: 14px !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5) !important;
  font-size: 0px !important;
}
.map-zoom-small .sigap-target-pin i {
  display: none !important;
}

.map-zoom-medium .sigap-target-pin {
  width: 22px !important;
  height: 22px !important;
  border: 2.5px solid #ffffff !important;
  font-size: 10px !important;
}

.map-zoom-large .sigap-target-pin {
  width: 32px !important;
  height: 32px !important;
  border: 3px solid #ffffff !important;
  font-size: 14px !important;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.35), 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

/* ========================================================
   ROAD CORRIDOR LABELS (NAMA RUAS JALAN SAAT ZOOM OUT)
   ======================================================== */

.sigap-road-badge-wrapper {
  background: transparent !important;
  border: none !important;
}

.sigap-road-corridor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: all 0.2s ease;
  pointer-events: auto;
  user-select: none;
  z-index: 400;
}

.sigap-road-corridor-badge:hover {
  background: #10b981;
  border-color: #ffffff;
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
}

.sigap-road-corridor-badge .badge-count {
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 9.5px;
  font-weight: 700;
}



/* Print view */
@media print {
  .app-sidebar, .top-navbar, .no-print {
    display: none !important;
  }
  .app-main {
    margin-left: 0 !important;
  }
  .content-body {
    padding: 0 !important;
  }
  body {
    background: #ffffff !important;
  }
}

/* Radar Proximity GPS Animations */
@keyframes slideUpRadar {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.radar-user-pulse {
  width: 22px;
  height: 22px;
  background: #2563eb;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.8);
  animation: pulseRadarDot 1.8s infinite;
}

@keyframes pulseRadarDot {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.radar-target-highlight {
  border-radius: 50%;
  animation: pulseTargetTree 1.5s infinite;
}

@keyframes pulseTargetTree {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
  }
  70% {
    box-shadow: 0 0 0 22px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ========================================================
   LEAFLET MARKERCLUSTER STYLES FOR SIGAP POHON GIS
   ======================================================== */

.sigap-cluster-wrapper {
  background: transparent !important;
  border: none !important;
}

.sigap-cluster-bubble {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.95);
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  user-select: none;
}

.sigap-cluster-bubble:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.45), 0 0 0 3.5px #ffffff;
  z-index: 1000 !important;
}

.sigap-cluster-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1;
}

.sigap-cluster-number {
  font-family: var(--font-heading, inherit);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.sigap-cluster-caption {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-top: 1.5px;
}

/* Pulsing warning glow when cluster contains critical/high-risk trees */
.sigap-cluster-pulse-warning {
  animation: clusterPulseCritical 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes clusterPulseCritical {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 6px 22px rgba(239, 68, 68, 0.65), 0 0 0 2.5px rgba(255, 255, 255, 1), 0 0 0 9px rgba(239, 68, 68, 0);
  }
}

/* Spiderfy legs & styling */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.leaflet-cluster-spider-leg {
  stroke: rgba(16, 185, 129, 0.75) !important;
  stroke-width: 2 !important;
  stroke-dasharray: 4, 3 !important;
}

/* ========================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS (ADMIN & PETUGAS)
   ======================================================== */

/* Desktop defaults: hide mobile-only elements */
.mobile-bottom-bar {
  display: none;
}

.btn-mobile-menu {
  display: none;
}

.btn-sidebar-close {
  display: none;
}

.mobile-sidebar-backdrop {
  display: none;
}

/* Mobile responsive layout */
@media (max-width: 992px) {
  .responsive-two-col-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

@media (max-width: 768px) {
  /* 1. App Container & Sidebar Off-Canvas */
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 290px;
    max-width: 85vw;
    z-index: 10000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.35);
  }

  .app-sidebar.mobile-open {
    transform: translateX(0);
  }

  .btn-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 16px;
    position: absolute;
    top: 20px;
    right: 16px;
    transition: all 0.2s ease;
  }

  .btn-sidebar-close:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
  }

  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mobile-sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* 2. Main Content Area with Clearance for Bottom Bar */
  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding-bottom: 92px !important; /* Prevents bottom navigation from covering inputs or buttons */
  }

  /* 3. Mobile Header & Navbar */
  .top-navbar {
    height: 58px;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 900;
  }

  .btn-mobile-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
  }

  .btn-mobile-menu:active {
    background: #e2e8f0;
    transform: scale(0.95);
  }

  .page-title-wrap h2 {
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }

  .page-title-wrap p {
    display: none;
  }

  .top-nav-actions {
    gap: 6px;
  }

  .top-nav-actions .btn-sigap span {
    display: none;
  }

  .top-nav-actions .btn-sigap {
    padding: 8px 10px;
    font-size: 13px;
  }

  .content-body {
    padding: 12px 10px;
  }

  /* 4. Mobile Bottom Navigation Bar */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 9998;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    justify-content: space-around;
    align-items: center;
  }

  .mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    gap: 3px;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-item i {
    font-size: 17px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  }

  .mobile-bottom-item:active i {
    transform: scale(0.9);
  }

  .mobile-bottom-item.active {
    color: #059669;
    font-weight: 700;
  }

  .mobile-bottom-item.active i {
    color: #059669;
    transform: scale(1.15);
  }

  /* Center Floating Action Button (Input Cepat) */
  .mobile-bottom-fab {
    position: relative;
    overflow: visible;
  }

  .mobile-bottom-fab .fab-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.45), 0 2px 6px rgba(0, 0, 0, 0.12);
    margin-top: -24px;
    border: 3px solid #ffffff;
    font-size: 19px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .mobile-bottom-fab:active .fab-circle {
    transform: scale(0.92);
  }

  .mobile-bottom-fab.active .fab-circle {
    transform: scale(1.06);
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.55);
  }

  .mobile-bottom-fab .fab-label {
    font-size: 9.5px;
    font-weight: 700;
    color: #047857;
    margin-top: 2px;
  }

  /* 5. Mobile Forms & Touch Inputs */
  .form-control-sigap {
    font-size: 15px !important;
    min-height: 42px;
  }

  /* 6. Mobile Tables */
  .sigap-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* 7. Mobile Grids */
  .mobile-col-1 {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  /* Collapse multi-column grids in mobile forms */
  .responsive-photo-slots {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ========================================================
   EMPTY PHOTO PLACEHOLDER SYSTEM
   ======================================================== */
.empty-photo-card,
.empty-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  text-align: center;
  padding: 6px;
  box-sizing: border-box;
  user-select: none;
  transition: all 0.2s ease;
}

.empty-photo-card i,
.empty-photo-placeholder i {
  color: #94a3b8;
  margin-bottom: 3px;
}

.empty-photo-card span,
.empty-photo-placeholder span {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}

.empty-photo-card.compact,
.empty-photo-placeholder.compact {
  padding: 2px;
}

.empty-photo-card.compact i,
.empty-photo-placeholder.compact i {
  font-size: 13px;
  margin-bottom: 0;
}

.empty-photo-card.compact span,
.empty-photo-placeholder.compact span {
  font-size: 8.5px;
}

/* ========================================================
   SIGAP PHOTO LIGHTBOX MODAL
   ======================================================== */
.zoomable-photo,
img[onclick*="openPhotoModal"] {
  cursor: zoom-in !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

.zoomable-photo:hover,
img[onclick*="openPhotoModal"]:hover {
  transform: scale(1.025);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
  filter: brightness(1.02);
}

.sigap-photo-modal-backdrop {
  animation: fadeInModal 0.2s ease-out forwards;
}

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

.sigap-photo-modal-container {
  animation: scaleInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleInModal {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Reports Executive Styles */
.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 1200px) {
  .reports-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .reports-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .reports-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.reports-export-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .reports-export-grid {
    grid-template-columns: 1fr;
  }
}

.annual-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 1200px) {
  .annual-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .annual-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .annual-kpi-grid {
    grid-template-columns: 1fr;
  }
}


