:root {
  --hijau: #16a34a;
  --hijau-gelap: #14532d;
  --hijau-muda: #dcfce7;
  --hijau-mid: #86efac;
  --biru: #0ea5e9;
  --merah: #ef4444;
  --kuning: #f59e0b;
  --abu: #f1f5f9;
  --abu-gelap: #64748b;
  --putih: #ffffff;
  --hitam: #0f172a;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: #f8fafc;
  color: var(--hitam);
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-logo {
  width: 36px;
  height: 36px;
  background: var(--hijau);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.navbar-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--hitam);
}
.navbar-name span {
  color: var(--hijau);
}
.navbar-nav {
  display: flex;
  gap: 4px;
}
.nav-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--abu-gelap);
  transition: all 0.2s;
}
.nav-btn:hover,
.nav-btn.active {
  background: var(--hijau-muda);
  color: var(--hijau-gelap);
}
.nav-cta {
  padding: 8px 20px;
  background: var(--hijau);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-cta:hover {
  background: var(--hijau-gelap);
}

/* PAGES */
.page {
  display: none;
  padding-top: 64px;
  min-height: 100vh;
}
.page.active {
  display: block;
}

/* ===== HOME PAGE ===== */
.hero {
  background: linear-gradient(
    135deg,
    var(--hijau-gelap) 0%,
    #166534 50%,
    #15803d 100%
  );
  padding: 80px 2rem 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  line-height: 1.1;
}
.hero h1 span {
  color: var(--hijau-mid);
}
.hero p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  padding: 14px 28px;
  background: white;
  color: var(--hijau-gelap);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.btn-secondary {
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stat-item {
  flex: 1;
  max-width: 200px;
  padding: 24px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child {
  border-right: none;
}
.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--hijau);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  color: var(--abu-gelap);
  font-weight: 500;
}

.section {
  padding: 64px 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--hitam);
  margin-bottom: 8px;
}
.section-sub {
  font-size: 14px;
  color: var(--abu-gelap);
  margin-bottom: 40px;
}

/* MASALAH CARDS */
.masalah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.masalah-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}
.masalah-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--hijau-mid);
}
.masalah-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.masalah-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}
.masalah-desc {
  font-size: 13px;
  color: var(--abu-gelap);
  line-height: 1.6;
}

/* FITUR GRID */
.fitur-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.fitur-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.fitur-num {
  width: 40px;
  height: 40px;
  background: var(--hijau-muda);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--hijau);
  flex-shrink: 0;
}
.fitur-body h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.fitur-body p {
  font-size: 13px;
  color: var(--abu-gelap);
  line-height: 1.6;
}

/* LAPORAN TERBARU */
.laporan-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.laporan-item {
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.laporan-cat {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.laporan-info {
  flex: 1;
}
.laporan-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}
.laporan-meta {
  font-size: 12px;
  color: var(--abu-gelap);
}
.laporan-status {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.status-baru {
  background: #fef3c7;
  color: #92400e;
}
.status-proses {
  background: #dbeafe;
  color: #1e40af;
}
.status-selesai {
  background: var(--hijau-muda);
  color: var(--hijau-gelap);
}
.upvote-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--abu);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  color: var(--abu-gelap);
  transition: all 0.2s;
}
.upvote-btn:hover {
  background: var(--hijau-muda);
  color: var(--hijau);
}

