/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.6;
  background-color: #f4f4f4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* HEADER fixo */
header {
  background-color: #333;
  color: white;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1200;
}

/* ===== HEADER ===== */
header {
  background: linear-gradient(90deg, #1f1f1f, #333);
  color: white;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1200;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-container h1 {
  font-size: 1.6rem;
  font-weight: 600;
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0 4px;
  transition: color 0.2s ease, transform 0.2s ease;
}

nav a:hover {
  color: white;
  background-color: #444;
  transform: translateY(-1px);
}

.logout-link {
  color: #ff5a5a;
  font-weight: 500;
}

.logout-link:hover {
  background: #ff5a5a56;
  font-weight: 700;
}

#menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

#menu-toggle:hover {
  transform: rotate(90deg);
}

/* ===== MAIN LAYOUT ===== */
.main-container {
  display: flex;
  padding-top: 80px; /* espaço para header fixo */
  flex: 1;
  position: relative;
}

main {
  flex: 1;
  padding: 2rem;
  margin-right: 220px; /* reserva para sidebar */
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 60px;
  right: 0;
  width: 220px;
  height: calc(100vh - 60px);
  background-color: #2e2e2e;
  color: white;
  padding: 1rem 1rem 1rem 0;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1100;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.2);
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin-bottom: 1rem;
}

.sidebar ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar ul li a:hover {
  background-color: #444;
  transform: translateX(4px);
}

/* Mostrar sidebar */
.sidebar:not(.hidden) {
  transform: translateX(0);
}

/* ===== FOOTER ===== */
footer {
  background-color: #1f1f1f;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
  font-size: 0.9rem;
}

/* MAPAS */
#map-central {
  margin: 20px auto;
  width: 90%;
  height: 500px;
  border: 2px solid #ccc;
}

#map-container {
  width: 100%;
  height: 100vh;
  position: relative;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}

/* ===== LOGIN PAGE STYLES ===== */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
  color: #f5f5f5;
}

.login-container {
  background-color: #2e2e2e;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.4s ease;
}

.login-container h1 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
  color: #2ea76c;
}

.login-container label {
  font-size: 0.9rem;
  margin-bottom: 4px;
  display: block;
  font-weight: 500;
}

.login-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 16px;
  border: none;
  border-radius: 8px;
  outline: none;
  background-color: #444;
  color: #fff;
  font-size: 0.95rem;
}

.login-container input:focus {
  box-shadow: 0 0 0 2px #2ea76c;
}

.login-container button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2ea76c, #257c51);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.login-container button:hover {
  background: linear-gradient(135deg, #257c51, #2ea76c);
  transform: translateY(-1px);
}

#error-message {
  margin-top: 10px;
  color: #ff5a5a;
  font-size: 0.85rem;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 2rem;
  background-color: #f5f5f5;
}

.card {
  background-size: cover;
  background-position: center;
  height: 300px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
}

.card:hover {
  transform: scale(1.03);
}

.card-content {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 1rem;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  width: 100%;
}

.card-content h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-content p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.btn-white {
  background-color: #ffffff;
  color: #003a63;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-white:hover {
  background-color: #e0e0e0;
}


/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
