/* ============================================================
   TilikPeta — Main Stylesheet
   Design: Dark forest green × clean data-forward
   ============================================================ */

:root {
  --green-900: #0d3b0d;
  --green-800: #1a5c1a;
  --green-700: #1a7c1a;
  --green-600: #2ea02e;
  --green-500: #5cb85c;
  --green-400: #7dca7d;
  --green-100: #e8f5e9;
  --green-50:  #f1faf1;

  --ndvi-1: #d9534f;
  --ndvi-2: #f0ad4e;
  --ndvi-3: #aad400;
  --ndvi-4: #5cb85c;
  --ndvi-5: #1a7c1a;

  --gray-900: #1a202c;
  --gray-800: #2d3748;
  --gray-700: #4a5568;
  --gray-600: #718096;
  --gray-400: #a0aec0;
  --gray-200: #e2e8f0;
  --gray-100: #f7fafc;
  --white:    #ffffff;

  --danger:   #e53e3e;
  --warning:  #dd6b20;
  --info:     #2b6cb0;
  --success:  #276749;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.15);

  --transition: 200ms cubic-bezier(.4,0,.2,1);
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-100);
  min-height: 100vh;
}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1 { font-size: 2rem;   font-weight: 800; line-height: 1.15; color: var(--gray-900); }
h2 { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); }
h3 { font-size: 1.1rem; font-weight: 600; color: var(--gray-800); }
h4 { font-size: .95rem; font-weight: 600; color: var(--gray-800); }
p  { color: var(--gray-700); }
a  { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
small { font-size: .8rem; color: var(--gray-600); }
code  { font-family: var(--font-mono); font-size: .85em; background: var(--gray-200); padding: 2px 5px; border-radius: 4px; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container    { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 520px;  margin: 0 auto; padding: 0 20px; }
.page-wrap    { padding-top: 64px; min-height: 100vh; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  background: var(--green-900);
  display: flex; align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px;
}
.navbar-toggle {
  display: none; background: none; border: none; color: var(--white);
  font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 6px 8px;
  border-radius: 6px;
}
.navbar-toggle:hover { background: rgba(255,255,255,.1); }
.navbar-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--white); font-size: 1.15rem; font-weight: 800;
  letter-spacing: -.3px; text-decoration: none;
}
.navbar-brand:hover { text-decoration: none; opacity: .9; }
.navbar-brand span.leaf { font-size: 1.3rem; }
.navbar-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  color: rgba(255,255,255,.75); padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; transition: var(--transition);
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--white); background: rgba(255,255,255,.12); text-decoration: none;
}
.navbar-user {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.85); font-size: .85rem;
}
.tier-badge {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  padding: 2px 7px; border-radius: 99px;
  background: var(--green-600); color: var(--white);
}
.tier-badge.individu   { background: #2b6cb0; }
.tier-badge.profesional { background: #6b46c1; }
.tier-badge.institusi  { background: #c05621; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-size: .875rem; font-weight: 600; font-family: var(--font);
  transition: var(--transition); text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--green-800); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-secondary { background: var(--white); color: var(--gray-800); border: 1.5px solid var(--gray-200); }
.btn-secondary:hover:not(:disabled) { background: var(--gray-100); border-color: var(--gray-400); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover:not(:disabled) { filter: brightness(.9); }

.btn-ghost { background: transparent; color: var(--green-700); }
.btn-ghost:hover:not(:disabled) { background: var(--green-50); }

.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-loading::after {
  content: ''; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: var(--white);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px; border-top: 1px solid var(--gray-200);
  background: var(--gray-100); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--gray-800); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: .9rem; font-family: var(--font);
  color: var(--gray-800); background: var(--white); transition: var(--transition);
  outline: none;
}
.form-control:focus  { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(92,184,92,.15); }
.form-control.error  { border-color: var(--danger); }
.form-help { font-size: .8rem; color: var(--gray-600); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: 4px; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .875rem; margin-bottom: 16px; border-left: 4px solid;
}
.alert-danger  { background: #fff5f5; color: #c53030; border-color: var(--danger); }
.alert-success { background: #f0fff4; color: var(--success); border-color: var(--green-500); }
.alert-warning { background: #fffaf0; color: #c05621; border-color: var(--warning); }
.alert-info    { background: #ebf8ff; color: #2c5282; border-color: var(--info); }

/* ── Status Badges ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700;
}
.badge-pending    { background: #fefcbf; color: #744210; }
.badge-validating { background: #bee3f8; color: #2a4365; }
.badge-processing { background: #c3dafe; color: #3c366b; }
.badge-done       { background: #c6f6d5; color: #22543d; }
.badge-error      { background: #fed7d7; color: #742a2a; }

.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: pulse 1.5s ease infinite;
}
.badge-done .badge-dot, .badge-error .badge-dot { animation: none; }

/* ── Upload / Dropzone ───────────────────────────────────────────────────── */
.dropzone {
  border: 2.5px dashed var(--gray-200); border-radius: var(--radius-lg);
  padding: 48px 24px; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--white);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--green-500); background: var(--green-50);
}
.dropzone.has-file { border-color: var(--green-600); background: var(--green-50); }
.dropzone-icon { font-size: 3rem; margin-bottom: 12px; }
.dropzone-title { font-size: 1.05rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.dropzone-sub   { font-size: .875rem; color: var(--gray-600); }
.dropzone-hint  { font-size: .8rem; color: var(--gray-400); margin-top: 8px; }

/* ── Progress ────────────────────────────────────────────────────────────── */
.progress-wrap { margin: 20px 0; }
.progress-bar-track {
  height: 8px; background: var(--gray-200); border-radius: 99px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--green-600), var(--green-400));
  border-radius: 99px; transition: width 500ms ease;
}
.progress-label { font-size: .82rem; color: var(--gray-600); margin-top: 6px; }

/* ── Steps ────────────────────────────────────────────────────────────────── */
.steps { display: flex; align-items: flex-start; gap: 0; margin: 24px 0; }
.step  { flex: 1; text-align: center; position: relative; }
.step::before {
  content: ''; position: absolute; top: 16px; left: 50%; right: -50%;
  height: 2px; background: var(--gray-200); z-index: 0;
}
.step:last-child::before { display: none; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--gray-200);
  background: var(--white); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; font-size: .8rem; font-weight: 700; position: relative; z-index: 1;
  color: var(--gray-400);
}
.step.active .step-dot  { border-color: var(--green-500); color: var(--green-700); background: var(--green-50); }
.step.done   .step-dot  { border-color: var(--green-600); background: var(--green-600); color: var(--white); }
.step.error  .step-dot  { border-color: var(--danger); background: var(--danger); color: var(--white); }
.step.done::before      { background: var(--green-400); }
.step-label { font-size: .78rem; color: var(--gray-500); font-weight: 500; }
.step.active .step-label { color: var(--green-700); font-weight: 700; }
.step.done   .step-label { color: var(--gray-700); }

/* ── NDVI Bar ────────────────────────────────────────────────────────────── */
.ndvi-bar { display: flex; height: 24px; border-radius: var(--radius-sm); overflow: hidden; }
.ndvi-segment { transition: width 600ms ease; position: relative; }
.ndvi-segment:hover::after {
  content: attr(data-tooltip);
  position: absolute; top: -32px; left: 50%; transform: translateX(-50%);
  background: var(--gray-900); color: var(--white); font-size: .75rem; font-weight: 600;
  padding: 3px 8px; border-radius: 4px; white-space: nowrap; z-index: 10;
}
.ndvi-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.ndvi-legend-item { display: flex; align-items: center; gap: 5px; font-size: .8rem; }
.ndvi-legend-dot  { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; }
th { background: var(--gray-800); color: var(--white); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
td { font-size: .875rem; border-bottom: 1px solid var(--gray-200); color: var(--gray-700); }
tr:hover td { background: var(--gray-100); }
tr:last-child td { border-bottom: none; }

/* ── Stat Cards ──────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 16px 18px;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
}
.stat-label { font-size: .78rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-sub   { font-size: .8rem; color: var(--gray-500); margin-top: 4px; }
.stat-card.green .stat-value { color: var(--green-700); }
.stat-card.blue  .stat-value { color: var(--info); }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); transform: translateY(20px); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-body   { padding: 22px; }
.modal-close  { background: none; border: none; font-size: 1.2rem; color: var(--gray-500); cursor: pointer; padding: 4px; border-radius: 4px; }
.modal-close:hover { color: var(--gray-800); background: var(--gray-100); }

/* ── Empty State ────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.empty-state-icon { font-size: 3rem; margin-bottom: 14px; opacity: .5; }
.empty-state h3   { color: var(--gray-700); margin-bottom: 8px; }

/* ── Tab ──────────────────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; gap: 0; }
.tab-btn {
  padding: 10px 18px; font-size: .875rem; font-weight: 600; color: var(--gray-500);
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: var(--transition);
}
.tab-btn.active { color: var(--green-700); border-bottom-color: var(--green-600); }
.tab-btn:hover:not(.active) { color: var(--gray-800); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Hero (Landing) ──────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 60%, var(--green-700) 100%);
  color: var(--white); padding: 80px 0 100px; 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.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.hero h1    { font-size: 3rem; color: var(--white); margin-bottom: 16px; line-height: 1.1; }
.hero h1 em { color: var(--green-400); font-style: normal; }
.hero-sub   { font-size: 1.15rem; color: rgba(255,255,255,.8); max-width: 540px; margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero   { padding: 13px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-hero-outline {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,.4); padding: 12px 26px; font-size: 1rem;
  border-radius: var(--radius); transition: var(--transition);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }
.hero-visual {
  position: absolute; right: 60px; top: 50%; transform: translateY(-50%);
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; opacity: .35;
}
.hero-chip {
  background: rgba(255,255,255,.1); border-radius: 8px; padding: 10px 14px;
  font-size: .8rem; color: var(--white); text-align: center; white-space: nowrap;
}

/* ── Section ──────────────────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section-title { font-size: 1.7rem; font-weight: 800; margin-bottom: 8px; }
.section-sub   { color: var(--gray-600); font-size: 1rem; margin-bottom: 40px; }
.section-dark  { background: var(--gray-900); color: var(--white); }
.section-dark .section-title { color: var(--white); }
.section-dark p { color: rgba(255,255,255,.7); }
.section-green { background: var(--green-900); color: var(--white); }
.section-green .section-title { color: var(--white); }

/* ── Cara Kerja Cards ─────────────────────────────────────────────────────── */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.how-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 24px;
  border: 1px solid var(--gray-200); text-align: center;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.how-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.how-number { font-size: .75rem; font-weight: 800; color: var(--green-600); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.how-icon   { font-size: 2rem; margin-bottom: 10px; }
.how-title  { font-weight: 700; margin-bottom: 6px; }
.how-desc   { font-size: .85rem; color: var(--gray-600); line-height: 1.5; }

/* ── Tier Cards ───────────────────────────────────────────────────────────── */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.tier-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 28px 22px;
  border: 2px solid var(--gray-200); position: relative; transition: var(--transition);
}
.tier-card.featured { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(92,184,92,.2); }
.tier-popular {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--green-600); color: var(--white); font-size: .72rem; font-weight: 700;
  padding: 4px 12px; border-radius: 99px; text-transform: uppercase; letter-spacing: .5px;
}
.tier-name  { font-size: .85rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.tier-price { font-size: 1.9rem; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.tier-price small { font-size: .9rem; font-weight: 500; color: var(--gray-500); }
.tier-features { list-style: none; margin: 16px 0; }
.tier-features li { padding: 5px 0; font-size: .875rem; color: var(--gray-700); }
.tier-features li::before { content: '✓ '; color: var(--green-600); font-weight: 700; }

/* ── NDVI class legend big ────────────────────────────────────────────────── */
.ndvi-classes-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ndvi-class-card   {
  border-radius: var(--radius); overflow: hidden; text-align: center;
  box-shadow: var(--shadow-sm);
}
.ndvi-class-color  { height: 60px; }
.ndvi-class-info   { background: var(--white); padding: 10px 8px; }
.ndvi-class-label  { font-size: .8rem; font-weight: 700; color: var(--gray-800); }
.ndvi-class-range  { font-size: .72rem; color: var(--gray-500); font-family: var(--font-mono); }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 20px 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.mt-1 { margin-top: 4px; }   .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }  .mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.flex { display: flex; } .flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hidden { display: none !important; }

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--gray-200); border-top-color: var(--green-600);
  animation: spin .7s linear infinite; margin: 0 auto;
}
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; top: 76px; right: 16px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--gray-900); color: var(--white);
  font-size: .875rem; box-shadow: var(--shadow-lg);
  animation: slideIn .2s ease; min-width: 240px; max-width: 320px;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }

