/* ============================================================
   GIS PASAR SEMARANG - Main Stylesheet (v3 - New Palette)
   Font: Bricolage Grotesque (display) + Geist (body)
   Palette: Deep Teal + Terracotta + Warm Amber + Cream
   ============================================================ */

:root {
  /*
   * PALET WARNA — GIS PASAR SEMARANG
   * Filosofi: cokelat & krem sebagai base netral hangat (kain mori, tanah Jawa),
   * merah bata hanya sebagai AKSEN identitas (bukan warna dominan UI),
   * emas priyayi untuk highlight & ornamen,
   * biru pesisir & hijau untuk status/informasi.
   */

  /* Primary UI: Cokelat Hangat (akar Jawa Tengah) — untuk sidebar, heading, elemen utama */
  --primary-950: #1a1108;
  --primary-900: #2e1e0d;
  --primary-800: #4a3018;
  --primary-700: #6b4423;
  --primary-600: #8b5e33;
  --primary-500: #a87244;
  --primary-400: #c49068;
  --primary-300: #d8b090;
  --primary-200: #ead0b8;
  --primary-100: #f5e8d8;
  --primary-50:  #faf4ec;

  /* Aksen: Merah Bata Semarang — HANYA untuk highlight, badge, CTA utama, garis aktif */
  --accent-950: #2d0a06;
  --accent-900: #5a1510;
  --accent-800: #7d1f17;
  --accent-700: #9e2a1f;
  --accent-600: #b83728;
  --accent-500: #c94535;
  --accent-400: #d9695c;
  --accent-300: #e8968c;
  --accent-200: #f2c2bc;
  --accent-100: #fae4e1;
  --accent-50:  #fdf3f2;

  /* Emas Priyayi — ornamen, border aktif, highlight tipografi */
  --gold-900: #3d2200;
  --gold-700: #7a4a00;
  --gold-500: #b87a10;
  --gold-400: #d4a030;
  --gold-300: #e8c060;
  --gold-200: #f5dc98;
  --gold-100: #fdf0c8;
  --gold-50:  #fffae8;

  /* Biru Pesisir — info, link, elemen data */
  --blue-900: #0c2340;
  --blue-700: #1a4a7a;
  --blue-500: #2868b0;
  --blue-300: #7ab0e0;
  --blue-100: #dceaf8;

  /* Hijau Alam — success, status aktif/buka */
  --green-900: #0d2e12;
  --green-700: #1d6428;
  --green-500: #2e9440;
  --green-300: #72c082;
  --green-100: #d4eeda;

  /* Status semantik */
  --success: #16a34a;
  --warning: #d97706;
  --danger:  #c94535;
  --info:    #2563eb;

  /* Netral Hangat — body text, borders, backgrounds */
  --ink-900: #1a1511;
  --ink-800: #2c2218;
  --ink-700: #524030;
  --ink-500: #856a54;
  --ink-300: #c0a888;
  --bone:       #f7f2eb;
  --bone-dark:  #ede5d5;
  --paper:      #fdfaf4;
  --paper-warm: #fffcf5;
  --line:       #ddd0b8;
  --line-soft:  #eee6d2;

  /* Legacy aliases */
  --rust-500:     var(--accent-500);
  --amber-500:    var(--gold-500);
  --amber-400:    var(--gold-400);
  
  --shadow-xs: 0 1px 2px rgba(20, 17, 12, 0.04);
  --shadow-sm: 0 2px 4px rgba(20, 17, 12, 0.06), 0 1px 2px rgba(20, 17, 12, 0.04);
  --shadow-md: 0 4px 14px rgba(20, 17, 12, 0.08), 0 2px 4px rgba(20, 17, 12, 0.04);
  --shadow-lg: 0 12px 28px rgba(20, 17, 12, 0.12), 0 4px 8px rgba(20, 17, 12, 0.06);
  --shadow-xl: 0 20px 48px rgba(20, 17, 12, 0.18), 0 8px 16px rgba(20, 17, 12, 0.08);
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', monospace;
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-900);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(180,120,50,.03) 0%, transparent 35%),
    radial-gradient(circle at 80% 85%, rgba(168,100,40,.02) 0%, transparent 35%);
}

input, button, select, textarea { font-family: inherit; font-size: 16px; }
a { color: inherit; text-decoration: none; }

