
.home-link-bar {
  background: rgba(11, 17, 32, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 10px 16px;
  font-weight: 600;
}
.home-link-bar a {
  color: var(--accent);
  text-decoration: none;
}
.home-link-bar a:hover {
  text-decoration: underline;
}

:root {
  --bg: #0f1524;
  --panel: #111827;
  --panel-dark: #0b1120;
  --border: #1f2937;
  --muted: #94a3b8;
  --muted-light: #cbd5f5;
  --accent: #d5a037;
  --danger: #ef4444;
  --danger-dark: #991b1b;
  --success: #22c55e;
  --text: #e5e7eb;
  --font-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.wrapper {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 20px 60px;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 21, 36, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.9);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.alert-banner,
.demo-banner {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.95rem;
}

.alert-banner {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
}

.demo-banner {
  background: linear-gradient(135deg, #1d2236 0%, #0b0f1e 100%);
}

.hidden { display: none !important; }

.stats-grid {
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.stat-card .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-card .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.map-shell {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  height: 65vh;
  min-height: 420px;
  margin-bottom: 18px;
}

#map {
  width: 100%;
  height: 100%;
}

.map-overlay {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(11, 17, 32, 0.9);
  border: 1px solid rgba(213, 160, 55, 0.5);
  border-radius: 999px;
  padding: 10px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.map-overlay a {
  color: #fff;
  font-weight: 600;
}

.map-controls {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-toggle {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 24, 39, 0.85);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, border 0.2s;
}

.map-toggle.active {
  background: var(--accent);
  color: #1b1b2f;
  border-color: transparent;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 12px;
  flex-wrap: wrap;
}

.feed-title {
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.nearme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--text);
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.incident-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.incident-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.incident-card h4 {
  font-size: 1rem;
  font-weight: 600;
}

.incident-location {
  color: var(--muted);
  font-size: 0.95rem;
}

.incident-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.badge {
  border-radius: 12px;
  padding: 4px 10px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-warning { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.cta-band {
  background: linear-gradient(135deg, #182138, #14203a);
  border: 1px solid rgba(213, 160, 55, 0.3);
  border-radius: 18px;
  padding: 20px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:active { transform: scale(0.98); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-gold {
  background: var(--accent);
  color: #1b1b2f;
}

.table-shell {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 12px;
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.02);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .map-overlay {
    flex-direction: column;
    border-radius: 16px;
    bottom: 12px;
  }

  .cta-band {
    flex-direction: column;
    text-align: center;
  }

  .map-shell {
    height: 55vh;
  }
}