/* ── Auth pages ───────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  padding: 20px;
}
.auth-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 36px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h2 { font-size: 1.5rem; color: var(--green-800); }
.auth-logo p  { color: var(--gray-500); font-size: .9rem; margin-top: 4px; }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes pulse   { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero-visual { display: none; }
  .ndvi-classes-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .navbar-toggle { display: block; }
  .navbar-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--green-900);
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    padding: 6px 12px 10px;
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav .nav-link {
    padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .navbar-nav .nav-link:last-child { border-bottom: none; }
  .tabs { gap: 0; overflow-x: auto; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Leaflet Map Overrides ────────────────────────────────────────────────── */
.leaflet-container { font-family: var(--font) !important; }
.ndvi-slider-control { min-width: 200px; }

/* Fullscreen map */
#ndvi-map:-webkit-full-screen { height: 100vh !important; }
#ndvi-map:-moz-full-screen    { height: 100vh !important; }
#ndvi-map:fullscreen           { height: 100vh !important; }

/* Map card responsive */
@media (max-width: 768px) {
  #ndvi-map, #modal-ndvi-map { height: 280px !important; }
}

/* FIX: kontrol Leaflet (legenda, dsb) punya z-index 1000 bawaan — lebih
   tinggi dari navbar (z-index:100), jadi saat halaman di-scroll, peta bisa
   tampak menutupi navbar. `isolation: isolate` membuat konteks stacking baru
   yang mengurung SEMUA elemen internal Leaflet (berapa pun z-index-nya) di
   dalam kontainer peta ini saja — tidak akan pernah bisa "bocor" ke atas
   elemen lain di luar peta, seperti navbar. */
#ndvi-map, #modal-ndvi-map, #modal-map {
  isolation: isolate;
}