:root {
  --violet-900: #5b3d8e; --violet-700: #7759d7; --violet-600: #8a69e3;
  --violet-500: #8b5cf6; --violet-300: #c4b5fd; --violet-100: #ede9fe; --violet-50: #f5f3ff;
  --ink: #2e2255; --ink-soft: #6b6390; --white: #ffffff; --page: #faf9ff; --line: #ece8fb;
  --green: #16a34a; --amber-bg: #ffedd5; --amber-fg: #c2650c;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 10px 30px -18px rgba(91, 63, 214, 0.45);
  --shadow-soft: 0 4px 16px -10px rgba(91, 63, 214, 0.35);
  --font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--page); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }

/* Layout */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.menu-toggle, .menu-overlay { display: none; }

/* Sidebar */
.sidebar { background: linear-gradient(180deg, #f1ebff 0%, #ece5ff 100%); border-right: 1px solid var(--line); padding: 26px 20px 34px; display: flex; flex-direction: column; gap: 26px; }
.brand { display: flex; align-items: center; gap: 10px; padding-left: 6px; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; display: block; }
.brand span {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a78bfa;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14.5px; color: var(--ink); transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav a svg { color: var(--violet-600); flex: none; }
.nav a:hover { background: #fff; transform: translateX(2px); box-shadow: var(--shadow-soft); }
.nav a.active { background: var(--violet-600); color: #fff; }
.nav a.active svg { color: #fff; }
.sidebar-art { margin-top: auto; transform: translateY(-24px); text-align: center; color: var(--ink-soft); }
.sidebar-extra { display: flex; justify-content: center; align-items: center; margin-top: 8px; }
.sidebar-extra-image { width: 100%; max-width: 300px; height: auto; object-fit: contain; display: block; border-radius: 14px; }
.sidebar-art .sidebar-image { width: 170px; height: 150px; object-fit: contain; display: block; margin: 0 auto; }
.sidebar-art p { font-size: 13.5px; line-height: 1.6; margin: 12px 0 14px; }
.sidebar-art .heart { color: var(--violet-500); }

/* Main */
.main { padding: 22px 30px 34px; display: flex; flex-direction: column; gap: 18px; }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.menu-toggle, .menu-overlay { display: none; }
.bell { position: relative; color: var(--violet-700); padding: 8px; border-radius: 50%; }
.bell:hover { background: var(--violet-100); }
.bell .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid var(--page); }
.user-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-soft); }
.user-chip svg { color: var(--violet-600); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 600; }
.card-title svg { color: var(--violet-600); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pill-link { background: var(--violet-100); color: var(--violet-700); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.pill-link:hover { background: var(--violet-300); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 10px; align-items: center; padding: 30px 34px; }
.hero h1 {
  font-size: 34px;
  margin: 0 0 14px;
  font-weight: 300;
  letter-spacing: -.4px;
  font-family: "Segoe UI Light", "Segoe UI", sans-serif;
}
.hero h1 .accent {
  color: #a78bfa;
  font-weight: 700;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
.hero h1 .heart { color: var(--violet-500); }
.hero p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; margin: 0 0 24px; max-width: 400px; }
.hero p b { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { justify-self: center; }
.hero-art .hero-image { width: 290px; height: 250px; object-fit: contain; display: block; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--violet-600); color: #fff; box-shadow: 0 12px 24px -14px rgba(109, 74, 239, .9); }
.btn-primary:hover { background: var(--violet-700); }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--violet-300); }
.btn-outline:hover { background: var(--violet-50); }
.btn-block { width: 100%; justify-content: center; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 900px; margin-inline: auto; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stat-ico { width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--violet-100); color: var(--violet-700); display: grid; place-items: center; flex: none; }
.stat-value { min-width: 0; font-size: clamp(18px, 2vw, 25px); font-weight: 700; }
.stat-label { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.stat-foot { font-size: 12.5px; color: var(--green); display: flex; align-items: center; gap: 6px; margin-top: auto; }
.stat-foot.link { color: var(--violet-700); font-weight: 600; }

/* Denuncias recientes */
.report { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.report:last-child { border-bottom: 0; padding-bottom: 0; }
.report-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--violet-100); color: var(--violet-700); display: grid; place-items: center; flex: none; }
.report-body { flex: 1; min-width: 0; }
.report-body strong { display: block; font-size: 14px; }
.report-body span { font-size: 12.5px; color: var(--ink-soft); }
.tag { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.tag-attn { background: var(--violet-100); color: var(--violet-700); }
.tag-pending { background: var(--amber-bg); color: var(--amber-fg); }

/* Mapa */
.map { position: relative; height: 168px; border-radius: var(--radius-sm); background: var(--violet-50); overflow: hidden; border: 1px solid var(--line); }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.blob { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
.blob i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, var(--violet-700) 0 22%, rgba(139,92,246,.55) 45%, rgba(196,181,253,.25) 70%, transparent 72%); animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.08); opacity: 1; } }
.legend { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 12.5px; color: var(--ink-soft); }
.legend .bar { flex: 1; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--violet-50), var(--violet-300), var(--violet-700)); }

/* Panel derecho */
.urgent { background: linear-gradient(165deg, #f3efff 0%, #ece5ff 100%); }
.urgent h2 { font-size: 19px; margin: 0 0 10px; }
.urgent p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 18px; }
.urgent .phone { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--violet-700); }
.resource { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.resource-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--violet-100); color: var(--violet-700); display: grid; place-items: center; flex: none; }
.resource-body { flex: 1; min-width: 0; }
.resource-body strong { font-size: 14px; }
.resource-body p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.chev { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--violet-700); flex: none; }
.chev:hover { background: var(--violet-100); }

/* Banner */
.banner { position: relative; overflow: hidden; background: linear-gradient(100deg, #ece5ff 0%, #f1ecff 60%, #e9e1ff 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 34px; display: flex; align-items: center; gap: 24px; }
.banner-ico { width: 78px; height: 78px; border-radius: 50%; background: #d9ccff; color: var(--violet-700); display: grid; place-items: center; flex: none; }
.banner h3 { margin: 0 0 8px; font-size: 22px; }
.banner p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.banner-art { margin-left: auto; color: var(--violet-300); display: flex; align-items: center; gap: 8px; }
.banner-art svg { width: 84px; height: 84px; }

/* Responsive */
@media (max-width: 1180px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: min(82vw, 310px); height: 100vh; flex-direction: column; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 14px 0 35px -24px rgba(46, 34, 85, .7); overflow-y: auto; }
  .sidebar.is-open { transform: translateX(0); }
  .menu-toggle { position: fixed; z-index: 30; top: 14px; left: 14px; width: 44px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--violet-700); box-shadow: var(--shadow-soft); }
  .menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu-overlay { position: fixed; z-index: 15; inset: 0; display: block; background: rgba(46, 34, 85, .28); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  .menu-overlay.is-visible { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .sidebar-art { display: none; }
  .nav { flex-direction: column; flex-wrap: nowrap; }
  .main { padding: 74px 18px 18px; }
  .banner { flex-wrap: wrap; }
  .banner-art { display: none; }
}
@media (max-width: 560px) {
  .card { padding: 18px; }
  .stats { grid-template-columns: 1fr; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 27px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .topbar { gap: 8px; }
  .user-chip { padding: 9px 12px; }
  .report { align-items: flex-start; }
  .report .tag { margin-left: auto; }
  .banner { padding: 22px 20px; }
  .banner-ico { width: 58px; height: 58px; }
  .banner h3 { font-size: 19px; }
}
