﻿:root {
  color-scheme: dark;
  --bg: #071015;
  --panel: rgba(13, 24, 31, .92);
  --panel-2: rgba(19, 32, 40, .88);
  --line: rgba(255,255,255,.13);
  --text: #f5f8fa;
  --muted: #9aa8b2;
  --accent: #ff6b00;
  --accent-2: #f5a623;
  --green: #67d35f;
  --danger: #ff3b1f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 20%, rgba(255,107,0,.16), transparent 0 26%, transparent),
    radial-gradient(circle at 86% 8%, rgba(255,107,0,.11), transparent 0 22%, transparent),
    linear-gradient(135deg, #071015, #101b22 48%, #071015);
}

.minimal-monitor {
  min-height: 100vh;
  background: #f4f6f7;
}

.minimal-monitor .monitor {
  padding: 14px;
}

.minimal-monitor .workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  gap: 14px;
}

.minimal-monitor #eventos,
.minimal-monitor .map-panel {
  min-height: 0;
}

.minimal-monitor .quake-scroll,
.minimal-monitor #event-map,
.minimal-monitor .event-map-wrap {
  height: 312px;
  min-height: 312px;
}

.minimal-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px 16px;
  color: #65717a;
  background: transparent;
  border: 0;
  font-size: 13px;
}

.minimal-footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.minimal-footer a:hover {
  text-decoration: underline;
}

.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 24px;
  background: rgba(7,16,21,.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.brand { width: 190px; min-width: 190px; }
.brand img {
  display: block;
  width: 178px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
}

nav { display: flex; gap: 8px; align-items: center; }
nav a {
  color: #c7d1d8;
  text-decoration: none;
  font-size: 14px;
  padding: 9px 10px;
  border-radius: 6px;
}
nav a:hover { color: white; background: rgba(255,255,255,.08); }

.system-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dce5ea;
  border: 1px solid rgba(255,107,0,.58);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}
.system-chip span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.monitor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  padding: 12px 22px 22px;
}

