body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f4f4f4;
}

/* Authentication View */
#landing { display:flex; }
#landing.full { display:block; width:100%; }
#landing.full #dashboard, #landing.full .section { max-width:100%; width:100%; }
#landing.full #auth-container { width:100%; }
.panel { flex:1; max-width:50%; min-width:300px; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; transition:transform 0.3s; }
#auth-container { flex:1; }

#api-panel h2 { font-size:1.5rem; }

/* wrap long text in tables */
.table td { white-space:normal; word-break:break-word; }

/* standout rainbow button */
.rainbow-btn {
  background-image: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
  color: #fff !important;
  border: none;
}
.rainbow-btn:hover {
  filter: brightness(1.1);
}

#auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

/* Forms */
.form {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 320px;
  text-align: center;
  display: none;
}

.form.active {
  display: block;
}

input, textarea, select {
  width: 100%;
  padding: 8px;
  margin: 6px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

button {
  padding: 10px 16px;
  margin: 6px 0;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* Dashboard */
.hidden {
  display: none !important;
}

#dashboard {
  padding: 0 1rem 2rem 1rem;
}

/* Navbar */
#navbar {
  background-color: #222;
  color: #fff;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

#navbar .nav-btn, #navbar #logout-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

#navbar .nav-btn.active {
  font-weight: bold;
  text-decoration: underline;
}

#navbar .role {
  margin-left: auto;
  margin-right: 8px;
}

#navbar .right {
  margin-left: 0;
}

.nav-btn.locked {
  opacity: 0.5;
}

.nav-btn.locked::after {
  content: "";
}

/* Sections */
.section {
  display: none;
  margin-top: 1rem;
}

.section.active {
  display: block;
}

ul {
  list-style: none;
  padding: 0;
}

#crime-map, #report-map, #patrol-map, #patrol-update-map {
  border: 1px solid #ccc;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#message {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background-color: #fff;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
  border-radius: 4px;
}
