/* ===== VARIABLES ===== */
:root {
  --green:  #16a34a;
  --green-light: #dcfce7;
  --blue:   #2563eb;
  --blue-light: #dbeafe;
  --teal:   #0d9488;
  --teal-light: #ccfbf1;
  --amber:  #d97706;
  --amber-light: #fef3c7;
  --red:    #dc2626;
  --red-light: #fee2e2;

  --sidebar-w: 240px;
  --sidebar-bg: #09200f;        /* hijau tua gelap — selaras logo */
  --sidebar-text: #82b898;      /* sage muted */
  --sidebar-active: #152d1c;    /* hover/active bg */
  --sidebar-accent: #c9a84c;    /* emas logo */

  --bg: #f0f4f8;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-soft: #64748b;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); display: flex; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; }
canvas { display: block; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: width .3s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-footer { opacity: 0; pointer-events: none; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  min-height: 64px;
}
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  overflow: hidden;
  /* Krem hangat — kontras cukup untuk hijau tua & emas logo */
  background: #f5ecd4;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 3px;
  box-shadow: 0 0 0 1px rgba(201,168,76,.35);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-fallback {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #c9a84c, #a67c2e);
  color: #0d3d27;
  font-weight: 800;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.brand-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; color: #f0e6c8; font-size: 15px; letter-spacing: .3px; }
.brand-sub  { color: var(--sidebar-accent); font-size: 9px; font-weight: 500; margin-top: 2px; line-height: 1.4; white-space: normal; }
.sidebar-toggle { color: var(--sidebar-text); font-size: 14px; padding: 4px; transition: color .2s; }
.sidebar-toggle:hover { color: #f0e6c8; }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; overflow-x: hidden; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #1f4a2e; border-radius: 4px; }
.nav-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
  color: #3d6b4f; padding: 14px 18px 4px;
  white-space: nowrap;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  color: var(--sidebar-text);
  font-size: 13px; font-weight: 500;
  border-radius: 0;
  transition: background .15s, color .15s;
  white-space: nowrap;
  position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-active); color: #f0e6c8; }
.nav-item.active { background: var(--sidebar-active); color: var(--sidebar-accent); }
.nav-item.active::left { content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sidebar-accent); border-radius: 0 3px 3px 0; }
.nav-item.active::before { content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sidebar-accent); border-radius: 0 3px 3px 0; }

.sidebar-footer {
  padding: 12px 16px;
  color: #3d6b4f;
  font-size: 10px;
  border-top: 1px solid rgba(255,255,255,.07);
  white-space: nowrap;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .3s ease;
}
.main-content.expanded { margin-left: 64px; }

/* ===== TOPBAR ===== */
.topbar {
  height: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-btn { color: var(--text-soft); font-size: 16px; padding: 6px; }
.menu-btn:hover { color: var(--text); }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 13px; }
.breadcrumb i { font-size: 12px; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.live-badge {
  display: flex; align-items: center; gap: 6px;
  background: #f0fdf4; color: var(--green);
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px; font-weight: 600;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.year-toggle { display: flex; background: var(--bg); border-radius: 8px; padding: 2px; gap: 2px; }
.yr-btn { padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-soft); transition: all .2s; }
.yr-btn.active { background: var(--card); color: var(--blue); box-shadow: var(--shadow); }
.topbar-time { font-size: 12px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.topbar-user { color: var(--text-soft); font-size: 22px; cursor: pointer; }

/* ===== PAGES ===== */
.page { display: none; padding: 24px; flex: 1; }
.page.active { display: block; }

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-header h2 i { color: var(--green); }
.update-time { font-size: 12px; color: var(--text-soft); }

/* ===== HERO BANNER ===== */
.hero-banner {
  background: linear-gradient(135deg, #09200f 0%, #0d3d27 55%, #1f5e3b 100%);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.hero-banner::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(34,197,94,.15) 0%, transparent 70%);
}
.hero-content { max-width: 600px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
  color: #4ade80;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px; font-weight: 600;
  margin-bottom: 14px;
}
.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 30px; font-weight: 800;
  color: #f8fafc; line-height: 1.2;
  margin-bottom: 12px;
}
.hero-title span { color: #4ade80; }
.hero-sub { color: #94a3b8; font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.hero-stats { display: flex; gap: 32px; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 800; color: #fff; }
.hero-stat span { font-size: 11px; color: #64748b; margin-top: 2px; }
.hero-visual { position: relative; z-index: 1; }
.hero-icon-wrap {
  width: 120px; height: 120px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.hero-icon { font-size: 52px; color: rgba(74,222,128,.6); }

/* ===== KPI CARDS ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.kpi-card.green .kpi-icon { background: var(--green-light); color: var(--green); }
.kpi-card.blue  .kpi-icon { background: var(--blue-light);  color: var(--blue); }
.kpi-card.teal  .kpi-icon { background: var(--teal-light);  color: var(--teal); }
.kpi-card.amber .kpi-icon { background: var(--amber-light); color: var(--amber); }
.kpi-body { flex: 1; }
.kpi-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; line-height: 1; }
.kpi-value small { font-size: 14px; font-weight: 600; }
.kpi-label { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.kpi-trend { font-size: 11px; font-weight: 600; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.kpi-trend.up   { color: var(--green); }
.kpi-trend.down { color: var(--red); }
.kpi-ring { position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; opacity: .08; }
.green-ring { background: var(--green); }
.blue-ring  { background: var(--blue); }
.teal-ring  { background: var(--teal); }
.amber-ring { background: var(--amber); }

/* ===== CHARTS ===== */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); min-width: 0; overflow: hidden; }
.chart-card.wide { grid-column: span 1; }
.charts-row:has(.chart-card.wide) { grid-template-columns: 2fr 1fr; }
.chart-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.chart-card-header h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.chart-card-header h3 i { color: var(--green); }
.chart-tag { font-size: 11px; background: var(--bg); color: var(--text-soft); border-radius: 6px; padding: 3px 8px; font-weight: 500; }
.chart-wrap { height: 240px; position: relative; overflow: hidden; width: 100%; }
.donut-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.donut-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-soft); }
.donut-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ===== INFO STRIP ===== */
.info-strip {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.info-item {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 160px;
  padding: 0 12px;
  border-right: 1px solid var(--border);
}
.info-item:last-child { border-right: none; }
.info-item i { font-size: 22px; color: var(--green); flex-shrink: 0; }
.info-item div { display: flex; flex-direction: column; }
.info-item strong { font-size: 13px; font-weight: 600; }
.info-item span { font-size: 11px; color: var(--text-soft); margin-top: 2px; }

/* ===== PETA ===== */
.peta-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.peta-map-wrap { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.peta-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-soft); padding: 12px 0; }
.peta-placeholder > i { font-size: 36px; color: var(--green); }
.peta-placeholder > p { font-weight: 600; font-size: 15px; color: var(--text); }
.peta-placeholder > small { font-size: 12px; }
.kec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}
.kec-item {
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.kec-item:hover { transform: scale(1.04); opacity: .85; }
.kec-item.high  { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.kec-item.mid   { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.kec-item.low   { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

.peta-table-wrap { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.peta-table-wrap h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.peta-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.peta-table th { background: var(--bg); text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 600; color: var(--text-soft); }
.peta-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.peta-table tr:last-child td { border-bottom: none; }
.peta-table tr:hover td { background: #f8fafc; }
.badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.badge.green { background: var(--green-light); color: var(--green); }
.badge.blue  { background: var(--blue-light);  color: var(--blue); }
.badge.amber { background: var(--amber-light); color: var(--amber); }
.badge.red   { background: var(--red-light);   color: var(--red); }
.badge.teal  { background: var(--teal-light);  color: var(--teal); }
.peta-legend { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.leg-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-soft); }
.leg-dot { width: 10px; height: 10px; border-radius: 50%; }
.leg-dot.green { background: var(--green); }
.leg-dot.blue  { background: var(--blue); }
.leg-dot.amber { background: var(--amber); }
.leg-dot.red   { background: var(--red); }

/* ===== APBD ===== */
.apbd-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.apbd-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
}
.apbd-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.apbd-icon.blue  { background: var(--blue-light);  color: var(--blue); }
.apbd-icon.green { background: var(--green-light); color: var(--green); }
.apbd-icon.teal  { background: var(--teal-light);  color: var(--teal); }
.apbd-icon.amber { background: var(--amber-light); color: var(--amber); }
.apbd-info { display: flex; flex-direction: column; }
.apbd-label { font-size: 11px; color: var(--text-soft); }
.apbd-val { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; font-weight: 700; margin-top: 3px; }

.apbd-progress-section { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.apbd-progress-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.apbd-progress-section h3 i { color: var(--green); }
.progress-list { display: flex; flex-direction: column; gap: 14px; }
.prog-item {}
.prog-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.prog-label strong { font-weight: 700; }
.prog-bar { height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 6px; transition: width .8s ease; }
.prog-fill.green { background: var(--green); }
.prog-fill.blue  { background: var(--blue); }
.prog-fill.teal  { background: var(--teal); }
.prog-fill.amber { background: var(--amber); }

/* ===== OPD ===== */
.opd-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.opd-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform .2s;
}
.opd-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.opd-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 14px; color: var(--text-soft); }
.opd-head i { font-size: 15px; color: var(--green); }
.opd-score { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.opd-score.green { color: var(--green); }
.opd-score.blue  { color: var(--blue); }
.opd-score.teal  { color: var(--teal); }
.opd-score.amber { color: var(--amber); }
.opd-bar { height: 6px; background: var(--bg); border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.opd-fill { height: 100%; border-radius: 6px; transition: width .8s ease; }
.opd-meta { font-size: 11px; color: var(--text-soft); }

/* ===== WISATA CARDS ===== */
.wisata-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 24px; }
.wisata-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform .2s;
}
.wisata-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.wisata-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px;
  margin-bottom: 14px;
}
.wisata-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.wisata-card p  { font-size: 12px; color: var(--text-soft); line-height: 1.5; margin-bottom: 12px; }
.wisata-stat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 600; }

/* ===== FOOTER ===== */
.main-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: auto;
  gap: 20px;
}
.footer-left, .footer-right { display: flex; flex-direction: column; gap: 3px; }
.footer-left strong { font-size: 13px; font-weight: 700; }
.footer-left span, .footer-right span { font-size: 11px; color: var(--text-soft); }
.footer-right { text-align: right; }

/* ===== DOWNLOAD PAGE ===== */
.download-filter {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.filter-label { font-size: 13px; font-weight: 600; color: var(--text-soft); margin-right: 4px; }
.filter-btn {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-soft);
  background: var(--card); cursor: pointer; transition: all .2s;
}
.filter-btn:hover { border-color: var(--green); color: var(--green); }
.filter-btn.active { background: var(--green); border-color: var(--green); color: #fff; }

.download-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 24px;
}
.download-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  transition: transform .2s, box-shadow .2s;
}
.download-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.download-card.hidden { display: none; }
.dl-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.dl-icon.blue  { background: var(--blue-light);  color: var(--blue); }
.dl-icon.green { background: var(--green-light); color: var(--green); }
.dl-icon.teal  { background: var(--teal-light);  color: var(--teal); }
.dl-icon.amber { background: var(--amber-light); color: var(--amber); }
.dl-body { flex: 1; min-width: 0; }
.dl-title { font-size: 13px; font-weight: 600; margin-bottom: 5px; line-height: 1.4; }
.dl-meta  { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-soft); margin-bottom: 4px; }
.dl-date  { font-size: 11px; color: var(--text-soft); display: flex; align-items: center; gap: 4px; }
.dl-btn {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); font-size: 14px;
  transition: all .2s;
}
.dl-btn:hover { background: var(--green); border-color: var(--green); color: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .opd-grid  { grid-template-columns: repeat(2,1fr); }
  .wisata-cards { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 64px; }
  .sidebar-toggle { display: none; }
  .brand-text, .nav-section-label, .nav-item span, .sidebar-footer { opacity: 0; pointer-events: none; }
  .charts-row { grid-template-columns: 1fr !important; }
  .charts-row:has(.chart-card.wide) { grid-template-columns: 1fr !important; }
  .peta-layout { grid-template-columns: 1fr; }
  .apbd-summary { grid-template-columns: repeat(2,1fr); }
  .hero-banner { flex-direction: column; gap: 20px; }
  .hero-visual { display: none; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .download-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .apbd-summary { grid-template-columns: 1fr; }
  .wisata-cards { grid-template-columns: 1fr; }
  .opd-grid { grid-template-columns: 1fr; }
  .page { padding: 12px; }
  .hero-banner { padding: 24px 20px; }
  .hero-title { font-size: 22px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .info-strip { flex-direction: column; }
  .info-item { border-right: none; border-bottom: 1px solid var(--border); padding: 12px 0; }
  .info-item:last-child { border-bottom: none; }
  .brand-logo { width: 38px; height: 38px; }
  /* topbar: hide secondary elements on small screens */
  .year-toggle { display: none; }
  .topbar-time { display: none; }
  .topbar-user { display: none; }
  .topbar-center { flex: unset; }
  .live-badge { font-size: 11px; padding: 3px 10px; }
  .topbar { gap: 8px; padding: 0 12px; }
  /* Semua chart fit 100% lebar container — tidak ada horizontal scroll */
  .chart-card { overflow: hidden; }
  .chart-wrap { height: 200px; width: 100%; overflow: hidden; }

  /* Safety net: cegah overflow horizontal di level page */
  .main-content { overflow-x: hidden; }
  .page { overflow-x: hidden; }
}
