/* =====================================================
   STYLE.CSS — WEBGIS INTERAKSI NEGATIF BUAYA & MANUSIA
   Tema: KKP Blue + Crocodile Green + Risk Accent
===================================================== */

:root {
  --blue-dark: #003e73;
  --blue-main: #0072bc;
  --blue-soft: #e5f4ff;

  --green-dark: #0c5f4a;
  --green-main: #13966a;
  --green-soft: #e5f7ee;

  --brown-main: #8b5e34;
  --orange-main: #f59e0b;
  --red-main: #dc2626;

  --bg-main: #eef6fb;
  --bg-card: #ffffff;

  --text-main: #172333;
  --text-muted: #647282;

  --border-soft: rgba(23, 35, 51, 0.11);
  --shadow-soft: 0 10px 24px rgba(23, 35, 51, 0.08);
  --shadow-hover: 0 14px 30px rgba(23, 35, 51, 0.12);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Lexend", Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
}

/* =====================================================
   NAVBAR
===================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 9999;
  min-height: 76px;
  padding: 12px 48px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 254, 0.96)),
    white;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 10px 26px rgba(0, 62, 115, 0.08);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-main) 68%, var(--green-main));
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(0, 114, 188, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(229, 244, 255, 0.42);
}

.logo-kkp {
  width: 50px;
  height: 50px;
  min-width: 50px;
  display: block;
  border-radius: var(--radius-md);
  padding: 5px;
  object-fit: contain;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(229, 244, 255, 0.96)),
    var(--blue-soft);
  border: 1px solid rgba(0, 114, 188, 0.18);
  box-shadow: 0 8px 20px rgba(0, 62, 115, 0.1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ministry-name {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 0;
  text-transform: uppercase;
}

.unit-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(0, 114, 188, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(229, 244, 255, 0.55);
}

.nav-menu a {
  color: var(--blue-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  transition: 0.25s ease;
}

.nav-menu a.active,
.nav-menu a:hover {
  color: white;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-main) 82%, var(--green-main));
  box-shadow: 0 8px 18px rgba(0, 62, 115, 0.18);
}

/* =====================================================
   HERO
===================================================== */

#hero {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 86px 34px 86px;
  color: white;
  background:
    linear-gradient(120deg, rgba(0, 62, 115, 0.98) 0%, rgba(0, 114, 188, 0.96) 58%, rgba(12, 95, 74, 0.9) 100%),
    linear-gradient(135deg, #003e73 0%, #0072bc 72%, #0c5f4a 100%);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 42px 42px;
}

#hero::after {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  padding-left: 24px;
  text-align: left;
}

.hero-content::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 10px;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.18), var(--green-main));
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.24);
}

#hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.hero-description {
  max-width: 930px;
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn-primary {
  color: var(--blue-dark);
  background: white;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.hero-bg-icon {
  display: none;
}

.icon-a { top: 100px; left: 6%; animation-delay: 0s; }
.icon-b { top: 130px; right: 8%; animation-delay: 1.1s; }
.icon-c { bottom: 120px; left: 14%; animation-delay: 2s; }
.icon-d { bottom: 150px; right: 18%; animation-delay: 0.7s; }
.icon-e { top: 265px; left: 50%; animation-delay: 1.8s; }

@keyframes floatIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}

/* =====================================================
   SUMMARY CARD
===================================================== */

.summary-section {
  position: relative;
  z-index: 4;
  padding: 0 34px 30px;
  margin-top: -50px;
}

.summary-grid {
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 106px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--blue-main), var(--green-main));
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.summary-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  font-size: 23px;
  background: var(--blue-soft);
}

.summary-icon,
.modal-icon,
.risk-marker span {
  font-size: 0;
}

.summary-icon::before,
.modal-icon::before,
.risk-marker span::before {
  font-size: 23px;
}

.modal-icon::before {
  font-size: 30px;
}

.risk-marker span::before {
  font-size: 18px;
}

.summary-card:nth-child(1) .summary-icon::before,
.modal-icon::before,
.risk-marker span::before {
  content: "\1F40A";
}

.summary-card:nth-child(2) .summary-icon::before {
  content: "\1F4CD";
}

.summary-card:nth-child(3) .summary-icon::before {
  content: "\1F3D9";
}

