.devices-page {
  padding: 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #1A1A2E;
  margin: 0;
}

.page-subtitle {
  color: #8E8EA0;
  font-size: 14px;
  margin: 4px 0 0;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #002D72;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: #001F4F;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.devices-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.empty-icon {
  width: 100px;
  height: 100px;
  background: #F5F7FA;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E8ECF0;
  border-top-color: #002D72;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  color: #1A1A2E;
  margin: 0 0 8px;
}

.empty-description {
  color: #8E8EA0;
  font-size: 14px;
  max-width: 400px;
  line-height: 1.6;
  margin: 0;
}

.devices-table-scroll {
  overflow-x: auto;
}

.devices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.devices-table th,
.devices-table td {
  padding: 16px 24px;
  text-align: left;
  vertical-align: middle;
}

.devices-table thead th {
  padding: 14px 24px;
  background: #F8F9FC;
  border-bottom: 1px solid #E8ECF0;
  font-size: 12px;
  font-weight: 600;
  color: #8E8EA0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.devices-table tbody tr {
  border-bottom: 1px solid #F0F2F5;
  transition: background 0.15s;
}

.devices-table tbody tr:last-child {
  border-bottom: none;
}

.devices-table tbody tr:hover {
  background: #F8F9FC;
}

.devices-table td {
  color: #4A4A68;
}

.devices-tabla-nombre {
  font-weight: 600;
  color: #1A1A2E;
}

.devices-tabla-nombre a {
  color: inherit;
  text-decoration: none;
}

.devices-tabla-nombre a:hover {
  text-decoration: underline;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.online {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-badge.offline {
  background: #FBE9E7;
  color: #C62828;
}

.status-badge.alert {
  background: #FFF3E0;
  color: #E65100;
}

/* «Degradado» (RF-DIS-001): el dispositivo comunica, pero informa una falla
   funcional. Lleva color propio y no el de `alert` porque el criterio exige
   presentar los tres estados de forma distinguible, y dos naranjas no lo son.
   El color nunca va solo: cada insignia lleva su etiqueta textual, que es lo
   que RNF-USA-002 y WCAG 2.1 AA piden para no depender del color. */
.status-badge.degraded {
  background: #F3E5F5;
  color: #6A1B9A;
}

.col-actions {
  width: 40px;
  text-align: center;
}
