:root {
  /* Forest-Gold Palette — Hijau Hutan + Emas Desa Nyaolako */
  --primary: #1a5c38;
  --primary-hover: #113c24;
  --primary-light: #d8edde;
  --secondary: #2d8756;
  --accent: #b8860b;
  --accent-soft: #fdf3d0;
  --background: #f5f8f4;
  --surface: #ffffff;
  --surface-soft: #edf6ef;
  --border: #c4dcc9;
  --text: #1a2e1f;
  --muted: #4a6b52;
  --success: #2d8756;
  --warning: #b8860b;
  --danger: #c0392b;
  --info: #1a5c38;
  --ring: rgba(26, 92, 56, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(26, 92, 56, 0.13), transparent 34rem),
    radial-gradient(circle at 82% 0%, rgba(45, 135, 86, 0.09), transparent 30rem),
    radial-gradient(circle at 90% 12%, rgba(184, 134, 11, 0.11), transparent 28rem),
    linear-gradient(180deg, #f5f8f4 0%, #fdfbf0 48%, #f5f8f4 100%);
}

button,
a,
input,
select,
textarea {
  outline-color: var(--accent);
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px var(--ring);
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  border-radius: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.pattern {
  background-image:
    linear-gradient(135deg, rgba(26, 92, 56, 0.14) 25%, transparent 25%),
    linear-gradient(45deg, rgba(45, 135, 86, 0.09) 12%, transparent 12%),
    linear-gradient(225deg, rgba(184, 134, 11, 0.11) 25%, transparent 25%);
  background-position:
    0 0,
    12px 0;
  background-size: 24px 24px;
}

.hero-photo {
  background-image:
    linear-gradient(100deg, rgba(11, 39, 24, 0.90) 0%, rgba(26, 92, 56, 0.72) 48%, rgba(184, 134, 11, 0.30) 100%),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=82");
  background-position: center;
  background-size: cover;
}

.village-photo {
  background-image: url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1200&q=80");
  background-position: center;
  background-size: cover;
}

.login-photo {
  background-image:
    linear-gradient(145deg, rgba(26, 92, 56, 0.55), rgba(11, 39, 24, 0.70)),
    url("https://images.unsplash.com/photo-1464226184884-fa280b87c399?auto=format&fit=crop&w=1200&q=80");
  background-position: center;
  background-size: cover;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(196, 220, 201, 0.95);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 234, 0.88)),
    var(--surface);
  box-shadow:
    0 18px 44px rgba(26, 46, 31, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--secondary), var(--accent));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover {
  border-color: rgba(26, 92, 56, 0.28);
  box-shadow:
    0 24px 60px rgba(26, 46, 31, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.card:hover::before {
  opacity: 1;
}

.btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.72rem 1.05rem;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 14px 28px rgba(26, 92, 56, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #164a2e);
  box-shadow: 0 18px 34px rgba(26, 92, 56, 0.30);
}

.btn-outline {
  border: 1px solid rgba(26, 92, 56, 0.20);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(26, 46, 31, 0.06);
}

.btn-outline:hover {
  border-color: rgba(184, 134, 11, 0.40);
  background: var(--primary-light);
  color: var(--primary-hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(26, 92, 56, 0.15);
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(26, 46, 31, 0.08);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(196, 220, 201, 0.95);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(26, 46, 31, 0.08);
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: uppercase;
  background: linear-gradient(180deg, #edf6ef, #dceee0);
}

td,
th {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem;
  text-align: left;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition:
    background 0.16s ease,
    transform 0.16s ease;
}

tbody tr:hover {
  background: rgba(216, 237, 222, 0.50);
}

header.sticky {
  box-shadow: 0 10px 30px rgba(26, 46, 31, 0.08);
}

aside {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 246, 239, 0.84)) !important;
}

main section {
  position: relative;
}

.fade-in {
  animation: fadeIn 0.32s ease both;
}

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

#map {
  min-height: 440px;
  border-radius: 1.25rem;
  z-index: 10;
  box-shadow: 0 20px 45px rgba(26, 46, 31, 0.13);
}

/* Custom Leaflet Styling */
.leaflet-popup-content-wrapper {
  border-radius: 1rem !important;
  padding: 4px !important;
  box-shadow: 0 15px 35px rgba(26, 46, 31, 0.22) !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(8px);
}

.leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.98) !important;
}

.leaflet-container {
  font-family: 'Inter', sans-serif !important;
}

/* Custom DivIcon Marker Styling */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  font-weight: bold;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 3px solid white;
  transition: transform 0.2s ease;
  position: relative;
}

.custom-pin:hover {
  transform: scale(1.15);
  z-index: 1000 !important;
}

.custom-pin-primary {
  background: linear-gradient(135deg, #1a5c38, #113c24);
}

.custom-pin-secondary {
  background: linear-gradient(135deg, #2d8756, #1e6b40);
}

.custom-pin-rose {
  background: linear-gradient(135deg, #c0392b, #922b21);
}

.custom-pin-amber {
  background: linear-gradient(135deg, #b8860b, #8b6508);
}

/* Pulse Ring Animation for Main Landmark */
.pulse-ring {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(26, 92, 56, 0.38);
  animation: pulseBeacon 2s infinite ease-out;
  pointer-events: none;
}

@keyframes pulseBeacon {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.thumb {
  min-height: 170px;
  background-position: center;
  background-size: cover;
}

.thumb-news-0 {
  background-image:
    linear-gradient(180deg, rgba(26, 46, 31, 0.09), rgba(26, 46, 31, 0.24)),
    url("https://images.unsplash.com/photo-1517048676732-d65bc937f952?auto=format&fit=crop&w=900&q=78");
}

.thumb-news-1 {
  background-image:
    linear-gradient(180deg, rgba(26, 46, 31, 0.09), rgba(26, 46, 31, 0.24)),
    url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=900&q=78");
}

.thumb-news-2 {
  background-image:
    linear-gradient(180deg, rgba(26, 46, 31, 0.09), rgba(26, 46, 31, 0.24)),
    url("https://images.unsplash.com/photo-1461354464878-ad92f492a5a0?auto=format&fit=crop&w=900&q=78");
}

.thumb-news-3,
.thumb-news-default {
  background-image:
    linear-gradient(180deg, rgba(26, 46, 31, 0.09), rgba(26, 46, 31, 0.24)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=900&q=78");
}

.thumb-ann-0 {
  background-image:
    linear-gradient(180deg, rgba(26, 46, 31, 0.07), rgba(26, 92, 56, 0.24)),
    url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=900&q=78");
}

.thumb-ann-1 {
  background-image:
    linear-gradient(180deg, rgba(26, 46, 31, 0.07), rgba(184, 134, 11, 0.24)),
    url("https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?auto=format&fit=crop&w=900&q=78");
}

.thumb-ann-2,
.thumb-ann-default {
  background-image:
    linear-gradient(180deg, rgba(26, 46, 31, 0.07), rgba(45, 135, 86, 0.22)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=900&q=78");
}

@media (max-width: 760px) {
  td,
  th {
    padding: 0.75rem;
  }
}
