@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #22c55e;
  --primary-dark: #16a34a;
  --primary-light: #dcfce7;
  --secondary-color: #6366f1;
  --secondary-light: #e0e7ff;
  --success-color: #22c55e;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --accent-color: #6d28d9;
  --bg-page: #e8eefc;
  --bg-surface: rgba(18, 32, 63, 0.94);
  --bg-surface-soft: #111827;
  --bg-muted: #cbd5e1;
  --bg-header: rgba(15, 23, 42, 0.96);
  --bg-sidebar: #050b1a;
  --text-primary: #eff6ff;
  --text-secondary: #a5b4fc;
  --text-muted: #94a3b8;
  --border-color: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.25);
  --shadow-sm: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background: #f4f7fb;
  color: #0f172a;
  font-family: 'Inter', system-ui, sans-serif;
}

#react-root {
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(180deg, #081120 0%, #081b2a 100%);
  color: #f8fafc;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(20px);
}

.sidebar .h-20 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  background: rgba(8, 17, 32, 0.94);
}

.sidebar .sidebar-nav {
  padding: 1rem 0.75rem;
}

.sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 1.25rem;
  background: transparent;
  color: #cbd5e1;
  border: 1px solid transparent;
  transition: all 250ms ease;
}

.sidebar .nav-item + .nav-item {
  margin-top: 0.85rem;
}

.sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transform: translateX(2px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.14);
}

.sidebar .nav-item i {
  color: #7dd3fc;
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .nav-item span {
  font-weight: 600;
}

.sidebar .nav-item.bg-emerald-500,
.sidebar .nav-item.bg-emerald-500:hover {
  background: linear-gradient(90deg, #10b981 0%, #14b8a6 45%, #38bdf8 100%);
  color: #ffffff;
  box-shadow: 0 24px 46px rgba(16, 185, 129, 0.18);
  position: relative;
}

.sidebar .nav-item.bg-emerald-500::before,
.sidebar .nav-item.bg-emerald-500:hover::before {
  content: '';
  position: absolute;
  height: calc(100% - 1.2rem);
  width: 4px;
  left: 0.9rem;
  top: 0.6rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #22c55e 0%, #38bdf8 100%);
}

.sidebar .nav-item i {
  color: #7dd3fc;
  min-width: 1.4rem;
  text-align: center;
}

.sidebar .profile-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 38px rgba(15, 23, 42, 0.16);
}

.sidebar .profile-card .avatar {
  background: linear-gradient(135deg, #111827 0%, #15203c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dbeafe;
}

.sidebar .sidebar-nav p {
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  margin-bottom: 0.85rem;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.96));
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
}

.card:hover {
  transform: translateY(-2px);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.button-primary,
.nav-item.bg-emerald-500 {
  background: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
  color: #ffffff;
}

.page-header h1 {
  color: #0f172a;
}

.page-header {
  padding-bottom: 1rem;
}

.page-header p,
.text-slate-500,
.text-slate-400,
.text-slate-600,
.text-slate-700,
.text-gray-500 {
  color: #475569;
}

.leaflet-container {
  border-radius: 0;
}

.map-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.92);
}

.map-panel .btn-sm {
  min-width: 100px;
}