/* ─────────── LAYOUT (FLEXBOX - FIXED) ─────────── */
.app {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ─────────── SIDEBAR ─────────── */
.sidebar {
  background: linear-gradient(180deg, #1a1108 0%, #2e1e0d 50%, #3d2810 100%);
  color: var(--bone);
  padding: 24px 20px;
  border-right: 1px solid rgba(168,114,68,.2);
  width: 260px;
  min-width: 260px;
  height: 100vh;
  overflow-y: auto;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  position: relative;
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 200px;
  background: radial-gradient(ellipse at top right, rgba(180,120,50,.08) 0%, transparent 60%);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(180,130,70,.15);
  margin-bottom: 24px;
  position: relative;
}

.brand-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-700) 100%);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 12px rgba(180,120,40,.35);
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 500;
}

.nav-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0 12px;
  margin-bottom: 8px;
  margin-top: 24px;
  font-weight: 500;
}
.nav-label:first-of-type { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--bone); }
.nav-item.active {
  background: rgba(201,69,53,.18);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid var(--accent-500);
  padding-left: 9px;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  padding-left: 12px;
  line-height: 1.5;
}
.sidebar-footer strong { color: var(--gold-300); font-weight: 600; display: block; margin-bottom: 4px; }

/* ─────────── MAIN (FIXED) ─────────── */
.main {
  flex: 1 1 0%;
  min-width: 0;
  display: block;
  position: relative;
}

.topbar {
  background: rgba(253, 250, 244, 0.92);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.menu-toggle {
  display: none;
  background: var(--ink-900);
  color: var(--bone);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 20px; height: 20px; }

.page-title-wrap { flex: 1; min-width: 0; }
.page-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
  font-weight: 600;
  margin-bottom: 4px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink-900);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bone);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-800);
  transition: all 0.15s;
  position: relative;
}
.icon-btn:hover { background: var(--bone-dark); }
.icon-btn svg { width: 18px; height: 18px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.02em;
}
.user-name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 6px;
  display: none;
  z-index: 60;
}
.user-chip.open .user-dropdown { display: block; }
.user-dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 4px;
  color: var(--ink-900);
}
.user-dropdown a:hover { background: var(--bone); }
.user-dropdown a.danger { color: var(--rust-500); }

.page {
  padding: 32px;
  width: 100%;
}

/* ─────────── DASHBOARD ─────────── */
.hero-card {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-950) 60%, #051713 100%);
  color: var(--bone);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(224, 142, 11, 0.15);
  box-shadow: var(--shadow-lg);
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(224, 142, 11, 0.25), transparent 60%);
  border-radius: 50%;
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(193, 78, 44, 0.18), transparent 65%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; }
.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(224, 142, 11, 0.15);
  border: 1px solid rgba(240, 167, 44, 0.4);
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-200);
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
  max-width: 640px;
  color: #fff;
}
.hero-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--accent-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}
.hero-desc {
  color: rgba(255,255,255,0.75);
  max-width: 580px;
  margin-bottom: 28px;
  line-height: 1.6;
  font-size: 15px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  color: var(--green-300);
  letter-spacing: -0.035em;
  line-height: 1;
}
.hero-stat-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent, var(--green-500));
}
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-bg, var(--green-100));
  color: var(--accent, var(--green-700));
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-label {
  font-size: 11px;
  color: var(--ink-700);
  opacity: 0.7;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat-delta {
  font-size: 12px;
  color: var(--green-700);
  margin-top: 6px;
  font-weight: 600;
}
.stat-delta.down { color: var(--rust-500); }

.row-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 22px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.panel-sub {
  font-size: 12px;
  color: var(--ink-700);
  opacity: 0.6;
  margin-top: 4px;
}
.panel-link {
  font-size: 12px;
  color: var(--green-700);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Market list */
.market-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}
.market-row:last-child { border-bottom: none; }
.market-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--green-100);
  color: var(--green-900);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.market-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.market-focus { font-size: 12px; color: var(--ink-700); opacity: 0.7; margin-top: 2px; line-height: 1.4; }
.market-progress { text-align: right; }
.market-progress-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}
.progress-bar {
  width: 100px;
  height: 4px;
  background: var(--bone-dark);
  border-radius: 100px;
  margin-top: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green-500);
  border-radius: 100px;
  transition: width 0.6s ease;
}

