/* ============================================ */
/* HISTORIAL DE ALERTAS                          */
/* ============================================ */
.alert-filter-bar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip.active, .filter-chip:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.alerts-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.empty-alerts {
  text-align: center;
  padding: 3rem;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.empty-alerts i {
  font-size: 2.2rem;
  color: var(--color-ok);
  margin-bottom: 0.5rem;
}

.alert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-card);
}

.alert-card.CRITICA {
  border-left: 4px solid var(--color-critical);
  background: var(--color-critical-bg);
}

.alert-card.ADVERTENCIA {
  border-left: 4px solid var(--color-warning);
  background: var(--color-warning-bg);
}

.alert-card.INFO {
  border-left: 4px solid var(--color-ok);
}

.alert-card.resuelta {
  opacity: 0.55;
}

.alert-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.alert-badge.CRITICA {
  background: var(--color-critical);
  color: #ffffff;
}

.alert-badge.ADVERTENCIA {
  background: var(--color-warning);
  color: #000000;
}

.alert-badge.INFO {
  background: var(--color-ok);
  color: #ffffff;
}

.alert-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

.alert-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
}

.alert-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.35rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.alert-detail-item {
  display: flex;
  gap: 0.35rem;
}

.alert-detail-key {
  color: var(--text-dim);
}

.alert-detail-val {
  color: var(--text-main);
  font-weight: 700;
}

.alert-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.alert-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.2rem;
}
