/* Fill the available panel width with compact, equal-width controls. */
.io-cards {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 7px;
  max-width: none;
  padding: 2px 1px 3px;
}
.io-widget {
  width: 100%;
  min-height: 55px;
  display: flex;
  flex-direction: column;
}
.io-widget-toolbar { flex: 0 0 22px; height: 22px; padding: 0 2px; }
.io-widget-toolbar .icon-button { width: 20px; height: 20px; padding: 2px; opacity: 1; }
.io-channel { font-size: 11px; line-height: 13px; }
.io-widget-body {
  min-height: 31px;
  flex: 1;
  gap: 2px;
  padding: 1px 4px 3px;
}
.io-widget-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 12px;
  line-height: 12px;
}
.io-widget-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
  font-size: 12px;
  line-height: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: hidden;
  text-overflow: clip;
}
.io-widget-state { font-size: 10px; line-height: 12px; white-space: nowrap; opacity: 1; }
.io-lamp { flex: 0 0 10px; width: 10px; height: 10px; margin: 0; opacity: 1; }
.io-switch { flex: 0 0 22px; width: 22px; height: 11px; margin: 0; opacity: 1; }
.io-switch::after { top: 2px; left: 2px; width: 5px; height: 5px; }
.is-active .io-switch::after { transform: translateX(12px); }
.io-widget-pending { font-size: 10px; line-height: 12px; }
.io-group + .io-group { margin-top: 10px; padding-top: 10px; }
.io-input:not(.is-active) {
  background: #dce4ee;
  color: #263a52;
  border-color: #8397b0;
  box-shadow: none;
}
.io-input.is-active {
  background: var(--signal-color);
  color: var(--signal-ink);
  border-color: var(--signal-border);
}
.io-input:not(.is-active) .io-widget-toolbar .icon-button:hover { background: #ced9e850; }
.io-trash-help { margin: 10px 0 0; color: #263e5c; font-size: 12px; line-height: 1.5; }
.io-input-keyboard-hint { color: #263e5c; font-size: 12px; line-height: 1.5; }
