* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1a1a1a;
  background: #f4f5f7;
}

.hidden { display: none !important; }

/* Login */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a5f, #2c5282);
}
.login-box {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  width: 320px;
  text-align: center;
}
.login-box h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.login-box .subtitle { color: #666; font-size: 0.85rem; margin-bottom: 1.5rem; }
.login-box input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
}
.login-box button {
  width: 100%;
  padding: 0.65rem;
  background: #2c5282;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}
.login-box button:hover { background: #1e3a5f; }
.error { color: #c0392b; font-size: 0.85rem; min-height: 1.2em; margin-top: 0.5rem; }

/* App shell */
#app-screen { display: flex; flex-direction: column; height: 100vh; }
header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #1e3a5f;
  color: white;
}
header h1 { font-size: 1.1rem; margin: 0; margin-right: auto; }
.filters { display: flex; gap: 0.5rem; }
.filters select, .filters button, #btn-logout {
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  border: none;
  font-size: 0.85rem;
}
.filters button, #btn-logout { background: #3182ce; color: white; cursor: pointer; }
.filters button:hover, #btn-logout:hover { background: #2b6cb0; }

main { flex: 1; display: flex; min-height: 0; }
#map { flex: 1; }
#list-panel {
  width: 320px;
  background: white;
  border-left: 1px solid #ddd;
  overflow-y: auto;
  padding: 0.75rem;
}
#list-panel h2 { font-size: 0.95rem; margin: 0 0 0.5rem; }
#occurrence-list { list-style: none; margin: 0; padding: 0; }
#occurrence-list li {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font-size: 0.85rem;
}
#occurrence-list li:hover { background: #f0f4f8; }
.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  color: white;
  margin-left: 0.4rem;
}
.badge.novo { background: #e53e3e; }
.badge.em_analise { background: #dd6b20; }
.badge.resolvido { background: #38a169; }

/* Modal */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-content {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 0.5rem; right: 0.75rem;
  background: none; border: none; font-size: 1.4rem; cursor: pointer;
}
.modal-content img { width: 100%; border-radius: 6px; margin-bottom: 0.75rem; background: #eee; }
.modal-content dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; font-size: 0.85rem; }
.modal-content dt { color: #666; }
.status-actions { display: flex; gap: 0.4rem; margin-top: 1rem; flex-wrap: wrap; }
.status-actions button {
  flex: 1;
  padding: 0.4rem;
  border: 1px solid #2c5282;
  background: white;
  color: #2c5282;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}
.status-actions button:hover { background: #2c5282; color: white; }