/* ===== FORM LAPORAN ===== */
.form-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 2rem;
}
.form-header {
  margin-bottom: 32px;
}
.form-header h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}
.form-header p {
  font-size: 14px;
  color: var(--abu-gelap);
}
.form-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--hitam);
}
.form-label span {
  color: var(--merah);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--hitam);
  outline: none;
  transition: border 0.2s;
  background: white;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--hijau);
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.kategori-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.kategori-option {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.kategori-option:hover {
  border-color: var(--hijau-mid);
  background: var(--hijau-muda);
}
.kategori-option.selected {
  border-color: var(--hijau);
  background: var(--hijau-muda);
}
.kategori-option .kat-icon {
  font-size: 24px;
  margin-bottom: 6px;
}
.kategori-option .kat-label {
  font-size: 12px;
  font-weight: 600;
}
.foto-upload {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--abu);
}
.foto-upload:hover {
  border-color: var(--hijau);
  background: var(--hijau-muda);
}
.foto-upload-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.foto-upload-text {
  font-size: 13px;
  color: var(--abu-gelap);
}
.foto-upload-text strong {
  color: var(--hijau);
}
.foto-preview {
  display: none;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.foto-preview img {
  width: 100%;
  border-radius: 12px;
}
.gps-btn {
  width: 100%;
  padding: 12px;
  background: var(--abu);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--abu-gelap);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.gps-btn:hover {
  background: var(--hijau-muda);
  border-color: var(--hijau);
  color: var(--hijau);
}
.gps-result {
  font-size: 12px;
  color: var(--hijau);
  margin-top: 6px;
  font-family: "DM Mono", monospace;
}
.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--hijau);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.submit-btn:hover {
  background: var(--hijau-gelap);
  transform: translateY(-1px);
}
.success-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.success-modal.show {
  opacity: 1;
  pointer-events: all;
}
.success-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  transform: scale(0.9);
  transition: transform 0.3s;
}
.success-modal.show .success-card {
  transform: scale(1);
}
.success-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.success-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.success-card p {
  font-size: 14px;
  color: var(--abu-gelap);
  margin-bottom: 6px;
}
.success-id {
  font-family: "DM Mono", monospace;
  font-size: 18px;
  color: var(--hijau);
  font-weight: 500;
  background: var(--hijau-muda);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  margin: 8px 0 20px;
}

/* ===== PETA ===== */
.peta-page {
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}
.peta-toolbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.peta-toolbar h3 {
  font-size: 15px;
  font-weight: 700;
  margin-right: 8px;
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  background: white;
  color: var(--abu-gelap);
  transition: all 0.2s;
}
.filter-chip.active,
.filter-chip:hover {
  background: var(--hijau-muda);
  border-color: var(--hijau);
  color: var(--hijau-gelap);
}
#map {
  flex: 1;
}

/* ===== TRACKING ===== */
.tracking-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 2rem;
}
.tracking-search {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}
.tracking-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
}
.tracking-input:focus {
  border-color: var(--hijau);
}
.tracking-btn {
  padding: 14px 24px;
  background: var(--hijau);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.tracking-result {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tracking-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.tracking-id {
  font-family: "DM Mono", monospace;
  font-size: 13px;
  color: var(--hijau);
  margin-bottom: 8px;
}
.tracking-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.tracking-meta {
  font-size: 13px;
  color: var(--abu-gelap);
}
.timeline {
  padding: 24px;
}
.timeline-item {
  display: flex;
  gap: 16px;
  margin-bottom: 0;
  position: relative;
}
.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: -16px;
  width: 2px;
  background: var(--border);
}
.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 1;
}
.dot-done {
  background: var(--hijau-muda);
}
.dot-active {
  background: var(--hijau);
  color: white;
}
.dot-wait {
  background: var(--abu);
}
.timeline-content {
  padding-bottom: 24px;
}
.timeline-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}
.timeline-date {
  font-size: 12px;
  color: var(--abu-gelap);
}
.timeline-note {
  font-size: 12px;
  color: var(--abu-gelap);
  margin-top: 6px;
  background: var(--abu);
  padding: 8px 10px;
  border-radius: 8px;
}

/* ===== DASHBOARD PETUGAS ===== */
.dashboard-layout {
  display: flex;
  height: calc(100vh - 64px);
}
.dashboard-sidebar {
  width: 240px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
}
.sidebar-menu {
  padding: 0 12px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--abu-gelap);
  transition: all 0.2s;
  margin-bottom: 2px;
}
.sidebar-item:hover,
.sidebar-item.active {
  background: var(--hijau-muda);
  color: var(--hijau-gelap);
}
.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--abu-gelap);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 12px 8px;
}
.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  background: var(--abu);
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.dash-title {
  font-size: 22px;
  font-weight: 800;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}
.metric-label {
  font-size: 12px;
  color: var(--abu-gelap);
  font-weight: 500;
  margin-bottom: 8px;
}
.metric-num {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}
.metric-change {
  font-size: 11px;
  font-weight: 600;
}
.metric-up {
  color: var(--hijau);
}
.metric-down {
  color: var(--merah);
}
.dash-table-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.dash-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-table-title {
  font-size: 15px;
  font-weight: 700;
}
.dash-search {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--abu-gelap);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  background: var(--abu);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: #f8fafc;
}
.action-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  background: white;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-sidebar {
    display: none;
  }
  .stats-bar {
    overflow-x: auto;
  }
  .navbar-nav {
    display: none;
  }
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate {
  animation: fadeUp 0.5s ease forwards;
}

