:root {
  --bg: #0f1419;
  --panel: #1a2029;
  --border: #2a3140;
  --text: #e6e9ef;
  --muted: #8b95a5;
  --accent: #ff6b4a;
  --accent2: #4ade80;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 0 1.5rem 2rem;
}

header {
  padding: 1.5rem 0 1rem;
}

h1 { margin: 0 0 0.25rem; font-size: 1.6rem; }
.subtitle { margin: 0; color: var(--muted); font-size: 0.9rem; }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.controls label { font-size: 0.85rem; color: var(--muted); }

select, button {
  background: #0f1419;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

button {
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

button:hover { opacity: 0.9; }

.auto-refresh { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }

#estado {
  min-height: 1.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

#alertaEstado {
  min-height: 1.2rem;
  color: var(--accent2);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.banner-alerta {
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 700;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  animation: pulso 1s ease-in-out 3;
}

.banner-alerta.oculto {
  display: none;
}

@keyframes pulso {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

#mapa {
  height: 420px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.lista-container h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
}

tr:last-child td { border-bottom: none; }
tr:hover { background: rgba(255,255,255,0.03); }

.mag-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  color: #111;
}

td a { color: var(--accent2); text-decoration: none; }
td a:hover { text-decoration: underline; }

footer {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}
footer a { color: var(--accent2); }
