:root {
  --bg: #f4f1ec;
  --ink: #1c1917;
  --muted: #78716c;
  --card: #fffaf5;
  --line: #e7e0d6;
  --accent: #0f766e;
  --accent-2: #c2410c;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 40%),
    radial-gradient(circle at bottom right, rgba(194, 65, 12, 0.10), transparent 35%),
    var(--bg);
  min-height: 100vh;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 4px;
  font-weight: 700;
}
h1, h2 { font-family: var(--font); margin: 0; }
.muted { color: var(--muted); }
.alert {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 12px 0;
}

body.auth {
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.stack { display: grid; gap: 14px; margin-top: 18px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input[type="text"], input[type="password"], input[type="search"], input:not([type]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
button, .btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 22px 24px 8px;
}
.top-right { display: flex; gap: 10px; align-items: center; }
.tabs {
  display: flex;
  gap: 8px;
  padding: 8px 24px 0;
  flex-wrap: wrap;
}
.tabs a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
}
.tabs a.active {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.panel { padding: 16px 24px 32px; }
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.toolbar input[type="search"] { max-width: 360px; }

.table-wrap {
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
tbody tr:hover { background: rgba(15, 118, 110, 0.04); }

.map-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 14px;
  min-height: 70vh;
}
#map {
  min-height: 70vh;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  align-content: start;
  max-height: 70vh;
  overflow: auto;
}
.side label { font-weight: 500; }
.selected { font-size: 14px; line-height: 1.45; }
.filter-block { display: grid; gap: 8px; }
.filter-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.side select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.side-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}
.small { font-size: 12px; }
.sel-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.sel-emoji {
  font-size: 28px;
  line-height: 1;
}
.site-checks {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid var(--line);
}
.site-checks-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.site-checks-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-mini {
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}
.btn-mini.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-mini:disabled {
  opacity: 0.6;
  cursor: wait;
}
.site-check {
  display: flex;
  gap: 8px;
  align-items: center;
  text-transform: capitalize;
}

.poi-icon-wrap {
  background: transparent !important;
  border: 0 !important;
}
.poi-icon-wrap.mun-hit {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.poi-pin {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(28, 25, 23, 0.18);
  border: 2px solid #fff;
  background: #d6d3d1;
}
.poi-pin.on {
  background: #ccfbf1;
  border-color: #0f766e;
}
.poi-pin.center.on {
  background: #ffedd5;
  border-color: #c2410c;
}
.poi-pin.mun {
  width: 30px;
  height: 30px;
  font-size: 14px;
  background: #fffbeb;
  border-color: #d97706;
}
.poi-pin.mun.es {
  width: 22px;
  height: 22px;
  font-size: 12px;
  background: #eff6ff;
  border-color: #2563eb;
}
.poi-pin.mun.on {
  background: #ffedd5;
  border-color: #c2410c;
}
.poi-pin.off {
  opacity: 0.72;
  filter: grayscale(0.35);
}
.poi-pin span { line-height: 1; }

.site-footer {
  margin-top: 8px;
  padding: 18px 24px 28px;
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 245, 0.72);
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.site-footer-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.goto-sister-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.goto-sister {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.goto-sister img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.goto-sister:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

body.auth {
  align-content: center;
}
body.auth .site-footer {
  width: min(420px, 100%);
  margin: 16px auto 0;
  border-radius: 14px;
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .map-wrap { grid-template-columns: 1fr; }
  #map { min-height: 50vh; }
  .site-footer-inner { align-items: flex-start; }
}
