/* HControl Center WEB — FASE VISUAL R1 — 2026-10-16
   Fuente: M7.19.6.25.8.10.10 · Solo reglas CSS aditivas.
   NO INSTALAR EN PRODUCCIÓN: requiere validación autenticada y regresión.
   No modifica lógica, HTML, permisos, tablas SQL, colores de los logos o JS.
*/

/* 1. Acciones de Stock: evitar barras a ancho completo y unificar alturas. */
html body.audit-phase4.authenticated #article-stock-panel .stock-action-row {
  display:flex!important;
  flex-flow:row wrap!important;
  justify-content:flex-start!important;
  align-items:center!important;
  gap:10px!important;
}
html body.audit-phase4.authenticated #article-stock-panel .stock-action-row :is(#stock-manual-issue,#stock-export) {
  width:auto!important;
  min-width:152px!important;
  max-width:100%!important;
  flex:0 1 auto!important;
  min-height:42px!important;
  height:auto!important;
  padding:10px 16px!important;
  white-space:normal!important;
  border-radius:10px!important;
  line-height:1.3!important;
}

/* Acción destructiva: nunca expandir el botón rojo a todo el ancho.
   Su ubicación dentro del acordeón se mantiene a cargo de la app. */
html body.audit-phase4.authenticated #article-stock-panel #stock-zero-all {
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  flex:0 1 auto!important;
  align-self:flex-start!important;
  padding:10px 16px!important;
  line-height:1.3!important;
  border-radius:10px!important;
  white-space:normal!important;
}

/* 2. Filtros y ajuste de stock: mismo lenguaje de campo y botón. */
html body.authenticated #article-stock-panel :is(.stock-filter-grid,.stock-bulk-bar)
  :is(input:not([type="checkbox"]),select) {
  box-sizing:border-box!important;
  min-height:42px!important;
  border:1px solid #cdd7e5!important;
  border-radius:10px!important;
  background-color:#fff!important;
  color:#1b2c43!important;
  font-family:var(--yt-font-ui,system-ui,sans-serif)!important;
}
html body.authenticated #article-stock-panel .stock-bulk-bar :is(button,#stock-bulk-apply) {
  min-height:42px!important;
  border-radius:10px!important;
  line-height:1.25!important;
}

/* 3. Accesibilidad perceptible: foco de teclado, sin tocar eventos. */
html body.authenticated #article-stock-panel :is(button,input,select):focus-visible,
html body.authenticated #admin-service-view [data-r26-panel="intelligence"] :is(button,input,select):focus-visible {
  outline:2px solid #b8291f!important;
  outline-offset:2px!important;
}

/* 4. Búsqueda de Inteligencia: limpiar el campo sin alterar sus acciones. */
html body.authenticated #admin-service-view [data-r26-panel="intelligence"] .r26-searchline > input {
  box-sizing:border-box!important;
  min-height:42px!important;
  border:1px solid #cdd7e5!important;
  border-radius:10px!important;
  background:#fff!important;
  min-width:0!important;
  font-family:var(--yt-font-ui,system-ui,sans-serif)!important;
}

/* 5. Móvil: separación consistente y controles legibles. */
@media (max-width:767px) {
  html body.audit-phase4.authenticated #article-stock-panel .stock-action-row {gap:8px!important}
  html body.audit-phase4.authenticated #article-stock-panel .stock-action-row :is(#stock-manual-issue,#stock-export) {
    min-height:44px!important;
    min-width:0!important;
    flex:1 1 148px!important;
  }
  html body.authenticated #article-stock-panel .stock-bulk-bar :is(button,input:not([type="checkbox"]),select) {
    min-height:44px!important;
  }
}