/* Activity list */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  margin-top: 6px;
  flex-shrink: 0;
}
.activity-dot.amber { background: var(--amber-500); }
.activity-dot.rust { background: var(--rust-500); }
.activity-text { font-size: 13px; line-height: 1.5; }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: 11px; color: var(--ink-700); opacity: 0.5; margin-top: 4px; font-weight: 500; }

/* ─────────── FILTER BAR & TABLE ─────────── */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.search-input {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.search-input input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input input:focus { border-color: var(--green-500); }
.search-input svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-700);
  opacity: 0.5;
}
.filter-select {
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  color: var(--ink-900);
  font-weight: 500;
}
.filter-select:focus { border-color: var(--green-500); }

.btn {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.01em;
  font-family: var(--font-body);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { 
  background: var(--primary-800);
  color: #fff;
  border-color: var(--primary-800);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { 
  background: var(--primary-700);
  border-color: var(--primary-700);
  transform: translateY(-1px); 
  box-shadow: var(--shadow-md); 
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-900); }
.btn-ghost:hover { background: var(--bone); border-color: var(--ink-500); }
.btn-danger { 
  background: var(--accent-600);
  color: white;
  border-color: var(--accent-600);
  box-shadow: var(--shadow-sm);
}
.btn-danger:hover { 
  background: var(--accent-700);
  border-color: var(--accent-700);
  transform: translateY(-1px);
}

.table-wrap {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 720px;
}
thead { background: var(--bone); border-bottom: 1px solid var(--line); }
th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-700);
}
td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(245, 241, 232, 0.5); }

.ped-name { display: flex; align-items: center; gap: 10px; }
.ped-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-900);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  overflow: hidden;
}
.ped-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.ped-info-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.ped-info-sub { font-size: 12px; color: var(--ink-700); opacity: 0.6; font-family: var(--font-mono); }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-active { background: var(--accent-100); color: var(--accent-700); border-color: var(--accent-200); }
.badge-inactive { background: var(--accent-100); color: var(--accent-900); border-color: var(--accent-200); }
.badge-warn { background: var(--gold-100); color: var(--gold-700); border-color: var(--gold-200); }
.badge-kios { background: var(--gold-100); color: var(--gold-700); border-color: var(--gold-200); }
.badge-los { background: var(--gold-100); color: var(--gold-700); border-color: var(--gold-200); }
.badge-dasaran { background: var(--accent-100); color: var(--accent-900); border-color: var(--accent-200); }

.row-actions { display: flex; gap: 6px; }
.row-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-800);
  transition: all 0.15s;
}
.row-action-btn:hover { background: var(--bone); }
.row-action-btn svg { width: 14px; height: 14px; }
.row-action-btn.danger:hover { background: #fee; color: var(--rust-500); border-color: var(--rust-500); }

.table-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bone);
  font-size: 13px;
  color: var(--ink-700);
  flex-wrap: wrap;
  gap: 10px;
}
.pager { display: flex; gap: 4px; }
.pager button {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.pager button.active { background: var(--ink-900); color: var(--bone); border-color: var(--ink-900); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-700);
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.3; margin-bottom: 12px; }
.empty-state h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.02em; }
.empty-state p { font-size: 13px; opacity: 0.7; }

/* ─────────── MAP ─────────── */
.map-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 88px);
  min-height: 540px;
  padding: 16px 32px;
  box-sizing: border-box;
}

/* Bar filter & legend DI LUAR peta */
.map-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.map-controls-left {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}
.map-legend-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  flex-shrink: 0;
}
.legend-dot-inline {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Map + sidebar row */
.map-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line-soft);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}
.map-container {
  position: relative;
  overflow: hidden;
  height: 100%;
}
#map { width: 100%; height: 100%; background: #e8e3d2; }

/* Filter pills */
.map-pill {
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--paper);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-800);
  white-space: nowrap;
  transition: all 0.15s;
}
.map-pill:hover { background: var(--primary-100); border-color: var(--primary-400); }
.map-pill.active { background: var(--primary-800); color: var(--bone); border-color: var(--primary-800); }

/* Side panel */
.map-side {
  background: var(--paper);
  border-left: 1px solid var(--line-soft);
  padding: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}
