:root {
  --bg: #f3efe6;
  --panel: rgba(255, 252, 245, 0.9);
  --panel-strong: #fffdf8;
  --text: #16202a;
  --muted: #64707d;
  --border: rgba(22, 32, 42, 0.12);
  --shadow: 0 24px 60px rgba(28, 39, 51, 0.12);
  --online: #0f766e;
  --building: #2563eb;
  --ground: #d97706;
  --plan: #7c3aed;
  --accent: #b91c1c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.6 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(185, 28, 28, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 24%),
    linear-gradient(180deg, #f8f4ea 0%, #efe7d8 100%);
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.toolbar,
.map-card,
.side-card,
.table-card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.card-head h2 {
  margin: 0;
  line-height: 1.1;
}

.hero h1 {
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -0.04em;
}

.hero-text,
.card-head p,
.map-note {
  margin: 12px 0 0;
  color: var(--muted);
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.metric-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(250, 245, 235, 0.94));
  border: 1px solid rgba(22, 32, 42, 0.08);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.04em;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
}

.search-box,
.status-filter {
  display: grid;
  gap: 8px;
  min-width: 240px;
  font-size: 14px;
  font-weight: 600;
}

.search-box input,
.status-filter select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
}

.map-card,
.side-card,
.table-card {
  border-radius: 28px;
  padding: 22px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
}

.dot-online { background: var(--online); }
.dot-building { background: var(--building); }
.dot-ground { background: var(--ground); }
.dot-plan { background: var(--plan); }

#map {
  height: 68vh;
  min-height: 520px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.leaflet-container {
  font-family: inherit;
  background: #dbeafe;
}

.leaflet-control-attribution {
  font-size: 11px;
}

.leaflet-popup-content-wrapper {
  border-radius: 18px;
  padding: 0;
}

.popup {
  min-width: 280px;
  padding: 16px;
}

.popup h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.popup-company {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.popup-grid {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 8px 10px;
  margin-top: 14px;
  font-size: 13px;
}

.popup-grid strong {
  color: var(--muted);
}

.popup-desc {
  margin-top: 12px;
  color: #243241;
  font-size: 13px;
}

.popup-source {
  display: inline-flex;
  margin-top: 12px;
  color: #1d4ed8;
  font-size: 13px;
  text-decoration: none;
}

.plain-source {
  color: var(--muted);
}

.map-note {
  font-size: 13px;
}

.project-list {
  display: grid;
  gap: 12px;
  max-height: calc(68vh + 32px);
  overflow: auto;
  padding-right: 4px;
}

.project-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(249, 245, 238, 0.9));
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-item:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.12);
}

.project-item h3 {
  margin: 0;
  font-size: 16px;
}

.project-meta,
.project-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin-top: 10px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-online { color: var(--online); background: rgba(15, 118, 110, 0.12); }
.badge-building { color: var(--building); background: rgba(37, 99, 235, 0.12); }
.badge-ground { color: var(--ground); background: rgba(217, 119, 6, 0.12); }
.badge-plan { color: var(--plan); background: rgba(124, 58, 237, 0.12); }

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.76);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(22, 32, 42, 0.08);
  vertical-align: top;
}

th {
  background: rgba(247, 241, 231, 0.96);
  font-size: 13px;
}

tbody tr:hover {
  background: rgba(219, 234, 254, 0.35);
}

td a {
  color: #1d4ed8;
  text-decoration: underline;
  font-weight: 600;
}

td a:hover {
  color: #1e40af;
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1100px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .legend {
    justify-content: start;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 10px;
  }

  .hero,
  .map-card,
  .side-card,
  .table-card {
    padding: 18px;
    border-radius: 22px;
  }

  .toolbar,
  .card-head {
    flex-direction: column;
    align-items: stretch;
  }

  #map {
    height: 52vh;
    min-height: 380px;
  }

  .project-list {
    max-height: none;
  }
}
