/* =====================================================
   ElevatorGuard Pro — Indicadores de Red
   ===================================================== */

/* ═══ ICONO GRANDE (DASHBOARD) ═══ */
.net-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.net-icon.connected {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.net-icon.connected::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #10b981;
  opacity: 0;
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}
.net-icon.unstable {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  animation: blink-yellow 1.2s infinite;
}
@keyframes blink-yellow {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.net-icon.disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ═══ ICONO PEQUEÑO (TABLA) ═══ */
.net-icon-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
  flex-shrink: 0;
}
.net-icon-sm.connected {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.net-icon-sm.unstable {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  animation: blink-yellow 1.2s infinite;
}
.net-icon-sm.disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ═══ CELDA CON ICONO + TEXTO ═══ */
.net-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.net-label {
  font-size: 11px;
  font-weight: 600;
}
.net-label.connected    { color: #10b981; }
.net-label.unstable     { color: #f59e0b; }
.net-label.disconnected { color: #ef4444; }

/* ═══ TARJETA DE CABINA (DASHBOARD) ═══ */
.cabin-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cabin-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cabin-tile-status {
  display: flex;
  align-items: center;
}
.cabin-tile-building {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cabin-tile-floor {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-light);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}
.cabin-tile-floor-label {
  font-size: 10px;
  color: var(--text-muted);
}

/* ═══ LEYENDA ═══ */
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.legend-dot.connected    { background: #10b981; box-shadow: 0 0 6px #10b981; }
.legend-dot.unstable     { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.legend-dot.disconnected { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.legend-text {
  font-size: 11px;
  color: #94a3b8;
  margin-right: 10px;
}

/* ═══ TABLA ORDENABLE ═══ */
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 26px;
  transition: background 0.15s, color 0.15s;
}
.data-table th.sortable:hover {
  background: #1e2a42;
  color: #60a5fa;
}
.sort-arrows {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  font-size: 8px;
  opacity: 0.35;
}
.data-table th.sortable:hover .sort-arrows { opacity: 0.7; }
.data-table th.sort-asc .sort-arrows  { opacity: 1; }
.data-table th.sort-desc .sort-arrows { opacity: 1; }
.sort-arrows .sa {
  color: #64748b;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.data-table th.sort-asc  .sa-up { color: #60a5fa; font-weight: 900; }
.data-table th.sort-desc .sa-dn { color: #60a5fa; font-weight: 900; }
.data-table th.sort-asc,
.data-table th.sort-desc {
  color: #60a5fa !important;
  background: rgba(59, 130, 246, 0.08);
}

/* ═══ REDIMENSIONADO DE COLUMNAS ═══ */
.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 3;
}
.col-resizer:hover,
.col-resizer.resizing {
  background: rgba(96, 165, 250, 0.5);
}
.data-table th { position: relative; }
/* Cabina sin tablet instalada (no es una avería) */
.net-icon.notablet { background: rgba(148,163,184,.12); color: #94a3b8; border: 1px solid rgba(148,163,184,.3); }
.net-icon-sm.notablet { background: rgba(148,163,184,.12); color: #94a3b8; }
.net-label.notablet { color: #94a3b8; }