.map-side-header { flex-shrink: 0; margin-bottom: 12px; }
#pedListMap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}
.map-side h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}
.map-side-sub {
  font-size: 11px;
  color: var(--ink-700);
  opacity: 0.6;
  margin-bottom: 0;
  line-height: 1.5;
}
/* ─────────── PED-CARD (peta sidebar) ─────────── */
.ped-card {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.ped-card:hover {
  border-color: var(--primary-400);
  box-shadow: var(--shadow-md);
}
.ped-card.active {
  border-color: var(--primary-700);
  background: linear-gradient(135deg, var(--primary-50, #f0fdf9) 0%, #fff 100%);
  box-shadow: 0 0 0 2px var(--primary-300, #6ee7d1);
}
.ped-card.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-500);
}

/* Row: foto | info | CTA */
.ped-card-inner {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

/* Foto/Avatar — persegi dengan border-radius, cukup besar untuk pas foto */
.ped-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-200) 0%, var(--primary-400) 100%);
  color: var(--primary-900);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid rgba(0,0,0,.06);
  font-family: var(--font-display);
}
.ped-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

/* Info tengah */
.ped-card-body { min-width: 0; overflow: hidden; }
.ped-card-header { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; min-width: 0; }
.ped-card-name {
  font-weight: 600; font-size: 13px; letter-spacing: -0.01em; color: var(--ink-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}
.ped-card-header .badge { flex-shrink: 0; font-size: 10px; padding: 1px 5px; }
.ped-card-loc {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-700); opacity: .7;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ped-card-cat {
  font-size: 11.5px; color: var(--ink-700); margin-top: 3px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* CTA — ikon vertikal di kanan */
.ped-card-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.ped-card-btn {
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: #fff;
  color: var(--ink-600);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.12s;
  font-family: var(--font-body);
}
.ped-card-btn svg { width: 14px; height: 14px; }
.ped-card-btn:hover { background: var(--primary-100); border-color: var(--primary-300); color: var(--primary-800); }
.ped-card-btn.primary { background: var(--primary-800); border-color: var(--primary-800); color: #fff; }
.ped-card-btn.primary:hover {
  background: var(--primary-900);
  border-color: var(--primary-900);
  color: #fff;
}

/* ─────────── MAP SEARCH ─────────── */
.map-search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.map-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-500);
  pointer-events: none;
}
.map-search-input {
  width: 100%;
  padding: 11px 38px 11px 40px;
  font-size: 14px;
  font-family: var(--font-body);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-900);
  outline: none;
  transition: all 0.15s;
}
.map-search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(26, 157, 138, 0.12);
}
.map-search-input::placeholder {
  color: var(--ink-500);
}
.map-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bone-dark);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-700);
}
.map-search-clear:hover {
  background: var(--accent-200);
  color: var(--accent-700);
}
.map-search-info {
  font-size: 12px;
  color: var(--ink-700);
  opacity: 0.7;
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

/* ─────────── LEAFLET MARKER HIGHLIGHT ─────────── */
.marker-highlight {
  animation: pulse-marker 1.8s ease-in-out infinite;
  z-index: 999 !important;
  pointer-events: none !important;
}
@keyframes pulse-marker {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.8; }
}
.marker-highlight-outer {
  animation: pulse-marker-outer 1.8s ease-out infinite;
  z-index: 998 !important;
  pointer-events: none !important;
}
@keyframes pulse-marker-outer {
  0% { opacity: 0.5; }
  100% { opacity: 0; }
}

/* ─────────── DETAIL PEDAGANG MODAL ─────────── */
.detail-modal { max-width: 760px; overflow: hidden; }
.detail-header {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 50%, var(--primary-950) 100%);
  border-bottom: 4px solid var(--gold-400);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.detail-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(224, 142, 11, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.detail-header::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(193, 78, 44, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.detail-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-700) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.95);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}
.detail-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.detail-title-wrap { flex: 1; min-width: 0; position: relative; z-index: 1; }
.detail-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.detail-kode {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold-200);
  opacity: 0.95;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-badges .badge {
  background: rgba(255,255,255,0.95);
  color: var(--primary-900);
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
  padding: 24px 28px;
  background: var(--paper);
}
.detail-grid-full { grid-column: 1 / -1; }
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-field-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-700);
  font-weight: 700;
}
.detail-field-value {
  font-size: 14px;
  color: var(--ink-900);
  font-weight: 500;
  word-break: break-word;
  line-height: 1.4;
}
.detail-field-value.mono { font-family: var(--font-mono); font-size: 13px; color: var(--primary-900); }
.detail-field-value.empty { color: var(--ink-500); opacity: 0.6; font-style: italic; font-weight: 400; }

