:root {
  --fg: #e8eef6;
  --dim: #a9b7c7;
  --bg: #0b0f14;
  --card: #0f1620;
  --line: #1b2532;
  --accent: #49a2ff;
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: #0b0f14;
  border-bottom: 1px solid var(--line);
}

.navbar .brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  margin-right: 40px;
}

.center-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.right-nav {
  margin-left: auto;
}

.navbar nav a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar nav a:hover {
  color: var(--accent);
}

/* ===== Hero section ===== */
.hero {
  display: grid;
  place-items: center;
  min-height: 70vh;
  text-align: center;
  padding: 40px 16px;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  color: var(--dim);
  max-width: 640px;
}

/* ===== Modal Login ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.card {
  width: min(460px, 92vw);
  background: rgba(15,22,32,0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
  padding: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .6rem;
}

.brand .logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg,#49a2ff,#7a31ff);
}

form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

label {
  font-size: 12px;
  color: var(--dim);
}

input[type=email],
input[type=password] {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a111a;
  color: var(--fg);
  outline: none;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.btn {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  color: #04121f;
}

.btn-ghost {
  background: #0e151f;
  color: var(--fg);
  border: 1px solid var(--line);
}

.btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

.err {
  display: none;
  margin-top: .4rem;
  color: #ff6b6b;
  font-size: 13px;
  white-space: pre-wrap;
}

.footer {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  font-size: 12px;
}

.footer a {
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px dotted #2a3a4d;
}

/* ===== Map page ===== */
body, html {
  height: 100%;
}

#map {
  position: absolute;
  top: 60px; /* altura da navbar */
  bottom: 0;
  right: 0;
  left: 260px; /* sidebar ocupa a esquerda */
  z-index: 0;
}

.sidebar {
  position: absolute;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 260px;
  background: #0f1620;
  border-right: 1px solid var(--line);
  padding: 16px;
  overflow-y: auto;
  z-index: 1;
}

.sidebar h2 {
  font-size: 16px;
  margin: 0 0 12px;
}

/* Hamburger */
.hamburger {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--fg);
  cursor: pointer;
  margin-right: 12px;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 48px; /* altura da navbar */
  left: 0;
  bottom: 0;
  width: 260px;
  background: #141a22;
  border-right: 1px solid var(--line);
  padding: 12px;
  overflow-y: auto;
  transform: translateX(0);
  transition: transform 0.3s ease;
  z-index: 90;
}
.sidebar h2 {
  font-size: 15px;
  margin-bottom: 10px;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar li {
  margin-bottom: 8px;
}
.sidebar a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--fg);
  text-decoration: none;
}
.sidebar a:hover {
  background: var(--line);
  color: var(--accent);
}

/* Sidebar fechada */
.sidebar.closed {
  transform: translateX(-100%);
}

/* Map ocupa espaço */
#map {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}