.summary-card:nth-child(4) .summary-icon::before {
  content: "\1F9EE";
}

.summary-card:nth-child(5) .summary-icon::before {
  content: "\26A0";
}

.summary-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.summary-value {
  margin-top: 4px;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  color: var(--blue-dark);
}

.summary-subtitle {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.risk-high::before {
  background: linear-gradient(180deg, #ef4444, #f59e0b);
}

.risk-total::before {
  background: linear-gradient(180deg, #174a2a, #2e7d32);
}

/* =====================================================
   GENERAL SECTION
===================================================== */

section {
  scroll-margin-top: 92px;
}

.filter-section,
#map-section,
#dashboard,
#table-section {
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px 34px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--green-main);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-header h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.15;
  font-weight: 900;
}

/* =====================================================
   FILTER PANEL
===================================================== */

.filter-section {
  padding-top: 28px;
}

.filter-actions,
.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.filter-actions button {
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 900;
  color: white;
  background: var(--blue-main);
  box-shadow: 0 8px 18px rgba(11, 107, 189, 0.18);
  transition: 0.22s ease;
}

.filter-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(11, 107, 189, 0.23);
}

#resetFilterBtn {
  background: #475569;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

.filter-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-box label {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

select,
input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  outline: none;
  background: white;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  transition: 0.22s ease;
}

select:focus,
input[type="text"]:focus {
  border-color: rgba(11, 107, 189, 0.65);
  box-shadow: 0 0 0 3px rgba(11, 107, 189, 0.12);
}

/* =====================================================
   MAP SECTION
===================================================== */

.map-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.map-counter {
  min-width: 128px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 72%, var(--green-dark) 100%);
  color: white;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.map-counter span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.82;
  text-transform: uppercase;
  letter-spacing: 0;
}

.map-counter strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

.map-dashboard-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.map-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

.sidebar-card h3 {
  margin: 0 0 16px;
  color: var(--blue-dark);
  font-size: 16px;
  font-weight: 900;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}

.legend-item:last-child {
  border-bottom: none;
}

.legend-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(23, 35, 51, 0.18);
}

.legend-dot.rendah { background: #22c55e; }
.legend-dot.sedang { background: #f59e0b; }
.legend-dot.tinggi { background: #ef4444; }

.legend-separator {
  height: 1px;
  margin: 8px 0;
  background: var(--border-soft);
}

.legend-line {
  width: 28px;
  height: 0;
  min-width: 28px;
  margin-top: 9px;
  border-top: 4px solid var(--blue-main);
}

.legend-line.kkd {
  border-top-color: var(--green-main);
  border-top-style: dashed;
}

.legend-item strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: var(--text-main);
}

.legend-item small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}

.active-filter-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip,
.empty-filter {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.empty-filter {
  color: var(--text-muted);
  background: #f1f5f9;
}

.top-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.top-item strong {
  font-size: 12px;
  color: var(--text-main);
}

.top-item span {
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  color: white;
  background: var(--blue-main);
  font-size: 12px;
  font-weight: 900;
}

.loading-small {
  color: var(--text-muted);
  font-size: 12px;
}

.map-wrapper {
  min-width: 0;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

#map {
  width: 100%;
  height: 690px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #dbeafe;
}

.map-source {
  margin: 10px 6px 2px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: right;
  font-style: italic;
}

/* Leaflet popup enhancement */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 16px 40px rgba(23, 35, 51, 0.22) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
}

.popup-box {
  min-width: 285px;
  max-width: 350px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  font-family: "Lexend", Arial, sans-serif;
}

.popup-head {
  padding: 14px 16px;
  color: white;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 72%, var(--green-dark) 100%);
}

.popup-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.popup-head p {
  margin: 5px 0 0;
  opacity: 0.88;
  font-size: 12px;
}

.popup-body {
  padding: 14px 16px 16px;
  background: white;
}

.popup-row {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  line-height: 1.45;
}

.popup-row b {
  color: var(--blue-dark);
}

.popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.popup-actions button,
.popup-actions a {
  flex: 1;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  text-decoration: none;
  color: white;
  background: var(--blue-main);
  font-size: 12px;
  font-weight: 900;
}

.popup-actions a {
  background: var(--green-main);
}

.conservation-popup {
  min-width: 260px;
  padding: 14px 16px 16px;
  font-family: "Lexend", Arial, sans-serif;
}

