:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --accent: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e5e7eb;
  --shadow: 0 10px 25px rgba(2, 6, 23, 0.08);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #ffffff;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: #000000; box-shadow: var(--shadow); }
.brand .title { font-weight: 700; letter-spacing: 0.3px; }

.nav { display: grid; gap: 6px; margin-top: 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px; color: var(--text); text-decoration: none;
}
.nav a:hover { background: #f1f5f9; border-color: var(--border); }
.nav a.active { background: #eef2ff; color: var(--primary); border-color: #c7d2fe; }
.nav .section { margin-top: 16px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; padding: 0 6px; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.8); backdrop-filter: saturate(1.8) blur(10px);
  border-bottom: 1px solid var(--border);
}
.search {
  display: flex; align-items: center; gap: 8px; background: #f8fafc; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--border); width: 380px;
}
.search input { border: none; outline: none; background: transparent; width: 100%; color: var(--text); }

.content { padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1200px) { .app { grid-template-columns: 80px 1fr; } .brand .title { display:none; } .nav a span { display:none; } .grid.cols-4 { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 800px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.card .card-header { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom: 1px solid var(--border); }
.card .card-body { padding: 16px; }
.card .kpi { font-size: 28px; font-weight: 700; }
.card .muted { color: var(--muted); font-size: 12px; }

.badge { padding: 4px 8px; border-radius: 999px; font-size: 12px; border:1px solid var(--border); background:#f8fafc; }
.badge.success { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.badge.warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge.danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.btn { display:inline-flex; align-items:center; gap:8px; padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:#fff; cursor:pointer; }
.btn.primary { background: var(--primary); border-color: var(--primary-600); color: white; }
.btn.ghost { background: transparent; }

.footer { padding: 12px 18px; color: var(--muted); font-size: 12px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align:left; padding:12px; border-bottom: 1px solid var(--border); }

#map { width: 100%; height: 320px; border-radius: 12px; border:1px solid var(--border); }

.status-dot { width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:6px; }
.status-green { background: #22c55e; }
.status-yellow { background: #f59e0b; }
.status-red { background: #ef4444; }
