/* Explorador dinámico — layout 3 columnas + login + mapa */

.hidden { display: none !important; }

/* ---- Login overlay ---- */
.login-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 42, 0.85);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff; border-radius: 14px; padding: 32px 28px; width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center;
}
.login-card .logo {
  width: 48px; height: 48px; border-radius: 10px; margin: 0 auto 12px;
  background: #15803d; color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.login-card h2 { margin: 0 0 6px; font-size: 20px; }
.login-sub { color: #64748b; font-size: 13px; margin: 0 0 20px; line-height: 1.4; }
#login-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
#login-form label { font-size: 13px; font-weight: 600; color: #334155; }
#login-form input {
  width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid #cbd5e1;
  border-radius: 8px; font-size: 14px; box-sizing: border-box;
}
.login-msg { margin-top: 14px; font-size: 13px; min-height: 18px; color: #b45309; }

/* ---- Topbar extras ---- */
.topbar-right { display: flex; align-items: center; gap: 14px; }
.nav-link { color: #cbd5e1; text-decoration: none; font-size: 13px; }
.nav-link:hover { color: #fff; }
.user-email { color: #94a3b8; font-size: 12px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ---- Layout 3 columnas ---- */
.explorer {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 14px; padding: 14px; height: calc(100vh - 64px); box-sizing: border-box;
}
@media (max-width: 1100px) {
  .explorer { grid-template-columns: 1fr; height: auto; }
}

.selectors, .kpi-panel {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 16px; overflow-y: auto;
}
.selectors h3, .kpi-panel h3 { margin: 0 0 14px; font-size: 15px; color: #0f172a; }
.selectors label {
  display: block; font-size: 12px; font-weight: 600; color: #475569;
  margin-bottom: 14px; text-transform: uppercase; letter-spacing: .03em;
}
.selectors select {
  width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid #cbd5e1;
  border-radius: 8px; font-size: 14px; background: #f8fafc; font-weight: 400;
  text-transform: none; letter-spacing: 0; color: #0f172a;
}
.provenance {
  margin-top: 18px; padding: 12px; background: #f1f5f9; border-radius: 8px;
  font-size: 11.5px; color: #475569; line-height: 1.6;
}
.provenance .tech { color: #94a3b8; }

/* ---- Mapa ---- */
.map-panel {
  position: relative; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; overflow: hidden; min-height: 480px;
}
#map { position: absolute; inset: 0; }
.map-status {
  position: absolute; bottom: 10px; left: 10px; z-index: 500;
  background: rgba(255,255,255,.9); padding: 5px 10px; border-radius: 6px;
  font-size: 12px; color: #475569; max-width: 60%;
}
.legend {
  position: absolute; top: 10px; right: 10px; z-index: 500;
  background: rgba(255,255,255,.95); padding: 10px 12px; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); max-width: 230px;
}
.lg-title { font-size: 12px; font-weight: 600; color: #0f172a; margin-bottom: 6px; }
.lg-scale { display: flex; flex-direction: column; gap: 2px; }
.lg-stop { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #475569; }
.lg-stop i { width: 16px; height: 12px; border-radius: 2px; display: inline-block; }

/* ---- KPIs ---- */
.kpi-card {
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
}
.kpi-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: #64748b; font-weight: 600; margin-bottom: 4px;
}
.kpi-value { font-size: 22px; font-weight: 700; color: #0f172a; }
.kpi-sub { font-size: 12px; color: #64748b; margin-top: 3px; }
.kpi-card .chart-wrap { height: 150px; position: relative; }
.kpi-cell { background: #f0fdf4; border-color: #bbf7d0; }
