 :root {
  --bg: #050816;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #d4af37;
  --accent-2: #f8e08e;
  --success: #22c55e;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(212, 175, 55, 0.22), transparent 32%),
    radial-gradient(circle at 84% 20%, rgba(59, 130, 246, 0.16), transparent 32%),
    radial-gradient(circle at 65% 95%, rgba(168, 85, 247, 0.12), transparent 34%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
  opacity: 0.35;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: 42px 0;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.brand { display: flex; flex-direction: column; gap: 8px; }

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.subtitle {
  color: var(--muted);
  max-width: 660px;
  font-size: 16px;
  line-height: 1.6;
  margin-top: 8px;
}

.status-pill {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px var(--shadow);
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 99px;
  margin-right: 8px;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.9);
  vertical-align: 1px;
}

.status-pill strong { color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: 392px 1fr;
  gap: 22px;
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border-radius: 28px;
  box-shadow: 0 26px 90px var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.card-header {
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.card-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.primary-box {
  margin: 18px 22px 0;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(255,255,255,0.05)),
    rgba(0,0,0,0.24);
  border: 1px solid rgba(212, 175, 55, 0.26);
}

.primary-box .big {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.045em;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.info {
  padding: 18px 22px 22px;
  display: grid;
  gap: 10px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.row:last-child { border-bottom: none; }

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

.value {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

button, .button-link {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 13px 16px;
  font-weight: 900;
  cursor: pointer;
  color: #050816;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 14px 34px rgba(212, 175, 55, 0.24);
  transition: transform 0.18s ease, filter 0.18s ease;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
}

button:hover, .button-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.secondary {
  color: var(--text);
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  box-shadow: none;
}

.map-card {
  min-height: 690px;
  position: relative;
}

#map {
  width: 100%;
  height: 690px;
  background: #111827;
  filter: saturate(0.92) contrast(1.02);
}

.map-overlay {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 900;
  background: rgba(5, 8, 22, 0.80);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px 16px;
  backdrop-filter: blur(16px);
  max-width: 340px;
  box-shadow: 0 18px 54px rgba(0,0,0,0.34);
}

.map-overlay strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.map-overlay span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.footer-note {
  margin-top: 18px;
  color: rgba(148, 163, 184, 0.86);
  font-size: 12px;
  line-height: 1.55;
}

.error { color: var(--danger) !important; }
.success { color: var(--success) !important; }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #08111f;
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 54px rgba(0,0,0,0.38);
}

.leaflet-popup-content { line-height: 1.5; }

.hidden { display: none !important; }

@media (max-width: 920px) {
  header { align-items: flex-start; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .map-card, #map { min-height: 540px; height: 540px; }
  .status-pill { white-space: normal; }
}

@media (max-width: 560px) {
  .actions { flex-direction: column; }
  .row { align-items: flex-start; flex-direction: column; gap: 5px; }
  .value { text-align: left; }
  .map-overlay { right: 18px; max-width: unset; }
}
