/* Campus map page. Blue and white, matching the student theme. */
body.map-page {
  background:
    linear-gradient(rgba(234, 245, 255, 0.82), rgba(234, 245, 255, 0.92)),
    url("/images/cspc-campus.jpg") center / cover fixed;
}
.nexus {
  display: grid;
  gap: 18px;
  padding-top: 20px;
  padding-bottom: 32px;
}
.nexus-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(7, 89, 166, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(7, 59, 112, 0.1);
}
.nexus h1,
.nexus h2 {
  margin: 0 0 6px;
  color: #0b2f55;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.01em;
}
.nexus h1 { font-size: 34px; line-height: 1.1; }
.nexus h2 { font-size: 20px; }
.nexus-eyebrow { margin: 0 0 6px; color: #3d7db8; font-size: 12px; letter-spacing: 0.06em; }
.nexus-sub,
.nexus-note { margin: 0 0 12px; color: #4a6279; font-size: 14px; line-height: 1.55; }
.nexus-note[hidden] { display: none; }

.nexus-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.nexus-stat {
  padding: 12px 14px;
  border: 1px solid #bfe0f5;
  border-radius: 12px;
  background: #e1f2fc;
}
.nexus-stat span { display: block; color: #4a6279; font-size: 12px; }
.nexus-stat strong { display: block; margin-top: 4px; color: #0b6fb8; font-size: 26px; line-height: 1.1; }
.nexus-stat-wide strong { font-size: 14px; line-height: 1.35; }

.nexus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.nexus-map-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #d3e3f0;
}
.nexus-map { height: 430px; background: #cfe2f5; }

/* radar sweep */
.nexus-radar {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 450;
  width: 150%;
  aspect-ratio: 1;
  margin: 0;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 0deg, rgba(120, 190, 255, 0.34), rgba(120, 190, 255, 0) 22%, transparent 100%);
  animation: nexus-spin 7s linear infinite;
}
.nexus-radar[hidden] { display: none; }
@keyframes nexus-spin { to { rotate: 360deg; } }

.nexus-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 12px;
  color: #3e566a;
  font-size: 13px;
}
.nexus-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-lost, .pin-lost { background: #dc2626; }
.dot-found, .pin-found { background: #f59e0b; }
.dot-none, .pin-none { background: #1d4ed8; }
.nexus-toggle {
  margin-left: auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #1a9aa8;
  border-radius: 999px;
  background: #fff;
  color: #0f6e7a;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* pins */
.pin-wrap { background: transparent; border: 0; }
.pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font: 700 12px/1 system-ui, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.pin-popup strong { display: block; margin-bottom: 4px; }
.pin-popup ul { margin: 0; padding-left: 16px; }
.pin-popup p { margin: 4px 0 0; }

/* places list */
.nexus-places { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nexus-place {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #d3e3f0;
  border-radius: 12px;
  background: #fff;
  color: #0b2f55;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nexus-place:hover { border-color: #1766b1; }
.nexus-place-name { font-weight: 650; }
.nexus-place-counts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.chip-lost { background: #fee2e2; color: #b91c1c; }
.chip-found { background: #fef3c7; color: #b45309; }
.chip-none { background: #e1f2fc; color: #1d4ed8; }

/* pulse */
.nexus-pulse { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nexus-pulse-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(7, 59, 112, 0.08);
  color: inherit;
  text-decoration: none;
}
.nexus-pulse-item:hover { text-decoration: none; background: #f3f9ff; }
.nexus-pulse-text { display: grid; min-width: 0; }
.nexus-pulse-text strong { color: #0b2f55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexus-pulse-text small { color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  flex: none;
  padding: 4px 10px;
  border: 1px solid #2d4f78;
  border-radius: 6px;
  background: #e8f0fa;
  color: #1d3f6b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.badge-lost { border-color: #c0392b; background: #fdecea; color: #a02a1e; }
.nexus-empty { color: #64748b; }

@media (max-width: 820px) {
  body.map-page { background-attachment: scroll; }
  .nexus { gap: 14px; padding-top: 14px; }
  .nexus-panel { padding: 14px; border-radius: 16px; }
  .nexus h1 { font-size: 28px; }
  .nexus-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nexus-stat-wide { grid-column: 1 / -1; }
  .nexus-grid { grid-template-columns: minmax(0, 1fr); }
  .nexus-map { height: 58vh; min-height: 340px; }
  .nexus-toggle { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nexus-radar { animation: none; }
}