/* ============================================================
   Parcel Editor v2 — CSS
   ============================================================ */

/* --- Reset & Container --- */
.pe-root {
  --pe-primary: #2D6A4F;
  --pe-primary-hover: #245c43;
  --pe-navy: #0D1B2A;
  --pe-bg: #F8F7F4;
  --pe-card: #ffffff;
  --pe-border: #e5e7eb;
  --pe-muted: #6b7280;
  --pe-danger: #ef4444;
  --pe-warning: #f59e0b;
  --pe-success: #22c55e;
  --pe-radius: 10px;
  --pe-shadow: 0 2px 12px rgba(0,0,0,.08);
  --pe-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-family: var(--pe-font);
  background: var(--pe-bg);
  color: var(--pe-navy);
  position: relative;
  width: 100%; height: 100vh;
  display: flex; flex-direction: column;
  overflow: hidden; box-sizing: border-box;
  isolation: isolate;
}
.pe-root *, .pe-root *::before, .pe-root *::after { box-sizing: border-box; }

/* --- Topbar --- */
.pe-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 48px;
  background: var(--pe-navy); color: #fff; flex-shrink: 0;
  position: relative; z-index: 1000;
}
.pe-topbar-title { font-size: .875rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pe-topbar-title svg { width: 16px; height: 16px; opacity: .7; }
.pe-topbar-actions { display: flex; align-items: center; gap: 4px; }

/* --- Toggle Switch --- */
.pe-toggle-wrap { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: rgba(255,255,255,.6); }
.pe-toggle { position: relative; width: 36px; height: 20px; cursor: pointer; }
.pe-toggle input { display: none; }
.pe-toggle-track { position: absolute; inset: 0; background: #374151; border-radius: 10px; transition: background .2s; }
.pe-toggle input:checked + .pe-toggle-track { background: var(--pe-primary); }
.pe-toggle-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .2s; pointer-events: none; }
.pe-toggle input:checked ~ .pe-toggle-thumb { transform: translateX(16px); }

/* --- Topbar Buttons --- */
.pe-topbar-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; font-size: .7rem; font-weight: 500; font-family: inherit;
  border: 1px solid rgba(255,255,255,.12); border-radius: 5px;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.75);
  cursor: pointer; transition: all .15s;
}
.pe-topbar-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.pe-topbar-btn:disabled { opacity: .3; cursor: not-allowed; }
.pe-topbar-btn svg { width: 13px; height: 13px; }
.pe-topbar-btn-save { background: rgba(45,106,79,.6); border-color: rgba(45,106,79,.8); color: #fff; }
.pe-topbar-btn-save:hover { background: rgba(45,106,79,.85); }

/* --- Main Layout --- */
.pe-body { display: flex; flex: 1; min-height: 0; position: relative; }

/* --- Sidebar --- */
.pe-sidebar {
  width: 270px; background: var(--pe-card);
  border-right: 1px solid var(--pe-border);
  display: flex; flex-direction: column; flex-shrink: 0;
  overflow-y: auto; z-index: 50;
  transition: transform .25s ease, opacity .25s ease;
}
.pe-sidebar.collapsed { transform: translateX(-100%); opacity: 0; position: absolute; left: 0; top: 0; bottom: 0; pointer-events: none; }
.pe-sidebar-section { padding: 12px 12px 10px; border-bottom: 1px solid var(--pe-border); }
.pe-sidebar-section:last-child { border-bottom: none; }
.pe-section-title {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--pe-muted); margin-bottom: 8px;
  display: flex; align-items: center; gap: 5px;
}
.pe-section-title svg { width: 12px; height: 12px; }