.hero {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 0;
  display: grid;
  align-items: stretch;
  padding: 32px 22px 18px;
  background:
    radial-gradient(circle at 16% 45%, rgba(255,107,0,.10), transparent 0 24%, transparent),
    repeating-radial-gradient(circle at 18% 50%, rgba(255,107,0,.10) 0 1px, transparent 1px 54px),
    linear-gradient(115deg, rgba(7,16,21,.1), rgba(13,25,32,.48));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-copy { display: grid; justify-items: start; text-align: left; }
.eyebrow { margin: 0 0 10px; color: var(--accent); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.eyebrow.dark { color: var(--accent); }
h1 { margin: 0; line-height: 1; }
.hero-title-logo {
  display: block;
  width: min(100%, 330px);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.28));
}
.tagline { margin: 10px 0 8px; color: white; font-size: 20px; font-weight: 800; }
.lede { max-width: 650px; margin: 0; color: #c9d5dc; font-size: 16px; line-height: 1.45; }

.signal-line {
  width: min(100%, 340px);
  height: 34px;
  margin: 24px 0 18px;
  background:
    linear-gradient(var(--accent), var(--accent)) left 50% / 100% 2px no-repeat;
  position: relative;
}

.signal-line::after {
  content: "";
  position: absolute;
  left: 43%;
  top: 2px;
  width: 70px;
  height: 30px;
  background: linear-gradient(135deg, transparent 0 18%, var(--accent) 18% 22%, transparent 22% 38%, var(--accent) 38% 42%, transparent 42% 58%, var(--accent) 58% 62%, transparent 62%);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hero-actions a { color: white; background: var(--accent); text-decoration: none; font-weight: 800; border-radius: 7px; padding: 10px 14px; }
.hero-actions .secondary { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); }

.hero-proof { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 18px; width: min(620px, 100%); }
.hero-proof article { border: 1px solid rgba(255,107,0,.24); border-radius: 8px; padding: 10px 12px; background: rgba(255,255,255,.04); }
.hero-proof b, .hero-proof span { display: block; }
.hero-proof span { color: #b8c5cd; margin-top: 4px; font-size: 12px; }

.event-card, .panel, .map-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.event-card { padding: 14px; }
.event-head { display: flex; justify-content: space-between; align-items: flex-start; }
.magnitude { font-size: 42px; line-height: .9; color: var(--accent); font-weight: 900; }
.badge { color: #102010; background: var(--green); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; }
.event-card h2 { margin: 10px 0; font-size: 18px; }
dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 4px 0 0; font-weight: 800; }
.event-note { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.4; margin: 14px 0 0; padding-top: 12px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.metrics article { background: rgba(12, 22, 29, .94); padding: 14px 24px; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 13px; }
.metrics b { display: block; font-size: 26px; margin: 4px 0 2px; }

.live-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.live-summary article {
  min-width: 0;
  padding: 13px 16px;
  background: rgba(255,255,255,.96);
  text-align: center;
}

.live-summary span,
.live-summary small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #65717a;
  font-size: 12px;
}

.live-summary b {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 4px 0;
  color: #252b2f;
  font-size: 23px;
}

.workspace { display: contents; }
.map-panel { grid-area: map; overflow: hidden; }
.map-panel { grid-column: 3; grid-row: 1; }
#eventos { grid-column: 2; grid-row: 1 / span 2; }
#fuentes { grid-column: 3; grid-row: 2; }
.map-toolbar, .panel-title { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 11px 12px; border-bottom: 1px solid var(--line); position: relative; text-align: center; }
.map-toolbar strong, .panel-title h2 { margin: 0; font-size: 16px; }
.panel-title span { position: absolute; right: 12px; color: var(--muted); font-size: 12px; }
.map-toolbar .segmented { position: absolute; right: 12px; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.segmented button { border: 0; background: rgba(255,255,255,.08); color: #dce5ea; padding: 6px 9px; cursor: pointer; }
.segmented .active { background: var(--accent); color: white; }

.event-map-wrap {
  position: relative;
  min-height: 404px;
  background: #dbe7ed;
}

#event-map {
  width: 100%;
  height: 404px;
  min-height: 404px;
  z-index: 1;
}

.selected-event-card {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 450;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(37,43,47,.12);
  border-radius: 7px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 26px rgba(37,43,47,.16);
}

.selected-event-card b,
.selected-event-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-event-card b {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #252b2f;
  font-size: 13px;
}

.event-mag-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,255,255,.82), 0 2px 8px rgba(37,43,47,.22);
}

.selected-event-card span {
  color: #65717a;
  font-size: 12px;
}

.leaflet-container {
  font-family: Arial, Helvetica, sans-serif;
}

.leaflet-popup-content {
  margin: 10px 12px;
  color: #252b2f;
  font-size: 12px;
}

.panel { min-height: 0; overflow: hidden; }
.quake-table { width: 100%; font-size: 12px; }
.quake-row { display: grid; grid-template-columns: 44px 58px minmax(92px,.9fr) minmax(86px,.75fr) 56px 72px 112px 58px; gap: 5px; align-items: center; text-align: center; min-height: 28px; padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.quake-row.head { position: sticky; top: 0; z-index: 1; min-height: 28px; color: #b7c3ca; background: #101b22; font-weight: 800; }
.quake-scroll { height: 404px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.quake-scroll::-webkit-scrollbar { width: 10px; }
.quake-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,.05); }
.quake-scroll::-webkit-scrollbar-thumb { background: rgba(255,107,0,.58); border-radius: 999px; border: 2px solid #101b22; }
.quake-row.hot { background: rgba(255,107,0,.12); }
.quake-row.selected { background: rgba(255,107,0,.20); outline: 1px solid rgba(255,107,0,.42); outline-offset: -1px; }
.quake-row:not(.head) { cursor: pointer; }
.quake-row:not(.head):hover { background: rgba(255,107,0,.10); }
.quake-row b { color: var(--accent); font-size: 13px; }
.magnitude-pill {
  display: inline-grid;
  place-items: center;
  min-width: 43px;
  height: 20px;
  margin: 0 auto;
  border-radius: 999px;
  color: white !important;
  font-size: 11px !important;
  font-weight: 900;
  line-height: 1;
}

.mag-low { background: #48a868; }
.mag-3 { background: #7cb342; }
.mag-4 { background: #f5b400; color: #252b2f !important; }
.mag-5 { background: #f07c00; }
.mag-6 { background: #d7191c; }
.mag-7 { background: #8b0000; }
.quake-row small { color: var(--muted); font-size: 11px; }
.quake-row span, .quake-row time, .quake-row em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.quake-row em { color: var(--green); font-style: normal; }

.source-grid, .trust-flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
.source-grid article, .trust-flow article { border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: rgba(255,255,255,.04); }
.source-grid b, .source-grid span, .trust-flow b, .trust-flow span { display: block; }
.source-grid b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; }
.source-grid span, .trust-flow span { color: var(--muted); margin-top: 6px; }
.trust-panel { grid-column: 2; }
.trust-flow { grid-template-columns: 1fr; }
.status-panel ul { list-style: none; margin: 0; padding: 12px 14px 14px; display: grid; gap: 10px; }
.status-panel li { display: flex; align-items: center; gap: 10px; color: #dce5ea; }
.status-panel li span { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.admin-panel p { margin: 0; padding: 14px; color: var(--muted); line-height: 1.5; }

.plans { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); gap: 32px; padding: 38px 24px; background: rgba(255,255,255,.04); border-top: 1px solid var(--line); }
.plans > div:first-child { display: grid; justify-items: center; text-align: center; }
.plans h2 { font-size: 32px; line-height: 1.1; margin: 10px 0 0; max-width: 620px; text-align: center; }
.plan-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.plan-grid article { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--panel); }
.plan-grid span { color: var(--accent); font-weight: 800; font-size: 13px; }
.plan-grid b { display: block; font-size: 19px; margin: 12px 0 8px; }
.plan-grid p { margin: 0; color: var(--muted); line-height: 1.45; }

footer { display: flex; justify-content: space-between; gap: 18px; padding: 20px 24px; color: white; background: #050b0f; border-top: 1px solid var(--line); }
footer span { color: #aebac2; }

body.light-concept {
  color-scheme: light;
  color: #252b2f;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,107,0,.08), transparent 0 26%, transparent),
    radial-gradient(circle at 86% 8%, rgba(255,107,0,.06), transparent 0 22%, transparent),
    linear-gradient(135deg, #ffffff, #f4f6f7 52%, #ffffff);
}

.light-concept .topbar {
  background: rgba(255,255,255,.94);
}

.light-concept nav a {
  color: #59656d;
}

.light-concept nav a:hover {
  color: #252b2f;
  background: rgba(255,107,0,.08);
}

.light-concept .system-chip {
  color: #3f4a51;
}

.light-concept .hero {
  background:
    radial-gradient(circle at 16% 45%, rgba(255,107,0,.10), transparent 0 24%, transparent),
    repeating-radial-gradient(circle at 18% 50%, rgba(255,107,0,.08) 0 1px, transparent 1px 54px),
    linear-gradient(115deg, rgba(255,255,255,.86), rgba(245,248,249,.9));
}

.light-concept .tagline,
.light-concept .hero-proof b,
.light-concept .event-card h2,
.light-concept .panel-title h2,
.light-concept .map-toolbar strong,
.light-concept .feature-strip b,
.light-concept footer {
  color: #252b2f;
}

.light-concept .lede,
.light-concept .hero-proof span,
.light-concept .panel-title span,
.light-concept .source-grid span,
.light-concept .feature-strip small,
.light-concept footer span {
  color: #65717a;
}

.light-concept .hero-actions .secondary {
  color: #252b2f;
  background: rgba(255,107,0,.08);
  border: 1px solid rgba(255,107,0,.22);
}

.light-concept .hero-proof article,
.light-concept .source-grid article,
.light-concept .feature-strip article {
  background: rgba(255,255,255,.92);
}

.light-concept .event-card,
.light-concept .panel,
.light-concept .map-panel {
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 40px rgba(37,43,47,.08);
}

.light-concept .quake-row {
  border-bottom-color: rgba(37,43,47,.09);
}

.light-concept .quake-row.head {
  color: #59656d;
  background: #f7f9fa;
}

.light-concept .quake-scroll::-webkit-scrollbar-track {
  background: #eef2f4;
}

.light-concept .quake-scroll::-webkit-scrollbar-thumb {
  border-color: #eef2f4;
}

.light-concept footer {
  background: white;
}

.monitor {
  grid-template-columns: 1fr;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .7fr);
  align-items: start;
  gap: 14px;
}

.intro .hero,
.intro #fuentes {
  grid-column: auto;
  grid-row: auto;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .65fr);
  gap: 14px;
}

.live-summary {
  grid-column: 1 / -1;
}

.workspace #eventos {
  grid-column: 1;
  grid-row: 1;
}

.workspace .map-panel {
  grid-column: 2;
  grid-row: 1;
}

.intro-strip {
  grid-column: 1 / -1;
}

.feature-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.intro .source-grid {
  grid-template-columns: 1fr 1fr;
  padding: 14px 18px 18px;
}

.intro .hero {
  padding: 20px 24px 16px;
}

.intro .hero-title-logo {
  width: min(100%, 250px);
}

.intro .signal-line {
  margin: 14px 0 0;
}

@media (max-width: 1050px) {
  .intro,
  .workspace,
  .live-summary {
    grid-template-columns: 1fr;
  }

  .workspace #eventos,
  .workspace .map-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .feature-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1050px) {
  .minimal-monitor .workspace {
    grid-template-columns: 1fr;
  }

  .minimal-monitor #eventos,
  .minimal-monitor .map-panel {
    min-height: auto;
  }

  .minimal-monitor .quake-scroll,
  .minimal-monitor #event-map,
  .minimal-monitor .event-map-wrap {
    height: 312px;
    min-height: 312px;
  }
}

@media (max-width: 560px) {
  .intro .source-grid,
  .feature-strip {
    grid-template-columns: 1fr;
  }
}

.feature-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.feature-strip article {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 14px;
  background: rgba(13,24,31,.92);
}

.feature-strip span {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 20px;
}

.feature-strip b { display: block; font-size: 15px; }
.feature-strip small { color: var(--muted); line-height: 1.35; }

@media (max-width: 1050px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 14px 16px; }
  .system-chip { position: absolute; top: 16px; right: 16px; }
  nav { width: 100%; overflow-x: auto; }
  .monitor, .hero, .workspace, .plans { grid-template-columns: 1fr; }
  .hero,
  #eventos,
  .map-panel,
  #fuentes,
  .feature-strip {
    grid-column: 1;
    grid-row: auto;
  }
  .hero { min-height: auto; padding: 28px 16px 18px; }
  .hero-title-logo { width: min(100%, 280px); }
  .hero-proof { grid-template-columns: 1fr; }
  .metrics, .plan-grid { grid-template-columns: 1fr; }
  .map-panel, .trust-panel { grid-row: auto; grid-column: auto; }
  #event-map, .event-map-wrap { min-height: 360px; height: 360px; }
  .feature-strip { grid-template-columns: 1fr 1fr; }
  .quake-row { grid-template-columns: 40px 56px minmax(95px,1fr) 64px 92px 62px; font-size: 11px; }
  .quake-row span:nth-child(4), .quake-row span:nth-child(6), .quake-row em { display: none; }
}

@media (max-width: 560px) {
  .brand { width: 170px; min-width: 170px; }
  .brand img { width: 160px; height: 44px; }
  .tagline { font-size: 18px; }
  dl, .source-grid { grid-template-columns: 1fr; }
  .map-toolbar .segmented, .panel-title span { display: none; }
  .feature-strip { grid-template-columns: 1fr; }
  .quake-row { grid-template-columns: 34px 50px minmax(96px,1fr) 82px; gap: 6px; padding: 4px 8px; }
  .quake-row:not(.head) span:nth-of-type(2), .quake-row:not(.head) span:nth-of-type(3), .quake-row:not(.head) span:nth-of-type(4), .quake-row em { display: none; }
  .quake-row.head span:nth-child(4), .quake-row.head span:nth-child(5), .quake-row.head span:nth-child(6), .quake-row.head span:nth-child(8) { display: none; }
  footer { flex-direction: column; }
}