/* Foto section */
.detail-fotos {
  padding: 0 28px 24px;
  background: var(--paper);
}
.detail-fotos-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-700);
  font-weight: 700;
  margin-bottom: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-fotos-title::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold-400);
}
.detail-fotos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.detail-foto-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: all 0.2s var(--ease-out);
}
.detail-foto-card:hover {
  border-color: var(--primary-400);
  box-shadow: var(--shadow-md);
}
.detail-foto-card-label {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-900);
  background: var(--primary-100);
  border-bottom: 1px solid var(--primary-200);
  letter-spacing: 0.02em;
}
.detail-foto-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  background: var(--bone);
  transition: transform 0.3s var(--ease-out);
}
.detail-foto-card:hover .detail-foto-img {
  transform: scale(1.03);
}
.detail-foto-empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  color: var(--ink-500);
  padding: 20px;
  line-height: 1.5;
  background: repeating-linear-gradient(45deg, var(--bone) 0, var(--bone) 8px, var(--paper) 8px, var(--paper) 16px);
}

/* Foto lightbox */
.foto-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 20px;
}
.foto-lightbox.active { display: flex; }
.foto-lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.foto-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 24px;
}
.foto-lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* Upload field */
.upload-field {
  border: 2px dashed var(--line-soft);
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bone);
  position: relative;
}
.upload-field:hover { border-color: var(--green-500); background: var(--green-100); }
.upload-field.has-file { border-style: solid; border-color: var(--green-500); padding: 0; overflow: hidden; }
.upload-field input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-700);
  opacity: 0.7;
  font-size: 12px;
}
.upload-placeholder svg { width: 24px; height: 24px; }
.upload-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--rust-500);
  color: var(--rust-500);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  z-index: 2;
}
.upload-remove:hover { background: var(--rust-500); color: #fff; }

@media (max-width: 600px) {
  .detail-header { flex-direction: column; text-align: center; padding: 20px 16px; }
  .detail-grid { grid-template-columns: 1fr; padding: 16px; }
  .detail-fotos { padding: 0 16px 16px; }
  .detail-fotos-grid { grid-template-columns: 1fr; }
  .detail-avatar-lg { width: 72px; height: 72px; font-size: 28px; }
  .detail-name { font-size: 20px; }
}

/* ─────────── MODAL ─────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 26, 0.5);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.modal-backdrop.active {
  display: flex;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--paper);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.modal-header p { font-size: 13px; color: var(--ink-700); opacity: 0.6; margin-top: 4px; }
.modal-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-800);
}
.modal-close:hover { background: var(--bone); }
.modal-body { padding: 20px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: 0.02em;
}
.form-field input, .form-field select, .form-field textarea {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 14px;
  outline: none;
  color: var(--ink-900);
  transition: border-color 0.15s;
  font-family: inherit;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--green-500);
}
.form-field textarea { resize: vertical; min-height: 60px; }
.form-help { font-size: 11px; color: var(--ink-700); opacity: 0.6; margin-top: 2px; }
.modal-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ─────────── PASAR CARDS ─────────── */
.pasar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.pasar-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.pasar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-300);
}
.pasar-banner {
  height: 130px;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  position: relative;
  overflow: hidden;
}
.pasar-banner::before {
  content: attr(data-letter);
  position: absolute;
  bottom: -40px;
  right: -10px;
  font-family: var(--font-display);
  font-size: 200px;
  font-weight: 700;
  color: rgba(255,255,255,0.08);
  line-height: 1;
  letter-spacing: -0.06em;
}
.pasar-banner-content {
  position: absolute;
  bottom: 16px;
  left: 20px;
  color: var(--bone);
  z-index: 2;
}
.pasar-banner h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.pasar-banner .tag {
  font-size: 11px;
  color: var(--green-300);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.pasar-body { padding: 20px; }
.pasar-focus {
  font-size: 13px;
  color: var(--ink-700);
  margin-bottom: 16px;
  line-height: 1.55;
}
.pasar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.pasar-stat-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--green-900);
  letter-spacing: -0.025em;
  line-height: 1;
}
.pasar-stat-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-700);
  opacity: 0.6;
  margin-top: 4px;
  font-weight: 600;
}