/* --- Buttons --- */
.pe-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 10px; font-size: .78rem; font-weight: 500; font-family: inherit;
  border: 1px solid var(--pe-border); border-radius: 6px;
  background: var(--pe-card); color: var(--pe-navy);
  cursor: pointer; transition: all .15s; white-space: nowrap; line-height: 1.2;
}
.pe-btn:hover { background: #f3f4f6; }
.pe-btn:disabled { opacity: .35; cursor: not-allowed; }
.pe-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.pe-btn-primary { background: var(--pe-primary); color: #fff; border-color: var(--pe-primary); }
.pe-btn-primary:hover { background: var(--pe-primary-hover); }
.pe-btn-danger { background: #fef2f2; color: var(--pe-danger); border-color: #fecaca; }
.pe-btn-danger:hover { background: #fee2e2; }
.pe-btn-block { width: 100%; }
.pe-btn-group { display: flex; flex-direction: column; gap: 5px; }
.pe-btn.active { background: var(--pe-primary); color: #fff; border-color: var(--pe-primary); }

/* --- Project Search --- */
.pe-project-search { display: flex; gap: 6px; margin-bottom: 8px; }
.pe-search-input {
  flex: 1; padding: 5px 8px; font-size: .78rem; font-family: inherit;
  border: 1px solid var(--pe-border); border-radius: 6px;
  background: #f9fafb; color: var(--pe-navy); outline: none;
}
.pe-search-input:focus { border-color: var(--pe-primary); background: #fff; }

/* --- Project List --- */
.pe-project-list { max-height: 180px; overflow-y: auto; }
.pe-project-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 8px; border-radius: 6px; cursor: pointer;
  transition: background .12s; font-size: .78rem; gap: 6px;
}
.pe-project-item:hover { background: #f3f4f6; }
.pe-project-item.active { background: #ecfdf5; border-left: 3px solid var(--pe-primary); }
.pe-project-item-info { flex: 1; min-width: 0; }
.pe-project-item-name { font-weight: 600; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-project-item-meta { font-size: .65rem; color: var(--pe-muted); }
.pe-project-item-actions { display: flex; gap: 2px; flex-shrink: 0; }
.pe-project-btn {
  background: none; border: none; cursor: pointer; color: #d1d5db;
  padding: 3px; line-height: 1; transition: color .15s; border-radius: 4px;
}
.pe-project-btn:hover { color: var(--pe-navy); background: #f3f4f6; }
.pe-project-btn svg { width: 12px; height: 12px; }
.pe-project-del:hover { color: var(--pe-danger); }

/* --- Map Container --- */
.pe-map-wrap { flex: 1; position: relative; min-width: 0; z-index: 0; }
.pe-map { width: 100%; height: 100%; z-index: 0; }
.pe-map .leaflet-pane { z-index: 1; }
.pe-map .leaflet-control { z-index: 2; }

/* --- Geoman overrides --- */
.pe-map .leaflet-pm-toolbar { display: none !important; }

/* --- Map Fallback --- */
.pe-map-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; background: #e5e7eb;
  color: var(--pe-muted); font-size: .875rem; text-align: center; padding: 2rem;
}

/* --- Disabled Overlay --- */
.pe-disabled-overlay {
  position: absolute; inset: 0; background: rgba(248,247,244,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 80; backdrop-filter: blur(2px);
}
.pe-disabled-box { text-align: center; padding: 2rem; }
.pe-disabled-box svg { display: block; margin: 0 auto 12px; opacity: .35; }
.pe-disabled-box p { color: var(--pe-muted); font-size: .875rem; margin-bottom: 16px; }

/* --- Mode Bar --- */
.pe-mode-bar {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 60; background: var(--pe-navy); color: #fff;
  padding: 7px 16px; border-radius: 8px; font-size: .78rem; font-weight: 600;
  display: none; align-items: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.pe-mode-bar.visible { display: flex; }
.pe-mode-bar-cancel {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  padding: 3px 10px; border-radius: 5px; font-size: .72rem;
  cursor: pointer; font-family: inherit;
}
.pe-mode-bar-cancel:hover { background: rgba(255,255,255,.25); }

/* --- Info Panel --- */
.pe-info-panel {
  position: absolute; bottom: 16px; right: 16px; z-index: 70;
  width: 260px; background: var(--pe-card);
  border: 1px solid var(--pe-border); border-radius: var(--pe-radius);
  box-shadow: var(--pe-shadow); overflow: hidden;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
.pe-info-panel.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.pe-info-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--pe-border); background: #f9fafb;
}
.pe-info-header h4 { margin: 0; font-size: .82rem; font-weight: 700; }
.pe-info-close {
  background: none; border: none; cursor: pointer; color: var(--pe-muted);
  padding: 2px; line-height: 1; border-radius: 4px; transition: color .15s;
}
.pe-info-close:hover { color: var(--pe-navy); }
.pe-info-close svg { width: 14px; height: 14px; }
.pe-info-body { padding: 10px 12px; }
.pe-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; font-size: .78rem;
}
.pe-info-label { color: var(--pe-muted); }
.pe-info-value { font-weight: 600; }
.pe-info-actions {
  display: flex; gap: 4px; padding: 8px 12px;
  border-top: 1px solid var(--pe-border); background: #f9fafb;
}

/* --- Status Badges --- */
.pe-status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: .68rem; font-weight: 600; line-height: 1.4;
}
.pe-status-satista { background: #dcfce7; color: #166534; }
.pe-status-satildi { background: #fee2e2; color: #991b1b; }
.pe-status-rezerve { background: #fef3c7; color: #92400e; }

/* --- Toast --- */
.pe-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 9999; padding: 10px 20px; border-radius: 8px;
  background: var(--pe-navy); color: #fff; font-size: .8rem; font-weight: 500;
  font-family: var(--pe-font); box-shadow: 0 6px 24px rgba(0,0,0,.2);
  opacity: 0; pointer-events: none; transition: all .25s ease; white-space: nowrap;
}
.pe-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.pe-toast.success { background: #166534; }
.pe-toast.error { background: #991b1b; }

/* --- Parcel List --- */
.pe-parcel-list { max-height: 200px; overflow-y: auto; }
.pe-parcel-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  transition: background .12s; font-size: .78rem; gap: 6px;
}
.pe-parcel-item:hover { background: #f3f4f6; }
.pe-parcel-item.selected { background: #ecfdf5; }
.pe-parcel-item-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.pe-parcel-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.pe-parcel-item-name { font-weight: 600; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-parcel-item-area { font-size: .65rem; color: var(--pe-muted); }
.pe-parcel-item-del {
  background: none; border: none; cursor: pointer; color: #d1d5db;
  padding: 3px; line-height: 1; border-radius: 4px; transition: color .15s; flex-shrink: 0;
}
.pe-parcel-item-del:hover { color: var(--pe-danger); }
.pe-parcel-item-del svg { width: 12px; height: 12px; }

/* --- Stats --- */
.pe-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pe-stat {
  background: #f9fafb; border: 1px solid var(--pe-border);
  border-radius: 6px; padding: 8px; text-align: center;
}
.pe-stat-val { font-size: .82rem; font-weight: 700; }
.pe-stat-label { font-size: .62rem; color: var(--pe-muted); margin-top: 2px; }

/* --- Mobile Sidebar Toggle --- */
.pe-sidebar-toggle {
  display: none; position: absolute; top: 8px; right: 8px; z-index: 60;
  background: var(--pe-card); border: 1px solid var(--pe-border);
  border-radius: 8px; padding: 6px 8px; cursor: pointer;
  box-shadow: var(--pe-shadow); line-height: 1;
}
.pe-sidebar-toggle svg { width: 18px; height: 18px; color: var(--pe-navy); }
.pe-sidebar-toggle .pe-toggle-menu { display: block; }
.pe-sidebar-toggle .pe-toggle-close { display: none; }
.pe-sidebar-toggle.active { background: #ef4444; border-color: #ef4444; }
.pe-sidebar-toggle.active svg { color: #fff; }
.pe-sidebar-toggle.active .pe-toggle-menu { display: none; }
.pe-sidebar-toggle.active .pe-toggle-close { display: block; }

/* --- Modal Overlay --- */
.pe-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.pe-modal-overlay.visible { opacity: 1; pointer-events: auto; }
.pe-modal {
  background: var(--pe-card); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2); width: 90%; max-width: 560px;
  max-height: 80vh; display: flex; flex-direction: column; overflow: hidden;
}
.pe-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--pe-border);
}
.pe-modal-header h3 { margin: 0; font-size: .95rem; font-weight: 700; }
.pe-modal-close {
  background: none; border: none; cursor: pointer; font-size: 1.3rem;
  color: var(--pe-muted); line-height: 1; padding: 2px 6px; border-radius: 4px;
}
.pe-modal-close:hover { color: var(--pe-navy); background: #f3f4f6; }
.pe-modal-body { padding: 16px; flex: 1; overflow-y: auto; }
.pe-modal-body textarea {
  width: 100%; min-height: 200px; font-family: 'Fira Code', monospace;
  font-size: .75rem; border: 1px solid var(--pe-border); border-radius: 8px;
  padding: 12px; resize: vertical; background: #f9fafb; color: var(--pe-navy);
}
.pe-modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 16px; border-top: 1px solid var(--pe-border); background: #f9fafb;
}

/* --- Scrollbar --- */
.pe-sidebar::-webkit-scrollbar,
.pe-parcel-list::-webkit-scrollbar,
.pe-project-list::-webkit-scrollbar { width: 4px; }
.pe-sidebar::-webkit-scrollbar-track,
.pe-parcel-list::-webkit-scrollbar-track,
.pe-project-list::-webkit-scrollbar-track { background: transparent; }
.pe-sidebar::-webkit-scrollbar-thumb,
.pe-parcel-list::-webkit-scrollbar-thumb,
.pe-project-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* --- Responsive --- */
@media (max-width: 768px) {
  /* Body dikey düzen - harita üstte, sidebar altta */
  .pe-body { 
    flex-direction: column !important;
    display: flex !important;
  }
  
  /* Harita alanı üstte */
  .pe-map-wrap {
    flex: 1 !important;
    min-height: 0 !important;
    order: 1 !important;
  }
  
  /* Sidebar altta sabit */
  .pe-sidebar { 
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    width: 100% !important; 
    height: auto !important;
    max-height: 45vh !important;
    flex-shrink: 0 !important;
    border-right: none !important;
    border-top: 1px solid var(--pe-border) !important;
    transform: none !important;
    opacity: 1 !important;
    overflow-y: auto !important;
    order: 2 !important;
    pointer-events: auto !important;
  }
  .pe-sidebar.collapsed { 
    display: none !important;
  }
  
  /* Toggle butonu sağ üstte harita üzerinde */
  .pe-sidebar-toggle { 
    display: block !important; 
    position: absolute !important; 
    top: 8px !important; 
    right: 8px !important; 
    z-index: 60 !important;
  }
  
  .pe-topbar-actions { gap: 2px; }
  .pe-topbar-btn span { display: none; }
  
  /* Info panel küçük */
  .pe-info-panel { 
    width: 180px; 
    bottom: auto;
    top: 50px;
    right: 8px;
    max-height: 40vh;
    overflow-y: auto;
  }
  .pe-info-header {
    padding: 6px 8px;
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .pe-info-header h4 { font-size: .7rem; }
  .pe-info-close {
    width: 22px;
    height: 22px;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
  }
  .pe-info-close svg { width: 10px; height: 10px; }
  .pe-info-body { padding: 6px 8px; }
  .pe-info-row { font-size: .68rem; padding: 2px 0; }
  .pe-info-actions { padding: 4px 8px; gap: 2px; }
  .pe-info-actions .pe-btn { padding: 4px 6px; font-size: .65rem; }
  .pe-mode-bar { font-size: .7rem; padding: 5px 10px; top: 8px; }
  
  /* Sidebar içi kompakt - yatay düzen */
  .pe-sidebar-section { 
    padding: 6px 8px 4px; 
    display: inline-block;
    vertical-align: top;
    width: auto;
    border-bottom: none;
    border-right: 1px solid var(--pe-border);
  }
  .pe-sidebar-section:last-child { border-right: none; }
  
  /* Proje bilgisi mobilde gizle */
  .pe-project-section { display: none !important; }
  
  .pe-section-title { font-size: .55rem; margin-bottom: 3px; }
  .pe-parcel-list { max-height: none !important; display: flex; flex-wrap: wrap; gap: 4px; overflow-y: visible !important; }
  .pe-parcel-item { padding: 4px 6px; font-size: .7rem; }
  .pe-project-list { max-height: 60px; }
  .pe-stats { gap: 4px; grid-template-columns: 1fr 1fr 1fr 1fr; }
  .pe-stat { padding: 3px 5px; }
  .pe-stat-val { font-size: .68rem; }
  .pe-stat-label { font-size: .5rem; }
}

@media (max-width: 480px) {
  .pe-sidebar { 
    max-height: 40vh !important;
  }
  
  .pe-info-panel { 
    width: 160px;
    top: 48px;
    right: 6px;
    max-height: 35vh;
  }
  .pe-info-header h4 { font-size: .65rem; }
  .pe-info-row { font-size: .65rem; }
  
  .pe-topbar { padding: 0 8px; height: 42px; }
  .pe-topbar-title { font-size: .75rem; }
  .pe-status-badge { font-size: .6rem; padding: 2px 5px; }
  
  .pe-sidebar-section { padding: 6px 8px 4px; }
  .pe-parcel-list { max-height: 60px; }
}

/* --- Viewer mode compact --- */
.pe-root[data-mode="viewer"] { height: 100%; }
.pe-root[data-mode="viewer"] .pe-sidebar { width: 220px; }
.pe-root[data-mode="viewer"] .pe-topbar { height: 40px; }

/* --- Viewer mode embedded in proje.php --- */
.pe-root.pe-root-viewer {
  height: 100% !important;
  min-height: 0;
}
.pe-root.pe-root-viewer .pe-topbar {
  height: 40px;
  position: relative;
  z-index: 1000;
}
.pe-root.pe-root-viewer .pe-sidebar { width: 220px; }
.pe-root.pe-root-viewer .pe-body { flex: 1; min-height: 0; overflow: hidden; }
.pe-root.pe-root-viewer .pe-map-wrap { position: relative; min-height: 0; flex: 1; z-index: 0; }
.pe-root.pe-root-viewer .pe-map { position: absolute; inset: 0; }

/* --- Embedded mode (admin panel) --- */
.pe-root.pe-root-embedded {
  height: 100% !important;
  width: 100% !important;
  min-height: 0;
}
.pe-root.pe-root-embedded .pe-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-shrink: 0;
}
.pe-root.pe-root-embedded .pe-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.pe-root.pe-root-embedded .pe-sidebar {
  overflow-y: auto;
  max-height: 100%;
}
.pe-root.pe-root-embedded .pe-map-wrap {
  position: relative;
  min-height: 0;
  flex: 1;
}
.pe-root.pe-root-embedded .pe-map {
  position: absolute;
  inset: 0;
}
.pe-root.pe-root-embedded .pe-info-panel {
  z-index: 8;
}
.pe-root.pe-root-embedded .pe-mode-bar {
  z-index: 9;
}

/* --- Parcel Label on Map --- */
.pe-parcel-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
  text-align: center;
}
.pe-parcel-label span {
  display: inline-block;
  background: rgba(13, 27, 42, 0.75);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

/* --- Area Input (editable m²) --- */
.pe-area-input {
  width: 80px;
  padding: 2px 6px;
  font-size: .78rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--pe-border);
  border-radius: 4px;
  background: #f9fafb;
  color: var(--pe-navy);
  outline: none;
  text-align: right;
}
.pe-area-input:focus {
  border-color: var(--pe-primary);
  background: #fff;
}
.pe-override-badge {
  display: inline-block;
  font-size: .58rem;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

/* --- Road Popup --- */
.pe-road-popup .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.pe-road-popup .leaflet-popup-content {
  margin: 8px 12px;
}

/* --- Detaylı Gör Fullscreen (proje.php) --- */
/* Styles are inline in proje.php for isolation */

/* --- Save Indicator --- */
.pe-save-indicator {
  font-size: .65rem;
  font-weight: 600;
  padding: 0 8px;
  opacity: 0;
  transition: opacity .3s ease;
  white-space: nowrap;
}

/* --- Parcel Status Tag (viewer list) --- */
.pe-parcel-item-status {
  display: inline-block;
  font-size: .58rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}


/* --- Validation Panel --- */
.pe-validation-panel {
  font-size: .75rem;
  line-height: 1.4;
}
.pe-validation-ok {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  color: #166534;
  font-size: .72rem;
  font-weight: 500;
}
.pe-validation-has-warnings {
  border: 1px solid #fde68a;
  border-radius: 8px;
  overflow: hidden;
  background: #fffbeb;
}
.pe-validation-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
  font-size: .72rem;
}
.pe-validation-header span { flex: 1; }
.pe-validation-close {
  background: none;
  border: none;
  color: #92400e;
  font-size: 1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  opacity: .6;
  transition: opacity .15s;
}
.pe-validation-close:hover { opacity: 1; }
.pe-validation-list {
  max-height: 160px;
  overflow-y: auto;
  padding: 4px 0;
}
.pe-validation-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 5px 10px;
  font-size: .7rem;
  color: #374151;
  border-bottom: 1px solid rgba(0,0,0,.04);
  transition: background .12s;
}
.pe-validation-item:last-child { border-bottom: none; }
.pe-validation-item:hover { background: rgba(0,0,0,.03); }
.pe-validation-item[data-focus-parcel] { cursor: pointer; }
.pe-validation-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}
.pe-validation-icon-error { background: #ef4444; }
.pe-validation-icon-warning { background: #f59e0b; }
.pe-validation-icon-info { background: #3b82f6; }
.pe-validation-item.pe-validation-error { color: #991b1b; }
.pe-validation-item.pe-validation-warning { color: #92400e; }
.pe-validation-item.pe-validation-info { color: #1e40af; }

/* --- Warning Marker on Map --- */
.pe-warning-marker {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
  text-align: center;
}
.pe-warning-marker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 50%;
  font-size: .7rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(245,158,11,.4);
  animation: pe-warning-pulse 2s ease-in-out infinite;
}
@keyframes pe-warning-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(245,158,11,.4); }
  50% { transform: scale(1.15); box-shadow: 0 2px 12px rgba(245,158,11,.6); }
}

/* --- Validation list scrollbar --- */
.pe-validation-list::-webkit-scrollbar { width: 3px; }
.pe-validation-list::-webkit-scrollbar-track { background: transparent; }
.pe-validation-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
