/* =======================
   1. ESTILOS GLOBAIS
======================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: Arial, sans-serif;
}

a {
  text-decoration: none;
}

/* =======================
   2. HEADER
======================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #004466;
  color: white;
  height: 70px;
  padding: 10px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1500;
}

header h1 {
  margin: 0;
  font-size: 24px;
}

header .logo {
  height: 40px;
  margin-right: 10px;
}

header .header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

header .logout {
  color: white;
  text-decoration: none;
  padding: 5px 10px;
  background: #aa0000;
  border-radius: 5px;
}

header .logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

header .logo-container h1 {
  margin: 0;
  font-size: 24px;
}

/* =======================
   3. SIDEBAR
======================= */
#sidebar {
  position: fixed;
  top: 70px;           /* abaixo do header */
  left: 0;
  width: 240px;
  height: calc(100% - 60px);
  background: #f8f8f8;
  padding: 15px;
  overflow-y: auto;
  box-shadow: 2px 0 6px rgba(0,0,0,0.3);
  transition: transform 0.3s;
  z-index: 1600;
}

#sidebar h3 {
  margin-top: 0;
}

#sidebar input[type="text"] {
  width: 100%;
  padding: 5px;
  margin: 5px 0;
}

#sidebar button {
  width: 100%;
  padding: 5px;
  margin-top: 5px;
  background: #004466;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 3px;
}

#sidebar button:hover {
  background: #006699;
}

/* =======================
   4. MENU HORIZONTAL (top menu)
======================= */
#menu-fixo {
  position: fixed;
  top: 70px;          /* abaixo do header */
  left: 270px;        /* ao lado da sidebar */
  right: 0;
  height: 40px;
  background-color: #0078d7;
  display: flex;
  align-items: center;
  padding-left: 10px;
  z-index: 1600;
}

#menu-fixo ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 10px;
}

#menu-fixo .menu-item {
  position: relative;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: bold;
}

#menu-fixo .menu-item:hover {
  background-color: #005bb5;
  border-radius: 4px;
}

#menu-fixo .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0078d7;
  color: #004466;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 150px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1500;
  flex-direction: column;
}

#menu-fixo .submenu li {
  padding: 8px 12px;
}

#menu-fixo .submenu li a {
  text-decoration: none;
  color: white;
  display: block;
}

#menu-fixo .submenu li:hover {
  background-color:#005bb5;
}

/* =======================
   5. MAPAS (Leaflet)
======================= */
#map {
  position: absolute;
  top: 110px;  /* header + menu */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
}

.leaflet-control-container,
.leaflet-top,
.leaflet-bottom {
  z-index: 1600 !important;
  pointer-events: auto !important;
}

.leaflet-control {
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.leaflet-top.leaflet-left {
  left: 260px !important; /* afasta dos menus */
}

.leaflet-control-layers {
  z-index: 1600 !important;
}

/* =======================
   6. LABELS / TOOLTIP
======================= */
.lote-label {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #000;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 1px rgba(255,255,255,0.6);
}

.quadra-label {
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 8px;
  text-align: center;
  font-weight: bold;
  border: 2px solid white;
  box-shadow: 0 0 2px #000;
  font-size: 8px;
  line-height: 1;
}

.label-endpost {
  color: black;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 2px white;
}

/* =======================
   7. PROJETOS / LOGIN / CONTAINERS
======================= */
body.inicio {
  background:#38618a;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: #3a3585;
}

.container {
  background: rgba(220,228,241,0.6);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  text-align: center;
  max-width: 400px;
}

.container h1 { margin-bottom: 15px; }
.container p { margin-bottom: 20px; }

.botao {
  display: inline-block;
  padding: 12px 25px;
  background: #fff;
  color: #0078d7;
  font-weight: bold;
  border-radius: 8px;
  transition: 0.3s;
}

.botao:hover {
  background: #f1f1f1;
}

form input {
  display: block;
  margin: 10px auto;
  padding: 12px;
  width: 80%;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

form button {
  padding: 12px 25px;
  margin-top: 10px;
  background: #0078d7;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

form button:hover {
  background: #005bb5;
}

.projetos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.projeto-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  width: 140px;
  transition: 0.3s;
  color: #0078d7;
  font-weight: bold;
}

.projeto-item:hover {
  background: #f1f1f1;
}

.projeto-icone {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}