input.input-field,
select.input-field,
textarea.input-field {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #0f172a;
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  font-size: 0.95rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

input.input-field:focus,
select.input-field:focus,
textarea.input-field:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.75);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.h-screen { height: 100vh; }
.h-full { height: 100%; }
.h-14 { height: 3.5rem; }
.h-12 { height: 3rem; }
.h-10 { height: 2.5rem; }
.w-full { width: 100%; }
.w-60 { width: 15rem; }
.bg-slate-900 { background-color: #0f172a; }
.w-64 { width: 16rem; }
.w-12 { width: 3rem; }
.w-10 { width: 2.5rem; }
.shrink-0 { flex-shrink: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.p-8 { padding: 2rem; }
.p-6 { padding: 1.5rem; }
.p-5 { padding: 1.25rem; }
.p-4 { padding: 1rem; }
.p-3 { padding: 0.75rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.pt-6 { padding-top: 1.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-auto { margin-top: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.max-w-7xl { max-width: 80rem; }
.min-h-0 { min-height: 0; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.bg-\[#f4f7fb\] { background-color: #f4f7fb; }
.bg-\[#0f172a\] { background-color: #0f172a; }
.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-800\/50 { background-color: rgba(30, 41, 59, 0.5); }
.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.ml-64 { margin-left: 16rem; }
.min-h-screen { min-height: 100vh; }
.h-\[600px\] { height: 600px; }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-span-12 { grid-column: span 12 / span 12; }
.xl\:col-span-8 { grid-column: span 8 / span 8; }
.xl\:col-span-4 { grid-column: span 4 / span 4; }
.rounded-\[1\.25rem\] { border-radius: 1.25rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-emerald-500 { background-color: #10b981; }
.bg-emerald-600 { background-color: #059669; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-purple-100 { background-color: #f3e8ff; }
.bg-purple-600 { background-color: #9333ea; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-900 { color: #0f172a; }
.text-slate-950 { color: #020617; }
.text-emerald-600 { color: #059669; }
.text-blue-600 { color: #2563eb; }
.text-purple-600 { color: #9333ea; }
.text-amber-600 { color: #d97706; }
.text-emerald-100 { color: #d1fae5; }
.text-purple-100 { color: #f3e8ff; }
.text-blue-100 { color: #dbeafe; }
.text-amber-100 { color: #fef3c7; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-red-500 { color: #ef4444; }
.text-white { color: #ffffff; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.block { display: block; }
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-600 { border-color: #475569; }
.border-slate-700 { border-color: #334155; }
.border-transparent { border-color: transparent; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.backdrop-blur { backdrop-filter: blur(12px); }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgb(16 185 129 / 0.2); }
.focus\:ring-emerald-500:focus { --tw-ring-color: rgb(16 185 129 / var(--tw-ring-opacity)); }
.focus\:border-transparent:focus { border-color: transparent; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-emerald-600:hover { background-color: #059669; }
.resize-none { resize: none; }
.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md\:col-span-2 { grid-column: span 2 / span 2; }
.xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xl\:col-span-2 { grid-column: span 2 / span 2; }
.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sm\:flex-row { flex-direction: row; }
.sm\:items-center { align-items: center; }
.sm\:justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.h-screen { height: 100vh; }
.w-screen { width: 100vw; }
.w-full { width: 100%; }
.max-w-xl { max-width: 36rem; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.rounded-2xl { border-radius: 1rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.tracking-\[0\.24em\] { letter-spacing: 0.24em; }
.tracking-\[0\.18em\] { letter-spacing: 0.18em; }
.tracking-\[0\.16em\] { letter-spacing: 0.16em; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #6b7280; }
.text-slate-600 { color: #4b5563; }
.text-slate-950 { color: #0f172a; }
.text-gray-500 { color: #6b7280; }
.bg-white { background: var(--bg-surface); }
.bg-slate-50 { background: #f8fafc; }
.bg-gray-100 { background: #f8fafc; }
.border { border: 1px solid var(--border-color); }
.border-r { border-right: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.border-slate-200 { border-color: #e2e8f0; }
.block { display: block; }
.font-bold { font-weight: 700; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.min-h-0 { min-height: 0; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.h-12 { height: 3rem; }
.w-12 { width: 3rem; }
.w-64 { width: 16rem; }
.text-xl { font-size: 1.25rem; }
.tracking-\[0\.18em\] { letter-spacing: 0.18em; }
.tracking-\[0\.24em\] { letter-spacing: 0.24em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.h-\[700px\] { height: 700px; }
.items-start { align-items: flex-start; }
.manual-input { width: 100%; padding: 0.95rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-primary); transition: border-color var(--transition-fast); }
.manual-input:focus-visible { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14); }
.map-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.mb-2 { margin-bottom: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-5 { margin-top: 1.25rem; }
.pb-6 { padding-bottom: 1.5rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.shrink-0 { flex-shrink: 0; }
.space-y-1 > * + * { margin-top: 0.25rem; }

/* Premium UI Enhancements */
.max-w-\[380px\] { max-width: 380px; }
.max-w-\[340px\] { max-width: 340px; }
.bg-\[#f1f5f9\] { background-color: #f1f5f9; }
.bg-\[#f8fafc\] { background-color: #f8fafc; }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/80 { background-color: rgba(255, 255, 255, 0.8); }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-emerald-500 { --tw-gradient-from: #10b981; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(16, 185, 129, 0)); }
.to-cyan-500 { --tw-gradient-to: #06b6d4; }
.w-60 { width: 15rem; }
.h-11 { height: 2.75rem; }
.rounded-xl { border-radius: 0.75rem; }
.hover\:bg-white\/10:hover { background-color: rgba(255, 255, 255, 0.1); }
.hover\:text-white:hover { color: #ffffff; }
.duration-200 { transition-duration: 200ms; }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.hover\:scale-\[1\.02\]:hover { transform: scale(1.02); }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.h-12 { height: 3rem; }

/* Global gradient background */
body {
  background: linear-gradient(180deg, #eff7ff 0%, #eef5ff 100%);
}

/* Premium sidebar cards */
.sidebar-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
}

/* Premium stats cards */
.stats-card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Premium buttons */
.btn-primary {
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #ffffff;
  font-weight: 500;
  border: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #0ea5e9 100%);
}

.btn-secondary {
  height: 3rem;
  padding: 0 1.25rem;
  border-radius: 1rem;
  background: #f1f5f9;
  color: #0f172a;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 250ms ease, background 250ms ease;
  cursor: pointer;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: #e2e8f0;
}

.btn-sm {
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 1rem;
}

.sidebar-section-title {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.profile-card {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #134e4a;
  color: #d1fae5;
  font-weight: 700;
}

.stat-card {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
  padding: 1.5rem;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.stat-label {
  color: #475569;
  font-weight: 600;
}

.stat-number {
  font-size: 2.25rem;
  margin-top: 0.875rem;
  color: #0f172a;
}

.stat-description {
  color: #64748b;
  margin-top: 0.75rem;
}

.card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.card-map {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.map-wrapper {
  min-height: 420px;
  background: #f8fafc;
}

.search-bar {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-bar i {
  color: #94a3b8;
}

.search-bar input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 1rem;
  color: #0f172a;
  background: transparent;
}

.input-field,
textarea.input-field {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  background: #f8fafc;
  color: #0f172a;
  padding: 0.9rem 1rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.input-field:focus,
textarea.input-field:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.textarea-field {
  min-height: 120px;
  resize: vertical;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  background: #f8fafc;
}

.radio-option input {
  accent-color: #10b981;
}

.radio-option span {
  color: #0f172a;
  font-weight: 500;
}

.map,
#map {
  width: 100%;
  height: 100%;
}

.sidebar-section-title,
.profile-card,
.avatar,
.card,
.card-map,
.card-header,
.map-wrapper,
.search-bar,
.input-field,
.textarea-field,
.radio-group,
.radio-option {
  font-family: 'Inter', sans-serif;
}


.btn-primary:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-weight: 500;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Premium inputs */
input, select, textarea {
  height: 3rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 2px rgb(16 185 129 / 0.2);
  border-color: transparent;
}

/* Premium map container */
.map-container {
  border-radius: 1.5rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}

/* Premium typography */
.page-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.stat-number {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.data-form .form-group,
.data-form .form-section {
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .sm\:flex-row { flex-wrap: wrap; flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .xl\:col-span-2 { grid-column: span 2 / span 2; }
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.dashboard-body { flex: 1; min-height: 0; overflow: auto; }
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

html,
body,
#root {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100%;
  overflow-x: hidden;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#root > .login-page,
#root > .dashboard {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.leaflet-container {
  height: 100%;
  width: 100%;
  z-index: 1;
}

body.dark-mode {
  --bg-page: #0f172a;
  --bg-surface: #111827;
  --bg-surface-soft: #111827;
  --bg-muted: #111827;
  --bg-header: #111827;
  --bg-sidebar: #0f172a;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #a5b4fc;
  --border-color: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.24);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 20px 60px rgba(0, 0, 0, 0.4);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 100% - 2rem);
  margin: 0 auto;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
  position: relative;
  overflow: hidden;
  min-height: 3rem;
}

.btn-primary::after,
.btn-secondary::after,
.logout-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
}

.btn-primary:active::after,
.btn-secondary:active::after,
.logout-btn:active::after {
  width: 220%;
  height: 220%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition: transform 0s, opacity 0.35s ease;
}

.btn-primary {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: #059669;
  border-color: #059669;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: #ffffff;
  color: #475569;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.15);
}

.logout-btn {
  background: #ffffff;
  color: #111827;
  border-color: #e5e7eb;
  padding: 0.95rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.logout-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.logout-btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.95rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-weight: 600;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.nav-item.active {
  color: white;
  background: linear-gradient(135deg, #10b981 0%, #0f766e 100%);
  box-shadow: 0 18px 36px rgba(16, 185, 129, 0.24);
  border-color: transparent;
}

.nav-item.active:hover {
  transform: translateX(0);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #ffffff;
  color: #111827;
  transition: all var(--transition-fast);
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}


label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Login Page */
.login-page {
  min-height: 100vh;
  padding: 3rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1), transparent 50%), radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1), transparent 50%);
  pointer-events: none;
}

.login-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  padding: 2.5rem 2rem;
  z-index: 1;
  backdrop-filter: blur(10px);
}

.login-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

..login-logo img {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.login-header h1 {
  color: #10b981;
  font-size: 2rem;
  margin: 0;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.login-header p {
  color: #4b5563;
  margin: 0;
  font-size: 0.95rem;
}

.login-subtitle {
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.login-form {
  display: grid;
  gap: 1rem;
}

.form-group label {
  color: #4b5563;
  font-size: 0.92rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color var(--transition-fast);
  font-size: 0.95rem;
}

.input-group input:focus ~ i,
.input-group input:not(:placeholder-shown) ~ i {
  color: var(--primary-color);
}

.input-group input {
  width: 100%;
  padding: 1rem 1rem 1rem 3.2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  background: #f9fafb;
  color: #111827;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.input-group input::placeholder {
  color: #d1d5db;
}

.input-group input:focus {
  border-color: #10b981;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.btn-login {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: white;10b981 0%, #059669 100%);
  border: none;
  border-radius: 0.85rem;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.3);
}

.btn-login:active {
  transform: translateY(0
  box-shadow: 0 16px 28px rgba(15, 111, 44, 0.22);
}

.login-footer .btn-secondary {
  width: 100%;
  padding: 0.95rem 1.25rem;
  background: white;
  color: #111827;
  border: 1px solid #d1d5db;
}

.login-footer .btn-secondary:hover {
  background: #f3f4f6;
}

.login-footer {
  margin-top: 1.5rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

/* Premium UI overrides */
.app-main {
  padding: 32px;
  max-width: 1600px;
  margin-left: 0;
  margin-right: auto;
  width: 100%;
  min-height: 100vh;
  overflow: auto;
}

/* Ensure sidebar column participates in flex layout: the .sidebar width is set in JSX, but provide a fallback */
.sidebar {
  width: 260px;
  box-sizing: border-box;
  align-self: flex-start;
}

.page-header {
  padding-bottom: 1.5rem;
}

.page-header h1 {
  font-size: clamp(2.5rem, 1.8vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08) !important;
  border-radius: 1.75rem !important;
}

.card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.12) !important;
}

.btn-primary {
  height: 3.5rem !important;
  padding: 0 1.5rem !important;
  border-radius: 1rem !important;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 18px 28px rgba(16, 185, 129, 0.18) !important;
}

.btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 22px 32px rgba(16, 185, 129, 0.22) !important;
}

.btn-secondary {
  height: 3rem !important;
  padding: 0 1.25rem !important;
  border-radius: 1rem !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: none !important;
  font-weight: 600 !important;
}

.btn-secondary:hover {
  transform: translateY(-1px) !important;
  background: #e2e8f0 !important;
}

.btn-sm {
  height: 2.75rem !important;
  padding: 0 1rem !important;
  border-radius: 1rem !important;
}

.input-field {
  background: #f8fafc !important;
  border: none !important;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16) !important;
  color: #1f2937 !important;
  border-radius: 1rem !important;
  height: 3.5rem !important;
  padding: 0 1.2rem !important;
}

.input-field:focus {
  outline: none !important;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.18) !important;
}

.map-panel {
  padding: 1.25rem 1.5rem !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #ffffff !important;
}

.map-panel h3 {
  margin: 0 !important;
}

.login-footer p {
  margin-bottom: 0.75rem;
}

.login-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem;
  border-radius: 0.85rem;
  border: 1px solid #d1d5db;
  background: white;
  color: #111827;
}

.login-footer a:hover {
  background: #f3f4f6;
}

/* Dashboard layout */
.dashboard {
  display: flex;
  min-height: 100%;
  height: 100%;
  background: var(--bg-page);
  overflow: hidden;
}

.sidebar {
  width: 16rem !important; /* w-64 */
  min-width: 16rem !important;
  max-width: 16rem !important;
  background: var(--bg-sidebar);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: inset -1px 0 0 rgba(229, 231, 235, 0.9);
  transition: all var(--transition-normal);
  flex-shrink: 0 !important;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255, 255, 255, 0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-image {
  width: 40px;
  height: 40px;
  border-radius: 0.85rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sidebar-nav {
  padding: 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 3rem;
  padding: 0 0.9rem;
  border-radius: 0.9rem;
  color: #e2e8f0;
  transition: background var(--transition-normal), color var(--transition-normal);
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  border: none;
  background: transparent;
}

.nav-item:hover {
  background: rgba(51, 65, 85, 0.8);
  color: white;
}

.nav-item.active {
  background: #10b981;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.stats-panel,
.filters-panel,
.section-card,
.dashboard-card,
.overview-card,
.quartier-card,
.list-card,
.activity-item,
.timeline-item,
.data-list,
.map-container,
.form-container {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.stats-panel:hover,
.filters-panel:hover,
.section-card:hover,
.dashboard-card:hover,
.overview-card:hover,
.quartier-card:hover,
.list-card:hover,
.activity-item:hover,
.timeline-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.stats-panel,
.filters-panel,
.form-container,
.section-card {
  padding: 1.25rem;
}

.stats-title,
.filters-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stats-panel {
  margin: 1rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(59, 130, 246, 0.04) 100%);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.stat-item:hover {
  padding-left: 0.5rem;
  background: rgba(16, 185, 129, 0.04);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.filters-panel {
  margin: 1rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(16, 185, 129, 0.04) 100%);
}

.filter-label {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-select,
.filter-input {
  height: 2.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #374151;
  border-radius: 0.75rem;
  padding: 0 1rem;
  font-size: 0.875rem;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-select:focus,
.filter-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  outline: none;
}

.filter-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 1.5rem;
}

.dashboard-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.main-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.9);
  position: sticky;
  top: 0;
  z-index: 2;
}

.page-title {
  font-size: clamp(2rem, 2.5vw, 2.75rem);
  margin-bottom: 0.5rem;
  line-height: 1.05;
}

.page-subtitle {
  color: var(--text-secondary);
  margin: 0;
  max-width: 40rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: flex-end;
}

.search-bar {
  position: relative;
  width: min(700px, 100%);
}

.search-bar input {
  width: 100%;
  height: 3.5rem;
  padding: 0 1.5rem 0 3.5rem;
  border-radius: 1.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  color: #111827;
  transition: all var(--transition-fast);
}

.search-bar input::placeholder {
  color: #6b7280;
}

.search-bar i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.search-bar input:focus-visible {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
  background: #ffffff;
}

.search-bar input:hover {
  border-color: #d1d5db;
}

.search-bar input:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

.view {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
  animation: fadeIn var(--transition-normal);
}

.view.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.stats-grid,
.dashboard-grid,
.quartier-cards,
.activity-timeline {
  display: grid;
  gap: 1.5rem;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 1.5rem;
}

.stat-card,
.dashboard-card,
.overview-card,
.quartier-card,
.list-card,
.activity-item,
.timeline-item {
  padding: 1.5rem;
}

.stat-card,
.dashboard-card,
.overview-card,
.quartier-card,
.list-card,
.activity-item,
.timeline-item {
  border-radius: 1.5rem;
  backdrop-filter: blur(10px);
}

.stat-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.92);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.stat-icon,
.overview-icon,
.timeline-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 1.25rem;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.22);
}

.stat-number,
.overview-card h3,
.section-title {
  margin: 0;
  color: var(--text-primary);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
}

.stat-label,
.overview-label,
.timeline-type,
.section-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 999px;
  transition: width var(--transition-normal);
}

.stat-trend,
.overview-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.trend-positive {
  color: #047857;
  background: rgba(16, 185, 129, 0.15);
  animation: slideInUp 300ms ease;
}

.map-container {
  height: 650px;
  width: 100%;
  border-radius: 1.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  position: relative;
}

.map-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(14, 165, 233, 0.06));
  pointer-events: none;
  z-index: 1;
}

.map {
  height: 100%;
  width: 100%;
  display: block;
  position: relative;
  z-index: 0;
}

.quartier-summary,
.dashboard-grid,
.form-container,
.data-section {
  margin-bottom: 1.5rem;
}

.section-header,
.form-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.section-title,
.form-header h2 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  color: #111827;
}

.section-note,
.form-header p {
  color: #6b7280;
  margin: 0;
}

.list-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.list-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.1);
}

.section-note,
.form-header p {
  color: var(--text-secondary);
  margin: 0;
}

.dashboard-overview {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.5rem;
}

.overview-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.overview-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.overview-chart {
  width: 100%;
  min-width: 70px;
  text-align: right;
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.list-card,
.activity-item,
.timeline-item {
  background: var(--bg-surface);
  transition: all var(--transition-fast);
}

.list-card {
  min-height: 220px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  animation: fadeIn var(--transition-normal);
}

.list-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

.activity-timeline {
  grid-template-columns: 1fr;
}

.activity-item,
.timeline-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.02) 0%, rgba(59, 130, 246, 0.02) 100%);
  padding: 1.25rem;
  transition: all var(--transition-fast);
}

.activity-item:hover,
.timeline-item:hover {
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.activity-meta,
.timeline-meta,
.quartier-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.quartier-cards {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.quartier-card {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(59, 130, 246, 0.04) 100%);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.quartier-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  pointer-events: none;
}

.quartier-card:hover::before {
  transform: translateX(100%);
}

.quartier-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.top-list-item,
.empty-card {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.top-list-item:last-child,
.activity-item:last-child,
.timeline-item:last-child {
  border-bottom: none;
}

.data-list {
  display: grid;
  gap: 0.75rem;
}

.data-list > * {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.input-wrapper,
.select-wrapper {
  position: relative;
}

.input-icon,
.select-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.radio-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: white;
}

.radio-option:hover {
  border-color: var(--primary-color);
  background: rgba(16, 185, 129, 0.04);
}

.radio-option input {
  display: none;
}

.radio-option .radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.radio-option .radio-label::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.radio-option input:checked + .radio-label {
  color: var(--primary-dark);
}

.radio-option input:checked + .radio-label::before {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  position: relative;
}

.radio-option input:checked + .radio-label::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 0.8rem;
  margin-left: -14px;
  margin-top: -1px;
  font-weight: bold;
}

.radio-option input:checked ~ .radio-label {
  color: var(--primary-dark);
}

.required {
  color: var(--danger-color);
  font-weight: 600;
}

.empty-card {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 2rem;
}


.quartier-summary {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.section-title {
  font-size: 1.25rem;
  margin: 0;
  color: var(--text-primary);
}

.section-note {
  color: var(--text-secondary);
  margin: 0;
}

.landing-page {
  min-height: 100vh;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #10b981 100%);
  position: relative;
  overflow: hidden;
}

.landing-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.15), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1), transparent 50%);
  pointer-events: none;
}

.landing-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  padding: 3rem 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 1.75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.landing-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.landing-brand h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #0f172a;
  font-weight: 800;
}

.landing-brand p,
.landing-note {
  color: #475569;
  font-size: 1rem;
  line-height: 1.6;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.landing-note code {
  background: #f0fdf4;
  color: #10b981;
  padding: 0.3rem 0.6rem;
  border-radius: 0.35rem;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-radius: 50%;
  border-top-color: #10b981;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-muted) 0%,
    var(--bg-surface) 50%,
    var(--bg-muted) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition-fast);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #991b1b;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #6d28d9;
}

/* Tooltips */
.tooltip {
  position: relative;
}

.tooltip[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 1000;
}

.tooltip:hover[data-tooltip]::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn var(--transition-normal);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Alerts & Notifications */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  animation: slideInDown var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #047857;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #991b1b;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #1e40af;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #92400e;
}

.alert-icon {
  font-size: 1.25rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

thead {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-bottom: 2px solid var(--border-color);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: rgba(16, 185, 129, 0.04);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Select Styles */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23475569'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

/* Enhanced Checkboxes and Radios */
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: white;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-color: var(--primary-color);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
}

input[type="radio"]:checked {
  box-shadow: inset 0 0 0 3px white;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--bg-muted);
}

/* Button States */
button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

button:active:not(:disabled) {
  transform: scale(0.98) !important;
}

/* Cards with animations */
.card-animated {
  animation: fadeIn var(--transition-normal);
}

.card-animated:nth-child(2) {
  animation-delay: 50ms;
}

.card-animated:nth-child(3) {
  animation-delay: 100ms;
}

.card-animated:nth-child(4) {
  animation-delay: 150ms;
}

.card-animated:nth-child(5) {
  animation-delay: 200ms;
}

/* Dividers */
.divider {
  height: 1px;
  background: var(--border-color);
  margin: 1rem 0;
}

/* Status Indicators */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-online::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-offline::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.5);
}

/* Avatar Styles */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.avatar-md {
  width: 48px;
  height: 48px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
}

.avatar-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.avatar-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.avatar-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.avatar-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.avatar-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Enhanced dropdown menus */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 100;
  animation: slideInDown var(--transition-fast);
  overflow: hidden;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(16, 185, 129, 0.08);
  color: var(--primary-color);
  padding-left: 1.25rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0;
}

/* Notification System */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-left: 4px solid #10b981;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: slideInDown var(--transition-normal);
  transform: translateX(400px);
  transition: transform var(--transition-normal);
  max-width: 400px;
  font-weight: 500;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left-color: #10b981;
  color: #047857;
}

.notification.error {
  border-left-color: #ef4444;
  color: #991b1b;
}

.notification.warning {
  border-left-color: #f59e0b;
  color: #92400e;
}

.notification.info {
  border-left-color: #3b82f6;
  color: #1e40af;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.loading-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.loading-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn var(--transition-normal);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: white;
  font-weight: 500;
}

.pagination-item:hover:not(.active):not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination-item.active {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  color: white;
  border-color: var(--primary-color);
}

.pagination-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Collapsible Sections */
.collapsible {
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.collapsible:hover {
  background: rgba(16, 185, 129, 0.04);
}

.collapsible .chevron {
  display: inline-flex;
  transition: transform var(--transition-fast);
}

.collapsible.active .chevron {
  transform: rotate(180deg);
}

.collapsible-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-normal);
  opacity: 0;
}

.collapsible.active .collapsible-content {
  max-height: 1000px;
  opacity: 1;
}

@media (max-width: 768px) {
  .dashboard {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    order: 1;
  }

  .main-content {
    padding: 1rem;
  }

  .main-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .header-actions {
    justify-content: stretch;
  }

  .header-actions button,
  .search-bar {
    width: 100%;
  }

  .stats-grid,
  .dashboard-grid,
  .quartier-cards,
  .activity-timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .login-container,
  .landing-panel {
    padding: 1.5rem;
  }

  .sidebar-nav {
    padding: 1rem;
  }

  .sidebar-header {
    padding: 1rem;
  }
}

/* Modern Dashboard Layout */
.dashboard > div:last-child {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.dashboard main {
  flex: 1;
  overflow: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.view {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

.view.active {
  display: flex;
}

/* Stats Cards Grid */
.grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1280px) {
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Main Content Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1280px) {
  .main-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.map-panel {
  min-height: 650px;
}

/* Map Container */
.map-container {
  height: 100%;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
}
  width: 100% !important;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
}

.leaflet-container {
  height: 100% !important;
  width: 100% !important;
}

/* Modern Card Styling */
.stat-card,
.overview-card {
  background: var(--bg-surface);
  border-radius: 1rem; /* rounded-2xl */
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.stat-card:hover,
.overview-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Section Cards */
.bg-white.rounded-2xl.shadow {
  background: var(--bg-surface);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

/* Spacing */
.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.gap-6 {
  gap: 1.5rem;
}

.p-6 {
  padding: 1.5rem;
}
