/* ══════════════════════════════════════
   Koimeret LIS — Styles
   ══════════════════════════════════════ */

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

:root {
  --primary: #1a5f3a;
  --primary-light: #2d8a56;
  --primary-dark: #0f3d24;
  --accent: #e8a838;
  --accent-light: #f0c060;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1a1d23;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --radius: 10px;
  --radius-lg: 14px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-width: 240px;
  --header-h: 56px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
}

/* ── Loading ── */
.loading-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #0c2e1a, var(--primary-dark));
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loader-wrap { text-align: center; }
.loader {
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 20px;
}
.loader-wrap h2 { font-size: 18px; color: #fff; font-weight: 600; }
.loader-wrap p { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Header ── */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--primary-dark), #0c2e1a);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,0.15);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: rgba(255,255,255,0.7); fill: none; stroke-width: 2; }

.header-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.brand-icon svg { width: 18px; height: 18px; fill: var(--primary-dark); }
.header-brand h1 { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.header-brand span { font-size: 11px; color: rgba(255,255,255,0.45); }

.header-stats { display: flex; gap: 12px; }
.stat-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  font-size: 11px; color: rgba(255,255,255,0.6);
}
.stat-chip .num { color: var(--accent-light); font-weight: 700; font-size: 12px; }

.header-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.header-btn:hover { background: rgba(255,255,255,0.15); }
.header-btn svg { width: 18px; height: 18px; stroke: rgba(255,255,255,0.7); fill: none; stroke-width: 1.5; }

/* ── App Layout ── */
.app-layout {
  display: flex;
  height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
}

/* ── Sidebar Nav ── */
.sidebar-nav {
  width: var(--nav-width);
  min-width: var(--nav-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  z-index: 800;
  transition: transform var(--transition);
}
.nav-section { padding: 8px 0; }
.nav-section:not(:last-child) { border-bottom: 1px solid var(--border); }
.nav-label {
  padding: 12px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.nav-item svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none; stroke-width: 1.5;
  flex-shrink: 0;
}
.nav-item:hover { color: var(--text); background: var(--bg); }
.nav-item.active {
  color: var(--primary);
  background: #f0fdf4;
  border-left-color: var(--primary);
  font-weight: 600;
}
.nav-footer { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border); }
.nav-footer-text { font-size: 10px; color: var(--text-muted); line-height: 1.5; }

/* ── Main Content ── */
.main-content { flex: 1; overflow: hidden; position: relative; }
.page { display: none; height: 100%; overflow-y: auto; }
.page.active { display: block; }
#page-parcels.active { display: flex; flex-direction: column; overflow: hidden; }

.page-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.page-header h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.page-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Parcel Viewer Layout ── */
.parcel-layout { display: flex; height: 100%; }

.parcel-sidebar {
  width: 360px; min-width: 360px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), opacity var(--transition);
  position: relative;
  z-index: 500;
}
.parcel-sidebar.collapsed {
  transform: translateX(-360px);
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.panel-search { padding: 16px; border-bottom: 1px solid var(--border); }

.search-box { position: relative; }
.search-box svg {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg);
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 58, 0.08);
  background: #fff;
}
.search-box input::placeholder { color: #9ca3af; }

.search-suggestions {
  position: absolute; top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 200px; overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: var(--shadow-lg);
}
.search-suggestions.visible { display: block; }
.suggestion-item {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  display: flex; justify-content: space-between; align-items: center;
}
.suggestion-item:hover { background: #f0fdf4; }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item .s-pid { font-weight: 600; color: var(--primary); }
.suggestion-item .s-area { color: var(--text-muted); font-size: 11px; }

/* ── Filter Chips ── */
.filter-bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chip {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: inherit;
}
.chip:hover { border-color: var(--primary-light); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── List Header ── */
.list-header {
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between;
  background: var(--bg);
}

/* ── Parcel List ── */
.parcel-list { flex: 1; overflow-y: auto; scrollbar-width: thin; }
.parcel-item {
  display: flex; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  gap: 12px;
}
.parcel-item:hover { background: #f0fdf4; }
.parcel-item.active { background: #dcfce7; border-left: 3px solid var(--primary); padding-left: 13px; }

.pi {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pi svg { width: 16px; height: 16px; stroke-width: 1.5; fill: none; }
.pi-sm { background: #fef3c7; }
.pi-sm svg { stroke: #92400e; }
.pi-md { background: #dbeafe; }
.pi-md svg { stroke: #1e40af; }
.pi-lg { background: #ede9fe; }
.pi-lg svg { stroke: #5b21b6; }

.p-info { flex: 1; min-width: 0; }
.p-info .pid { font-weight: 600; font-size: 13px; }
.p-info .area { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.p-badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.b-sm { background: #fef3c7; color: #92400e; }
.b-md { background: #dbeafe; color: #1e40af; }
.b-lg { background: #ede9fe; color: #5b21b6; }

/* ── Detail Panel ── */
.detail-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  inset: 0;
  background: var(--surface);
  z-index: 10;
}
.detail-panel.visible { display: flex; }

.detail-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.back-btn, .icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  font-family: inherit;
}
.back-btn:hover, .icon-btn:hover { background: var(--bg); }
.back-btn svg, .icon-btn svg { width: 16px; height: 16px; stroke: var(--text); fill: none; stroke-width: 2; }
.detail-title { font-size: 16px; font-weight: 700; flex: 1; }

.detail-body { padding: 16px; flex: 1; overflow-y: auto; }

.d-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.d-card h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 700;
}
.d-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.d-row:last-child { border-bottom: none; }
.d-row .label { font-size: 12px; color: var(--text-muted); }
.d-row .value { font-size: 13px; font-weight: 600; }

.area-bar-wrap {
  margin-top: 12px; height: 6px;
  background: #e5e7eb; border-radius: 3px; overflow: hidden;
}
.area-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.d-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ── Map ── */
.map-wrap { flex: 1; position: relative; display: flex; flex-direction: column; }

.map-toolbar {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 700;
  flex-shrink: 0;
}
.map-toolbar-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }

.map-btn {
  width: 34px; height: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  font-family: inherit;
}
.map-btn:hover { background: var(--bg); border-color: #d1d5db; }
.map-btn svg { width: 18px; height: 18px; stroke: var(--text); fill: none; stroke-width: 1.5; }

.layer-select { position: relative; }
.layer-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 800;
}
.layer-dropdown.visible { display: flex; flex-direction: column; gap: 2px; }
.layer-opt {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: inherit;
  text-align: left;
}
.layer-opt:hover { background: var(--bg); }
.layer-opt.active { background: var(--primary); color: #fff; }

#map { flex: 1; width: 100%; position: relative; z-index: 1; }

.map-tooltip {
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  background: var(--surface);
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  white-space: nowrap;
}
.map-tooltip.visible { opacity: 1; }
.map-tooltip kbd {
  display: inline-block;
  padding: 1px 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
}

/* ── Leaflet Tooltip ── */
.parcel-tooltip {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
  padding: 6px 12px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--primary-dark) !important;
}
.parcel-tooltip::before { border-top-color: var(--border) !important; }

/* ── Leaflet Overrides ── */
.leaflet-control-zoom { display: none !important; }
.leaflet-popup-content-wrapper { border-radius: var(--radius) !important; box-shadow: var(--shadow-lg) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 12px 16px !important; font-family: 'Inter', sans-serif !important; font-size: 12px !important; }

/* ── Services Grid ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 24px 32px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  cursor: default;
  position: relative;
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.svc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.svc-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.si-green { background: #dcfce7; color: #166534; }
.si-blue { background: #dbeafe; color: #1e40af; }
.si-purple { background: #ede9fe; color: #5b21b6; }
.si-amber { background: #fef3c7; color: #92400e; }
.si-red { background: #fee2e2; color: #991b1b; }
.si-gray { background: #f3f4f6; color: #374151; }

.service-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.service-card p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.svc-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.tag-backend { background: #fef3c7; color: #92400e; }
.tag-active { background: #dcfce7; color: #166534; }

/* ── Dashboard ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 32px;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.dash-card.wide { grid-column: span 2; }
.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.stat-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.stat-val { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.chart-card h3 {
  font-size: 13px; font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Forms ── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 480px;
}
.form-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
  background: var(--bg);
}
.form-group input:focus,
.form-group select:focus { border-color: var(--primary); background: #fff; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
}
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-light); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ── Search Page ── */
.search-page-content { padding: 24px 32px; display: flex; gap: 24px; flex-wrap: wrap; }
.search-result-card {
  flex: 1; min-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.result-header h3 { font-size: 15px; font-weight: 600; }

/* ── Export Page ── */
.export-layout { display: flex; gap: 24px; padding: 24px 32px; height: calc(100% - 80px); }
.export-controls { width: 320px; flex-shrink: 0; }
.export-preview-wrap {
  flex: 1;
  background: #e5e7eb;
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow: auto;
  display: flex;
  justify-content: center;
}
.export-preview {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-height: 400px;
  width: 100%;
  max-width: 800px;
  overflow: hidden;
}
.export-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}
.export-empty svg { width: 48px; height: 48px; stroke: #d1d5db; fill: none; stroke-width: 1; margin-bottom: 16px; }
.export-empty p { font-size: 13px; }

.export-actions { display: flex; gap: 8px; margin-top: 16px; }
.export-actions .btn { flex: 1; justify-content: center; }

/* ── Calculator ── */
.calc-layout { padding: 24px 32px; }
.calc-result {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.calc-result-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.calc-result-row span:last-child { font-weight: 600; color: var(--text); }
.calc-result-row.total {
  border-top: 2px solid var(--primary);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 15px;
}
.calc-result-row.total span { color: var(--primary); }
.calc-result-row.total span:last-child { font-weight: 700; font-size: 18px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-card.wide { grid-column: span 2; }
  .header-stats { display: none; }
  .parcel-sidebar { width: 300px; min-width: 300px; }
}

@media (max-width: 768px) {
  :root { --header-h: 50px; --nav-width: 260px; }

  .nav-toggle { display: flex; }
  .header-brand h1 { font-size: 13px; }
  .header-brand span { display: none; }
  .header-stats { display: none; }

  .sidebar-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--nav-width);
    transform: translateX(-100%);
    z-index: 900;
    box-shadow: var(--shadow-lg);
  }
  .sidebar-nav.open { transform: translateX(0); }

  /* Parcel viewer: map on top, list below */
  .parcel-layout { flex-direction: column-reverse; height: 100%; }
  .parcel-sidebar {
    width: 100% !important;
    min-width: unset !important;
    height: 40%;
    z-index: 600;
    border-right: none;
    border-top: 1px solid var(--border);
    transition: height var(--transition);
    overflow: hidden;
  }
  .parcel-sidebar.collapsed {
    height: 0;
    opacity: 1;
    transform: none;
    pointer-events: none;
  }

  /* Detail panel on mobile */
  .detail-panel {
    position: fixed !important;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    z-index: 800 !important;
    border-radius: 0;
  }

  .map-wrap { flex: 1; min-height: 0; height: 60%; }
  .map-toolbar { flex-wrap: wrap; padding: 6px 8px; gap: 3px; }
  .map-btn { width: 32px; height: 32px; }
  .map-btn svg { width: 16px; height: 16px; }
  .map-toolbar-sep { height: 20px; }
  .map-tooltip { font-size: 11px; padding: 6px 12px; bottom: 10px; }

  .dashboard-grid { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .dash-card.wide { grid-column: span 1; }
  .stat-card { gap: 10px; }
  .stat-val { font-size: 18px; }
  .stat-icon { width: 40px; height: 40px; }

  .services-grid { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .service-card { padding: 18px; }

  .page-header { padding: 18px 16px 14px; }
  .page-header h2 { font-size: 17px; }

  .export-layout { flex-direction: column; padding: 16px; gap: 16px; height: auto; }
  .export-controls { width: 100%; }
  .export-preview-wrap { padding: 12px; }
  .form-card { max-width: 100%; }

  .search-page-content { flex-direction: column; padding: 16px; gap: 16px; }
  .search-result-card { min-width: unset; }

  .calc-layout { padding: 16px; }
}

@media (max-width: 480px) {
  .parcel-sidebar { height: 50vh; }
  .map-wrap { height: 50vh; }
  .filter-bar { gap: 4px; padding: 8px 12px; }
  .chip { padding: 4px 10px; font-size: 10px; }
  .parcel-item { padding: 8px 12px; gap: 10px; }
  .pi { width: 30px; height: 30px; }
  .p-info .pid { font-size: 12px; }
  .p-info .area { font-size: 10px; }
  .services-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ── Mobile Info Bar ── */
#mobileInfoBar {
  position: absolute;
  bottom: 12px; left: 12px; right: 12px;
  z-index: 700;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
}
.mib-content { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mib-main { display: flex; flex-direction: column; }
.mib-main strong { font-size: 14px; }
.mib-main span { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.mib-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mib-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.mib-detail { background: var(--primary); color: #fff; }
.mib-close { background: var(--bg); color: var(--text-muted); font-size: 18px; padding: 4px 10px; }

/* ── Overlay for mobile nav ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0,0,0,0.3);
  z-index: 899;
}
.nav-overlay.visible { display: block; }