/* ─────────── TOAST ─────────── */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--ink-900);
  color: var(--bone);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: calc(100vw - 40px);
  font-weight: 500;
}
.toast.show { transform: translateX(0); }
.toast svg { width: 18px; height: 18px; color: var(--green-300); }
.toast.error svg { color: #fca5a5; }

/* ─────────── LOGIN PAGE ─────────── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 15%, rgba(180,120,50,.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(201,69,53,.04) 0%, transparent 45%),
    var(--paper);
}
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-700) 0%, var(--gold-400) 50%, var(--accent-400) 100%);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.login-brand .brand-mark { width: 50px; height: 50px; font-size: 26px; }
.login-brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.login-brand-sub {
  font-size: 11px;
  color: var(--ink-700);
  opacity: 0.7;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 500;
}
.login-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin-bottom: 8px;
  line-height: 1.1;
}
.login-sub { color: var(--ink-700); opacity: 0.7; font-size: 14px; margin-bottom: 28px; line-height: 1.5; }
.login-error {
  background: #fee;
  color: var(--rust-500);
  border: 1px solid #fca5a5;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 500;
}
.login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-700);
  opacity: 0.6;
  line-height: 1.5;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
  .row-2 { grid-template-columns: 1fr; }
  .map-shell { height: auto; padding: 12px; }
  .map-controls-bar { border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .map-body { grid-template-columns: 1fr; border-radius: 0 0 var(--radius-md) var(--radius-md); }
  .map-container { height: 300px; }
  .map-side { border-left: none; border-top: 1px solid var(--line-soft); max-height: 420px; height: auto; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero-title { font-size: 32px; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }

  .app { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 49;
    display: none;
  }
  .sidebar-overlay.active { display: block; }

  .menu-toggle { display: grid; }

  .topbar { padding: 14px 16px; }
  .page { padding: 16px; }
  .page-title { font-size: 22px; }
  .user-chip .user-name { display: none; }
  .user-chip { padding: 6px; }

  .hero-card { padding: 26px 22px; }
  .hero-title { font-size: 26px; }
  .hero-desc { font-size: 14px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .hero-stat-num { font-size: 28px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 18px; }
  .stat-value { font-size: 24px; }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .btn, .filter-bar .filter-select { width: 100%; justify-content: center; }
  .search-input { min-width: 0; }

  .form-grid { grid-template-columns: 1fr; }

  .panel { padding: 18px; }
  .panel-title { font-size: 17px; }

  /* === PETA MOBILE === */
  .map-shell { padding: 8px; }
  .map-controls-bar { padding: 8px 10px; gap: 6px; }
  .map-controls-left { gap: 4px; }
  .map-legend-inline { display: none; }
  .map-pill { padding: 5px 10px; font-size: 11px; }
  .map-container { height: 220px; }
  .map-side { max-height: 360px; padding: 12px; overflow: hidden; }
  .map-side h3 { font-size: 15px; margin-bottom: 2px; }
  .map-side-sub { display: none; }
  .map-search-wrap { margin-bottom: 8px; }

  /* Kartu pedagang lebih compact di mobile */
  .ped-card { padding: 10px 12px; gap: 10px; margin-bottom: 8px; }
  .ped-card-avatar { width: 38px; height: 38px; font-size: 13px; }
  .ped-card-name { font-size: 13px; }
  .ped-card-loc { font-size: 10px; }
  .ped-card-cat { font-size: 11px; margin-top: 4px; }
  .ped-card-actions { margin-top: 8px; padding-top: 8px; gap: 4px; }
  .ped-card-btn { padding: 5px 8px; font-size: 11px; }

  .modal-backdrop { padding: 16px; align-items: flex-end; }
  .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

  .market-progress .progress-bar { width: 60px; }

  .pasar-grid { grid-template-columns: 1fr; }

  .login-card { padding: 30px 24px; }
  .login-title { font-size: 26px; }
}

@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 24px; }
}

/* Leaflet customization */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
}
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; }
.leaflet-popup-content b { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.leaflet-control-attribution { font-size: 10px; }
