:root {
  --bg: #f4fbf9;
  --card: #ffffff;
  --ink: #103738;
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --warn: #b45309;
  --danger: #b91c1c;
  --line: #cbe5df;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(
    circle at top right,
    #dff6f1 0%,
    var(--bg) 35%,
    #eef9f6 100%
  );
}

a {
  color: var(--brand);
  text-decoration: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, #e3fbf4, #f8fffd);
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  margin: 0;
  font-size: 1.4rem;
}

.topbar p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

.topbar-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
  padding: 1rem;
}

.layout.dashboard {
  grid-template-columns: 1fr 1fr;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 6px 22px rgba(9, 68, 65, 0.08);
}

.panel.full {
  grid-column: 1 / -1;
}

#map {
  height: 62vh;
  min-height: 360px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.stack {
  display: grid;
  gap: 0.55rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.55rem;
}

button,
input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-size: 0.95rem;
}

button {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff;
  cursor: pointer;
  border: none;
}

button.ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand-2);
}

.card {
  background: #f7fdfb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
  margin-bottom: 0.8rem;
}

.muted {
  color: #4b6762;
}

.status {
  background: #effcf8;
  border: 1px dashed #97d9cb;
  border-radius: 8px;
  padding: 0.55rem;
  margin-bottom: 0.8rem;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-wrap {
  width: min(980px, 96vw);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.stat {
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fffd;
}

.stat strong {
  display: block;
  font-size: 1.2rem;
}

#statsTable {
  width: 100%;
  border-collapse: collapse;
}

#statsTable th,
#statsTable td,
#issuesTable th,
#issuesTable td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.5rem;
}

#issuesTable {
  width: 100%;
  border-collapse: collapse;
}

.issue-status {
  text-transform: capitalize;
  font-weight: 600;
}

@media (max-width: 980px) {
  .layout,
  .layout.dashboard,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  #map {
    height: 48vh;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
