* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f7f7;
  color: #1f2933;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 0.55rem;
  padding: 0.55rem 0.8rem;
  background: #1f2933;
  color: white;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

button[hidden],
[hidden] {
  display: none !important;
}

.topbar {
  height: 58px;
  padding: 0.6rem 0.8rem;
  background: white;
  border-bottom: 1px solid #d9dee3;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 500;
}

.topbar nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  overflow-x: auto;
}

#map {
  width: 100vw;
  height: calc(100vh - 58px);
}

.status {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 700;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.55rem 0.75rem;
  border-radius: 0.7rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.14);
  max-width: min(92vw, 520px);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-card {
  background: white;
  width: min(100%, 420px);
  border-radius: 1rem;
  box-shadow: 0 12px 35px rgba(0,0,0,0.12);
  padding: 1.4rem;
}

.login-card h1 {
  margin: 0 0 0.2rem;
}

.muted {
  color: #667085;
}

.login-card form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.login-card label {
  display: grid;
  gap: 0.35rem;
  font-weight: 650;
}

.login-card input,
dialog input {
  width: 100%;
  border: 1px solid #ccd2d8;
  border-radius: 0.55rem;
  padding: 0.65rem;
}

.message {
  border-radius: 0.55rem;
  padding: 0.65rem;
  margin: 0.4rem 0;
}

.message.error {
  background: #fff1f1;
  color: #8a1f1f;
}

dialog {
  border: 0;
  border-radius: 1rem;
  width: min(92vw, 430px);
  padding: 1.2rem;
  box-shadow: 0 22px 55px rgba(0,0,0,0.28);
}

dialog::backdrop {
  background: rgba(0,0,0,0.35);
}

.radio-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin: 0.7rem 0;
}

.radio-row input {
  width: auto;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.simple-page {
  padding: 2rem;
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  #map {
    height: calc(100vh - 104px);
  }
}
