.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 4px 0 16px;
}

.device-card {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

.device-card:hover:not(.disabled) {
  box-shadow: var(--shadow);
}

.device-card.selected {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(232, 91, 91, 0.15);
}

.device-card.disabled {
  opacity: 0.45;
  cursor: default;
}

.card-checkbox-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  line-height: 0;
}

.card-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--color-accent);
}

.card-checkbox:disabled {
  cursor: not-allowed;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-left: 22px;
}

.card-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-status-dot.online  { background: var(--color-online); }
.card-status-dot.offline { background: var(--color-offline); }

.card-badge-disabled {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--color-disabled);
  border-radius: 4px;
  padding: 1px 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-body {
  flex: 1;
}

.card-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 5px;
  word-break: break-word;
}

.card-location {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 3px;
  word-break: break-word;
  display: none; /* oculto para evitar campo de locacion */
}