.conservation-popup h4 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 900;
}

.conservation-popup div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  line-height: 1.45;
}

.conservation-popup b {
  color: var(--blue-dark);
}

/* Custom DivIcon Marker */
.risk-marker {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  transform: rotate(-45deg);
  border: 3px solid white;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.28);
}

.risk-marker span {
  transform: rotate(45deg);
  font-size: 0;
}

.risk-marker.rendah { background: #22c55e; }
.risk-marker.sedang { background: #f59e0b; }
.risk-marker.tinggi { background: #ef4444; }
.risk-marker.default { background: #0b73d9; }

/* =====================================================
   DASHBOARD CHART
===================================================== */

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.chart-card {
  min-width: 0;
  height: 410px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

.chart-card.wide {
  grid-column: span 2;
}

.chart-title {
  margin-bottom: 14px;
}

.chart-title h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 17px;
  font-weight: 900;
}

.chart-title span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.chart-card canvas {
  width: 100% !important;
  height: calc(100% - 58px) !important;
}

/* =====================================================
   TABLE
===================================================== */

#table-section {
  padding-bottom: 60px;
}

.table-actions {
  min-width: 280px;
}

.table-wrapper {
  overflow: auto;
  max-height: 640px;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

#dataTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1280px;
}

#dataTable thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 13px 12px;
  color: white;
  background: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

#dataTable tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-main);
  vertical-align: top;
}

#dataTable tbody tr {
  transition: 0.18s ease;
}

#dataTable tbody tr:hover {
  background: #eff6ff;
}

.table-loading {
  padding: 30px !important;
  text-align: center;
  color: var(--text-muted) !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.rendah { background: #22c55e; }
.badge.sedang { background: #f59e0b; }
.badge.tinggi { background: #ef4444; }
.badge.default { background: #64748b; }

.doc-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: white;
  background: var(--blue-main);
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.doc-empty {
  color: var(--text-muted);
  font-size: 11px;
}

/* =====================================================
   MODAL
===================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(2, 8, 23, 0.64);
  backdrop-filter: blur(5px);
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: white;
  background: rgba(15, 23, 42, 0.28);
  font-size: 28px;
  line-height: 1;
  transition: 0.2s ease;
}

.modal-close:hover {
  background: rgba(15, 23, 42, 0.48);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  color: white;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 72%, var(--green-dark) 100%);
}

.modal-icon {
  width: 58px;
  height: 58px;
  min-width: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  font-size: 30px;
  background: rgba(255, 255, 255, 0.16);
}

.modal-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.modal-header p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.modal-content {
  padding: 24px 28px 30px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--border-soft);
}

.detail-item.full {
  grid-column: span 2;
}

.detail-item label {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.detail-item div {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.detail-actions a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: white;
  background: var(--blue-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

/* =====================================================
   FOOTER
===================================================== */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 34px;
  color: white;
  background: linear-gradient(135deg, #003e73 0%, #005f9e 78%, #0c5f4a 100%);
}

.footer strong,
.footer span {
  display: block;
}

.footer strong {
  font-size: 14px;
  font-weight: 900;
}

.footer span {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.78;
}

.footer-meta {
  text-align: right;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1200px) {
  .navbar {
    padding-left: 28px;
    padding-right: 28px;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .map-sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #map {
    height: 600px;
  }
}

@media (max-width: 900px) {
  .navbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 20px;
  }

  .brand-box {
    width: 100%;
  }

  .nav-menu {
    width: 100%;
    overflow-x: auto;
    padding: 5px;
  }

  #hero {
    padding: 44px 22px 62px;
  }

  .summary-section,
  .filter-section,
  #map-section,
  #dashboard,
  #table-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .summary-grid,
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-sidebar {
    grid-template-columns: 1fr;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .chart-card.wide {
    grid-column: span 1;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-actions {
    width: 100%;
    min-width: 0;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .logo-kkp {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  .ministry-name {
    font-size: 14px;
  }

  .unit-name {
    font-size: 11px;
  }

  #hero h1 {
    font-size: 30px;
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .summary-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 104px;
  }

  #map {
    height: 520px;
  }

  .chart-card {
    height: 370px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-item.full {
    grid-column: span 1;
  }
}
