:root {
  --sidebar-bg: #0f172a;      /* deep slate/navy */
  --sidebar-text: #f1f5f9;    /* off-white */
  --accent: #2563eb;          /* blue-600 */
  --accent-strong: #1e40af;   /* blue-800 */
  --header-bg: #ffffff;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --text: #111827;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.dash-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100%;
}

/* Sidebar */
.dash-sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.brand .logo { width: 64px; height: 64px; border-radius: 8px; }
.brand h2 { font-size: 18px; margin: 0; font-weight: 700; color: var(--accent); }

.nav-links {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 10px;
}
.nav-links a {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.1); }
.nav-links a.active { background: var(--accent); color: #fff; }

.sidebar-footer {
  text-align: center;
  font-size: 12px;
  color: rgba(241,245,249,0.7);
  padding: 10px 0;
}

/* Main Section */
.dash-main { display: flex; flex-direction: column; height: 100%; }

.dash-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}
.dash-header h1 {
  font-size: 18px; margin: 0; font-weight: 700; color: var(--text);
}
.version-pill {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Controls + Legend */
.controls { display: grid; grid-template-columns: 1fr 340px; gap: 16px; padding: 12px 20px; }
.toolbar {
  display: flex; gap: 8px;
}
.toolbar input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.btn {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer;
}
.btn:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

/* Map */
.map-section { position: relative; flex: 1; padding: 0 20px 20px 20px; }
#map { width: 100%; height: calc(100vh - 56px - 140px); border: 1px solid var(--border); border-radius: 12px; }

/* Footer */
.app-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; font-size: 12px;
}
.attribution { display: flex; gap: 8px; align-items: center; }

/* Responsive */
@media (max-width: 1200px) {
  .controls { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-sidebar {
    flex-direction: row; justify-content: space-around; align-items: center; height: 60px;
  }
  .nav-links { flex-direction: row; gap: 12px; padding: 0; }
  #map { height: calc(100vh - 60px - 180px); }
}
.login-body {
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
  background:#f7f7f7;
}

.login-container {
  background:white;
  padding:2rem;
  border-radius:8px;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  width:320px;
  text-align:center;
}

.login-form input {
  display:block;
  width:100%;
  margin-bottom:1rem;
  padding:0.6rem;
}

.error { color:red; margin-bottom:1rem; }
