/* =========================================================
   LPHD PULUKAN MANAGEMENT SYSTEM — DESIGN TOKENS
   Tema: hutan desa & hasil bumi (hijau tua + emas gabah)
   ========================================================= */

:root {
  /* Palet Warna */
  --lphd-forest-dark: #16332a;   /* sidebar, header gelap */
  --lphd-forest:      #276048;   /* primary brand */
  --lphd-forest-light:#4f9c78;   /* aksen hover / highlight */
  --lphd-gold:         #c9973f;  /* aksen hasil panen / iuran */
  --lphd-gold-light:   #e7c98a;
  --lphd-cream:        #f6f5f1; /* background utama */
  --lphd-ink:           #202623; /* teks utama */
  --lphd-muted:         #6c7570; /* teks sekunder */
  --lphd-border:        #e4e1d8;
  --lphd-danger:        #b8493a;
  --lphd-white:          #ffffff;

  /* Radius & Shadow */
  --lphd-radius: 14px;
  --lphd-radius-sm: 8px;
  --lphd-shadow: 0 2px 10px rgba(22, 51, 42, 0.06);
  --lphd-shadow-md: 0 6px 20px rgba(22, 51, 42, 0.10);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--lphd-cream);
  color: var(--lphd-ink);
  font-size: 0.94rem;
}

h1, h2, h3, h4, h5, .brand-font {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--lphd-ink);
}

/* ============ LAYOUT ============ */
.lphd-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.lphd-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--lphd-forest-dark) 0%, #10241d 100%);
  color: #d9e6df;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  transition: transform .25s ease;
  z-index: 1030;
}

.lphd-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.lphd-sidebar .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--lphd-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lphd-forest-dark);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.lphd-sidebar .brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.25;
}

.lphd-sidebar .brand-text small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: #9fb3a9;
  letter-spacing: .03em;
}

.lphd-sidebar .nav-section-label {
  padding: 18px 20px 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7c9186;
}

.lphd-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: #cfe0d7;
  font-size: 0.88rem;
  border-left: 3px solid transparent;
  transition: all .15s ease;
}

.lphd-sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }

.lphd-sidebar .nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.lphd-sidebar .nav-link.active {
  background: rgba(201, 151, 63, 0.15);
  border-left-color: var(--lphd-gold);
  color: #fff;
  font-weight: 500;
}

.lphd-sidebar .nav-link.disabled {
  opacity: .45;
  pointer-events: none;
}

.lphd-sidebar .badge-soon {
  margin-left: auto;
  font-size: 0.62rem;
  background: rgba(255,255,255,0.1);
  color: #cfe0d7;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 500;
}

/* ============ MAIN CONTENT ============ */
.lphd-main {
  margin-left: 260px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lphd-topbar {
  background: var(--lphd-white);
  border-bottom: 1px solid var(--lphd-border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.lphd-topbar .page-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.lphd-topbar .page-subtitle {
  font-size: 0.8rem;
  color: var(--lphd-muted);
}

.lphd-dev-badge {
  background: #fbeecd;
  color: #8a6416;
  border: 1px solid #eddca0;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lphd-content {
  padding: 26px 28px 40px;
}

/* ============ CARDS ============ */
.lphd-card {
  background: var(--lphd-white);
  border: 1px solid var(--lphd-border);
  border-radius: var(--lphd-radius);
  box-shadow: var(--lphd-shadow);
}

.lphd-stat-card {
  background: var(--lphd-white);
  border: 1px solid var(--lphd-border);
  border-radius: var(--lphd-radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--lphd-shadow);
  height: 100%;
}

.lphd-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.lphd-stat-icon.icon-forest { background: rgba(39, 96, 72, 0.1); color: var(--lphd-forest); }
.lphd-stat-icon.icon-gold   { background: rgba(201, 151, 63, 0.15); color: #a67826; }
.lphd-stat-icon.icon-blue   { background: rgba(59, 111, 158, 0.12); color: #3b6f9e; }
.lphd-stat-icon.icon-danger { background: rgba(184, 73, 58, 0.1); color: var(--lphd-danger); }

.lphd-stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.lphd-stat-label {
  font-size: 0.8rem;
  color: var(--lphd-muted);
}

.lphd-stat-trend {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 4px;
}

.lphd-stat-trend.up { color: var(--lphd-forest); }
.lphd-stat-trend.down { color: var(--lphd-danger); }

/* ============ BUTTONS ============ */
.btn-lphd-primary {
  background: var(--lphd-forest);
  border-color: var(--lphd-forest);
  color: #fff;
}
.btn-lphd-primary:hover {
  background: var(--lphd-forest-dark);
  border-color: var(--lphd-forest-dark);
  color: #fff;
}
.btn-lphd-gold {
  background: var(--lphd-gold);
  border-color: var(--lphd-gold);
  color: #3a2c0f;
}
.btn-lphd-gold:hover {
  background: #b98730;
  border-color: #b98730;
  color: #fff;
}

/* ============ MAP ============ */
#peta-sebaran {
  height: 320px;
  border-radius: var(--lphd-radius-sm);
  z-index: 0;
}

/* ============ MISC ============ */
.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--lphd-muted);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--lphd-muted);
}

.empty-state i { font-size: 2rem; color: var(--lphd-border); margin-bottom: 10px; display:block; }

/* ============ RESPONSIVE ============ */
@media (max-width: 991.98px) {
  .lphd-sidebar {
    transform: translateX(-100%);
  }
  .lphd-sidebar.show {
    transform: translateX(0);
  }
  .lphd-main {
    margin-left: 0;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1025;
  }
  .sidebar-overlay.show { display: block; }
}
