/**
 * GanadoControl — estilos dashboard IoT / LoRa en vivo.
 * Complementa index.html (tema industrial, responsive).
 */

/* ---------- Grid de tarjetas LoRa en vivo ---------- */
#loraHardwareDevices.lora-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

@media (max-width: 520px) {
  #loraHardwareDevices.lora-nodes-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Tarjeta con acento según enlace ---------- */
.lora-hw-card {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.lora-hw-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #64748b;
  border-radius: 2px 0 0 2px;
}

.lora-hw-card.lora-hw-card--online::before {
  background: linear-gradient(180deg, #4ade80, #22c55e);
}

.lora-hw-card.lora-hw-card--delay::before {
  background: linear-gradient(180deg, #fb923c, #ea580c);
}

.lora-hw-card.lora-hw-card--offline::before {
  background: linear-gradient(180deg, #f87171, #dc2626);
}

.lora-hw-card--online {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.08);
}

.lora-hw-card--delay {
  border-color: rgba(234, 88, 12, 0.4);
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.08);
}

.lora-hw-card--offline {
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.06);
  opacity: 0.95;
}

.lora-hw-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.lora-hw-card-title {
  flex: 1;
  min-width: 0;
}

/* ---------- Badge de estado ---------- */
.lora-status-pill {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.lora-status-pill--online {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.35);
}

.lora-status-pill--delay {
  background: rgba(234, 88, 12, 0.15);
  color: #9a3412;
  border-color: rgba(234, 88, 12, 0.35);
}

.lora-status-pill--offline {
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.35);
}

/* Modo oscuro (sección tanques dentro de cards oscuras): ajuste contraste */
.gc-section-card .lora-status-pill--online {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
}

.gc-section-card .lora-status-pill--delay {
  background: rgba(251, 146, 60, 0.2);
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.4);
}

.gc-section-card .lora-status-pill--offline {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.lora-last-seen {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.gc-section-card .lora-last-seen {
  color: rgba(226, 232, 240, 0.75);
}

.lora-api-hint {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 10px;
  line-height: 1.45;
}

.gc-section-card .lora-api-hint {
  color: var(--gc-text-muted, #a0a0a0);
}
