/* Bald BOT · Ajuste visual compacto 1.
   Cargar después de minimal.css. No contiene lógica ni cambios de configuración.
   Conserva el logo, el fondo del login y la paleta de la instalación actual. */

/* La imagen ya incluye BALD BOT: sin subtítulo lateral ni desbordamientos. */
aside > .brand {
  justify-content: center;
  gap: 0;
  min-width: 0;
  margin: 0 0 20px;
}
aside .sidebar-brand-image {
  width: 150px;
  max-width: 100%;
  height: auto;
  flex: 0 1 auto;
}

/* Vista general: tarjetas compactas, tres columnas en escritorio. */
.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.module-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  column-gap: 12px;
  row-gap: 10px;
  align-items: start;
  min-width: 0;
  min-height: 166px;
  padding: 14px 18px 16px;
  border-radius: 10px;
}
.module-card h3 {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.module-card > p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.module-card .bald-switch-row {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  align-self: center;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
}
.module-card .bald-switch {
  min-width: 46px;
  min-height: 44px;
  gap: 0;
  padding: 0;
  justify-content: center;
}
/* El nombre está en el título. Se conserva el texto para tecnologías de asistencia;
   el botón mantiene aria-label, aria-checked y aria-busy del JavaScript original. */
.module-card .bald-switch-label,
.module-card .bald-switch-state {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.module-card .module-configure {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: start;
  align-self: end;
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}

/* Sin caja rectangular al pasar el mouse, pulsar o recuperar el foco. */
.bald-switch,
.bald-switch:hover,
.bald-switch:active,
.bald-switch:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: none;
}
/* El foco de teclado se indica en la pista redondeada, no en el botón rectangular. */
.bald-switch:focus-visible .bald-switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 1199px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .module-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  aside > .brand { margin: 0; }
  aside .sidebar-brand-image { width: 112px; }
  .module-card { padding: 12px 16px 14px; min-height: 160px; }
}
