* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #10161a;
  background: #f4f7f7;
}

.hidden { display: none !important; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #00776e;
  color: #fff;
}

.topbar h1 { font-size: 18px; margin: 0; }

.navlink {
  margin-right: auto;
  margin-left: 16px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  background: #00a79d;
  padding: 7px 12px;
  border-radius: 4px;
}
.navlink:hover { background: #00776e; }

#authBox { display: flex; align-items: center; gap: 10px; }

#signInForm { display: flex; gap: 8px; }

#signInForm input {
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #d3dae0;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 7px 12px;
  background: #00a79d;
  color: #fff;
  font-size: 13px;
}

button:hover { background: #00776e; }

#signOutBtn { background: #6b6b6b; }

.error {
  color: #b3261e;
  background: #fdecea;
  margin: 0;
  padding: 8px 20px;
  font-size: 13px;
}

#app {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 45px);
}

.panel {
  padding: 16px;
  overflow-y: auto;
  border-right: 1px solid #e2e7ec;
  background: #fff;
}

.panel h2 { font-size: 15px; margin: 0 0 10px; }
.panel section { margin-bottom: 26px; }

#routeForm label {
  display: block;
  font-size: 12px;
  color: #5f676e;
  margin-bottom: 10px;
}

#routeForm input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 7px 8px;
  border-radius: 4px;
  border: 1px solid #d3dae0;
  font-size: 13px;
}

.status { font-size: 12px; color: #5f676e; min-height: 16px; }

.summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0 0;
  padding: 10px;
  background: #edf0f2;
  border-radius: 6px;
}

.summary div { display: flex; justify-content: space-between; font-size: 13px; }
.summary dt { color: #5f676e; }
.summary dd { margin: 0; font-weight: 600; }

.note {
  font-size: 12px;
  color: #9c6d23;
  background: #fff6e0;
  border: 1px solid #f0dca0;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 10px;
}

.hint { font-size: 12px; color: #5f676e; margin: 0 0 10px; }

.typeToggle { display: flex; gap: 6px; margin-bottom: 8px; }

.typeBtn {
  flex: 1;
  background: #edf0f2;
  color: #10161a;
}

.typeBtn.active {
  background: #00a79d;
  color: #fff;
}

#pottyForm input,
#flagForm input[type="text"],
#routeRating input[type="text"],
#pottyForm select,
#flagForm select {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 7px 8px;
  border-radius: 4px;
  border: 1px solid #d3dae0;
  font-size: 13px;
  background: #fff;
}

.btnRow { display: flex; gap: 8px; margin-bottom: 8px; }
.btnRow button { flex: 1; }
#cancelPottyBtn, #cancelFlagBtn { background: #6b6b6b; }

.inlineRow { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.inlineRow input { flex: 1; margin-top: 0 !important; }
.inlineRow button { flex: 0 0 auto; padding: 7px 10px; }

.fieldLabel {
  display: block;
  font-size: 12px;
  color: #5f676e;
  margin-bottom: 8px;
}
.fieldLabel select, .fieldLabel input[type="range"] { margin-top: 4px; width: 100%; }

.pinLabel {
  font-size: 12px;
  color: #00776e;
  background: #edf0f2;
  border-radius: 4px;
  padding: 6px 8px;
  margin: 0 0 10px;
}

/* Which tap-the-map action is armed. Only one can be active, so these
   read as a segmented control rather than three independent buttons. */
.modeToggle { display: flex; gap: 6px; margin-bottom: 8px; }
.modeBtn {
  flex: 1;
  background: #edf0f2;
  color: #10161a;
  font-size: 12px;
  padding: 7px 6px;
}
.modeBtn.active { background: #00776e; color: #fff; }

.flagKindBtn { flex: 1; background: #edf0f2; color: #10161a; }
.flagKindBtn.active { background: #c1882d; color: #fff; }

.rating {
  margin-top: 12px;
  padding: 10px;
  background: #f4f7f7;
  border: 1px solid #e2e7ec;
  border-radius: 6px;
}
.rating h3 { font-size: 13px; margin: 0 0 8px; }
.stars { display: flex; gap: 6px; margin-bottom: 6px; }
.starBtn {
  flex: 1;
  background: #edf0f2;
  color: #10161a;
  font-weight: 600;
}
.starBtn.active { background: #c1882d; color: #fff; }

.legend { list-style: none; padding: 0; margin: 12px 0 0; font-size: 12px; display: flex; flex-wrap: wrap; gap: 10px 14px; }
.legend li { display: flex; align-items: center; gap: 6px; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.pee { background: #2f80ed; }
.dot.poop { background: #7a4a2b; }
.dot.avoid { background: #c0392b; }
.dot.shade { background: #00a79d; }

#map { width: 100%; height: 100%; }
